Commit 75751416 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] ide: ide_pci_device_t sanitization

- convert ->isa_ports into ->flags (IDEPCI_FLAG_ISA_PORTS)
- add IDEPCI_FLAG_{OBS_FORCE_PDC,FORCE_MASTER} flags
  and use them in setup-pci.c
- use struct pci_dev ->vendor and ->device fields directly
  in generic.c and serverworks.c
- remove no longer needed debug checks (dev->device != d->device)
- remove ->vendor and ->device fields from ide_pci_device_t
- misc cleanups
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9b541c7b
...@@ -525,8 +525,6 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi ...@@ -525,8 +525,6 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
{ {
ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data]; ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 0; return 0;
} }
......
...@@ -78,8 +78,6 @@ static void init_dma_aec62xx(ide_hwif_t *, unsigned long); ...@@ -78,8 +78,6 @@ static void init_dma_aec62xx(ide_hwif_t *, unsigned long);
static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_ARTOP,
.device = PCI_DEVICE_ID_ARTOP_ATP850UF,
.name = "AEC6210", .name = "AEC6210",
.init_setup = init_setup_aec62xx, .init_setup = init_setup_aec62xx,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
...@@ -90,8 +88,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -90,8 +88,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_ARTOP,
.device = PCI_DEVICE_ID_ARTOP_ATP860,
.name = "AEC6260", .name = "AEC6260",
.init_setup = init_setup_aec62xx, .init_setup = init_setup_aec62xx,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
...@@ -101,8 +97,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -101,8 +97,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_ARTOP,
.device = PCI_DEVICE_ID_ARTOP_ATP860R,
.name = "AEC6260R", .name = "AEC6260R",
.init_setup = init_setup_aec62xx, .init_setup = init_setup_aec62xx,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
...@@ -113,8 +107,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -113,8 +107,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.bootable = NEVER_BOARD, .bootable = NEVER_BOARD,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_ARTOP,
.device = PCI_DEVICE_ID_ARTOP_ATP865,
.name = "AEC6X80", .name = "AEC6X80",
.init_setup = init_setup_aec6x80, .init_setup = init_setup_aec6x80,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
...@@ -124,8 +116,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -124,8 +116,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 4 */ },{ /* 4 */
.vendor = PCI_VENDOR_ID_ARTOP,
.device = PCI_DEVICE_ID_ARTOP_ATP865R,
.name = "AEC6X80R", .name = "AEC6X80R",
.init_setup = init_setup_aec6x80, .init_setup = init_setup_aec6x80,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
......
...@@ -14,8 +14,6 @@ static void init_dma_ali15x3(ide_hwif_t *, unsigned long); ...@@ -14,8 +14,6 @@ static void init_dma_ali15x3(ide_hwif_t *, unsigned long);
static ide_pci_device_t ali15x3_chipsets[] __devinitdata = { static ide_pci_device_t ali15x3_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_AL,
.device = PCI_DEVICE_ID_AL_M5229,
.name = "ALI15X3", .name = "ALI15X3",
.init_chipset = init_chipset_ali15x3, .init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3, .init_hwif = init_hwif_ali15x3,
......
...@@ -445,7 +445,6 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_ ...@@ -445,7 +445,6 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
{ {
amd_chipset = amd74xx_chipsets + id->driver_data; amd_chipset = amd74xx_chipsets + id->driver_data;
amd_config = amd_ide_chips + id->driver_data; amd_config = amd_ide_chips + id->driver_data;
if (dev->device != amd_chipset->device) BUG();
if (dev->device != amd_config->id) BUG(); if (dev->device != amd_config->id) BUG();
ide_setup_pci_device(dev, amd_chipset); ide_setup_pci_device(dev, amd_chipset);
return 0; return 0;
......
...@@ -12,8 +12,6 @@ static void init_hwif_amd74xx(ide_hwif_t *); ...@@ -12,8 +12,6 @@ static void init_hwif_amd74xx(ide_hwif_t *);
static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_COBRA_7401,
.name = "AMD7401", .name = "AMD7401",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -22,8 +20,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -22,8 +20,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_VIPER_7409,
.name = "AMD7409", .name = "AMD7409",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -32,8 +28,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -32,8 +28,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_VIPER_7411,
.name = "AMD7411", .name = "AMD7411",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -42,8 +36,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -42,8 +36,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_OPUS_7441,
.name = "AMD7441", .name = "AMD7441",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -52,8 +44,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -52,8 +44,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 4 */ },{ /* 4 */
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_8111_IDE,
.name = "AMD8111", .name = "AMD8111",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -63,8 +53,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -63,8 +53,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 5 */ { /* 5 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE_IDE,
.name = "NFORCE", .name = "NFORCE",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -74,8 +62,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -74,8 +62,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 6 */ { /* 6 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE,
.name = "NFORCE2", .name = "NFORCE2",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -85,8 +71,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -85,8 +71,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 7 */ { /* 7 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE,
.name = "NFORCE2S", .name = "NFORCE2S",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -96,8 +80,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -96,8 +80,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 8 */ { /* 8 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA,
.name = "NFORCE2S-SATA", .name = "NFORCE2S-SATA",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -107,8 +89,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -107,8 +89,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 9 */ { /* 9 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE,
.name = "NFORCE3", .name = "NFORCE3",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -118,8 +98,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -118,8 +98,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 10 */ { /* 10 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE,
.name = "NFORCE3S", .name = "NFORCE3S",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -129,8 +107,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -129,8 +107,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 11 */ { /* 11 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA,
.name = "NFORCE3S-SATA", .name = "NFORCE3S-SATA",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
...@@ -140,8 +116,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -140,8 +116,6 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
{ /* 12 */ { /* 12 */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2,
.name = "NFORCE3S-SATA2", .name = "NFORCE3S-SATA2",
.init_chipset = init_chipset_amd74xx, .init_chipset = init_chipset_amd74xx,
.init_hwif = init_hwif_amd74xx, .init_hwif = init_hwif_amd74xx,
......
...@@ -458,8 +458,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) ...@@ -458,8 +458,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
static ide_pci_device_t atiixp_pci_info[] __devinitdata = { static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_ATI,
.device = PCI_DEVICE_ID_ATI_IXP_IDE,
.name = "ATIIXP", .name = "ATIIXP",
.init_chipset = init_chipset_atiixp, .init_chipset = init_chipset_atiixp,
.init_hwif = init_hwif_atiixp, .init_hwif = init_hwif_atiixp,
...@@ -481,11 +479,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = { ...@@ -481,11 +479,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &atiixp_pci_info[id->driver_data]; ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -746,10 +746,7 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif) ...@@ -746,10 +746,7 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &cmd64x_chipsets[id->driver_data]; ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -65,8 +65,6 @@ static void init_hwif_cmd64x(ide_hwif_t *); ...@@ -65,8 +65,6 @@ static void init_hwif_cmd64x(ide_hwif_t *);
static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_CMD_643,
.name = "CMD643", .name = "CMD643",
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
...@@ -74,8 +72,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -74,8 +72,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_CMD_646,
.name = "CMD646", .name = "CMD646",
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
...@@ -84,8 +80,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -84,8 +80,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x00,0x00,0x00}, {0x51,0x80,0x80}}, .enablebits = {{0x00,0x00,0x00}, {0x51,0x80,0x80}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_CMD_648,
.name = "CMD648", .name = "CMD648",
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
...@@ -93,8 +87,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -93,8 +87,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ },{
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_CMD_649,
.name = "CMD649", .name = "CMD649",
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
......
...@@ -13,28 +13,24 @@ static void cs5520_init_setup_dma(struct pci_dev *dev, struct ide_pci_device_s * ...@@ -13,28 +13,24 @@ static void cs5520_init_setup_dma(struct pci_dev *dev, struct ide_pci_device_s *
static ide_pci_device_t cyrix_chipsets[] __devinitdata = { static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
{ {
.vendor = PCI_VENDOR_ID_CYRIX,
.device = PCI_DEVICE_ID_CYRIX_5510,
.name = "Cyrix 5510", .name = "Cyrix 5510",
.init_chipset = init_chipset_cs5520, .init_chipset = init_chipset_cs5520,
.init_setup_dma = cs5520_init_setup_dma, .init_setup_dma = cs5520_init_setup_dma,
.init_hwif = init_hwif_cs5520, .init_hwif = init_hwif_cs5520,
.isa_ports = 1,
.channels = 2, .channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.flags = IDEPCI_FLAG_ISA_PORTS,
}, },
{ {
.vendor = PCI_VENDOR_ID_CYRIX,
.device = PCI_DEVICE_ID_CYRIX_5520,
.name = "Cyrix 5520", .name = "Cyrix 5520",
.init_chipset = init_chipset_cs5520, .init_chipset = init_chipset_cs5520,
.init_setup_dma = cs5520_init_setup_dma, .init_setup_dma = cs5520_init_setup_dma,
.init_hwif = init_hwif_cs5520, .init_hwif = init_hwif_cs5520,
.isa_ports = 1,
.channels = 2, .channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.flags = IDEPCI_FLAG_ISA_PORTS,
} }
}; };
......
...@@ -406,10 +406,7 @@ static void __init init_hwif_cs5530 (ide_hwif_t *hwif) ...@@ -406,10 +406,7 @@ static void __init init_hwif_cs5530 (ide_hwif_t *hwif)
static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &cs5530_chipsets[id->driver_data]; ide_setup_pci_device(dev, &cs5530_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -12,14 +12,13 @@ static void init_hwif_cs5530(ide_hwif_t *); ...@@ -12,14 +12,13 @@ static void init_hwif_cs5530(ide_hwif_t *);
static ide_pci_device_t cs5530_chipsets[] __devinitdata = { static ide_pci_device_t cs5530_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_CYRIX,
.device = PCI_DEVICE_ID_CYRIX_5530_IDE,
.name = "CS5530", .name = "CS5530",
.init_chipset = init_chipset_cs5530, .init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530, .init_hwif = init_hwif_cs5530,
.channels = 2, .channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.flags = IDEPCI_FLAG_FORCE_MASTER,
} }
}; };
......
...@@ -70,8 +70,6 @@ static void init_iops_cy82c693(ide_hwif_t *); ...@@ -70,8 +70,6 @@ static void init_iops_cy82c693(ide_hwif_t *);
static ide_pci_device_t cy82c693_chipsets[] __devinitdata = { static ide_pci_device_t cy82c693_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_CONTAQ,
.device = PCI_DEVICE_ID_CONTAQ_82C693,
.name = "CY82C693", .name = "CY82C693",
.init_chipset = init_chipset_cy82c693, .init_chipset = init_chipset_cy82c693,
.init_iops = init_iops_cy82c693, .init_iops = init_iops_cy82c693,
......
...@@ -77,8 +77,6 @@ static void __init init_hwif_generic (ide_hwif_t *hwif) ...@@ -77,8 +77,6 @@ static void __init init_hwif_generic (ide_hwif_t *hwif)
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
ide_pci_device_t *unknown = unknown_chipset; ide_pci_device_t *unknown = unknown_chipset;
// unknown->vendor = dev->vendor;
// unknown->device = dev->device;
init_setup_unknown(dev, unknown); init_setup_unknown(dev, unknown);
return 1; return 1;
} }
...@@ -99,15 +97,13 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi ...@@ -99,15 +97,13 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
ide_pci_device_t *d = &generic_chipsets[id->driver_data]; ide_pci_device_t *d = &generic_chipsets[id->driver_data];
u16 command; u16 command;
if (dev->device != d->device) if (dev->vendor == PCI_VENDOR_ID_UMC &&
BUG(); dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
if ((d->vendor == PCI_VENDOR_ID_UMC) &&
(d->device == PCI_DEVICE_ID_UMC_UM8886A) &&
(!(PCI_FUNC(dev->devfn) & 1))) (!(PCI_FUNC(dev->devfn) & 1)))
return 1; /* UM8886A/BF pair */ return 1; /* UM8886A/BF pair */
if ((d->vendor == PCI_VENDOR_ID_OPTI) && if (dev->vendor == PCI_VENDOR_ID_OPTI &&
(d->device == PCI_DEVICE_ID_OPTI_82C558) && dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
(!(PCI_FUNC(dev->devfn) & 1))) (!(PCI_FUNC(dev->devfn) & 1)))
return 1; return 1;
......
...@@ -10,8 +10,6 @@ static void init_hwif_generic(ide_hwif_t *); ...@@ -10,8 +10,6 @@ static void init_hwif_generic(ide_hwif_t *);
static ide_pci_device_t generic_chipsets[] __devinitdata = { static ide_pci_device_t generic_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_NS,
.device = PCI_DEVICE_ID_NS_87410,
.name = "NS87410", .name = "NS87410",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -20,8 +18,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -20,8 +18,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_PCTECH,
.device = PCI_DEVICE_ID_PCTECH_SAMURAI_IDE,
.name = "SAMURAI", .name = "SAMURAI",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -29,8 +25,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -29,8 +25,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_HOLTEK,
.device = PCI_DEVICE_ID_HOLTEK_6565,
.name = "HT6565", .name = "HT6565",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -38,8 +32,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -38,8 +32,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_UMC,
.device = PCI_DEVICE_ID_UMC_UM8673F,
.name = "UM8673F", .name = "UM8673F",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -47,8 +39,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -47,8 +39,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 4 */ },{ /* 4 */
.vendor = PCI_VENDOR_ID_UMC,
.device = PCI_DEVICE_ID_UMC_UM8886A,
.name = "UM8886A", .name = "UM8886A",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -56,8 +46,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -56,8 +46,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 5 */ },{ /* 5 */
.vendor = PCI_VENDOR_ID_UMC,
.device = PCI_DEVICE_ID_UMC_UM8886BF,
.name = "UM8886BF", .name = "UM8886BF",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -65,8 +53,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -65,8 +53,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 6 */ },{ /* 6 */
.vendor = PCI_VENDOR_ID_HINT,
.device = PCI_DEVICE_ID_HINT_VXPROII_IDE,
.name = "HINT_IDE", .name = "HINT_IDE",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -74,8 +60,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -74,8 +60,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 7 */ },{ /* 7 */
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_82C561,
.name = "VIA_IDE", .name = "VIA_IDE",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -83,8 +67,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -83,8 +67,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 8 */ },{ /* 8 */
.vendor = PCI_VENDOR_ID_OPTI,
.device = PCI_DEVICE_ID_OPTI_82C558,
.name = "OPTI621V", .name = "OPTI621V",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -92,8 +74,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -92,8 +74,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 9 */ },{ /* 9 */
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_8237_SATA,
.name = "VIA8237SATA", .name = "VIA8237SATA",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -101,8 +81,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -101,8 +81,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 10 */ },{ /* 10 */
.vendor = PCI_VENDOR_ID_TOSHIBA,
.device = PCI_DEVICE_ID_TOSHIBA_PICCOLO,
.name = "Piccolo0102", .name = "Piccolo0102",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -110,8 +88,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -110,8 +88,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 11 */ },{ /* 11 */
.vendor = PCI_VENDOR_ID_TOSHIBA,
.device = PCI_DEVICE_ID_TOSHIBA_PICCOLO_1,
.name = "Piccolo0103", .name = "Piccolo0103",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -119,8 +95,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -119,8 +95,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 12 */ },{ /* 12 */
.vendor = PCI_VENDOR_ID_TOSHIBA,
.device = PCI_DEVICE_ID_TOSHIBA_PICCOLO_2,
.name = "Piccolo0105", .name = "Piccolo0105",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
...@@ -133,8 +107,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -133,8 +107,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
#if 0 #if 0
static ide_pci_device_t unknown_chipset[] __devinitdata = { static ide_pci_device_t unknown_chipset[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = 0,
.device = 0,
.name = "PCI_IDE", .name = "PCI_IDE",
.init_chipset = init_chipset_generic, .init_chipset = init_chipset_generic,
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
......
...@@ -18,8 +18,6 @@ static void init_hwif_hpt34x(ide_hwif_t *); ...@@ -18,8 +18,6 @@ static void init_hwif_hpt34x(ide_hwif_t *);
static ide_pci_device_t hpt34x_chipsets[] __devinitdata = { static ide_pci_device_t hpt34x_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_TTI,
.device = PCI_DEVICE_ID_TTI_HPT343,
.name = "HPT34X", .name = "HPT34X",
.init_chipset = init_chipset_hpt34x, .init_chipset = init_chipset_hpt34x,
.init_hwif = init_hwif_hpt34x, .init_hwif = init_hwif_hpt34x,
......
...@@ -1241,8 +1241,6 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic ...@@ -1241,8 +1241,6 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
{ {
ide_pci_device_t *d = &hpt366_chipsets[id->driver_data]; ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 0; return 0;
} }
......
...@@ -425,8 +425,6 @@ static void init_dma_hpt366(ide_hwif_t *, unsigned long); ...@@ -425,8 +425,6 @@ static void init_dma_hpt366(ide_hwif_t *, unsigned long);
static ide_pci_device_t hpt366_chipsets[] __devinitdata = { static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_TTI,
.device = PCI_DEVICE_ID_TTI_HPT366,
.name = "HPT366", .name = "HPT366",
.init_setup = init_setup_hpt366, .init_setup = init_setup_hpt366,
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
...@@ -437,8 +435,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -437,8 +435,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 240 .extra = 240
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_TTI,
.device = PCI_DEVICE_ID_TTI_HPT372,
.name = "HPT372A", .name = "HPT372A",
.init_setup = init_setup_hpt37x, .init_setup = init_setup_hpt37x,
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
...@@ -448,8 +444,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -448,8 +444,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_TTI,
.device = PCI_DEVICE_ID_TTI_HPT302,
.name = "HPT302", .name = "HPT302",
.init_setup = init_setup_hpt37x, .init_setup = init_setup_hpt37x,
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
...@@ -459,8 +453,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -459,8 +453,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_TTI,
.device = PCI_DEVICE_ID_TTI_HPT371,
.name = "HPT371", .name = "HPT371",
.init_setup = init_setup_hpt37x, .init_setup = init_setup_hpt37x,
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
...@@ -470,8 +462,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -470,8 +462,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 4 */ },{ /* 4 */
.vendor = PCI_VENDOR_ID_TTI,
.device = PCI_DEVICE_ID_TTI_HPT374,
.name = "HPT374", .name = "HPT374",
.init_setup = init_setup_hpt374, .init_setup = init_setup_hpt374,
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
......
...@@ -288,11 +288,10 @@ static void __init init_hwif_it8172 (ide_hwif_t *hwif) ...@@ -288,11 +288,10 @@ static void __init init_hwif_it8172 (ide_hwif_t *hwif)
static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &it8172_chipsets[id->driver_data];
if ((!(PCI_FUNC(dev->devfn) & 1) || if ((!(PCI_FUNC(dev->devfn) & 1) ||
(!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)))) (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
return 1; /* IT8172 is more than only a IDE controller */ return 1; /* IT8172 is more than only a IDE controller */
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
return 0; return 0;
} }
......
...@@ -20,8 +20,6 @@ static void init_hwif_it8172(ide_hwif_t *); ...@@ -20,8 +20,6 @@ static void init_hwif_it8172(ide_hwif_t *);
static ide_pci_device_t it8172_chipsets[] __devinitdata = { static ide_pci_device_t it8172_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_ITE,
.device = PCI_DEVICE_ID_ITE_IT8172G,
.name = "IT8172G", .name = "IT8172G",
.init_setup = init_setup_it8172, .init_setup = init_setup_it8172,
.init_chipset = init_chipset_it8172, .init_chipset = init_chipset_it8172,
......
...@@ -219,10 +219,7 @@ static void __init init_hwif_ns87415 (ide_hwif_t *hwif) ...@@ -219,10 +219,7 @@ static void __init init_hwif_ns87415 (ide_hwif_t *hwif)
static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &ns87415_chipsets[id->driver_data]; ide_setup_pci_device(dev, &ns87415_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -9,8 +9,6 @@ static void init_hwif_ns87415(ide_hwif_t *); ...@@ -9,8 +9,6 @@ static void init_hwif_ns87415(ide_hwif_t *);
static ide_pci_device_t ns87415_chipsets[] __devinitdata = { static ide_pci_device_t ns87415_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_NS,
.device = PCI_DEVICE_ID_NS_87415,
.name = "NS87415", .name = "NS87415",
.init_hwif = init_hwif_ns87415, .init_hwif = init_hwif_ns87415,
.channels = 2, .channels = 2,
......
...@@ -355,10 +355,7 @@ static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -355,10 +355,7 @@ static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &opti621_chipsets[id->driver_data]; ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -10,8 +10,6 @@ static void init_hwif_opti621(ide_hwif_t *); ...@@ -10,8 +10,6 @@ static void init_hwif_opti621(ide_hwif_t *);
static ide_pci_device_t opti621_chipsets[] __devinitdata = { static ide_pci_device_t opti621_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_OPTI,
.device = PCI_DEVICE_ID_OPTI_82C621,
.name = "OPTI621", .name = "OPTI621",
.init_setup = init_setup_opti621, .init_setup = init_setup_opti621,
.init_hwif = init_hwif_opti621, .init_hwif = init_hwif_opti621,
...@@ -20,8 +18,6 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = { ...@@ -20,8 +18,6 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
.enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_OPTI,
.device = PCI_DEVICE_ID_OPTI_82C825,
.name = "OPTI621X", .name = "OPTI621X",
.init_setup = init_setup_opti621, .init_setup = init_setup_opti621,
.init_hwif = init_hwif_opti621, .init_hwif = init_hwif_opti621,
......
...@@ -514,8 +514,6 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de ...@@ -514,8 +514,6 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
{ {
ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data]; ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 0; return 0;
} }
......
...@@ -53,8 +53,6 @@ static void init_hwif_pdc202new(ide_hwif_t *); ...@@ -53,8 +53,6 @@ static void init_hwif_pdc202new(ide_hwif_t *);
static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20268,
.name = "PDC20268", .name = "PDC20268",
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
...@@ -63,8 +61,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -63,8 +61,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20269,
.name = "PDC20269", .name = "PDC20269",
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
...@@ -73,8 +69,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -73,8 +69,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20270,
.name = "PDC20270", .name = "PDC20270",
.init_setup = init_setup_pdc20270, .init_setup = init_setup_pdc20270,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
...@@ -86,8 +80,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -86,8 +80,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
#endif #endif
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20271,
.name = "PDC20271", .name = "PDC20271",
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
...@@ -96,8 +88,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -96,8 +88,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 4 */ },{ /* 4 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20275,
.name = "PDC20275", .name = "PDC20275",
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
...@@ -106,8 +96,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -106,8 +96,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 5 */ },{ /* 5 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20276,
.name = "PDC20276", .name = "PDC20276",
.init_setup = init_setup_pdc20276, .init_setup = init_setup_pdc20276,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
...@@ -119,8 +107,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -119,8 +107,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
#endif #endif
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 6 */ },{ /* 6 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20277,
.name = "PDC20277", .name = "PDC20277",
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
......
...@@ -884,8 +884,6 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev ...@@ -884,8 +884,6 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
{ {
ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data]; ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 0; return 0;
} }
......
...@@ -180,8 +180,6 @@ static void init_dma_pdc202xx(ide_hwif_t *, unsigned long); ...@@ -180,8 +180,6 @@ static void init_dma_pdc202xx(ide_hwif_t *, unsigned long);
static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20246,
.name = "PDC20246", .name = "PDC20246",
.init_setup = init_setup_pdc202ata4, .init_setup = init_setup_pdc202ata4,
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
...@@ -195,8 +193,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -195,8 +193,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 16, .extra = 16,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20262,
.name = "PDC20262", .name = "PDC20262",
.init_setup = init_setup_pdc202ata4, .init_setup = init_setup_pdc202ata4,
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
...@@ -209,9 +205,8 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -209,9 +205,8 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
#endif #endif
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
.flags = IDEPCI_FLAG_FORCE_PDC,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20263,
.name = "PDC20263", .name = "PDC20263",
.init_setup = init_setup_pdc202ata4, .init_setup = init_setup_pdc202ata4,
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
...@@ -225,8 +220,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -225,8 +220,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20265,
.name = "PDC20265", .name = "PDC20265",
.init_setup = init_setup_pdc20265, .init_setup = init_setup_pdc20265,
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
...@@ -239,9 +232,8 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -239,9 +232,8 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
#endif #endif
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
.flags = IDEPCI_FLAG_FORCE_PDC,
},{ /* 4 */ },{ /* 4 */
.vendor = PCI_VENDOR_ID_PROMISE,
.device = PCI_DEVICE_ID_PROMISE_20267,
.name = "PDC20267", .name = "PDC20267",
.init_setup = init_setup_pdc202xx, .init_setup = init_setup_pdc202xx,
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
......
...@@ -744,8 +744,6 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_ ...@@ -744,8 +744,6 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_
{ {
ide_pci_device_t *d = &piix_pci_info[id->driver_data]; ide_pci_device_t *d = &piix_pci_info[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 0; return 0;
} }
......
...@@ -13,10 +13,8 @@ static void init_setup_piix(struct pci_dev *, ide_pci_device_t *); ...@@ -13,10 +13,8 @@ static void init_setup_piix(struct pci_dev *, ide_pci_device_t *);
static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *); static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *);
static void init_hwif_piix(ide_hwif_t *); static void init_hwif_piix(ide_hwif_t *);
#define DECLARE_PIIX_DEV(pci_id, name_str) \ #define DECLARE_PIIX_DEV(name_str) \
{ \ { \
.vendor = PCI_VENDOR_ID_INTEL, \
.device = pci_id, \
.name = name_str, \ .name = name_str, \
.init_setup = init_setup_piix, \ .init_setup = init_setup_piix, \
.init_chipset = init_chipset_piix, \ .init_chipset = init_chipset_piix, \
...@@ -33,12 +31,10 @@ static void init_hwif_piix(ide_hwif_t *); ...@@ -33,12 +31,10 @@ static void init_hwif_piix(ide_hwif_t *);
*/ */
static ide_pci_device_t piix_pci_info[] __devinitdata = { static ide_pci_device_t piix_pci_info[] __devinitdata = {
/* 0 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371FB_0, "PIIXa"), /* 0 */ DECLARE_PIIX_DEV("PIIXa"),
/* 1 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371FB_1, "PIIXb"), /* 1 */ DECLARE_PIIX_DEV("PIIXb"),
{ /* 2 */ { /* 2 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82371MX,
.name = "MPIIX", .name = "MPIIX",
.init_setup = init_setup_piix, .init_setup = init_setup_piix,
.init_hwif = init_hwif_piix, .init_hwif = init_hwif_piix,
...@@ -48,24 +44,24 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = { ...@@ -48,24 +44,24 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
.bootable = ON_BOARD, .bootable = ON_BOARD,
}, },
/* 3 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371SB_1, "PIIX3"), /* 3 */ DECLARE_PIIX_DEV("PIIX3"),
/* 4 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371AB, "PIIX4"), /* 4 */ DECLARE_PIIX_DEV("PIIX4"),
/* 5 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801AB_1, "ICH0"), /* 5 */ DECLARE_PIIX_DEV("ICH0"),
/* 6 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82443MX_1, "PIIX4"), /* 6 */ DECLARE_PIIX_DEV("PIIX4"),
/* 7 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801AA_1, "ICH"), /* 7 */ DECLARE_PIIX_DEV("ICH"),
/* 8 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82372FB_1, "PIIX4"), /* 8 */ DECLARE_PIIX_DEV("PIIX4"),
/* 9 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82451NX, "PIIX4"), /* 9 */ DECLARE_PIIX_DEV("PIIX4"),
/* 10 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801BA_9, "ICH2"), /* 10 */ DECLARE_PIIX_DEV("ICH2"),
/* 11 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801BA_8, "ICH2M"), /* 11 */ DECLARE_PIIX_DEV("ICH2M"),
/* 12 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801CA_10, "ICH3M"), /* 12 */ DECLARE_PIIX_DEV("ICH3M"),
/* 13 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801CA_11, "ICH3"), /* 13 */ DECLARE_PIIX_DEV("ICH3"),
/* 14 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801DB_11, "ICH4"), /* 14 */ DECLARE_PIIX_DEV("ICH4"),
/* 15 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801EB_11, "ICH5"), /* 15 */ DECLARE_PIIX_DEV("ICH5"),
/* 16 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801E_11, "C-ICH"), /* 16 */ DECLARE_PIIX_DEV("C-ICH"),
/* 17 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801DB_10, "ICH4"), /* 17 */ DECLARE_PIIX_DEV("ICH4"),
/* 18 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801EB_1, "ICH5-SATA"), /* 18 */ DECLARE_PIIX_DEV("ICH5-SATA"),
/* 19 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_ESB_2, "ICH5"), /* 19 */ DECLARE_PIIX_DEV("ICH5"),
/* 20 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_ICH6_19, "ICH6") /* 20 */ DECLARE_PIIX_DEV("ICH6")
}; };
#endif /* PIIX_H */ #endif /* PIIX_H */
...@@ -56,10 +56,7 @@ static void __init init_hwif_rz1000 (ide_hwif_t *hwif) ...@@ -56,10 +56,7 @@ static void __init init_hwif_rz1000 (ide_hwif_t *hwif)
static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &rz1000_chipsets[id->driver_data]; ide_setup_pci_device(dev, &rz1000_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -8,17 +8,13 @@ ...@@ -8,17 +8,13 @@
static void init_hwif_rz1000(ide_hwif_t *); static void init_hwif_rz1000(ide_hwif_t *);
static ide_pci_device_t rz1000_chipsets[] __devinitdata = { static ide_pci_device_t rz1000_chipsets[] __devinitdata = {
{ {
.vendor = PCI_VENDOR_ID_PCTECH,
.device = PCI_DEVICE_ID_PCTECH_RZ1000,
.name = "RZ1000", .name = "RZ1000",
.init_hwif = init_hwif_rz1000, .init_hwif = init_hwif_rz1000,
.channels = 2, .channels = 2,
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ },{
.vendor = PCI_VENDOR_ID_PCTECH,
.device = PCI_DEVICE_ID_PCTECH_RZ1001,
.name = "RZ1001", .name = "RZ1001",
.init_hwif = init_hwif_rz1000, .init_hwif = init_hwif_rz1000,
.channels = 2, .channels = 2,
......
...@@ -547,10 +547,7 @@ static void __init init_hwif_sc1200 (ide_hwif_t *hwif) ...@@ -547,10 +547,7 @@ static void __init init_hwif_sc1200 (ide_hwif_t *hwif)
static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &sc1200_chipsets[id->driver_data]; ide_setup_pci_device(dev, &sc1200_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -12,8 +12,6 @@ static void init_hwif_sc1200(ide_hwif_t *); ...@@ -12,8 +12,6 @@ static void init_hwif_sc1200(ide_hwif_t *);
static ide_pci_device_t sc1200_chipsets[] __devinitdata = { static ide_pci_device_t sc1200_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_NS,
.device = PCI_DEVICE_ID_NS_SCx200_IDE,
.name = "SC1200", .name = "SC1200",
.init_chipset = init_chipset_sc1200, .init_chipset = init_chipset_sc1200,
.init_hwif = init_hwif_sc1200, .init_hwif = init_hwif_sc1200,
......
...@@ -777,8 +777,8 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -777,8 +777,8 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
d->autodma = AUTODMA; d->autodma = AUTODMA;
#endif #endif
d->channels = (((d->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
(d->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) && dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
(!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2; (!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2;
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
...@@ -798,8 +798,6 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device ...@@ -798,8 +798,6 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
{ {
ide_pci_device_t *d = &serverworks_chipsets[id->driver_data]; ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 0; return 0;
} }
......
...@@ -31,8 +31,6 @@ static void init_dma_svwks(ide_hwif_t *, unsigned long); ...@@ -31,8 +31,6 @@ static void init_dma_svwks(ide_hwif_t *, unsigned long);
static ide_pci_device_t serverworks_chipsets[] __devinitdata = { static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_SERVERWORKS,
.device = PCI_DEVICE_ID_SERVERWORKS_OSB4IDE,
.name = "SvrWks OSB4", .name = "SvrWks OSB4",
.init_setup = init_setup_svwks, .init_setup = init_setup_svwks,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
...@@ -41,8 +39,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -41,8 +39,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_SERVERWORKS,
.device = PCI_DEVICE_ID_SERVERWORKS_CSB5IDE,
.name = "SvrWks CSB5", .name = "SvrWks CSB5",
.init_setup = init_setup_svwks, .init_setup = init_setup_svwks,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
...@@ -52,8 +48,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -52,8 +48,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_SERVERWORKS,
.device = PCI_DEVICE_ID_SERVERWORKS_CSB6IDE,
.name = "SvrWks CSB6", .name = "SvrWks CSB6",
.init_setup = init_setup_csb6, .init_setup = init_setup_csb6,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
...@@ -63,8 +57,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -63,8 +57,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 3 */ },{ /* 3 */
.vendor = PCI_VENDOR_ID_SERVERWORKS,
.device = PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2,
.name = "SvrWks CSB6", .name = "SvrWks CSB6",
.init_setup = init_setup_csb6, .init_setup = init_setup_csb6,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
......
...@@ -757,8 +757,6 @@ pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d) ...@@ -757,8 +757,6 @@ pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = { static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = {
{ {
/* Channel 0 */ /* Channel 0 */
.vendor = PCI_VENDOR_ID_SGI,
.device = PCI_DEVICE_ID_SGI_IOC4,
.name = "SGIIOC4", .name = "SGIIOC4",
.init_hwif = ide_init_sgiioc4, .init_hwif = ide_init_sgiioc4,
.init_dma = ide_dma_sgiioc4, .init_dma = ide_dma_sgiioc4,
...@@ -772,16 +770,7 @@ static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = { ...@@ -772,16 +770,7 @@ static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = {
static int __devinit static int __devinit
sgiioc4_init_one(struct pci_dev *dev, const struct pci_device_id *id) sgiioc4_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &sgiioc4_chipsets[id->driver_data]; pci_init_sgiioc4(dev, &sgiioc4_chipsets[id->driver_data]);
if (dev->device != d->device) {
printk(KERN_ERR "Error in %s(dev 0x%p | id 0x%p )\n",
__FUNCTION__, (void *) dev, (void *) id);
BUG();
}
if (pci_init_sgiioc4(dev, d))
return 0;
return 0; return 0;
} }
......
...@@ -1183,10 +1183,7 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif) ...@@ -1183,10 +1183,7 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &siimage_chipsets[id->driver_data]; ide_setup_pci_device(dev, &siimage_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -27,8 +27,6 @@ static void init_hwif_siimage(ide_hwif_t *); ...@@ -27,8 +27,6 @@ static void init_hwif_siimage(ide_hwif_t *);
static ide_pci_device_t siimage_chipsets[] __devinitdata = { static ide_pci_device_t siimage_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_SII_680,
.name = "SiI680", .name = "SiI680",
.init_chipset = init_chipset_siimage, .init_chipset = init_chipset_siimage,
.init_iops = init_iops_siimage, .init_iops = init_iops_siimage,
...@@ -37,8 +35,6 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = { ...@@ -37,8 +35,6 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_SII_3112,
.name = "SiI3112 Serial ATA", .name = "SiI3112 Serial ATA",
.init_chipset = init_chipset_siimage, .init_chipset = init_chipset_siimage,
.init_iops = init_iops_siimage, .init_iops = init_iops_siimage,
...@@ -47,8 +43,6 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = { ...@@ -47,8 +43,6 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = {
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_SII_1210SA,
.name = "Adaptec AAR-1210SA", .name = "Adaptec AAR-1210SA",
.init_chipset = init_chipset_siimage, .init_chipset = init_chipset_siimage,
.init_iops = init_iops_siimage, .init_iops = init_iops_siimage,
......
...@@ -946,10 +946,7 @@ static void __init init_hwif_sis5513 (ide_hwif_t *hwif) ...@@ -946,10 +946,7 @@ static void __init init_hwif_sis5513 (ide_hwif_t *hwif)
static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &sis5513_chipsets[id->driver_data]; ide_setup_pci_device(dev, &sis5513_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -12,8 +12,6 @@ static void init_hwif_sis5513(ide_hwif_t *); ...@@ -12,8 +12,6 @@ static void init_hwif_sis5513(ide_hwif_t *);
static ide_pci_device_t sis5513_chipsets[] __devinitdata = { static ide_pci_device_t sis5513_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_SI,
.device = PCI_DEVICE_ID_SI_5513,
.name = "SIS5513", .name = "SIS5513",
.init_chipset = init_chipset_sis5513, .init_chipset = init_chipset_sis5513,
.init_hwif = init_hwif_sis5513, .init_hwif = init_hwif_sis5513,
......
...@@ -483,10 +483,7 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif) ...@@ -483,10 +483,7 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &sl82c105_chipsets[id->driver_data]; ide_setup_pci_device(dev, &sl82c105_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -11,8 +11,6 @@ static void init_dma_sl82c105(ide_hwif_t *, unsigned long); ...@@ -11,8 +11,6 @@ static void init_dma_sl82c105(ide_hwif_t *, unsigned long);
static ide_pci_device_t sl82c105_chipsets[] __devinitdata = { static ide_pci_device_t sl82c105_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_WINBOND,
.device = PCI_DEVICE_ID_WINBOND_82C105,
.name = "W82C105", .name = "W82C105",
.init_chipset = init_chipset_sl82c105, .init_chipset = init_chipset_sl82c105,
.init_hwif = init_hwif_sl82c105, .init_hwif = init_hwif_sl82c105,
......
...@@ -366,10 +366,7 @@ static void __init init_hwif_slc90e66 (ide_hwif_t *hwif) ...@@ -366,10 +366,7 @@ static void __init init_hwif_slc90e66 (ide_hwif_t *hwif)
static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &slc90e66_chipsets[id->driver_data]; ide_setup_pci_device(dev, &slc90e66_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -14,8 +14,6 @@ static void init_hwif_slc90e66(ide_hwif_t *); ...@@ -14,8 +14,6 @@ static void init_hwif_slc90e66(ide_hwif_t *);
static ide_pci_device_t slc90e66_chipsets[] __devinitdata = { static ide_pci_device_t slc90e66_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_EFAR,
.device = PCI_DEVICE_ID_EFAR_SLC90E66_1,
.name = "SLC90E66", .name = "SLC90E66",
.init_chipset = init_chipset_slc90e66, .init_chipset = init_chipset_slc90e66,
.init_hwif = init_hwif_slc90e66, .init_hwif = init_hwif_slc90e66,
......
...@@ -220,13 +220,9 @@ static unsigned int __init init_chipset_triflex(struct pci_dev *dev, ...@@ -220,13 +220,9 @@ static unsigned int __init init_chipset_triflex(struct pci_dev *dev,
static int __devinit triflex_init_one(struct pci_dev *dev, static int __devinit triflex_init_one(struct pci_dev *dev,
const struct pci_device_id *id) const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &triflex_devices[id->driver_data]; ide_setup_pci_device(dev, &triflex_devices[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
triflex_dev = dev; triflex_dev = dev;
return 0; return 0;
} }
......
...@@ -17,8 +17,6 @@ static void init_hwif_triflex(ide_hwif_t *); ...@@ -17,8 +17,6 @@ static void init_hwif_triflex(ide_hwif_t *);
static ide_pci_device_t triflex_devices[] __devinitdata = { static ide_pci_device_t triflex_devices[] __devinitdata = {
{ {
.vendor = PCI_VENDOR_ID_COMPAQ,
.device = PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE,
.name = "TRIFLEX", .name = "TRIFLEX",
.init_chipset = init_chipset_triflex, .init_chipset = init_chipset_triflex,
.init_hwif = init_hwif_triflex, .init_hwif = init_hwif_triflex,
......
...@@ -397,10 +397,7 @@ void __init init_hwif_trm290 (ide_hwif_t *hwif) ...@@ -397,10 +397,7 @@ void __init init_hwif_trm290 (ide_hwif_t *hwif)
static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &trm290_chipsets[id->driver_data]; ide_setup_pci_device(dev, &trm290_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
......
...@@ -9,8 +9,6 @@ extern void init_hwif_trm290(ide_hwif_t *); ...@@ -9,8 +9,6 @@ extern void init_hwif_trm290(ide_hwif_t *);
static ide_pci_device_t trm290_chipsets[] __devinitdata = { static ide_pci_device_t trm290_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_TEKRAM,
.device = PCI_DEVICE_ID_TEKRAM_DC290,
.name = "TRM290", .name = "TRM290",
.init_hwif = init_hwif_trm290, .init_hwif = init_hwif_trm290,
.channels = 2, .channels = 2,
......
...@@ -609,16 +609,13 @@ static void __init init_hwif_via82cxxx(ide_hwif_t *hwif) ...@@ -609,16 +609,13 @@ static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &via82cxxx_chipsets[id->driver_data]; ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
} }
static struct pci_device_id via_pci_tbl[] = { static struct pci_device_id via_pci_tbl[] = {
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, }, { 0, },
}; };
MODULE_DEVICE_TABLE(pci, via_pci_tbl); MODULE_DEVICE_TABLE(pci, via_pci_tbl);
......
...@@ -12,18 +12,6 @@ static void init_hwif_via82cxxx(ide_hwif_t *); ...@@ -12,18 +12,6 @@ static void init_hwif_via82cxxx(ide_hwif_t *);
static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_82C576_1,
.name = "VP_IDE",
.init_chipset = init_chipset_via82cxxx,
.init_hwif = init_hwif_via82cxxx,
.channels = 2,
.autodma = NOAUTODMA,
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD,
},{ /* 1 */
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_82C586_1,
.name = "VP_IDE", .name = "VP_IDE",
.init_chipset = init_chipset_via82cxxx, .init_chipset = init_chipset_via82cxxx,
.init_hwif = init_hwif_via82cxxx, .init_hwif = init_hwif_via82cxxx,
......
...@@ -285,14 +285,8 @@ static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif) ...@@ -285,14 +285,8 @@ static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif)
void ide_setup_pci_noise (struct pci_dev *dev, ide_pci_device_t *d) void ide_setup_pci_noise (struct pci_dev *dev, ide_pci_device_t *d)
{ {
if ((d->vendor != dev->vendor) && (d->device != dev->device)) { printk(KERN_INFO "%s: IDE controller at PCI slot %s\n",
printk(KERN_INFO "%s: unknown IDE controller at PCI slot " d->name, pci_name(dev));
"%s, VID=%04x, DID=%04x\n",
d->name, pci_name(dev), dev->vendor, dev->device);
} else {
printk(KERN_INFO "%s: IDE controller at PCI slot %s\n",
d->name, pci_name(dev));
}
} }
EXPORT_SYMBOL_GPL(ide_setup_pci_noise); EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
...@@ -422,8 +416,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ...@@ -422,8 +416,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
unsigned long ctl = 0, base = 0; unsigned long ctl = 0, base = 0;
ide_hwif_t *hwif; ide_hwif_t *hwif;
if(!d->isa_ports) if ((d->flags & IDEPCI_FLAG_ISA_PORTS) == 0) {
{
/* Possibly we should fail if these checks report true */ /* Possibly we should fail if these checks report true */
ide_pci_check_iomem(dev, d, 2*port); ide_pci_check_iomem(dev, d, 2*port);
ide_pci_check_iomem(dev, d, 2*port+1); ide_pci_check_iomem(dev, d, 2*port+1);
...@@ -495,9 +488,7 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi ...@@ -495,9 +488,7 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
* Set up BM-DMA capability * Set up BM-DMA capability
* (PnP BIOS should have done this) * (PnP BIOS should have done this)
*/ */
if (!((d->device == PCI_DEVICE_ID_CYRIX_5530_IDE && d->vendor == PCI_VENDOR_ID_CYRIX) if ((d->flags & IDEPCI_FLAG_FORCE_MASTER) == 0) {
||(d->device == PCI_DEVICE_ID_NS_SCx200_IDE && d->vendor == PCI_VENDOR_ID_NS)))
{
/* /*
* default DMA off if we had to * default DMA off if we had to
* configure it here * configure it here
...@@ -613,9 +604,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int autodma, ...@@ -613,9 +604,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int autodma,
* by the bios for raid purposes. * by the bios for raid purposes.
* Skip the normal "is it enabled" test for those. * Skip the normal "is it enabled" test for those.
*/ */
if (((d->vendor == PCI_VENDOR_ID_PROMISE) && if ((d->flags & IDEPCI_FLAG_FORCE_PDC) &&
((d->device == PCI_DEVICE_ID_PROMISE_20262) ||
(d->device == PCI_DEVICE_ID_PROMISE_20265))) &&
(secondpdc++==1) && (port==1)) (secondpdc++==1) && (port==1))
goto controller_ok; goto controller_ok;
......
...@@ -1552,9 +1552,15 @@ typedef struct ide_pci_enablebit_s { ...@@ -1552,9 +1552,15 @@ typedef struct ide_pci_enablebit_s {
u8 val; /* value of masked reg when "enabled" */ u8 val; /* value of masked reg when "enabled" */
} ide_pci_enablebit_t; } ide_pci_enablebit_t;
enum {
/* Uses ISA control ports not PCI ones. */
IDEPCI_FLAG_ISA_PORTS = (1 << 0),
IDEPCI_FLAG_FORCE_MASTER = (1 << 1),
IDEPCI_FLAG_FORCE_PDC = (1 << 2),
};
typedef struct ide_pci_device_s { typedef struct ide_pci_device_s {
u16 vendor;
u16 device;
char *name; char *name;
void (*init_setup)(struct pci_dev *, struct ide_pci_device_s *); void (*init_setup)(struct pci_dev *, struct ide_pci_device_s *);
void (*init_setup_dma)(struct pci_dev *, struct ide_pci_device_s *, ide_hwif_t *); void (*init_setup_dma)(struct pci_dev *, struct ide_pci_device_s *, ide_hwif_t *);
...@@ -1568,7 +1574,7 @@ typedef struct ide_pci_device_s { ...@@ -1568,7 +1574,7 @@ typedef struct ide_pci_device_s {
u8 bootable; u8 bootable;
unsigned int extra; unsigned int extra;
struct ide_pci_device_s *next; struct ide_pci_device_s *next;
u8 isa_ports; /* Uses ISA control ports not PCI ones */ u8 flags;
} ide_pci_device_t; } ide_pci_device_t;
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment