I have a performance problem with a USB smartcard reader in Linux. I have 2 x86 and a PPC machines on which I run a performance test application. What I noticed is that on the PPC I have bad performance. The operations take me about the double the time it does on the x86 machines. Iím not sure which chips that are on my two x86 but they are likely not the same. On the PPC on the other hand I know itís a NXP chip.

Info
PPC:
USB chip: NXP
Linux kernel version: 2.6.21

X86:
USB chip: unknown
Linux kernel version: 2.6.8.24, 2.6.23.15-137

I have now tried everything I know about USB and tried to find information on the web but cant get the performance up on the PPC. So now I turned this forum for help.

I mounted the /proc/bus/usb as follows on the PPC:
mount Ėt usbfs usbfs /proc/bus/usb

On the x86 machines I didnít have to mount this since they where already there and not visible in the fstab. Why is that?

This is the output from /proc/bus/usb/devices from one of the x86 machines (Itís the Bus=02 Lev=01 Iím interested in)

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.21-rc3 ohci_hcd
S: Product=OHCI Host Controller
S: SerialNumber=0000:00:07.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=076b ProdID=6622 Rev= 2.03
S: Manufacturer=OMNIKEY AG
S: Product=Smart Card Reader USB
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=0b(scard) Sub=00 Prot=00 Driver=usbfs
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=24ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 2
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.21-rc3 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:07.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=08ec ProdID=1000 Rev= 2.00
S: Manufacturer=M-Systems
S: Product=uDiskOnChip
S: SerialNumber=0F911171316228C8
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=140mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Itís the Bus=02 Lev=01 Iím interested in.
And the output from the PPC machines (Itís the Bus=02 Lev=01 Iím interested in)

: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.21-rc3 ohci_hcd
S: Product=OHCI Host Controller
S: SerialNumber=0000:00:07.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=076b ProdID=6622 Rev= 2.03
S: Manufacturer=OMNIKEY AG
S: Product=Smart Card Reader USB
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=0b(scard) Sub=00 Prot=00 Driver=usbfs
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=24ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 2
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.21-rc3 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:07.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=08ec ProdID=1000 Rev= 2.00
S: Manufacturer=M-Systems
S: Product=uDiskOnChip
S: SerialNumber=0F911171316228C8
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=140mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

One difference is that the host controllers have different MxPS. Is this size fixed? If so is the case is there a way of changing it? I only need to send about 24B of data.
The other x86 machine which also gave good performance has MxPS=64 so this should not be the problem.

Any ideas on how to proceed?

I also add some parts of dmesg

