tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bus_dmamap_sync() for uhci(4)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Jun 9, 2008, at 15:00, Michael Lorenz wrote:

On Jun 8, 2008, at 15:15, Manuel Bouyer wrote:

On Fri, Jun 06, 2008 at 09:41:08PM +0200, Manuel Bouyer wrote:
Hi,
the attached patch adds bus_dmamap_sync() calls to uhci. I tested
this on a sparc64 with a via ehci and a umodem device.
Note that this combination works on sparc64 without the bus_dmamap_sync()
calls because all memory used for DMA is from bus_dmamem_alloc().
But bus_dmamap_sync() on this platform is not a nop, and has some
DIAGNOSTIC checks, so it shows the calls I added are not completely
brocken. Unfortunably I don't have a device to test the iso
transfers.
I'll also look at adding such calls to ehci.

Here is the patch for ehci. Also tested on sparc64, with a umass device.

I applied both patches and ran bonnie++ on a USB disk on my O2:

uhci0 at pci0 dev 3 function 0: VIA Technologies VT83C572 USB Controller (rev. 0x50)
uhci0: interrupting at crime interrupt 10
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 3 function 1: VIA Technologies VT83C572 USB Controller (rev. 0x50)
uhci1: interrupting at crime interrupt 13
usb1 at uhci1: USB revision 1.0
ehci0 at pci0 dev 3 function 2: VIA Technologies VT8237 EHCI USB Controller (rev. 0x51)
ehci0: interrupting at crime interrupt 14
ehci0: dropped intr workaround enabled
ehci0: EHCI version 0.95
ehci0: companion controllers, 2 ports each: uhci0 uhci1
usb2 at ehci0: USB revision 2.0
...
uhub0 at usb0: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: VIA Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 4 ports with 4 removable, self powered
umass0 at uhub2 port 1 configuration 1 interface 0
umass0: vendor 0x05e3 USB TO IDE, rev 2.00/0.02, addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, 1 lun per target
...
sd2 at scsibus2 target 0 lun 0: <TOSHIBA, MK2104MAV, 0811> disk fixed
sd2: fabricating a geometry
sd2: 2067 MB, 2067 cyl, 64 head, 32 sec, 512 bytes/sect x 4233600 sectors

a few seconds into bonnie++ I got this:
umass0: at uhub2 port 1 (addr 2) disconnected
ehci_idone: ex=0xc00e5800 is done!
sd2(umass0:0:0:0): generic HBA error

and now bonnie++ just hangs at genput.

The filesystem on the USB disk is ffsv1 without softdeps.

Should I try a kernel without ehci?

I just did that. Now the kernel doesn't find /any/ USB devices except the root hubs. It can't really be a problem with crime interrupts - ehci finds devices and other cards that used interrupt 10 worked before so at least one of the uhcis should work.

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBSE2GH8pnzkX8Yg2nAQILpQf/VYxhucah1YVRB3TROsN2kKyPKi1Eh4n8
s+j52KagRaqgDNJUfweH5dRjF15UIQ4+rYvLGbostruzg2huyCm5qGD8x05D9I+t
gV5XnQMp9fM/RiHN0EbCy6EPfr1TBw3QSIwJxZfFPzFSruE+Anp/f8uyvrHNWHx1
g4OQfzQaKKJouPY35T7zstGwkVAXE1/sH57drWRPCJ7wp1Lugq7XGtcqRByyHv7x
P4fWCqsJepdM4Xe4aUcUfi0ONs5zi+vTKGaDF3Vl1q9Xds7cNS/+lNuEVxrid/6p
+XUf3H/qM+4VgBmyx3dKqdo+Jt8FTOR59dUHVi+/MNYve8HL+EB9+A==
=6EI/
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index