libata-eh.c (bff0464769f2a1bd348265de704471747378e247) libata-eh.c (55a8e2c83ce50548dfef74bb19dfe2b809cb3099)
1/*
2 * libata-eh.c - libata error handling
3 *
4 * Maintained by: Jeff Garzik <jgarzik@pobox.com>
5 * Please ALWAYS copy linux-ide@vger.kernel.org
6 * on emails.
7 *
8 * Copyright 2006 Tejun Heo <htejun@gmail.com>

--- 1653 unchanged lines hidden (view full) ---

1662
1663 /* schedule the scsi_rescan_device() here */
1664 queue_work(ata_aux_wq, &(ap->scsi_rescan_task));
1665 } else if (dev->class == ATA_DEV_UNKNOWN &&
1666 ehc->tries[dev->devno] &&
1667 ata_class_enabled(ehc->classes[dev->devno])) {
1668 dev->class = ehc->classes[dev->devno];
1669
1/*
2 * libata-eh.c - libata error handling
3 *
4 * Maintained by: Jeff Garzik <jgarzik@pobox.com>
5 * Please ALWAYS copy linux-ide@vger.kernel.org
6 * on emails.
7 *
8 * Copyright 2006 Tejun Heo <htejun@gmail.com>

--- 1653 unchanged lines hidden (view full) ---

1662
1663 /* schedule the scsi_rescan_device() here */
1664 queue_work(ata_aux_wq, &(ap->scsi_rescan_task));
1665 } else if (dev->class == ATA_DEV_UNKNOWN &&
1666 ehc->tries[dev->devno] &&
1667 ata_class_enabled(ehc->classes[dev->devno])) {
1668 dev->class = ehc->classes[dev->devno];
1669
1670 if (ap->flags & ATA_FLAG_DETECT_POLLING)
1671 readid_flags |= ATA_READID_DETECT;
1672
1670 rc = ata_dev_read_id(dev, &dev->class, readid_flags,
1671 dev->id);
1672 if (rc == 0) {
1673 ehc->i.flags |= ATA_EHI_PRINTINFO;
1674 rc = ata_dev_configure(dev);
1675 ehc->i.flags &= ~ATA_EHI_PRINTINFO;
1673 rc = ata_dev_read_id(dev, &dev->class, readid_flags,
1674 dev->id);
1675 if (rc == 0) {
1676 ehc->i.flags |= ATA_EHI_PRINTINFO;
1677 rc = ata_dev_configure(dev);
1678 ehc->i.flags &= ~ATA_EHI_PRINTINFO;
1679 } else if (rc == -ENOENT) {
1680 /* IDENTIFY was issued to non-existent
1681 * device. No need to reset. Just
1682 * thaw and kill the device.
1683 */
1684 ata_eh_thaw_port(ap);
1685 dev->class = ATA_DEV_UNKNOWN;
1686 rc = 0;
1676 }
1677
1678 if (rc) {
1679 dev->class = ATA_DEV_UNKNOWN;
1680 break;
1681 }
1682
1687 }
1688
1689 if (rc) {
1690 dev->class = ATA_DEV_UNKNOWN;
1691 break;
1692 }
1693
1683 spin_lock_irqsave(ap->lock, flags);
1684 ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
1685 spin_unlock_irqrestore(ap->lock, flags);
1694 if (ata_dev_enabled(dev)) {
1695 spin_lock_irqsave(ap->lock, flags);
1696 ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
1697 spin_unlock_irqrestore(ap->lock, flags);
1686
1698
1687 /* new device discovered, configure transfer mode */
1688 ehc->i.flags |= ATA_EHI_SETMODE;
1699 /* new device discovered, configure xfermode */
1700 ehc->i.flags |= ATA_EHI_SETMODE;
1701 }
1689 }
1690 }
1691
1692 if (rc)
1693 *r_failed_dev = dev;
1694
1695 DPRINTK("EXIT\n");
1696 return rc;

--- 568 unchanged lines hidden ---
1702 }
1703 }
1704
1705 if (rc)
1706 *r_failed_dev = dev;
1707
1708 DPRINTK("EXIT\n");
1709 return rc;

--- 568 unchanged lines hidden ---