ide: include PCI device name in messages from IDE PCI host drivers
PATCH 1/5 ide: include PCI device name in messages from IDE PCI host drivers
While at it:
* Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc).
* Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO.
* Move printk() call from ide_pci_clear_simplex() to the caller.
* Cleanup do_ide_setup_pci_device() a bit.
* amd74xx.c: remove superfluous PCI device revision information.
* hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO.
* pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO.
* pdc202xx_old.c: fix driver message in pdc202xx_init_one().
* via82cxxx.c: fix driver warning message in via_init_one().
---
against ide tree
drivers/ide/pci/amd74xx.c | 11 ++-- drivers/ide/pci/generic.c | 4 - drivers/ide/pci/hpt366.c | 31 +++++++----- drivers/ide/pci/it821x.c | 11 ++-- drivers/ide/pci/pdc202xx_new.c | 21 ++++---- drivers/ide/pci/pdc202xx_old.c | 9 ++- drivers/ide/pci/serverworks.c | 3 - drivers/ide/pci/siimage.c | 7 +- drivers/ide/pci/sis5513.c | 17 ++++--- drivers/ide/pci/trm290.c | 4 - drivers/ide/pci/via82cxxx.c | 13 ++--- drivers/ide/setup-pci.c | 99 +++++++++++++++++++++++------------------ 12 files changed, 131 insertions(+), 99 deletions(-)
drivers/ide/pci/amd74xx.c +5 -6
@@ -129,9 +129,9 @@ static void __devinit amd7411_cable_dete amd_80w = ((t &0x3 ) ?1 :0 ) | ((t &0xc ) ?2 :0 );for (i =24 ; i >=0 ; i -=8 )if (((u >> i) &4 ) && !(amd_80w & (1 << (1 - (i >>4 ))))) { -printk (KERN_WARNING "%s: BIOS didn't set cable bits " -"correctly. Enabling workaround.\n" , - name); +printk (KERN_WARNING "%s %s: BIOS didn't set cable bits " +"correctly. Enabling workaround.\n" , + name,pci_name (dev)); amd_80w |= (1 << (1 - (i >>4 ))); } }
@@ -280,9 +280,8 @@ static int __devinit amd74xx_probe(struc d.udma_mask =ATA_UDMA5 ; } -printk (KERN_INFO "%s: %s (rev %02x) UDMA%s controller\n" , - d.name,pci_name (dev), dev->revision, - amd_dma[fls (d.udma_mask) -1 ]); +printk (KERN_INFO "%s %s: UDMA%s controller\n" , + d.name,pci_name (dev), amd_dma[fls (d.udma_mask) -1 ]);/* * Determine the system bus clock.
drivers/ide/pci/generic.c +2 -2
@@ -134,8 +134,8 @@ static int __devinit generic_init_one(stu16 command;pci_read_config_word (dev,PCI_COMMAND , &command);if (!(command &PCI_COMMAND_IO )) { -printk (KERN_INFO "Skipping disabled %s IDE " -"controller.\n" , d->name); +printk (KERN_INFO "%s %s: skipping disabled " +"controller\n" , d->name,pci_name (dev)); goto out; } }
drivers/ide/pci/hpt366.c +19 -12
@@ -1044,8 +1044,8 @@ static unsigned int __devinit init_chipsif ((temp &0xFFFFF000 ) !=0xABCDE000 ) {int i; -printk (KERN_WARNING "%s: no clock data saved by BIOS\n" , - name); +printk (KERN_WARNING "%s %s: no clock data saved by " +"BIOS\n" , name,pci_name (dev));/* Calculate the average value of f_CNT. */ for (temp = i =0 ; i <128 ; i++) {
@@ -1070,8 +1070,9 @@ static unsigned int __devinit init_chipselse pci_clk =66 ; -printk (KERN_INFO "%s: DPLL base: %d MHz, f_CNT: %d, " -"assuming %d MHz PCI\n" , name, dpll_clk, f_cnt, pci_clk); +printk (KERN_INFO "%s %s: DPLL base: %d MHz, f_CNT: %d, " +"assuming %d MHz PCI\n" , name,pci_name (dev), + dpll_clk, f_cnt, pci_clk); }else {u32 itr1 =0 ;
@@ -1137,7 +1138,8 @@ static unsigned int __devinit init_chips }if (info->timings->clock_table[clock] ==NULL ) { -printk (KERN_ERR "%s: unknown bus timing!\n" , name); +printk (KERN_ERR "%s %s: unknown bus timing!\n" , + name,pci_name (dev));return -EIO ; }
@@ -1163,16 +1165,19 @@ static unsigned int __devinit init_chips f_low += adjust >>1 ; }if (adjust ==8 ) { -printk (KERN_ERR "%s: DPLL did not stabilize!\n" , name); +printk (KERN_ERR "%s %s: DPLL did not stabilize!\n" , + name,pci_name (dev));return -EIO ; } -printk ("%s: using %d MHz DPLL clock\n" , name, dpll_clk); +printk (KERN_INFO "%s %s: using %d MHz DPLL clock\n" , + name,pci_name (dev), dpll_clk); }else {/* Mark the fact that we're not using the DPLL. */ dpll_clk =0 ; -printk ("%s: using %d MHz PCI clock\n" , name, pci_clk); +printk (KERN_INFO "%s %s: using %d MHz PCI clock\n" , + name,pci_name (dev), pci_clk); }/* Store the clock frequencies. */
@@ -1357,7 +1362,8 @@ static void __devinit hpt374_init(structif (dev2->irq != dev->irq) {/* FIXME: we need a core pci_set_interrupt() */ dev2->irq = dev->irq; -printk (KERN_INFO "HPT374: PCI config space interrupt fixed\n" ); +printk (KERN_INFO "HPT374 %s: PCI config space interrupt " +"fixed\n" ,pci_name (dev2)); } }
@@ -1392,8 +1398,8 @@ static int __devinit hpt36x_init(structpci_read_config_byte (dev2,PCI_INTERRUPT_PIN , &pin2);if (pin1 != pin2 && dev->irq == dev2->irq) { -printk (KERN_INFO "HPT36x: onboard version of chipset, " -"pin1=%d pin2=%d\n" , pin1, pin2); +printk (KERN_INFO "HPT36x %s: onboard version of chipset, " +"pin1=%d pin2=%d\n" ,pci_name (dev), pin1, pin2);return 1 ; }
@@ -1591,7 +1597,8 @@ static int __devinit hpt366_init_one(str dyn_info =kzalloc (sizeof (*dyn_info) * (dev2 ?2 :1 ),GFP_KERNEL );if (dyn_info ==NULL ) { -printk (KERN_ERR "%s: out of memory!\n" , d.name); +printk (KERN_ERR "%s %s: out of memory!\n" , + d.name,pci_name (dev));pci_dev_put (dev2);return -ENOMEM ; }
drivers/ide/pci/it821x.c +7 -4
@@ -563,7 +563,8 @@ static void __devinit init_hwif_it821x(i idev->timing10 =1 ; hwif->host_flags |=IDE_HFLAG_NO_ATAPI_DMA ;if (idev->smart ==0 ) -printk (KERN_WARNING "it821x: Revision 0x10, workarounds activated.\n" ); +printk (KERN_WARNING "it821x %s: revision 0x10, " +"workarounds activated\n" ,pci_name (dev)); }if (idev->smart ==0 ) {
@@ -603,11 +604,13 @@ static unsigned int __devinit init_chips/* Force the card into bypass mode if so requested */ if (it8212_noraid) { -printk (KERN_INFO "it8212: forcing bypass mode.\n" ); +printk (KERN_INFO "it821x %s: forcing bypass mode\n" , +pci_name (dev));it8212_disable_raid (dev); }pci_read_config_byte (dev,0x50 , &conf); -printk (KERN_INFO "it821x: controller in %s mode.\n" , mode[conf &1 ]); +printk (KERN_INFO "it821x %s: controller in %s mode\n" , +pci_name (dev), mode[conf &1 ]);return 0 ; }
@@ -648,7 +651,7 @@ static int __devinit it821x_init_one(str itdevs =kzalloc (2 *sizeof (*itdevs),GFP_KERNEL );if (itdevs ==NULL ) { -printk (KERN_ERR "it821x: out of memory\n" ); +printk (KERN_ERR "it821x %s: out of memory\n" ,pci_name (dev));return -ENOMEM ; }
drivers/ide/pci/pdc202xx_new.c +12 -9
@@ -358,12 +358,13 @@ static unsigned int __devinit init_chips* registers setting. */ pll_input =detect_pll_input_clock (dma_base); -printk ("%s: PLL input clock is %ld kHz\n" , name, pll_input /1000 ); +printk (KERN_INFO "%s %s: PLL input clock is %ld kHz\n" , + name,pci_name (dev), pll_input /1000 );/* Sanity check */ if (unlikely (pll_input <5000000L || pll_input >70000000L )) { -printk (KERN_ERR "%s: Bad PLL input clock %ld Hz, giving up!\n" , - name, pll_input); +printk (KERN_ERR "%s %s: Bad PLL input clock %ld Hz, giving up!" +"\n" , name,pci_name (dev), pll_input); goto out; }
@@ -399,7 +400,8 @@ static unsigned int __devinit init_chips r =0x00 ; }else {/* Invalid ratio */ -printk (KERN_ERR "%s: Bad ratio %ld, giving up!\n" , name, ratio); +printk (KERN_ERR "%s %s: Bad ratio %ld, giving up!\n" , + name,pci_name (dev), ratio); goto out; }
@@ -409,7 +411,8 @@ static unsigned int __devinit init_chipsif (unlikely (f <0 || f >127 )) {/* Invalid F */ -printk (KERN_ERR "%s: F[%d] invalid!\n" , name, f); +printk (KERN_ERR "%s %s: F[%d] invalid!\n" , + name,pci_name (dev), f); goto out; }
@@ -455,8 +458,8 @@ static struct pci_dev * __devinit pdc202if (dev2->irq != dev->irq) { dev2->irq = dev->irq; -printk (KERN_INFO "PDC20270: PCI config space " -"interrupt fixed\n" ); +printk (KERN_INFO "PDC20270 %s: PCI config space " +"interrupt fixed\n" ,pci_name (dev)); }return dev2;
@@ -535,8 +538,8 @@ static int __devinit pdc202new_init_one( bridge->vendor == PCI_VENDOR_ID_INTEL && (bridge->device == PCI_DEVICE_ID_INTEL_I960 || bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { -printk (KERN_INFO "PDC20276: attached to I2O RAID controller, " -"skipping\n" ); +printk (KERN_INFO "PDC20276 %s: attached to I2O RAID controller," +" skipping\n" ,pci_name (dev));return -ENODEV ; }
drivers/ide/pci/pdc202xx_old.c +5 -4
@@ -304,8 +304,8 @@ static void __devinit pdc202ata4_fixup_iif (irq != irq2) {pci_write_config_byte (dev, (PCI_INTERRUPT_LINE )|0x80 , irq);/* 0xbc */ -printk (KERN_INFO "%s: PCI config space interrupt " -"mirror fixed\n" , name); +printk (KERN_INFO "%s %s: PCI config space interrupt " +"mirror fixed\n" , name,pci_name (dev)); } } }
@@ -406,8 +406,9 @@ static int __devinit pdc202xx_init_one(s bridge->vendor == PCI_VENDOR_ID_INTEL && (bridge->device == PCI_DEVICE_ID_INTEL_I960 || bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { -printk (KERN_INFO "ide: Skipping Promise PDC20265 " -"attached to I2O RAID controller\n" ); +printk (KERN_INFO "pdc202xx_old %s: skipping Promise " +"PDC20265 attached to I2O RAID controller\n" , +pci_name (dev));return -ENODEV ; } }
drivers/ide/pci/serverworks.c +2 -1
@@ -188,7 +188,8 @@ static unsigned int __devinit init_chipspci_read_config_dword (isa_dev,0x64 , ®); reg &= ~0x00002000 ;/* disable 600ns interrupt mask */ if (!(reg &0x00004000 )) -printk (KERN_DEBUG "%s: UDMA not BIOS enabled.\n" , name); +printk (KERN_DEBUG "%s %s: UDMA not BIOS " +"enabled.\n" , name,pci_name (dev)); reg |=0x00004000 ;/* enable UDMA/33 support */ pci_write_config_dword (isa_dev,0x64 , reg); }
drivers/ide/pci/siimage.c +4 -3
@@ -539,7 +539,8 @@ static unsigned int __devinit init_chips { "== 100", "== 133", "== 2X PCI", "DISABLED!" }; tmp >>=4 ; -printk (KERN_INFO "%s: BASE CLOCK %s\n" , name, clk_str[tmp &3 ]); +printk (KERN_INFO "%s %s: BASE CLOCK %s\n" , + name,pci_name (dev), clk_str[tmp &3 ]); }return 0 ;
@@ -779,8 +780,8 @@ static int __devinit siimage_init_one(st* seem to get terminally confused in the PCI spaces. */ if (!request_mem_region (bar5, barsize, d.name)) { -printk (KERN_WARNING "siimage: IDE controller MMIO " -"ports not available.\n" ); +printk (KERN_WARNING "siimage %s: MMIO ports not " +"available\n" ,pci_name (dev)); }else { ioaddr =ioremap (bar5, barsize);if (ioaddr ==NULL )
drivers/ide/pci/sis5513.c +11 -6
@@ -380,8 +380,9 @@ static int __devinit sis_find_family(str }pci_dev_put (host); -printk (KERN_INFO "SIS5513: %s %s controller\n" , - SiSHostChipInfo[i].name, chipset_capability[chipset_family]); +printk (KERN_INFO "SIS5513 %s: %s %s controller\n" , +pci_name (dev), SiSHostChipInfo[i].name, + chipset_capability[chipset_family]); }if (!chipset_family) {/* Belongs to pci-quirks */
@@ -396,7 +397,8 @@ static int __devinit sis_find_family(strpci_write_config_dword (dev,0x54 , idemisc);if (trueid ==0x5518 ) { -printk (KERN_INFO "SIS5513: SiS 962/963 MuTIOL IDE UDMA133 controller\n" ); +printk (KERN_INFO "SIS5513 %s: SiS 962/963 MuTIOL IDE UDMA133 controller\n" , +pci_name (dev)); chipset_family =ATA_133 ;/* Check for 5513 compability mapping
@@ -405,7 +407,8 @@ static int __devinit sis_find_family(str*/ if ((idemisc &0x40000000 ) ==0 ) {pci_write_config_dword (dev,0x54 , idemisc |0x40000000 ); -printk (KERN_INFO "SIS5513: Switching to 5513 register mapping\n" ); +printk (KERN_INFO "SIS5513 %s: Switching to 5513 register mapping\n" , +pci_name (dev)); } } }
@@ -429,10 +432,12 @@ static int __devinit sis_find_family(strpci_dev_put (lpc_bridge);if (lpc_bridge->revision ==0x10 && (prefctl &0x80 )) { -printk (KERN_INFO "SIS5513: SiS 961B MuTIOL IDE UDMA133 controller\n" ); +printk (KERN_INFO "SIS5513 %s: SiS 961B MuTIOL IDE UDMA133 controller\n" , +pci_name (dev)); chipset_family = ATA_133a; }else { -printk (KERN_INFO "SIS5513: SiS 961 MuTIOL IDE UDMA100 controller\n" ); +printk (KERN_INFO "SIS5513 %s: SiS 961 MuTIOL IDE UDMA100 controller\n" , +pci_name (dev)); chipset_family =ATA_100 ; } }
drivers/ide/pci/trm290.c +2 -2
@@ -245,10 +245,10 @@ static void __devinit init_hwif_trm290(iu8 reg =0 ;if ((dev->class &5 ) && cfg_base) -printk (KERN_INFO "TRM290: chip" ); +printk (KERN_INFO "TRM290 %s: chip" ,pci_name (dev));else { cfg_base =0x3df0 ; -printk (KERN_INFO "TRM290: using default" ); +printk (KERN_INFO "TRM290 %s: using default" ,pci_name (dev)); }printk (KERN_CONT " config base at 0x%04x\n" , cfg_base); hwif->config_data = cfg_base;
drivers/ide/pci/via82cxxx.c +6 -7
@@ -401,20 +401,19 @@ static int __devinit via_init_one(struct*/ via_config =via_config_find (&isa);if (!via_config->id) { -printk (KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n" ); +printk (KERN_WARNING "VP_IDE %s: unknown chipset, skipping\n" , +pci_name (dev));return -ENODEV ; }/* * Print the boot message. */ -printk (KERN_INFO "VP_IDE: VIA %s (rev %02x) IDE %sDMA%s " -"controller on pci%s\n" , - via_config->name, isa->revision, +printk (KERN_INFO "VP_IDE %s: VIA %s (rev %02x) IDE %sDMA%s\n" , +pci_name (dev), via_config->name, isa->revision, via_config->udma_mask ?"U" :"MW" , via_dma[via_config->udma_mask ? - (fls (via_config->udma_mask) -1 ) :0 ], -pci_name (dev)); + (fls (via_config->udma_mask) -1 ) :0 ]);pci_dev_put (isa);
@@ -454,7 +453,7 @@ static int __devinit via_init_one(struct vdev =kzalloc (sizeof (*vdev),GFP_KERNEL );if (!vdev) { -printk (KERN_ERR "VP_IDE: out of memory :(\n" ); +printk (KERN_ERR "VP_IDE %s: out of memory :(\n" ,pci_name (dev));return -ENOMEM ; }
drivers/ide/setup-pci.c +56 -43
226 lines not on this page · raw message
PATCH 2/5 it8213: remove DECLARE_ITE_DEV() macro
While at it:
* it8213_chipsets[] -> it8213_chipset.
--- drivers/ide/pci/it8213.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-)
drivers/ide/pci/it8213.c +10 -16
@@ -155,23 +155,17 @@ static const struct ide_port_ops it8213_ .cable_detect = it8213_cable_detect, }; -#define DECLARE_ITE_DEV (name_str) \ - { \ - .name = name_str, \ - .enablebits = { {0x41, 0x80, 0x80} }, \ - .port_ops = &it8213_port_ops, \ - .host_flags = IDE_HFLAG_SINGLE, \ - .pio_mask = ATA_PIO4, \ - .swdma_mask = ATA_SWDMA2_ONLY, \ - .mwdma_mask = ATA_MWDMA12_ONLY, \ - .udma_mask = ATA_UDMA6, \ - } - -static const struct ide_port_info it8213_chipsets[]__devinitdata = { -/* 0 */ DECLARE_ITE_DEV ("IT8213" ), +static const struct ide_port_info it8213_chipset__devinitdata = { + .name ="IT8213" , + .enablebits = { {0x41 ,0x80 ,0x80 } }, + .port_ops = &it8213_port_ops, + .host_flags =IDE_HFLAG_SINGLE , + .pio_mask =ATA_PIO4 , + .swdma_mask =ATA_SWDMA2_ONLY , + .mwdma_mask =ATA_MWDMA12_ONLY , + .udma_mask =ATA_UDMA6 , }; -/** * it8213_init_one - pci layer discovery entry * @dev: PCI device
@@ -184,7 +178,7 @@ static const struct ide_port_info it8213static int __devinit it8213_init_one (struct pci_dev *dev,const struct pci_device_id *id) { -return ide_pci_init_one (dev, &it8213_chipsets[id->driver_data],NULL ); +return ide_pci_init_one (dev, &it8213_chipset,NULL ); }static const struct pci_device_id it8213_pci_tbl[] = {
PATCH 3/5 it821x: remove DECLARE_ITE_DEV() macro
In reply to Bartlomiej ZolnierkiewiczWhile at it:
* it821x_chipsets[] -> it821x_chipset.
* Fix it821x_chipset's name field (as it is used for IT8211/8212).
--- drivers/ide/pci/it821x.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
drivers/ide/pci/it821x.c +7 -12
@@ -622,17 +622,12 @@ static const struct ide_port_ops it821x_ .cable_detect = it821x_cable_detect, }; -#define DECLARE_ITE_DEV (name_str) \ - { \ - .name = name_str, \ - .init_chipset = init_chipset_it821x, \ - .init_hwif = init_hwif_it821x, \ - .port_ops = &it821x_port_ops, \ - .pio_mask = ATA_PIO4, \ - } - -static const struct ide_port_info it821x_chipsets[]__devinitdata = { -/* 0 */ DECLARE_ITE_DEV ("IT8212" ), +static const struct ide_port_info it821x_chipset__devinitdata = { + .name ="IT821X" , + .init_chipset = init_chipset_it821x, + .init_hwif = init_hwif_it821x, + .port_ops = &it821x_port_ops, + .pio_mask =ATA_PIO4 , };/**
@@ -655,7 +650,7 @@ static int __devinit it821x_init_one(strreturn -ENOMEM ; } - rc =ide_pci_init_one (dev, &it821x_chipsets[id->driver_data], itdevs); + rc =ide_pci_init_one (dev, &it821x_chipset, itdevs);if (rc)kfree (itdevs);
PATCH 4/5 ide: prefix messages from IDE PCI host drivers by driver name
In reply to Bartlomiej ZolnierkiewiczPrefix messages from IDE PCI host drivers by driver name instead of marketed chipset name (it is still possible to exactly identify the particular chipset basing on driver messages).
As a bonus this provides nice code savings for some drivers:
text data bss dec hex filename
3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before
2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after
764 108 0 872 368 drivers/ide/pci/cs5520.o.before
680 108 0 788 314 drivers/ide/pci/cs5520.o.after
1680 112 4 1796 704 drivers/ide/pci/generic.o.before
1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after
7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before
6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after
2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before
2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after
2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before
2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after
3776 112 4 3892 f34 drivers/ide/pci/piix.o.before
2804 112 4 2920 b68 drivers/ide/pci/piix.o.after
4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before
4600 116 0 4716 126c drivers/ide/pci/siimage.o.after--- drivers/ide/pci/aec62xx.c | 29 ++++++----- drivers/ide/pci/alim15x3.c | 4 + drivers/ide/pci/amd74xx.c | 84 +++++++++++++------------------- drivers/ide/pci/atiixp.c | 11 ++-- drivers/ide/pci/cmd64x.c | 21 +++++--- drivers/ide/pci/cs5520.c | 24 +++------ drivers/ide/pci/cs5530.c | 4 + drivers/ide/pci/cs5535.c | 4 + drivers/ide/pci/cy82c693.c | 4 + drivers/ide/pci/generic.c | 63 +++++++++++------------- drivers/ide/pci/hpt34x.c | 10 ++- drivers/ide/pci/hpt366.c | 65 ++++--------------------- drivers/ide/pci/it8213.c | 4 + drivers/ide/pci/it821x.c | 12 ++-- drivers/ide/pci/jmicron.c | 4 + drivers/ide/pci/ns87415.c | 4 + drivers/ide/pci/opti621.c | 4 + drivers/ide/pci/pdc202xx_new.c | 38 ++++++-------- drivers/ide/pci/pdc202xx_old.c | 30 ++++++----- drivers/ide/pci/piix.c | 106 ++++++++++++++++++----------------------- drivers/ide/pci/rz1000.c | 4 + drivers/ide/pci/sc1200.c | 4 + drivers/ide/pci/serverworks.c | 26 ++++++---- drivers/ide/pci/siimage.c | 17 +++--- drivers/ide/pci/sis5513.c | 14 +++-- drivers/ide/pci/sl82c105.c | 6 +- drivers/ide/pci/slc90e66.c | 4 + drivers/ide/pci/tc86c001.c | 4 - drivers/ide/pci/triflex.c | 4 + drivers/ide/pci/trm290.c | 8 +-- drivers/ide/pci/via82cxxx.c | 15 +++-- 31 files changed, 306 insertions(+), 325 deletions(-)
drivers/ide/pci/aec62xx.c +18 -11
@@ -13,6 +13,8 @@#include <asm/io.h> +#define DRV_NAME "aec62xx" +struct chipset_bus_clock_list_entry {u8 xfer_speed;u8 chipset_settings;
@@ -180,8 +182,8 @@ static const struct ide_port_ops atp86x_ };static const struct ide_port_info aec62xx_chipsets[]__devinitdata = { - {/* 0 */ - .name ="AEC6210" , + {/* 0: AEC6210 */ + .name =DRV_NAME , .init_chipset = init_chipset_aec62xx, .enablebits = {{0x4a ,0x02 ,0x02 }, {0x4a ,0x04 ,0x04 }}, .port_ops = &atp850_port_ops,
@@ -192,8 +194,9 @@ static const struct ide_port_info aec62x .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA2, - },{ /* 1 */ - .name = "AEC6260", + }, + {/* 1: AEC6260 */ + .name = DRV_NAME, .init_chipset = init_chipset_aec62xx, .port_ops = &atp86x_port_ops, .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA |
@@ -201,8 +204,9 @@ static const struct ide_port_info aec62x .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4, - },{ /* 2 */ - .name = "AEC6260R", + }, + {/* 2: AEC6260R */ + .name = DRV_NAME, .init_chipset = init_chipset_aec62xx, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .port_ops = &atp86x_port_ops,
@@ -211,8 +215,9 @@ static const struct ide_port_info aec62x .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4, - },{ /* 3 */ - .name = "AEC6280", + }, + {/* 3: AEC6280 */ + .name = DRV_NAME, .init_chipset = init_chipset_aec62xx, .port_ops = &atp86x_port_ops, .host_flags = IDE_HFLAG_NO_ATAPI_DMA |
@@ -220,8 +225,9 @@ static const struct ide_port_info aec62x .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5, - },{ /* 4 */ - .name = "AEC6280R", + }, + {/* 4: AEC6280R */ + .name = DRV_NAME, .init_chipset = init_chipset_aec62xx, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .port_ops = &atp86x_port_ops,
@@ -268,7 +274,8 @@ static int __devinit aec62xx_init_one(stunsigned long dma_base =pci_resource_start (dev,4 );if (inb (dma_base +2 ) &0x10 ) { - d.name = (idx ==4 ) ?"AEC6880R" :"AEC6880" ; + printk(KERN_INFO DRV_NAME " %s: AEC6880%s card detected" + "\n", pci_name(dev), (idx == 4) ? "R" : ""); d.udma_mask =ATA_UDMA6 ; } }
drivers/ide/pci/alim15x3.c +3 -1
@@ -38,6 +38,8 @@#include <asm/io.h> +#define DRV_NAME "alim15x3" +/* * Allow UDMA on M1543C-E chipset for WDC disks that ignore CRC checking * (this is DANGEROUS and could result in data corruption).
@@ -515,7 +517,7 @@ static const struct ide_dma_ops ali_dma_ };static const struct ide_port_info ali15x3_chipset__devinitdata = { - .name ="ALI15X3" , + .name =DRV_NAME , .init_chipset = init_chipset_ali15x3, .init_hwif = init_hwif_ali15x3, .init_dma = init_dma_ali15x3,
drivers/ide/pci/amd74xx.c +35 -49
127 lines not on this page · raw message
drivers/ide/pci/atiixp.c +7 -4
@@ -11,6 +11,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "atiixp" +#define ATIIXP_IDE_PIO_TIMING 0x40#define ATIIXP_IDE_MDMA_TIMING 0x44#define ATIIXP_IDE_PIO_CONTROL 0x48
@@ -137,16 +139,17 @@ static const struct ide_port_ops atiixp_ };static const struct ide_port_info atiixp_pci_info[]__devinitdata = { - {/* 0 */ - .name ="ATIIXP" , + {/* 0: IXP200/300/400/700 */ + .name =DRV_NAME , .enablebits = {{0x48 ,0x01 ,0x00 }, {0x48 ,0x08 ,0x00 }}, .port_ops = &atiixp_port_ops, .host_flags =IDE_HFLAG_LEGACY_IRQS , .pio_mask =ATA_PIO4 , .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , - },{/* 1 */ - .name ="SB600_PATA" , + }, + {/* 1: IXP600 */ + .name =DRV_NAME , .enablebits = {{0x48 ,0x01 ,0x00 }, {0x00 ,0x00 ,0x00 }}, .port_ops = &atiixp_port_ops, .host_flags =IDE_HFLAG_SINGLE |IDE_HFLAG_LEGACY_IRQS ,
drivers/ide/pci/cmd64x.c +13 -8
@@ -19,6 +19,8 @@#include <asm/io.h> +#define DRV_NAME "cmd64x" +#define CMD_DEBUG 0#if CMD_DEBUG
@@ -407,8 +409,8 @@ static const struct ide_dma_ops cmd648_d };static const struct ide_port_info cmd64x_chipsets[]__devinitdata = { - {/* 0 */ - .name ="CMD643" , + {/* 0: CMD643 */ + .name =DRV_NAME , .init_chipset = init_chipset_cmd64x, .enablebits = {{0x00 ,0x00 ,0x00 }, {0x51 ,0x08 ,0x08 }}, .port_ops = &cmd64x_port_ops,
@@ -418,8 +420,9 @@ static const struct ide_port_info cmd64x .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = 0x00, /* no udma */ - },{ /* 1 */ - .name = "CMD646", + }, + {/* 1: CMD646 */ + .name = DRV_NAME, .init_chipset = init_chipset_cmd64x, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .chipset = ide_cmd646,
@@ -429,8 +432,9 @@ static const struct ide_port_info cmd64x .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA2, - },{ /* 2 */ - .name = "CMD648", + }, + {/* 2: CMD648 */ + .name = DRV_NAME, .init_chipset = init_chipset_cmd64x, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .port_ops = &cmd64x_port_ops,
@@ -439,8 +443,9 @@ static const struct ide_port_info cmd64x .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4, - },{ /* 3 */ - .name = "CMD649", + }, + {/* 3: CMD649 */ + .name = DRV_NAME, .init_chipset = init_chipset_cmd64x, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .port_ops = &cmd64x_port_ops,
drivers/ide/pci/cs5520.c +10 -14
@@ -41,6 +41,8 @@#include <linux/ide.h> #include <linux/dma-mapping.h> +#define DRV_NAME "cs5520" +struct pio_clocks {int address;
@@ -92,18 +94,11 @@ static const struct ide_port_ops cs5520_ .set_dma_mode = cs5520_set_dma_mode, }; -#define DECLARE_CS_DEV (name_str) \ - { \ - .name = name_str, \ - .port_ops = &cs5520_port_ops, \ - .host_flags = IDE_HFLAG_ISA_PORTS | \ - IDE_HFLAG_CS5520, \ - .pio_mask = ATA_PIO4, \ - } - -static const struct ide_port_info cyrix_chipsets[]__devinitdata = { -/* 0 */ DECLARE_CS_DEV ("Cyrix 5510" ), -/* 1 */ DECLARE_CS_DEV ("Cyrix 5520" ) +static const struct ide_port_info cyrix_chipset__devinitdata = { + .name =DRV_NAME , + .port_ops = &cs5520_port_ops, + .host_flags =IDE_HFLAG_ISA_PORTS |IDE_HFLAG_CS5520 , + .pio_mask =ATA_PIO4 , };/*
@@ -114,7 +109,7 @@ static const struct ide_port_info cyrix_static int __devinit cs5520_init_one (struct pci_dev *dev,const struct pci_device_id *id) { -const struct ide_port_info *d = &cyrix_chipsets[id->driver_data]; +const struct ide_port_info *d = &cyrix_chipset;hw_regs_t hw[4 ], *hws[] = {NULL ,NULL ,NULL ,NULL };ide_setup_pci_noise (dev, d);
@@ -128,7 +123,8 @@ static int __devinit cs5520_init_one(str }pci_set_master (dev);if (pci_set_dma_mask (dev,DMA_32BIT_MASK )) { -printk (KERN_WARNING "cs5520: No suitable DMA available.\n" ); +printk (KERN_WARNING "%s: No suitable DMA available.\n" , + d->name);return -ENODEV ; }
drivers/ide/pci/cs5530.c +3 -1
@@ -22,6 +22,8 @@#include <asm/io.h> +#define DRV_NAME "cs5530" +/* * Here are the standard PIO mode 0-4 timings for each "format". * Format-0 uses fast data reg timings, with slower command reg timings.
@@ -243,7 +245,7 @@ static const struct ide_port_ops cs5530_ };static const struct ide_port_info cs5530_chipset__devinitdata = { - .name ="CS5530" , + .name =DRV_NAME , .init_chipset = init_chipset_cs5530, .init_hwif = init_hwif_cs5530, .port_ops = &cs5530_port_ops,
drivers/ide/pci/cs5535.c +3 -1
@@ -26,6 +26,8 @@#include <linux/pci.h> #include <linux/ide.h> +#define DRV_NAME "cs5535" +#define MSR_ATAC_BASE 0x51300000#define ATAC_GLD_MSR_CAP (MSR_ATAC_BASE+0)#define ATAC_GLD_MSR_CONFIG (MSR_ATAC_BASE+0x01)
@@ -169,7 +171,7 @@ static const struct ide_port_ops cs5535_ };static const struct ide_port_info cs5535_chipset__devinitdata = { - .name ="CS5535" , + .name =DRV_NAME , .port_ops = &cs5535_port_ops, .host_flags =IDE_HFLAG_SINGLE |IDE_HFLAG_POST_SET_MODE , .pio_mask =ATA_PIO4 ,
drivers/ide/pci/cy82c693.c +3 -1
@@ -48,6 +48,8 @@#include <asm/io.h> +#define DRV_NAME "cy82c693" +/* the current version */ #define CY82_VERSION "CY82C693U driver v0.34 99-13-12 Andreas S. Krebs ([email protected])"
@@ -398,7 +400,7 @@ static const struct ide_port_ops cy82c69 };static const struct ide_port_info cy82c693_chipset__devinitdata = { - .name ="CY82C693" , + .name =DRV_NAME , .init_chipset = init_chipset_cy82c693, .init_iops = init_iops_cy82c693, .port_ops = &cy82c693_port_ops,
drivers/ide/pci/generic.c +30 -33
104 lines not on this page · raw message
drivers/ide/pci/hpt34x.c +6 -4
@@ -33,6 +33,8 @@#include <linux/init.h> #include <linux/ide.h> +#define DRV_NAME "hpt34x" +#define HPT343_DEBUG_DRIVE_INFO 0static void hpt34x_set_mode (ide_drive_t *drive,const u8 speed)
@@ -126,15 +128,15 @@ static const struct ide_port_ops hpt34x_ IDE_HFLAG_NO_AUTODMA) static const struct ide_port_info hpt34x_chipsets[] __devinitdata = { - {/* 0 */ - .name ="HPT343" , + {/* 0: HPT343 */ + .name =DRV_NAME , .init_chipset = init_chipset_hpt34x, .port_ops = &hpt34x_port_ops, .host_flags =IDE_HFLAGS_HPT34X |IDE_HFLAG_NON_BOOTABLE , .pio_mask =ATA_PIO5 , }, - {/* 1 */ - .name ="HPT345" , + {/* 1: HPT345 */ + .name =DRV_NAME , .init_chipset = init_chipset_hpt34x, .port_ops = &hpt34x_port_ops, .host_flags =IDE_HFLAGS_HPT34X |IDE_HFLAG_OFF_BOARD ,
drivers/ide/pci/hpt366.c +12 -53
102 lines not on this page · raw message
drivers/ide/pci/it8213.c +3 -1
@@ -14,6 +14,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "it8213" +/** * it8213_set_pio_mode - set host controller for PIO mode * @drive: drive
@@ -156,7 +158,7 @@ static const struct ide_port_ops it8213_ };static const struct ide_port_info it8213_chipset__devinitdata = { - .name ="IT8213" , + .name =DRV_NAME , .enablebits = { {0x41 ,0x80 ,0x80 } }, .port_ops = &it8213_port_ops, .host_flags =IDE_HFLAG_SINGLE ,
drivers/ide/pci/it821x.c +7 -5
@@ -67,6 +67,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "it821x" +struct it821x_dev { unsigned int smart:1, /* Are we in smart raid mode */
@@ -563,7 +565,7 @@ static void __devinit init_hwif_it821x(i idev->timing10 =1 ; hwif->host_flags |=IDE_HFLAG_NO_ATAPI_DMA ;if (idev->smart ==0 ) -printk (KERN_WARNING "it821x %s: revision 0x10, " + printk(KERN_WARNING DRV_NAME " %s: revision 0x10, ""workarounds activated\n" ,pci_name (dev)); }
@@ -604,12 +606,12 @@ static unsigned int __devinit init_chips/* Force the card into bypass mode if so requested */ if (it8212_noraid) { -printk (KERN_INFO "it821x %s: forcing bypass mode\n" , + printk(KERN_INFO DRV_NAME " %s: forcing bypass mode\n", pci_name(dev));it8212_disable_raid (dev); }pci_read_config_byte (dev,0x50 , &conf); -printk (KERN_INFO "it821x %s: controller in %s mode\n" , + printk(KERN_INFO DRV_NAME " %s: controller in %s mode\n", pci_name(dev), mode[conf & 1]);return 0 ; }
@@ -623,7 +625,7 @@ static const struct ide_port_ops it821x_ };static const struct ide_port_info it821x_chipset__devinitdata = { - .name ="IT821X" , + .name =DRV_NAME , .init_chipset = init_chipset_it821x, .init_hwif = init_hwif_it821x, .port_ops = &it821x_port_ops,
@@ -646,7 +648,7 @@ static int __devinit it821x_init_one(str itdevs =kzalloc (2 *sizeof (*itdevs),GFP_KERNEL );if (itdevs ==NULL ) { -printk (KERN_ERR "it821x %s: out of memory\n" ,pci_name (dev)); + printk(KERN_ERR DRV_NAME " %s: out of memory\n", pci_name(dev));return -ENOMEM ; }
drivers/ide/pci/jmicron.c +3 -1
@@ -12,6 +12,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "jmicron" + typedef enum { PORT_PATA0 = 0, PORT_PATA1 = 1,
@@ -102,7 +104,7 @@ static const struct ide_port_ops jmicron };static const struct ide_port_info jmicron_chipset__devinitdata = { - .name ="JMB" , + .name =DRV_NAME , .enablebits = { {0x40 ,0x01 ,0x01 }, {0x40 ,0x10 ,0x10 } }, .port_ops = &jmicron_port_ops, .pio_mask =ATA_PIO5 ,
drivers/ide/pci/ns87415.c +3 -1
@@ -19,6 +19,8 @@#include <asm/io.h> +#define DRV_NAME "ns87415" +#ifdef CONFIG_SUPERIO /* SUPERIO 87560 is a PoS chip that NatSem denies exists. * Unfortunately, it's built-in on all Astro-based PA-RISC workstations
@@ -305,7 +307,7 @@ static const struct ide_dma_ops ns87415_ };static const struct ide_port_info ns87415_chipset__devinitdata = { - .name ="NS87415" , + .name =DRV_NAME , .init_hwif = init_hwif_ns87415, .port_ops = &ns87415_port_ops, .dma_ops = &ns87415_dma_ops,
drivers/ide/pci/opti621.c +3 -1
@@ -90,6 +90,8 @@#include <asm/io.h> +#define DRV_NAME "opti621" +#define READ_REG 0/* index of Read cycle timing register */ #define WRITE_REG 1/* index of Write cycle timing register */ #define CNTRL_REG 3/* index of Control register */
@@ -200,7 +202,7 @@ static const struct ide_port_ops opti621 };static const struct ide_port_info opti621_chipset__devinitdata = { - .name ="OPTI621/X" , + .name =DRV_NAME , .enablebits = { {0x45 ,0x80 ,0x00 }, {0x40 ,0x08 ,0x00 } }, .port_ops = &opti621_port_ops, .host_flags =IDE_HFLAG_NO_DMA ,
drivers/ide/pci/pdc202xx_new.c +16 -22
@@ -31,6 +31,8 @@#include <asm/pci-bridge.h> #endif +#define DRV_NAME "pdc202xx_new" +#undef DEBUG#ifdef DEBUG
@@ -458,7 +460,7 @@ static struct pci_dev * __devinit pdc202if (dev2->irq != dev->irq) { dev2->irq = dev->irq; -printk (KERN_INFO "PDC20270 %s: PCI config space " + printk(KERN_INFO DRV_NAME " %s: PCI config space " "interrupt fixed\n", pci_name(dev)); }
@@ -476,9 +478,9 @@ static const struct ide_port_ops pdcnew_ .cable_detect = pdcnew_cable_detect, }; -#define DECLARE_PDCNEW_DEV (name_str, udma) \ +#define DECLARE_PDCNEW_DEV (udma) \ { \ - .name = name_str, \ + .name = DRV_NAME, \ .init_chipset = init_chipset_pdcnew, \ .port_ops = &pdcnew_port_ops, \ .host_flags = IDE_HFLAG_POST_SET_MODE | \
@@ -490,13 +492,8 @@ static const struct ide_port_ops pdcnew_ }static const struct ide_port_info pdcnew_chipsets[]__devinitdata = { -/* 0 */ DECLARE_PDCNEW_DEV ("PDC20268" ,ATA_UDMA5 ), -/* 1 */ DECLARE_PDCNEW_DEV ("PDC20269" ,ATA_UDMA6 ), -/* 2 */ DECLARE_PDCNEW_DEV ("PDC20270" ,ATA_UDMA5 ), -/* 3 */ DECLARE_PDCNEW_DEV ("PDC20271" ,ATA_UDMA6 ), -/* 4 */ DECLARE_PDCNEW_DEV ("PDC20275" ,ATA_UDMA6 ), -/* 5 */ DECLARE_PDCNEW_DEV ("PDC20276" ,ATA_UDMA6 ), -/* 6 */ DECLARE_PDCNEW_DEV ("PDC20277" ,ATA_UDMA6 ), +/* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV (ATA_UDMA5 ), +/* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV (ATA_UDMA6 ), };/**
@@ -510,13 +507,10 @@ static const struct ide_port_info pdcnewstatic int __devinit pdc202new_init_one (struct pci_dev *dev,const struct pci_device_id *id) { -const struct ide_port_info *d; +const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data];struct pci_dev *bridge = dev->bus->self; -u8 idx = id->driver_data; - - d = &pdcnew_chipsets[idx]; -if (idx ==2 && bridge && +if (dev->device ==PCI_DEVICE_ID_PROMISE_20270 && bridge && bridge->vendor ==PCI_VENDOR_ID_DEC && bridge->device ==PCI_DEVICE_ID_DEC_21150 ) {struct pci_dev *dev2;
@@ -534,11 +528,11 @@ static int __devinit pdc202new_init_one( } } -if (idx ==5 && bridge && +if (dev->device ==PCI_DEVICE_ID_PROMISE_20276 && bridge && bridge->vendor ==PCI_VENDOR_ID_INTEL && (bridge->device ==PCI_DEVICE_ID_INTEL_I960 || bridge->device ==PCI_DEVICE_ID_INTEL_I960RM )) { -printk (KERN_INFO "PDC20276 %s: attached to I2O RAID controller," + printk(KERN_INFO DRV_NAME " %s: attached to I2O RAID controller," " skipping\n", pci_name(dev));return -ENODEV ; }
@@ -558,11 +552,11 @@ static void __devexit pdc202new_remove(sstatic const struct pci_device_id pdc202new_pci_tbl[] = { {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20268 ),0 }, {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20269 ),1 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20270 ),2 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20271 ),3 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20275 ),4 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20276 ),5 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20277 ),6 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20270 ),0 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20271 ),1 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20275 ),1 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20276 ),1 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20277 ),1 }, {0 , }, };MODULE_DEVICE_TABLE (pci, pdc202new_pci_tbl);
drivers/ide/pci/pdc202xx_old.c +16 -14
@@ -20,6 +20,8 @@#include <asm/io.h> +#define DRV_NAME "pdc202xx_old" +#define PDC202XX_DEBUG_DRIVE_INFO 0static const char *pdc_quirk_drives[] = {
@@ -350,9 +352,9 @@ static const struct ide_dma_ops pdc2026x .dma_timeout = pdc202xx_dma_timeout, }; -#define DECLARE_PDC2026X_DEV (name_str, udma, extra_flags) \ +#define DECLARE_PDC2026X_DEV (udma, extra_flags) \ { \ - .name = name_str, \ + .name = DRV_NAME, \ .init_chipset = init_chipset_pdc202xx, \ .port_ops = &pdc2026x_port_ops, \ .dma_ops = &pdc2026x_dma_ops, \
@@ -363,8 +365,8 @@ static const struct ide_dma_ops pdc2026x }static const struct ide_port_info pdc202xx_chipsets[]__devinitdata = { - {/* 0 */ - .name ="PDC20246" , + {/* 0: PDC20246 */ + .name =DRV_NAME , .init_chipset = init_chipset_pdc202xx, .port_ops = &pdc20246_port_ops, .dma_ops = &pdc20246_dma_ops,
@@ -374,10 +376,10 @@ static const struct ide_port_info pdc202 .udma_mask = ATA_UDMA2, }, - /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4, 0), - /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4, 0), - /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), - /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), +/* 1: PDC2026{2,3} */ + DECLARE_PDC2026X_DEV(ATA_UDMA4, 0), +/* 2: PDC2026{5,7} */ + DECLARE_PDC2026X_DEV(ATA_UDMA5, IDE_HFLAG_RQSIZE_256), };/**
@@ -396,17 +398,17 @@ static int __devinit pdc202xx_init_one(s d = &pdc202xx_chipsets[idx]; -if (idx <3 ) +if (idx <2 )pdc202ata4_fixup_irq (dev, d->name); -if (idx ==3 ) { +if (dev->vendor ==PCI_DEVICE_ID_PROMISE_20265 ) {struct pci_dev *bridge = dev->bus->self;if (bridge && bridge->vendor ==PCI_VENDOR_ID_INTEL && (bridge->device ==PCI_DEVICE_ID_INTEL_I960 || bridge->device ==PCI_DEVICE_ID_INTEL_I960RM )) { -printk (KERN_INFO "pdc202xx_old %s: skipping Promise " + printk(KERN_INFO DRV_NAME " %s: skipping Promise ""PDC20265 attached to I2O RAID controller\n" , pci_name(dev));return -ENODEV ;
@@ -419,9 +421,9 @@ static int __devinit pdc202xx_init_one(sstatic const struct pci_device_id pdc202xx_pci_tbl[] = { {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20246 ),0 }, {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20262 ),1 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20263 ),2 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20265 ),3 }, - {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20267 ),4 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20263 ),1 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20265 ),2 }, + {PCI_VDEVICE (PROMISE ,PCI_DEVICE_ID_PROMISE_20267 ),2 }, {0 , }, };MODULE_DEVICE_TABLE (pci, pdc202xx_pci_tbl);
drivers/ide/pci/piix.c +47 -59
155 lines not on this page · raw message
drivers/ide/pci/rz1000.c +3 -1
@@ -21,6 +21,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "rz1000" +static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) {struct pci_dev *dev =to_pci_dev (hwif->dev);
@@ -40,7 +42,7 @@ static void __devinit init_hwif_rz1000 ( }static const struct ide_port_info rz1000_chipset__devinitdata = { - .name ="RZ100x" , + .name =DRV_NAME , .init_hwif = init_hwif_rz1000, .chipset = ide_rz1000, .host_flags =IDE_HFLAG_NO_DMA ,
drivers/ide/pci/sc1200.c +3 -1
@@ -22,6 +22,8 @@#include <asm/io.h> +#define DRV_NAME "sc1200" +#define SC1200_REV_A 0x00#define SC1200_REV_B1 0x01#define SC1200_REV_B3 0x02
@@ -291,7 +293,7 @@ static const struct ide_dma_ops sc1200_d };static const struct ide_port_info sc1200_chipset__devinitdata = { - .name ="SC1200" , + .name =DRV_NAME , .port_ops = &sc1200_port_ops, .dma_ops = &sc1200_dma_ops, .host_flags = IDE_HFLAG_SERIALIZE |
drivers/ide/pci/serverworks.c +16 -10
@@ -38,6 +38,8 @@#include <asm/io.h> +#define DRV_NAME "serverworks" +#define SVWKS_CSB5_REVISION_NEW 0x92/* min PCI_REVISION_ID for UDMA5 (A2.0) */ #define SVWKS_CSB6_REVISION 0xa0/* min PCI_REVISION_ID for UDMA4 (A1.0) */
@@ -353,40 +355,44 @@ static const struct ide_port_ops svwks_p#define IDE_HFLAGS_SVWKS IDE_HFLAG_LEGACY_IRQSstatic const struct ide_port_info serverworks_chipsets[]__devinitdata = { - {/* 0 */ - .name ="SvrWks OSB4" , + {/* 0: OSB4 */ + .name =DRV_NAME , .init_chipset = init_chipset_svwks, .port_ops = &osb4_port_ops, .host_flags =IDE_HFLAGS_SVWKS , .pio_mask =ATA_PIO4 , .mwdma_mask =ATA_MWDMA2 , .udma_mask =0x00 ,/* UDMA is problematic on OSB4 */ - },{/* 1 */ - .name ="SvrWks CSB5" , + }, + {/* 1: CSB5 */ + .name =DRV_NAME , .init_chipset = init_chipset_svwks, .port_ops = &svwks_port_ops, .host_flags =IDE_HFLAGS_SVWKS , .pio_mask =ATA_PIO4 , .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , - },{/* 2 */ - .name ="SvrWks CSB6" , + }, + {/* 2: CSB6 */ + .name =DRV_NAME , .init_chipset = init_chipset_svwks, .port_ops = &svwks_port_ops, .host_flags =IDE_HFLAGS_SVWKS , .pio_mask =ATA_PIO4 , .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , - },{/* 3 */ - .name ="SvrWks CSB6" , + }, + {/* 3: CSB6-2 */ + .name =DRV_NAME , .init_chipset = init_chipset_svwks, .port_ops = &svwks_port_ops, .host_flags =IDE_HFLAGS_SVWKS |IDE_HFLAG_SINGLE , .pio_mask =ATA_PIO4 , .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , - },{/* 4 */ - .name ="SvrWks HT1000" , + }, + {/* 4: HT1000 */ + .name =DRV_NAME , .init_chipset = init_chipset_svwks, .port_ops = &svwks_port_ops, .host_flags =IDE_HFLAGS_SVWKS |IDE_HFLAG_SINGLE ,
drivers/ide/pci/siimage.c +9 -8
@@ -44,6 +44,8 @@#include <linux/init.h> #include <linux/io.h> +#define DRV_NAME "siimage" +/** * pdev_is_sata - check if device is SATA * @pdev: PCI device to check
@@ -717,9 +719,9 @@ static const struct ide_dma_ops sil_dma_ .dma_lost_irq = ide_dma_lost_irq, }; -#define DECLARE_SII_DEV (name_str, p_ops) \ +#define DECLARE_SII_DEV (p_ops) \ { \ - .name = name_str, \ + .name = DRV_NAME, \ .init_chipset = init_chipset_siimage, \ .init_iops = init_iops_siimage, \ .port_ops = p_ops, \
@@ -730,9 +732,8 @@ static const struct ide_dma_ops sil_dma_ }static const struct ide_port_info siimage_chipsets[]__devinitdata = { -/* 0 */ DECLARE_SII_DEV ("SiI680" , &sil_pata_port_ops), -/* 1 */ DECLARE_SII_DEV ("SiI3112 Serial ATA" , &sil_sata_port_ops), -/* 2 */ DECLARE_SII_DEV ("Adaptec AAR-1210SA" , &sil_sata_port_ops) +/* 0: SiI680 */ DECLARE_SII_DEV (&sil_pata_port_ops), +/* 1: SiI3112 */ DECLARE_SII_DEV (&sil_sata_port_ops) };/**
@@ -761,7 +762,7 @@ static int __devinit siimage_init_one(ststatic int first =1 ;if (first) { -printk (KERN_INFO "siimage: For full SATA support you " + printk(KERN_INFO DRV_NAME ": For full SATA support you " "should use the libata sata_sil module.\n"); first =0 ; }
@@ -780,7 +781,7 @@ static int __devinit siimage_init_one(st* seem to get terminally confused in the PCI spaces. */ if (!request_mem_region (bar5, barsize, d.name)) { -printk (KERN_WARNING "siimage %s: MMIO ports not " + printk(KERN_WARNING DRV_NAME " %s: MMIO ports not " "available\n", pci_name(dev)); }else { ioaddr =ioremap (bar5, barsize);
@@ -823,7 +824,7 @@ static const struct pci_device_id siimag { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), 0 }, #ifdef CONFIG_BLK_DEV_IDE_SATA { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_3112), 1 }, - { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_1210SA), 2 }, + { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_1210SA), 1 }, #endif { 0, }, };
drivers/ide/pci/sis5513.c +8 -6
@@ -52,6 +52,8 @@#include <linux/init.h> #include <linux/ide.h> +#define DRV_NAME "sis5513" +/* registers layout and init values are chipset family dependant */ #define ATA_16 0x01
@@ -380,7 +382,7 @@ static int __devinit sis_find_family(str }pci_dev_put (host); -printk (KERN_INFO "SIS5513 %s: %s %s controller\n" , + printk(KERN_INFO DRV_NAME " %s: %s %s controller\n",pci_name (dev), SiSHostChipInfo[i].name, chipset_capability[chipset_family]); }
@@ -397,7 +399,7 @@ static int __devinit sis_find_family(strpci_write_config_dword (dev,0x54 , idemisc);if (trueid ==0x5518 ) { -printk (KERN_INFO "SIS5513 %s: SiS 962/963 MuTIOL IDE UDMA133 controller\n" , + printk(KERN_INFO DRV_NAME " %s: SiS 962/963 MuTIOL IDE UDMA133 controller\n", pci_name(dev)); chipset_family =ATA_133 ;
@@ -407,7 +409,7 @@ static int __devinit sis_find_family(str*/ if ((idemisc &0x40000000 ) ==0 ) {pci_write_config_dword (dev,0x54 , idemisc |0x40000000 ); -printk (KERN_INFO "SIS5513 %s: Switching to 5513 register mapping\n" , + printk(KERN_INFO DRV_NAME " %s: Switching to 5513 register mapping\n", pci_name(dev)); } }
@@ -432,11 +434,11 @@ static int __devinit sis_find_family(strpci_dev_put (lpc_bridge);if (lpc_bridge->revision ==0x10 && (prefctl &0x80 )) { -printk (KERN_INFO "SIS5513 %s: SiS 961B MuTIOL IDE UDMA133 controller\n" , + printk(KERN_INFO DRV_NAME " %s: SiS 961B MuTIOL IDE UDMA133 controller\n", pci_name(dev)); chipset_family = ATA_133a; }else { -printk (KERN_INFO "SIS5513 %s: SiS 961 MuTIOL IDE UDMA100 controller\n" , + printk(KERN_INFO DRV_NAME " %s: SiS 961 MuTIOL IDE UDMA100 controller\n", pci_name(dev)); chipset_family =ATA_100 ; }
@@ -560,7 +562,7 @@ static const struct ide_port_ops sis_ata };static const struct ide_port_info sis5513_chipset__devinitdata = { - .name ="SIS5513" , + .name =DRV_NAME , .init_chipset = init_chipset_sis5513, .enablebits = { {0x4a ,0x02 ,0x02 }, {0x4a ,0x04 ,0x04 } }, .host_flags =IDE_HFLAG_LEGACY_IRQS |IDE_HFLAG_NO_AUTODMA ,
drivers/ide/pci/sl82c105.c +4 -2
@@ -23,6 +23,8 @@#include <asm/io.h> +#define DRV_NAME "sl82c105" +#undef DEBUG#ifdef DEBUG
@@ -301,7 +303,7 @@ static const struct ide_dma_ops sl82c105 };static const struct ide_port_info sl82c105_chipset__devinitdata = { - .name ="W82C105" , + .name =DRV_NAME , .init_chipset = init_chipset_sl82c105, .enablebits = {{0x40 ,0x01 ,0x01 }, {0x40 ,0x10 ,0x10 }}, .port_ops = &sl82c105_port_ops,
@@ -328,7 +330,7 @@ static int __devinit sl82c105_init_one(s* Never ever EVER under any circumstances enable * DMA when the bridge is this old. */ -printk (KERN_INFO "W82C105_IDE: Winbond W83C553 bridge " + printk(KERN_INFO DRV_NAME ": Winbond W83C553 bridge " "revision %d, BM-DMA disabled\n", rev); d.dma_ops =NULL ; d.mwdma_mask =0 ;
drivers/ide/pci/slc90e66.c +3 -1
@@ -15,6 +15,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "slc90e66" +static DEFINE_SPINLOCK (slc90e66_lock);static void slc90e66_set_pio_mode (ide_drive_t *drive,const u8 pio)
@@ -132,7 +134,7 @@ static const struct ide_port_ops slc90e6 };static const struct ide_port_info slc90e66_chipset__devinitdata = { - .name ="SLC90E66" , + .name =DRV_NAME , .enablebits = { {0x41 ,0x80 ,0x80 }, {0x43 ,0x80 ,0x80 } }, .port_ops = &slc90e66_port_ops, .host_flags =IDE_HFLAG_LEGACY_IRQS ,
drivers/ide/pci/tc86c001.c +2 -2
@@ -11,7 +11,7 @@#include <linux/pci.h> #include <linux/ide.h> -#define DRV_NAME "TC86C001" +#define DRV_NAME "tc86c001"static void tc86c001_set_mode (ide_drive_t *drive,const u8 speed) {
@@ -193,7 +193,7 @@ static const struct ide_dma_ops tc86c001 };static const struct ide_port_info tc86c001_chipset__devinitdata = { - .name ="TC86C001" , + .name =DRV_NAME , .init_hwif = init_hwif_tc86c001, .port_ops = &tc86c001_port_ops, .dma_ops = &tc86c001_dma_ops,
drivers/ide/pci/triflex.c +3 -1
@@ -33,6 +33,8 @@#include <linux/ide.h> #include <linux/init.h> +#define DRV_NAME "triflex" +static void triflex_set_mode (ide_drive_t *drive,const u8 speed) {ide_hwif_t *hwif =HWIF (drive);
@@ -93,7 +95,7 @@ static const struct ide_port_ops triflex };static const struct ide_port_info triflex_device__devinitdata = { - .name ="TRIFLEX" , + .name =DRV_NAME , .enablebits = {{0x80 ,0x01 ,0x01 }, {0x80 ,0x02 ,0x02 }}, .port_ops = &triflex_port_ops, .pio_mask =ATA_PIO4 ,
drivers/ide/pci/trm290.c +5 -3
@@ -141,6 +141,8 @@#include <asm/io.h> +#define DRV_NAME "trm290" +static void trm290_prepare_drive (ide_drive_t *drive,unsigned int use_dma) {ide_hwif_t *hwif =HWIF (drive);
@@ -245,10 +247,10 @@ static void __devinit init_hwif_trm290(iu8 reg =0 ;if ((dev->class &5 ) && cfg_base) -printk (KERN_INFO "TRM290 %s: chip" ,pci_name (dev)); + printk(KERN_INFO DRV_NAME " %s: chip", pci_name(dev));else { cfg_base =0x3df0 ; -printk (KERN_INFO "TRM290 %s: using default" ,pci_name (dev)); + printk(KERN_INFO DRV_NAME " %s: using default", pci_name(dev)); }printk (KERN_CONT " config base at 0x%04x\n" , cfg_base); hwif->config_data = cfg_base;
@@ -325,7 +327,7 @@ static struct ide_dma_ops trm290_dma_ops };static const struct ide_port_info trm290_chipset__devinitdata = { - .name ="TRM290" , + .name =DRV_NAME , .init_hwif = init_hwif_trm290, .chipset = ide_trm290, .port_ops = &trm290_port_ops,
drivers/ide/pci/via82cxxx.c +9 -6
@@ -35,6 +35,8 @@#include <asm/processor.h> #endif +#define DRV_NAME "via82cxxx" +#define VIA_IDE_ENABLE 0x40#define VIA_IDE_CONFIG 0x41#define VIA_FIFO_CONFIG 0x43
@@ -373,7 +375,7 @@ static const struct ide_port_ops via_por };static const struct ide_port_info via82cxxx_chipset__devinitdata = { - .name ="VP_IDE" , + .name =DRV_NAME , .init_chipset = init_chipset_via82cxxx, .enablebits = { {0x40 ,0x02 ,0x02 }, {0x40 ,0x01 ,0x01 } }, .port_ops = &via_port_ops,
@@ -401,7 +403,7 @@ static int __devinit via_init_one(struct*/ via_config =via_config_find (&isa);if (!via_config->id) { -printk (KERN_WARNING "VP_IDE %s: unknown chipset, skipping\n" , + printk(KERN_WARNING DRV_NAME " %s: unknown chipset, skipping\n", pci_name(dev));return -ENODEV ; }
@@ -409,7 +411,7 @@ static int __devinit via_init_one(struct/* * Print the boot message. */ - printk(KERN_INFO "VP_IDE %s: VIA %s (rev %02x) IDE %sDMA%s\n", + printk(KERN_INFO DRV_NAME " %s: VIA %s (rev %02x) IDE %sDMA%s\n",pci_name (dev), via_config->name, isa->revision, via_config->udma_mask ?"U" :"MW" , via_dma[via_config->udma_mask ?
@@ -429,9 +431,9 @@ static int __devinit via_init_one(struct }if (via_clock <20000 || via_clock >50000 ) { -printk (KERN_WARNING "VP_IDE: User given PCI clock speed " + printk(KERN_WARNING DRV_NAME ": User given PCI clock speed " "impossible (%d), using 33 MHz instead.\n", via_clock); -printk (KERN_WARNING "VP_IDE: Use ide0=ata66 if you want " + printk(KERN_WARNING DRV_NAME ": Use ide0=ata66 if you want " "to assume 80-wire cable.\n"); via_clock =33333 ; }
@@ -453,7 +455,8 @@ static int __devinit via_init_one(struct vdev =kzalloc (sizeof (*vdev),GFP_KERNEL );if (!vdev) { -printk (KERN_ERR "VP_IDE %s: out of memory :(\n" ,pci_name (dev)); + printk(KERN_ERR DRV_NAME " %s: out of memory :(\n", + pci_name(dev));return -ENOMEM ; }
PATCH 5/5 ide: drop 'name' parameter from ->init_chipset method
In reply to Bartlomiej ZolnierkiewiczThere should be no functional changes caused by this patch.
--- drivers/ide/pci/aec62xx.c | 2 +- drivers/ide/pci/alim15x3.c | 5 ++--- drivers/ide/pci/amd74xx.c | 19 ++++++++----------- drivers/ide/pci/cmd64x.c | 2 +- drivers/ide/pci/cs5530.c | 7 +++---- drivers/ide/pci/cy82c693.c | 10 +++++----- drivers/ide/pci/hpt34x.c | 2 +- drivers/ide/pci/hpt366.c | 3 ++- drivers/ide/pci/it821x.c | 2 +- drivers/ide/pci/pdc202xx_new.c | 3 ++- drivers/ide/pci/pdc202xx_old.c | 3 +-- drivers/ide/pci/piix.c | 3 +-- drivers/ide/pci/serverworks.c | 6 +++--- drivers/ide/pci/siimage.c | 8 +++----- drivers/ide/pci/sis5513.c | 3 +-- drivers/ide/pci/sl82c105.c | 2 +- drivers/ide/pci/via82cxxx.c | 3 +-- drivers/ide/setup-pci.c | 2 +- include/linux/ide.h | 2 +- 19 files changed, 39 insertions(+), 48 deletions(-)
drivers/ide/pci/aec62xx.c +1 -1
@@ -140,7 +140,7 @@ static void aec_set_pio_mode(ide_drive_t drive->hwif->port_ops->set_dma_mode (drive, pio +XFER_PIO_0 ); } -static unsigned int __devinit init_chipset_aec62xx (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_aec62xx (struct pci_dev *dev) {/* These are necessary to get AEC6280 Macintosh cards to work */ if ((dev->device == PCI_DEVICE_ID_ARTOP_ATP865) ||
drivers/ide/pci/alim15x3.c +2 -3
@@ -209,13 +209,12 @@ static int ali15x3_dma_setup(ide_drive_t/** * init_chipset_ali15x3 - Initialise an ALi IDE controller * @dev: PCI device -* @name: Name of the controller * * This function initializes the ALI IDE controller and where * appropriate also sets up the 1533 southbridge. */ - -static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev,const char *name) + +static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev) {unsigned long flags;u8 tmpbyte;
drivers/ide/pci/amd74xx.c +8 -11
@@ -112,15 +112,13 @@ static void amd_set_pio_mode(ide_drive_tamd_set_drive (drive,XFER_PIO_0 + pio); } -static void __devinit amd7409_cable_detect (struct pci_dev *dev, -const char *name) +static void __devinit amd7409_cable_detect (struct pci_dev *dev) {/* no host side cable detection */ amd_80w =0x03 ; } -static void __devinit amd7411_cable_detect (struct pci_dev *dev, -const char *name) +static void __devinit amd7411_cable_detect (struct pci_dev *dev) {int i;u32 u =0 ;
@@ -131,9 +129,9 @@ static void __devinit amd7411_cable_dete amd_80w = ((t &0x3 ) ?1 :0 ) | ((t &0xc ) ?2 :0 );for (i =24 ; i >=0 ; i -=8 )if (((u >> i) &4 ) && !(amd_80w & (1 << (1 - (i >>4 ))))) { -printk (KERN_WARNING "%s %s: BIOS didn't set cable bits " -"correctly. Enabling workaround.\n" , - name,pci_name (dev)); + printk(KERN_WARNING DRV_NAME " %s: BIOS didn't set " +"cable bits correctly. Enabling workaround.\n" , + pci_name(dev)); amd_80w |= (1 << (1 - (i >>4 ))); } }
@@ -142,8 +140,7 @@ static void __devinit amd7411_cable_dete* The initialization callback. Initialize drive independent registers. */ -static unsigned int __devinit init_chipset_amd74xx (struct pci_dev *dev, -const char *name) +static unsigned int __devinit init_chipset_amd74xx (struct pci_dev *dev) {u8 t =0 , offset =amd_offset (dev);
@@ -156,9 +153,9 @@ static unsigned int __devinit init_chips ;/* no UDMA > 2 */ else if (dev->vendor == PCI_VENDOR_ID_AMD && dev->device == PCI_DEVICE_ID_AMD_VIPER_7409) - amd7409_cable_detect(dev, name); + amd7409_cable_detect(dev); else -amd7411_cable_detect (dev ,name ); +amd7411_cable_detect (dev );/* * Take care of prefetch & postwrite.
drivers/ide/pci/cmd64x.c +1 -1
@@ -332,7 +332,7 @@ static int cmd646_1_dma_end(ide_drive_treturn (dma_stat &7 ) !=4 ; } -static unsigned int __devinit init_chipset_cmd64x (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_cmd64x (struct pci_dev *dev) {u8 mrdmode =0 ;
drivers/ide/pci/cs5530.c +3 -4
@@ -129,12 +129,11 @@ static void cs5530_set_dma_mode(ide_driv/** * init_chipset_5530 - set up 5530 bridge * @dev: PCI device -* @name: device name * * Initialize the cs5530 bridge for reliable IDE DMA operation. */ -static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev) {struct pci_dev *master_0 =NULL , *cs5530_0 =NULL ;
@@ -153,11 +152,11 @@ static unsigned int __devinit init_chips } }if (!master_0) { -printk (KERN_ERR "%s: unable to locate PCI MASTER function\n" , name); + printk(KERN_ERR DRV_NAME ": unable to locate PCI MASTER function\n"); goto out; }if (!cs5530_0) { -printk (KERN_ERR "%s: unable to locate CS5530 LEGACY function\n" , name); + printk(KERN_ERR DRV_NAME ": unable to locate CS5530 LEGACY function\n"); goto out; }
drivers/ide/pci/cy82c693.c +5 -5
@@ -332,7 +332,7 @@ static void cy82c693_set_pio_mode(ide_dr/* * this function is called during init and is used to setup the cy82c693 chip */ -static unsigned int __devinit init_chipset_cy82c693 (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_cy82c693 (struct pci_dev *dev) {if (PCI_FUNC (dev->devfn) !=1 )return 0 ;
@@ -351,8 +351,8 @@ static unsigned int __devinit init_chips data =inb (CY82_DATA_PORT );#if CY82C693_DEBUG_INFO -printk (KERN_INFO "%s: Peripheral Configuration Register: 0x%X\n" , - name, data); + printk(KERN_INFO DRV_NAME ": Peripheral Configuration Register: 0x%X\n", + data);#endif /* CY82C693_DEBUG_INFO */ /*
@@ -373,8 +373,8 @@ static unsigned int __devinit init_chipsoutb (data,CY82_DATA_PORT );#if CY82C693_DEBUG_INFO -printk (KERN_INFO "%s: New Peripheral Configuration Register: 0x%X\n" , - name, data); +printk (KERN_INFO ": New Peripheral Configuration Register: 0x%X\n" , + data);#endif /* CY82C693_DEBUG_INFO */ #endif /* CY82C693_SETDMA_CLOCK */
drivers/ide/pci/hpt34x.c +1 -1
@@ -79,7 +79,7 @@ static void hpt34x_set_pio_mode(ide_driv*/ #define HPT34X_PCI_INIT_REG 0x80 -static unsigned int __devinit init_chipset_hpt34x (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_hpt34x (struct pci_dev *dev) {int i =0 ;unsigned long hpt34xIoBase =pci_resource_start (dev,4 );
drivers/ide/pci/hpt366.c +2 -1
@@ -970,11 +970,12 @@ static int __devinit hpt37x_calibrate_dpreturn 1 ; } -static unsigned int __devinit init_chipset_hpt366 (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_hpt366 (struct pci_dev *dev) {unsigned long io_base =pci_resource_start (dev,4 );struct ide_host *host =pci_get_drvdata (dev);struct hpt_info *info = host->host_priv + (&dev->dev == host->dev[1 ]); +const char *name =DRV_NAME ;u8 pci_clk, dpll_clk =0 ;/* PCI and DPLL clock in MHz */ u8 chip_type;enum ata_clock clock;
drivers/ide/pci/it821x.c +1 -1
@@ -599,7 +599,7 @@ static void __devinit it8212_disable_raipci_write_config_byte (dev,PCI_LATENCY_TIMER ,0x20 ); } -static unsigned int __devinit init_chipset_it821x (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_it821x (struct pci_dev *dev) {u8 conf;static char *mode[2 ] = {"pass through" ,"smart" };
drivers/ide/pci/pdc202xx_new.c +2 -1
@@ -326,8 +326,9 @@ static void __devinit apple_kiwi_init(st }#endif /* CONFIG_PPC_PMAC */ -static unsigned int __devinit init_chipset_pdcnew (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_pdcnew (struct pci_dev *dev) { +const char *name =DRV_NAME ;unsigned long dma_base =pci_resource_start (dev,4 );unsigned long sec_dma_base = dma_base +0x08 ;long pll_input, pll_output, ratio;
drivers/ide/pci/pdc202xx_old.c +1 -2
@@ -265,8 +265,7 @@ static void pdc202xx_dma_timeout(ide_driide_dma_timeout (drive); } -static unsigned int __devinit init_chipset_pdc202xx (struct pci_dev *dev, -const char *name) +static unsigned int __devinit init_chipset_pdc202xx (struct pci_dev *dev) {unsigned long dmabase =pci_resource_start (dev,4 );u8 udma_speed_flag =0 , primary_mode =0 , secondary_mode =0 ;
drivers/ide/pci/piix.c +1 -2
@@ -200,13 +200,12 @@ static void piix_set_dma_mode(ide_drive_/** * init_chipset_ich - set up the ICH chipset * @dev: PCI device to set up -* @name: Name of the device * * Initialize the PCI device as required. For the ICH this turns * out to be nice and simple. */ -static unsigned int __devinit init_chipset_ich (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_ich (struct pci_dev *dev) {u32 extra =0 ;
drivers/ide/pci/serverworks.c +3 -3
@@ -174,7 +174,7 @@ static void svwks_set_dma_mode(ide_drivepci_write_config_byte (dev,0x54 , ultra_enable); } -static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev) {unsigned int reg;u8 btr;
@@ -190,8 +190,8 @@ static unsigned int __devinit init_chipspci_read_config_dword (isa_dev,0x64 , ®); reg &= ~0x00002000 ;/* disable 600ns interrupt mask */ if (!(reg &0x00004000 )) -printk (KERN_DEBUG "%s %s: UDMA not BIOS " -"enabled.\n" , name,pci_name (dev)); + printk(KERN_DEBUG DRV_NAME " %s: UDMA not BIOS " +"enabled.\n" ,pci_name (dev)); reg |=0x00004000 ;/* enable UDMA/33 support */ pci_write_config_dword (isa_dev,0x64 , reg); }
drivers/ide/pci/siimage.c +3 -5
@@ -457,14 +457,12 @@ static void sil_sata_pre_reset(ide_drive/** * init_chipset_siimage - set up an SI device * @dev: PCI device -* @name: device name * * Perform the initial PCI set up for this device. Attempt to switch * to 133 MHz clocking if the system isn't already set up to do it. */ -static unsigned int __devinit init_chipset_siimage (struct pci_dev *dev, -const char *name) +static unsigned int __devinit init_chipset_siimage (struct pci_dev *dev) {struct ide_host *host =pci_get_drvdata (dev);void __iomem *ioaddr = host->host_priv;
@@ -541,8 +539,8 @@ static unsigned int __devinit init_chips { "== 100", "== 133", "== 2X PCI", "DISABLED!" }; tmp >>=4 ; -printk (KERN_INFO "%s %s: BASE CLOCK %s\n" , - name,pci_name (dev), clk_str[tmp &3 ]); + printk(KERN_INFO DRV_NAME " %s: BASE CLOCK %s\n", + pci_name(dev), clk_str[tmp & 3]); }return 0 ;
drivers/ide/pci/sis5513.c +1 -2
@@ -448,8 +448,7 @@ static int __devinit sis_find_family(strreturn chipset_family; } -static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, -const char *name) +static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev) {/* Make general config ops here 1/ tell IDE channels to operate in Compatibility mode only
drivers/ide/pci/sl82c105.c +1 -1
@@ -272,7 +272,7 @@ static u8 sl82c105_bridge_revision(struc* channel 0 here at least, but channel 1 has to be enabled by * firmware or arch code. We still set both to 16 bits mode. */ -static unsigned int __devinit init_chipset_sl82c105 (struct pci_dev *dev,const char *msg) +static unsigned int __devinit init_chipset_sl82c105 (struct pci_dev *dev) {u32 val;
drivers/ide/pci/via82cxxx.c +1 -2
@@ -262,13 +262,12 @@ static void __devinit via_cable_detect(s/** * init_chipset_via82cxxx - initialization handler * @dev: PCI device -* @name: Name of interface * * The initialization callback. Here we determine the IDE chip type * and initialize its drive independent registers. */ -static unsigned int __devinit init_chipset_via82cxxx (struct pci_dev *dev,const char *name) +static unsigned int __devinit init_chipset_via82cxxx (struct pci_dev *dev) {struct ide_host *host =pci_get_drvdata (dev);struct via82cxxx_dev *vdev = host->host_priv;
drivers/ide/setup-pci.c +1 -1
@@ -515,7 +515,7 @@ static int do_ide_setup_pci_device(struc* space, place chipset into init-mode, and/or preserve * an interrupt if the card is not native ide support. */ - ret = d->init_chipset ? d->init_chipset (dev, d->name) :0 ; + ret = d->init_chipset ? d->init_chipset (dev) :0 ;if (ret <0 ) goto out;
include/linux/ide.h +1 -1
@@ -1206,7 +1206,7 @@ enum {struct ide_port_info {char *name; -unsigned int (*init_chipset)(struct pci_dev *,const char *); +unsigned int (*init_chipset)(struct pci_dev *);void (*init_iops)(ide_hwif_t *);void (*init_hwif)(ide_hwif_t *); int (*init_dma)(ide_hwif_t *,