Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2011 20:41:00 +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: r220870 - stable/8/sys/dev/ahci
Message-ID:  <201104192041.p3JKf0uC021526@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



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