Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to e100, igb, igbvf, ixgbe and ixgbevf.

Stefan adds a igb patch to enable the ability strip VLAN header information
for packets bound for a VM on i350 hardware.

Joe Perches provides patches for e100, igb, igbvf, ixgbe and ixgbevf to
convert the use of __constant_<foo> to just <foo> to align with the rest
of the kernel.

Don provides two fixes for ixgbe, first resolves a link issue with DA
cables where we were not always freeing the firmware/software semaphore
after grabbing it.  Second stops caching whether the management firmware
was enabled, however since this is not static, we really need to verify
with each check.

Jacob provides six fixes/cleanups for ixgbe, most notably, correct
the stop_mac_link_on d3() to check the Core Clock Disable bit before
stopping link and to fully check to see if manage firmware is running or
could be enabled before bringing down the link.  Fix flow control
auto-negation for KR/KX/K4 interfaces, since setting up MAC link, the
cached autoc value and current autoc value were being incorrectly used to
determine whether link reset is required.

Emil provides a fix for ixgbe where there was a chance for aggressive
start_ndo_zmit() callers to sneak packets between enabling the Tx queues
and the link coming up.  To resolve this, move the call to enable Tx
queues to after the link is established.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 20, 2014
2 parents a9baf10 + cdc04dc commit c60c833
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 206 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,9 +1778,9 @@ static int e100_xmit_prepare(struct nic *nic, struct cb *cb,
* testing, ie sending frames with bad CRC.
*/
if (unlikely(skb->no_fcs))
cb->command |= __constant_cpu_to_le16(cb_tx_nc);
cb->command |= cpu_to_le16(cb_tx_nc);
else
cb->command &= ~__constant_cpu_to_le16(cb_tx_nc);
cb->command &= ~cpu_to_le16(cb_tx_nc);

/* interrupt every 16 packets regardless of delay */
if ((nic->cbs_avail & ~15) == nic->cbs_avail)
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/igb/e1000_82575.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ struct e1000_adv_tx_context_desc {
#define E1000_VMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */
#define E1000_VMOLR_STRCRC 0x80000000 /* CRC stripping enable */

#define E1000_DVMOLR_HIDEVLAN 0x20000000 /* Hide vlan enable */
#define E1000_DVMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */
#define E1000_DVMOLR_STRCRC 0x80000000 /* CRC stripping enable */

#define E1000_VLVF_ARRAY_SIZE 32
#define E1000_VLVF_VLANID_MASK 0x00000FFF
#define E1000_VLVF_POOLSEL_SHIFT 12
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/igb/e1000_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
#define E1000_P2VMAILBOX(_n) (0x00C00 + (4 * (_n)))
#define E1000_VMBMEM(_n) (0x00800 + (64 * (_n)))
#define E1000_VMOLR(_n) (0x05AD0 + (4 * (_n)))
#define E1000_DVMOLR(_n) (0x0C038 + (64 * (_n)))
#define E1000_VLVF(_n) (0x05D00 + (4 * (_n))) /* VLAN Virtual Machine
* Filter - RW */
#define E1000_VMVIR(_n) (0x03700 + (4 * (_n)))
Expand Down
19 changes: 13 additions & 6 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3542,6 +3542,13 @@ static inline void igb_set_vmolr(struct igb_adapter *adapter,

vmolr = rd32(E1000_VMOLR(vfn));
vmolr |= E1000_VMOLR_STRVLAN; /* Strip vlan tags */
if (hw->mac.type == e1000_i350) {
u32 dvmolr;

dvmolr = rd32(E1000_DVMOLR(vfn));
dvmolr |= E1000_DVMOLR_STRVLAN;
wr32(E1000_DVMOLR(vfn), dvmolr);
}
if (aupe)
vmolr |= E1000_VMOLR_AUPE; /* Accept untagged packets */
else
Expand Down Expand Up @@ -4585,7 +4592,7 @@ static int igb_tso(struct igb_ring *tx_ring,
/* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
type_tucmd = E1000_ADVTXD_TUCMD_L4T_TCP;

if (first->protocol == __constant_htons(ETH_P_IP)) {
if (first->protocol == htons(ETH_P_IP)) {
struct iphdr *iph = ip_hdr(skb);
iph->tot_len = 0;
iph->check = 0;
Expand Down Expand Up @@ -4641,12 +4648,12 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
} else {
u8 l4_hdr = 0;
switch (first->protocol) {
case __constant_htons(ETH_P_IP):
case htons(ETH_P_IP):
vlan_macip_lens |= skb_network_header_len(skb);
type_tucmd |= E1000_ADVTXD_TUCMD_IPV4;
l4_hdr = ip_hdr(skb)->protocol;
break;
case __constant_htons(ETH_P_IPV6):
case htons(ETH_P_IPV6):
vlan_macip_lens |= skb_network_header_len(skb);
l4_hdr = ipv6_hdr(skb)->nexthdr;
break;
Expand Down Expand Up @@ -6731,7 +6738,7 @@ static unsigned int igb_get_headlen(unsigned char *data,
hdr.network += ETH_HLEN;

/* handle any vlan tag if present */
if (protocol == __constant_htons(ETH_P_8021Q)) {
if (protocol == htons(ETH_P_8021Q)) {
if ((hdr.network - data) > (max_len - VLAN_HLEN))
return max_len;

Expand All @@ -6740,7 +6747,7 @@ static unsigned int igb_get_headlen(unsigned char *data,
}

/* handle L3 protocols */
if (protocol == __constant_htons(ETH_P_IP)) {
if (protocol == htons(ETH_P_IP)) {
if ((hdr.network - data) > (max_len - sizeof(struct iphdr)))
return max_len;

Expand All @@ -6754,7 +6761,7 @@ static unsigned int igb_get_headlen(unsigned char *data,
/* record next protocol if header is present */
if (!(hdr.ipv4->frag_off & htons(IP_OFFSET)))
nexthdr = hdr.ipv4->protocol;
} else if (protocol == __constant_htons(ETH_P_IPV6)) {
} else if (protocol == htons(ETH_P_IPV6)) {
if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
return max_len;

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/igbvf/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,12 +2014,12 @@ static inline bool igbvf_tx_csum(struct igbvf_adapter *adapter,

if (skb->ip_summed == CHECKSUM_PARTIAL) {
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
case htons(ETH_P_IP):
tu_cmd |= E1000_ADVTXD_TUCMD_IPV4;
if (ip_hdr(skb)->protocol == IPPROTO_TCP)
tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
break;
case __constant_htons(ETH_P_IPV6):
case htons(ETH_P_IPV6):
if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
break;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,6 @@ static struct ixgbe_mac_operations mac_ops_82598 = {
.release_swfw_sync = &ixgbe_release_swfw_sync,
.get_thermal_sensor_data = NULL,
.init_thermal_sensor_thresh = NULL,
.mng_fw_enabled = NULL,
.prot_autoc_read = &prot_autoc_read_generic,
.prot_autoc_write = &prot_autoc_write_generic,
};
Expand Down
Loading

0 comments on commit c60c833

Please sign in to comment.