svn commit: r204652 - stable/8/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Wed Mar 3 19:12:54 UTC 2010


Author: mav
Date: Wed Mar  3 19:12:53 2010
New Revision: 204652
URL: http://svn.freebsd.org/changeset/base/204652

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

Modified:
  stable/8/sys/dev/ata/ata-all.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Wed Mar  3 19:11:39 2010	(r204651)
+++ stable/8/sys/dev/ata/ata-all.c	Wed Mar  3 19:12:53 2010	(r204652)
@@ -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
 }
 


More information about the svn-src-stable-8 mailing list