From: tom.ty89@gmail.com
To: tj@kernel.org, martin.petersen@oracle.com
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
Tom Yan <tom.ty89@gmail.com>
Subject: [PATCH 2/2] libata-scsi: do not response with "invalid field" for FORMAT UNIT
Date: Tue, 5 Jul 2016 04:53:35 +0800 [thread overview]
Message-ID: <577accda.46c0620a.65070.ffffec86@mx.google.com> (raw)
In-Reply-To: <20160704205335.5484-1-me>
From: Tom Yan <tom.ty89@gmail.com>
It does not make sense and is confusing to response with "Invalid
field in cbd" while we have no support at all implemented for
FORMAT UNIT. It is decent to let it go to the default, which
will response with "Invalid command operation code" instead.
Signed-off-by: Tom Yan <tom.ty89@gmail.com>
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 80d732c..f70f9d1 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -4045,11 +4045,6 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)
args.done = cmd->scsi_done;
switch(scsicmd[0]) {
- /* TODO: worth improving? */
- case FORMAT_UNIT:
- ata_scsi_invalid_field(dev, cmd, 0);
- break;
-
case INQUIRY:
if (scsicmd[1] & 2) /* is CmdDt set? */
ata_scsi_invalid_field(dev, cmd, 1);
--
2.9.0
next parent reply other threads:[~2016-07-04 20:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160704205335.5484-1-me>
2016-07-04 20:53 ` tom.ty89 [this message]
2016-07-04 21:27 ` [PATCH 2/2] libata-scsi: do not response with "invalid field" for FORMAT UNIT Sergei Shtylyov
2016-07-04 21:31 ` Sergei Shtylyov
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=577accda.46c0620a.65070.ffffec86@mx.google.com \
--to=tom.ty89@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tj@kernel.org \
/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