diff options
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r-- | drivers/scsi/sata_promise.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 2691625f9bce..3d1ea09a06a1 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -114,7 +114,6 @@ static struct scsi_host_template pdc_ata_sht = { | |||
114 | .dma_boundary = ATA_DMA_BOUNDARY, | 114 | .dma_boundary = ATA_DMA_BOUNDARY, |
115 | .slave_configure = ata_scsi_slave_config, | 115 | .slave_configure = ata_scsi_slave_config, |
116 | .bios_param = ata_std_bios_param, | 116 | .bios_param = ata_std_bios_param, |
117 | .ordered_flush = 1, | ||
118 | }; | 117 | }; |
119 | 118 | ||
120 | static const struct ata_port_operations pdc_sata_ops = { | 119 | static const struct ata_port_operations pdc_sata_ops = { |
@@ -161,7 +160,7 @@ static const struct ata_port_operations pdc_pata_ops = { | |||
161 | .host_stop = ata_pci_host_stop, | 160 | .host_stop = ata_pci_host_stop, |
162 | }; | 161 | }; |
163 | 162 | ||
164 | static struct ata_port_info pdc_port_info[] = { | 163 | static const struct ata_port_info pdc_port_info[] = { |
165 | /* board_2037x */ | 164 | /* board_2037x */ |
166 | { | 165 | { |
167 | .sht = &pdc_ata_sht, | 166 | .sht = &pdc_ata_sht, |
@@ -401,7 +400,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
401 | case ATA_PROT_NODATA: | 400 | case ATA_PROT_NODATA: |
402 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); | 401 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); |
403 | drv_stat = ata_wait_idle(ap); | 402 | drv_stat = ata_wait_idle(ap); |
404 | ata_qc_complete(qc, __ac_err_mask(drv_stat)); | 403 | qc->err_mask |= __ac_err_mask(drv_stat); |
404 | ata_qc_complete(qc); | ||
405 | break; | 405 | break; |
406 | 406 | ||
407 | default: | 407 | default: |
@@ -410,7 +410,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", | 410 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", |
411 | ap->id, qc->tf.command, drv_stat); | 411 | ap->id, qc->tf.command, drv_stat); |
412 | 412 | ||
413 | ata_qc_complete(qc, ac_err_mask(drv_stat)); | 413 | qc->err_mask |= ac_err_mask(drv_stat); |
414 | ata_qc_complete(qc); | ||
414 | break; | 415 | break; |
415 | } | 416 | } |
416 | 417 | ||
@@ -422,21 +423,21 @@ out: | |||
422 | static inline unsigned int pdc_host_intr( struct ata_port *ap, | 423 | static inline unsigned int pdc_host_intr( struct ata_port *ap, |
423 | struct ata_queued_cmd *qc) | 424 | struct ata_queued_cmd *qc) |
424 | { | 425 | { |
425 | unsigned int handled = 0, err_mask = 0; | 426 | unsigned int handled = 0; |
426 | u32 tmp; | 427 | u32 tmp; |
427 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; | 428 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; |
428 | 429 | ||
429 | tmp = readl(mmio); | 430 | tmp = readl(mmio); |
430 | if (tmp & PDC_ERR_MASK) { | 431 | if (tmp & PDC_ERR_MASK) { |
431 | err_mask = AC_ERR_DEV; | 432 | qc->err_mask |= AC_ERR_DEV; |
432 | pdc_reset_port(ap); | 433 | pdc_reset_port(ap); |
433 | } | 434 | } |
434 | 435 | ||
435 | switch (qc->tf.protocol) { | 436 | switch (qc->tf.protocol) { |
436 | case ATA_PROT_DMA: | 437 | case ATA_PROT_DMA: |
437 | case ATA_PROT_NODATA: | 438 | case ATA_PROT_NODATA: |
438 | err_mask |= ac_err_mask(ata_wait_idle(ap)); | 439 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |
439 | ata_qc_complete(qc, err_mask); | 440 | ata_qc_complete(qc); |
440 | handled = 1; | 441 | handled = 1; |
441 | break; | 442 | break; |
442 | 443 | ||
@@ -703,7 +704,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; | 704 | probe_ent->port[3].scr_addr = base + 0x700; |
704 | break; | 705 | break; |
705 | case board_2037x: | 706 | case board_2037x: |
706 | probe_ent->n_ports = 2; | 707 | probe_ent->n_ports = 2; |
707 | break; | 708 | break; |
708 | case board_20619: | 709 | case board_20619: |
709 | probe_ent->n_ports = 4; | 710 | probe_ent->n_ports = 4; |
@@ -713,7 +714,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
713 | 714 | ||
714 | probe_ent->port[2].scr_addr = base + 0x600; | 715 | probe_ent->port[2].scr_addr = base + 0x600; |
715 | probe_ent->port[3].scr_addr = base + 0x700; | 716 | probe_ent->port[3].scr_addr = base + 0x700; |
716 | break; | 717 | break; |
717 | default: | 718 | default: |
718 | BUG(); | 719 | BUG(); |
719 | break; | 720 | break; |