/* Use a non standard set_mode function. We don't want to be tuned. The BIOS configured everything. Our job is not to fiddle. We read the dma enabled bits from the PCI configuration of the device and respect them.  */
static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unused)
/* Use a non standard set_mode function. We don't want to be tuned. The BIOS configured everything. Our job is not to fiddle. We read the dma enabled bits from the PCI configuration of the device and respect them.  */
static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unused)
{
	struct ata_device *dev;
	ata_for_each_dev(dev, link, ENABLED) {
		dev->pio_mode = XFER_PIO_0;
		dev->dma_mode = XFER_MW_DMA_0;
		if (ata_id_has_dma(dev->id)) {
			ata_dev_printk(dev, KERN_INFO, "configured for DMA\n");
			dev->xfer_mode = XFER_MW_DMA_0;
			dev->xfer_shift = ATA_SHIFT_MWDMA;
			dev->flags &= ~ATA_DFLAG_PIO;
		} else {
			ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
			dev->xfer_mode = XFER_PIO_0;
			dev->xfer_shift = ATA_SHIFT_PIO;
			dev->flags |= ATA_DFLAG_PIO;
		}
	}
	return 0;
}