Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[pandora-kernel.git] / drivers / ata / libata-core.c
index 5c2e581..25d8d3f 100644 (file)
@@ -1597,10 +1597,10 @@ int ata_dev_configure(struct ata_device *dev)
                dev->n_sectors = ata_id_n_sectors(id);
 
                /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */
-               ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV_OFS,
+               ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,
                                sizeof(fwrevbuf));
 
-               ata_id_c_string(dev->id, modelbuf, ATA_ID_PROD_OFS,
+               ata_id_c_string(dev->id, modelbuf, ATA_ID_PROD,
                                sizeof(modelbuf));
 
                if (dev->id[59] & 0x100)
@@ -2333,6 +2333,10 @@ static int ata_dev_set_mode(struct ata_device *dev)
                dev->flags |= ATA_DFLAG_PIO;
 
        err_mask = ata_dev_set_xfermode(dev);
+       /* Old CFA may refuse this command, which is just fine */
+       if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id))
+               err_mask &= ~AC_ERR_DEV;
+
        if (err_mask) {
                ata_dev_printk(dev, KERN_ERR, "failed to set xfermode "
                               "(err_mask=0x%x)\n", err_mask);
@@ -3023,6 +3027,9 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class)
                return 0;
        }
 
+       /* wait a while before checking status, see SRST for more info */
+       msleep(150);
+
        if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
                ata_port_printk(ap, KERN_ERR,
                                "COMRESET failed (device not ready)\n");