[ 3.079686] usbmon: debugfs is not available
[ 3.084003] bus pci: add driver ehci_hcd
[ 3.084213] pci: Matched Device 0000:00:07.2 with Driver ehci_hcd
[ 3.084231] pci: Probing driver ehci_hcd with device 0000:00:07.2
[ 3.084294] ehci_hcd 0000:00:07.2: EHCI Host Controller
[ 3.089573] CLASS: registering class device: ID = 'usb_host1'
[ 3.089641] class_uevent - name = usb_host1
[ 3.089661] class_device_create_uevent called for usb_host1
[ 3.089887] ehci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
[ 3.097479] PCI: Enabling Mem-Wr-Inval for device 0000:00:07.2
[ 3.120069] ehci_hcd 0000:00:07.2: irq 25, io mem 0xafffef00
[ 3.125753] ehci_hcd 0000:00:07.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[ 3.133322] DEV: registering device: ID = 'usb1'
[ 3.133376] bus usb: add device usb1
[ 3.133594] usb: Matched Device usb1 with Driver usb
[ 3.133610] usb: Probing driver usb with device usb1
[ 3.133682] device class 'usb_endpoint': registering
[ 3.133765] DEV: registering device: ID = 'usbdev1.1_ep00'
[ 3.133995] usb usb1: configuration #1 chosen from 1 choice
[ 3.139629] DEV: registering device: ID = '1-0:1.0'
[ 3.139669] bus usb: add device 1-0:1.0
[ 3.139885] usb: Matched Device 1-0:1.0 with Driver hub
[ 3.139903] usb: Probing driver hub with device 1-0:1.0
[ 3.139927] hub 1-0:1.0: USB hub found
[ 3.143753] hub 1-0:1.0: 2 ports detected
[ 3.248058] bound device '1-0:1.0' to driver 'hub'
[ 3.248075] usb: Bound Device 1-0:1.0 to Driver hub
[ 3.248130] DEV: registering device: ID = 'usbdev1.1_ep81'
[ 3.248402] DEV: registering device: ID = 'usbdev1.1'
[ 3.248665] bound device 'usb1' to driver 'usb'
[ 3.248680] usb: Bound Device usb1 to Driver usb
[ 3.248701] bound device '0000:00:07.2' to driver 'ehci_hcd'
[ 3.248712] pci: Bound Device 0000:00:07.2 to Driver ehci_hcd
[ 3.248780] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
[ 3.248795] bus pci: add driver ohci_hcd
[ 3.249014] pci: Matched Device 0000:00:07.0 with Driver ohci_hcd
[ 3.249033] pci: Probing driver ohci_hcd with device 0000:00:07.0
[ 3.249110] ohci_hcd 0000:00:07.0: OHCI Host Controller
[ 3.254410] CLASS: registering class device: ID = 'usb_host2'
[ 3.254469] class_uevent - name = usb_host2
[ 3.254493] class_device_create_uevent called for usb_host2
[ 3.254696] ohci_hcd 0000:00:07.0: new USB bus registered, assigned bus number 2
[ 3.262201] ohci_hcd 0000:00:07.0: irq 25, io mem 0xaffff000
[ 3.829381] DEV: registering device: ID = 'usb2'
[ 3.829441] bus usb: add device usb2
[ 3.829770] usb: Matched Device usb2 with Driver usb
[ 3.829787] usb: Probing driver usb with device usb2
[ 3.829868] DEV: registering device: ID = 'usbdev2.1_ep00'
[ 3.830115] usb usb2: configuration #1 chosen from 1 choice
[ 3.835745] DEV: registering device: ID = '2-0:1.0'
[ 3.835782] bus usb: add device 2-0:1.0
[ 3.835992] usb: Matched Device 2-0:1.0 with Driver hub
[ 3.836009] usb: Probing driver hub with device 2-0:1.0
[ 3.836032] hub 2-0:1.0: USB hub found
[ 3.839864] hub 2-0:1.0: 2 ports detected
[ 3.972053] usb 1-1: new high speed USB device using ehci_hcd and address 2
[ 4.108986] DEV: registering device: ID = '1-1'
[ 4.109072] bus usb: add device 1-1
[ 4.109286] usb: Matched Device 1-1 with Driver usb
[ 4.109304] usb: Probing driver usb with device 1-1
[ 4.109400] DEV: registering device: ID = 'usbdev1.2_ep00'
[ 4.109646] usb 1-1: configuration #1 chosen from 1 choice
[ 4.115376] DEV: registering device: ID = '1-1:1.0'
[ 4.115425] bus usb: add device 1-1:1.0
[ 4.115685] DEV: registering device: ID = 'usbdev1.2_ep81'
[ 4.115948] DEV: registering device: ID = 'usbdev1.2_ep02'
[ 4.116259] DEV: registering device: ID = 'usbdev1.2'
[ 4.116534] bound device '1-1' to driver 'usb'
[ 4.116550] usb: Bound Device 1-1 to Driver usb
[ 4.356102] bound device '2-0:1.0' to driver 'hub'
[ 4.356120] usb: Bound Device 2-0:1.0 to Driver hub
[ 4.356167] DEV: registering device: ID = 'usbdev2.1_ep81'
[ 4.356455] DEV: registering device: ID = 'usbdev2.1'
[ 4.356723] bound device 'usb2' to driver 'usb'
[ 4.356740] usb: Bound Device usb2 to Driver usb
[ 4.356781] bound device '0000:00:07.0' to driver 'ohci_hcd'
[ 4.356793] pci: Bound Device 0000:00:07.0 to Driver ohci_hcd
[ 4.356848] USB Universal Host Controller Interface driver v3.0
[ 4.362844] bus pci: add driver uhci_hcd
[ 4.363126] Initializing USB Mass Storage driver...
[ 4.368048] bus usb: add driver usb-storage
[ 4.368282] usb: Matched Device 1-1:1.0 with Driver usb-storage
[ 4.368301] usb: Probing driver usb-storage with device 1-1:1.0
[ 4.368562] scsi0 : SCSI emulation for USB Mass Storage devices
[ 4.374538] DEV: registering device: ID = 'host0'
[ 4.374598] CLASS: registering class device: ID = 'host0'
[ 4.374634] class_uevent - name = host0
[ 4.374906] bound device '1-1:1.0' to driver 'usb-storage'
[ 4.374926] usb: Bound Device 1-1:1.0 to Driver usb-storage
[ 4.374947] usb-storage: device found at 2
[ 4.374956] usb-storage: waiting for device to settle before scanning
[ 4.616052] usb 2-2: new full speed USB device using ohci_hcd and address 2
[ 4.800046] DEV: registering device: ID = '2-2'
[ 4.800112] bus usb: add device 2-2
[ 4.800350] usb: Matched Device 2-2 with Driver usb
[ 4.800368] usb: Probing driver usb with device 2-2
[ 4.800445] DEV: registering device: ID = 'usbdev2.2_ep00'
[ 4.800697] usb 2-2: configuration #1 chosen from 1 choice
[ 4.811043] DEV: registering device: ID = '2-2:1.0'
[ 4.811094] bus usb: add device 2-2:1.0
[ 4.811360] DEV: registering device: ID = 'usbdev2.2_ep83'
[ 4.811627] DEV: registering device: ID = 'usbdev2.2_ep84'
[ 4.811894] DEV: registering device: ID = 'usbdev2.2_ep05'
[ 4.812224] DEV: registering device: ID = 'usbdev2.2'

Thank you in advance!