Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21824
b: refs/heads/master
c: f637902
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Feb 10, 2006
1 parent 453bb2d commit a0e4079
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 49 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: 35daeb8f9b41fd13180e8a6f8bec9fc5268938f9
refs/heads/master: f63790201521ccadb63673ff121dac46ab300cf0
12 changes: 3 additions & 9 deletions trunk/drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,19 +677,13 @@ static void ahci_eng_timeout(struct ata_port *ap)

spin_lock_irqsave(&host_set->lock, flags);

ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT));
qc = ata_qc_from_tag(ap, ap->active_tag);
if (!qc) {
printk(KERN_ERR "ata%u: BUG: timeout without command\n",
ap->id);
} else {
ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT));
qc->err_mask |= AC_ERR_TIMEOUT;
}
qc->err_mask |= AC_ERR_TIMEOUT;

spin_unlock_irqrestore(&host_set->lock, flags);

if (qc)
ata_eh_qc_complete(qc);
ata_eh_qc_complete(qc);
}

static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
Expand Down
12 changes: 1 addition & 11 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3524,20 +3524,10 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)

void ata_eng_timeout(struct ata_port *ap)
{
struct ata_queued_cmd *qc;

DPRINTK("ENTER\n");

qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc)
ata_qc_timeout(qc);
else {
printk(KERN_ERR "ata%u: BUG: timeout without command\n",
ap->id);
goto out;
}
ata_qc_timeout(ata_qc_from_tag(ap, ap->active_tag));

out:
DPRINTK("EXIT\n");
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ int ata_scsi_error(struct Scsi_Host *host)
spin_lock_irqsave(&ap->host_set->lock, flags);
assert(!(ap->flags & ATA_FLAG_IN_EH));
ap->flags |= ATA_FLAG_IN_EH;
assert(ata_qc_from_tag(ap, ap->active_tag) != NULL);
spin_unlock_irqrestore(&ap->host_set->lock, flags);

ap->ops->eng_timeout(ap);
Expand Down
9 changes: 2 additions & 7 deletions trunk/drivers/scsi/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2027,13 +2027,8 @@ static void mv_eng_timeout(struct ata_port *ap)
mv_err_intr(ap);
mv_stop_and_reset(ap);

if (!qc) {
printk(KERN_ERR "ata%u: BUG: timeout without command\n",
ap->id);
} else {
qc->err_mask |= AC_ERR_TIMEOUT;
ata_eh_qc_complete(qc);
}
qc->err_mask |= AC_ERR_TIMEOUT;
ata_eh_qc_complete(qc);
}

/**
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/scsi/sata_promise.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,6 @@ static void pdc_eng_timeout(struct ata_port *ap)
spin_lock_irqsave(&host_set->lock, flags);

qc = ata_qc_from_tag(ap, ap->active_tag);
if (!qc) {
printk(KERN_ERR "ata%u: BUG: timeout without command\n",
ap->id);
goto out;
}

switch (qc->tf.protocol) {
case ATA_PROT_DMA:
Expand All @@ -456,10 +451,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
break;
}

out:
spin_unlock_irqrestore(&host_set->lock, flags);
if (qc)
ata_eh_qc_complete(qc);
ata_eh_qc_complete(qc);
DPRINTK("EXIT\n");
}

Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,6 @@ static void sil24_eng_timeout(struct ata_port *ap)
struct ata_queued_cmd *qc;

qc = ata_qc_from_tag(ap, ap->active_tag);
if (!qc) {
printk(KERN_ERR "ata%u: BUG: timeout without command\n",
ap->id);
return;
}

printk(KERN_ERR "ata%u: command timeout\n", ap->id);
qc->err_mask |= AC_ERR_TIMEOUT;
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/scsi/sata_sx4.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,6 @@ static void pdc_eng_timeout(struct ata_port *ap)
spin_lock_irqsave(&host_set->lock, flags);

qc = ata_qc_from_tag(ap, ap->active_tag);
if (!qc) {
printk(KERN_ERR "ata%u: BUG: timeout without command\n",
ap->id);
goto out;
}

switch (qc->tf.protocol) {
case ATA_PROT_DMA:
Expand All @@ -890,10 +885,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
break;
}

out:
spin_unlock_irqrestore(&host_set->lock, flags);
if (qc)
ata_eh_qc_complete(qc);
ata_eh_qc_complete(qc);
DPRINTK("EXIT\n");
}

Expand Down

0 comments on commit a0e4079

Please sign in to comment.