@@ -361,6 +361,7 @@ static int queuecommand_lck(struct scsi_cmnd *srb)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
struct us_data *us = host_to_us(srb->device->host);
+ struct scsi_device *sdev = srb->device;
/* check for state-transition errors */
if (us->srb != NULL) {
@@ -369,6 +370,13 @@ static int queuecommand_lck(struct scsi_cmnd *srb)
return SCSI_MLQUEUE_HOST_BUSY;
}
+ if (srb->cmnd[0] == MODE_SENSE && sdev->use_192_bytes_for_3f == 1 &&
+ srb->cmnd[2] == 0x3f && srb->cmnd[4] != 192) {
+ srb->result = DID_ABORT << 16;
+ done(srb);
+ return 0;
+ }
+
/* fail the command if we are disconnecting */
if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) {
usb_stor_dbg(us, "Fail command during disconnect\n");