This is a discussion on device resets to sata devices - Linux ; kernel 2.6.18.something I'm trying to issue a Bus and Device reset (at different times) to a SATA drive. Unfortunately, I'm getting an EIO when I use SG_SCSI_RESET with a SG_SCSI_RESET_BUS or SG_SCSI_RESET_DEVICE arg in the int* on an sg device, ...
kernel 2.6.18.something
I'm trying to issue a Bus and Device reset (at different times) to a
SATA drive. Unfortunately, I'm getting an EIO when I use
SG_SCSI_RESET with a SG_SCSI_RESET_BUS or SG_SCSI_RESET_DEVICE arg in
the int* on an sg device, and ENOTTY on an sd device.
So, I decided to try using the SAT interface via libata. One the
face
of it, this looks like it should be easy... Device Reset is protocol
field = 9, don't do check condition, no tlength, tdir doesn't matter,
extend doesn't matter, etc.
So I issue:
85/12/00/00/00/00/00/00/00/00/00/00/00/00/00
but get an 05/24/00 error (invalid field in CDB)
So, I try the extend bit...
85/13/00/00/00/00/00/00/00/00/00/00/00/00/00
ditto
Maybe I need to manually set the SRST in the control field too...
85/13/00/00/00/00/00/00/00/00/00/00/00/00/04
05/24/00 bleh
Neither sg_reset nor hdparm could issue the resets either. Does
anyone know how to issue HARD, SOFT, or DEVICE resets to sata
devices?