diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 18:29:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 18:29:23 -0500 |
commit | 1309d4e68497184d2fd87e892ddf14076c2bda98 (patch) | |
tree | 5cbd4ee54ccbeb8834d600700a48d4acaa559923 /drivers | |
parent | 101142c37be8e5af9b847860219217e6b958c739 (diff) | |
parent | 5410f729e331bd607d99057ece59f6d7866cd3dc (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
ata: fix sparse warning in pata_acpi.c
ata: fix sparse warning in pata_marvell.c
ata: fix sparse warning in pata_jmicron.c
ata: fix sparse warning in pata_cs5536.c
ata: sparse fixes for pata_amd.c
pata_scc.c: add thaw ops
pata_cs5536.c bugfix
pata_legacy: don't call ata_host_detach() after initialization failure
ata: fix sparse warnings in sata_mv.c
ata: fix sparse warning in sata_via.c
ata: fix sparse warning in sata_promise.c
ata: fix sparse warning in ata_piix.c
ata: fix sparse warning in libata-core.c
ata: make ata_scsiop_inq_89 static in libata-scsi.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/ata_piix.c | 2 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 1 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 2 | ||||
-rw-r--r-- | drivers/ata/pata_acpi.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_amd.c | 7 | ||||
-rw-r--r-- | drivers/ata/pata_cs5536.c | 10 | ||||
-rw-r--r-- | drivers/ata/pata_jmicron.c | 3 | ||||
-rw-r--r-- | drivers/ata/pata_legacy.c | 2 | ||||
-rw-r--r-- | drivers/ata/pata_marvell.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_scc.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_mv.c | 4 | ||||
-rw-r--r-- | drivers/ata/sata_promise.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_via.c | 4 |
13 files changed, 22 insertions, 25 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 9c2515f67de5..752e7d2f3b2f 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -1652,7 +1652,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev, | |||
1652 | u8 tmp; | 1652 | u8 tmp; |
1653 | pci_read_config_byte(pdev, PIIX_SCC, &tmp); | 1653 | pci_read_config_byte(pdev, PIIX_SCC, &tmp); |
1654 | if (tmp == PIIX_AHCI_DEVICE) { | 1654 | if (tmp == PIIX_AHCI_DEVICE) { |
1655 | int rc = piix_disable_ahci(pdev); | 1655 | rc = piix_disable_ahci(pdev); |
1656 | if (rc) | 1656 | if (rc) |
1657 | return rc; | 1657 | return rc; |
1658 | } | 1658 | } |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 004dae4ea5bc..beaa3a9d8b6d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -7086,7 +7086,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) | |||
7086 | DPRINTK("probe begin\n"); | 7086 | DPRINTK("probe begin\n"); |
7087 | for (i = 0; i < host->n_ports; i++) { | 7087 | for (i = 0; i < host->n_ports; i++) { |
7088 | struct ata_port *ap = host->ports[i]; | 7088 | struct ata_port *ap = host->ports[i]; |
7089 | int rc; | ||
7090 | 7089 | ||
7091 | /* probe */ | 7090 | /* probe */ |
7092 | if (ap->ops->error_handler) { | 7091 | if (ap->ops->error_handler) { |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index c02c490122dc..1cea18f62abc 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1862,7 +1862,7 @@ unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf, | |||
1862 | * spin_lock_irqsave(host lock) | 1862 | * spin_lock_irqsave(host lock) |
1863 | */ | 1863 | */ |
1864 | 1864 | ||
1865 | unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf, | 1865 | static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf, |
1866 | unsigned int buflen) | 1866 | unsigned int buflen) |
1867 | { | 1867 | { |
1868 | u8 pbuf[60]; | 1868 | u8 pbuf[60]; |
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index 244098a80ce4..bdc3b9d7395c 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c | |||
@@ -77,8 +77,8 @@ static int pacpi_cable_detect(struct ata_port *ap) | |||
77 | 77 | ||
78 | static void pacpi_error_handler(struct ata_port *ap) | 78 | static void pacpi_error_handler(struct ata_port *ap) |
79 | { | 79 | { |
80 | return ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, | 80 | ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, NULL, |
81 | NULL, ata_std_postreset); | 81 | ata_std_postreset); |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index ea567e2b1703..4b8d9b592ca4 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -146,9 +146,8 @@ static int amd_pre_reset(struct ata_link *link, unsigned long deadline) | |||
146 | 146 | ||
147 | static void amd_error_handler(struct ata_port *ap) | 147 | static void amd_error_handler(struct ata_port *ap) |
148 | { | 148 | { |
149 | return ata_bmdma_drive_eh(ap, amd_pre_reset, | 149 | ata_bmdma_drive_eh(ap, amd_pre_reset, ata_std_softreset, NULL, |
150 | ata_std_softreset, NULL, | 150 | ata_std_postreset); |
151 | ata_std_postreset); | ||
152 | } | 151 | } |
153 | 152 | ||
154 | static int amd_cable_detect(struct ata_port *ap) | 153 | static int amd_cable_detect(struct ata_port *ap) |
@@ -506,7 +505,6 @@ static struct ata_port_operations amd133_port_ops = { | |||
506 | static struct ata_port_operations nv100_port_ops = { | 505 | static struct ata_port_operations nv100_port_ops = { |
507 | .set_piomode = nv100_set_piomode, | 506 | .set_piomode = nv100_set_piomode, |
508 | .set_dmamode = nv100_set_dmamode, | 507 | .set_dmamode = nv100_set_dmamode, |
509 | .mode_filter = ata_pci_default_filter, | ||
510 | .tf_load = ata_tf_load, | 508 | .tf_load = ata_tf_load, |
511 | .tf_read = ata_tf_read, | 509 | .tf_read = ata_tf_read, |
512 | .check_status = ata_check_status, | 510 | .check_status = ata_check_status, |
@@ -541,7 +539,6 @@ static struct ata_port_operations nv100_port_ops = { | |||
541 | static struct ata_port_operations nv133_port_ops = { | 539 | static struct ata_port_operations nv133_port_ops = { |
542 | .set_piomode = nv133_set_piomode, | 540 | .set_piomode = nv133_set_piomode, |
543 | .set_dmamode = nv133_set_dmamode, | 541 | .set_dmamode = nv133_set_dmamode, |
544 | .mode_filter = ata_pci_default_filter, | ||
545 | .tf_load = ata_tf_load, | 542 | .tf_load = ata_tf_load, |
546 | .tf_read = ata_tf_read, | 543 | .tf_read = ata_tf_read, |
547 | .check_status = ata_check_status, | 544 | .check_status = ata_check_status, |
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index d753e568588e..1c4ff9b52b5c 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/msr.h> | 40 | #include <asm/msr.h> |
41 | 41 | ||
42 | #define DRV_NAME "pata_cs5536" | 42 | #define DRV_NAME "pata_cs5536" |
43 | #define DRV_VERSION "0.0.6" | 43 | #define DRV_VERSION "0.0.7" |
44 | 44 | ||
45 | enum { | 45 | enum { |
46 | CFG = 0, | 46 | CFG = 0, |
@@ -85,7 +85,7 @@ static const u8 pci_reg[4] = { | |||
85 | PCI_IDE_CFG, PCI_IDE_DTC, PCI_IDE_CAST, PCI_IDE_ETC, | 85 | PCI_IDE_CFG, PCI_IDE_DTC, PCI_IDE_CAST, PCI_IDE_ETC, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static inline int cs5536_read(struct pci_dev *pdev, int reg, int *val) | 88 | static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) |
89 | { | 89 | { |
90 | if (unlikely(use_msr)) { | 90 | if (unlikely(use_msr)) { |
91 | u32 dummy; | 91 | u32 dummy; |
@@ -153,8 +153,8 @@ static void cs5536_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
153 | struct ata_device *pair = ata_dev_pair(adev); | 153 | struct ata_device *pair = ata_dev_pair(adev); |
154 | int mode = adev->pio_mode - XFER_PIO_0; | 154 | int mode = adev->pio_mode - XFER_PIO_0; |
155 | int cmdmode = mode; | 155 | int cmdmode = mode; |
156 | int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT; | 156 | int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT; |
157 | int cshift = ap->port_no ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; | 157 | int cshift = adev->devno ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; |
158 | u32 dtc, cast, etc; | 158 | u32 dtc, cast, etc; |
159 | 159 | ||
160 | if (pair) | 160 | if (pair) |
@@ -201,7 +201,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
201 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 201 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
202 | u32 dtc, etc; | 202 | u32 dtc, etc; |
203 | int mode = adev->dma_mode; | 203 | int mode = adev->dma_mode; |
204 | int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT; | 204 | int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT; |
205 | 205 | ||
206 | if (mode >= XFER_UDMA_0) { | 206 | if (mode >= XFER_UDMA_0) { |
207 | cs5536_read(pdev, ETC, &etc); | 207 | cs5536_read(pdev, ETC, &etc); |
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index 5b8174d94067..00bbbbd50e97 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
@@ -115,7 +115,8 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline) | |||
115 | 115 | ||
116 | static void jmicron_error_handler(struct ata_port *ap) | 116 | static void jmicron_error_handler(struct ata_port *ap) |
117 | { | 117 | { |
118 | return ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL, ata_std_postreset); | 118 | ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL, |
119 | ata_std_postreset); | ||
119 | } | 120 | } |
120 | 121 | ||
121 | /* No PIO or DMA methods needed for this device */ | 122 | /* No PIO or DMA methods needed for this device */ |
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 6c59969fd50b..d2177f75078a 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -1278,8 +1278,6 @@ static __init int legacy_init_one(struct legacy_probe *probe) | |||
1278 | } | 1278 | } |
1279 | } | 1279 | } |
1280 | fail: | 1280 | fail: |
1281 | if (host) | ||
1282 | ata_host_detach(host); | ||
1283 | platform_device_unregister(pdev); | 1281 | platform_device_unregister(pdev); |
1284 | return ret; | 1282 | return ret; |
1285 | } | 1283 | } |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 9afc8a32b226..a81f25d87235 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -85,8 +85,8 @@ static int marvell_cable_detect(struct ata_port *ap) | |||
85 | 85 | ||
86 | static void marvell_error_handler(struct ata_port *ap) | 86 | static void marvell_error_handler(struct ata_port *ap) |
87 | { | 87 | { |
88 | return ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset, | 88 | ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset, NULL, |
89 | NULL, ata_std_postreset); | 89 | ata_std_postreset); |
90 | } | 90 | } |
91 | 91 | ||
92 | /* No PIO or DMA methods needed for this device */ | 92 | /* No PIO or DMA methods needed for this device */ |
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 55055b27524c..6c016deeaed8 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
@@ -1007,6 +1007,8 @@ static const struct ata_port_operations scc_pata_ops = { | |||
1007 | .qc_issue = ata_qc_issue_prot, | 1007 | .qc_issue = ata_qc_issue_prot, |
1008 | 1008 | ||
1009 | .freeze = scc_bmdma_freeze, | 1009 | .freeze = scc_bmdma_freeze, |
1010 | .thaw = ata_bmdma_thaw, | ||
1011 | |||
1010 | .error_handler = scc_error_handler, | 1012 | .error_handler = scc_error_handler, |
1011 | .post_internal_cmd = scc_bmdma_stop, | 1013 | .post_internal_cmd = scc_bmdma_stop, |
1012 | 1014 | ||
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 04b571764aff..2ecd44db4142 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -1542,7 +1542,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
1542 | eh_freeze_mask = EDMA_EH_FREEZE_5; | 1542 | eh_freeze_mask = EDMA_EH_FREEZE_5; |
1543 | 1543 | ||
1544 | if (edma_err_cause & EDMA_ERR_SELF_DIS_5) { | 1544 | if (edma_err_cause & EDMA_ERR_SELF_DIS_5) { |
1545 | struct mv_port_priv *pp = ap->private_data; | 1545 | pp = ap->private_data; |
1546 | pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; | 1546 | pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; |
1547 | ata_ehi_push_desc(ehi, "EDMA self-disable"); | 1547 | ata_ehi_push_desc(ehi, "EDMA self-disable"); |
1548 | } | 1548 | } |
@@ -1550,7 +1550,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
1550 | eh_freeze_mask = EDMA_EH_FREEZE; | 1550 | eh_freeze_mask = EDMA_EH_FREEZE; |
1551 | 1551 | ||
1552 | if (edma_err_cause & EDMA_ERR_SELF_DIS) { | 1552 | if (edma_err_cause & EDMA_ERR_SELF_DIS) { |
1553 | struct mv_port_priv *pp = ap->private_data; | 1553 | pp = ap->private_data; |
1554 | pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; | 1554 | pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; |
1555 | ata_ehi_push_desc(ehi, "EDMA self-disable"); | 1555 | ata_ehi_push_desc(ehi, "EDMA self-disable"); |
1556 | } | 1556 | } |
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index a07d319f6e8c..f251a5f569d5 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -543,7 +543,7 @@ static void pdc_fill_sg(struct ata_queued_cmd *qc) | |||
543 | idx = 0; | 543 | idx = 0; |
544 | for_each_sg(qc->sg, sg, qc->n_elem, si) { | 544 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
545 | u32 addr, offset; | 545 | u32 addr, offset; |
546 | u32 sg_len, len; | 546 | u32 sg_len; |
547 | 547 | ||
548 | /* determine if physical DMA addr spans 64K boundary. | 548 | /* determine if physical DMA addr spans 64K boundary. |
549 | * Note h/w doesn't support 64-bit, so we unconditionally | 549 | * Note h/w doesn't support 64-bit, so we unconditionally |
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index 30caa0337190..0d03f44824fb 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c | |||
@@ -333,8 +333,8 @@ static int vt6420_prereset(struct ata_link *link, unsigned long deadline) | |||
333 | 333 | ||
334 | static void vt6420_error_handler(struct ata_port *ap) | 334 | static void vt6420_error_handler(struct ata_port *ap) |
335 | { | 335 | { |
336 | return ata_bmdma_drive_eh(ap, vt6420_prereset, ata_std_softreset, | 336 | ata_bmdma_drive_eh(ap, vt6420_prereset, ata_std_softreset, NULL, |
337 | NULL, ata_std_postreset); | 337 | ata_std_postreset); |
338 | } | 338 | } |
339 | 339 | ||
340 | static int vt6421_pata_cable_detect(struct ata_port *ap) | 340 | static int vt6421_pata_cable_detect(struct ata_port *ap) |