diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:32:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:32:33 -0500 |
commit | 1cb9e8e01d2c73184e2074f37cd155b3c4fdaae6 (patch) | |
tree | 3c8d1716cd53ed77a935036090323a1ae9a7963b /drivers/scsi/sata_promise.c | |
parent | d779188d2baf436e67fe8816fca2ef53d246900f (diff) | |
parent | a18ceba7b40e24a9da87249bd74f16ea5abd6894 (diff) |
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r-- | drivers/scsi/sata_promise.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 2691625f9bce..da7fa04b8a73 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -161,7 +161,7 @@ static const struct ata_port_operations pdc_pata_ops = { | |||
161 | .host_stop = ata_pci_host_stop, | 161 | .host_stop = ata_pci_host_stop, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static struct ata_port_info pdc_port_info[] = { | 164 | static const struct ata_port_info pdc_port_info[] = { |
165 | /* board_2037x */ | 165 | /* board_2037x */ |
166 | { | 166 | { |
167 | .sht = &pdc_ata_sht, | 167 | .sht = &pdc_ata_sht, |
@@ -401,7 +401,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
401 | case ATA_PROT_NODATA: | 401 | case ATA_PROT_NODATA: |
402 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); | 402 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); |
403 | drv_stat = ata_wait_idle(ap); | 403 | drv_stat = ata_wait_idle(ap); |
404 | ata_qc_complete(qc, __ac_err_mask(drv_stat)); | 404 | qc->err_mask |= __ac_err_mask(drv_stat); |
405 | ata_qc_complete(qc); | ||
405 | break; | 406 | break; |
406 | 407 | ||
407 | default: | 408 | default: |
@@ -410,7 +411,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
410 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", | 411 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", |
411 | ap->id, qc->tf.command, drv_stat); | 412 | ap->id, qc->tf.command, drv_stat); |
412 | 413 | ||
413 | ata_qc_complete(qc, ac_err_mask(drv_stat)); | 414 | qc->err_mask |= ac_err_mask(drv_stat); |
415 | ata_qc_complete(qc); | ||
414 | break; | 416 | break; |
415 | } | 417 | } |
416 | 418 | ||
@@ -422,21 +424,21 @@ out: | |||
422 | static inline unsigned int pdc_host_intr( struct ata_port *ap, | 424 | static inline unsigned int pdc_host_intr( struct ata_port *ap, |
423 | struct ata_queued_cmd *qc) | 425 | struct ata_queued_cmd *qc) |
424 | { | 426 | { |
425 | unsigned int handled = 0, err_mask = 0; | 427 | unsigned int handled = 0; |
426 | u32 tmp; | 428 | u32 tmp; |
427 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; | 429 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; |
428 | 430 | ||
429 | tmp = readl(mmio); | 431 | tmp = readl(mmio); |
430 | if (tmp & PDC_ERR_MASK) { | 432 | if (tmp & PDC_ERR_MASK) { |
431 | err_mask = AC_ERR_DEV; | 433 | qc->err_mask |= AC_ERR_DEV; |
432 | pdc_reset_port(ap); | 434 | pdc_reset_port(ap); |
433 | } | 435 | } |
434 | 436 | ||
435 | switch (qc->tf.protocol) { | 437 | switch (qc->tf.protocol) { |
436 | case ATA_PROT_DMA: | 438 | case ATA_PROT_DMA: |
437 | case ATA_PROT_NODATA: | 439 | case ATA_PROT_NODATA: |
438 | err_mask |= ac_err_mask(ata_wait_idle(ap)); | 440 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |
439 | ata_qc_complete(qc, err_mask); | 441 | ata_qc_complete(qc); |
440 | handled = 1; | 442 | handled = 1; |
441 | break; | 443 | break; |
442 | 444 | ||
@@ -703,7 +705,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
703 | probe_ent->port[3].scr_addr = base + 0x700; | 705 | probe_ent->port[3].scr_addr = base + 0x700; |
704 | break; | 706 | break; |
705 | case board_2037x: | 707 | case board_2037x: |
706 | probe_ent->n_ports = 2; | 708 | probe_ent->n_ports = 2; |
707 | break; | 709 | break; |
708 | case board_20619: | 710 | case board_20619: |
709 | probe_ent->n_ports = 4; | 711 | 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 | |||
713 | 715 | ||
714 | probe_ent->port[2].scr_addr = base + 0x600; | 716 | probe_ent->port[2].scr_addr = base + 0x600; |
715 | probe_ent->port[3].scr_addr = base + 0x700; | 717 | probe_ent->port[3].scr_addr = base + 0x700; |
716 | break; | 718 | break; |
717 | default: | 719 | default: |
718 | BUG(); | 720 | BUG(); |
719 | break; | 721 | break; |