瀏覽代碼

ide: add IDE_HFLAG_NO_{DMA,AUTODMA} host flags

Add IDE_HFLAG_NO_{DMA,AUTODMA} host flags.  Convert all host drivers using
ide_pci_device_t to use these flags instead of d->autodma and then remove no
longer needed d->autodma.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz 17 年之前
父節點
當前提交
47b687882c

+ 2 - 6
drivers/ide/pci/aec62xx.c

@@ -244,7 +244,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_aec62xx,
 		.init_setup	= init_setup_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
@@ -254,8 +253,8 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_aec62xx,
 		.init_setup	= init_setup_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
-		.autodma	= NOAUTODMA,
-		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
+		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA |
+				  IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x1f, /* udma0-4 */
 		.udma_mask	= 0x1f, /* udma0-4 */
 	},{	/* 2 */
 	},{	/* 2 */
@@ -263,7 +262,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_aec62xx,
 		.init_setup	= init_setup_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
@@ -273,7 +271,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_aec6x80,
 		.init_setup	= init_setup_aec6x80,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x3f, /* udma0-5 */
 		.udma_mask	= 0x3f, /* udma0-5 */
@@ -282,7 +279,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_aec6x80,
 		.init_setup	= init_setup_aec6x80,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_chipset	= init_chipset_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
 		.init_hwif	= init_hwif_aec62xx,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,

+ 0 - 1
drivers/ide/pci/alim15x3.c

@@ -776,7 +776,6 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
 	.init_chipset	= init_chipset_ali15x3,
 	.init_chipset	= init_chipset_ali15x3,
 	.init_hwif	= init_hwif_ali15x3,
 	.init_hwif	= init_hwif_ali15x3,
 	.init_dma	= init_dma_ali15x3,
 	.init_dma	= init_dma_ali15x3,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO5,
 	.pio_mask	= ATA_PIO5,
 };
 };

+ 0 - 2
drivers/ide/pci/amd74xx.c

@@ -278,7 +278,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
 		.name		= name_str,				\
 		.name		= name_str,				\
 		.init_chipset	= init_chipset_amd74xx,			\
 		.init_chipset	= init_chipset_amd74xx,			\
 		.init_hwif	= init_hwif_amd74xx,			\
 		.init_hwif	= init_hwif_amd74xx,			\
-		.autodma	= AUTODMA,				\
 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},	\
 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},	\
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |		\
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |		\
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |		\
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |		\
@@ -292,7 +291,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
 		.name		= name_str,				\
 		.name		= name_str,				\
 		.init_chipset	= init_chipset_amd74xx,			\
 		.init_chipset	= init_chipset_amd74xx,			\
 		.init_hwif	= init_hwif_amd74xx,			\
 		.init_hwif	= init_hwif_amd74xx,			\
-		.autodma	= AUTODMA,				\
 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},	\
 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},	\
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |		\
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |		\
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |		\
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |		\

+ 0 - 2
drivers/ide/pci/atiixp.c

