On Sun, Sep 17, 2017 at 3:41 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > Please use Reply-To-All so that your message gets sent to the mailing > and not just to me. > > Also, please don't top-post. > > On Sun, 17 Sep 2017, Kris Lindgren wrote: > >> Sorry, Let me be more specific and answer your questions. >> >> Without any changes, I plugin the drive, it will fail with sector 0 >> errors on any action that attempts to write against it. Such as >> formating the volume, creating a folder, touching a file, ect ect. >> Unloading usb_storage and reloading it with: >> quirks=0bc2:3332:uw causes the drive to function without any issues. >> Trying just quirks=0bc2:3332:u or quirks=0bc2:3332:t (as some other >> people reported for other seagate explansions drives) still cause >> sector 0 errors to show up. > > What happens with quirks=0bc2:3332:w (leave out the u)? > And can you provide the output from lsusb -v for this device? The drive actually mounts and works fine. I was able to write 10GB to it successfully at an average speed of ~133.9MB/s. # lsusb -v Bus 002 Device 011: ID 0bc2:3332 Seagate RSS LLC Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x0bc2 Seagate RSS LLC idProduct 0x3332 bcdDevice 0.12 iManufacturer 1 Seagate iProduct 2 External iSerial 3 2GHP5NM9 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 44 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 24mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 0 bytes bInterval 0 UNRECOGNIZED: 06 30 0f 00 00 00 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 0 bytes bInterval 0 UNRECOGNIZED: 06 30 0f 00 00 00 Device Status: 0x000d Self Powered Test Mode Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 3 bMaxPacketSize0 9 idVendor 0x1d6b Linux Foundation idProduct 0x0003 3.0 root hub bcdDevice 4.02 iManufacturer 3 Linux 4.2.8 xhci-hcd iProduct 2 xHCI Host Controller iSerial 1 0000:00:14.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 31 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 UNRECOGNIZED: 06 30 00 00 02 00 can't get hub descriptor: Broken pipe Device Status: 0x0001 Self Powered Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1005 Apacer Technology, Inc. idProduct 0xb155 bcdDevice 1.00 iManufacturer 1 iProduct 2 USB DISK MODULE iSerial 3 190074BAA75C7223 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 300mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 1 Single TT bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0002 2.0 root hub bcdDevice 4.02 iManufacturer 3 Linux 4.2.8 xhci-hcd iProduct 2 xHCI Host Controller iSerial 1 0000:00:14.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 7 wHubCharacteristic 0x000a No power switching (usb 1.0) Per-port overcurrent protection TT think time 8 FS bits bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0xd8 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Port 5: 0000.0503 highspeed power enable connect Port 6: 0000.0100 power Port 7: 0000.0100 power Device Status: 0x0001 Self Powered > >> Re: running kernel 4.2.8 - This device is specifically a qnap NAS - I >> am not yet familiar enough with their firmware/busybox install to >> attempt custom compiling a different kernel and booting a headless >> system. As such I do not currently have an easy way to rebuild the >> nas onto a newer kernel to test the latest. I asked about unusual_uas >> - because I have seen other Seagate devices that needed to populated >> in there to work correctly. Thus I had assumed that is what needed to >> do here. > > What happens if you plug the disk drive into a regular Linux desktop > computer? Remember, if an unusual_uas.h entry is added, it will affect > those machines too. I will need to get back to you on this. All of my other machines running linux, only have usb2.0 hubs. They are also haven't been used in some time and are running older versions of Ubuntu. > > Alan Stern > >> On Sun, Sep 17, 2017 at 11:39 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: >> > On Sat, 16 Sep 2017, Kris Lindgren wrote: >> > >> >> Hello all, >> >> >> >> I have a Seagate External HDD PN: 9sean2-500 that works fine on USB2.0 >> >> ports (and older kernels) however when connected to usb3.0 port on >> >> newer kernels, the drive fails any write access. >> > >> > This bug report seems to be a little confused. (Or maybe I'm the one >> > who's confused...) >> > >> >> dmesg >> >> [ 7232.155430] usb 1-1: new high-speed USB device number 3 using xhci_hcd >> >> [ 7232.366548] usb-storage 1-1:1.0: USB Mass Storage device detected >> >> [ 7232.372833] scsi host6: usb-storage 1-1:1.0 >> > >> > Why do you want to change unusual_uas.h, given that the device uses the >> > usb_storage driver and not the uas driver? >> > >> >> [ 7232.407777] [usb.001.003] >> >> /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1 added. (MTP mode) >> >> [ 7233.378161] Check proc_name[usb-storage]. >> >> [ 7233.382213] scsi 6:0:0:0: Direct-Access Seagate External >> >> SG12 PQ: 0 ANSI: 4 >> >> [ 7233.391359] Check proc_name[usb-storage]. >> >> [ 7233.395405] Check proc_name[usb-storage]. >> >> [ 7233.399446] Check proc_name[usb-storage]. >> >> [ 7233.403597] Check proc_name[usb-storage]. >> >> [ 7233.407925] sd 6:0:0:0: [sdc] 3907029164 512-byte logical blocks: >> >> (2.00 TB/1.81 TiB) >> >> [ 7233.408284] Check proc_name[usb-storage]. >> >> [ 7233.409122] sd 6:0:0:0: Attached scsi generic sg2 type 0 >> >> [ 7233.425138] Check proc_name[usb-storage]. >> >> [ 7233.429258] sd 6:0:0:0: [sdc] Write Protect is off >> >> [ 7233.434082] sd 6:0:0:0: [sdc] Mode Sense: 1c 00 00 00 >> >> [ 7233.434725] sd 6:0:0:0: [sdc] Write cache: enabled, read cache: >> >> enabled, doesn't support DPO or FUA >> >> [ 7233.509519] sdc: sdc1 >> >> [ 7233.514748] sd 6:0:0:0: [sdc] Attached SCSI disk >> >> [ 7233.519392] Check proc_name[usb-storage]. >> >> [ 7234.604324] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.634329] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.648551] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.666908] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.680716] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.696723] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.709937] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.725250] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.739041] blk_update_request: critical target error, dev sdc, sector 0 >> >> [ 7234.894452] JBD2: recovery failed >> >> >> >> lsusb: >> >> # lsusb >> >> Bus 002 Device 011: ID 0bc2:3332 Seagate RSS LLC >> >> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub >> >> Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc. >> >> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub >> >> >> >> uname: >> >> # uname -a >> >> Linux NAS 4.2.8 #1 SMP Fri Sep 1 01:08:22 CST 2017 x86_64 GNU/Linux >> > >> > Why aren't you using an up-to-date kernel version, such as 4.13? A lot >> > of bugs have been fixed since 4.2 was released. >> > >> >> I did some looking around and based upon a suse article I unloaded the >> >> usb_storage and reloaded it with: >> >> insmod /lib/modules/misc/usb-storage.ko quirks=0bc2:3332:uw >> >> >> >> I also tried: quirks=0bc2:3332:u, quirks=0bc2:3332:t and both of those >> >> still resulted in sector 0 errors. >> > >> > The u flag means not to use the uas driver, which the system wasn't >> > doing anyway. The w flag means to skip testing whether the drive is >> > write-protected, which doesn't seem to be relevant in your case >> > (judging by the log messages). The t flag means to disallow ATA >> > commands, and it used only by the uas driver (not by usb-storage). So >> > it isn't relevant in your case either. >> > >> >> Since then the drive works without any issues: >> > >> > This contradicts what you just said about these quirk flags resulting >> > in sector 0 errors. >> > >> >> dmesg: >> >> 87955.810319] usbcore: deregistering interface driver usb-storage >> >> [87955.817949] Check proc_name[usb-storage]. >> >> [87955.836434] Check proc_name[usb-storage]. >> >> [88077.114724] usb-storage 1-5:1.0: USB Mass Storage device detected >> >> [88077.121004] scsi host7: usb-storage 1-5:1.0 >> >> [88077.125558] usbcore: registered new interface driver usb-storage >> >> [88078.125454] Check proc_name[usb-storage]. >> >> [88078.129499] scsi 7:0:0:0: Direct-Access USB DISK >> >> MODULE PMAP PQ: 0 ANSI: 0 CCS >> >> [88078.139018] Check proc_name[usb-storage]. >> >> [88078.143076] Check proc_name[usb-storage]. >> >> [88078.147121] Check proc_name[usb-storage]. >> >> [88078.151230] Check proc_name[usb-storage]. >> >> [88078.155366] Check proc_name[usb-storage]. >> >> [88078.155800] sd 7:0:0:0: [sdb] 1007616 512-byte logical blocks: (515 >> >> MB/492 MiB) >> >> [88078.159485] sd 7:0:0:0: [sdb] Write Protect is off >> >> [88078.159490] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00 >> >> [88078.166791] sd 7:0:0:0: [sdb] No Caching mode page found >> >> [88078.166794] sd 7:0:0:0: [sdb] Assuming drive cache: write through >> >> [88078.183745] sd 7:0:0:0: Attached scsi generic sg1 type 0 >> >> [88078.184349] sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 > >> >> [88078.196597] Check proc_name[usb-storage]. >> >> [88078.207147] sd 7:0:0:0: [sdb] Attached SCSI removable disk >> >> [88078.215229] Check proc_name[usb-storage]. >> >> [88176.094207] xhci_hcd 0000:00:14.0: Command completion event does >> >> not match command >> >> [88176.101804] xhci_hcd 0000:00:14.0: Timeout while waiting for setup >> >> device command >> >> [88181.326070] xhci_hcd 0000:00:14.0: Timeout while waiting for setup >> >> device command >> >> [88181.534044] usb 2-1: device not accepting address 9, error -62 >> >> [88183.336151] usb 2-1: new SuperSpeed USB device number 11 using xhci_hcd >> >> [88183.357090] usb-storage 2-1:1.0: USB Mass Storage device detected >> >> [88183.363355] usb-storage 2-1:1.0: Quirks match for vid 0bc2 pid 3332: 800200 >> >> [88183.370500] scsi host8: usb-storage 2-1:1.0 >> >> [88183.666134] [usb.002.011] >> >> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-1 added. (MTP mode) >> >> [88184.375643] Check proc_name[usb-storage]. >> >> [88184.379689] scsi 8:0:0:0: Direct-Access Seagate External >> >> SG12 PQ: 0 ANSI: 4 >> >> [88184.387937] Check proc_name[usb-storage]. >> >> [88184.391992] Check proc_name[usb-storage]. >> >> [88184.396033] Check proc_name[usb-storage]. >> >> [88184.400153] Check proc_name[usb-storage]. >> >> [88184.404274] Check proc_name[usb-storage]. >> >> [88184.408454] sd 8:0:0:0: Attached scsi generic sg2 type 0 >> >> [88184.415358] sd 8:0:0:0: [sdc] 3907029164 512-byte logical blocks: >> >> (2.00 TB/1.81 TiB) >> >> [88184.423138] sd 8:0:0:0: [sdc] Assuming Write Enabled >> >> [88184.428183] sd 8:0:0:0: [sdc] Assuming drive cache: write through >> >> [88184.434391] Check proc_name[usb-storage]. >> >> [88184.501083] sdc: sdc1 >> >> [88184.505346] sd 8:0:0:0: [sdc] Attached SCSI disk >> >> [88184.510108] Check proc_name[usb-storage]. >> >> [88185.285582] ufsd: "mount" (sdc1): is mounted as NTFS at 2017-09-16 09:22:29 >> >> [88187.705544] flashcache flashcache_ioctl 21297 >> >> [88187.713636] flashcache flashcache_ioctl 21297 >> >> [88265.766096] flashcache flashcache_ioctl 21297 >> >> [88265.771943] flashcache flashcache_ioctl 21297 >> >> [88270.738679] ufsd: "umount" (sdc1): is unmounted at 2017-09-16 09:23:54 >> >> [88272.804359] flashcache flashcache_ioctl 21297 >> >> [88272.809101] flashcache flashcache_ioctl 21297 >> >> [88280.727432] ext4_init_reserve_inode_table0: sdc1, 0 >> >> [88280.732722] ext4_init_reserve_inode_table2: sdc1, 14905, 14905, 1907839, 4096 >> >> [88280.742043] EXT4-fs (sdc1): mounted filesystem with ordered data >> >> mode. Opts: usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl >> >> [88281.726223] EXT4-fs (device sdc1): ext4lazyinit start (start from >> >> 0, total 14905) >> >> [88282.800045] flashcache flashcache_ioctl 21297 >> >> [88282.804821] flashcache flashcache_ioctl 21297 >> >> [88287.456613] flashcache flashcache_ioctl 21297 >> >> [88287.461512] flashcache flashcache_ioctl 21297 >> >> [88360.898993] EXT4-fs (device sdc1): ext4lazyinit finish >> >> >> >> I am currently sustaining 100+ MB/s writes to the drive with those >> >> quirks flags added without any other changes. >> > >> > Which quirk flags? You listed several possibilities, and none of them >> > seemed appropriate. >> > >> >> I looked at drivers/usb/storage/unusual_uas.h for my kernel (4.2.8) >> >> and the latest master. It does not appear that this device is >> >> specifically called out as having an unusual uas, other very close >> >> Seagate drives do appear in that list. What do you need from me to >> >> get this added? >> > >> > Exactly what do you want to add? >> > >> > Alan Stern >> > >> > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html