Bug 95507

Summary: Hitachi USB device – SAT12 works with smartctl but not skdump
Product: libatasmart Reporter: Mantas Mikulėnas <grawity>
Component: libraryAssignee: Lennart Poettering <lennart>
Status: NEW --- QA Contact: Lennart Poettering <lennart>
Severity: normal    
Priority: medium CC: zeuthen
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Mantas Mikulėnas 2016-05-20 17:17:51 UTC
I have a Hitachi Deskstar external (USB) disk, which supports SAT well enough to work with smartmontools but is not recognized by libatasmart. 

It seems the problem is with disk_command(SK_ATA_COMMAND_IDENTIFY_DEVICE, …), which returns all NULs. However, sg_sat_identify from sg3_utils works fine.

{{{
# skdump sat12:/dev/sdb
Device: sat12:/dev/sdb
Type: 12 Byte SCSI ATA SAT Passthru
Size: 1907728 MiB
Awake: Operation not supported
ATA SMART not supported.

# smartctl --device sat,12 --info /dev/sdb
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.6.0-1-ARCH] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi Deskstar 7K3000
Device Model:     Hitachi HDS723020BLA642
Serial Number:    MN3220F334ANDE
LU WWN Device Id: 5 000cca 369ec4001
Firmware Version: MN6OA800
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 2.6, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Fri May 20 20:11:15 2016 EEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

# sg_sat_identify /dev/sdb
Response for IDENTIFY DEVICE ATA command:
 00     045a 3fff c837 0010 0000 0000 003f 0000     .Z ?. .7 .. .. .. .? .. 
 08     0000 0000 2020 2020 2020 4d4e 3332 3230     .. ..          MN 32 20 
 10     4633 3334 414e 4445 0003 0000 0038 4d4e     F3 34 AN DE .. .. .8 MN 
 18     364f 4138 3030 4869 7461 6368 6920 4844     6O A8 00 Hi ta ch i  HD 
 20     5337 3233 3032 3042 4c41 3634 3220 2020     S7 23 02 0B LA 64 2     
 28     2020 2020 2020 2020 2020 2020 2020 8010                          .. 
 30     4000 2f00 4000 0200 0200 0007 3fff 0010     @. /. @. .. .. .. ?. .. 
 38     003f fc10 00fb 0100 ffff 0fff 0000 0407     .? .. .. .. .. .. .. .. 
 40     0003 0078 0078 0078 0078 0000 0000 0000     .. .x .x .x .x .. .. .. 
 48     0000 0000 0000 001f 170e 0004 005e 0040     .. .. .. .. .. .. .^ .@ 
 50     01fc 0029 746b 7d69 4773 7469 bc41 4763     .. .) tk }i Gs ti .A Gc 
 58     007f 00d2 0000 0000 fffe 0000 0000 0008     .. .. .. .. .. .. .. .. 
 60     00ca 00f9 2710 0000 88b0 e8e0 0000 0000     .. .. '. .. .. .. .. .. 
 68     00ca 0000 4000 5a87 5000 cca3 69ec 4001     .. .. @. Z. P. .. i. @. 
 70     0000 0000 0000 0000 0000 0000 0000 409c     .. .. .. .. .. .. .. @. 
 78     409c 0000 0000 0000 0000 0000 0000 0000     @. .. .. .. .. .. .. .. 
 80     0001 000b 0000 0000 2080 0df1 fa20 0001     .. .. .. ..  . .. .  .. 
 88     4000 0404 0033 0000 0000 0306 0406 0205     @. .. .3 .. .. .. .. .. 
 90     0604 0504 0507 0000 0000 0000 0000 0006     .. .. .. .. .. .. .. .. 
 98     364e 4238 0000 0806 0000 5dbd ffff 8000     6N B8 .. .. .. ]. .. .. 
 a0     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 a8     0002 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 b0     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 b8     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 c0     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 c8     0000 0000 0000 0000 0000 0000 003d 0000     .. .. .. .. .. .. .= .. 
 d0     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 d8     0000 1c20 0000 0000 0000 0000 101f 0021     .. .  .. .. .. .. .. .! 
 e0     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 e8     0000 0000 0001 03e0 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 f0     0000 0000 0000 0000 0000 0000 0000 0000     .. .. .. .. .. .. .. .. 
 f8     0000 0000 0000 0000 0000 0000 0000 afa5     .. .. .. .. .. .. .. .. 
}}}

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.