Greetings,
 I performing some testing, I noticed that I am not prevented from removing the 
ehci_hcd module even though the system has drives mounted via ehci_hcd. Before 
I start down the path of reporting a BUG, I thought I'd check if this is a 
known issue. A quick Google search didn't show anything obvious.

 This problem was found while executing a "reboot" command with a USB floppy 
drive or a USB hard drive mounted. The hotplug scripts were unloading the ehci_hcd module 
before unmounting the drives. This resulted in I/O errors to the drives. I was surprised 
to find that even though USB drives were mounted using the ehci_hcd module, there were no 
reference counts present to prevent unloading the module while it is in use by the USB 
drives.

 I've reproduced the problem manually using 2.6.17-rc3, by simply removing the 
ehci_hcd module via the command line while a USB 2.0 FLASH drive was mounted.

The console statup information is below, followed by the output of the lsmod 
command, removal of the ehci_hcd module and an attempt to access the drive.

 Thanks for the help,

        Randy Vinson
        MontaVista Software


## Booting image at 00200000 ...
  Image Name:   Linux-2.6.17-rc3-g1f4a9067-dirty
  Image Type:   PowerPC Linux Kernel Image (gzip compressed)
  Data Size:    1088256 Bytes =  1 MB
  Load Address: 00000000
  Entry Point:  00000000
  Verifying Checksum ... OK
  Uncompressing Kernel Image ... OK
Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.17-rc3-g1f4a9067-dirty ([EMAIL PROTECTED]) (gcc version 3.4.3 
(Mon
taVista 3.4.3-25.0.83.0600353 2006-03-22)) #4 Tue May 2 15:44:23 MST 2006
mpc85xx_cds_setup_arch
CDS Version = 11 in PCI slot 1
On node 0 totalpages: 65536
 DMA zone: 65536 pages, LIFO batch:15
Built 1 zonelists
Kernel command line: console=ttyS1,115200 root=/dev/nfs ip=on debug
OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcf78000
PID hash table entries: 2048 (order: 11, 8192 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 257408k available (1764k kernel code, 476k data, 112k init, 0k highmem)
Calibrating delay loop... 526.33 BogoMIPS (lpj=1052672)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
Registering openpic with sysfs...
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 8192 bind 4096)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 106) is a 16550A
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 106) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:e0:0c:00:02:fe
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0b
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:01:02.1
VP_IDE: chipset revision 6
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci0000:01:02.1
VP_IDE: 100% native mode on irq 14
   ide0: BM-DMA at 0x1fd0-0x1fd7, BIOS settings: hda:pio, hdb:pio
   ide1: BM-DMA at 0x1fd8-0x1fdf, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
Probing IDE interface ide1...
Probing IDE interface ide0...
Probing IDE interface ide1...
i2c /dev entries driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Sending DHCP requests .<6>PHY: 0:00 - Link is Up - 100/Half
., OK
IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.48
IP-Config: Complete:
     device=eth0, addr=192.168.1.48, mask=255.255.255.0, gw=255.255.255.255,
    host=192.168.1.48, domain=, nis-domain=(none),
    bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=/opt/patagonia0603
22_0600358/montavista/pro/devkit/ppc/85xx/target
Looking up port of RPC 100003/2 on 192.168.1.1
Looking up port of RPC 100005/1 on 192.168.1.1
VFS: Mounted root (nfs filesystem) readonly.
Freeing unused kernel memory: 112k init
INIT: version 2.85 booting
Mounting a tmpfs over /dev...done.
Creating initial device nodes...done.
Activating swap...done.
Remounting root filesystem...done.
Calculating module dependencies
Loading modules:
Checking all file systems: fsck
fsck 1.35 (28-Feb-2004)
Mounting local filesystems: mount nothing was mounted
Cleaning: /tmp /var/lock /var/run done.
Cleaning: /etc/network/ifstate.
Setting up IP spoofing protection: rp_filter.
Disable TCP/IP Explicit Congestion Notification: done.
Starting network interfaces: done.
Starting hotplug subsystem:
  pci
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ehci_hcd 0000:00:15.2: EHCI Host Controller
ehci_hcd 0000:00:15.2: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:15.2: irq 129, io mem 0x9fdfdf00
ehci_hcd 0000:00:15.2: USB 2.0 started, EHCI 0.95, 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: 5 ports detected
    ehci-hcd: loaded successfully
