diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
commit | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch) | |
tree | 1b7705db288ae2917105e624b01fdf81e0882bf1 /drivers/ata/pata_atiixp.c | |
parent | adf6d34e460387ee3e8f1e1875d52bff51212c7d (diff) | |
parent | 15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff) |
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'drivers/ata/pata_atiixp.c')
-rw-r--r-- | drivers/ata/pata_atiixp.c | 57 |
1 files changed, 9 insertions, 48 deletions
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 408bdc1a9776..78738fb4223b 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
@@ -45,12 +45,7 @@ static int atiixp_pre_reset(struct ata_link *link, unsigned long deadline) | |||
45 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) | 45 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) |
46 | return -ENOENT; | 46 | return -ENOENT; |
47 | 47 | ||
48 | return ata_std_prereset(link, deadline); | 48 | return ata_sff_prereset(link, deadline); |
49 | } | ||
50 | |||
51 | static void atiixp_error_handler(struct ata_port *ap) | ||
52 | { | ||
53 | ata_bmdma_drive_eh(ap, atiixp_pre_reset, ata_std_softreset, NULL, ata_std_postreset); | ||
54 | } | 49 | } |
55 | 50 | ||
56 | static int atiixp_cable_detect(struct ata_port *ap) | 51 | static int atiixp_cable_detect(struct ata_port *ap) |
@@ -221,60 +216,26 @@ static void atiixp_bmdma_stop(struct ata_queued_cmd *qc) | |||
221 | } | 216 | } |
222 | 217 | ||
223 | static struct scsi_host_template atiixp_sht = { | 218 | static struct scsi_host_template atiixp_sht = { |
224 | .module = THIS_MODULE, | 219 | ATA_BMDMA_SHT(DRV_NAME), |
225 | .name = DRV_NAME, | ||
226 | .ioctl = ata_scsi_ioctl, | ||
227 | .queuecommand = ata_scsi_queuecmd, | ||
228 | .can_queue = ATA_DEF_QUEUE, | ||
229 | .this_id = ATA_SHT_THIS_ID, | ||
230 | .sg_tablesize = LIBATA_DUMB_MAX_PRD, | 220 | .sg_tablesize = LIBATA_DUMB_MAX_PRD, |
231 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
232 | .emulated = ATA_SHT_EMULATED, | ||
233 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
234 | .proc_name = DRV_NAME, | ||
235 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
236 | .slave_configure = ata_scsi_slave_config, | ||
237 | .slave_destroy = ata_scsi_slave_destroy, | ||
238 | .bios_param = ata_std_bios_param, | ||
239 | }; | 221 | }; |
240 | 222 | ||
241 | static struct ata_port_operations atiixp_port_ops = { | 223 | static struct ata_port_operations atiixp_port_ops = { |
242 | .set_piomode = atiixp_set_piomode, | 224 | .inherits = &ata_bmdma_port_ops, |
243 | .set_dmamode = atiixp_set_dmamode, | ||
244 | .mode_filter = ata_pci_default_filter, | ||
245 | .tf_load = ata_tf_load, | ||
246 | .tf_read = ata_tf_read, | ||
247 | .check_status = ata_check_status, | ||
248 | .exec_command = ata_exec_command, | ||
249 | .dev_select = ata_std_dev_select, | ||
250 | |||
251 | .freeze = ata_bmdma_freeze, | ||
252 | .thaw = ata_bmdma_thaw, | ||
253 | .error_handler = atiixp_error_handler, | ||
254 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
255 | .cable_detect = atiixp_cable_detect, | ||
256 | 225 | ||
257 | .bmdma_setup = ata_bmdma_setup, | 226 | .qc_prep = ata_sff_dumb_qc_prep, |
258 | .bmdma_start = atiixp_bmdma_start, | 227 | .bmdma_start = atiixp_bmdma_start, |
259 | .bmdma_stop = atiixp_bmdma_stop, | 228 | .bmdma_stop = atiixp_bmdma_stop, |
260 | .bmdma_status = ata_bmdma_status, | ||
261 | 229 | ||
262 | .qc_prep = ata_dumb_qc_prep, | 230 | .cable_detect = atiixp_cable_detect, |
263 | .qc_issue = ata_qc_issue_prot, | 231 | .set_piomode = atiixp_set_piomode, |
264 | 232 | .set_dmamode = atiixp_set_dmamode, | |
265 | .data_xfer = ata_data_xfer, | 233 | .prereset = atiixp_pre_reset, |
266 | |||
267 | .irq_handler = ata_interrupt, | ||
268 | .irq_clear = ata_bmdma_irq_clear, | ||
269 | .irq_on = ata_irq_on, | ||
270 | |||
271 | .port_start = ata_sff_port_start, | ||
272 | }; | 234 | }; |
273 | 235 | ||
274 | static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 236 | static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
275 | { | 237 | { |
276 | static const struct ata_port_info info = { | 238 | static const struct ata_port_info info = { |
277 | .sht = &atiixp_sht, | ||
278 | .flags = ATA_FLAG_SLAVE_POSS, | 239 | .flags = ATA_FLAG_SLAVE_POSS, |
279 | .pio_mask = 0x1f, | 240 | .pio_mask = 0x1f, |
280 | .mwdma_mask = 0x06, /* No MWDMA0 support */ | 241 | .mwdma_mask = 0x06, /* No MWDMA0 support */ |
@@ -282,7 +243,7 @@ static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
282 | .port_ops = &atiixp_port_ops | 243 | .port_ops = &atiixp_port_ops |
283 | }; | 244 | }; |
284 | const struct ata_port_info *ppi[] = { &info, NULL }; | 245 | const struct ata_port_info *ppi[] = { &info, NULL }; |
285 | return ata_pci_init_one(dev, ppi); | 246 | return ata_pci_sff_init_one(dev, ppi, &atiixp_sht, NULL); |
286 | } | 247 | } |
287 | 248 | ||
288 | static const struct pci_device_id atiixp[] = { | 249 | static const struct pci_device_id atiixp[] = { |