svn commit: r220870 - stable/8/sys/dev/ahci

Alexander Motin mav at FreeBSD.org
Tue Apr 19 20:41:01 UTC 2011


Author: mav
Date: Tue Apr 19 20:41:00 2011
New Revision: 220870
URL: http://svn.freebsd.org/changeset/base/220870

Log:
  MFC r220789:
  Handle ready timeout during polled operation same as done in mvs(4) before.

Modified:
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/ahci/ahci.h
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)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Apr 19 20:40:00 2011	(r220869)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Apr 19 20:41:00 2011	(r220870)
@@ -2845,4 +2845,9 @@ ahcipoll(struct cam_sim *sim)
 	struct ahci_channel *ch = (struct ahci_channel *)cam_sim_softc(sim);
 
 	ahci_ch_intr(ch->dev);
+	if (ch->resetting != 0 &&
+	    (--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) {
+		ch->resetpolldiv = 1000;
+		ahci_reset_to(ch->dev);
+	}
 }

Modified: stable/8/sys/dev/ahci/ahci.h
==============================================================================
--- stable/8/sys/dev/ahci/ahci.h	Tue Apr 19 20:40:00 2011	(r220869)
+++ stable/8/sys/dev/ahci/ahci.h	Tue Apr 19 20:41:00 2011	(r220870)
@@ -414,6 +414,7 @@ struct ahci_channel {
 	int			lastslot;	/* Last used slot */
 	int			taggedtarget;	/* Last tagged target */
 	int			resetting;	/* Hard-reset in progress. */
+	int			resetpolldiv;	/* Hard-reset poll divider. */
 	int			listening;	/* SUD bit is cleared. */
 	union ccb		*frozen;	/* Frozen command */
 	struct callout		pm_timer;	/* Power management events */


More information about the svn-src-all mailing list