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_efar.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_efar.c')
-rw-r--r-- | drivers/ata/pata_efar.c | 66 |
1 files changed, 7 insertions, 59 deletions
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index dc33220fe5b2..9fba82976ba6 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
@@ -45,20 +45,7 @@ static int efar_pre_reset(struct ata_link *link, unsigned long deadline) | |||
45 | if (!pci_test_config_bits(pdev, &efar_enable_bits[ap->port_no])) | 45 | if (!pci_test_config_bits(pdev, &efar_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 | /** | ||
52 | * efar_probe_reset - Probe specified port on PATA host controller | ||
53 | * @ap: Port to probe | ||
54 | * | ||
55 | * LOCKING: | ||
56 | * None (inherited from caller). | ||
57 | */ | ||
58 | |||
59 | static void efar_error_handler(struct ata_port *ap) | ||
60 | { | ||
61 | ata_bmdma_drive_eh(ap, efar_pre_reset, ata_std_softreset, NULL, ata_std_postreset); | ||
62 | } | 49 | } |
63 | 50 | ||
64 | /** | 51 | /** |
@@ -233,53 +220,15 @@ static void efar_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
233 | } | 220 | } |
234 | 221 | ||
235 | static struct scsi_host_template efar_sht = { | 222 | static struct scsi_host_template efar_sht = { |
236 | .module = THIS_MODULE, | 223 | ATA_BMDMA_SHT(DRV_NAME), |
237 | .name = DRV_NAME, | ||
238 | .ioctl = ata_scsi_ioctl, | ||
239 | .queuecommand = ata_scsi_queuecmd, | ||
240 | .can_queue = ATA_DEF_QUEUE, | ||
241 | .this_id = ATA_SHT_THIS_ID, | ||
242 | .sg_tablesize = LIBATA_MAX_PRD, | ||
243 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
244 | .emulated = ATA_SHT_EMULATED, | ||
245 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
246 | .proc_name = DRV_NAME, | ||
247 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
248 | .slave_configure = ata_scsi_slave_config, | ||
249 | .slave_destroy = ata_scsi_slave_destroy, | ||
250 | .bios_param = ata_std_bios_param, | ||
251 | }; | 224 | }; |
252 | 225 | ||
253 | static const struct ata_port_operations efar_ops = { | 226 | static struct ata_port_operations efar_ops = { |
227 | .inherits = &ata_bmdma_port_ops, | ||
228 | .cable_detect = efar_cable_detect, | ||
254 | .set_piomode = efar_set_piomode, | 229 | .set_piomode = efar_set_piomode, |
255 | .set_dmamode = efar_set_dmamode, | 230 | .set_dmamode = efar_set_dmamode, |
256 | .mode_filter = ata_pci_default_filter, | 231 | .prereset = efar_pre_reset, |
257 | |||
258 | .tf_load = ata_tf_load, | ||
259 | .tf_read = ata_tf_read, | ||
260 | .check_status = ata_check_status, | ||
261 | .exec_command = ata_exec_command, | ||
262 | .dev_select = ata_std_dev_select, | ||
263 | |||
264 | .freeze = ata_bmdma_freeze, | ||
265 | .thaw = ata_bmdma_thaw, | ||
266 | .error_handler = efar_error_handler, | ||
267 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
268 | .cable_detect = efar_cable_detect, | ||
269 | |||
270 | .bmdma_setup = ata_bmdma_setup, | ||
271 | .bmdma_start = ata_bmdma_start, | ||
272 | .bmdma_stop = ata_bmdma_stop, | ||
273 | .bmdma_status = ata_bmdma_status, | ||
274 | .qc_prep = ata_qc_prep, | ||
275 | .qc_issue = ata_qc_issue_prot, | ||
276 | .data_xfer = ata_data_xfer, | ||
277 | |||
278 | .irq_handler = ata_interrupt, | ||
279 | .irq_clear = ata_bmdma_irq_clear, | ||
280 | .irq_on = ata_irq_on, | ||
281 | |||
282 | .port_start = ata_sff_port_start, | ||
283 | }; | 232 | }; |
284 | 233 | ||
285 | 234 | ||
@@ -301,7 +250,6 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
301 | { | 250 | { |
302 | static int printed_version; | 251 | static int printed_version; |
303 | static const struct ata_port_info info = { | 252 | static const struct ata_port_info info = { |
304 | .sht = &efar_sht, | ||
305 | .flags = ATA_FLAG_SLAVE_POSS, | 253 | .flags = ATA_FLAG_SLAVE_POSS, |
306 | .pio_mask = 0x1f, /* pio0-4 */ | 254 | .pio_mask = 0x1f, /* pio0-4 */ |
307 | .mwdma_mask = 0x07, /* mwdma1-2 */ | 255 | .mwdma_mask = 0x07, /* mwdma1-2 */ |
@@ -314,7 +262,7 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
314 | dev_printk(KERN_DEBUG, &pdev->dev, | 262 | dev_printk(KERN_DEBUG, &pdev->dev, |
315 | "version " DRV_VERSION "\n"); | 263 | "version " DRV_VERSION "\n"); |
316 | 264 | ||
317 | return ata_pci_init_one(pdev, ppi); | 265 | return ata_pci_sff_init_one(pdev, ppi, &efar_sht, NULL); |
318 | } | 266 | } |
319 | 267 | ||
320 | static const struct pci_device_id efar_pci_tbl[] = { | 268 | static const struct pci_device_id efar_pci_tbl[] = { |