From 55cab290fcfb54ff2225bc84652ff631feca520a Mon Sep 17 00:00:00 2001 From: mav Date: Sat, 28 Feb 2009 22:07:15 +0000 Subject: Revert my ata_identify()/ata_reinit() related changes: r189166, r189091 and partially r188903. Revert breaks new drives detection on reinit to the state as it was before me, but fixes series of new bugs reported by some people. Unconditional queueing of ata_completed() calls can lead to deadlock if due to timeout ata_reinit() was called at the same thread by previous ata_completed(). Calling of ata_identify() on ata_reinit() in current implementation opens numerous races and deadlocks. Problems I was touching here are still exist and should be addresed, but probably in different way. --- sys/dev/ata/ata-disk.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sys/dev/ata/ata-disk.c') diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index a1280ac..e11f3f9 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -79,18 +79,6 @@ ad_probe(device_t dev) { struct ata_device *atadev = device_get_softc(dev); - if (atadev->type != ATA_T_ATA) - return (ENXIO); - - if (!(atadev->flags & ATA_D_PROBED)) { - atadev->flags |= ATA_D_PROBED; - if (ata_getparam(atadev, 1) == 0) - atadev->flags |= ATA_D_VALID; - } - - if (!(atadev->flags & ATA_D_VALID)) - return (ENXIO); - if (!(atadev->param.config & ATA_PROTO_ATAPI) || (atadev->param.config == ATA_CFA_MAGIC1) || (atadev->param.config == ATA_CFA_MAGIC2) || -- cgit v1.1