From ad753ac2a74b1686057542f21b34dae282429ca6 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 26 Jan 2010 16:05:49 +0000 Subject: [PATCH] Clear ch->devices, if hard-reset failed. This makes hot-plug work nicely. HW donated by: James R. Van Artsdalen --- sys/dev/ata/chipsets/ata-promise.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ata/chipsets/ata-promise.c b/sys/dev/ata/chipsets/ata-promise.c index 3dad5d01f4f4..723016eac4d0 100644 --- a/sys/dev/ata/chipsets/ata-promise.c +++ b/sys/dev/ata/chipsets/ata-promise.c @@ -821,7 +821,8 @@ ata_promise_mio_reset(device_t dev) device_printf(dev, "promise_mio_reset devices=%08x\n", ch->devices); - } + } else + ch->devices = 0; /* reset and enable plug/unplug intr */ ATA_OUTL(ctlr->r_res2, 0x060, (0x00000011 << ch->unit));