Re: [PATCH 02/13] libata-hp: implement hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik wrote:
Tejun Heo wrote:
\> +        } else if (dev->class == ATA_DEV_UNKNOWN &&
+               ehc->tries[dev->devno] &&
+               ata_class_enabled(ehc->classes[dev->devno])) {
+            dev->class = ehc->classes[dev->devno];
+
+            rc = ata_dev_read_id(dev, &dev->class, 1, dev->id);
+            if (rc == 0)
+                rc = ata_dev_configure(dev, 1);
+
+            if (rc) {
+                dev->class = ATA_DEV_UNKNOWN;
+                break;
+            }

ACK, with a comment: It seems like this small snippet of logic appears in more than one place, and could be made common


If you're referring to ata_bus_probe(), it will be removed as soon as all drivers are converted to new EH with a lot of other codes, so I don't think factoring above part is necessary.

--
tejun
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux