Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

issuing device resets to SATA drives

308 views
Skip to first unread message

BB

unread,
Aug 20, 2008, 11:38:23 AM8/20/08
to
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

Does anyone know how to issue HARD, SOFT, or DEVICE resets to sata
devices?

BB

unread,
Aug 20, 2008, 12:55:50 PM8/20/08
to
On Aug 20, 11:38 am, BB <bb...@extremeprotocol.com> wrote:
> Does anyone know how to issue HARD, SOFT, or DEVICE resets to sata
> devices?

A followup... neither sg_reset worked, nor hdparm, and for similar
reasons. (other hdparm settings did.)

# hdparm -w /dev/sg0
/dev/sg0:
HDIO_DRIVE_RESET failed: Operation not permitted

# hdparm -w /dev/sda
/dev/sda:
HDIO_DRIVE_RESET failed: Inappropriate ioctl for device

brad...@gmail.com

unread,
Oct 18, 2016, 4:29:36 AM10/18/16
to
I have similar issue. Did you happen to find a resolution to issue reset command ?
0 new messages