sgiioc4: use ide_find_port()
PATCH 1/9 sgiioc4: use ide_find_port()
There should be no functional changes caused by this patch.
--- drivers/ide/pci/sgiioc4.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/ide/pci/sgiioc4.c +2 -10
@@ -591,20 +591,12 @@ sgiioc4_ide_setup_pci_device(struct pci_unsigned long bar0, cmd_phys_base, ctl;void __iomem *virt_base;ide_hwif_t *hwif; -int h;u8 idx[4 ] = {0xff ,0xff ,0xff ,0xff };hw_regs_t hw;struct ide_port_info d = sgiioc4_port_info; -/* -* Find an empty HWIF; if none available, return -ENOMEM. -*/ -for (h =0 ; h <MAX_HWIFS ; ++h) { - hwif = &ide_hwifs[h]; -if (hwif->chipset == ide_unknown) -break ; - } -if (h ==MAX_HWIFS ) { + hwif =ide_find_port (); +if (hwif ==NULL ) {printk (KERN_ERR "%s: too many IDE interfaces, no room in table\n" ,DRV_NAME );return -ENOMEM ;
PATCH 2/9 au1xxx-ide: use ide_find_port()
--- drivers/ide/mips/au1xxx-ide.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/ide/mips/au1xxx-ide.c +5 -3
@@ -603,9 +603,11 @@ static int au_ide_probe(struct device *d goto out; } -/* FIXME: This might possibly break PCMCIA IDE devices */ - - hwif = &ide_hwifs[pdev->id]; + hwif =ide_find_port (); +if (hwif ==NULL ) { + ret = -ENOENT ; + goto out; + }memset (&hw,0 ,sizeof (hw));auide_setup_ports (&hw, ahwif);
PATCH 3/9 cmd640: remove cmd_drives[]
In reply to Bartlomiej Zolnierkiewicz* Pass 'ide_drive_t *drive' to check_prefetch(), set_prefetch_mode(), program_drive_counts() and cmd640_set_mode().
* Remove no longer needed cmd_drives[].
* Inline setup_device_ptrs() helper in cmd640x_init().
--- drivers/ide/pci/cmd640.c | 67 ++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 40 deletions(-)
drivers/ide/pci/cmd640.c +27 -40
@@ -185,7 +185,6 @@ static DEFINE_SPINLOCK(cmd640_lock);* These are initialized to point at the devices we control */ static ide_hwif_t *cmd_hwif0, *cmd_hwif1; -static ide_drive_t *cmd_drives[4 ];/* * Interface to access cmd640x registers
@@ -386,9 +385,8 @@ static void cmd640_dump_regs (void)* Check whether prefetch is on for a drive, * and initialize the unmask flags for safe operation. */ -static void __init check_prefetch (unsigned int index) +static void __init check_prefetch (ide_drive_t *drive,unsigned int index) { -ide_drive_t *drive = cmd_drives[index];u8 b =get_cmd640_reg (prefetch_regs[index]);if (b & prefetch_masks[index]) {/* is prefetch off? */
@@ -404,28 +402,13 @@ static void __init check_prefetch (unsig } } -/* -* Figure out which devices we control -*/ -static void __init setup_device_ptrs (void ) -{ - cmd_hwif0 = &ide_hwifs[0 ]; - cmd_hwif1 = &ide_hwifs[1 ]; - - cmd_drives[0 ] = &cmd_hwif0->drives[0 ]; - cmd_drives[1 ] = &cmd_hwif0->drives[1 ]; - cmd_drives[2 ] = &cmd_hwif1->drives[0 ]; - cmd_drives[3 ] = &cmd_hwif1->drives[1 ]; -} -#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED /* * Sets prefetch mode for a drive. */ -static void set_prefetch_mode (unsigned int index,int mode) +static void set_prefetch_mode (ide_drive_t *drive,unsigned int index,int mode) { -ide_drive_t *drive = cmd_drives[index];unsigned long flags;int reg = prefetch_regs[index];u8 b;
@@ -508,7 +491,7 @@ static void __init retrieve_drive_counts* This routine writes the prepared setup/active/recovery counts * for a drive into the cmd640 chipset registers to active them. */ -static void program_drive_counts (unsigned int index) +static void program_drive_counts (ide_drive_t *drive,unsigned int index) {unsigned long flags;u8 setup_count = setup_counts[index];
@@ -522,8 +505,11 @@ static void program_drive_counts (unsign* so we merge the timings, using the slowest value for each timing. */ if (index >1 ) { -unsigned int mate; -if (cmd_drives[mate = index ^1 ]->present) { +ide_hwif_t *hwif = drive->hwif; +ide_drive_t *peer = &hwif->drives[!drive->select.b.unit]; +unsigned int mate = index ^1 ; + +if (peer->present) {if (setup_count < setup_counts[mate]) setup_count = setup_counts[mate];if (active_count < active_counts[mate])
@@ -562,7 +548,8 @@ static void program_drive_counts (unsign/* * Set a specific pio_mode for a drive */ -static void cmd640_set_mode (unsigned int index,u8 pio_mode,unsigned int cycle_time) +static void cmd640_set_mode (ide_drive_t *drive,unsigned int index, +u8 pio_mode,unsigned int cycle_time) {int setup_time, active_time, recovery_time, clock_time;u8 setup_count, active_count, recovery_count, recovery_count2, cycle_count;
@@ -611,7 +598,7 @@ static void cmd640_set_mode (unsigned in* 1) this is the wrong place to do it (proper is do_special() in ide.c) * 2) in practice this is rarely, if ever, necessary */ -program_drive_counts (index); +program_drive_counts (drive, index); }static void cmd640_set_pio_mode (ide_drive_t *drive,const u8 pio)
@@ -619,13 +606,6 @@ static void cmd640_set_pio_mode(ide_drivunsigned int index =0 , cycle_time;u8 b; -while (drive != cmd_drives[index]) { -if (++index >3 ) { -printk (KERN_ERR "%s: bad news in %s\n" , - drive->name, __FUNCTION__); -return ; - } - }switch (pio) {case 6 :/* set fast-devsel off */ case 7 :/* set fast-devsel on */
@@ -638,13 +618,13 @@ static void cmd640_set_pio_mode(ide_drivcase 8 :/* set prefetch off */ case 9 :/* set prefetch on */ -set_prefetch_mode (index, pio &1 ); +set_prefetch_mode (drive, index, pio &1 );printk ("%s: %sabled cmd640 prefetch\n" , drive->name, (pio &1 ) ?"en" :"dis" );return ; } cycle_time =ide_pio_cycle_time (drive, pio); -cmd640_set_mode (index, pio, cycle_time); +cmd640_set_mode (drive, index, pio, cycle_time);printk ("%s: selected cmd640 PIO mode%d (%dns)" , drive->name, pio, cycle_time);
@@ -764,11 +744,12 @@ static int __init cmd640x_init(void)printk (KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" "\n" ,'a' + cmd640_chip_version -1 , bus_type, cfr); + cmd_hwif0 = &ide_hwifs[0 ]; + cmd_hwif1 = &ide_hwifs[1 ]; +/* * Initialize data for primary port */ -setup_device_ptrs (); - oldnoprobe = cmd_hwif0->noprobe;ide_init_port_hw (cmd_hwif0, &hw[0 ]); cmd_hwif0->noprobe = oldnoprobe;
@@ -840,7 +821,13 @@ static int __init cmd640x_init(void)* Do not unnecessarily disturb any prior BIOS setup of these. */ for (index =0 ; index < (2 + (second_port_cmd640 <<1 )); index++) { -ide_drive_t *drive = cmd_drives[index]; +ide_drive_t *drive; + +if (index >1 ) + drive = &cmd_hwif1->drives[index &1 ]; +else + drive = &cmd_hwif0->drives[index &1 ]; +#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED if (drive->autotune || ((index >1 ) && second_port_toggled)) {/*
@@ -850,8 +837,8 @@ static int __init cmd640x_init(void) setup_counts [index] =4 ;/* max possible */ active_counts [index] =16 ;/* max possible */ recovery_counts [index] =16 ;/* max possible */ -program_drive_counts (index); -set_prefetch_mode (index,0 ); +program_drive_counts (drive, index); +set_prefetch_mode (drive, index,0 );printk ("cmd640: drive%d timings/prefetch cleared\n" , index); }else {/*
@@ -859,7 +846,7 @@ static int __init cmd640x_init(void)* This preserves any prior BIOS setup. */ retrieve_drive_counts (index); -check_prefetch (index); +check_prefetch (drive, index);printk ("cmd640: drive%d timings/prefetch(%s) preserved" , index, drive->no_io_32bit ?"off" :"on" );display_clocks (index);
@@ -868,7 +855,7 @@ static int __init cmd640x_init(void)/* * Set the drive unmask flags to match the prefetch setting */ -check_prefetch (index); +check_prefetch (drive, index);printk ("cmd640: drive%d timings/prefetch(%s) preserved\n" , index, drive->no_io_32bit ?"off" :"on" );#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
PATCH 4/9 cmd640: use ide_find_port()
In reply to Bartlomiej Zolnierkiewicz--- drivers/ide/pci/cmd640.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-)
drivers/ide/pci/cmd640.c +18 -12
@@ -744,20 +744,21 @@ static int __init cmd640x_init(void)printk (KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" "\n" ,'a' + cmd640_chip_version -1 , bus_type, cfr); - cmd_hwif0 = &ide_hwifs[0 ]; - cmd_hwif1 = &ide_hwifs[1 ]; + cmd_hwif0 =ide_find_port ();/* * Initialize data for primary port */ - oldnoprobe = cmd_hwif0->noprobe; -ide_init_port_hw (cmd_hwif0, &hw[0 ]); - cmd_hwif0->noprobe = oldnoprobe; +if (cmd_hwif0) { + 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; + cmd_hwif0->set_pio_mode = &cmd640_set_pio_mode;#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ - idx[0 ] = cmd_hwif0->index; + idx[0 ] = cmd_hwif0->index; + }/* * Ensure compatibility by always using the slowest timings
@@ -772,7 +773,7 @@ static int __init cmd640x_init(void)/* * Try to enable the secondary interface, if not already enabled */ -if (cmd_hwif1->noprobe) { +if (cmd_hwif1 && cmd_hwif1->noprobe) { port2 ="not probed" ; }else { b =get_cmd640_reg (CNTRL );
@@ -803,7 +804,7 @@ static int __init cmd640x_init(void)/* * Initialize data for secondary cmd640 port, if enabled */ -if (second_port_cmd640) { +if (second_port_cmd640 && cmd_hwif1) { oldnoprobe = cmd_hwif1->noprobe;ide_init_port_hw (cmd_hwif1, &hw[1 ]); cmd_hwif1->noprobe = oldnoprobe;
@@ -813,7 +814,7 @@ static int __init cmd640x_init(void) idx[1 ] = cmd_hwif1->index; } -printk (KERN_INFO "%s: %sserialized, secondary interface %s\n" , cmd_hwif1->name, +printk (KERN_INFO "cmd640: %sserialized, secondary interface %s\n" , second_port_cmd640 ?"" :"not " , port2);/*
@@ -823,10 +824,15 @@ static int __init cmd640x_init(void)for (index =0 ; index < (2 + (second_port_cmd640 <<1 )); index++) {ide_drive_t *drive; -if (index >1 ) +if (index >1 ) { +if (cmd_hwif1 ==NULL ) +continue ; drive = &cmd_hwif1->drives[index &1 ]; -else + }else { +if (cmd_hwif0 ==NULL ) +continue ; drive = &cmd_hwif0->drives[index &1 ]; + }#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED if (drive->autotune || ((index >1 ) && second_port_toggled)) {
PATCH 5/9 scc_pata: store 'hwif' pointer in struct scc_ports
In reply to Bartlomiej ZolnierkiewiczReplace 'unsigned char hwif_id' by 'ide_hwif_t *hwif' in struct scc_ports. This allows us to remove ide_hwifs[] usage from scc_remove().
There should be no functional changes caused by this patch.
--- drivers/ide/pci/scc_pata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/ide/pci/scc_pata.c +3 -3
@@ -65,7 +65,7 @@static struct scc_ports {unsigned long ctl, dma; -unsigned char hwif_id;/* for removing hwif from system */ +ide_hwif_t *hwif;/* for removing port from system */ } scc_ports[MAX_HWIFS ];/* PIO transfer mode table */
@@ -664,7 +664,7 @@ static void __devinit init_hwif_scc(ide_ {struct scc_ports *ports =ide_get_hwifdata (hwif); - ports->hwif_id = hwif->index; + ports->hwif = hwif; hwif->dma_command = hwif->dma_base; hwif->dma_status = hwif->dma_base +0x04 ;
@@ -726,7 +726,7 @@ static int __devinit scc_init_one(struct static void __devexit scc_remove(struct pci_dev *dev) {struct scc_ports *ports =pci_get_drvdata (dev); -ide_hwif_t *hwif = &ide_hwifs[ports->hwif_id]; +ide_hwif_t *hwif = ports->hwif;unsigned long ctl_base =pci_resource_start (dev,0 );unsigned long dma_base =pci_resource_start (dev,1 );unsigned long ctl_size =pci_resource_len (dev,0 );
PATCH 6/9 umc8672: don't use ide_hwifs[] in umc_set_pio_mode()
In reply to Bartlomiej Zolnierkiewicz--- drivers/ide/legacy/umc8672.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ide/legacy/umc8672.c +2 -2
@@ -105,13 +105,13 @@ static void umc_set_speeds (u8 speeds[])static void umc_set_pio_mode (ide_drive_t *drive,const u8 pio) { +ide_hwif_t *hwif = drive->hwif;unsigned long flags; -ide_hwgroup_t *hwgroup = ide_hwifs[HWIF (drive)->index^1 ].hwgroup;printk ("%s: setting umc8672 to PIO mode%d (speed %d)\n" , drive->name, pio, pio_to_umc[pio]);spin_lock_irqsave (&ide_lock, flags); -if (hwgroup && hwgroup->handler !=NULL ) { +if (hwif->mate && hwif->mate->hwgroup->handler) {printk (KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n" ); }else { current_speeds[drive->name[2 ] -'a' ] = pio_to_umc[pio];
PATCH 7/9 ht6560b: use driver name for resource allocation
In reply to Bartlomiej Zolnierkiewicz--- drivers/ide/legacy/ht6560b.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ide/legacy/ht6560b.c +2 -1
@@ -32,6 +32,7 @@* Try: http://www.maf.iki.fi/~maf/ht6560b/ */ +#define DRV_NAME "ht6560b"#define HT6560B_VERSION "v0.07"#include <linux/module.h>
@@ -339,7 +340,7 @@ static int __init ht6560b_init(void) hwif = &ide_hwifs[0 ]; mate = &ide_hwifs[1 ]; -if (!request_region (HT_CONFIG_PORT ,1 , hwif->name)) { +if (!request_region (HT_CONFIG_PORT ,1 ,DRV_NAME )) {printk (KERN_NOTICE "%s: HT_CONFIG_PORT not found\n" , __FUNCTION__);return -ENODEV ;
Re: [PATCH 7/9] ht6560b: use driver name for resource allocation
Quoted 1 line · Bartlomiej Zolnierkiewicz
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
MBR, Sergei
PATCH 8/9 qd65xx: return error value in qd_probe()
In reply to Bartlomiej ZolnierkiewiczReturn error value in qd_probe() and use it in qd65xx_init() instead of checking ide_hwifs[].chipset.
--- drivers/ide/legacy/qd65xx.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
drivers/ide/legacy/qd65xx.c +15 -10
@@ -396,7 +396,7 @@ static int __init qd_probe(int base) config =inb (QD_CONFIG_PORT );if (! ((config &QD_CONFIG_BASEPORT ) >>1 == (base ==0xb0 )) ) -return 1 ; +return -ENODEV ; unit = ! (config &QD_CONFIG_IDE_BASEPORT );
@@ -410,7 +410,8 @@ static int __init qd_probe(int base)if ((config &0xf0 ) ==QD_CONFIG_QD6500 ) { -if (qd_testreg (base))return 1 ;/* bad register */ +if (qd_testreg (base)) +return -ENODEV ;/* bad register */ /* qd6500 found */
@@ -421,7 +422,7 @@ static int __init qd_probe(int base)if (config &QD_CONFIG_DISABLED ) {printk (KERN_WARNING "qd6500 is disabled !\n" ); -return 1 ; +return -ENODEV ; }ide_init_port_hw (hwif, &hw[unit]);
@@ -443,8 +444,8 @@ static int __init qd_probe(int base)u8 control; -if (qd_testreg (base) ||qd_testreg (base+0x02 ))return 1 ; -/* bad registers */ +if (qd_testreg (base) ||qd_testreg (base +0x02 )) +return -ENODEV ;/* bad registers */ /* qd6580 found */
@@ -508,7 +509,7 @@ static int __init qd_probe(int base) } }/* no qd65xx found */ -return 1 ; +return -ENODEV ; }int probe_qd65xx =0 ;
@@ -518,14 +519,18 @@ MODULE_PARM_DESC(probe, "probe for QD65xstatic int __init qd65xx_init (void ) { +int rc1, rc2 = -ENODEV ; +if (probe_qd65xx ==0 )return -ENODEV ; -if (qd_probe (0x30 )) -qd_probe (0xb0 ); -if (ide_hwifs[0 ].chipset != ide_qd65xx && - ide_hwifs[1 ].chipset != ide_qd65xx) + rc1 =qd_probe (0x30 ); +if (rc1) + rc2 =qd_probe (0xb0 ); + +if (rc1 <0 && rc2 <0 )return -ENODEV ; +return 0 ; }
Re: [PATCH 8/9] qd65xx: return error value in qd_probe()
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Return error value in
qd_probe()and use it inqd65xx_init()instead of checking ide_hwifs[].chipset.Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
MBR, Sergei
PATCH 9/9 ide: IDE_HFLAG_BOOTABLE -> IDE_HFLAG_NON_BOOTABLE
In reply to Bartlomiej Zolnierkiewicz"bootable" should be the default behavior so replace IDE_HFLAG_BOOTABLE host flag with IDE_HFLAG_NON_BOOTABLE.
There should be no functional changes caused by this patch.
--- drivers/ide/pci/aec62xx.c | 3 ++- drivers/ide/pci/alim15x3.c | 1 - drivers/ide/pci/amd74xx.c | 3 +-- drivers/ide/pci/atiixp.c | 5 ++--- drivers/ide/pci/cmd64x.c | 9 ++++----- drivers/ide/pci/cs5520.c | 3 +-- drivers/ide/pci/cs5530.c | 3 +-- drivers/ide/pci/cs5535.c | 2 +- drivers/ide/pci/cy82c693.c | 3 +-- drivers/ide/pci/generic.c | 6 ++---- drivers/ide/pci/hpt34x.c | 2 +- drivers/ide/pci/hpt366.c | 2 +- drivers/ide/pci/it8213.c | 3 +-- drivers/ide/pci/it821x.c | 1 - drivers/ide/pci/jmicron.c | 1 - drivers/ide/pci/ns87415.c | 3 +-- drivers/ide/pci/opti621.c | 6 ++---- drivers/ide/pci/piix.c | 4 ++-- drivers/ide/pci/rz1000.c | 2 +- drivers/ide/pci/sc1200.c | 3 +-- drivers/ide/pci/scc_pata.c | 3 +-- drivers/ide/pci/serverworks.c | 5 ++--- drivers/ide/pci/siimage.c | 1 - drivers/ide/pci/sis5513.c | 3 +-- drivers/ide/pci/sl82c105.c | 3 +-- drivers/ide/pci/slc90e66.c | 2 +- drivers/ide/pci/triflex.c | 1 - drivers/ide/pci/trm290.c | 1 - drivers/ide/pci/via82cxxx.c | 3 +-- drivers/ide/setup-pci.c | 2 +- include/linux/ide.h | 8 ++++---- 31 files changed, 37 insertions(+), 60 deletions(-)
drivers/ide/pci/aec62xx.c +2 -1
@@ -220,7 +220,8 @@ static const struct ide_port_info aec62x .init_hwif = init_hwif_aec62xx, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .host_flags = IDE_HFLAG_NO_ATAPI_DMA | - IDE_HFLAG_ABUSE_SET_DMA_MODE, +IDE_HFLAG_ABUSE_SET_DMA_MODE | + IDE_HFLAG_NON_BOOTABLE, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4,
drivers/ide/pci/alim15x3.c +0 -1
@@ -750,7 +750,6 @@ static const struct ide_port_info ali15x .init_chipset = init_chipset_ali15x3, .init_hwif = init_hwif_ali15x3, .init_dma = init_dma_ali15x3, - .host_flags = IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO5, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2,
drivers/ide/pci/amd74xx.c +1 -2
@@ -223,8 +223,7 @@ static void __devinit init_hwif_amd74xx( IDE_HFLAG_ABUSE_SET_DMA_MODE | \ IDE_HFLAG_POST_SET_MODE | \ IDE_HFLAG_IO_32BIT | \ - IDE_HFLAG_UNMASK_IRQS | \ - IDE_HFLAG_BOOTABLE) + IDE_HFLAG_UNMASK_IRQS)#define DECLARE_AMD_DEV (name_str, swdma, udma) \ { \
drivers/ide/pci/atiixp.c +2 -3
@@ -151,7 +151,7 @@ static const struct ide_port_info atiixp .name = "ATIIXP", .init_hwif = init_hwif_atiixp, .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, - .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_LEGACY_IRQS, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5,
@@ -159,8 +159,7 @@ static const struct ide_port_info atiixp .name = "SB600_PATA", .init_hwif = init_hwif_atiixp, .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, - .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5,
drivers/ide/pci/cmd64x.c +4 -5
@@ -440,8 +440,7 @@ static const struct ide_port_info cmd64x .init_hwif = init_hwif_cmd64x, .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}}, .host_flags = IDE_HFLAG_CLEAR_SIMPLEX | -IDE_HFLAG_ABUSE_PREFETCH | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_ABUSE_PREFETCH, .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = 0x00, /* no udma */
@@ -451,7 +450,7 @@ static const struct ide_port_info cmd64x .init_hwif = init_hwif_cmd64x, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .chipset = ide_cmd646, - .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_ABUSE_PREFETCH, .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA2,
@@ -460,7 +459,7 @@ static const struct ide_port_info cmd64x .init_chipset = init_chipset_cmd64x, .init_hwif = init_hwif_cmd64x, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, - .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_ABUSE_PREFETCH, .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4,
@@ -469,7 +468,7 @@ static const struct ide_port_info cmd64x .init_chipset = init_chipset_cmd64x, .init_hwif = init_hwif_cmd64x, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, - .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_ABUSE_PREFETCH, .pio_mask = ATA_PIO5, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5,
drivers/ide/pci/cs5520.c +1 -2
@@ -122,8 +122,7 @@ static void __devinit init_hwif_cs5520(iIDE_HFLAG_CS5520 | \IDE_HFLAG_VDMA | \IDE_HFLAG_NO_ATAPI_DMA | \ -IDE_HFLAG_ABUSE_SET_DMA_MODE |\ - IDE_HFLAG_BOOTABLE, \ + IDE_HFLAG_ABUSE_SET_DMA_MODE, \ .pio_mask = ATA_PIO4, \ }
drivers/ide/pci/cs5530.c +1 -2
@@ -249,8 +249,7 @@ static const struct ide_port_info cs5530 .init_chipset = init_chipset_cs5530, .init_hwif = init_hwif_cs5530, .host_flags =IDE_HFLAG_SERIALIZE | -IDE_HFLAG_POST_SET_MODE | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_POST_SET_MODE, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA2,
drivers/ide/pci/cs5535.c +1 -1
@@ -186,7 +186,7 @@ static const struct ide_port_info cs5535 .name = "CS5535", .init_hwif = init_hwif_cs5535, .host_flags =IDE_HFLAG_SINGLE |IDE_HFLAG_POST_SET_MODE | - IDE_HFLAG_ABUSE_SET_DMA_MODE | IDE_HFLAG_BOOTABLE, + IDE_HFLAG_ABUSE_SET_DMA_MODE, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4,
drivers/ide/pci/cy82c693.c +1 -2
@@ -410,8 +410,7 @@ static const struct ide_port_info cy82c6 .init_iops = init_iops_cy82c693, .init_hwif = init_hwif_cy82c693, .chipset = ide_cy82c693, - .host_flags =IDE_HFLAG_SINGLE |IDE_HFLAG_CY82C693 | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_CY82C693, .pio_mask = ATA_PIO4, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2,
drivers/ide/pci/generic.c +2 -4
@@ -38,8 +38,7 @@ MODULE_PARM_DESC(all_generic_ide, "IDE g { \ .name = name_str, \ .host_flags =IDE_HFLAG_TRUST_BIOS_FOR_DMA | \ - extra_flags | \ - IDE_HFLAG_BOOTABLE, \ + extra_flags, \ .swdma_mask = ATA_SWDMA2, \ .mwdma_mask = ATA_MWDMA2, \ .udma_mask = ATA_UDMA6, \
@@ -51,8 +50,7 @@ static const struct ide_port_info generi {/* 1 */ .name = "NS87410", .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, - .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA6,
drivers/ide/pci/hpt34x.c +1 -1
@@ -133,7 +133,7 @@ static const struct ide_port_info hpt34x .init_chipset = init_chipset_hpt34x, .init_hwif = init_hwif_hpt34x, .extra = 16, - .host_flags = IDE_HFLAGS_HPT34X, + .host_flags = IDE_HFLAGS_HPT34X | IDE_HFLAG_NON_BOOTABLE, .pio_mask = ATA_PIO5, }, {/* 1 */
drivers/ide/pci/hpt366.c +1 -1
@@ -1614,7 +1614,7 @@ static int __devinit hpt366_init_one(strhpt374_init (dev, dev2); else {if (hpt36x_init (dev, dev2)) - d.host_flags |=IDE_HFLAG_BOOTABLE ; + d.host_flags &= ~IDE_HFLAG_NON_BOOTABLE ; } ret =ide_setup_pci_devices (dev, dev2, &d);
drivers/ide/pci/it8213.c +1 -2
@@ -171,8 +171,7 @@ static void __devinit init_hwif_it8213(i .name = name_str, \ .init_hwif = init_hwif_it8213, \ .enablebits = {{0x41,0x80,0x80}}, \ - .host_flags = IDE_HFLAG_SINGLE | \ - IDE_HFLAG_BOOTABLE, \ + .host_flags = IDE_HFLAG_SINGLE, \ .pio_mask = ATA_PIO4, \ .swdma_mask = ATA_SWDMA2_ONLY, \ .mwdma_mask = ATA_MWDMA12_ONLY, \
drivers/ide/pci/it821x.c +0 -1
@@ -623,7 +623,6 @@ static unsigned int __devinit init_chips .name = name_str, \ .init_chipset = init_chipset_it821x, \ .init_hwif = init_hwif_it821x, \ - .host_flags = IDE_HFLAG_BOOTABLE, \ .pio_mask = ATA_PIO4, \ }
drivers/ide/pci/jmicron.c +0 -1
@@ -114,7 +114,6 @@ static void __devinit init_hwif_jmicron(static const struct ide_port_info jmicron_chipset__devinitdata = { .name ="JMB" , .init_hwif = init_hwif_jmicron, - .host_flags =IDE_HFLAG_BOOTABLE , .enablebits = { {0x40 ,0x01 ,0x01 }, {0x40 ,0x10 ,0x10 } }, .pio_mask =ATA_PIO5 , .mwdma_mask =ATA_MWDMA2 ,
drivers/ide/pci/ns87415.c +1 -2
@@ -261,8 +261,7 @@ static const struct ide_port_info ns8741#endif .init_hwif = init_hwif_ns87415, .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | -IDE_HFLAG_NO_ATAPI_DMA | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_NO_ATAPI_DMA, };static int __devinit ns87415_init_one (struct pci_dev *dev,const struct pci_device_id *id)
drivers/ide/pci/opti621.c +2 -4
@@ -335,8 +335,7 @@ static const struct ide_port_info opti62 .name = "OPTI621", .init_hwif = init_hwif_opti621, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, - .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, .pio_mask = ATA_PIO3, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2,
@@ -344,8 +343,7 @@ static const struct ide_port_info opti62 .name = "OPTI621X", .init_hwif = init_hwif_opti621, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, - .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, .pio_mask = ATA_PIO3, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2,
drivers/ide/pci/piix.c +2 -2
@@ -307,9 +307,9 @@ static void __devinit init_hwif_ich(ide_ }#ifndef CONFIG_IA64 -#define IDE_HFLAGS_PIIX (IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE) +#define IDE_HFLAGS_PIIX IDE_HFLAG_LEGACY_IRQS#else -#define IDE_HFLAGS_PIIX IDE_HFLAG_BOOTABLE +#define IDE_HFLAGS_PIIX 0#endif #define DECLARE_PIIX_DEV (name_str, udma) \
drivers/ide/pci/rz1000.c +1 -1
@@ -43,7 +43,7 @@ static const struct ide_port_info rz1000 .name = "RZ100x", .init_hwif = init_hwif_rz1000, .chipset = ide_rz1000, - .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_NO_DMA, };static int __devinit rz1000_init_one (struct pci_dev *dev,const struct pci_device_id *id)
drivers/ide/pci/sc1200.c +1 -2
@@ -307,8 +307,7 @@ static const struct ide_port_info sc1200 .init_hwif = init_hwif_sc1200, .host_flags =IDE_HFLAG_SERIALIZE |IDE_HFLAG_POST_SET_MODE | -IDE_HFLAG_ABUSE_DMA_MODES | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_ABUSE_DMA_MODES, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA2,
drivers/ide/pci/scc_pata.c +1 -2
@@ -693,8 +693,7 @@ static void __devinit init_hwif_scc(ide_ .name = name_str, \ .init_iops = init_iops_scc, \ .init_hwif = init_hwif_scc, \ - .host_flags = IDE_HFLAG_SINGLE | \ - IDE_HFLAG_BOOTABLE, \ + .host_flags = IDE_HFLAG_SINGLE, \ .pio_mask = ATA_PIO4, \ }
drivers/ide/pci/serverworks.c +2 -3
@@ -350,8 +350,7 @@ static void __devinit init_hwif_svwks (i#define IDE_HFLAGS_SVWKS \ (IDE_HFLAG_LEGACY_IRQS | \ - IDE_HFLAG_ABUSE_SET_DMA_MODE | \ - IDE_HFLAG_BOOTABLE) + IDE_HFLAG_ABUSE_SET_DMA_MODE)static const struct ide_port_info serverworks_chipsets[]__devinitdata = { {/* 0 */
@@ -418,7 +417,7 @@ static int __devinit svwks_init_one(struelse if (idx ==2 || idx ==3 ) {if ((PCI_FUNC (dev->devfn) &1 ) ==0 ) {if (pci_resource_start (dev,0 ) !=0x01f1 ) - d.host_flags &= ~IDE_HFLAG_BOOTABLE ; + d.host_flags |=IDE_HFLAG_NON_BOOTABLE ; d.host_flags |=IDE_HFLAG_SINGLE ; }else d.host_flags &= ~IDE_HFLAG_SINGLE ;
drivers/ide/pci/siimage.c +0 -1
@@ -851,7 +851,6 @@ static void __devinit init_hwif_siimage( .init_chipset = init_chipset_siimage, \ .init_iops = init_iops_siimage, \ .init_hwif = init_hwif_siimage, \ - .host_flags = IDE_HFLAG_BOOTABLE, \ .pio_mask = ATA_PIO4, \ .mwdma_mask = ATA_MWDMA2, \ .udma_mask = ATA_UDMA6, \
drivers/ide/pci/sis5513.c +1 -2
@@ -569,8 +569,7 @@ static const struct ide_port_info sis551 .init_chipset = init_chipset_sis5513, .init_hwif = init_hwif_sis5513, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_NO_AUTODMA | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_NO_AUTODMA, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, };
drivers/ide/pci/sl82c105.c +1 -2
@@ -332,8 +332,7 @@ static const struct ide_port_info sl82c1#if defined(CONFIG_LOPEC ) || defined(CONFIG_SANDPOINT )IDE_HFLAG_FORCE_LEGACY_IRQS | #endif -IDE_HFLAG_NO_AUTODMA | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_NO_AUTODMA, .pio_mask = ATA_PIO5, };
drivers/ide/pci/slc90e66.c +1 -1
@@ -137,7 +137,7 @@ static const struct ide_port_info slc90e .name = "SLC90E66", .init_hwif = init_hwif_slc90e66, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, - .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_LEGACY_IRQS, .pio_mask = ATA_PIO4, .swdma_mask = ATA_SWDMA2_ONLY, .mwdma_mask = ATA_MWDMA12_ONLY,
drivers/ide/pci/triflex.c +0 -1
@@ -97,7 +97,6 @@ static const struct ide_port_info trifle .name = "TRIFLEX", .init_hwif = init_hwif_triflex, .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, - .host_flags = IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2,
drivers/ide/pci/trm290.c +0 -1
@@ -337,7 +337,6 @@ static const struct ide_port_info trm290IDE_HFLAG_TRUST_BIOS_FOR_DMA | #endifIDE_HFLAG_NO_AUTODMA | -IDE_HFLAG_BOOTABLE | IDE_HFLAG_NO_LBA48, };
drivers/ide/pci/via82cxxx.c +1 -2
@@ -432,8 +432,7 @@ static const struct ide_port_info via82cIDE_HFLAG_PIO_NO_DOWNGRADE |IDE_HFLAG_ABUSE_SET_DMA_MODE |IDE_HFLAG_POST_SET_MODE | -IDE_HFLAG_IO_32BIT | - IDE_HFLAG_BOOTABLE, + IDE_HFLAG_IO_32BIT, .pio_mask = ATA_PIO5, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2,
drivers/ide/setup-pci.c +1 -1
@@ -322,7 +322,7 @@ static ide_hwif_t *ide_hwif_configure(st {unsigned long ctl =0 , base =0 ;ide_hwif_t *hwif; -u8 bootable = (d->host_flags &IDE_HFLAG_BOOTABLE ) ?1 :0 ; +u8 bootable = (d->host_flags &IDE_HFLAG_NON_BOOTABLE ) ?0 :1 ;u8 oldnoprobe =0 ;struct hw_regs_s hw;
include/linux/ide.h +4 -4
@@ -1054,8 +1054,8 @@ enum {IDE_HFLAG_VDMA = (1 <<11 ),/* ATAPI DMA is unsupported */ IDE_HFLAG_NO_ATAPI_DMA = (1 <<12 ), -/* set if host is a "bootable" controller */ -IDE_HFLAG_BOOTABLE = (1 <<13 ), +/* set if host is a "non-bootable" controller */ +IDE_HFLAG_NON_BOOTABLE = (1 <<13 ),/* host doesn't support DMA */ IDE_HFLAG_NO_DMA = (1 << 14),/* check if host is PCI IDE device before allowing DMA */
@@ -1096,9 +1096,9 @@ enum { };#ifdef CONFIG_BLK_DEV_OFFBOARD -# define IDE_HFLAG_OFF_BOARD IDE_HFLAG_BOOTABLE -#else # define IDE_HFLAG_OFF_BOARD 0 +#else +# define IDE_HFLAG_OFF_BOARD IDE_HFLAG_NON_BOOTABLE#endif struct ide_port_info {