aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_old.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r--drivers/ide/pci/pdc202xx_old.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 5cb2731047e9..da92d127868f 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -20,6 +20,8 @@
20 20
21#include <asm/io.h> 21#include <asm/io.h>
22 22
23#define DRV_NAME "pdc202xx_old"
24
23#define PDC202XX_DEBUG_DRIVE_INFO 0 25#define PDC202XX_DEBUG_DRIVE_INFO 0
24 26
25static const char *pdc_quirk_drives[] = { 27static const char *pdc_quirk_drives[] = {
@@ -350,9 +352,9 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
350 .dma_timeout = pdc202xx_dma_timeout, 352 .dma_timeout = pdc202xx_dma_timeout,
351}; 353};
352 354
353#define DECLARE_PDC2026X_DEV(name_str, udma, extra_flags) \ 355#define DECLARE_PDC2026X_DEV(udma, extra_flags) \
354 { \ 356 { \
355 .name = name_str, \ 357 .name = DRV_NAME, \
356 .init_chipset = init_chipset_pdc202xx, \ 358 .init_chipset = init_chipset_pdc202xx, \
357 .port_ops = &pdc2026x_port_ops, \ 359 .port_ops = &pdc2026x_port_ops, \
358 .dma_ops = &pdc2026x_dma_ops, \ 360 .dma_ops = &pdc2026x_dma_ops, \
@@ -363,8 +365,8 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
363 } 365 }
364 366
365static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { 367static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
366 { /* 0 */ 368 { /* 0: PDC20246 */
367 .name = "PDC20246", 369 .name = DRV_NAME,
368 .init_chipset = init_chipset_pdc202xx, 370 .init_chipset = init_chipset_pdc202xx,
369 .port_ops = &pdc20246_port_ops, 371 .port_ops = &pdc20246_port_ops,
370 .dma_ops = &pdc20246_dma_ops, 372 .dma_ops = &pdc20246_dma_ops,
@@ -374,10 +376,10 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
374 .udma_mask = ATA_UDMA2, 376 .udma_mask = ATA_UDMA2,
375 }, 377 },
376 378
377 /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4, 0), 379 /* 1: PDC2026{2,3} */
378 /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4, 0), 380 DECLARE_PDC2026X_DEV(ATA_UDMA4, 0),
379 /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), 381 /* 2: PDC2026{5,7} */
380 /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), 382 DECLARE_PDC2026X_DEV(ATA_UDMA5, IDE_HFLAG_RQSIZE_256),
381}; 383};
382 384
383/** 385/**
@@ -396,17 +398,17 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
396 398
397 d = &pdc202xx_chipsets[idx]; 399 d = &pdc202xx_chipsets[idx];
398 400
399 if (idx < 3) 401 if (idx < 2)
400 pdc202ata4_fixup_irq(dev, d->name); 402 pdc202ata4_fixup_irq(dev, d->name);
401 403
402 if (idx == 3) { 404 if (dev->vendor == PCI_DEVICE_ID_PROMISE_20265) {
403 struct pci_dev *bridge = dev->bus->self; 405 struct pci_dev *bridge = dev->bus->self;
404 406
405 if (bridge && 407 if (bridge &&
406 bridge->vendor == PCI_VENDOR_ID_INTEL && 408 bridge->vendor == PCI_VENDOR_ID_INTEL &&
407 (bridge->device == PCI_DEVICE_ID_INTEL_I960 || 409 (bridge->device == PCI_DEVICE_ID_INTEL_I960 ||
408 bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { 410 bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) {
409 printk(KERN_INFO "pdc202xx_old %s: skipping Promise " 411 printk(KERN_INFO DRV_NAME " %s: skipping Promise "
410 "PDC20265 attached to I2O RAID controller\n", 412 "PDC20265 attached to I2O RAID controller\n",
411 pci_name(dev)); 413 pci_name(dev));
412 return -ENODEV; 414 return -ENODEV;
@@ -419,9 +421,9 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
419static const struct pci_device_id pdc202xx_pci_tbl[] = { 421static const struct pci_device_id pdc202xx_pci_tbl[] = {
420 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 }, 422 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 },
421 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 }, 423 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 },
422 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 2 }, 424 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1 },
423 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 3 }, 425 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 2 },
424 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 4 }, 426 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 2 },
425 { 0, }, 427 { 0, },
426}; 428};
427MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl); 429MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl);