Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
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)
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'
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it. subscribe
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe