diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index b39966299e7b..79550908adcc 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -2912,6 +2912,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | |||
2912 | { | 2912 | { |
2913 | struct ata_scsi_args args; | 2913 | struct ata_scsi_args args; |
2914 | const u8 *scsicmd = cmd->cmnd; | 2914 | const u8 *scsicmd = cmd->cmnd; |
2915 | u8 tmp8; | ||
2915 | 2916 | ||
2916 | args.dev = dev; | 2917 | args.dev = dev; |
2917 | args.id = dev->id; | 2918 | args.id = dev->id; |
@@ -2926,7 +2927,6 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | |||
2926 | case SEEK_10: | 2927 | case SEEK_10: |
2927 | case TEST_UNIT_READY: | 2928 | case TEST_UNIT_READY: |
2928 | case FORMAT_UNIT: /* FIXME: correct? */ | 2929 | case FORMAT_UNIT: /* FIXME: correct? */ |
2929 | case SEND_DIAGNOSTIC: /* FIXME: correct? */ | ||
2930 | ata_scsi_rbuf_fill(&args, ata_scsiop_noop); | 2930 | ata_scsi_rbuf_fill(&args, ata_scsiop_noop); |
2931 | break; | 2931 | break; |
2932 | 2932 | ||
@@ -2979,8 +2979,19 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | |||
2979 | ata_scsi_rbuf_fill(&args, ata_scsiop_report_luns); | 2979 | ata_scsi_rbuf_fill(&args, ata_scsiop_report_luns); |
2980 | break; | 2980 | break; |
2981 | 2981 | ||
2982 | /* mandatory commands we haven't implemented yet */ | ||
2983 | case REQUEST_SENSE: | 2982 | case REQUEST_SENSE: |
2983 | ata_scsi_set_sense(cmd, 0, 0, 0); | ||
2984 | cmd->result = (DRIVER_SENSE << 24); | ||
2985 | done(cmd); | ||
2986 | break; | ||
2987 | |||
2988 | case SEND_DIAGNOSTIC: | ||
2989 | tmp8 = scsicmd[1] & ~(1 << 3); | ||
2990 | if ((tmp8 == 0x4) && (!scsicmd[3]) && (!scsicmd[4])) | ||
2991 | ata_scsi_rbuf_fill(&args, ata_scsiop_noop); | ||
2992 | else | ||
2993 | ata_scsi_invalid_field(cmd, done); | ||
2994 | break; | ||
2984 | 2995 | ||
2985 | /* all other commands */ | 2996 | /* all other commands */ |
2986 | default: | 2997 | default: |