Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33293
b: refs/heads/master
c: 22aac08
h: refs/heads/master
i:
  33291: ecb4301
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 9, 2006
1 parent bd93f61 commit c710af0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85455dd34219376dcc7dce94bea67058f0b7d731
refs/heads/master: 22aac0896b1b0b8cabaf00714c55dd12f25d5738
13 changes: 13 additions & 0 deletions trunk/drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2353,6 +2353,19 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
ata_gen_ata_desc_sense(qc);
}

/* SCSI EH automatically locks door if sdev->locked is
* set. Sometimes door lock request continues to
* fail, for example, when no media is present. This
* creates a loop - SCSI EH issues door lock which
* fails and gets invoked again to acquire sense data
* for the failed command.
*
* If door lock fails, always clear sdev->locked to
* avoid this infinite loop.
*/
if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL)
qc->dev->sdev->locked = 0;

qc->scsicmd->result = SAM_STAT_CHECK_CONDITION;
qc->scsidone(cmd);
ata_qc_free(qc);
Expand Down

0 comments on commit c710af0

Please sign in to comment.