X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Fsata_promise.c;h=e2e146a14f971f686b045ad7399680db39378555;hb=a22e2eb0710798009b8e696ae911aef745089dd6;hp=9edc9d91efc3b73c970e710f228caa09d13df3ca;hpb=31e7f1ff3c5d39a70da85f7d81a1ab1f4e64fa97;p=linux-2.6 diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 9edc9d91ef..e2e146a14f 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c @@ -46,7 +46,7 @@ #include "sata_promise.h" #define DRV_NAME "sata_promise" -#define DRV_VERSION "1.02" +#define DRV_VERSION "1.03" enum { @@ -158,7 +158,7 @@ static const struct ata_port_operations pdc_pata_ops = { .host_stop = ata_pci_host_stop, }; -static struct ata_port_info pdc_port_info[] = { +static const struct ata_port_info pdc_port_info[] = { /* board_2037x */ { .sht = &pdc_ata_sht, @@ -193,7 +193,7 @@ static struct ata_port_info pdc_port_info[] = { }, }; -static struct pci_device_id pdc_ata_pci_tbl[] = { +static const struct pci_device_id pdc_ata_pci_tbl[] = { { PCI_VENDOR_ID_PROMISE, 0x3371, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_2037x }, { PCI_VENDOR_ID_PROMISE, 0x3570, PCI_ANY_ID, PCI_ANY_ID, 0, 0, @@ -401,7 +401,8 @@ static void pdc_eng_timeout(struct ata_port *ap) case ATA_PROT_NODATA: printk(KERN_ERR "ata%u: command timeout\n", ap->id); drv_stat = ata_wait_idle(ap); - ata_qc_complete(qc, __ac_err_mask(drv_stat)); + qc->err_mask |= __ac_err_mask(drv_stat); + ata_qc_complete(qc); break; default: @@ -410,7 +411,8 @@ static void pdc_eng_timeout(struct ata_port *ap) printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", ap->id, qc->tf.command, drv_stat); - ata_qc_complete(qc, ac_err_mask(drv_stat)); + qc->err_mask |= ac_err_mask(drv_stat); + ata_qc_complete(qc); break; } @@ -422,21 +424,21 @@ out: static inline unsigned int pdc_host_intr( struct ata_port *ap, struct ata_queued_cmd *qc) { - unsigned int handled = 0, err_mask = 0; + unsigned int handled = 0; u32 tmp; void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; tmp = readl(mmio); if (tmp & PDC_ERR_MASK) { - err_mask = AC_ERR_DEV; + qc->err_mask |= AC_ERR_DEV; pdc_reset_port(ap); } switch (qc->tf.protocol) { case ATA_PROT_DMA: case ATA_PROT_NODATA: - err_mask |= ac_err_mask(ata_wait_idle(ap)); - ata_qc_complete(qc, err_mask); + qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); + ata_qc_complete(qc); handled = 1; break; @@ -703,7 +705,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e probe_ent->port[3].scr_addr = base + 0x700; break; case board_2037x: - probe_ent->n_ports = 2; + probe_ent->n_ports = 2; break; case board_20619: probe_ent->n_ports = 4; @@ -713,7 +715,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e probe_ent->port[2].scr_addr = base + 0x600; probe_ent->port[3].scr_addr = base + 0x700; - break; + break; default: BUG(); break;