<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 17, 2016 at 9:56 PM, Nick Rodgers <span dir="ltr"><<a href="mailto:dotbatman@nerdfortress.com" target="_blank">dotbatman@nerdfortress.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Almost a year and two more 4-controller usb 3.0 cards later, I still haven't found one that does what I'm after. I purchased the StarTech PEXUSB3S44V and the Sonnet Allegro Pro. Both devices get their own IOMMU group for each controller without the ACS override patch. The StarTech device seems to pass through okay, but I get in windows I get a code 10 on its root hub.</div></blockquote><div><br></div><div>It seems like I've seen this with NEC USB3 devices, have you tried using pci-stub to prevent attaching the host xhci drivers to the device?  I have a typical single controller NEC card that works more often than not with that change, but I'm not sure if it's one of the cheap clone chips or a real NEC part.  It has less than desirable behavior on bare metal too.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"> The Sonnet Allegro Pro passes through perfectly, until I restart or shutdown the VM. After the passed through controller's entry in lspci -vvvv changes from<div><div><br></div><div><div>04:00.0 USB controller: Fresco Logic FL1100 USB 3.0 Host Controller (rev 10) (prog-if 30 [XHCI])</div><div>        Subsystem: Sonnet Technologies, Inc. Device 6e31</div><div>        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+</div><div>        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-</div><div>        Latency: 0, Cache Line Size: 64 bytes</div><div>        Interrupt: pin A routed to IRQ 26</div><div>        NUMA node: 0</div><div>        Region 0: Memory at fe500000 (64-bit, non-prefetchable) [size=64K]</div><div>        Region 2: Memory at fe511000 (64-bit, non-prefetchable) [size=4K]</div><div>        Region 4: Memory at fe510000 (64-bit, non-prefetchable) [size=4K]</div><div>        Capabilities: [40] Power Management version 3</div><div>                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0+,D1+,D2-,D3hot+,D3cold-)</div><div>                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-</div></div></div></div></blockquote><div><br></div><div>NoSoftRst- == PM reset is available.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>        Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+</div><div>                Address: 0000000000000000  Data: 0000</div><div>        Capabilities: [70] Express (v2) Endpoint, MSI 00</div><div>                DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us</div><div>                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 25.000W</div></div></div></div></blockquote><div><br></div><div>Does not support FLR.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-</div><div>                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+</div><div>                        MaxPayload 128 bytes, MaxReadReq 512 bytes</div><div>                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-</div><div>                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited</div><div>                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-</div><div>                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-</div><div>                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-</div><div>                LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-</div><div>                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported</div><div>                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled</div><div>                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-</div><div>                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-</div><div>                         Compliance De-emphasis: -6dB</div><div>                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-</div><div>                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-</div><div>        Capabilities: [b0] MSI-X: Enable+ Count=8 Masked-</div><div>                Vector table: BAR=2 offset=00000000</div><div>                PBA: BAR=4 offset=00000000</div><div>        Capabilities: [100 v1] Advanced Error Reporting</div><div>                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-</div><div>                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-</div><div>                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-</div><div>                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-</div><div>                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+</div><div>                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-</div><div>        Kernel driver in use: vfio-pci</div><div>        Kernel modules: xhci_pci</div></div><div><br></div><div>to</div><div><br></div><div>04:00.0 USB controller: Fresco Logic FL1100 USB 3.0 Host Controller (rev ff) (prog-if ff)<div>        !!! Unknown header type 7f</div><div>        Kernel driver in use: vfio-pci</div><div>        Kernel modules: xhci_pci</div></div></div></div></blockquote><div><br></div><div>IIRC we'll generally opt for a bus reset rather than using PM reset, but this is indicative of a device that isn't returning from a PCI bus reset, config space is returning -1 when read.  You can try quirking the device to avoid bus resets, add a line similar to this for your device:</div><div><br></div><div><a href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/quirks.c#n3198">http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/quirks.c#n3198</a></div></div></div></div>