Resolving "SG_IO: bad/missing sense data" after running ATA SE on a WD My Passport USB HDD

USB storage bridges may expose ATA commands via SCSI/ATA Translation (SAT), but ATA Security behavior varies by bridge and firmware. Without an explicit vendor guarantee, reported capabilities do not confirm end-to-end command support.

After zeroing a 1TB WD My Passport USB HDD via dd, ATA Security support was queried:

hdparm -I /dev/sdX

/dev/sdX:

ATA device, with non-removable media
    Model Number:       WDC WD10JMVW-11AJGS1                    
...
Security: 
    Master password revision code = 48059
        supported
    not enabled
    not locked
    not frozen
    not expired: security count
        supported: enhanced erase
    332min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.
...

Setting a password appeared to succeed:

hdparm --user-master u --security-set-pass p /dev/sdX
security_password: "p"

/dev/sdX:
 Issuing SECURITY_SET_PASS command, password="p", user=user, mode=high

but issuing SECURITY ERASE failed:

hdparm --user-master u --security-erase p /dev/sdX
security_password: "p"

/dev/sdX:
 Issuing SECURITY_ERASE command, password="p", user=user
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

hdparm -I /dev/sdX initially continued to return the expected device information. However, after disconnecting and reconnecting the drive, it reported only:

/dev/sdX:

ATA device, with non-removable media
Standards:
    Likely used: 1
Configuration:
    Logical     max current
    cylinders   0   0
    heads       0   0
    sectors/track   0   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 

Attempting to unlock also failed:

hdparm --user-master u --security-unlock p /dev/sdX
security_password: "p"

/dev/sdX:
 Issuing SECURITY_UNLOCK command, password="p", user=user
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

WD Drive Utilities restored access to the drive:

  1. Launch WD Drive Utilities; the Unlock Drive prompt will appear:

    WD Drive Utilities: Unlock Drive

  2. The password set with hdparm will not be accepted; enter any password five times to reveal an erase option (the Drive Erase icon remains unavailable while the drive is locked):

    WD Drive Utilities: Erase Drive

  3. Set volume name and format, acknowledge the warning, and click Erase Drive. The utility erases and reinitializes the drive, restoring access:

    WD Drive Utilities: Do not close this window while the drive is being erased, as the drive may be damaged.

    WD Drive Utilities: Drive is erased.

Related

❧ 2026-09-12