Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2010 19:59:06 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r203902 - in stable/8/sys/dev: ahci siis
Message-ID:  <201002141959.o1EJx6tM070692@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Feb 14 19:59:06 2010
New Revision: 203902
URL: http://svn.freebsd.org/changeset/base/203902

Log:
  MFC r203165:
  Reset port on disconnect event, to abort any running requests.

Modified:
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/siis/siis.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/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Sun Feb 14 19:57:54 2010	(r203901)
+++ stable/8/sys/dev/ahci/ahci.c	Sun Feb 14 19:59:06 2010	(r203902)
@@ -1161,17 +1161,15 @@ ahci_phy_check_events(device_t dev, u_in
 		u_int32_t status = ATA_INL(ch->r_mem, AHCI_P_SSTS);
 		union ccb *ccb;
 
-		if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
-		    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
-		    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
-			if (bootverbose)
+		if (bootverbose) {
+			if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
+			    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
+			    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
 				device_printf(dev, "CONNECT requested\n");
-			ahci_reset(dev);
-		} else {
-			if (bootverbose)
+			} else
 				device_printf(dev, "DISCONNECT requested\n");
-			ch->devices = 0;
 		}
+		ahci_reset(dev);
 		if ((ccb = xpt_alloc_ccb_nowait()) == NULL)
 			return;
 		if (xpt_create_path(&ccb->ccb_h.path, NULL,

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Sun Feb 14 19:57:54 2010	(r203901)
+++ stable/8/sys/dev/siis/siis.c	Sun Feb 14 19:59:06 2010	(r203902)
@@ -728,17 +728,15 @@ siis_phy_check_events(device_t dev)
 		u_int32_t status = ATA_INL(ch->r_mem, SIIS_P_SSTS);
 		union ccb *ccb;
 
-		if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
-		    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
-		    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
-			if (bootverbose)
+		if (bootverbose) {
+			if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
+			    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
+			    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
 				device_printf(dev, "CONNECT requested\n");
-			siis_reset(dev);
-		} else {
-			if (bootverbose)
+			} else
 				device_printf(dev, "DISCONNECT requested\n");
-			ch->devices = 0;
 		}
+		siis_reset(dev);
 		if ((ccb = xpt_alloc_ccb_nowait()) == NULL)
 			return;
 		if (xpt_create_path(&ccb->ccb_h.path, NULL,



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