aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-03-13 01:19:25 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-03-20 01:47:33 -0400
commita1108ffd18c6e4f09b2d45b5ee151b10d52af4da (patch)
treef35bd61d0b609937c0aa5a7ffa14c0f864dcf8bb
parent1dcf875effe050013602ebb61a108ce5f19e0459 (diff)
ixgbe: Convert uses of __constant_<foo> to <foo>
The use of __constant_<foo> has been unnecessary for quite awhile now. Make these uses consistent with the rest of the kernel. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c8
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c30
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index 39557e3498a2..25a3dfef33e8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -408,13 +408,13 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
408 408
409 switch (ixgbe_test_staterr(rx_desc, IXGBE_RXDADV_STAT_FCSTAT)) { 409 switch (ixgbe_test_staterr(rx_desc, IXGBE_RXDADV_STAT_FCSTAT)) {
410 /* return 0 to bypass going to ULD for DDPed data */ 410 /* return 0 to bypass going to ULD for DDPed data */
411 case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_DDP): 411 case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_DDP):
412 /* update length of DDPed data */ 412 /* update length of DDPed data */
413 ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss); 413 ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
414 rc = 0; 414 rc = 0;
415 break; 415 break;
416 /* unmap the sg list when FCPRSP is received */ 416 /* unmap the sg list when FCPRSP is received */
417 case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP): 417 case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP):
418 dma_unmap_sg(&adapter->pdev->dev, ddp->sgl, 418 dma_unmap_sg(&adapter->pdev->dev, ddp->sgl,
419 ddp->sgc, DMA_FROM_DEVICE); 419 ddp->sgc, DMA_FROM_DEVICE);
420 ddp->err = ddp_err; 420 ddp->err = ddp_err;
@@ -422,14 +422,14 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
422 ddp->sgc = 0; 422 ddp->sgc = 0;
423 /* fall through */ 423 /* fall through */
424 /* if DDP length is present pass it through to ULD */ 424 /* if DDP length is present pass it through to ULD */
425 case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NODDP): 425 case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NODDP):
426 /* update length of DDPed data */ 426 /* update length of DDPed data */
427 ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss); 427 ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
428 if (ddp->len) 428 if (ddp->len)
429 rc = ddp->len; 429 rc = ddp->len;
430 break; 430 break;
431 /* no match will return as an error */ 431 /* no match will return as an error */
432 case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NOMTCH): 432 case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NOMTCH):
433 default: 433 default:
434 break; 434 break;
435 } 435 }
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c773d6cb6063..02271f6d9a17 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1539,7 +1539,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
1539 hdr.network += ETH_HLEN; 1539 hdr.network += ETH_HLEN;
1540 1540
1541 /* handle any vlan tag if present */ 1541 /* handle any vlan tag if present */
1542 if (protocol == __constant_htons(ETH_P_8021Q)) { 1542 if (protocol == htons(ETH_P_8021Q)) {
1543 if ((hdr.network - data) > (max_len - VLAN_HLEN)) 1543 if ((hdr.network - data) > (max_len - VLAN_HLEN))
1544 return max_len; 1544 return max_len;
1545 1545
@@ -1548,7 +1548,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
1548 } 1548 }
1549 1549
1550 /* handle L3 protocols */ 1550 /* handle L3 protocols */
1551 if (protocol == __constant_htons(ETH_P_IP)) { 1551 if (protocol == htons(ETH_P_IP)) {
1552 if ((hdr.network - data) > (max_len - sizeof(struct iphdr))) 1552 if ((hdr.network - data) > (max_len - sizeof(struct iphdr)))
1553 return max_len; 1553 return max_len;
1554 1554
@@ -1562,7 +1562,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
1562 /* record next protocol if header is present */ 1562 /* record next protocol if header is present */
1563 if (!(hdr.ipv4->frag_off & htons(IP_OFFSET))) 1563 if (!(hdr.ipv4->frag_off & htons(IP_OFFSET)))
1564 nexthdr = hdr.ipv4->protocol; 1564 nexthdr = hdr.ipv4->protocol;
1565 } else if (protocol == __constant_htons(ETH_P_IPV6)) { 1565 } else if (protocol == htons(ETH_P_IPV6)) {
1566 if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr))) 1566 if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
1567 return max_len; 1567 return max_len;
1568 1568
@@ -1570,7 +1570,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
1570 nexthdr = hdr.ipv6->nexthdr; 1570 nexthdr = hdr.ipv6->nexthdr;
1571 hlen = sizeof(struct ipv6hdr); 1571 hlen = sizeof(struct ipv6hdr);
1572#ifdef IXGBE_FCOE 1572#ifdef IXGBE_FCOE
1573 } else if (protocol == __constant_htons(ETH_P_FCOE)) { 1573 } else if (protocol == htons(ETH_P_FCOE)) {
1574 if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN)) 1574 if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN))
1575 return max_len; 1575 return max_len;
1576 hlen = FCOE_HEADER_LEN; 1576 hlen = FCOE_HEADER_LEN;
@@ -6520,7 +6520,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
6520 /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ 6520 /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
6521 type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP; 6521 type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP;
6522 6522
6523 if (first->protocol == __constant_htons(ETH_P_IP)) { 6523 if (first->protocol == htons(ETH_P_IP)) {
6524 struct iphdr *iph = ip_hdr(skb); 6524 struct iphdr *iph = ip_hdr(skb);
6525 iph->tot_len = 0; 6525 iph->tot_len = 0;
6526 iph->check = 0; 6526 iph->check = 0;
@@ -6580,12 +6580,12 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
6580 } else { 6580 } else {
6581 u8 l4_hdr = 0; 6581 u8 l4_hdr = 0;
6582 switch (first->protocol) { 6582 switch (first->protocol) {
6583 case __constant_htons(ETH_P_IP): 6583 case htons(ETH_P_IP):
6584 vlan_macip_lens |= skb_network_header_len(skb); 6584 vlan_macip_lens |= skb_network_header_len(skb);
6585 type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4; 6585 type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;
6586 l4_hdr = ip_hdr(skb)->protocol; 6586 l4_hdr = ip_hdr(skb)->protocol;
6587 break; 6587 break;
6588 case __constant_htons(ETH_P_IPV6): 6588 case htons(ETH_P_IPV6):
6589 vlan_macip_lens |= skb_network_header_len(skb); 6589 vlan_macip_lens |= skb_network_header_len(skb);
6590 l4_hdr = ipv6_hdr(skb)->nexthdr; 6590 l4_hdr = ipv6_hdr(skb)->nexthdr;
6591 break; 6591 break;
@@ -6860,9 +6860,9 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
6860 hdr.network = skb_network_header(first->skb); 6860 hdr.network = skb_network_header(first->skb);
6861 6861
6862 /* Currently only IPv4/IPv6 with TCP is supported */ 6862 /* Currently only IPv4/IPv6 with TCP is supported */
6863 if ((first->protocol != __constant_htons(ETH_P_IPV6) || 6863 if ((first->protocol != htons(ETH_P_IPV6) ||
6864 hdr.ipv6->nexthdr != IPPROTO_TCP) && 6864 hdr.ipv6->nexthdr != IPPROTO_TCP) &&
6865 (first->protocol != __constant_htons(ETH_P_IP) || 6865 (first->protocol != htons(ETH_P_IP) ||
6866 hdr.ipv4->protocol != IPPROTO_TCP)) 6866 hdr.ipv4->protocol != IPPROTO_TCP))
6867 return; 6867 return;
6868 6868
@@ -6895,12 +6895,12 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
6895 * and write the value to source port portion of compressed dword 6895 * and write the value to source port portion of compressed dword
6896 */ 6896 */
6897 if (first->tx_flags & (IXGBE_TX_FLAGS_SW_VLAN | IXGBE_TX_FLAGS_HW_VLAN)) 6897 if (first->tx_flags & (IXGBE_TX_FLAGS_SW_VLAN | IXGBE_TX_FLAGS_HW_VLAN))
6898 common.port.src ^= th->dest ^ __constant_htons(ETH_P_8021Q); 6898 common.port.src ^= th->dest ^ htons(ETH_P_8021Q);
6899 else 6899 else
6900 common.port.src ^= th->dest ^ first->protocol; 6900 common.port.src ^= th->dest ^ first->protocol;
6901 common.port.dst ^= th->source; 6901 common.port.dst ^= th->source;
6902 6902
6903 if (first->protocol == __constant_htons(ETH_P_IP)) { 6903 if (first->protocol == htons(ETH_P_IP)) {
6904 input.formatted.flow_type = IXGBE_ATR_FLOW_TYPE_TCPV4; 6904 input.formatted.flow_type = IXGBE_ATR_FLOW_TYPE_TCPV4;
6905 common.ip ^= hdr.ipv4->saddr ^ hdr.ipv4->daddr; 6905 common.ip ^= hdr.ipv4->saddr ^ hdr.ipv4->daddr;
6906 } else { 6906 } else {
@@ -6966,8 +6966,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
6966 * or FIP and we have FCoE enabled on the adapter 6966 * or FIP and we have FCoE enabled on the adapter
6967 */ 6967 */
6968 switch (vlan_get_protocol(skb)) { 6968 switch (vlan_get_protocol(skb)) {
6969 case __constant_htons(ETH_P_FCOE): 6969 case htons(ETH_P_FCOE):
6970 case __constant_htons(ETH_P_FIP): 6970 case htons(ETH_P_FIP):
6971 adapter = netdev_priv(dev); 6971 adapter = netdev_priv(dev);
6972 6972
6973 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) 6973 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
@@ -7028,7 +7028,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
7028 tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; 7028 tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT;
7029 tx_flags |= IXGBE_TX_FLAGS_HW_VLAN; 7029 tx_flags |= IXGBE_TX_FLAGS_HW_VLAN;
7030 /* else if it is a SW VLAN check the next protocol and store the tag */ 7030 /* else if it is a SW VLAN check the next protocol and store the tag */
7031 } else if (protocol == __constant_htons(ETH_P_8021Q)) { 7031 } else if (protocol == htons(ETH_P_8021Q)) {
7032 struct vlan_hdr *vhdr, _vhdr; 7032 struct vlan_hdr *vhdr, _vhdr;
7033 vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr); 7033 vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr);
7034 if (!vhdr) 7034 if (!vhdr)
@@ -7087,7 +7087,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
7087 7087
7088#ifdef IXGBE_FCOE 7088#ifdef IXGBE_FCOE
7089 /* setup tx offload for FCoE */ 7089 /* setup tx offload for FCoE */
7090 if ((protocol == __constant_htons(ETH_P_FCOE)) && 7090 if ((protocol == htons(ETH_P_FCOE)) &&
7091 (tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) { 7091 (tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) {
7092 tso = ixgbe_fso(tx_ring, first, &hdr_len); 7092 tso = ixgbe_fso(tx_ring, first, &hdr_len);
7093 if (tso < 0) 7093 if (tso < 0)