ide: remove ide_default_io_ctl() macro
Subsystems (2)
PATCH 1/12 ide: remove ide_default_io_ctl() macro
It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).
--- drivers/ide/ide.c | 2 +- include/asm-alpha/ide.h | 2 -- include/asm-arm/ide.h | 8 -------- include/asm-blackfin/ide.h | 4 ---- include/asm-ia64/ide.h | 2 -- include/asm-m32r/ide.h | 2 -- include/asm-mips/mach-generic/ide.h | 2 -- include/asm-parisc/ide.h | 2 -- include/asm-powerpc/ide.h | 2 -- include/asm-sh/ide.h | 3 --- include/asm-sparc/ide.h | 2 -- include/asm-sparc64/ide.h | 2 -- include/asm-x86/ide.h | 2 -- 13 files changed, 1 insertion(+), 34 deletions(-)
drivers/ide/ide.c +1 -1
@@ -205,7 +205,7 @@ static void __init init_ide_data (void)for (index =0 ; index <MAX_HWIFS ; ++index) {ide_hwif_t *hwif = &ide_hwifs[index];unsigned long io_addr =ide_default_io_base (index); -unsigned long ctl_addr =ide_default_io_ctl (io_addr); +unsigned long ctl_addr = io_addr +0x206 ;ide_init_port_data (hwif, index);
include/asm-alpha/ide.h +0 -2
@@ -37,8 +37,6 @@ static inline unsigned long ide_default_ } } -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#ifdef CONFIG_PCI #define ide_init_default_irq (base) (0)#else
include/asm-arm/ide.h +0 -8
@@ -17,14 +17,6 @@#define MAX_HWIFS 4#endif -#if !defined(CONFIG_ARCH_L7200 ) -# ifdef CONFIG_ARCH_CLPS7500 -# define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -# else -# define ide_default_io_ctl (base) (0) -# endif -#endif /* !ARCH_L7200 */ -#define __ide_mm_insw (port,addr,len) readsw(port,addr,len)#define __ide_mm_insl (port,addr,len) readsl(port,addr,len)#define __ide_mm_outsw (port,addr,len) writesw(port,addr,len)
include/asm-blackfin/ide.h +0 -4
@@ -19,10 +19,6 @@#define MAX_HWIFS 1 -/* Legacy ... BLK_DEV_IDECS */ -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ - -#include <asm-generic/ide_iops.h> /****************************************************************************/
include/asm-ia64/ide.h +0 -2
@@ -44,8 +44,6 @@ static inline unsigned long ide_default_ } } -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#ifdef CONFIG_PCI #define ide_init_default_irq (base) (0)#else
include/asm-m32r/ide.h +0 -2
@@ -63,8 +63,6 @@ static __inline__ unsigned long ide_defa } } -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#ifdef CONFIG_BLK_DEV_IDEPCI #define ide_init_default_irq (base) (0)#else
include/asm-mips/mach-generic/ide.h +0 -2
@@ -96,8 +96,6 @@ static __inline__ unsigned long ide_defa } } -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#ifdef CONFIG_BLK_DEV_IDEPCI #define ide_init_default_irq (base) (0)#else
include/asm-parisc/ide.h +0 -2
@@ -17,8 +17,6 @@#define MAX_HWIFS 2#endif -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#define ide_request_irq (irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))#define ide_free_irq (irq,dev_id) free_irq((irq), (dev_id))#define ide_request_region (from,extent,name) request_region((from), (extent), (name))
include/asm-powerpc/ide.h +0 -2
@@ -86,8 +86,6 @@ static __inline__ unsigned long ide_defa#endif /* __powerpc64__ */ -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_IDE_H */
include/asm-sh/ide.h +0 -3
@@ -14,9 +14,6 @@#ifdef __KERNEL__ - -#define ide_default_io_ctl (base) (0) -#include <asm-generic/ide_iops.h> #endif /* __KERNEL__ */
include/asm-sparc/ide.h +0 -2
@@ -17,8 +17,6 @@#undef MAX_HWIFS#define MAX_HWIFS 2 -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#define __ide_insl (data_reg, buffer, wcount) \ __ide_insw(data_reg, buffer, (wcount)<<1)#define __ide_outsl (data_reg, buffer, wcount) \
include/asm-sparc64/ide.h +0 -2
@@ -24,8 +24,6 @@# endif #endif -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#define __ide_insl (data_reg, buffer, wcount) \ __ide_insw(data_reg, buffer, (wcount)<<1)#define __ide_outsl (data_reg, buffer, wcount) \
include/asm-x86/ide.h +0 -2
@@ -58,8 +58,6 @@ static __inline__ unsigned long ide_defa } } -#define ide_default_io_ctl (base) ((base) + 0x206)/* obsolete */ -#ifdef CONFIG_BLK_DEV_IDEPCI #define ide_init_default_irq (base) (0)#else
PATCH 2/12 ide: remove ppc ifdef from init_ide_data()
On PPC32 ide_init_default_irq() is non-zero only for PPLUS and PPC_PREP (the latter marked as BROKEN currently) so this ifdef can be removed.
--- drivers/ide/ide.c | 2 -- 1 file changed, 2 deletions(-)
drivers/ide/ide.c +0 -2
@@ -214,11 +214,9 @@ static void __init init_ide_data (void)ide_std_init_ports (&hw, io_addr, ctl_addr);memcpy (hwif->io_ports, hw.io_ports,sizeof (hw.io_ports)); hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET ]; -#if !defined(CONFIG_PPC32 ) || defined(CONFIG_PPLUS ) || !defined(CONFIG_PCI ) hwif->irq =ide_init_default_irq (hwif->io_ports[IDE_DATA_OFFSET ]);#endif -#endif } }
PATCH 3/12 ide: add ide-4drives host driver
In reply to Bartlomiej ZolnierkiewiczCONFIG_BLK_DEV_4DRIVES deserves its own host driver:
* Add drivers/ide/legacy/ide-4drives.c and move "4drives" support there.
* Add ide-4drives.o in the link order after all other legacy host drivers enabled by "ide0=" options (they all are mutually exclusive).
* Make ide-4drives host driver probe itself for IDE devices instead of indirectly depending on ide_generic host driver.
* Add "probe" module parameter to ide-4drives and update documentation.
--- Documentation/ide.txt | 5 ++-- drivers/ide/Kconfig | 4 +-- drivers/ide/ide.c | 15 ++---------- drivers/ide/legacy/Makefile | 1 drivers/ide/legacy/ide-4drives.c | 46 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 16 deletions(-)
Documentation/ide.txt +3 -2
@@ -242,8 +242,6 @@ Summary of ide driver parameters for ker both the respective primary and secondary channel to take effect. - "idex=four" : four drives on idex and ide(x^1) share same ports - "idex=reset" : reset interface after probe "idex=ata66" : informs the interface that it has an 80c cable
@@ -276,6 +274,9 @@ Also for legacy CMD640 host driver (cmd6 kernel paremeter to enable probing for VLB version of the chipset (PCI ones are detected automatically). +You also need to use "probe" kernel paramater for ide-4drives driver +(support for IDE generic chipset with four drives on one port). + ================================================================================ IDE ATAPI streaming tape driver
drivers/ide/Kconfig +2 -2
@@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES Certain older chipsets, including the Tekram 690CD, use a single set of I/O ports at 0x1f0 to control up to four drives, instead of the customary two drives per port. Support for this can be enabled at - runtime using the "ide0=four" kernel boot parameter if you say Y - here. + runtime using the "ide_4drives.probe" kernel boot parameter if you + say Y here. config BLK_DEV_ALI14XX tristate "ALI M14xx support"
drivers/ide/ide.c +3 -12
@@ -989,6 +989,7 @@ extern int probe_dtc2278;extern int probe_ht6560b;extern int probe_qd65xx;extern int cmd640_vlb; +extern int probe_4drives;static int __initdata is_chipset_set[MAX_HWIFS ];
@@ -1213,19 +1214,9 @@ static int __init ide_setup(char *s)#endif #ifdef CONFIG_BLK_DEV_4DRIVES case -11 :/* "four" drives on one set of ports */ - { -ide_hwif_t *mate = &ide_hwifs[hw^1 ]; - mate->drives[0 ].select.all ^=0x20 ; - mate->drives[1 ].select.all ^=0x20 ; - hwif->chipset = mate->chipset = ide_4drives; - mate->irq = hwif->irq; -memcpy (mate->io_ports, hwif->io_ports,sizeof (hwif->io_ports)); - hwif->mate = mate; - mate->mate = hwif; - hwif->serialized = mate->serialized =1 ; + probe_4drives =1 ; goto obsolete_option; - } -#endif /* CONFIG_BLK_DEV_4DRIVES */ +#endif case -10 :/* minus10 */ case -9 :/* minus9 */ case -8 :/* minus8 */
drivers/ide/legacy/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_BLK_DEV_UMC8672) += umc867 obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o +obj-$(CONFIG_BLK_DEV_4DRIVES) += ide-4drives.o obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
drivers/ide/legacy/ide-4drives.c new file +46 -0
46 lines not on this page · raw message
Re: [PATCH 03/12] ide: add ide-4drives host driver
Quoted 35 lines · On Sat, 16 Feb 2008 17:39:11 +0100 Bartlomiej Zolnierkiewicz wrote:
CONFIG_BLK_DEV_4DRIVESdeserves its own host driver:* Add
drivers/ide/legacy/ide-4drives.cand move "4drives" support there.* Add ide-4drives.o in the link order after all other legacy host drivers enabled by "ide0=" options (they all are mutually exclusive).
* Make ide-4drives host driver probe itself for IDE devices instead of indirectly depending on
ide_generichost driver.* Add "probe" module parameter to ide-4drives and update documentation.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>--- Documentation/ide.txt | 5 ++-- drivers/ide/Kconfig | 4 +-- drivers/ide/ide.c | 15 ++---------- drivers/ide/legacy/Makefile | 1 drivers/ide/legacy/ide-4drives.c | 46 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 16 deletions(-)Index:
b/Documentation/ide.txt
===================================================================Documentation/ide.txt +0
-2@@ -242,8 +242,6 @@ Summary of ide driver parameters for ker both the respective primary and secondary channel to take effect. - "idex=four" : four drives on idex and ide(x^1) share same ports - "idex=reset" : reset interface after probe "idex=ata66" : informs the interface that it has an 80c cable
Documentation/ide.txt Also for legacy CMD640 host driver (cmd6 · line 277
Quoted 4 lines
Documentation/ide.txt +1
-0@@ -276,6 +274,9 @@ Also for legacy CMD640 host driver (cmd6 kernel paremeter to enable probing for VLB version of the chipset (PCI ones are detected automatically). +You also need to use "probe" kernel paramater for ide-4drives driver
parameter
Documentation/ide.txt Also for legacy CMD640 host driver (cmd6 · line 279
Quoted 2 lines
Documentation/ide.txt +2
-0+(support for IDE generic chipset with four drives on one port). +
---
~Randy
Re: [PATCH 03/12] ide: add ide-4drives host driver
On Saturday 16 February 2008, Randy Dunlap wrote:
[...]
Quoted 3 lines
Quoted 1 line
+You also need to use "probe" kernel paramater for ide-4drives driver
parameter
thanks, fixed in "take 2"
Re: [PATCH 03/12] ide: add ide-4drives host driver
In reply to Bartlomiej ZolnierkiewiczQuoted 19 lines · Bartlomiej Zolnierkiewicz
CONFIG_BLK_DEV_4DRIVESdeserves its own host driver:* Add
drivers/ide/legacy/ide-4drives.cand move "4drives" support there.* Add ide-4drives.o in the link order after all other legacy host drivers enabled by "ide0=" options (they all are mutually exclusive).
* Make ide-4drives host driver probe itself for IDE devices instead of indirectly depending on
ide_generichost driver.* Add "probe" module parameter to ide-4drives and update documentation.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Index: b/drivers/ide/Kconfig
===================================================================
drivers/ide/Kconfig config BLK_DEV_4DRIVES · line 1045
Quoted 6 lines
drivers/ide/Kconfig +1
-2@@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES Certain older chipsets, including the Tekram 690CD, use a single set of I/O ports at 0x1f0 to control up to four drives, instead of the customary two drives per port. Support for this can be enabled at - runtime using the "ide0=four" kernel boot parameter if you say Y - here. + runtime using the "ide_4drives.probe" kernel boot parameter if you
Not "ide-4drives.probe?
Looks correct otherwise.
MBR, Sergei
Re: [PATCH 03/12] ide: add ide-4drives host driver
Quoted 16 lines · Sergei Shtylyov
Quoted 13 lines · Bartlomiej Zolnierkiewicz
CONFIG_BLK_DEV_4DRIVESdeserves its own host driver:* Add
drivers/ide/legacy/ide-4drives.cand move "4drives" support there.* Add ide-4drives.o in the link order after all other legacy host drivers enabled by "ide0=" options (they all are mutually exclusive).
* Make ide-4drives host driver probe itself for IDE devices instead of indirectly depending on
ide_generichost driver.* Add "probe" module parameter to ide-4drives and update documentation.
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Quoted 14 lines
drivers/ide/Kconfig config BLK_DEV_4DRIVES · line 1045
Quoted 11 lines
Index: b/drivers/ide/Kconfig
===================================================================drivers/ide/Kconfig +1
-2@@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES Certain older chipsets, including the Tekram 690CD, use a single set of I/O ports at 0x1f0 to control up to four drives, instead of the customary two drives per port. Support for this can be enabled at - runtime using the "ide0=four" kernel boot parameter if you say Y - here. + runtime using the "ide_4drives.probe" kernel boot parameter if youNot "ide-4drives.probe?
Looks correct otherwise.
I believe that both versions are correct but I fixed this in 'take 3' to be on the safe side.
Thanks,
Bart
PATCH 4/12 cmd640: cleanup setup_device_ptrs()
In reply to Bartlomiej ZolnierkiewiczThis loop is no longer needed.
--- drivers/ide/pci/cmd640.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/ide/pci/cmd640.c +2 -12
@@ -409,19 +409,9 @@ static void __init check_prefetch (unsig*/ static void __init setup_device_ptrs (void ) { -unsigned int i; + cmd_hwif0 = &ide_hwifs[0 ]; + cmd_hwif1 = &ide_hwifs[1 ]; - cmd_hwif0 = &ide_hwifs[0 ];/* default, if not found below */ - cmd_hwif1 = &ide_hwifs[1 ];/* default, if not found below */ -for (i =0 ; i <MAX_HWIFS ; i++) { -ide_hwif_t *hwif = &ide_hwifs[i]; -if (hwif->chipset == ide_unknown) { -if (hwif->io_ports[IDE_DATA_OFFSET ] ==0x1f0 ) - cmd_hwif0 = hwif; -else if (hwif->io_ports[IDE_DATA_OFFSET ] ==0x170 ) - cmd_hwif1 = hwif; - } - } cmd_drives[0 ] = &cmd_hwif0->drives[0 ]; cmd_drives[1 ] = &cmd_hwif0->drives[1 ]; cmd_drives[2 ] = &cmd_hwif1->drives[0 ];
PATCH 5/12 cmd640: init hwif->{io_ports,irq} explicitly
In reply to Bartlomiej ZolnierkiewiczDo explicit port setup instead of depending on init_ide_data().
This way hwif->io_ports[] and hwif->irq are always correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI.
[ Remember to not break "idex=noprobe" parameter. ]
While at it fix printk().
--- drivers/ide/pci/cmd640.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)
drivers/ide/pci/cmd640.c +20 -3
@@ -712,8 +712,9 @@ static int __init cmd640x_init(void)int second_port_cmd640 =0 ;const char *bus_type, *port2;unsigned int index; -u8 b, cfr; +u8 b, cfr, oldnoprobe;u8 idx[4 ] = {0xff ,0xff ,0xff ,0xff }; +hw_regs_t hw[2 ];if (cmd640_vlb &&probe_for_cmd640_vlb ()) { bus_type ="VLB" ;
@@ -752,12 +753,25 @@ static int __init cmd640x_init(void)return 0 ; } +memset (&hw,0 ,sizeof (hw)); + +ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); + hw[0 ].irq =14 ; + +ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); + hw[1 ].irq =15 ; + +printk (KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" +"\n" ,'a' + cmd640_chip_version -1 , bus_type, cfr); +/* * Initialize data for primary port */ setup_device_ptrs (); -printk ("%s: buggy cmd640%c interface on %s, config=0x%02x\n" , - cmd_hwif0->name,'a' + cmd640_chip_version -1 , bus_type, cfr); + + oldnoprobe = cmd_hwif0->noprobe; +ide_init_port_hw (cmd_hwif0, &hw[0 ]); + cmd_hwif0->noprobe = oldnoprobe;#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED cmd_hwif0->set_pio_mode = &cmd640_set_pio_mode;#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
@@ -809,6 +823,9 @@ static int __init cmd640x_init(void)* Initialize data for secondary cmd640 port, if enabled */ if (second_port_cmd640) { + oldnoprobe = cmd_hwif1->noprobe; +ide_init_port_hw (cmd_hwif1, &hw[1 ]); + cmd_hwif1->noprobe = oldnoprobe;#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED cmd_hwif1->set_pio_mode = &cmd640_set_pio_mode;#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
PATCH 6/12 ide: limit legacy VLB host drivers to alpha, x86 and mips
In reply to Bartlomiej ZolnierkiewiczThese host drivers indirectly depend on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y which is defined only on alpha, x86, ia64, m32r, mips and ppc32.
Moreover:
- on ia64 there is no ISA
- m32r is too new for VLB
- on ppc32 ISA is available only on PPC_CHRP (no default IDE ports) and PPC_PREP (marked as BROKEN)
[ the common sense tells me that VLB was only used on x86 but there
are urban legends that one of these host drivers was needed on some other arch - thus the extra care ]
--- drivers/ide/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/Kconfig +1 -1
@@ -1031,7 +1031,7 @@ config IDE_EXT_DIRECT endchoice # no isa -> no vlb -if ISA +if ISA && (ALPHA || X86 || MIPS) comment "Other IDE chipsets support" comment "Note: most of these also require special kernel boot parameters"
PATCH 7/12 ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers
In reply to Bartlomiej ZolnierkiewiczDo explicit port setup in legacy VLB host drivers instead of depending on init_ide_data(). This way hwif->io_ports[] and hwif->irq are always correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI.
[ No need to care about "idex=noprobe" parameter for these drivers
as they need to be explicitly enabled with "probe" parameter. ]
--- drivers/ide/legacy/ali14xx.c | 12 ++++++++++++ drivers/ide/legacy/dtc2278.c | 12 ++++++++++++ drivers/ide/legacy/ht6560b.c | 12 ++++++++++++ drivers/ide/legacy/ide-4drives.c | 10 +++++++--- drivers/ide/legacy/qd65xx.c | 19 +++++++++++++++++-- drivers/ide/legacy/umc8672.c | 12 ++++++++++++ 6 files changed, 72 insertions(+), 5 deletions(-)
drivers/ide/legacy/ali14xx.c +12 -0
@@ -200,6 +200,7 @@ static const struct ide_port_info ali14xstatic int __init ali14xx_probe (void ) {static u8 idx[4 ] = {0 ,1 ,0xff ,0xff }; +hw_regs_t hw[2 ];printk (KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n" , basePort, regOn);
@@ -210,6 +211,17 @@ static int __init ali14xx_probe(void)return 1 ; } +memset (&hw,0 ,sizeof (hw)); + +ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); + hw[0 ].irq =14 ; + +ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); + hw[1 ].irq =15 ; + +ide_init_port_hw (&ide_hwifs[0 ], &hw[0 ]); +ide_init_port_hw (&ide_hwifs[1 ], &hw[1 ]); + ide_hwifs[0 ].set_pio_mode = &ali14xx_set_pio_mode; ide_hwifs[1 ].set_pio_mode = &ali14xx_set_pio_mode;
drivers/ide/legacy/dtc2278.c +12 -0
@@ -103,6 +103,7 @@ static int __init dtc2278_probe(void)unsigned long flags;ide_hwif_t *hwif, *mate;static u8 idx[4 ] = {0 ,1 ,0xff ,0xff }; +hw_regs_t hw[2 ]; hwif = &ide_hwifs[0 ]; mate = &ide_hwifs[1 ];
@@ -128,6 +129,17 @@ static int __init dtc2278_probe(void)#endif local_irq_restore (flags); +memset (&hw,0 ,sizeof (hw)); + +ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); + hw[0 ].irq =14 ; + +ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); + hw[1 ].irq =15 ; + +ide_init_port_hw (hwif, &hw[0 ]); +ide_init_port_hw (mate, &hw[1 ]); + hwif->set_pio_mode = &dtc2278_set_pio_mode;ide_device_add (idx, &dtc2278_port_info);
drivers/ide/legacy/ht6560b.c +12 -0
@@ -331,6 +331,7 @@ static int __init ht6560b_init(void) {ide_hwif_t *hwif, *mate;static u8 idx[4 ] = {0 ,1 ,0xff ,0xff }; +hw_regs_t hw[2 ];if (probe_ht6560b ==0 )return -ENODEV ;
@@ -349,6 +350,17 @@ static int __init ht6560b_init(void) goto release_region; } +memset (&hw,0 ,sizeof (hw)); + +ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); + hw[0 ].irq =14 ; + +ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); + hw[1 ].irq =15 ; + +ide_init_port_hw (hwif, &hw[0 ]); +ide_init_port_hw (mate, &hw[1 ]); + hwif->selectproc = &ht6560b_selectproc; hwif->set_pio_mode = &ht6560b_set_pio_mode;
drivers/ide/legacy/ide-4drives.c +7 -3
@@ -13,6 +13,7 @@ static int __init ide_4drives_init(void) {ide_hwif_t *hwif, *mate;u8 idx[4 ] = {0 ,1 ,0xff ,0xff }; +hw_regs_t hw;if (probe_4drives ==0 )return -ENODEV ;
@@ -20,11 +21,14 @@ static int __init ide_4drives_init(void) hwif = &ide_hwifs[0 ]; mate = &ide_hwifs[1 ]; -memcpy (mate->io_ports, hwif->io_ports,sizeof (hwif->io_ports)); +memset (&hw,0 ,sizeof (hw)); - mate->irq = hwif->irq; +ide_std_init_ports (&hw,0x1f0 ,0x3f6 ); + hw.irq =14 ; + hw.chipset = ide_4drives; - mate->chipset = hwif->chipset = ide_4drives; +ide_init_port_hw (hwif, &hw); +ide_init_port_hw (mate, &hw); mate->drives[0 ].select.all ^=0x20 ; mate->drives[1 ].select.all ^=0x20 ;
drivers/ide/legacy/qd65xx.c +17 -2
@@ -389,9 +389,9 @@ static const struct ide_port_info qd65xxstatic int __init qd_probe (int base) {ide_hwif_t *hwif; +u8 config, unit;u8 idx[4 ] = {0xff ,0xff ,0xff ,0xff }; -u8 config; -u8 unit; +hw_regs_t hw[2 ]; config =inb (QD_CONFIG_PORT );
@@ -400,6 +400,14 @@ static int __init qd_probe(int base) unit = ! (config &QD_CONFIG_IDE_BASEPORT ); +memset (&hw,0 ,sizeof (hw)); + +ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); + hw[0 ].irq =14 ; + +ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); + hw[1 ].irq =15 ; +if ((config &0xf0 ) ==QD_CONFIG_QD6500 ) {if (qd_testreg (base))return 1 ;/* bad register */
@@ -416,6 +424,8 @@ static int __init qd_probe(int base)return 1 ; } +ide_init_port_hw (hwif, &hw[unit]); +qd_setup (hwif, base, config); hwif->port_init_devs = qd6500_port_init_devs;
@@ -451,6 +461,8 @@ static int __init qd_probe(int base)printk (KERN_INFO "%s: qd6580: single IDE board\n" , hwif->name); +ide_init_port_hw (hwif, &hw[unit]); +qd_setup (hwif, base, config | (control <<8 )); hwif->port_init_devs = qd6580_port_init_devs;
@@ -472,6 +484,9 @@ static int __init qd_probe(int base)printk (KERN_INFO "%s&%s: qd6580: dual IDE board\n" , hwif->name, mate->name); +ide_init_port_hw (hwif, &hw[0 ]); +ide_init_port_hw (mate, &hw[1 ]); +qd_setup (hwif, base, config | (control <<8 )); hwif->port_init_devs = qd6580_port_init_devs;
drivers/ide/legacy/umc8672.c +12 -0
@@ -130,6 +130,7 @@ static int __init umc8672_probe(void) {unsigned long flags;static u8 idx[4 ] = {0 ,1 ,0xff ,0xff }; +hw_regs_t hw[2 ];if (!request_region (0x108 ,2 ,"umc8672" )) {printk (KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n" );
@@ -148,6 +149,17 @@ static int __init umc8672_probe(void)umc_set_speeds (current_speeds);local_irq_restore (flags); +memset (&hw,0 ,sizeof (hw)); + +ide_std_init_ports (&hw[0 ],0x1f0 ,0x3f6 ); + hw[0 ].irq =14 ; + +ide_std_init_ports (&hw[1 ],0x170 ,0x376 ); + hw[1 ].irq =15 ; + +ide_init_port_hw (&ide_hwifs[0 ], &hw[0 ]); +ide_init_port_hw (&ide_hwifs[1 ], &hw[1 ]); + ide_hwifs[0 ].set_pio_mode = &umc_set_pio_mode; ide_hwifs[1 ].set_pio_mode = &umc_set_pio_mode;
PATCH 8/12 ide: remove needless hwif->irq check from ide_hwif_configure()
In reply to Bartlomiej Zolnierkiewiczide_init_default_irq() is always zero for CONFIG_PCI=y so hwif->irq check in ide_hwif_configure() can be safely removed.
--- drivers/ide/setup-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/setup-pci.c +1 -1
@@ -371,7 +371,7 @@ static ide_hwif_t *ide_hwif_configure(streturn NULL ;/* no room in ide_hwifs[] */ memset (&hw,0 ,sizeof (hw)); - hw.irq = hwif->irq ? hwif->irq : irq; + hw.irq = irq; hw.dev = &dev->dev; hw.chipset = d->chipset ? d->chipset : ide_pci;ide_std_init_ports (&hw, base, ctl |2 );
PATCH 9/12 ide: move default IDE ports setup to ide_generic host driver
In reply to Bartlomiej Zolnierkiewicz* Make CONFIG_IDE_GENERIC depended on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS.
* Move default IDE ports setup from init_ide_data() to ide_generic host driver (remembering to not break "idex=noprobe" parameter).
* Use ide_init_port_hw() in ide_generic host driver.
* Remove no longer needed CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS.
--- drivers/ide/Kconfig | 4 +--- drivers/ide/ide-generic.c | 16 +++++++++++++--- drivers/ide/ide.c | 18 ------------------ 3 files changed, 14 insertions(+), 24 deletions(-)
drivers/ide/Kconfig +1 -3
@@ -307,6 +307,7 @@ comment "IDE chipset support/bugfixes" config IDE_GENERIC tristate "generic/default IDE chipset support" + depends on ALPHA || X86 || IA64 || M32R || MIPS || PPC32 help If unsure, say N.
@@ -1096,9 +1097,6 @@ config BLK_DEV_IDEDMA def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \ BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA -config IDE_ARCH_OBSOLETE_DEFAULTS - def_bool ALPHA || X86 || IA64 || M32R || MIPS || PPC32 - endif config BLK_DEV_HD_ONLY
drivers/ide/ide-generic.c +13 -3
@@ -94,11 +94,21 @@ static int __init ide_generic_init(void)for (i =0 ; i <MAX_HWIFS ; i++) {ide_hwif_t *hwif = &ide_hwifs[i]; +unsigned long io_addr =ide_default_io_base (i); +hw_regs_t hw; + +if (hwif->chipset == ide_unknown && io_addr) { +u8 oldnoprobe = hwif->noprobe; + +memset (&hw,0 ,sizeof (hw)); +ide_std_init_ports (&hw, io_addr, io_addr +0x206 ); + hw.irq =ide_init_default_irq (io_addr); +ide_init_port_hw (hwif, &hw); + + hwif->noprobe = oldnoprobe; -if (hwif->io_ports[IDE_DATA_OFFSET ] && - hwif->chipset == ide_unknown) idx[i] = i; -else + }else idx[i] =0xff ; }
drivers/ide/ide.c +0 -18
@@ -167,12 +167,6 @@ static void ide_port_init_devices_data(i } } -#ifndef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS -# define ide_default_io_base (index) (0) -# define ide_default_irq (base) (0) -# define ide_init_default_irq (base) (0) -#endif -/* * init_ide_data() sets reasonable default values into all fields * of all instances of the hwifs and drives, but only on the first call.
@@ -195,7 +189,6 @@ static void __init init_ide_data (void) {unsigned int index;static unsigned long magic_cookie =MAGIC_COOKIE ; -hw_regs_t hw;if (magic_cookie !=MAGIC_COOKIE )return ;/* already initialized */
@@ -204,19 +197,8 @@ static void __init init_ide_data (void)/* Initialise all interface structures */ for (index =0 ; index <MAX_HWIFS ; ++index) {ide_hwif_t *hwif = &ide_hwifs[index]; -unsigned long io_addr =ide_default_io_base (index); -unsigned long ctl_addr = io_addr +0x206 ;ide_init_port_data (hwif, index); - -#ifdef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS -memset (&hw,0 ,sizeof (hw)); -ide_std_init_ports (&hw, io_addr, ctl_addr); -memcpy (hwif->io_ports, hw.io_ports,sizeof (hw.io_ports)); - hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET ]; - hwif->irq = -ide_init_default_irq (hwif->io_ports[IDE_DATA_OFFSET ]); -#endif } }
PATCH 10/12 ide: remove ide_init_default_irq() macro
In reply to Bartlomiej Zolnierkiewicz* Use ide_default_irq() instead of ide_init_default_irq() in ide_generic host driver (so the correct IRQ is always set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI).
* Remove no longer needed ide_init_default_irq() macro.
--- drivers/ide/ide-generic.c | 2 +- include/asm-alpha/ide.h | 6 ------ include/asm-ia64/ide.h | 6 ------ include/asm-m32r/ide.h | 6 ------ include/asm-mips/mach-generic/ide.h | 6 ------ include/asm-powerpc/ide.h | 6 ------ include/asm-x86/ide.h | 6 ------ 7 files changed, 1 insertion(+), 37 deletions(-)
drivers/ide/ide-generic.c +1 -1
@@ -102,7 +102,7 @@ static int __init ide_generic_init(void)memset (&hw,0 ,sizeof (hw));ide_std_init_ports (&hw, io_addr, io_addr +0x206 ); - hw.irq =ide_init_default_irq (io_addr); + hw.irq =ide_default_irq (io_addr);ide_init_port_hw (hwif, &hw); hwif->noprobe = oldnoprobe;
include/asm-alpha/ide.h +0 -6
@@ -37,12 +37,6 @@ static inline unsigned long ide_default_ } } -#ifdef CONFIG_PCI -#define ide_init_default_irq (base) (0) -#else -#define ide_init_default_irq (base) ide_default_irq(base) -#endif -#include <asm-generic/ide_iops.h> #endif /* __KERNEL__ */
include/asm-ia64/ide.h +0 -6
@@ -44,12 +44,6 @@ static inline unsigned long ide_default_ } } -#ifdef CONFIG_PCI -#define ide_init_default_irq (base) (0) -#else -#define ide_init_default_irq (base) ide_default_irq(base) -#endif -#include <asm-generic/ide_iops.h> #endif /* __KERNEL__ */
include/asm-m32r/ide.h +0 -6
@@ -63,12 +63,6 @@ static __inline__ unsigned long ide_defa } } -#ifdef CONFIG_BLK_DEV_IDEPCI -#define ide_init_default_irq (base) (0) -#else -#define ide_init_default_irq (base) ide_default_irq(base) -#endif -#include <asm-generic/ide_iops.h> #endif /* __KERNEL__ */
include/asm-mips/mach-generic/ide.h +0 -6
@@ -96,12 +96,6 @@ static __inline__ unsigned long ide_defa } } -#ifdef CONFIG_BLK_DEV_IDEPCI -#define ide_init_default_irq (base) (0) -#else -#define ide_init_default_irq (base) ide_default_irq(base) -#endif -/* MIPS port and memory-mapped I/O string operations. */ static inline void __ide_flush_prologue (void ) {
include/asm-powerpc/ide.h +0 -6
@@ -73,12 +73,6 @@ static __inline__ unsigned long ide_defareturn 0 ; } -#ifdef CONFIG_PCI -#define ide_init_default_irq (base) (0) -#else -#define ide_init_default_irq (base) ide_default_irq(base) -#endif -#ifdef CONFIG_BLK_DEV_MPC8xx_IDE#define IDE_ARCH_ACK_INTR 1#define ide_ack_intr (hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
include/asm-x86/ide.h +0 -6
@@ -58,12 +58,6 @@ static __inline__ unsigned long ide_defa } } -#ifdef CONFIG_BLK_DEV_IDEPCI -#define ide_init_default_irq (base) (0) -#else -#define ide_init_default_irq (base) ide_default_irq(base) -#endif -#include <asm-generic/ide_iops.h> #endif /* __KERNEL__ */
PATCH 11/12 ide: cleanup ide_match_hwif()
In reply to Bartlomiej Zolnierkiewicz* Remove no longer needed matching against I/O base and 'io_base' argument.
* Move printk() to the caller and remove 'name' argument.
--- drivers/ide/setup-pci.c | 47 +++++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 32 deletions(-)
drivers/ide/setup-pci.c +15 -32
@@ -22,42 +22,20 @@/** -* ide_match_hwif - match a PCI IDE against an ide_hwif -* @io_base: I/O base of device -* @bootable: set if its bootable -* @name: name of device +* ide_match_hwif - find free ide_hwifs[] slot +* @bootable: bootable flag * -* Match a PCI IDE port against an entry in ide_hwifs[], -* based on io_base port if possible. Return the matching hwif, -* or a new hwif. If we find an error (clashing, out of devices, etc) -* return NULL -* -* FIXME: we need to handle mmio matches here too +* Return the new hwif. If we are out of free slots return NULL. */ -static ide_hwif_t *ide_match_hwif (unsigned long io_base,u8 bootable,const char *name) +static ide_hwif_t *ide_match_hwif (u8 bootable) { -int h;ide_hwif_t *hwif; +int h;/* -* Look for a hwif with matching io_base default value. -* If chipset is "ide_unknown", then claim that hwif slot. -* Otherwise, some other chipset has already claimed it.. :( -*/ -for (h =0 ; h <MAX_HWIFS ; ++h) { - hwif = &ide_hwifs[h]; -if (hwif->io_ports[IDE_DATA_OFFSET ] == io_base) { -if (hwif->chipset == ide_unknown) -return hwif;/* match */ -printk (KERN_ERR "%s: port 0x%04lx already claimed by %s\n" , - name, io_base, hwif->name); -return NULL ;/* already claimed */ - } - } -/* -* Okay, there is no hwif matching our io_base, -* so we'll just claim an unassigned slot. +* Claim an unassigned slot. +* * Give preference to claiming other slots before claiming ide0/ide1, * just in case there's another interface yet-to-be-scanned * which uses ports 1f0/170 (the ide0/ide1 defaults).
@@ -83,7 +61,7 @@ static ide_hwif_t *ide_match_hwif(unsignif (hwif->chipset == ide_unknown)return hwif;/* pick an unused entry */ } -printk (KERN_ERR "%s: too many IDE interfaces, no room in table\n" , name); +return NULL ; }
@@ -367,8 +345,13 @@ static ide_hwif_t *ide_hwif_configure(st ctl = port ?0x374 :0x3f4 ; base = port ?0x170 :0x1f0 ; } -if ((hwif =ide_match_hwif (base, bootable, d->name)) ==NULL ) -return NULL ;/* no room in ide_hwifs[] */ + + hwif =ide_match_hwif (bootable); +if (hwif ==NULL ) { +printk (KERN_ERR "%s: too many IDE interfaces, no room in " +"table\n" , d->name); +return NULL ; + }memset (&hw,0 ,sizeof (hw)); hw.irq = irq;
PATCH 12/12 ide: cleanup ide_find_port()
In reply to Bartlomiej ZolnierkiewiczRemove no longer needed matching against I/O base and 'base' argument.
--- drivers/ide/arm/bast-ide.c | 2 +- drivers/ide/arm/icside.c | 2 +- drivers/ide/arm/ide_arm.c | 2 +- drivers/ide/arm/palm_bk3710.c | 2 +- drivers/ide/arm/rapide.c | 2 +- drivers/ide/cris/ide-cris.c | 2 +- drivers/ide/h8300/ide-h8300.c | 3 +-- drivers/ide/ide-generic.c | 2 +- drivers/ide/ide-pnp.c | 2 +- drivers/ide/ide.c | 15 +++------------ drivers/ide/legacy/buddha.c | 2 +- drivers/ide/legacy/falconide.c | 2 +- drivers/ide/legacy/gayle.c | 2 +- drivers/ide/legacy/ide-cs.c | 2 +- drivers/ide/legacy/ide_platform.c | 2 +- drivers/ide/legacy/macide.c | 2 +- drivers/ide/legacy/q40ide.c | 2 +- drivers/ide/pci/delkin_cb.c | 2 +- include/linux/ide.h | 2 +- 19 files changed, 21 insertions(+), 31 deletions(-)
drivers/ide/arm/bast-ide.c +1 -1
@@ -41,7 +41,7 @@ static int __init bastide_register(unsig hw.io_ports[IDE_CONTROL_OFFSET ] = aux + (6 *0x20 ); hw.irq = irq; - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif ==NULL ) goto out;
drivers/ide/arm/icside.c +1 -1
@@ -400,7 +400,7 @@ icside_setup(void __iomem *base, structunsigned long port = (unsigned long )base + info->dataoffset;ide_hwif_t *hwif; - hwif =ide_find_port (port); + hwif =ide_find_port ();if (hwif) {int i;
drivers/ide/arm/ide_arm.c +1 -1
@@ -34,7 +34,7 @@ static int __init ide_arm_init(void)ide_std_init_ports (&hw,IDE_ARM_IO ,IDE_ARM_IO +0x206 ); hw.irq =IDE_ARM_IRQ ; - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif) {ide_init_port_hw (hwif, &hw); idx[0 ] = hwif->index;
drivers/ide/arm/palm_bk3710.c +1 -1
@@ -378,7 +378,7 @@ static int __devinit palm_bk3710_probe(s hw.irq = irq->start; hw.chipset = ide_palm3710; - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif ==NULL ) goto out;
drivers/ide/arm/rapide.c +1 -1
@@ -44,7 +44,7 @@ rapide_probe(struct expansion_card *ec, goto release; } - hwif =ide_find_port ((unsigned long )base); + hwif =ide_find_port ();if (hwif) {memset (&hw,0 ,sizeof (hw));rapide_setup_ports (&hw, base, base +0x818 ,1 <<6 , ec->irq);
drivers/ide/cris/ide-cris.c +1 -1
@@ -804,7 +804,7 @@ static int __init init_e100_ide(void)cris_setup_ports (&hw,cris_ide_base_address (h)); - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif ==NULL )continue ;ide_init_port_data (hwif, hwif->index);
drivers/ide/h8300/ide-h8300.c +1 -2
@@ -99,8 +99,7 @@ static int __init h8300_ide_init(void)hw_setup (&hw); -/* register if */ - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif ==NULL ) {printk (KERN_ERR "ide-h8300: IDE I/F register failed\n" );return -ENOENT ;
drivers/ide/ide-generic.c +1 -1
@@ -33,7 +33,7 @@ static ssize_t store_add(struct class *cif (sscanf (buf,"%x:%x:%d" , &base, &ctl, &irq) !=3 )return -EINVAL ; - hwif =ide_find_port (base); + hwif =ide_find_port ();if (hwif ==NULL )return -ENOENT ;
drivers/ide/ide-pnp.c +1 -1
@@ -38,7 +38,7 @@ static int idepnp_probe(struct pnp_dev * pnp_port_start(dev, 1)); hw.irq =pnp_irq (dev,0 ); - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif) {u8 index = hwif->index;u8 idx[4 ] = { index,0xff ,0xff ,0xff };
drivers/ide/ide.c +3 -12
@@ -234,28 +234,19 @@ static int ide_system_bus_speed(void)return pci_dev_present (pci_default) ?33 :50 ; } -ide_hwif_t *ide_find_port (unsigned long base) +ide_hwif_t *ide_find_port (void ) {ide_hwif_t *hwif;int i;for (i =0 ; i <MAX_HWIFS ; i++) { hwif = &ide_hwifs[i]; -if (hwif->io_ports[IDE_DATA_OFFSET ] == base) - goto found; - } - -for (i =0 ; i <MAX_HWIFS ; i++) { - hwif = &ide_hwifs[i];if (hwif->chipset == ide_unknown) - goto found; +return hwif; } - hwif =NULL ; -found: -return hwif; +return NULL ; } -EXPORT_SYMBOL_GPL (ide_find_port); static struct resource* hwif_request_region(ide_hwif_t *hwif,
drivers/ide/legacy/buddha.c +1 -1
@@ -221,7 +221,7 @@ fail_base2:buddha_setup_ports (&hw, base, ctl, irq_port, ack_intr); - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif) {u8 index = hwif->index;
drivers/ide/legacy/falconide.c +1 -1
@@ -76,7 +76,7 @@ static int __init falconide_init(void)falconide_setup_ports (&hw); - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif) {u8 index = hwif->index;u8 idx[4 ] = { index,0xff ,0xff ,0xff };
drivers/ide/legacy/gayle.c +1 -1
@@ -175,7 +175,7 @@ found:gayle_setup_ports (&hw, base, ctrlport, irqport, ack_intr); - hwif =ide_find_port (base); + hwif =ide_find_port ();if (hwif) {u8 index = hwif->index;
drivers/ide/legacy/ide-cs.c +1 -1
@@ -156,7 +156,7 @@ static int idecs_register(unsigned long hw.chipset = ide_pci; hw.dev = &handle->dev; - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif ==NULL )return -1 ;
drivers/ide/legacy/ide_platform.c +1 -1
@@ -89,7 +89,7 @@ static int __devinit plat_ide_probe(stru res_alt->start, res_alt->end - res_alt->start + 1); } - hwif =ide_find_port ((unsigned long )base); + hwif =ide_find_port ();if (!hwif) { ret = -ENODEV ; goto out;
drivers/ide/legacy/macide.c +1 -1
@@ -120,7 +120,7 @@ static int __init macide_init(void)macide_setup_ports (&hw, base, irq, ack_intr); - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif) {u8 index = hwif->index;u8 idx[4 ] = { index,0xff ,0xff ,0xff };
drivers/ide/legacy/q40ide.c +1 -1
@@ -137,7 +137,7 @@ static int __init q40ide_init(void)// m68kide_iops, q40ide_default_irq(pcide_bases[i])); - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif) {ide_init_port_data (hwif, hwif->index);ide_init_port_hw (hwif, &hw);
drivers/ide/pci/delkin_cb.c +1 -1
@@ -78,7 +78,7 @@ delkin_cb_probe (struct pci_dev *dev, co hw.irq = dev->irq; hw.chipset = ide_pci;/* this enables IRQ sharing */ - hwif =ide_find_port (hw.io_ports[IDE_DATA_OFFSET ]); + hwif =ide_find_port ();if (hwif ==NULL ) goto out_disable;
include/linux/ide.h +1 -1
@@ -171,7 +171,7 @@ typedef struct hw_regs_s {struct device *dev; } hw_regs_t; -struct hwif_s *ide_find_port (unsigned long ); +struct hwif_s *ide_find_port (void );void ide_init_port_data (struct hwif_s *,unsigned int );void ide_init_port_hw (struct hwif_s *,hw_regs_t *);