diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:38:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:38:06 -0400 |
commit | 8019aa946af5218bc4446c21e43cc19c9401ac68 (patch) | |
tree | 6681b73a560f5a4e4a4e8f97b3833a087a488439 /drivers/ata/pata_atiixp.c | |
parent | 73e3e6481f56b3b5b618671a8d32b19a35f84316 (diff) | |
parent | 48feb3c419508487becfb9ea3afcc54c3eac6d80 (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: (79 commits)
ata-acpi: don't call _GTF for disabled drive
sata_mv add temporary 3 second init delay for SiliconImage PMs
sata_mv remove redundant edma init code
sata_mv add basic port multiplier support
sata_mv fix SOC flags, enable NCQ on SOC
sata_mv disable hotplug for now
sata_mv cosmetics
sata_mv hardreset rework
[libata] improve Kconfig help text for new PMP, SFF options
libata: make EH fail gracefully if no reset method is available
libata: Be a bit more slack about early devices
libata: cable logic
libata: move link onlineness check out of softreset methods
libata: kill dead code paths in reset path
pata_scc: fix build breakage
libata: make PMP support optional
libata: implement PMP helpers
libata: separate PMP support code from core code
libata: make SFF support optional
libata: don't use ap->ioaddr in non-SFF drivers
...
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[] = { |