From: Gwendal Grignou <gwendal@google.com>
To: zarniwhoop@ntlworld.com
Cc: linux-kernel@vger.kernel.org, jgarzik@redhat.com,
Gwendal Grignou <gwendal@google.com>
Subject: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check
Date: Thu, 28 Mar 2013 22:56:49 -0700 [thread overview]
Message-ID: <1364536609-17398-1-git-send-email-gwendal@google.com> (raw)
In-Reply-To: <CAMHSBOVZ7w51+8B=LyNBdeqP2BEYaNMDX3_WbEzUYqjdn2FZFg@mail.gmail.com>
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key
used for returning task registers, but HDIO_DRIVE_CMD ioctl was
not changed accordingly.
Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0
instead of EIO.
Signed-off-by: Gwendal Grignou <gwendal@google.com>
---
drivers/ata/libata-scsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 318b413..e05bf4c 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
&sshdr);
- if (sshdr.sense_key == 0 &&
- sshdr.asc == 0 && sshdr.ascq == 0)
+ if (sshdr.sense_key == RECOVERED_ERROR &&
+ sshdr.asc == 0 && sshdr.ascq == 0x1D)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}
--
1.8.1.3
next prev parent reply other threads:[~2013-03-29 5:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 1:01 smartd broken in 3.9.0-rc4 Ken Moffat
2013-03-28 20:59 ` smartd broken in 3.9.0-rc4 : bisected Ken Moffat
2013-03-29 0:56 ` Gwendal Grignou
2013-03-29 5:56 ` Gwendal Grignou [this message]
2013-03-29 18:31 ` [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check Ken Moffat
2013-03-29 20:34 ` Ken Moffat
2013-03-29 23:30 ` Ken Moffat
2013-04-03 23:49 ` Jeff Garzik
2013-04-04 18:25 ` Gwendal Grignou
2013-04-08 22:07 ` Ken Moffat
-- strict thread matches above, loose matches on Subject: below --
2013-03-25 17:26 ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression Ronald
2013-03-29 15:26 ` [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check Gwendal Grignou
2013-03-29 16:10 ` Krzysztof Mazur
2013-03-29 17:06 ` Gwendal Grignou
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=1364536609-17398-1-git-send-email-gwendal@google.com \
--to=gwendal@google.com \
--cc=jgarzik@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zarniwhoop@ntlworld.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®