| View previous topic :: View next topic |
| Author |
Message |
hygnos n00b

Joined: 09 Aug 2004 Posts: 29 Location: DK
|
Posted: Sun May 04, 2008 1:18 pm Post subject: [solved(ish)] usb device not recognized with ehci_hcd loaded |
|
|
Hi,
I have run into an issue with my kernel configuration and usb 2.0 support. After a recent kernel upgrade (I don't remember which ), support for usb 2.0 was lost for my usb disk's. When ehci_hcd is loaded the usb disk is not recognized by the kernel, but if the module is removed the disk is immediately recognized.
My current kernel is
| Code: |
# uname -r
2.6.23-tuxonice-r6
|
Parts of my kernel configuration
| Code: |
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set
# Miscellaneous USB options
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_PERSIST is not set
# CONFIG_USB_OTG is not set
# USB Host Controller Drivers
CONFIG_USB_EHCI_HCD=m
# CONFIG_USB_EHCI_SPLIT_ISO is not set
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# USB Device Class drivers
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=m
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
# may also be needed; see USB_STORAGE Help for more information
CONFIG_USB_STORAGE=m
CONFIG_SCSI=y
CONFIG_CHR_DEV_SG=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_SCSI_PROC_FS=y
|
With the following modules loaded (iptables stuff has been removed)
| Code: |
# lsmod
Module Size Used by
ehci_hcd 29004 0
usb_storage 33984 0
cpufreq_performance 1600 1
snd_pcm_oss 38432 0
snd_mixer_oss 13760 1 snd_pcm_oss
snd_seq_oss 28608 0
snd_seq_midi_event 6016 1 snd_seq_oss
snd_seq 45136 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 6412 2 snd_seq_oss,snd_seq
fuse 41364 0
lp 8900 0
speedstep_centrino 4872 0
freq_table 3588 1 speedstep_centrino
ieee80211_crypt_tkip 9728 0
ieee80211_crypt_ccmp 6080 0
ieee80211_crypt_wep 4032 1
radeon 122720 0
drm 72020 1 radeon
snd_intel8x0 28316 0
snd_ac97_codec 94500 1 snd_intel8x0
ac97_bus 1856 1 snd_ac97_codec
ipw2100 67248 0
video 15504 0
thinkpad_acpi 43416 0
parport_pc 24292 1
snd_pcm 67912 3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
ieee80211 30216 1 ipw2100
e1000 118272 0
parport 32968 2 lp,parport_pc
uhci_hcd 22028 0
intel_agp 21332 1
snd_timer 18948 2 snd_seq,snd_pcm
nvram 6984 1 thinkpad_acpi
ieee80211_crypt 4544 4 ieee80211_crypt_tkip,ieee80211_crypt_ccmp,ieee80211_crypt_wep,ieee80211
output 2752 1 video
snd 43172 9 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
evdev 7616 7
usbcore 116628 4 ehci_hcd,usb_storage,uhci_hcd
snd_page_alloc 7560 2 snd_intel8x0,snd_pcm
|
I see the following response i dmesg
| Code: |
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 32 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 11, io mem 0xc0000000
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
usb 1-4: new high speed USB device using ehci_hcd and address 14
usb 1-4: new high speed USB device using ehci_hcd and address 15
usb 1-4: new high speed USB device using ehci_hcd and address 21
...
...
|
Where it continues to loop different address numbers.
However, with ehci_hcd removed I get the following
| Code: |
usb 3-2: new full speed USB device using uhci_hcd and address 4
usb 3-2: configuration #1 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 6:0:0:0: Direct-Access Ut165 USB2FlashStorage 0.00 PQ: 0 ANSI: 2
sd 6:0:0:0: [sda] 3948544 512-byte hardware sectors (2022 MB)
sd 6:0:0:0: [sda] Write Protect is off
sd 6:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 6:0:0:0: [sda] Assuming drive cache: write through
sd 6:0:0:0: [sda] 3948544 512-byte hardware sectors (2022 MB)
sd 6:0:0:0: [sda] Write Protect is off
sd 6:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 6:0:0:0: [sda] Assuming drive cache: write through
sda: unknown partition table
sd 6:0:0:0: [sda] Attached SCSI removable disk
sd 6:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
|
and I can then mount the device...
I assume the error is somewhere in my kernel configuration (or in the ehci_hcd module??!), but I haven't been able to find the solution. The issue has been reported in other forums as well, but unfortunately no solution
Any ideas would be greatly appreciated.
/hygnos
Last edited by hygnos on Wed May 28, 2008 7:04 am; edited 1 time in total |
|
| Back to top |
|
 |
marrowhk Apprentice

Joined: 25 Jul 2007 Posts: 250
|
Posted: Mon May 05, 2008 1:26 pm Post subject: |
|
|
When you get these issues with specialist kernels try installing gentoo-sources as a second kernel - use the default .config that comes with the sources and work backwards from there.
1. Emerge gentoo-sources.
2. Build the kernel with near defaults
3. add second kernel to grub/lilo
4 reboot
5. test usb
If you use usb a lot then simply build support directly into the kernel, the module approach doesn't really save you much -- in my opinion.
Kere's my USB config from gentoo-sources-2.6.25-r2 (~x86) (Notice the usb stick device support) | Code: |
# USB Input Devices
CONFIG_USB_HID=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# Miscellaneous USB options
CONFIG_USB_DEVICEFS=y
# USB Host Controller Drivers
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
# USB Device Class drivers
CONFIG_USB_STORAGE=y
# USB Imaging devices
CONFIG_USB_MON=y
# USB Miscellaneous drivers
CONFIG_MMC=y
# MMC/SD Card Drivers
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_BOUNCE=y
# MMC/SD Host Controller Drivers
CONFIG_MEMSTICK=y
|
_________________ You'll always come back to GENTOOOOOOO ! (Trust me...) |
|
| Back to top |
|
 |
krinn Advocate


Joined: 02 May 2003 Posts: 3178
|
Posted: Mon May 05, 2008 4:03 pm Post subject: |
|
|
| why not simply set CONFIG_USB_EHCI_HCD=n ? |
|
| Back to top |
|
 |
marrowhk Apprentice

Joined: 25 Jul 2007 Posts: 250
|
Posted: Tue May 06, 2008 10:46 am Post subject: |
|
|
| krinn wrote: | | why not simply set CONFIG_USB_EHCI_HCD=n ? |
Granted, but then he has no USB-2.0 at all for things like USB-Pen devices ... Using gentoo-sources teaches him how to setup his kernel by providing a model to follow. That's the idea anyway If he just wants to fix the problem without understanding the situation then yes, just turn off USB-2.0 support in the existing specialized kernel. _________________ You'll always come back to GENTOOOOOOO ! (Trust me...) |
|
| Back to top |
|
 |
hygnos n00b

Joined: 09 Aug 2004 Posts: 29 Location: DK
|
Posted: Tue May 06, 2008 7:25 pm Post subject: |
|
|
Hi marrowhk,
thx for your reply.
| Quote: |
If you use usb a lot then simply build support directly into the kernel
|
I actually used to have that. I compiled as modules to be able to remove the ehci_hcd module and use my usb disks
| Quote: |
Notice the usb stick device support
|
I assume you mean the memstick module, but doesn't that module give support for Sony memorystick??!!
It's a good idea to backtrace from the gentoo-sources! I will try that when I have some spare time - it seems like a somewhat time-consuming trial-and-error procedure
I made the switch to tuxonice kernels to get suspend2 support for my laptop, but I don't know much about the differences between the two kernels...
/hygnos |
|
| Back to top |
|
 |
marrowhk Apprentice

Joined: 25 Jul 2007 Posts: 250
|
Posted: Wed May 07, 2008 12:25 am Post subject: |
|
|
With gentoo-sources I've never had such a counterintuitive problem as usb-2.0 blocking usb disks
I'm of the opinion that Gentoo is a chance to really get to grips with Linux (even if it does take time).
If people just wanted to point and click they'd install ubuntu/fedora.
Here's my present ~x86 kernel:
| Code: | | # uname -r 2.6.25-gentoo-r2 |
| Code: | # Power management options
# CONFIG_SUSPEND is not set
# CONFIG_HIBERNATION is not set |
Is Suspend to RAM/standby and Hibernation (as above) not sufficient for a laptop?
If they are sufficient i'd run gentoo-sources as an alternative kernel and see if you still have the issue! Good luck. _________________ You'll always come back to GENTOOOOOOO ! (Trust me...) |
|
| Back to top |
|
 |
hygnos n00b

Joined: 09 Aug 2004 Posts: 29 Location: DK
|
Posted: Wed May 28, 2008 7:29 am Post subject: |
|
|
Ok - I didn't really solve this, I rather discovered a rare healing power of XP to what must have been a hardware issue.
First of all, I didn't change my kernel or any configuration on my box. This is what I did:
1) I booted with a livecd to see whether my kernel configuration had flaws - usb2.0 didn't work
2) I booted into XP to see whether the issue persisted, and it did!! I plugged and unplugged two different usb disks dozens of times, but every time the disk was associated with the USB1.1 controller. Although the "Device Manager" stated that the unit was working properly.
3) After maybe an hour or so, the usb disks suddenly started to by associated with the USB 2.0 controller. From this point on the usb disks was recognized by the USB2.0 controller every time they were plugged in.
4) I booted into linux and the usb disks was immediately recognized with ehci_hcd loaded - that is with USB2.0 support! To test it I moved a bunch of GB of files between different usb disks and everything worked like a charm
To summarize, I have no idea of what happened. The 2.0 controller was apparently "revitalized" after having run with XP for a while (I have had this issue for a couple of month now and it was the first time I booted into XP). It will be interesting to see if it is a lasting effect
The important part is, that it must have been a hardware issue, and that the configuration in the first post actually does work.
/hygnos |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|