diff mbox

[2/2] libata-scsi: do not response with "invalid field" for FORMAT UNIT

Message ID 577accda.46c0620a.65070.ffffec86@mx.google.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Tom Yan July 4, 2016, 8:53 p.m. UTC
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>

Comments

Sergei Shtylyov July 4, 2016, 9:27 p.m. UTC | #1
On 07/04/2016 11:53 PM, tom.ty89@gmail.com wrote:

> From: Tom Yan <tom.ty89@gmail.com>
>
> It does not make sense and is confusing to response with "Invalid

    Respond here and in the subject.

> 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>

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov July 4, 2016, 9:31 p.m. UTC | #2
On 07/05/2016 12:27 AM, Sergei Shtylyov wrote:

>> From: Tom Yan <tom.ty89@gmail.com>
>>
>> It does not make sense and is confusing to response with "Invalid
>
>    Respond here and in the subject.
>
>> field in cbd" while we have no support at all implemented for

    CDB.

>> FORMAT UNIT. It is decent to let it go to the default, which
>> will response with "Invalid command operation code" instead.
 >>

    Respond again.

>> Signed-off-by: Tom Yan <tom.ty89@gmail.com>

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);