Package: hdparm
Version: 9.39-1+b1
Severity: important
Tags: upstream

I just bought a Seagate Barracuda 7200.14 HDD, which is one of those newer
Advanced Format drives (512byte logical, 4K physical sectors). The drive is
connected to my Debian box using a cheap USB-to-SATA converter, powered by a
JMicron 2033x bridge chip:

ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337
Hi-Speed USB to SATA & PATA Combo Bridge

This chip does something neat when it detects one of those newer AF drives: it
detects that it uses 4K physical sectors and exposes a mass storage drive with
4K sectors to the host:
[455142.656082] usb 1-5: new high-speed USB device number 9 using ehci_hcd
[455142.789119] usb 1-5: New USB device found, idVendor=152d, idProduct=2338
[455142.789128] usb 1-5: New USB device strings: Mfr=1, Product=2,
SerialNumber=5
[455142.789134] usb 1-5: Product: USB to ATA/ATAPI bridge
[455142.789139] usb 1-5: Manufacturer: JMicron
[455142.789144] usb 1-5: SerialNumber: 000000000000
[455142.790109] scsi6 : usb-storage 1-5:1.0
[455143.789059] scsi 6:0:0:0: Direct-Access     ST2000DM 001-9YN164
PQ: 0 ANSI: 2 CCS
[455143.792440] sd 6:0:0:0: Attached scsi generic sg1 type 0
[455143.792757] sd 6:0:0:0: [sdc] 488378646 4096-byte logical blocks: (2.00
TB/1.81 TiB)
[455143.793491] sd 6:0:0:0: [sdc] Write Protect is off
[455143.793499] sd 6:0:0:0: [sdc] Mode Sense: 28 00 00 00
[455143.794242] sd 6:0:0:0: [sdc] No Caching mode page present
[455143.794248] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[455143.795248] sd 6:0:0:0: [sdc] 488378646 4096-byte logical blocks: (2.00
TB/1.81 TiB)
[455143.797250] sd 6:0:0:0: [sdc] No Caching mode page present
[455143.797258] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[455143.802889]  sdc: unknown partition table
[455143.804873] sd 6:0:0:0: [sdc] 488378646 4096-byte logical blocks: (2.00
TB/1.81 TiB)
[455143.806377] sd 6:0:0:0: [sdc] No Caching mode page present
[455143.806384] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[455143.806390] sd 6:0:0:0: [sdc] Attached SCSI disk

This allows for better performance (and to get around the MBR 2TB limit), and
works nicely under both Linux and Windows. Unfortunately, not all Linux apps
get along with this bridge/drive combination: hdparm so far seems to be the
only case here. I'm trying to use hdparm to disable APM on this drive (long
short story: Seagate drives now come with AGGRESIVE APM settings from factory
which causes frequent head parkings, manufacturer has refused to give a way to
disable it permanently, and the only option is to disable it on each startup),
but it seems that it can't talk properly to this drive. Trying to do hdparm -I
only returns garbage/zeros:
# hdparm --verbose -I /dev/sdb

/dev/sdb:
outgoing cdb:  85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
SG_IO: ATA_16 status=0x2, host_status=0x0, driver_status=0x8
SG_IO: sb[]:  72 00 00 1d 00 00 00 0e 09 0c 00 00 00 00 39 47 00 ee 00 d3 e0 50
00 00 00 00 00 00 00 00 00 00
incoming_data:  00 00 00 00 00 00 00 00 00 00 00 00 fe 01 00 00 a8 fb bf 00 00
ea ff ff 00 e6 bf 00 00 ea ff ff 38 e6 bf 00 00 ea ff ff 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: desc[]:  09 0c 00 00 00 00 39 47 00 ee 00 d3 e0 50
      ATA_16 stat=50 err=00 nsect=00 lbal=47 lbam=ee lbah=d3 dev=e0

ATA device, with non-removable media
        Serial Number:      ������8���
Standards:
        Likely used: 1
Configuration:
        Logical         max     current
        cylinders       0       0
        heads           0       0
        sectors/track   510     0
        --
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:           0 MBytes
        device size with M = 1000*1000:           0 MBytes
        cache/buffer size  = unknown
Capabilities:
        IORDY not likely
        Cannot perform double-word IO
        R/W multiple sector transfer: not supported
        DMA: not supported
        PIO: pio0

....and unfortunately this means that I cannot turn off APM on this drive from
Linux (my workaround is to reboot to Windows and turn it off there using
something like CrystalDiskInfo, workaround that I find unacceptable for obvious
reasons). The problem seems to be upstream, as I've built the very latest
hdparm (9.43, which also seems to be now available from unstable), with the
exact same results: failure to talk to the drive.

hdparm works fine with "classic" non-AF drives using the very same JMicron
bridge (tested with a older Samsung HD103SJ, with a Hitachi Travelstar
5K160-160, and even with a real ancient 8GB Samsung PATA drive using a PATA-to-
SATA bridge board!). Other applications like smartmontools can talk to this
Seagate just fine:
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.14 (AF)
Device Model:     ST2000DM001-9YN164
Serial Number:    Z2Fxxxxx
LU WWN Device Id: 5 000c50 xxxxxxxxx
Firmware Version: CC4H
User Capacity:    2.000.398.934.016 bytes [2,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Wed Mar 27 15:17:41 2013 VET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

I've also tested with hdparm, this Seagate drive and other USB bridge (a
Sunplus part) which doesn't do the 4KB thing (instead it "sees" the 512b
logical sectors), and while the drive can now ID with hdparm, it returns weird
sense errors and wrong checksums.



-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_VE.UTF-8, LC_CTYPE=es_VE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages hdparm depends on:
ii  libc6     2.13-38
ii  lsb-base  4.1+Debian8

Versions of packages hdparm recommends:
ii  powermgmt-base  1.31

Versions of packages hdparm suggests:
pn  apmd  <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to