Skip to contentSkip to conversation

libata-scsi: do not respond with "invalid field" for FORMAT UNIT

PATCH RESEND Applied [email protected] 2 participants 2 messages Jul 6, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/2 libata-scsi: do not respond with "invalid field" for FORMAT UNIT

From: Tom Yan <[email protected]>

It does not make sense and is confusing to respond with "Invalid field in CDB" while we have no support at all implemented for FORMAT UNIT. It is decent to let it go to the default, which will respond with "Invalid command operation code" instead.

drivers/ata/libata-scsi.c +0 -5
index bfec66f..f1125fd 100644
@@ -4039,11 +4039,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);
Signature · 1 line
2.9.0
Applied
#1 lore raw
Quoted 8 lines · On Thu, Jul 07, 2016 at 01:13:08AM +0800, [email protected] wrote:

From: Tom Yan <[email protected]>

It does not make sense and is confusing to respond with "Invalid field in CDB" while we have no support at all implemented for FORMAT UNIT. It is decent to let it go to the default, which will respond with "Invalid command operation code" instead.

Applied to libata/for-4.8.

Thanks.

Signature · 1 line
tejun