From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 20:41:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2C341065687; Tue, 19 Apr 2011 20:41:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D10FA8FC13; Tue, 19 Apr 2011 20:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3JKf0go021529; Tue, 19 Apr 2011 20:41:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JKf0uC021526; Tue, 19 Apr 2011 20:41:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104192041.p3JKf0uC021526@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 20:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220870 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 20:41:01 -0000 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 */