diff options
Diffstat (limited to 'drivers/ata/sata_promise.c')
-rw-r--r-- | drivers/ata/sata_promise.c | 62 |
1 files changed, 15 insertions, 47 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 37c32ab3b23b..e09b975c973d 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -160,74 +160,42 @@ static struct scsi_host_template pdc_ata_sht = { | |||
160 | .dma_boundary = ATA_DMA_BOUNDARY, | 160 | .dma_boundary = ATA_DMA_BOUNDARY, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static const struct ata_port_operations pdc_sata_ops = { | 163 | static const struct ata_port_operations pdc_common_ops = { |
164 | .inherits = &ata_sff_port_ops, | ||
165 | |||
164 | .tf_load = pdc_tf_load_mmio, | 166 | .tf_load = pdc_tf_load_mmio, |
165 | .tf_read = ata_tf_read, | ||
166 | .check_status = ata_check_status, | ||
167 | .exec_command = pdc_exec_command_mmio, | 167 | .exec_command = pdc_exec_command_mmio, |
168 | .dev_select = ata_std_dev_select, | ||
169 | .check_atapi_dma = pdc_check_atapi_dma, | 168 | .check_atapi_dma = pdc_check_atapi_dma, |
170 | |||
171 | .qc_prep = pdc_qc_prep, | 169 | .qc_prep = pdc_qc_prep, |
172 | .qc_issue = pdc_qc_issue_prot, | 170 | .qc_issue = pdc_qc_issue_prot, |
173 | .freeze = pdc_sata_freeze, | ||
174 | .thaw = pdc_sata_thaw, | ||
175 | .error_handler = pdc_sata_error_handler, | ||
176 | .post_internal_cmd = pdc_post_internal_cmd, | ||
177 | .cable_detect = pdc_sata_cable_detect, | ||
178 | .data_xfer = ata_data_xfer, | ||
179 | .irq_clear = pdc_irq_clear, | 171 | .irq_clear = pdc_irq_clear, |
180 | .irq_on = ata_irq_on, | ||
181 | 172 | ||
182 | .scr_read = pdc_sata_scr_read, | 173 | .post_internal_cmd = pdc_post_internal_cmd, |
183 | .scr_write = pdc_sata_scr_write, | ||
184 | .port_start = pdc_sata_port_start, | ||
185 | }; | 174 | }; |
186 | 175 | ||
187 | /* First-generation chips need a more restrictive ->check_atapi_dma op */ | 176 | static struct ata_port_operations pdc_sata_ops = { |
188 | static const struct ata_port_operations pdc_old_sata_ops = { | 177 | .inherits = &pdc_common_ops, |
189 | .tf_load = pdc_tf_load_mmio, | 178 | .cable_detect = pdc_sata_cable_detect, |
190 | .tf_read = ata_tf_read, | ||
191 | .check_status = ata_check_status, | ||
192 | .exec_command = pdc_exec_command_mmio, | ||
193 | .dev_select = ata_std_dev_select, | ||
194 | .check_atapi_dma = pdc_old_sata_check_atapi_dma, | ||
195 | |||
196 | .qc_prep = pdc_qc_prep, | ||
197 | .qc_issue = pdc_qc_issue_prot, | ||
198 | .freeze = pdc_sata_freeze, | 179 | .freeze = pdc_sata_freeze, |
199 | .thaw = pdc_sata_thaw, | 180 | .thaw = pdc_sata_thaw, |
200 | .error_handler = pdc_sata_error_handler, | 181 | .error_handler = pdc_sata_error_handler, |
201 | .post_internal_cmd = pdc_post_internal_cmd, | ||
202 | .cable_detect = pdc_sata_cable_detect, | ||
203 | .data_xfer = ata_data_xfer, | ||
204 | .irq_clear = pdc_irq_clear, | ||
205 | .irq_on = ata_irq_on, | ||
206 | |||
207 | .scr_read = pdc_sata_scr_read, | 182 | .scr_read = pdc_sata_scr_read, |
208 | .scr_write = pdc_sata_scr_write, | 183 | .scr_write = pdc_sata_scr_write, |
209 | .port_start = pdc_sata_port_start, | 184 | .port_start = pdc_sata_port_start, |
210 | }; | 185 | }; |
211 | 186 | ||
212 | static const struct ata_port_operations pdc_pata_ops = { | 187 | /* First-generation chips need a more restrictive ->check_atapi_dma op */ |
213 | .tf_load = pdc_tf_load_mmio, | 188 | static struct ata_port_operations pdc_old_sata_ops = { |
214 | .tf_read = ata_tf_read, | 189 | .inherits = &pdc_sata_ops, |
215 | .check_status = ata_check_status, | 190 | .check_atapi_dma = pdc_old_sata_check_atapi_dma, |
216 | .exec_command = pdc_exec_command_mmio, | 191 | }; |
217 | .dev_select = ata_std_dev_select, | ||
218 | .check_atapi_dma = pdc_check_atapi_dma, | ||
219 | 192 | ||
220 | .qc_prep = pdc_qc_prep, | 193 | static struct ata_port_operations pdc_pata_ops = { |
221 | .qc_issue = pdc_qc_issue_prot, | 194 | .inherits = &pdc_common_ops, |
195 | .cable_detect = pdc_pata_cable_detect, | ||
222 | .freeze = pdc_freeze, | 196 | .freeze = pdc_freeze, |
223 | .thaw = pdc_thaw, | 197 | .thaw = pdc_thaw, |
224 | .error_handler = pdc_pata_error_handler, | 198 | .error_handler = pdc_pata_error_handler, |
225 | .post_internal_cmd = pdc_post_internal_cmd, | ||
226 | .cable_detect = pdc_pata_cable_detect, | ||
227 | .data_xfer = ata_data_xfer, | ||
228 | .irq_clear = pdc_irq_clear, | ||
229 | .irq_on = ata_irq_on, | ||
230 | |||
231 | .port_start = pdc_common_port_start, | 199 | .port_start = pdc_common_port_start, |
232 | }; | 200 | }; |
233 | 201 | ||