aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2008-11-25 04:03:26 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 04:03:26 -0500
commit9b07f3d3157487e6467dfa4640f7fb9446165494 (patch)
treebce5310fadccb72b632324ab2da631667f922605
parent7a6b6f515f77d1c62a2f383b6dce18cb0af0cf4f (diff)
igb: remove unneeded bit refrence when enabling jumbo frames
There is a reference to a Buffer Size extention bit that is unneded by 82575/82576 hardware. Since it is not needed it should be removed from the code. 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>
-rw-r--r--drivers/net/igb/e1000_defines.h6
-rw-r--r--drivers/net/igb/igb_main.c20
2 files changed, 6 insertions, 20 deletions
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index ce700689fb57..c5fe784c9e37 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -168,18 +168,12 @@
168#define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ 168#define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */
169#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ 169#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
170#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ 170#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
171/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */
172#define E1000_RCTL_SZ_2048 0x00000000 /* rx buffer size 2048 */ 171#define E1000_RCTL_SZ_2048 0x00000000 /* rx buffer size 2048 */
173#define E1000_RCTL_SZ_1024 0x00010000 /* rx buffer size 1024 */ 172#define E1000_RCTL_SZ_1024 0x00010000 /* rx buffer size 1024 */
174#define E1000_RCTL_SZ_512 0x00020000 /* rx buffer size 512 */ 173#define E1000_RCTL_SZ_512 0x00020000 /* rx buffer size 512 */
175#define E1000_RCTL_SZ_256 0x00030000 /* rx buffer size 256 */ 174#define E1000_RCTL_SZ_256 0x00030000 /* rx buffer size 256 */
176/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */
177#define E1000_RCTL_SZ_16384 0x00010000 /* rx buffer size 16384 */
178#define E1000_RCTL_SZ_8192 0x00020000 /* rx buffer size 8192 */
179#define E1000_RCTL_SZ_4096 0x00030000 /* rx buffer size 4096 */
180#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */ 175#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */
181#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */ 176#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */
182#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */
183#define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */ 177#define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */
184 178
185/* 179/*
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index b64c41a44dfc..ae65fae4333d 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1791,37 +1791,29 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
1791 */ 1791 */
1792 rctl |= E1000_RCTL_SECRC; 1792 rctl |= E1000_RCTL_SECRC;
1793 1793
1794 rctl &= ~E1000_RCTL_SBP; 1794 /*
1795 * disable store bad packets, long packet enable, and clear size bits.
1796 */
1797 rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_LPE | E1000_RCTL_SZ_256);
1795 1798
1796 if (adapter->netdev->mtu <= ETH_DATA_LEN) 1799 if (adapter->netdev->mtu <= ETH_DATA_LEN) {
1797 rctl &= ~E1000_RCTL_LPE;
1798 else
1799 rctl |= E1000_RCTL_LPE;
1800 if (adapter->rx_buffer_len <= IGB_RXBUFFER_2048) {
1801 /* Setup buffer sizes */ 1800 /* Setup buffer sizes */
1802 rctl &= ~E1000_RCTL_SZ_4096;
1803 rctl |= E1000_RCTL_BSEX;
1804 switch (adapter->rx_buffer_len) { 1801 switch (adapter->rx_buffer_len) {
1805 case IGB_RXBUFFER_256: 1802 case IGB_RXBUFFER_256:
1806 rctl |= E1000_RCTL_SZ_256; 1803 rctl |= E1000_RCTL_SZ_256;
1807 rctl &= ~E1000_RCTL_BSEX;
1808 break; 1804 break;
1809 case IGB_RXBUFFER_512: 1805 case IGB_RXBUFFER_512:
1810 rctl |= E1000_RCTL_SZ_512; 1806 rctl |= E1000_RCTL_SZ_512;
1811 rctl &= ~E1000_RCTL_BSEX;
1812 break; 1807 break;
1813 case IGB_RXBUFFER_1024: 1808 case IGB_RXBUFFER_1024:
1814 rctl |= E1000_RCTL_SZ_1024; 1809 rctl |= E1000_RCTL_SZ_1024;
1815 rctl &= ~E1000_RCTL_BSEX;
1816 break; 1810 break;
1817 case IGB_RXBUFFER_2048:
1818 default: 1811 default:
1819 rctl |= E1000_RCTL_SZ_2048; 1812 rctl |= E1000_RCTL_SZ_2048;
1820 rctl &= ~E1000_RCTL_BSEX;
1821 break; 1813 break;
1822 } 1814 }
1823 } else { 1815 } else {
1824 rctl &= ~E1000_RCTL_BSEX; 1816 rctl |= E1000_RCTL_LPE;
1825 srrctl = adapter->rx_buffer_len >> E1000_SRRCTL_BSIZEPKT_SHIFT; 1817 srrctl = adapter->rx_buffer_len >> E1000_SRRCTL_BSIZEPKT_SHIFT;
1826 } 1818 }
1827 1819