svn commit: r203165 - in head/sys/dev: ahci siis
Alexander Motin
mav at FreeBSD.org
Fri Jan 29 12:47:05 UTC 2010
Author: mav
Date: Fri Jan 29 12:47:04 2010
New Revision: 203165
URL: http://svn.freebsd.org/changeset/base/203165
Log:
Reset port on disconnect event, to abort any running requests.
Modified:
head/sys/dev/ahci/ahci.c
head/sys/dev/siis/siis.c
Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c Fri Jan 29 12:09:14 2010 (r203164)
+++ head/sys/dev/ahci/ahci.c Fri Jan 29 12:47:04 2010 (r203165)
@@ -1167,17 +1167,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: head/sys/dev/siis/siis.c
==============================================================================
--- head/sys/dev/siis/siis.c Fri Jan 29 12:09:14 2010 (r203164)
+++ head/sys/dev/siis/siis.c Fri Jan 29 12:47:04 2010 (r203165)
@@ -741,17 +741,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,
More information about the svn-src-head
mailing list