aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-10-27 19:46:38 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 06:25:38 -0400
commitd249be54745259980dcbd898bdfeb7307c9c5e10 (patch)
tree871d4e7b58e1d19426b0c09bad1674fcb55f6f12 /drivers/net
parent317f66bdadc31f0c037b91ae7857f5c3d2a4e3e5 (diff)
igb: use packet buffer sizes from RXPBS register
This patch changes the configuration for 82576 so that it uses the actual value of the 82576 rx packet buffer size instead of just assuming the value. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/igb/e1000_82575.h2
-rw-r--r--drivers/net/igb/e1000_regs.h2
-rw-r--r--drivers/net/igb/igb_main.c3
3 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/igb/e1000_82575.h b/drivers/net/igb/e1000_82575.h
index cbe475747d1a..b3808ca49ef5 100644
--- a/drivers/net/igb/e1000_82575.h
+++ b/drivers/net/igb/e1000_82575.h
@@ -228,6 +228,8 @@ struct e1000_adv_tx_context_desc {
228 228
229#define ALL_QUEUES 0xFFFF 229#define ALL_QUEUES 0xFFFF
230 230
231/* RX packet buffer size defines */
232#define E1000_RXPBS_SIZE_MASK_82576 0x0000007F
231void igb_vmdq_set_loopback_pf(struct e1000_hw *, bool); 233void igb_vmdq_set_loopback_pf(struct e1000_hw *, bool);
232void igb_vmdq_set_replication_pf(struct e1000_hw *, bool); 234void igb_vmdq_set_replication_pf(struct e1000_hw *, bool);
233 235
diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h
index 24f2c24d0309..934e03b053ac 100644
--- a/drivers/net/igb/e1000_regs.h
+++ b/drivers/net/igb/e1000_regs.h
@@ -102,7 +102,9 @@
102#define E1000_ETQF(_n) (0x05CB0 + (4 * (_n))) /* EType Queue Fltr */ 102#define E1000_ETQF(_n) (0x05CB0 + (4 * (_n))) /* EType Queue Fltr */
103 103
104#define E1000_RQDPC(_n) (0x0C030 + ((_n) * 0x40)) 104#define E1000_RQDPC(_n) (0x0C030 + ((_n) * 0x40))
105
105/* Split and Replication RX Control - RW */ 106/* Split and Replication RX Control - RW */
107#define E1000_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */
106/* 108/*
107 * Convenience macros 109 * Convenience macros
108 * 110 *
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 7e628bad17d5..2ed2694df5ab 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1215,7 +1215,8 @@ void igb_reset(struct igb_adapter *adapter)
1215 */ 1215 */
1216 switch (mac->type) { 1216 switch (mac->type) {
1217 case e1000_82576: 1217 case e1000_82576:
1218 pba = E1000_PBA_64K; 1218 pba = rd32(E1000_RXPBS);
1219 pba &= E1000_RXPBS_SIZE_MASK_82576;
1219 break; 1220 break;
1220 case e1000_82575: 1221 case e1000_82575:
1221 default: 1222 default: