diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-30 03:38:51 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-30 03:38:51 -0400 |
commit | 4dd9e909e3b834b66fd48d6eac50c6557cc50275 (patch) | |
tree | 08315c79b1fbd8e3344881c260dce730e5ebea3c /drivers/scsi | |
parent | 76b2bf9b4dee2fb32ef17f5c84a99ce481a14be2 (diff) | |
parent | 1fdab81e675c6ef76a49b8aabb7eaf4be51d1b80 (diff) |
/spare/repo/libata-dev branch 'master'
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/rpa_vscsi.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 50 |
3 files changed, 45 insertions, 8 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index fe09d145542a..2cb3c8340ca8 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -1442,7 +1442,7 @@ static int ibmvscsi_remove(struct vio_dev *vdev) | |||
1442 | */ | 1442 | */ |
1443 | static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { | 1443 | static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { |
1444 | {"vscsi", "IBM,v-scsi"}, | 1444 | {"vscsi", "IBM,v-scsi"}, |
1445 | {0,} | 1445 | { "", "" } |
1446 | }; | 1446 | }; |
1447 | 1447 | ||
1448 | MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); | 1448 | MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); |
diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index 035f615817d7..8bf5652f1060 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <asm/vio.h> | 30 | #include <asm/vio.h> |
31 | #include <asm/prom.h> | ||
31 | #include <asm/iommu.h> | 32 | #include <asm/iommu.h> |
32 | #include <asm/hvcall.h> | 33 | #include <asm/hvcall.h> |
33 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 4d8201422a12..7c4f6ecc1cc9 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -84,7 +84,8 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r | |||
84 | static void pdc_eng_timeout(struct ata_port *ap); | 84 | static void pdc_eng_timeout(struct ata_port *ap); |
85 | static int pdc_port_start(struct ata_port *ap); | 85 | static int pdc_port_start(struct ata_port *ap); |
86 | static void pdc_port_stop(struct ata_port *ap); | 86 | static void pdc_port_stop(struct ata_port *ap); |
87 | static void pdc_phy_reset(struct ata_port *ap); | 87 | static void pdc_pata_phy_reset(struct ata_port *ap); |
88 | static void pdc_sata_phy_reset(struct ata_port *ap); | ||
88 | static void pdc_qc_prep(struct ata_queued_cmd *qc); | 89 | static void pdc_qc_prep(struct ata_queued_cmd *qc); |
89 | static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf); | 90 | static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf); |
90 | static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); | 91 | static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); |
@@ -111,19 +112,22 @@ static Scsi_Host_Template pdc_ata_sht = { | |||
111 | .ordered_flush = 1, | 112 | .ordered_flush = 1, |
112 | }; | 113 | }; |
113 | 114 | ||
114 | static struct ata_port_operations pdc_ata_ops = { | 115 | static struct ata_port_operations pdc_sata_ops = { |
115 | .port_disable = ata_port_disable, | 116 | .port_disable = ata_port_disable, |
116 | .tf_load = pdc_tf_load_mmio, | 117 | .tf_load = pdc_tf_load_mmio, |
117 | .tf_read = ata_tf_read, | 118 | .tf_read = ata_tf_read, |
118 | .check_status = ata_check_status, | 119 | .check_status = ata_check_status, |
119 | .exec_command = pdc_exec_command_mmio, | 120 | .exec_command = pdc_exec_command_mmio, |
120 | .dev_select = ata_std_dev_select, | 121 | .dev_select = ata_std_dev_select, |
121 | .phy_reset = pdc_phy_reset, | 122 | |
123 | .phy_reset = pdc_sata_phy_reset, | ||
124 | |||
122 | .qc_prep = pdc_qc_prep, | 125 | .qc_prep = pdc_qc_prep, |
123 | .qc_issue = pdc_qc_issue_prot, | 126 | .qc_issue = pdc_qc_issue_prot, |
124 | .eng_timeout = pdc_eng_timeout, | 127 | .eng_timeout = pdc_eng_timeout, |
125 | .irq_handler = pdc_interrupt, | 128 | .irq_handler = pdc_interrupt, |
126 | .irq_clear = pdc_irq_clear, | 129 | .irq_clear = pdc_irq_clear, |
130 | |||
127 | .scr_read = pdc_sata_scr_read, | 131 | .scr_read = pdc_sata_scr_read, |
128 | .scr_write = pdc_sata_scr_write, | 132 | .scr_write = pdc_sata_scr_write, |
129 | .port_start = pdc_port_start, | 133 | .port_start = pdc_port_start, |
@@ -131,6 +135,27 @@ static struct ata_port_operations pdc_ata_ops = { | |||
131 | .host_stop = ata_host_stop, | 135 | .host_stop = ata_host_stop, |
132 | }; | 136 | }; |
133 | 137 | ||
138 | static struct ata_port_operations pdc_pata_ops = { | ||
139 | .port_disable = ata_port_disable, | ||
140 | .tf_load = pdc_tf_load_mmio, | ||
141 | .tf_read = ata_tf_read, | ||
142 | .check_status = ata_check_status, | ||
143 | .exec_command = pdc_exec_command_mmio, | ||
144 | .dev_select = ata_std_dev_select, | ||
145 | |||
146 | .phy_reset = pdc_pata_phy_reset, | ||
147 | |||
148 | .qc_prep = pdc_qc_prep, | ||
149 | .qc_issue = pdc_qc_issue_prot, | ||
150 | .eng_timeout = pdc_eng_timeout, | ||
151 | .irq_handler = pdc_interrupt, | ||
152 | .irq_clear = pdc_irq_clear, | ||
153 | |||
154 | .port_start = pdc_port_start, | ||
155 | .port_stop = pdc_port_stop, | ||
156 | .host_stop = ata_host_stop, | ||
157 | }; | ||
158 | |||
134 | static struct ata_port_info pdc_port_info[] = { | 159 | static struct ata_port_info pdc_port_info[] = { |
135 | /* board_2037x */ | 160 | /* board_2037x */ |
136 | { | 161 | { |
@@ -140,7 +165,7 @@ static struct ata_port_info pdc_port_info[] = { | |||
140 | .pio_mask = 0x1f, /* pio0-4 */ | 165 | .pio_mask = 0x1f, /* pio0-4 */ |
141 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 166 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
142 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | 167 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ |
143 | .port_ops = &pdc_ata_ops, | 168 | .port_ops = &pdc_sata_ops, |
144 | }, | 169 | }, |
145 | 170 | ||
146 | /* board_20319 */ | 171 | /* board_20319 */ |
@@ -151,7 +176,7 @@ static struct ata_port_info pdc_port_info[] = { | |||
151 | .pio_mask = 0x1f, /* pio0-4 */ | 176 | .pio_mask = 0x1f, /* pio0-4 */ |
152 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 177 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
153 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | 178 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ |
154 | .port_ops = &pdc_ata_ops, | 179 | .port_ops = &pdc_sata_ops, |
155 | }, | 180 | }, |
156 | 181 | ||
157 | /* board_20619 */ | 182 | /* board_20619 */ |
@@ -162,7 +187,7 @@ static struct ata_port_info pdc_port_info[] = { | |||
162 | .pio_mask = 0x1f, /* pio0-4 */ | 187 | .pio_mask = 0x1f, /* pio0-4 */ |
163 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 188 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
164 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | 189 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ |
165 | .port_ops = &pdc_ata_ops, | 190 | .port_ops = &pdc_pata_ops, |
166 | }, | 191 | }, |
167 | }; | 192 | }; |
168 | 193 | ||
@@ -277,12 +302,23 @@ static void pdc_reset_port(struct ata_port *ap) | |||
277 | readl(mmio); /* flush */ | 302 | readl(mmio); /* flush */ |
278 | } | 303 | } |
279 | 304 | ||
280 | static void pdc_phy_reset(struct ata_port *ap) | 305 | static void pdc_sata_phy_reset(struct ata_port *ap) |
281 | { | 306 | { |
282 | pdc_reset_port(ap); | 307 | pdc_reset_port(ap); |
283 | sata_phy_reset(ap); | 308 | sata_phy_reset(ap); |
284 | } | 309 | } |
285 | 310 | ||
311 | static void pdc_pata_phy_reset(struct ata_port *ap) | ||
312 | { | ||
313 | /* FIXME: add cable detect. Don't assume 40-pin cable */ | ||
314 | ap->cbl = ATA_CBL_PATA40; | ||
315 | ap->udma_mask &= ATA_UDMA_MASK_40C; | ||
316 | |||
317 | pdc_reset_port(ap); | ||
318 | ata_port_probe(ap); | ||
319 | ata_bus_reset(ap); | ||
320 | } | ||
321 | |||
286 | static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) | 322 | static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) |
287 | { | 323 | { |
288 | if (sc_reg > SCR_CONTROL) | 324 | if (sc_reg > SCR_CONTROL) |