diff options
Diffstat (limited to 'drivers/ata/pata_pdc202xx_old.c')
-rw-r--r-- | drivers/ata/pata_pdc202xx_old.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index 6baf51b2fda1..ed8d98557f16 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/libata.h> | 21 | #include <linux/libata.h> |
22 | 22 | ||
23 | #define DRV_NAME "pata_pdc202xx_old" | 23 | #define DRV_NAME "pata_pdc202xx_old" |
24 | #define DRV_VERSION "0.2.1" | 24 | #define DRV_VERSION "0.2.2" |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * pdc2024x_pre_reset - probe begin | 27 | * pdc2024x_pre_reset - probe begin |
@@ -63,7 +63,7 @@ static void pdc2026x_error_handler(struct ata_port *ap) | |||
63 | } | 63 | } |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * pdc_configure_piomode - set chip PIO timing | 66 | * pdc202xx_configure_piomode - set chip PIO timing |
67 | * @ap: ATA interface | 67 | * @ap: ATA interface |
68 | * @adev: ATA device | 68 | * @adev: ATA device |
69 | * @pio: PIO mode | 69 | * @pio: PIO mode |
@@ -73,7 +73,7 @@ static void pdc2026x_error_handler(struct ata_port *ap) | |||
73 | * versa | 73 | * versa |
74 | */ | 74 | */ |
75 | 75 | ||
76 | static void pdc_configure_piomode(struct ata_port *ap, struct ata_device *adev, int pio) | 76 | static void pdc202xx_configure_piomode(struct ata_port *ap, struct ata_device *adev, int pio) |
77 | { | 77 | { |
78 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 78 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
79 | int port = 0x60 + 4 * ap->port_no + 2 * adev->devno; | 79 | int port = 0x60 + 4 * ap->port_no + 2 * adev->devno; |
@@ -98,7 +98,7 @@ static void pdc_configure_piomode(struct ata_port *ap, struct ata_device *adev, | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /** | 100 | /** |
101 | * pdc_set_piomode - set initial PIO mode data | 101 | * pdc202xx_set_piomode - set initial PIO mode data |
102 | * @ap: ATA interface | 102 | * @ap: ATA interface |
103 | * @adev: ATA device | 103 | * @adev: ATA device |
104 | * | 104 | * |
@@ -106,13 +106,13 @@ static void pdc_configure_piomode(struct ata_port *ap, struct ata_device *adev, | |||
106 | * but we want to set the PIO timing by default. | 106 | * but we want to set the PIO timing by default. |
107 | */ | 107 | */ |
108 | 108 | ||
109 | static void pdc_set_piomode(struct ata_port *ap, struct ata_device *adev) | 109 | static void pdc202xx_set_piomode(struct ata_port *ap, struct ata_device *adev) |
110 | { | 110 | { |
111 | pdc_configure_piomode(ap, adev, adev->pio_mode - XFER_PIO_0); | 111 | pdc202xx_configure_piomode(ap, adev, adev->pio_mode - XFER_PIO_0); |
112 | } | 112 | } |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * pdc_configure_dmamode - set DMA mode in chip | 115 | * pdc202xx_configure_dmamode - set DMA mode in chip |
116 | * @ap: ATA interface | 116 | * @ap: ATA interface |
117 | * @adev: ATA device | 117 | * @adev: ATA device |
118 | * | 118 | * |
@@ -120,7 +120,7 @@ static void pdc_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
120 | * to occur. | 120 | * to occur. |
121 | */ | 121 | */ |
122 | 122 | ||
123 | static void pdc_set_dmamode(struct ata_port *ap, struct ata_device *adev) | 123 | static void pdc202xx_set_dmamode(struct ata_port *ap, struct ata_device *adev) |
124 | { | 124 | { |
125 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 125 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
126 | int port = 0x60 + 4 * ap->port_no + 2 * adev->devno; | 126 | int port = 0x60 + 4 * ap->port_no + 2 * adev->devno; |
@@ -184,7 +184,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) | |||
184 | 184 | ||
185 | /* The DMA clocks may have been trashed by a reset. FIXME: make conditional | 185 | /* The DMA clocks may have been trashed by a reset. FIXME: make conditional |
186 | and move to qc_issue ? */ | 186 | and move to qc_issue ? */ |
187 | pdc_set_dmamode(ap, qc->dev); | 187 | pdc202xx_set_dmamode(ap, qc->dev); |
188 | 188 | ||
189 | /* Cases the state machine will not complete correctly without help */ | 189 | /* Cases the state machine will not complete correctly without help */ |
190 | if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA) | 190 | if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA) |
@@ -254,7 +254,7 @@ static void pdc2026x_dev_config(struct ata_port *ap, struct ata_device *adev) | |||
254 | adev->max_sectors = 256; | 254 | adev->max_sectors = 256; |
255 | } | 255 | } |
256 | 256 | ||
257 | static struct scsi_host_template pdc_sht = { | 257 | static struct scsi_host_template pdc202xx_sht = { |
258 | .module = THIS_MODULE, | 258 | .module = THIS_MODULE, |
259 | .name = DRV_NAME, | 259 | .name = DRV_NAME, |
260 | .ioctl = ata_scsi_ioctl, | 260 | .ioctl = ata_scsi_ioctl, |
@@ -275,8 +275,8 @@ static struct scsi_host_template pdc_sht = { | |||
275 | 275 | ||
276 | static struct ata_port_operations pdc2024x_port_ops = { | 276 | static struct ata_port_operations pdc2024x_port_ops = { |
277 | .port_disable = ata_port_disable, | 277 | .port_disable = ata_port_disable, |
278 | .set_piomode = pdc_set_piomode, | 278 | .set_piomode = pdc202xx_set_piomode, |
279 | .set_dmamode = pdc_set_dmamode, | 279 | .set_dmamode = pdc202xx_set_dmamode, |
280 | .mode_filter = ata_pci_default_filter, | 280 | .mode_filter = ata_pci_default_filter, |
281 | .tf_load = ata_tf_load, | 281 | .tf_load = ata_tf_load, |
282 | .tf_read = ata_tf_read, | 282 | .tf_read = ata_tf_read, |
@@ -308,8 +308,8 @@ static struct ata_port_operations pdc2024x_port_ops = { | |||
308 | 308 | ||
309 | static struct ata_port_operations pdc2026x_port_ops = { | 309 | static struct ata_port_operations pdc2026x_port_ops = { |
310 | .port_disable = ata_port_disable, | 310 | .port_disable = ata_port_disable, |
311 | .set_piomode = pdc_set_piomode, | 311 | .set_piomode = pdc202xx_set_piomode, |
312 | .set_dmamode = pdc_set_dmamode, | 312 | .set_dmamode = pdc202xx_set_dmamode, |
313 | .mode_filter = ata_pci_default_filter, | 313 | .mode_filter = ata_pci_default_filter, |
314 | .tf_load = ata_tf_load, | 314 | .tf_load = ata_tf_load, |
315 | .tf_read = ata_tf_read, | 315 | .tf_read = ata_tf_read, |
@@ -340,11 +340,11 @@ static struct ata_port_operations pdc2026x_port_ops = { | |||
340 | .host_stop = ata_host_stop | 340 | .host_stop = ata_host_stop |
341 | }; | 341 | }; |
342 | 342 | ||
343 | static int pdc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 343 | static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
344 | { | 344 | { |
345 | static struct ata_port_info info[3] = { | 345 | static struct ata_port_info info[3] = { |
346 | { | 346 | { |
347 | .sht = &pdc_sht, | 347 | .sht = &pdc202xx_sht, |
348 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 348 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
349 | .pio_mask = 0x1f, | 349 | .pio_mask = 0x1f, |
350 | .mwdma_mask = 0x07, | 350 | .mwdma_mask = 0x07, |
@@ -352,7 +352,7 @@ static int pdc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
352 | .port_ops = &pdc2024x_port_ops | 352 | .port_ops = &pdc2024x_port_ops |
353 | }, | 353 | }, |
354 | { | 354 | { |
355 | .sht = &pdc_sht, | 355 | .sht = &pdc202xx_sht, |
356 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 356 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
357 | .pio_mask = 0x1f, | 357 | .pio_mask = 0x1f, |
358 | .mwdma_mask = 0x07, | 358 | .mwdma_mask = 0x07, |
@@ -360,7 +360,7 @@ static int pdc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
360 | .port_ops = &pdc2026x_port_ops | 360 | .port_ops = &pdc2026x_port_ops |
361 | }, | 361 | }, |
362 | { | 362 | { |
363 | .sht = &pdc_sht, | 363 | .sht = &pdc202xx_sht, |
364 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 364 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
365 | .pio_mask = 0x1f, | 365 | .pio_mask = 0x1f, |
366 | .mwdma_mask = 0x07, | 366 | .mwdma_mask = 0x07, |
@@ -386,7 +386,7 @@ static int pdc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
386 | return ata_pci_init_one(dev, port_info, 2); | 386 | return ata_pci_init_one(dev, port_info, 2); |
387 | } | 387 | } |
388 | 388 | ||
389 | static const struct pci_device_id pdc[] = { | 389 | static const struct pci_device_id pdc202xx[] = { |
390 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 }, | 390 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 }, |
391 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 }, | 391 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 }, |
392 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1 }, | 392 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1 }, |
@@ -396,28 +396,28 @@ static const struct pci_device_id pdc[] = { | |||
396 | { }, | 396 | { }, |
397 | }; | 397 | }; |
398 | 398 | ||
399 | static struct pci_driver pdc_pci_driver = { | 399 | static struct pci_driver pdc202xx_pci_driver = { |
400 | .name = DRV_NAME, | 400 | .name = DRV_NAME, |
401 | .id_table = pdc, | 401 | .id_table = pdc202xx, |
402 | .probe = pdc_init_one, | 402 | .probe = pdc202xx_init_one, |
403 | .remove = ata_pci_remove_one | 403 | .remove = ata_pci_remove_one |
404 | }; | 404 | }; |
405 | 405 | ||
406 | static int __init pdc_init(void) | 406 | static int __init pdc202xx_init(void) |
407 | { | 407 | { |
408 | return pci_register_driver(&pdc_pci_driver); | 408 | return pci_register_driver(&pdc202xx_pci_driver); |
409 | } | 409 | } |
410 | 410 | ||
411 | static void __exit pdc_exit(void) | 411 | static void __exit pdc202xx_exit(void) |
412 | { | 412 | { |
413 | pci_unregister_driver(&pdc_pci_driver); | 413 | pci_unregister_driver(&pdc202xx_pci_driver); |
414 | } | 414 | } |
415 | 415 | ||
416 | MODULE_AUTHOR("Alan Cox"); | 416 | MODULE_AUTHOR("Alan Cox"); |
417 | MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267"); | 417 | MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267"); |
418 | MODULE_LICENSE("GPL"); | 418 | MODULE_LICENSE("GPL"); |
419 | MODULE_DEVICE_TABLE(pci, pdc); | 419 | MODULE_DEVICE_TABLE(pci, pdc202xx); |
420 | MODULE_VERSION(DRV_VERSION); | 420 | MODULE_VERSION(DRV_VERSION); |
421 | 421 | ||
422 | module_init(pdc_init); | 422 | module_init(pdc202xx_init); |
423 | module_exit(pdc_exit); | 423 | module_exit(pdc202xx_exit); |