Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2013 22:00:38 +0000 (UTC)
From:      David C Somayajulu <davidcs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251076 - head/sys/dev/qlxgbe
Message-ID:  <201305282200.r4SM0cZX062834@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidcs
Date: Tue May 28 22:00:37 2013
New Revision: 251076
URL: http://svnweb.freebsd.org/changeset/base/251076

Log:
  Avoid reading back certain registers following a write. This is an optimization.
  
  Submitted by: David C Somayajulu
  Approved by: George Neville Neil

Modified:
  head/sys/dev/qlxgbe/ql_hw.h

Modified: head/sys/dev/qlxgbe/ql_hw.h
==============================================================================
--- head/sys/dev/qlxgbe/ql_hw.h	Tue May 28 21:57:55 2013	(r251075)
+++ head/sys/dev/qlxgbe/ql_hw.h	Tue May 28 22:00:37 2013	(r251076)
@@ -1533,16 +1533,16 @@ typedef struct _qla_hw {
 } qla_hw_t;
 
 #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \
-		WRITE_REG32(ha, prod_reg, val);
+		bus_write_4((ha->pci_reg), prod_reg, val);
 
 #define QL_UPDATE_TX_PRODUCER_INDEX(ha, val, i) \
-	WRITE_REG32(ha, ha->hw.tx_cntxt[i].tx_prod_reg, val)
+		WRITE_REG32(ha, ha->hw.tx_cntxt[i].tx_prod_reg, val)
 
 #define QL_UPDATE_SDS_CONSUMER_INDEX(ha, i, val) \
-	WRITE_REG32(ha, ha->hw.sds[i].sds_consumer, val)
-
-#define QL_ENABLE_INTERRUPTS(ha, i) WRITE_REG32(ha, ha->hw.intr_src[i], 0);
+	bus_write_4((ha->pci_reg), (ha->hw.sds[i].sds_consumer), val);
 
+#define QL_ENABLE_INTERRUPTS(ha, i) \
+		bus_write_4((ha->pci_reg), (ha->hw.intr_src[i]), 0);
 
 #define QL_BUFFER_ALIGN                16
 



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