aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_promise.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-12-06 04:52:48 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-06 04:52:48 -0500
commit701db69d6647f61e4660c9102d7f2fd5dffc203d (patch)
treee3ebe94f72b4bbdfad608d77d7b11719022b8c9b /drivers/scsi/sata_promise.c
parent6cf5bcaaf9a92225017f7a3f1a630f6b5147ad4a (diff)
parentfe79e683ccdb29c13b3e0d18507474b4e2d9aab6 (diff)
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r--drivers/scsi/sata_promise.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index e9ffc27a0493..b4cbc9d6be1b 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -158,7 +158,7 @@ static const struct ata_port_operations pdc_pata_ops = {
158 .host_stop = ata_pci_host_stop, 158 .host_stop = ata_pci_host_stop,
159}; 159};
160 160
161static struct ata_port_info pdc_port_info[] = { 161static const struct ata_port_info pdc_port_info[] = {
162 /* board_2037x */ 162 /* board_2037x */
163 { 163 {
164 .sht = &pdc_ata_sht, 164 .sht = &pdc_ata_sht,
@@ -404,7 +404,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
404 case ATA_PROT_NODATA: 404 case ATA_PROT_NODATA:
405 printk(KERN_ERR "ata%u: command timeout\n", ap->id); 405 printk(KERN_ERR "ata%u: command timeout\n", ap->id);
406 drv_stat = ata_wait_idle(ap); 406 drv_stat = ata_wait_idle(ap);
407 ata_qc_complete(qc, __ac_err_mask(drv_stat)); 407 qc->err_mask |= __ac_err_mask(drv_stat);
408 ata_qc_complete(qc);
408 break; 409 break;
409 410
410 default: 411 default:
@@ -413,7 +414,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
413 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", 414 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n",
414 ap->id, qc->tf.command, drv_stat); 415 ap->id, qc->tf.command, drv_stat);
415 416
416 ata_qc_complete(qc, ac_err_mask(drv_stat)); 417 qc->err_mask |= ac_err_mask(drv_stat);
418 ata_qc_complete(qc);
417 break; 419 break;
418 } 420 }
419 421
@@ -425,21 +427,21 @@ out:
425static inline unsigned int pdc_host_intr( struct ata_port *ap, 427static inline unsigned int pdc_host_intr( struct ata_port *ap,
426 struct ata_queued_cmd *qc) 428 struct ata_queued_cmd *qc)
427{ 429{
428 unsigned int handled = 0, err_mask = 0; 430 unsigned int handled = 0;
429 u32 tmp; 431 u32 tmp;
430 void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; 432 void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL;
431 433
432 tmp = readl(mmio); 434 tmp = readl(mmio);
433 if (tmp & PDC_ERR_MASK) { 435 if (tmp & PDC_ERR_MASK) {
434 err_mask = AC_ERR_DEV; 436 qc->err_mask |= AC_ERR_DEV;
435 pdc_reset_port(ap); 437 pdc_reset_port(ap);
436 } 438 }
437 439
438 switch (qc->tf.protocol) { 440 switch (qc->tf.protocol) {
439 case ATA_PROT_DMA: 441 case ATA_PROT_DMA:
440 case ATA_PROT_NODATA: 442 case ATA_PROT_NODATA:
441 err_mask |= ac_err_mask(ata_wait_idle(ap)); 443 qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
442 ata_qc_complete(qc, err_mask); 444 ata_qc_complete(qc);
443 handled = 1; 445 handled = 1;
444 break; 446 break;
445 447
@@ -706,7 +708,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
706 probe_ent->port[3].scr_addr = base + 0x700; 708 probe_ent->port[3].scr_addr = base + 0x700;
707 break; 709 break;
708 case board_2037x: 710 case board_2037x:
709 probe_ent->n_ports = 2; 711 probe_ent->n_ports = 2;
710 break; 712 break;
711 case board_20619: 713 case board_20619:
712 probe_ent->n_ports = 4; 714 probe_ent->n_ports = 4;
@@ -716,7 +718,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
716 718
717 probe_ent->port[2].scr_addr = base + 0x600; 719 probe_ent->port[2].scr_addr = base + 0x600;
718 probe_ent->port[3].scr_addr = base + 0x700; 720 probe_ent->port[3].scr_addr = base + 0x700;
719 break; 721 break;
720 default: 722 default:
721 BUG(); 723 BUG();
722 break; 724 break;