diff options
author | mav <mav@FreeBSD.org> | 2010-02-23 16:39:53 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-02-23 16:39:53 +0000 |
commit | 8e4f336600397f4e4c410342e5e32988925b8dcc (patch) | |
tree | 07695a5fc9bd67cc6860ea95686b9c7634af8908 | |
parent | f5d0be40c9a24d3ce1aae08133415216e6acf1d3 (diff) | |
download | FreeBSD-src-8e4f336600397f4e4c410342e5e32988925b8dcc.zip FreeBSD-src-8e4f336600397f4e4c410342e5e32988925b8dcc.tar.gz |
Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode.
-rw-r--r-- | sys/dev/ata/ata-all.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 0195781..73dfa94 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -289,15 +289,13 @@ static void ata_conn_event(void *context, int dummy) { device_t dev = (device_t)context; - struct ata_channel *ch = device_get_softc(dev); #ifdef ATA_CAM + struct ata_channel *ch = device_get_softc(dev); union ccb *ccb; -#endif mtx_lock(&ch->state_mtx); ata_reinit(dev); mtx_unlock(&ch->state_mtx); -#ifdef ATA_CAM if ((ccb = xpt_alloc_ccb()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, @@ -307,6 +305,8 @@ ata_conn_event(void *context, int dummy) return; } xpt_rescan(ccb); +#else + ata_reinit(dev); #endif } |