From: Douglas Gilbert <dgilbert@interlog.com>
To: Tom Yan <tom.ty89@gmail.com>,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: how to "decode" SG_IO: bad/missing sense data?
Date: Tue, 16 Jun 2015 13:24:23 +0200 [thread overview]
Message-ID: <55800767.4080601@interlog.com> (raw)
In-Reply-To: <CAGnHSEkbmVnby-QRs56JRUWCXHYxNZ_jiuE7R4Uard59GOy=Yw@mail.gmail.com>
On 15-06-16 01:05 PM, Tom Yan wrote:
> When I "ATA Secure Erase" a USB Flash Drive, I got:
>
> SG_IO: bad/missing sense data, sb[]: f0 00 01 00 50 40 00 0a 00 00 00
> 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> While the erase seems to work without bricking the device (multiple
> trials with shred and hexdump), this message still bothers me a bit.
> So is there anyway I could "decode" it so that I can know what it
> actually means?
Hi,
Install the sg3_utils package then copy that hex sequence and place
it after the sg_decode_sense command. In this case:
$ sg_decode_sense f0 00 01 00 50 40 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00
Fixed format, current; Sense key: Recovered Error
Additional sense: ATA pass through information available
error=0x0, status=0x50, device=0x40, sector_count(7:0)=0x0
extend=0, log_index=0x0, lba_high,mid,low(7:0)=0x0,0x0,0x0
So that ATA Secure Erase command is sending a SCSI error back
through the SAT mechanism. Check the SAT standard (at www.t10.org)
for details.
Doug Gilbert
next prev parent reply other threads:[~2015-06-16 11:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 11:05 how to "decode" SG_IO: bad/missing sense data? Tom Yan
2015-06-16 11:24 ` Douglas Gilbert [this message]
2015-06-16 15:58 ` Tom Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55800767.4080601@interlog.com \
--to=dgilbert@interlog.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tom.ty89@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.