diff options
Diffstat (limited to 'drivers/ata/pata_triflex.c')
-rw-r--r-- | drivers/ata/pata_triflex.c | 58 |
1 files changed, 7 insertions, 51 deletions
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index 403eafcffe12..b181261f2743 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c | |||
@@ -66,16 +66,11 @@ static int triflex_prereset(struct ata_link *link, unsigned long deadline) | |||
66 | if (!pci_test_config_bits(pdev, &triflex_enable_bits[ap->port_no])) | 66 | if (!pci_test_config_bits(pdev, &triflex_enable_bits[ap->port_no])) |
67 | return -ENOENT; | 67 | return -ENOENT; |
68 | 68 | ||
69 | return ata_std_prereset(link, deadline); | 69 | return ata_sff_prereset(link, deadline); |
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
73 | 73 | ||
74 | static void triflex_error_handler(struct ata_port *ap) | ||
75 | { | ||
76 | ata_bmdma_drive_eh(ap, triflex_prereset, ata_std_softreset, NULL, ata_std_postreset); | ||
77 | } | ||
78 | |||
79 | /** | 74 | /** |
80 | * triflex_load_timing - timing configuration | 75 | * triflex_load_timing - timing configuration |
81 | * @ap: ATA interface | 76 | * @ap: ATA interface |
@@ -180,60 +175,21 @@ static void triflex_bmdma_stop(struct ata_queued_cmd *qc) | |||
180 | } | 175 | } |
181 | 176 | ||
182 | static struct scsi_host_template triflex_sht = { | 177 | static struct scsi_host_template triflex_sht = { |
183 | .module = THIS_MODULE, | 178 | ATA_BMDMA_SHT(DRV_NAME), |
184 | .name = DRV_NAME, | ||
185 | .ioctl = ata_scsi_ioctl, | ||
186 | .queuecommand = ata_scsi_queuecmd, | ||
187 | .can_queue = ATA_DEF_QUEUE, | ||
188 | .this_id = ATA_SHT_THIS_ID, | ||
189 | .sg_tablesize = LIBATA_MAX_PRD, | ||
190 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
191 | .emulated = ATA_SHT_EMULATED, | ||
192 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
193 | .proc_name = DRV_NAME, | ||
194 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
195 | .slave_configure = ata_scsi_slave_config, | ||
196 | .slave_destroy = ata_scsi_slave_destroy, | ||
197 | .bios_param = ata_std_bios_param, | ||
198 | }; | 179 | }; |
199 | 180 | ||
200 | static struct ata_port_operations triflex_port_ops = { | 181 | static struct ata_port_operations triflex_port_ops = { |
201 | .set_piomode = triflex_set_piomode, | 182 | .inherits = &ata_bmdma_port_ops, |
202 | .mode_filter = ata_pci_default_filter, | ||
203 | |||
204 | .tf_load = ata_tf_load, | ||
205 | .tf_read = ata_tf_read, | ||
206 | .check_status = ata_check_status, | ||
207 | .exec_command = ata_exec_command, | ||
208 | .dev_select = ata_std_dev_select, | ||
209 | |||
210 | .freeze = ata_bmdma_freeze, | ||
211 | .thaw = ata_bmdma_thaw, | ||
212 | .error_handler = triflex_error_handler, | ||
213 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
214 | .cable_detect = ata_cable_40wire, | ||
215 | |||
216 | .bmdma_setup = ata_bmdma_setup, | ||
217 | .bmdma_start = triflex_bmdma_start, | 183 | .bmdma_start = triflex_bmdma_start, |
218 | .bmdma_stop = triflex_bmdma_stop, | 184 | .bmdma_stop = triflex_bmdma_stop, |
219 | .bmdma_status = ata_bmdma_status, | 185 | .cable_detect = ata_cable_40wire, |
220 | 186 | .set_piomode = triflex_set_piomode, | |
221 | .qc_prep = ata_qc_prep, | 187 | .prereset = triflex_prereset, |
222 | .qc_issue = ata_qc_issue_prot, | ||
223 | |||
224 | .data_xfer = ata_data_xfer, | ||
225 | |||
226 | .irq_handler = ata_interrupt, | ||
227 | .irq_clear = ata_bmdma_irq_clear, | ||
228 | .irq_on = ata_irq_on, | ||
229 | |||
230 | .port_start = ata_sff_port_start, | ||
231 | }; | 188 | }; |
232 | 189 | ||
233 | static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 190 | static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
234 | { | 191 | { |
235 | static const struct ata_port_info info = { | 192 | static const struct ata_port_info info = { |
236 | .sht = &triflex_sht, | ||
237 | .flags = ATA_FLAG_SLAVE_POSS, | 193 | .flags = ATA_FLAG_SLAVE_POSS, |
238 | .pio_mask = 0x1f, | 194 | .pio_mask = 0x1f, |
239 | .mwdma_mask = 0x07, | 195 | .mwdma_mask = 0x07, |
@@ -245,7 +201,7 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
245 | if (!printed_version++) | 201 | if (!printed_version++) |
246 | dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n"); | 202 | dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n"); |
247 | 203 | ||
248 | return ata_pci_init_one(dev, ppi); | 204 | return ata_pci_sff_init_one(dev, ppi, &triflex_sht, NULL); |
249 | } | 205 | } |
250 | 206 | ||
251 | static const struct pci_device_id triflex[] = { | 207 | static const struct pci_device_id triflex[] = { |