Comment 4 for bug 881350

Revision history for this message
Chris (fabricator4) wrote :

I'm finding the same problem with 12.04 LTS (32 bit). When I select "safely remove" for a USB pen drive it causes an unmount followed immediately by a remount. When I click "safely remove" again for the same device the usb drive is then unmounted and powered down.

Exactly the same thing happens for a Seagate 1.5TB external hard drive. The "safely remove" option must
 be clicked twice for the device to be unmounted and powered down because the first one just causes the device to be remounted.

Unmounting the device first does not help - the first "safely remove" causes it to be remounted again. In addition to this, the remount appears to mount the device as a USB 1.1 device. From kern.log:

# device is inserted:
Jun 24 06:57:41 chris-office kernel: [125419.896026] usb 1-6: new high-speed USB device number 13 using ehci_hcd
Jun 24 06:57:41 chris-office kernel: [125420.032070] scsi25 : usb-storage 1-6:1.0
Jun 24 06:57:42 chris-office kernel: [125421.032693] scsi 25:0:0:0: Direct-Access DOLPHIN USB 3.0 8GB 1.00 PQ: 0 ANSI: 5
Jun 24 06:57:42 chris-office kernel: [125421.033649] sd 25:0:0:0: Attached scsi generic sg1 type 0
Jun 24 06:57:42 chris-office kernel: [125421.036540] sd 25:0:0:0: [sdb] 15605760 512-byte logical blocks: (7.99 GB/7.44 GiB)
Jun 24 06:57:42 chris-office kernel: [125421.036921] sd 25:0:0:0: [sdb] Write Protect is off
Jun 24 06:57:42 chris-office kernel: [125421.036927] sd 25:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jun 24 06:57:42 chris-office kernel: [125421.037283] sd 25:0:0:0: [sdb] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
Jun 24 06:57:42 chris-office kernel: [125421.041965] sdb: sdb1
Jun 24 06:57:42 chris-office kernel: [125421.044233] sd 25:0:0:0: [sdb] Attached SCSI removable disk

# device is "safely removed" which causes a remount as a USB 1.1 low speed device:
Jun 24 06:59:33 chris-office kernel: [125531.532348] usb 1-6: USB disconnect, device number 13
Jun 24 06:59:33 chris-office kernel: [125531.904028] usb 2-6: new full-speed USB device number 12 using ohci_hcd
Jun 24 06:59:33 chris-office kernel: [125532.110052] usb 2-6: not running at top speed; connect to a high speed hub
Jun 24 06:59:33 chris-office kernel: [125532.131343] scsi26 : usb-storage 2-6:1.0
Jun 24 06:59:34 chris-office kernel: [125533.137094] scsi 26:0:0:0: Direct-Access DOLPHIN USB 3.0 8GB 1.00 PQ: 0 ANSI: 5
Jun 24 06:59:34 chris-office kernel: [125533.138043] sd 26:0:0:0: Attached scsi generic sg1 type 0
Jun 24 06:59:34 chris-office kernel: [125533.148105] sd 26:0:0:0: [sdb] 15605760 512-byte logical blocks: (7.99 GB/7.44 GiB)
Jun 24 06:59:34 chris-office kernel: [125533.155071] sd 26:0:0:0: [sdb] Write Protect is off
Jun 24 06:59:34 chris-office kernel: [125533.155074] sd 26:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jun 24 06:59:34 chris-office kernel: [125533.162105] sd 26:0:0:0: [sdb] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
Jun 24 06:59:34 chris-office kernel: [125533.212131] sdb: sdb1
Jun 24 06:59:34 chris-office kernel: [125533.249093] sd 26:0:0:0: [sdb] Attached SCSI removable disk

# device is "safely removed" for the second time which has the expected result:
Jun 24 07:00:25 chris-office kernel: [125583.620334] usb 2-6: USB disconnect, device number 12

It will be noted that the first time the device is mounted it states "using ehci_hcd" but the second time it is auto mounted (after the safe removal) it states "using ohci_hcd"

References to ehci_hcd and ohci_hcd seem to point to structure type definitions in the source code for the usb modules and header files. Since I'm not a programmer I'm unable to investigate this further but it seems to me that when the device is safely removed the module(s) are falling back to the slow speed USB 1.1 mode instead of powering off the device.

Chris