Skip to contentSkip to conversation

Linux - AMD SB950 USB Regression

DISCUSSION dAgeCKo 2 participants 5 messages Jan 4, 2013 – Jan 19, 2013 1 message not in the archive

lore
Share & tools
lore

dAgeCKo

author
#1 lore raw
In reply to a message not in the archive

Hello,

Some months ago I noticed that my USB controler (and also my network controler) does not work anymore on newer kernels from my debian wheezy distribution.

I then reported a bug for the former one here:

https://bugzilla.kernel.org/show_bug.cgi?id=47791

With some helps and time, I could locate the source of the regression, that is an old commit from the year 2010 you seem to commit. Git besection identified the commit as:

git bisect bad 5c80cc78de46aef6cd5e714208da05c3f7f548f8

Someone from the usb kernel mailing list (Alan Stern) then asked me to write an email to you, in my hope the bug to be solved.

Some informations were said on the bug tracker, but if you need any other information that could help you in any manner, please let me know.

Please note that the regression only involves USB2 ports of the mainboard, not the USB3 ports.

Regards.

---
Jean-Dominique Frattini

author
#2 lore raw

Hi,

the bug has been resolved after a BIOS upgrade. Since the mainboard constructor said me that it's impossible that the BIOS was an issue since their Windows users do not face the same issue, I beleived it could have come from the Linux kernel.

Bye.

Quoted 30 lines · dAgeCKo

Hello,

Some months ago I noticed that my USB controler (and also my network controler) does not work anymore on newer kernels from my debian wheezy distribution.

I then reported a bug for the former one here:

https://bugzilla.kernel.org/show_bug.cgi?id=47791

With some helps and time, I could locate the source of the regression, that is an old commit from the year 2010 you seem to commit. Git besection identified the commit as:

git bisect bad 5c80cc78de46aef6cd5e714208da05c3f7f548f8

Someone from the usb kernel mailing list (Alan Stern) then asked me to write an email to you, in my hope the bug to be solved.

Some informations were said on the bug tracker, but if you need any other information that could help you in any manner, please let me know.

Please note that the regression only involves USB2 ports of the mainboard, not the USB3 ports.

Regards.

---
Jean-Dominique Frattini

#3 lore raw

Hi,

(leaving in the rest for reference, answer below, adding Alan, Joerg, Shane and linux-usb to CC).

Quoted 5 lines · dAgeCKo

the bug has been resolved after a BIOS upgrade. Since the mainboard constructor said me that it's impossible that the BIOS was an issue since their Windows users do not face the same issue, I beleived it could have come from the Linux kernel.

Quoted 28 lines

Bye.

Quoted 25 lines · dAgeCKo

Hello,

Some months ago I noticed that my USB controler (and also my network controler) does not work anymore on newer kernels from my debian wheezy distribution.

I then reported a bug for the former one here:

https://bugzilla.kernel.org/show_bug.cgi?id=47791

With some helps and time, I could locate the source of the regression, that is an old commit from the year 2010 you seem to commit. Git besection identified the commit as:

git bisect bad 5c80cc78de46aef6cd5e714208da05c3f7f548f8

Someone from the usb kernel mailing list (Alan Stern) then asked me to write an email to you, in my hope the bug to be solved.

Some informations were said on the bug tracker, but if you need any other information that could help you in any manner, please let me know.

Please note that the regression only involves USB2 ports of the mainboard, not the USB3 ports.

So, there seems to be some serious breakage with GART on SB9xx. I don't know whether this is the platform BIOS or the vendor BIOS causing it because the original bug reporter says he observes the issue on an MSI board and I'm experiencing this on my favourite bunch ASUS.

So, if you use the GART as an IOMMU, i.e.:

Jan 17 22:08:15 pd kernel: [    0.924063] PCI-DMA: using GART IOMMU.
Jan 17 22:08:15 pd kernel: [    0.924120] PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture

USB ports start choking like this:

Jan 17 22:08:15 pd kernel: [    3.229909] usb 4-1: device descriptor read/64, error -32
Jan 17 22:08:15 pd kernel: [    3.432786] usb 4-1: new high-speed USB device number 3 using ehci-pci
Jan 17 22:08:15 pd kernel: [    3.534684] usb 4-1: device descriptor read/64, error -32
Jan 17 22:08:15 pd kernel: [    3.737642] usb 4-1: device descriptor read/64, error -32