@@ -202,14 +202,12 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
 	{	/* 0 */
 	{	/* 0 */
 		.name		= "ATIIXP",
 		.name		= "ATIIXP",
 		.init_hwif	= init_hwif_atiixp,
 		.init_hwif	= init_hwif_atiixp,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
 		.enablebits	= {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	},{	/* 1 */
 	},{	/* 1 */
 		.name		= "SB600_PATA",
 		.name		= "SB600_PATA",
 		.init_hwif	= init_hwif_atiixp,
 		.init_hwif	= init_hwif_atiixp,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
 		.enablebits	= {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
  		.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
  		.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,

+ 0 - 4
drivers/ide/pci/cmd64x.c

@@ -583,7 +583,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_cmd64x,
 		.init_setup	= init_setup_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
 		.enablebits	= {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO5,
 		.pio_mask	= ATA_PIO5,
@@ -593,7 +592,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_cmd646,
 		.init_setup	= init_setup_cmd646,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
 		.enablebits	= {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO5,
 		.pio_mask	= ATA_PIO5,
@@ -603,7 +601,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_cmd64x,
 		.init_setup	= init_setup_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
 		.enablebits	= {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO5,
 		.pio_mask	= ATA_PIO5,
@@ -613,7 +610,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_cmd64x,
 		.init_setup	= init_setup_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_chipset	= init_chipset_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
 		.init_hwif	= init_hwif_cmd64x,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
 		.enablebits	= {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO5,
 		.pio_mask	= ATA_PIO5,

+ 0 - 1
drivers/ide/pci/cs5520.c

@@ -152,7 +152,6 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
 		.name		= name_str,			\
 		.name		= name_str,			\
 		.init_setup_dma = cs5520_init_setup_dma,	\
 		.init_setup_dma = cs5520_init_setup_dma,	\
 		.init_hwif	= init_hwif_cs5520,		\
 		.init_hwif	= init_hwif_cs5520,		\
-		.autodma	= AUTODMA,			\
 		.host_flags	= IDE_HFLAG_ISA_PORTS |		\
 		.host_flags	= IDE_HFLAG_ISA_PORTS |		\
 				  IDE_HFLAG_VDMA |		\
 				  IDE_HFLAG_VDMA |		\
 				  IDE_HFLAG_NO_ATAPI_DMA |	\
 				  IDE_HFLAG_NO_ATAPI_DMA |	\

+ 0 - 1
drivers/ide/pci/cs5530.c

@@ -274,7 +274,6 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
 	.name		= "CS5530",
 	.name		= "CS5530",
 	.init_chipset	= init_chipset_cs5530,
 	.init_chipset	= init_chipset_cs5530,
 	.init_hwif	= init_hwif_cs5530,
 	.init_hwif	= init_hwif_cs5530,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_BOOTABLE,
 	.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,
 };
 };

+ 0 - 1
drivers/ide/pci/cs5535.c

@@ -194,7 +194,6 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
 static ide_pci_device_t cs5535_chipset __devinitdata = {
 static ide_pci_device_t cs5535_chipset __devinitdata = {
 	.name		= "CS5535",
 	.name		= "CS5535",
 	.init_hwif	= init_hwif_cs5535,
 	.init_hwif	= init_hwif_cs5535,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE |
 	.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE |
 			  IDE_HFLAG_BOOTABLE,
 			  IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,

+ 0 - 1
drivers/ide/pci/cy82c693.c

@@ -460,7 +460,6 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = {
 	.init_chipset	= init_chipset_cy82c693,
 	.init_chipset	= init_chipset_cy82c693,
 	.init_iops	= init_iops_cy82c693,
 	.init_iops	= init_iops_cy82c693,
 	.init_hwif	= init_hwif_cy82c693,
 	.init_hwif	= init_hwif_cy82c693,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 	.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 			  IDE_HFLAG_BOOTABLE,
 			  IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,

+ 13 - 16
drivers/ide/pci/generic.c

@@ -78,48 +78,45 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif)
 	{ \
 	{ \
 		.name		= name_str, \
 		.name		= name_str, \
 		.init_hwif	= init_hwif_generic, \
 		.init_hwif	= init_hwif_generic, \
-		.autodma	= dma_setting, \
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA | \
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA | \
+				  dma_setting | \
 				  IDE_HFLAG_BOOTABLE, \
 				  IDE_HFLAG_BOOTABLE, \
 	}
 	}
 
 
 static ide_pci_device_t generic_chipsets[] __devinitdata = {
 static ide_pci_device_t generic_chipsets[] __devinitdata = {
-	/*  0 */ DECLARE_GENERIC_PCI_DEV("Unknown",		AUTODMA),
+	/*  0 */ DECLARE_GENERIC_PCI_DEV("Unknown",	0),
 
 
 	{	/* 1 */
 	{	/* 1 */
 		.name		= "NS87410",
 		.name		= "NS87410",
 		.init_hwif	= init_hwif_generic,
 		.init_hwif	= init_hwif_generic,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
 		.enablebits	= {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 				  IDE_HFLAG_BOOTABLE,
 				  IDE_HFLAG_BOOTABLE,
 	},
 	},
 
 
-	/*  2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI",		AUTODMA),
-	/*  3 */ DECLARE_GENERIC_PCI_DEV("HT6565",		AUTODMA),
-	/*  4 */ DECLARE_GENERIC_PCI_DEV("UM8673F",		NODMA),
-	/*  5 */ DECLARE_GENERIC_PCI_DEV("UM8886A",		NODMA),
-	/*  6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF",		NODMA),
-	/*  7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE",		AUTODMA),
-	/*  8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE",		NOAUTODMA),
-	/*  9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V",		NOAUTODMA),
+	/*  2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI",	0),
+	/*  3 */ DECLARE_GENERIC_PCI_DEV("HT6565",	0),
+	/*  4 */ DECLARE_GENERIC_PCI_DEV("UM8673F",	IDE_HFLAG_NO_DMA),
+	/*  5 */ DECLARE_GENERIC_PCI_DEV("UM8886A",	IDE_HFLAG_NO_DMA),
+	/*  6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF",	IDE_HFLAG_NO_DMA),
+	/*  7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE",	0),
+	/*  8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE",	IDE_HFLAG_NO_AUTODMA),
+	/*  9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V",	IDE_HFLAG_NO_AUTODMA),
 
 
 	{	/* 10 */
 	{	/* 10 */
 		.name		= "VIA8237SATA",
 		.name		= "VIA8237SATA",
 		.init_hwif	= init_hwif_generic,
 		.init_hwif	= init_hwif_generic,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 				  IDE_HFLAG_OFF_BOARD,
 				  IDE_HFLAG_OFF_BOARD,
 	},
 	},
 
 
-	/* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102",		NOAUTODMA),
-	/* 12 */ DECLARE_GENERIC_PCI_DEV("Piccolo0103",		NOAUTODMA),
-	/* 13 */ DECLARE_GENERIC_PCI_DEV("Piccolo0105",		NOAUTODMA),
+	/* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102",	IDE_HFLAG_NO_AUTODMA),
+	/* 12 */ DECLARE_GENERIC_PCI_DEV("Piccolo0103",	IDE_HFLAG_NO_AUTODMA),
+	/* 13 */ DECLARE_GENERIC_PCI_DEV("Piccolo0105",	IDE_HFLAG_NO_AUTODMA),
 
 
 	{	/* 14 */
 	{	/* 14 */
 		.name		= "Revolution",
 		.name		= "Revolution",
 		.init_hwif	= init_hwif_generic,
 		.init_hwif	= init_hwif_generic,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 				  IDE_HFLAG_OFF_BOARD,
 				  IDE_HFLAG_OFF_BOARD,
 	}
 	}

+ 1 - 2
drivers/ide/pci/hpt34x.c

@@ -152,9 +152,8 @@ static ide_pci_device_t hpt34x_chipset __devinitdata = {
 	.name		= "HPT34X",
 	.name		= "HPT34X",
 	.init_chipset	= init_chipset_hpt34x,
 	.init_chipset	= init_chipset_hpt34x,
 	.init_hwif	= init_hwif_hpt34x,
 	.init_hwif	= init_hwif_hpt34x,
-	.autodma	= NOAUTODMA,
 	.extra		= 16,
 	.extra		= 16,
-	.host_flags	= IDE_HFLAG_NO_ATAPI_DMA,
+	.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA,
 	.pio_mask	= ATA_PIO5,
 	.pio_mask	= ATA_PIO5,
 };
 };
 
 

+ 0 - 6
drivers/ide/pci/hpt366.c

@@ -1551,7 +1551,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_hpt366,
 		.init_chipset	= init_chipset_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_dma	= init_dma_hpt366,
 		.init_dma	= init_dma_hpt366,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.extra		= 240,
 		.extra		= 240,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
@@ -1562,7 +1561,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_hpt366,
 		.init_chipset	= init_chipset_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_dma	= init_dma_hpt366,
 		.init_dma	= init_dma_hpt366,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.udma_mask	= HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.udma_mask	= HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.extra		= 240,
 		.extra		= 240,
@@ -1574,7 +1572,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_hpt366,
 		.init_chipset	= init_chipset_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_dma	= init_dma_hpt366,
 		.init_dma	= init_dma_hpt366,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.udma_mask	= HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.udma_mask	= HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.extra		= 240,
 		.extra		= 240,
@@ -1586,7 +1583,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_hpt366,
 		.init_chipset	= init_chipset_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_dma	= init_dma_hpt366,
 		.init_dma	= init_dma_hpt366,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.udma_mask	= HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.udma_mask	= HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.extra		= 240,
 		.extra		= 240,
@@ -1598,7 +1594,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_hpt366,
 		.init_chipset	= init_chipset_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_dma	= init_dma_hpt366,
 		.init_dma	= init_dma_hpt366,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.udma_mask	= ATA_UDMA5,
 		.udma_mask	= ATA_UDMA5,
 		.extra		= 240,
 		.extra		= 240,
@@ -1610,7 +1605,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_hpt366,
 		.init_chipset	= init_chipset_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_hwif	= init_hwif_hpt366,
 		.init_dma	= init_dma_hpt366,
 		.init_dma	= init_dma_hpt366,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.enablebits	= {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
 		.udma_mask	= HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.udma_mask	= HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
 		.extra		= 240,
 		.extra		= 240,

+ 0 - 1
drivers/ide/pci/it8213.c

@@ -191,7 +191,6 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
 	{						\
 	{						\
 		.name		= name_str,		\
 		.name		= name_str,		\
 		.init_hwif	= init_hwif_it8213,	\
 		.init_hwif	= init_hwif_it8213,	\
-		.autodma	= AUTODMA,		\
 		.enablebits	= {{0x41,0x80,0x80}}, \
 		.enablebits	= {{0x41,0x80,0x80}}, \
 		.host_flags	= IDE_HFLAG_SINGLE |	\
 		.host_flags	= IDE_HFLAG_SINGLE |	\
 				  IDE_HFLAG_BOOTABLE,	\
 				  IDE_HFLAG_BOOTABLE,	\

+ 0 - 1
drivers/ide/pci/it821x.c

@@ -636,7 +636,6 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
 		.name		= name_str,		\
 		.name		= name_str,		\
 		.init_chipset	= init_chipset_it821x,	\
 		.init_chipset	= init_chipset_it821x,	\
 		.init_hwif	= init_hwif_it821x,	\
 		.init_hwif	= init_hwif_it821x,	\
-		.autodma	= AUTODMA,		\
 		.fixup	 	= it821x_fixups,	\
 		.fixup	 	= it821x_fixups,	\
 		.host_flags	= IDE_HFLAG_BOOTABLE,	\
 		.host_flags	= IDE_HFLAG_BOOTABLE,	\
 		.pio_mask	= ATA_PIO4,		\
 		.pio_mask	= ATA_PIO4,		\

+ 0 - 1
drivers/ide/pci/jmicron.c

@@ -127,7 +127,6 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
 static ide_pci_device_t jmicron_chipset __devinitdata = {
 static ide_pci_device_t jmicron_chipset __devinitdata = {
 	.name		= "JMB",
 	.name		= "JMB",
 	.init_hwif	= init_hwif_jmicron,
 	.init_hwif	= init_hwif_jmicron,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.enablebits	= { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
 	.enablebits	= { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
 	.pio_mask	= ATA_PIO5,
 	.pio_mask	= ATA_PIO5,

+ 0 - 1
drivers/ide/pci/ns87415.c

@@ -266,7 +266,6 @@ static ide_pci_device_t ns87415_chipset __devinitdata = {
 	.init_iops	= init_iops_ns87415,
 	.init_iops	= init_iops_ns87415,
 #endif
 #endif
 	.init_hwif	= init_hwif_ns87415,
 	.init_hwif	= init_hwif_ns87415,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 	.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 			  IDE_HFLAG_NO_ATAPI_DMA |
 			  IDE_HFLAG_NO_ATAPI_DMA |
 			  IDE_HFLAG_BOOTABLE,
 			  IDE_HFLAG_BOOTABLE,

+ 0 - 2
drivers/ide/pci/opti621.c

@@ -344,7 +344,6 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
 	{	/* 0 */
 	{	/* 0 */
 		.name		= "OPTI621",
 		.name		= "OPTI621",
 		.init_hwif	= init_hwif_opti621,
 		.init_hwif	= init_hwif_opti621,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
 		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 				  IDE_HFLAG_BOOTABLE,
 				  IDE_HFLAG_BOOTABLE,
@@ -352,7 +351,6 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
 	},{	/* 1 */
 	},{	/* 1 */
 		.name		= "OPTI621X",
 		.name		= "OPTI621X",
 		.init_hwif	= init_hwif_opti621,
 		.init_hwif	= init_hwif_opti621,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
 		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 		.host_flags	= IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 				  IDE_HFLAG_BOOTABLE,
 				  IDE_HFLAG_BOOTABLE,

+ 0 - 7
drivers/ide/pci/pdc202xx_new.c

@@ -551,7 +551,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdcnew,
 		.init_setup	= init_setup_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x3f, /* udma0-5 */
 		.udma_mask	= 0x3f, /* udma0-5 */
@@ -560,7 +559,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdcnew,
 		.init_setup	= init_setup_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x7f, /* udma0-6*/
 		.udma_mask	= 0x7f, /* udma0-6*/
@@ -569,7 +567,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdc20270,
 		.init_setup	= init_setup_pdc20270,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x3f, /* udma0-5 */
 		.udma_mask	= 0x3f, /* udma0-5 */
@@ -578,7 +575,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdcnew,
 		.init_setup	= init_setup_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x7f, /* udma0-6*/
 		.udma_mask	= 0x7f, /* udma0-6*/
@@ -587,7 +583,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdcnew,
 		.init_setup	= init_setup_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x7f, /* udma0-6*/
 		.udma_mask	= 0x7f, /* udma0-6*/
@@ -596,7 +591,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdc20276,
 		.init_setup	= init_setup_pdc20276,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x7f, /* udma0-6*/
 		.udma_mask	= 0x7f, /* udma0-6*/
@@ -605,7 +599,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_pdcnew,
 		.init_setup	= init_setup_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_chipset	= init_chipset_pdcnew,
 		.init_hwif	= init_hwif_pdc202new,
 		.init_hwif	= init_hwif_pdc202new,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= 0x7f, /* udma0-6*/
 		.udma_mask	= 0x7f, /* udma0-6*/

+ 0 - 5
drivers/ide/pci/pdc202xx_old.c

@@ -421,7 +421,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
-		.autodma	= AUTODMA,
 		.extra		= 16,
 		.extra		= 16,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
@@ -432,7 +431,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
-		.autodma	= AUTODMA,
 		.extra		= 48,
 		.extra		= 48,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
@@ -443,7 +441,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
-		.autodma	= AUTODMA,
 		.extra		= 48,
 		.extra		= 48,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
@@ -454,7 +451,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
-		.autodma	= AUTODMA,
 		.extra		= 48,
 		.extra		= 48,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
@@ -465,7 +461,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_chipset	= init_chipset_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_hwif	= init_hwif_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
 		.init_dma	= init_dma_pdc202xx,
-		.autodma	= AUTODMA,
 		.extra		= 48,
 		.extra		= 48,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.host_flags	= IDE_HFLAG_OFF_BOARD,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,

+ 2 - 3
drivers/ide/pci/piix.c

@@ -415,7 +415,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
 		.name		= name_str,		\
 		.name		= name_str,		\
 		.init_chipset	= init_chipset_piix,	\
 		.init_chipset	= init_chipset_piix,	\
 		.init_hwif	= init_hwif_piix,	\
 		.init_hwif	= init_hwif_piix,	\
-		.autodma	= AUTODMA,		\
 		.enablebits	= {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
 		.enablebits	= {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
 		.host_flags	= IDE_HFLAG_BOOTABLE,	\
 		.host_flags	= IDE_HFLAG_BOOTABLE,	\
 		.pio_mask	= ATA_PIO4,		\
 		.pio_mask	= ATA_PIO4,		\
@@ -434,9 +433,9 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
 		 */
 		 */
 		.name		= "MPIIX",
 		.name		= "MPIIX",
 		.init_hwif	= init_hwif_piix,
 		.init_hwif	= init_hwif_piix,
-		.autodma	= NODMA,
 		.enablebits	= {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
 		.enablebits	= {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
-		.host_flags	= IDE_HFLAG_ISA_PORTS | IDE_HFLAG_BOOTABLE,
+		.host_flags	= IDE_HFLAG_ISA_PORTS | IDE_HFLAG_NO_DMA |
+				  IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	},
 	},
 
 

+ 1 - 2
drivers/ide/pci/rz1000.c

@@ -52,8 +52,7 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
 static ide_pci_device_t rz1000_chipset __devinitdata = {
 static ide_pci_device_t rz1000_chipset __devinitdata = {
 	.name		= "RZ100x",
 	.name		= "RZ100x",
 	.init_hwif	= init_hwif_rz1000,
 	.init_hwif	= init_hwif_rz1000,
-	.autodma	= NODMA,
-	.host_flags	= IDE_HFLAG_BOOTABLE,
+	.host_flags	= IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE,
 };
 };
 
 
 static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)

+ 0 - 1
drivers/ide/pci/sc1200.c

@@ -384,7 +384,6 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
 static ide_pci_device_t sc1200_chipset __devinitdata = {
 static ide_pci_device_t sc1200_chipset __devinitdata = {
 	.name		= "SC1200",
 	.name		= "SC1200",
 	.init_hwif	= init_hwif_sc1200,
 	.init_hwif	= init_hwif_sc1200,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_ABUSE_DMA_MODES | IDE_HFLAG_POST_SET_MODE |
 	.host_flags	= IDE_HFLAG_ABUSE_DMA_MODES | IDE_HFLAG_POST_SET_MODE |
 			  IDE_HFLAG_BOOTABLE,
 			  IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,

+ 0 - 1
drivers/ide/pci/scc_pata.c

@@ -704,7 +704,6 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
       .init_setup	= init_setup_scc,		\
       .init_setup	= init_setup_scc,		\
       .init_iops	= init_iops_scc,		\
       .init_iops	= init_iops_scc,		\
       .init_hwif	= init_hwif_scc,		\
       .init_hwif	= init_hwif_scc,		\
-      .autodma	= AUTODMA,				\
       .host_flags	= IDE_HFLAG_SINGLE |		\
       .host_flags	= IDE_HFLAG_SINGLE |		\
 			  IDE_HFLAG_BOOTABLE,		\
 			  IDE_HFLAG_BOOTABLE,		\
       .pio_mask		= ATA_PIO4,			\
       .pio_mask		= ATA_PIO4,			\

+ 0 - 5
drivers/ide/pci/serverworks.c

@@ -414,7 +414,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_svwks,
 		.init_setup	= init_setup_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_hwif	= init_hwif_svwks,
 		.init_hwif	= init_hwif_svwks,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	},{	/* 1 */
 	},{	/* 1 */
@@ -422,7 +421,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_svwks,
 		.init_setup	= init_setup_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_hwif	= init_hwif_svwks,
 		.init_hwif	= init_hwif_svwks,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	},{	/* 2 */
 	},{	/* 2 */
@@ -430,7 +428,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_csb6,
 		.init_setup	= init_setup_csb6,
 		.init_chipset	= init_chipset_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_hwif	= init_hwif_svwks,
 		.init_hwif	= init_hwif_svwks,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	},{	/* 3 */
 	},{	/* 3 */
@@ -438,7 +435,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_csb6,
 		.init_setup	= init_setup_csb6,
 		.init_chipset	= init_chipset_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_hwif	= init_hwif_svwks,
 		.init_hwif	= init_hwif_svwks,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	},{	/* 4 */
 	},{	/* 4 */
@@ -446,7 +442,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
 		.init_setup	= init_setup_svwks,
 		.init_setup	= init_setup_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_chipset	= init_chipset_svwks,
 		.init_hwif	= init_hwif_svwks,
 		.init_hwif	= init_hwif_svwks,
-		.autodma	= AUTODMA,
 		.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
 		.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO4,
 		.pio_mask	= ATA_PIO4,
 	}
 	}

+ 0 - 1
drivers/ide/pci/siimage.c

@@ -919,7 +919,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
 		.init_iops	= init_iops_siimage,	\
 		.init_iops	= init_iops_siimage,	\
 		.init_hwif	= init_hwif_siimage,	\
 		.init_hwif	= init_hwif_siimage,	\
 		.fixup		= siimage_fixup,	\
 		.fixup		= siimage_fixup,	\
-		.autodma	= AUTODMA,		\
 		.host_flags	= IDE_HFLAG_BOOTABLE,	\
 		.host_flags	= IDE_HFLAG_BOOTABLE,	\
 		.pio_mask	= ATA_PIO4,		\
 		.pio_mask	= ATA_PIO4,		\
 	}
 	}

+ 1 - 2
drivers/ide/pci/sis5513.c

@@ -590,9 +590,8 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
 	.name		= "SIS5513",
 	.name		= "SIS5513",
 	.init_chipset	= init_chipset_sis5513,
 	.init_chipset	= init_chipset_sis5513,
 	.init_hwif	= init_hwif_sis5513,
 	.init_hwif	= init_hwif_sis5513,
-	.autodma	= NOAUTODMA,
 	.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
 	.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
-	.host_flags	= IDE_HFLAG_BOOTABLE,
+	.host_flags	= IDE_HFLAG_NO_AUTODMA | IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,
 };
 };
 
 

+ 1 - 2
drivers/ide/pci/sl82c105.c

@@ -404,9 +404,8 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
 	.name		= "W82C105",
 	.name		= "W82C105",
 	.init_chipset	= init_chipset_sl82c105,
 	.init_chipset	= init_chipset_sl82c105,
 	.init_hwif	= init_hwif_sl82c105,
 	.init_hwif	= init_hwif_sl82c105,
-	.autodma	= NOAUTODMA,
 	.enablebits	= {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
 	.enablebits	= {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
-	.host_flags	= IDE_HFLAG_BOOTABLE,
+	.host_flags	= IDE_HFLAG_NO_AUTODMA | IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO5,
 	.pio_mask	= ATA_PIO5,
 };
 };
 
 

+ 0 - 1
drivers/ide/pci/slc90e66.c

@@ -159,7 +159,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
 static ide_pci_device_t slc90e66_chipset __devinitdata = {
 static ide_pci_device_t slc90e66_chipset __devinitdata = {
 	.name		= "SLC90E66",
 	.name		= "SLC90E66",
 	.init_hwif	= init_hwif_slc90e66,
 	.init_hwif	= init_hwif_slc90e66,
-	.autodma	= AUTODMA,
 	.enablebits	= {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
 	.enablebits	= {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,

+ 0 - 1
drivers/ide/pci/tc86c001.c

@@ -227,7 +227,6 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = {
 	.name		= "TC86C001",
 	.name		= "TC86C001",
 	.init_chipset	= init_chipset_tc86c001,
 	.init_chipset	= init_chipset_tc86c001,
 	.init_hwif	= init_hwif_tc86c001,
 	.init_hwif	= init_hwif_tc86c001,
-	.autodma	= AUTODMA,
 	.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_OFF_BOARD,
 	.host_flags	= IDE_HFLAG_SINGLE | IDE_HFLAG_OFF_BOARD,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,
 };
 };

+ 0 - 1
drivers/ide/pci/triflex.c

@@ -111,7 +111,6 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
 static ide_pci_device_t triflex_device __devinitdata = {
 static ide_pci_device_t triflex_device __devinitdata = {
 	.name		= "TRIFLEX",
 	.name		= "TRIFLEX",
 	.init_hwif	= init_hwif_triflex,
 	.init_hwif	= init_hwif_triflex,
-	.autodma	= AUTODMA,
 	.enablebits	= {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
 	.enablebits	= {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.host_flags	= IDE_HFLAG_BOOTABLE,
 	.pio_mask	= ATA_PIO4,
 	.pio_mask	= ATA_PIO4,

+ 1 - 1
drivers/ide/pci/trm290.c

@@ -324,11 +324,11 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
 static ide_pci_device_t trm290_chipset __devinitdata = {
 static ide_pci_device_t trm290_chipset __devinitdata = {
 	.name		= "TRM290",
 	.name		= "TRM290",
 	.init_hwif	= init_hwif_trm290,
 	.init_hwif	= init_hwif_trm290,
-	.autodma	= NOAUTODMA,
 	.host_flags	= IDE_HFLAG_NO_ATAPI_DMA |
 	.host_flags	= IDE_HFLAG_NO_ATAPI_DMA |
 #if 0 /* play it safe for now */
 #if 0 /* play it safe for now */
 			  IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 			  IDE_HFLAG_TRUST_BIOS_FOR_DMA |
 #endif
 #endif
+			  IDE_HFLAG_NO_AUTODMA |
 			  IDE_HFLAG_BOOTABLE,
 			  IDE_HFLAG_BOOTABLE,
 };
 };
 
 

+ 1 - 2
drivers/ide/pci/via82cxxx.c

@@ -456,18 +456,17 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
 		.name		= "VP_IDE",
 		.name		= "VP_IDE",
 		.init_chipset	= init_chipset_via82cxxx,
 		.init_chipset	= init_chipset_via82cxxx,
 		.init_hwif	= init_hwif_via82cxxx,
 		.init_hwif	= init_hwif_via82cxxx,
-		.autodma	= NOAUTODMA,
 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |
 				  IDE_HFLAG_POST_SET_MODE |
 				  IDE_HFLAG_POST_SET_MODE |
+				  IDE_HFLAG_NO_AUTODMA |
 				  IDE_HFLAG_BOOTABLE,
 				  IDE_HFLAG_BOOTABLE,
 		.pio_mask	= ATA_PIO5,
 		.pio_mask	= ATA_PIO5,
 	},{	/* 1 */
 	},{	/* 1 */
 		.name		= "VP_IDE",
 		.name		= "VP_IDE",
 		.init_chipset	= init_chipset_via82cxxx,
 		.init_chipset	= init_chipset_via82cxxx,
 		.init_hwif	= init_hwif_via82cxxx,
 		.init_hwif	= init_hwif_via82cxxx,
-		.autodma	= AUTODMA,
 		.enablebits	= {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
 		.enablebits	= {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |
 		.host_flags	= IDE_HFLAG_PIO_NO_BLACKLIST |
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |
 				  IDE_HFLAG_PIO_NO_DOWNGRADE |

+ 3 - 2
drivers/ide/setup-pci.c

@@ -428,9 +428,10 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
 static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
 static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
 {
 {
 	u16 pcicmd;
 	u16 pcicmd;
+
 	pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
 	pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
 
 
-	if ((d->autodma == AUTODMA) ||
+	if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 ||
 	    ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
 	    ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
 	     (dev->class & 0x80))) {
 	     (dev->class & 0x80))) {
 		unsigned long dma_base = ide_get_or_set_dma_base(hwif);
 		unsigned long dma_base = ide_get_or_set_dma_base(hwif);
@@ -558,7 +559,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
 		if (d->init_iops)
 		if (d->init_iops)
 			d->init_iops(hwif);
 			d->init_iops(hwif);
 
 
-		if (d->autodma == NODMA)
+		if (d->host_flags & IDE_HFLAG_NO_DMA)
 			goto bypass_legacy_dma;
 			goto bypass_legacy_dma;
 
 
 		if(d->init_setup_dma)
 		if(d->init_setup_dma)

+ 4 - 5
include/linux/ide.h

@@ -1210,10 +1210,6 @@ extern void default_hwif_iops(ide_hwif_t *);
 extern void default_hwif_mmiops(ide_hwif_t *);
 extern void default_hwif_mmiops(ide_hwif_t *);
 extern void default_hwif_transport(ide_hwif_t *);
 extern void default_hwif_transport(ide_hwif_t *);
 
 
-#define NODMA 0
-#define NOAUTODMA 1
-#define AUTODMA 2
-
 typedef struct ide_pci_enablebit_s {
 typedef struct ide_pci_enablebit_s {
 	u8	reg;	/* byte pci reg holding the enable-bit */
 	u8	reg;	/* byte pci reg holding the enable-bit */
 	u8	mask;	/* mask to isolate the enable-bit */
 	u8	mask;	/* mask to isolate the enable-bit */
@@ -1252,6 +1248,10 @@ enum {
 	IDE_HFLAG_NO_ATAPI_DMA		= (1 << 12),
 	IDE_HFLAG_NO_ATAPI_DMA		= (1 << 12),
 	/* set if host is a "bootable" controller */
 	/* set if host is a "bootable" controller */
 	IDE_HFLAG_BOOTABLE		= (1 << 13),
 	IDE_HFLAG_BOOTABLE		= (1 << 13),
+	/* host doesn't support DMA */
+	IDE_HFLAG_NO_DMA		= (1 << 14),
+	/* check if host is PCI IDE device before allowing DMA */
+	IDE_HFLAG_NO_AUTODMA		= (1 << 15),
 };
 };
 
 
 #ifdef CONFIG_BLK_DEV_OFFBOARD
 #ifdef CONFIG_BLK_DEV_OFFBOARD
@@ -1269,7 +1269,6 @@ typedef struct ide_pci_device_s {
 	void                    (*init_hwif)(ide_hwif_t *);
 	void                    (*init_hwif)(ide_hwif_t *);
 	void			(*init_dma)(ide_hwif_t *, unsigned long);
 	void			(*init_dma)(ide_hwif_t *, unsigned long);
 	void			(*fixup)(ide_hwif_t *);
 	void			(*fixup)(ide_hwif_t *);
-	u8			autodma;
 	ide_pci_enablebit_t	enablebits[2];
 	ide_pci_enablebit_t	enablebits[2];
 	unsigned int		extra;
 	unsigned int		extra;
 	struct ide_pci_device_s	*next;
 	struct ide_pci_device_s	*next;