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 */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to