Date: Tue, 27 Oct 2009 21:09:52 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r198529 - in stable/7/sys: . contrib/pf dev/aac Message-ID: <200910272109.n9RL9qSm042088@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Tue Oct 27 21:09:52 2009 New Revision: 198529 URL: http://svn.freebsd.org/changeset/base/198529 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/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/aac/aac.c stable/7/sys/dev/aac/aacreg.h Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Tue Oct 27 21:02:42 2009 (r198528) +++ stable/7/sys/dev/aac/aac.c Tue Oct 27 21:09:52 2009 (r198529) @@ -2375,7 +2375,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 @@ -2394,7 +2395,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/7/sys/dev/aac/aacreg.h ============================================================================== --- stable/7/sys/dev/aac/aacreg.h Tue Oct 27 21:02:42 2009 (r198528) +++ stable/7/sys/dev/aac/aacreg.h Tue Oct 27 21:09:52 2009 (r198529) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910272109.n9RL9qSm042088>