On Sun, 22 Mar 2015, Marc Joliet wrote:

> Hello
> 
> First off, I would like to clarify that I was redirected here from
> gentoo-user (see my thread at
> http://archives.gentoo.org/gentoo-user/message/5677e2044aba73c5ac046a2a634f801a).
> If this is the wrong list for issues like this, please direct me to the proper
> place.  Also, while I searched the net beforehand, the "best" I could find 
> were
> Ubuntu forum entries ([0] and [1], both sans resolution), so please excuse me
> if this has already been reported.
> 
> Now, the problem I'm facing is that the logical sector size on my external HDD
> is being incorrectly detected on initial connect.  The symptom that follows
> from this is that the none of the partitions can be mounted.  I get the
> following dmesg entries:
> 
>     Mär 22 10:57:54 marcec kernel: scsi 8:0:0:0: Direct-Access     Toshiba  
> External USB 3.0 0201 PQ: 0 ANSI: 6
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: Attached scsi generic sg6 type > 0
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: [sdf] Very big device. Trying 
> to use READ CAPACITY(16).
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: [sdf] 5860533160 512-byte 
> logical blocks: (3.00 TB/2.72 TiB)
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: [sdf] Write Protect is off
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: [sdf] Mode Sense: 2b 00 00 00
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: [sdf] Write cache: disabled, 
> read cache: enabled, doesn't support DPO or FUA
>     Mär 22 10:57:54 marcec kernel: sd 8:0:0:0: [sdf] Very big device. Trying 
> to use READ CAPACITY(16).
>     Mär 22 10:58:10 marcec kernel: usb 4-2: reset SuperSpeed USB device 
> number 2 using xhci_hcd
>     Mär 22 10:58:10 marcec kernel: xhci_hcd 0000:02:00.0: xHCI 
> xhci_drop_endpoint called with disabled ep ffff8800dc974b40
>     Mär 22 10:58:10 marcec kernel: xhci_hcd 0000:02:00.0: xHCI 
> xhci_drop_endpoint called with disabled ep ffff8800dc974b88
>     Mär 22 10:58:10 marcec kernel:  sdf: unknown partition table
>     Mär 22 10:58:10 marcec kernel: sd 8:0:0:0: [sdf] Very big device. Trying 
> to use READ CAPACITY(16).
>     Mär 22 10:58:10 marcec kernel: sd 8:0:0:0: [sdf] Attached SCSI disk
>     Mär 22 10:58:32 marcec kernel: usb 4-2: USB disconnect, device number 2
>     Mär 22 10:58:34 marcec kernel: usb 4-2: new SuperSpeed USB device number 
> 3 using xhci_hcd
>     Mär 22 10:58:34 marcec kernel: usb-storage 4-2:1.0: USB Mass Storage 
> device detected
>     Mär 22 10:58:34 marcec kernel: scsi host9: usb-storage 4-2:1.0
>     Mär 22 10:58:39 marcec kernel: scsi 9:0:0:0: Direct-Access     Toshiba  
> External USB 3.0 0201 PQ: 0 ANSI: 6
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: Attached scsi generic sg6 type > 0
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] Very big device. Trying 
> to use READ CAPACITY(16).
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] 732566645 4096-byte 
> logical blocks: (3.00 TB/2.72 TiB)
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] Write Protect is off
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] Mode Sense: 2b 00 00 00
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] Write cache: disabled, 
> read cache: enabled, doesn't support DPO or FUA
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] 732566645 4096-byte 
> logical blocks: (3.00 TB/2.72 TiB)
>     Mär 22 10:58:39 marcec kernel:  sdf: sdf1 sdf2
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] 732566645 4096-byte 
> logical blocks: (3.00 TB/2.72 TiB)
>     Mär 22 10:58:39 marcec kernel: sd 9:0:0:0: [sdf] Attached SCSI disk
>     Mär 22 10:58:41 marcec kernel: BTRFS: device label MARCEC_BACKUP devid 1 
> transid 65908 /dev/sdf2
>     Mär 22 10:58:42 marcec kernel: EXT4-fs (sdf1): mounted filesystem with 
> ordered data mode. Opts: (null)
>     Mär 22 10:58:42 marcec kernel: BTRFS info (device sdf2): disk space 
> caching is enabled
>     Mär 22 10:58:42 marcec kernel: BTRFS: has skinny extents
> 
>     (I picked these out of the entire dmesg (well, "journalctl -k") output, so
>     I hope nothing important is missing.)
> 
> I have to unplug it and plug it back in, after which it works correctly (as 
> can
> be seen in the log above).  It appears to be important that my PC has been 
> cold
> booted, as that is the only time when I can reliably reproduce this.  The
> precise scenarios I have tested that *work* are:
> 
> - turning off the HDD (i.e., unplugging the AC) while leaving the PC on, then
>   turning it back on several hours later, and
> 
> - rebooting my PC (while the HDD stays on).
> 
> I also tried it on my brother's Windows 8 PC, where the drive was correctly
> detected and the FAT32 test partition was mounted (once Windows installed
> drivers and whatnot; I did *not* install drivers manually).  The above problem
> did not show up after moving it back to my PC immediately afterwards.
> 
> Also, the drive originally had an MBR, but in the meantime I converted it to
> GPT (using cgdisk), since the firmware "translation" mentioned in [0] and [1]
> is supposedly there to keep MBR working, but it did not change anything.
> 
> Finally, I also tried blacklisting the uas module, but again, no change.
> 
> If I'm unlucky, it's a firmware problem, but I hope that it's something that 
> can
> be fixed in the relevant driver.

It does not sound like a driver problem.

Please capture a couple of usbmon traces showing what happens during a 
connect when the wrong sector size is detected and a connect when the 
right sector size is detected.  You can post the traces here (if there 
is a lot of repetitious stuff after the beginning, you can trim it out) 
or post them somewhere for people to see.

Incidentally, contrary to what you wrote, the lsusb output for this 
drive indicates that it does _not_ use UAS -- which would explain why 
blacklisting the uas driver makes no difference.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to