[libata] ahci: Withdraw IGN_SERR_INTERNAL for SB800 SATA
[safe/jmp/linux-2.6] / drivers / ata / pata_it821x.c
index 0221c9a..f828a29 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * pata_it821x.c       - IT821x PATA for new ATA layer
  *                       (C) 2005 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
+ *                       Alan Cox <alan@lxorguk.ukuu.org.uk>
  *                       (C) 2007 Bartlomiej Zolnierkiewicz
  *
  * based upon
@@ -10,7 +10,7 @@
  *
  * linux/drivers/ide/pci/it821x.c              Version 0.09    December 2004
  *
- * Copyright (C) 2004          Red Hat <alan@redhat.com>
+ * Copyright (C) 2004          Red Hat
  *
  *  May be copied or modified under the terms of the GNU General Public License
  *  Based in part on the ITE vendor provided SCSI driver.
@@ -465,24 +465,22 @@ static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unus
 {
        struct ata_device *dev;
 
-       ata_link_for_each_dev(dev, link) {
-               if (ata_dev_enabled(dev)) {
-                       /* We don't really care */
-                       dev->pio_mode = XFER_PIO_0;
-                       dev->dma_mode = XFER_MW_DMA_0;
-                       /* We do need the right mode information for DMA or PIO
-                          and this comes from the current configuration flags */
-                       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;
-                       }
+       ata_for_each_dev(dev, link, ENABLED) {
+               /* We don't really care */
+               dev->pio_mode = XFER_PIO_0;
+               dev->dma_mode = XFER_MW_DMA_0;
+               /* We do need the right mode information for DMA or PIO
+                  and this comes from the current configuration flags */
+               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;
@@ -557,9 +555,8 @@ static unsigned int it821x_read_id(struct ata_device *adev,
        if (strstr(model_num, "Integrated Technology Express")) {
                /* Set feature bits the firmware neglects */
                id[49] |= 0x0300;       /* LBA, DMA */
-               id[82] |= 0x0400;       /* LBA48 */
                id[83] &= 0x7FFF;
-               id[83] |= 0x4000;       /* Word 83 is valid */
+               id[83] |= 0x4400;       /* Word 83 is valid and LBA48 */
                id[86] |= 0x0400;       /* LBA48 on */
                id[ATA_ID_MAJOR_VER] |= 0x1F;
        }