Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Feb 2010 16:39:53 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204250 - head/sys/dev/ata
Message-ID:  <201002231639.o1NGdrJ8020751@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Feb 23 16:39:53 2010
New Revision: 204250
URL: http://svn.freebsd.org/changeset/base/204250

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

Modified:
  head/sys/dev/ata/ata-all.c

Modified: head/sys/dev/ata/ata-all.c
==============================================================================
--- head/sys/dev/ata/ata-all.c	Tue Feb 23 15:27:07 2010	(r204249)
+++ head/sys/dev/ata/ata-all.c	Tue Feb 23 16:39:53 2010	(r204250)
@@ -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
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002231639.o1NGdrJ8020751>