aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-09 01:19:18 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-09 01:19:18 -0400
commit3f066887595de490c411762ce58a31412b09e939 (patch)
treea26e04a120ae71ae72910cbd85c52ceba40a3ffc /drivers
parentf4b5cc874158a139c091b3decd468929e10645e6 (diff)
parent22aac0896b1b0b8cabaf00714c55dd12f25d5738 (diff)
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ata_piix.c4
-rw-r--r--drivers/scsi/libata-scsi.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 298e4643b969..5e8afc876980 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -567,8 +567,8 @@ static int piix_sata_prereset(struct ata_port *ap)
567 present = 1; 567 present = 1;
568 } 568 }
569 569
570 DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n", 570 DPRINTK("ata%u: LEAVE, pcs=0x%x present=0x%x\n",
571 ap->id, pcs, present_mask); 571 ap->id, pcs, present);
572 572
573 if (!present) { 573 if (!present) {
574 ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n"); 574 ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n");
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 37ec02661433..d168e3413661 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2353,6 +2353,19 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
2353 ata_gen_ata_desc_sense(qc); 2353 ata_gen_ata_desc_sense(qc);
2354 } 2354 }
2355 2355
2356 /* SCSI EH automatically locks door if sdev->locked is
2357 * set. Sometimes door lock request continues to
2358 * fail, for example, when no media is present. This
2359 * creates a loop - SCSI EH issues door lock which
2360 * fails and gets invoked again to acquire sense data
2361 * for the failed command.
2362 *
2363 * If door lock fails, always clear sdev->locked to
2364 * avoid this infinite loop.
2365 */
2366 if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL)
2367 qc->dev->sdev->locked = 0;
2368
2356 qc->scsicmd->result = SAM_STAT_CHECK_CONDITION; 2369 qc->scsicmd->result = SAM_STAT_CHECK_CONDITION;
2357 qc->scsidone(cmd); 2370 qc->scsidone(cmd);
2358 ata_qc_free(qc); 2371 ata_qc_free(qc);