|
@@ -4250,7 +4250,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
|
|
struct igb_adapter *adapter = netdev_priv(netdev);
|
|
struct igb_adapter *adapter = netdev_priv(netdev);
|
|
struct e1000_hw *hw = &adapter->hw;
|
|
struct e1000_hw *hw = &adapter->hw;
|
|
unsigned int vfn = adapter->vfs_allocated_count;
|
|
unsigned int vfn = adapter->vfs_allocated_count;
|
|
- u32 rctl = 0, vmolr = 0;
|
|
|
|
|
|
+ u32 rctl = 0, vmolr = 0, rlpml = MAX_JUMBO_FRAME_SIZE;
|
|
int count;
|
|
int count;
|
|
|
|
|
|
/* Check for Promiscuous and All Multicast modes */
|
|
/* Check for Promiscuous and All Multicast modes */
|
|
@@ -4308,6 +4308,14 @@ static void igb_set_rx_mode(struct net_device *netdev)
|
|
E1000_RCTL_VFE);
|
|
E1000_RCTL_VFE);
|
|
wr32(E1000_RCTL, rctl);
|
|
wr32(E1000_RCTL, rctl);
|
|
|
|
|
|
|
|
+#if (PAGE_SIZE < 8192)
|
|
|
|
+ if (!adapter->vfs_allocated_count) {
|
|
|
|
+ if (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)
|
|
|
|
+ rlpml = IGB_MAX_FRAME_BUILD_SKB;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+ wr32(E1000_RLPML, rlpml);
|
|
|
|
+
|
|
/* In order to support SR-IOV and eventually VMDq it is necessary to set
|
|
/* In order to support SR-IOV and eventually VMDq it is necessary to set
|
|
* the VMOLR to enable the appropriate modes. Without this workaround
|
|
* the VMOLR to enable the appropriate modes. Without this workaround
|
|
* we will have issues with VLAN tag stripping not being done for frames
|
|
* we will have issues with VLAN tag stripping not being done for frames
|
|
@@ -4322,12 +4330,17 @@ static void igb_set_rx_mode(struct net_device *netdev)
|
|
vmolr |= rd32(E1000_VMOLR(vfn)) &
|
|
vmolr |= rd32(E1000_VMOLR(vfn)) &
|
|
~(E1000_VMOLR_ROPE | E1000_VMOLR_MPME | E1000_VMOLR_ROMPE);
|
|
~(E1000_VMOLR_ROPE | E1000_VMOLR_MPME | E1000_VMOLR_ROMPE);
|
|
|
|
|
|
- /* enable Rx jumbo frames, no need for restriction */
|
|
|
|
|
|
+ /* enable Rx jumbo frames, restrict as needed to support build_skb */
|
|
vmolr &= ~E1000_VMOLR_RLPML_MASK;
|
|
vmolr &= ~E1000_VMOLR_RLPML_MASK;
|
|
- vmolr |= MAX_JUMBO_FRAME_SIZE | E1000_VMOLR_LPE;
|
|
|
|
|
|
+#if (PAGE_SIZE < 8192)
|
|
|
|
+ if (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)
|
|
|
|
+ vmolr |= IGB_MAX_FRAME_BUILD_SKB;
|
|
|
|
+ else
|
|
|
|
+#endif
|
|
|
|
+ vmolr |= MAX_JUMBO_FRAME_SIZE;
|
|
|
|
+ vmolr |= E1000_VMOLR_LPE;
|
|
|
|
|
|
wr32(E1000_VMOLR(vfn), vmolr);
|
|
wr32(E1000_VMOLR(vfn), vmolr);
|
|
- wr32(E1000_RLPML, MAX_JUMBO_FRAME_SIZE);
|
|
|
|
|
|
|
|
igb_restore_vf_multicasts(adapter);
|
|
igb_restore_vf_multicasts(adapter);
|
|
}
|
|
}
|