Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68108
b: refs/heads/master
c: 00bd020
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Oct 12, 2007
1 parent aec8d72 commit 776c00b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 453941455218a81eedcea5dbafa38b8815920a8c
refs/heads/master: 00bd02027fc4a5cf92a3e538896b3642b40515df
25 changes: 17 additions & 8 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2920,14 +2920,9 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd,
args.done = done;

switch(scsicmd[0]) {
/* no-op's, complete with success */
case SYNCHRONIZE_CACHE:
case REZERO_UNIT:
case SEEK_6:
case SEEK_10:
case TEST_UNIT_READY:
case FORMAT_UNIT: /* FIXME: correct? */
ata_scsi_rbuf_fill(&args, ata_scsiop_noop);
/* TODO: worth improving? */
case FORMAT_UNIT:
ata_scsi_invalid_field(cmd, done);
break;

case INQUIRY:
Expand Down Expand Up @@ -2985,6 +2980,20 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd,
done(cmd);
break;

/* if we reach this, then writeback caching is disabled,
* turning this into a no-op.
*/
case SYNCHRONIZE_CACHE:
/* fall through */

/* no-op's, complete with success */
case REZERO_UNIT:
case SEEK_6:
case SEEK_10:
case TEST_UNIT_READY:
ata_scsi_rbuf_fill(&args, ata_scsiop_noop);
break;

case SEND_DIAGNOSTIC:
tmp8 = scsicmd[1] & ~(1 << 3);
if ((tmp8 == 0x4) && (!scsicmd[3]) && (!scsicmd[4]))
Expand Down

0 comments on commit 776c00b

Please sign in to comment.