diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-12-05 02:38:02 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 04:49:22 -0500 |
commit | a22e2eb0710798009b8e696ae911aef745089dd6 (patch) | |
tree | 93421443499249db0301868e07f24156c456cf7a /drivers/scsi/sata_sx4.c | |
parent | c14b8331ec4843e4f2b67a4d847a0d812a50e43c (diff) |
[PATCH] libata: move err_mask to ata_queued_cmd
- remove err_mask from the parameter list of the complete functions
- move err_mask to ata_queued_cmd
- initialize qc->err_mask when needed
- for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask.
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
===============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/sata_sx4.c')
-rw-r--r-- | drivers/scsi/sata_sx4.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 7c4b53575510..58da854a7c68 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -718,7 +718,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
718 | VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id, | 718 | VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id, |
719 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 719 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
720 | /* get drive status; clear intr; complete txn */ | 720 | /* get drive status; clear intr; complete txn */ |
721 | ata_qc_complete(qc, ac_err_mask(ata_wait_idle(ap))); | 721 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |
722 | ata_qc_complete(qc); | ||
722 | pdc20621_pop_hdma(qc); | 723 | pdc20621_pop_hdma(qc); |
723 | } | 724 | } |
724 | 725 | ||
@@ -756,7 +757,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
756 | VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id, | 757 | VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id, |
757 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 758 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
758 | /* get drive status; clear intr; complete txn */ | 759 | /* get drive status; clear intr; complete txn */ |
759 | ata_qc_complete(qc, ac_err_mask(ata_wait_idle(ap))); | 760 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |
761 | ata_qc_complete(qc); | ||
760 | pdc20621_pop_hdma(qc); | 762 | pdc20621_pop_hdma(qc); |
761 | } | 763 | } |
762 | handled = 1; | 764 | handled = 1; |
@@ -766,7 +768,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
766 | 768 | ||
767 | status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 769 | status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
768 | DPRINTK("BUS_NODATA (drv_stat 0x%X)\n", status); | 770 | DPRINTK("BUS_NODATA (drv_stat 0x%X)\n", status); |
769 | ata_qc_complete(qc, ac_err_mask(status)); | 771 | qc->err_mask |= ac_err_mask(status); |
772 | ata_qc_complete(qc); | ||
770 | handled = 1; | 773 | handled = 1; |
771 | 774 | ||
772 | } else { | 775 | } else { |
@@ -881,7 +884,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
881 | case ATA_PROT_DMA: | 884 | case ATA_PROT_DMA: |
882 | case ATA_PROT_NODATA: | 885 | case ATA_PROT_NODATA: |
883 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); | 886 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); |
884 | ata_qc_complete(qc, __ac_err_mask(ata_wait_idle(ap))); | 887 | qc->err_mask |= __ac_err_mask(ata_wait_idle(ap)); |
888 | ata_qc_complete(qc); | ||
885 | break; | 889 | break; |
886 | 890 | ||
887 | default: | 891 | default: |
@@ -890,7 +894,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
890 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", | 894 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", |
891 | ap->id, qc->tf.command, drv_stat); | 895 | ap->id, qc->tf.command, drv_stat); |
892 | 896 | ||
893 | ata_qc_complete(qc, ac_err_mask(drv_stat)); | 897 | qc->err_mask |= ac_err_mask(drv_stat); |
898 | ata_qc_complete(qc); | ||
894 | break; | 899 | break; |
895 | } | 900 | } |
896 | 901 | ||