1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode.

This commit is contained in:
Alexander Motin 2010-02-23 16:39:53 +00:00
parent b8bba24e06
commit 5261b668c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204250

View File

@ -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
}