scsiglue.c (552c69b36ebd966186573b9c7a286b390935cce1) scsiglue.c (f45681f9becaa65111ed0a691ccf080a0cd5feb8)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Driver for USB Mass Storage compliant devices
4 * SCSI layer glue code
5 *
6 * Current development and maintenance by:
7 * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
8 *

--- 362 unchanged lines hidden (view full) ---

371 /* fail the command if we are disconnecting */
372 if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) {
373 usb_stor_dbg(us, "Fail command during disconnect\n");
374 srb->result = DID_NO_CONNECT << 16;
375 done(srb);
376 return 0;
377 }
378
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Driver for USB Mass Storage compliant devices
4 * SCSI layer glue code
5 *
6 * Current development and maintenance by:
7 * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
8 *

--- 362 unchanged lines hidden (view full) ---

371 /* fail the command if we are disconnecting */
372 if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) {
373 usb_stor_dbg(us, "Fail command during disconnect\n");
374 srb->result = DID_NO_CONNECT << 16;
375 done(srb);
376 return 0;
377 }
378
379 if ((us->fflags & US_FL_NO_ATA_1X) &&
380 (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) {
381 memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB,
382 sizeof(usb_stor_sense_invalidCDB));
383 srb->result = SAM_STAT_CHECK_CONDITION;
384 done(srb);
385 return 0;
386 }
387
379 /* enqueue the command and wake up the control thread */
380 srb->scsi_done = done;
381 us->srb = srb;
382 complete(&us->cmnd_ready);
383
384 return 0;
385}
386

--- 284 unchanged lines hidden ---
388 /* enqueue the command and wake up the control thread */
389 srb->scsi_done = done;
390 us->srb = srb;
391 complete(&us->cmnd_ready);
392
393 return 0;
394}
395

--- 284 unchanged lines hidden ---