Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 211369
Collapse All | Expand All

(-)a/drivers/ata/libata-core.c (-14 / +24 lines)
Lines 2092-2115 int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, Link Here
2092
				     id, sizeof(id[0]) * ATA_ID_WORDS, 0);
2092
				     id, sizeof(id[0]) * ATA_ID_WORDS, 0);
2093
	if (err_mask) {
2093
	if (err_mask) {
2094
		if (err_mask & AC_ERR_NODEV_HINT) {
2094
		if (err_mask & AC_ERR_NODEV_HINT) {
2095
			DPRINTK("ata%u.%d: NODEV after polling detection\n",
2095
			ata_dev_printk(dev, KERN_DEBUG,
2096
				ap->print_id, dev->devno);
2096
				       "NODEV after polling detection\n");
2097
			return -ENOENT;
2097
			return -ENOENT;
2098
		}
2098
		}
2099
2099
2100
		/* Device or controller might have reported the wrong
2100
		if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
2101
		 * device class.  Give a shot at the other IDENTIFY if
2101
			/* Device or controller might have reported
2102
		 * the current one is aborted by the device.
2102
			 * the wrong device class.  Give a shot at the
2103
		 */
2103
			 * other IDENTIFY if the current one is
2104
		if (may_fallback &&
2104
			 * aborted by the device.
2105
		    (err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
2105
			 */
2106
			may_fallback = 0;
2106
			if (may_fallback) {
2107
				may_fallback = 0;
2107
2108
2108
			if (class == ATA_DEV_ATA)
2109
				if (class == ATA_DEV_ATA)
2109
				class = ATA_DEV_ATAPI;
2110
					class = ATA_DEV_ATAPI;
2110
			else
2111
				else
2111
				class = ATA_DEV_ATA;
2112
					class = ATA_DEV_ATA;
2112
			goto retry;
2113
				goto retry;
2114
			}
2115
2116
			/* Control reaches iff the device aborted both
2117
			 * flavors of IDENTIFYs which sometimes
2118
			 * happens with phantom devices.
2119
			 */
2120
			ata_dev_printk(dev, KERN_DEBUG,
2121
				       "both IDENTIFYs aborted, assuming NODEV\n");
2122
			return -ENOENT;
2113
		}
2123
		}
2114
2124
2115
		rc = -EIO;
2125
		rc = -EIO;

Return to bug 211369