From owner-svn-src-all@FreeBSD.ORG Tue Oct 27 21:02:43 2009 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 031DD1065670; Tue, 27 Oct 2009 21:02:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC9188FC13; Tue, 27 Oct 2009 21:02:42 +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 n9RL2g2N041923; Tue, 27 Oct 2009 21:02:42 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9RL2gWN041919; Tue, 27 Oct 2009 21:02:42 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910272102.n9RL2gWN041919@svn.freebsd.org> From: Ed Maste Date: Tue, 27 Oct 2009 21:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198528 - in stable/6/sys: . conf contrib/pf dev/aac dev/cxgb 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, 27 Oct 2009 21:02:43 -0000 Author: emaste Date: Tue Oct 27 21:02:42 2009 New Revision: 198528 URL: http://svn.freebsd.org/changeset/base/198528 Log: MFC r188743,r188940 Use outbound message register 0 instead of mailbox 7 in aac_{rx,rkt}_get_fwstatus, as done in Adaptec's vendor driver as well as the Linux drivers. Submitted by: jkim, from Adaptec's driver == SVN rev 188743 modified aac_rx_get_fwstatus to use the AAC_RX_OMR0 register instead of AAC_RX_FWSTATUS, as that is the way it's done in Adaptec's vendor driver and in the Linux drivers. (The same applies to aac_rkt_get_fwstatus as well.) However, a concern has been raised about the compatibility of this change and old hardware / firmware versions. In the absense of specific information, revert to the original behaviour if the firmware does not support the "New comm." interface. Users of old cards or firmware haven't reported the problems that are potentially solved by switching to OMR0. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac.c stable/6/sys/dev/aac/aacreg.h stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac.c ============================================================================== --- stable/6/sys/dev/aac/aac.c Tue Oct 27 20:41:55 2009 (r198527) +++ stable/6/sys/dev/aac/aac.c Tue Oct 27 21:02:42 2009 (r198528) @@ -2373,7 +2373,8 @@ aac_rx_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_FWSTATUS)); + return(AAC_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + AAC_RX_OMR0 : AAC_RX_FWSTATUS)); } static int @@ -2392,7 +2393,8 @@ aac_rkt_get_fwstatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_FWSTATUS)); + return(AAC_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + AAC_RKT_OMR0 : AAC_RKT_FWSTATUS)); } /* Modified: stable/6/sys/dev/aac/aacreg.h ============================================================================== --- stable/6/sys/dev/aac/aacreg.h Tue Oct 27 20:41:55 2009 (r198527) +++ stable/6/sys/dev/aac/aacreg.h Tue Oct 27 21:02:42 2009 (r198528) @@ -1495,6 +1495,8 @@ enum { * and other related adapters. */ +#define AAC_RX_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RX_OMR1 0x1c /* outbound message register 1 */ #define AAC_RX_IDBR 0x20 /* inbound doorbell register */ #define AAC_RX_IISR 0x24 /* inbound interrupt status register */ #define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ @@ -1512,6 +1514,8 @@ enum { * Unsurprisingly, it's quite similar to the i960! */ +#define AAC_RKT_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RKT_OMR1 0x1c /* outbound message register 1 */ #define AAC_RKT_IDBR 0x20 /* inbound doorbell register */ #define AAC_RKT_IISR 0x24 /* inbound interrupt status register */ #define AAC_RKT_IIMR 0x28 /* inbound interrupt mask register */