# Can I have my money back?



## zirias@ (May 15, 2018)

Background: I have a PCIe card that doesn't support MSI. This is -- very unfortunate, as there are currently no FreeBSD drivers for this card, only Linux drivers, and without MSIs, it seems there's no way to use it from a virtual machine.

Now I read in different places that MSI is mandatory for PCIe? Is this true? If this card was advertised as PCIe, can I have my money back?


----------



## Phishfry (May 15, 2018)

Zirias said:


> Now I read in different places that MSI is mandatory for PCIe?


I am not familiar with that card but at $150USD bare I understand your concerns.



Zirias said:


> Now I read in different places that MSI is mandatory for PCIe?


Yes MSI or the newer MSI-x is needed for PCIe.

https://openvoxusa.com/A810E?
Adjustable Interrupt Routing Design
Interrupts Frequency Adjustment

FreeBSD has some hints for MSI.
https://www.freebsd.org/cgi/man.cgi?ahci(4)

_hint.ahci.X.msi_
     controls Message Signaled Interrupts (MSI)    usage by the specified con-
     troller.

       0     MSI disabled;
       1     single    MSI vector used, if supported;
       2     multiple MSI vectors used, if supported (default);


----------



## zirias@ (May 15, 2018)

Phishfry said:


> at $150USD bare I understand your concerns.


That's just the base price, of course I ordered a board with 8 FXS modules piggy-backed ... arghhhhh

Unfortunately I don't quite understand the rest of your post, but it sounds promising  But .. isn't ahci a storage interface?


----------



## Phishfry (May 15, 2018)

Yes you are correct, that AHCI hint appears to be for storage devices.
What does `pciconf -lvbc` show for the device?


----------



## zirias@ (May 15, 2018)

Phishfry said:


> What does  pciconf -lvbc show for the device?




```
none5@pci0:5:0:0:       class=0x078000 card=0x00011b74 chip=0x08101b74 rev=0x14 hdr=0x00                                                                       
    vendor     = 'OpenVox Communication Co. Ltd.'                             
    class      = simple comms                                                 
    bar   [10] = type Memory, range 32, base 0xdfe00000, size 524288, enabled
```

I guess it really doesn't support MSIs, so I guess this is a PCIe spec violation?


----------



## zirias@ (May 15, 2018)

Phishfry said:


> That or FreeBSD is not picking up the 'cap' due to lack of a driver.



Which is, based on my "dangerous partial knowledge"  quite unlikely. After all, ppt can pick up any PCI device and must be able to detect the MSI/MSI-X abilities for vmm 

So if I'm right here ... is violating a spec reason enough to request a refund? Unfortunately, I bought this card 2 years ago, then moved to a new house and due to problems with the telcos / ISPs, I didn't have a DSL line until a few weeks ago, so I discovered this problem very late


----------



## ralphbsz (May 15, 2018)

Did the vendor you bought the card from claim that it would work with FreeBSD?
Did they claim that the card is fully compliant with the spec?
Same two questions for the manufacturer?


----------



## Phishfry (May 15, 2018)

Silly question but have you tried the card in different slots?
Does this happen to be a server board? Some servers use a PCIe bridge chip and need attention..
I prefer the many embedded boxs approach versus a VM.


----------



## zirias@ (May 15, 2018)

Well, my question boils down to: do you _have_ to claim "full compliance" when you sell a PCIe card? Isn't "full compliance" implied? Maybe I should ask a lawyer


----------



## zirias@ (May 16, 2018)

Phishfry said:


> Silly question but have you tried the card in different slots?


Maybe not so silly .. no, I didn't try. I thought this was a thing from the past with hard-wired IRQ lines on the PCI slots 


Phishfry said:


> Does this happen to be a server board? Some servers use a PCIe bridge chip and need attention..


It *IS* a server board. Anything I should read about this "attention" needed? Thanks!


----------



## Phishfry (May 16, 2018)

To check, see if this or some variant shows up in you pciconf.
device     = 'PCI Express-to-PCI Express Bridge'

Different slots can be on  PCIe busses is why I would swap around.


----------



## robroy (May 16, 2018)

Zirias said:


> Maybe not so silly .. no, I didn't try. I thought this was a thing from the past



I had a Supermicro H8SCM (2013-ish?), and I remember various PCI Express cards working in some slots and not others; there was no obvious pattern to it.  So every time I wanted to put a card in, I just played musical slots 'til I lucked out.

So yeah, for one reason or another, this still happens sometimes.

EDIT:  I just remembered more about this.  Some of the time, a card would actually appear to the operating system, and everything would look right, and yet it just wouldn't work.  I remember this with a NIC; everything looked normal, but the NIC would only actually send and receive frames while it lived in a particular slot (it was a quality Intel NIC too).


----------



## zirias@ (May 16, 2018)

Thanks guys ... so as a last resort, I'll try different slots and see whether MSI becomes available. Not today, I have to unmount this server from the rack  But I will try, it's a last chance  Otherwise, I'd have to either port the driver myself to FreeBSD (well, I know C ... haha) or really try to get a refund ... or, just sell this thing on ebay


----------



## Phishfry (May 17, 2018)

I see this used mostly in pfSense for networking and in FreeNAS for storage cards.
"hw.pci.enable_msi=0"
"hw.pci.enable_msix=0"
Worth a shot.
Section here with the details:
https://doc.pfsense.org/index.php/Tuning_and_Troubleshooting_Network_Cards


----------



## zirias@ (May 17, 2018)

Huh? I need MSI (or MSI-X) _enabled_, not disabled 

Meanwhile, I found the linuxkpi code in the Kernel, it seems to provide a linux-compatible PCI interface as well -- so maybe I'll have some luck getting the Linux driver to work on FreeBSD, then I wouldn't need to pass this card to a vm.


----------