I'd go and venture a guess here since I don't have an idea that DMA somehow gets busted with the GART and thus the errors.

Now, those boards normally have an IOMMU too so if you go and enable

CONFIG_AMD_IOMMU=y

the problem is gone (we're using the real IOMMU for DMA mapping, etc, etc). So dAgeCKo, that would be another thing you could do: try enabling the IOMMU in the BIOS and the above CONFIG option and the issue would be fixed too.

At least this fixes it on my box.

To the question "how do we fix the GART issue?" I have no answer and would expect more informed opinions from someone else.

Thanks and HTH.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
author
#4 lore raw
Quoted 11 lines · Borislav Petkov

So, there seems to be some serious breakage with GART on SB9xx. I don't know whether this is the platform BIOS or the vendor BIOS causing it because the original bug reporter says he observes the issue on an MSI board and I'm experiencing this on my favourite bunch ASUS.

So, if you use the GART as an IOMMU, i.e.:

Jan 17 22:08:15 pd kernel: [    0.924063] PCI-DMA: using GART IOMMU.
Jan 17 22:08:15 pd kernel: [    0.924120] PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture
Quoted 6 lines

USB ports start choking like this:

Jan 17 22:08:15 pd kernel: [    3.229909] usb 4-1: device descriptor read/64, error -32
Jan 17 22:08:15 pd kernel: [    3.432786] usb 4-1: new high-speed USB device number 3 using ehci-pci
Jan 17 22:08:15 pd kernel: [    3.534684] usb 4-1: device descriptor read/64, error -32
Jan 17 22:08:15 pd kernel: [    3.737642] usb 4-1: device descriptor read/64, error -32

Yes, this is exactly what I faced.

Quoted 4 lines

I'd go and venture a guess here since I don't have an idea that DMA somehow gets busted with the GART and thus the errors.

Quoted 8 lines

Now, those boards normally have an IOMMU too so if you go and enable

CONFIG_AMD_IOMMU=y

the problem is gone (we're using the real IOMMU for DMA mapping, etc, etc). So dAgeCKo, that would be another thing you could do: try enabling the IOMMU in the BIOS and the above CONFIG option and the issue would be fixed too.

Here is below, exactly what the guy from MSI said me after I said him a BIOS upgrade did resolve my bug:

"The reacts differently to Win/Linux, but it relies on updates by AMD. The new AGESA in the BIOS might had fixes for Linux."

After few researches, it seems that this "BIOS-level" software has effectively a special implementation wrapper for Linux (something I can't understand why actually). For more reference you can find little information here (http://www.coreboot.org/data/LinuxBIOS%20AMD%202006%20Final_10-02-2006.pdf).

I can't try the solution you are giving since I can't (and don't want to try to) downgrade my BIOS.

Another important thing you might be interested in is that not only my USB 2 weren't working. My mainboard ethernet wasn't working to (and was resolved with the BIOS upgrade too). The ethernet chip is:

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

I don't know if that can be related to what you are saying.

Quoted 5 lines

At least this fixes it on my box.

To the question "how do we fix the GART issue?" I have no answer and would expect more informed opinions from someone else.

Actually I can't tell if I have any GART issues. The only thing I can say is that 3D looks to work nicely. However I think I never consumed more memory than my graphic card has.

Quoted 3 lines

Thanks and HTH.

Thanks you too.

#5 lore raw
Quoted 2 lines · dAgeCKo

I can't try the solution you are giving since I can't (and don't want to try to) downgrade my BIOS.

Quoted 3 lines · I don't think I said that. Here's what I actually
Quoted 3 lines

So dAgeCKo, that would be another thing you could do: try enabling the IOMMU in the BIOS and the above CONFIG option and the issue would be fixed too.

IOW, you enter the BIOS, go to "NB settings" or similar and set IOMMU to Auto/Enabled. Provided you have an IOMMU but you should have that on this chipset.

Then, you enable CONFIG_AMD_IOMMU in your kernel and done: the kernel uses the IOMMU hardware instead of the GART.

That's it, no need for any BIOS up-/downgrading.

Quoted 8 lines

Another important thing you might be interested in is that not only my USB 2 weren't working. My mainboard ethernet wasn't working to (and was resolved with the BIOS upgrade too). The ethernet chip is:

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

I don't know if that can be related to what you are saying.

It could be, my nic kept resetting and once got an xmit queue timeout so it could very well be related.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--