usb 1-3: new high speed USB device using ehci_hcd and address 2
usb 1-3: configuration #1 chosen from 1 choice
  pci      [success]
  usb
  usb      [success]
  isapnp
  isapnp   [success]
  ide
  ide      [success]
  input
  input    [success]
  scsi
  scsi     [success]
done.
Starting portmap daemon: portmap.
done.
Setting pseudo-terminal access permissions...done.
Updating /etc/motd...done.
INIT: Entering runlevel: 3
Starting system log daemon: syslogd klogd.
Starting NFS common utilities: statd lockdlockdsvc: Function not implemented
failed (1: ).
Starting internet superserver: inetd.
Starting MontaVista target tools daemon: mvltdmvltd version 2.1 MontaVista Softw
are,Inc.
mvltd[1100]: can't send broadcast message: Network is unreachable
.
MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600358)

192.168.1.48 login: SCSI subsystem initialized
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
 Vendor:           Model: USB Flash Memory  Rev: 1.04
 Type:   Direct-Access                      ANSI SCSI revision: 00
usb-storage: device scan complete
SCSI device sda: 499712 512-byte hdwr sectors (256 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 499712 512-byte hdwr sectors (256 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda

MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600358)

192.168.1.48 login: root
Last login: Tue May  2 19:16:56 2006 on console
Linux 192.168.1.48 2.6.17-rc3-g1f4a9067-dirty #4 Tue May 2 15:44:23 MST 2006 ppc
GNU/Linux

Welcome to MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600358).

[EMAIL PROTECTED]:~# lsmod
Module                  Size  Used by
sd_mod                 12976  0
usb_storage            28260  0
scsi_mod               75856  2 sd_mod,usb_storage
ehci_hcd               25320  0
usbcore                92100  2 usb_storage,ehci_hcd


[EMAIL PROTECTED]:~# mount /dev/sda1 /mnt/


[EMAIL PROTECTED]:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type nfs (rw,vers=2,rsize=4096,wsize=4096,hard,nolock,proto=udp,t
imeo=11,retrans=2,addr=192.168.1.1)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/root on /dev/.static/dev type nfs (rw,vers=2,rsize=4096,wsize=4096,hard,nol
ock,proto=udp,timeo=11,retrans=2,addr=192.168.1.1)
none on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/scsi/host0/bus0/target0/lun0/part1 on /mnt type msdos (rw,fmask=0033,dmask=
0033,codepage=cp437)


[EMAIL PROTECTED]:~# rmmod ehci_hcd
ehci_hcd 0000:00:15.2: remove, state 1
usb usb1: USB disconnect, address 1
usb 1-3: USB disconnect, address 2
ehci_hcd 0000:00:15.2: USB bus 1 deregistered
[EMAIL PROTECTED]:~# lsmod
Module                  Size  Used by
sd_mod                 12976  2
usb_storage            28260  1
scsi_mod               75856  2 sd_mod,usb_storage
usbcore                92100  1 usb_storage


[EMAIL PROTECTED]:~# ls /mnt/
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 489) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 490) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 491) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 492) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 493) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 494) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 495) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 496) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 497) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 498) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 499) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 500) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 501) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 502) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 503) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 504) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 505) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 506) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 507) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 508) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 509) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 510) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 511) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 512) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 513) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 514) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 515) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 516) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 517) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 518) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 519) failed
0:0:0:0: rejecting I/O to dead device
FAT: Directory bread(block 520) failed


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to