aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt3x3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_hpt3x3.c')
-rw-r--r--drivers/ata/pata_hpt3x3.c56
1 files changed, 7 insertions, 49 deletions
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
index cb8bdb6887de..f11a320337c0 100644
--- a/drivers/ata/pata_hpt3x3.c
+++ b/drivers/ata/pata_hpt3x3.c
@@ -102,58 +102,17 @@ static int hpt3x3_atapi_dma(struct ata_queued_cmd *qc)
102} 102}
103 103
104static struct scsi_host_template hpt3x3_sht = { 104static struct scsi_host_template hpt3x3_sht = {
105 .module = THIS_MODULE, 105 ATA_BMDMA_SHT(DRV_NAME),
106 .name = DRV_NAME,
107 .ioctl = ata_scsi_ioctl,
108 .queuecommand = ata_scsi_queuecmd,
109 .can_queue = ATA_DEF_QUEUE,
110 .this_id = ATA_SHT_THIS_ID,
111 .sg_tablesize = LIBATA_MAX_PRD,
112 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
113 .emulated = ATA_SHT_EMULATED,
114 .use_clustering = ATA_SHT_USE_CLUSTERING,
115 .proc_name = DRV_NAME,
116 .dma_boundary = ATA_DMA_BOUNDARY,
117 .slave_configure = ata_scsi_slave_config,
118 .slave_destroy = ata_scsi_slave_destroy,
119 .bios_param = ata_std_bios_param,
120}; 106};
121 107
122static struct ata_port_operations hpt3x3_port_ops = { 108static struct ata_port_operations hpt3x3_port_ops = {
109 .inherits = &ata_bmdma_port_ops,
110 .check_atapi_dma= hpt3x3_atapi_dma,
111 .cable_detect = ata_cable_40wire,
123 .set_piomode = hpt3x3_set_piomode, 112 .set_piomode = hpt3x3_set_piomode,
124#if defined(CONFIG_PATA_HPT3X3_DMA) 113#if defined(CONFIG_PATA_HPT3X3_DMA)
125 .set_dmamode = hpt3x3_set_dmamode, 114 .set_dmamode = hpt3x3_set_dmamode,
126#endif 115#endif
127 .mode_filter = ata_pci_default_filter,
128
129 .tf_load = ata_tf_load,
130 .tf_read = ata_tf_read,
131 .check_status = ata_check_status,
132 .exec_command = ata_exec_command,
133 .dev_select = ata_std_dev_select,
134
135 .freeze = ata_bmdma_freeze,
136 .thaw = ata_bmdma_thaw,
137 .error_handler = ata_bmdma_error_handler,
138 .post_internal_cmd = ata_bmdma_post_internal_cmd,
139 .cable_detect = ata_cable_40wire,
140
141 .bmdma_setup = ata_bmdma_setup,
142 .bmdma_start = ata_bmdma_start,
143 .bmdma_stop = ata_bmdma_stop,
144 .bmdma_status = ata_bmdma_status,
145 .check_atapi_dma= hpt3x3_atapi_dma,
146
147 .qc_prep = ata_qc_prep,
148 .qc_issue = ata_qc_issue_prot,
149
150 .data_xfer = ata_data_xfer,
151
152 .irq_handler = ata_interrupt,
153 .irq_clear = ata_bmdma_irq_clear,
154 .irq_on = ata_irq_on,
155
156 .port_start = ata_sff_port_start,
157}; 116};
158 117
159/** 118/**
@@ -189,7 +148,6 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
189{ 148{
190 static int printed_version; 149 static int printed_version;
191 static const struct ata_port_info info = { 150 static const struct ata_port_info info = {
192 .sht = &hpt3x3_sht,
193 .flags = ATA_FLAG_SLAVE_POSS, 151 .flags = ATA_FLAG_SLAVE_POSS,
194 .pio_mask = 0x1f, 152 .pio_mask = 0x1f,
195#if defined(CONFIG_PATA_HPT3X3_DMA) 153#if defined(CONFIG_PATA_HPT3X3_DMA)
@@ -244,15 +202,15 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
244 ioaddr->altstatus_addr = 202 ioaddr->altstatus_addr =
245 ioaddr->ctl_addr = base + offset_ctl[i]; 203 ioaddr->ctl_addr = base + offset_ctl[i];
246 ioaddr->scr_addr = NULL; 204 ioaddr->scr_addr = NULL;
247 ata_std_ports(ioaddr); 205 ata_sff_std_ports(ioaddr);
248 ioaddr->bmdma_addr = base + 8 * i; 206 ioaddr->bmdma_addr = base + 8 * i;
249 207
250 ata_port_pbar_desc(ap, 4, -1, "ioport"); 208 ata_port_pbar_desc(ap, 4, -1, "ioport");
251 ata_port_pbar_desc(ap, 4, offset_cmd[i], "cmd"); 209 ata_port_pbar_desc(ap, 4, offset_cmd[i], "cmd");
252 } 210 }
253 pci_set_master(pdev); 211 pci_set_master(pdev);
254 return ata_host_activate(host, pdev->irq, ata_interrupt, IRQF_SHARED, 212 return ata_host_activate(host, pdev->irq, ata_sff_interrupt,
255 &hpt3x3_sht); 213 IRQF_SHARED, &hpt3x3_sht);
256} 214}
257 215
258#ifdef CONFIG_PM 216#ifdef CONFIG_PM