Commit 59c56342 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue

Tony Nguyen says:

====================
1GbE Intel Wired LAN Driver Updates 2021-05-26

Jesse Brandeburg says:

In this series I address the C=2 (sparse) warnings. The goal is to be
completely sparse clean in the drivers/net/ethernet/intel directory.
This can help us run this tool for every patch, and helps the kernel
code by reducing technical debt.

NOTE: there is one warning left in ixgbe XDP code using rcu_assign_pointer().

* '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
  ixgbe: reduce checker warnings
  ixgbe: use checker safe conversions
  igbvf: convert to strongly typed descriptors
  intel: call csum functions with well formatted arguments
  igb: override two checker warnings
  igb: fix assignment on big endian machines
  igb: handle vlan types with checker enabled
  igb/igc: use strongly typed pointer
  fm10k: move error check
  intel: remove checker warning
  e100: handle eeprom as little endian
====================

Link: https://lore.kernel.org/r/20210526172346.3515587-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 18c8d304 205523bc
...@@ -1395,7 +1395,7 @@ static int e100_phy_check_without_mii(struct nic *nic) ...@@ -1395,7 +1395,7 @@ static int e100_phy_check_without_mii(struct nic *nic)
u8 phy_type; u8 phy_type;
int without_mii; int without_mii;
phy_type = (nic->eeprom[eeprom_phy_iface] >> 8) & 0x0f; phy_type = (le16_to_cpu(nic->eeprom[eeprom_phy_iface]) >> 8) & 0x0f;
switch (phy_type) { switch (phy_type) {
case NoSuchPhy: /* Non-MII PHY; UNTESTED! */ case NoSuchPhy: /* Non-MII PHY; UNTESTED! */
...@@ -1515,7 +1515,7 @@ static int e100_phy_init(struct nic *nic) ...@@ -1515,7 +1515,7 @@ static int e100_phy_init(struct nic *nic)
mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr); mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr);
} else if ((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && } else if ((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) && (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) &&
(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) { (le16_to_cpu(nic->eeprom[eeprom_cnfg_mdix]) & eeprom_mdix_enabled))) {
/* enable/disable MDI/MDI-X auto-switching. */ /* enable/disable MDI/MDI-X auto-switching. */
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH); nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
...@@ -2269,9 +2269,9 @@ static int e100_asf(struct nic *nic) ...@@ -2269,9 +2269,9 @@ static int e100_asf(struct nic *nic)
{ {
/* ASF can be enabled from eeprom */ /* ASF can be enabled from eeprom */
return (nic->pdev->device >= 0x1050) && (nic->pdev->device <= 0x1057) && return (nic->pdev->device >= 0x1050) && (nic->pdev->device <= 0x1057) &&
(nic->eeprom[eeprom_config_asf] & eeprom_asf) && (le16_to_cpu(nic->eeprom[eeprom_config_asf]) & eeprom_asf) &&
!(nic->eeprom[eeprom_config_asf] & eeprom_gcl) && !(le16_to_cpu(nic->eeprom[eeprom_config_asf]) & eeprom_gcl) &&
((nic->eeprom[eeprom_smbus_addr] & 0xFF) != 0xFE); ((le16_to_cpu(nic->eeprom[eeprom_smbus_addr]) & 0xFF) != 0xFE);
} }
static int e100_up(struct nic *nic) static int e100_up(struct nic *nic)
...@@ -2926,7 +2926,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2926,7 +2926,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Wol magic packet can be enabled from eeprom */ /* Wol magic packet can be enabled from eeprom */
if ((nic->mac >= mac_82558_D101_A4) && if ((nic->mac >= mac_82558_D101_A4) &&
(nic->eeprom[eeprom_id] & eeprom_id_wol)) { (le16_to_cpu(nic->eeprom[eeprom_id]) & eeprom_id_wol)) {
nic->flags |= wol_magic; nic->flags |= wol_magic;
device_set_wakeup_enable(&pdev->dev, true); device_set_wakeup_enable(&pdev->dev, true);
} }
......
...@@ -513,7 +513,7 @@ static int e1000_set_eeprom(struct net_device *netdev, ...@@ -513,7 +513,7 @@ static int e1000_set_eeprom(struct net_device *netdev,
memcpy(ptr, bytes, eeprom->len); memcpy(ptr, bytes, eeprom->len);
for (i = 0; i < last_word - first_word + 1; i++) for (i = 0; i < last_word - first_word + 1; i++)
eeprom_buff[i] = cpu_to_le16(eeprom_buff[i]); cpu_to_le16s(&eeprom_buff[i]);
ret_val = e1000_write_eeprom(hw, first_word, ret_val = e1000_write_eeprom(hw, first_word,
last_word - first_word + 1, eeprom_buff); last_word - first_word + 1, eeprom_buff);
......
...@@ -1370,7 +1370,6 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data) ...@@ -1370,7 +1370,6 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
struct fm10k_hw *hw = &interface->hw; struct fm10k_hw *hw = &interface->hw;
struct fm10k_mbx_info *mbx = &hw->mbx; struct fm10k_mbx_info *mbx = &hw->mbx;
u32 eicr; u32 eicr;
s32 err = 0;
/* unmask any set bits related to this interrupt */ /* unmask any set bits related to this interrupt */
eicr = fm10k_read_reg(hw, FM10K_EICR); eicr = fm10k_read_reg(hw, FM10K_EICR);
...@@ -1386,15 +1385,16 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data) ...@@ -1386,15 +1385,16 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)
/* service mailboxes */ /* service mailboxes */
if (fm10k_mbx_trylock(interface)) { if (fm10k_mbx_trylock(interface)) {
err = mbx->ops.process(hw, mbx); s32 err = mbx->ops.process(hw, mbx);
if (err == FM10K_ERR_RESET_REQUESTED)
set_bit(FM10K_FLAG_RESET_REQUESTED, interface->flags);
/* handle VFLRE events */ /* handle VFLRE events */
fm10k_iov_event(interface); fm10k_iov_event(interface);
fm10k_mbx_unlock(interface); fm10k_mbx_unlock(interface);
} }
if (err == FM10K_ERR_RESET_REQUESTED)
set_bit(FM10K_FLAG_RESET_REQUESTED, interface->flags);
/* if switch toggled state we should reset GLORTs */ /* if switch toggled state we should reset GLORTs */
if (eicr & FM10K_EICR_SWITCHNOTREADY) { if (eicr & FM10K_EICR_SWITCHNOTREADY) {
/* force link down for at least 4 seconds */ /* force link down for at least 4 seconds */
......
...@@ -831,7 +831,7 @@ static int igb_set_eeprom(struct net_device *netdev, ...@@ -831,7 +831,7 @@ static int igb_set_eeprom(struct net_device *netdev,
memcpy(ptr, bytes, eeprom->len); memcpy(ptr, bytes, eeprom->len);
for (i = 0; i < last_word - first_word + 1; i++) for (i = 0; i < last_word - first_word + 1; i++)
eeprom_buff[i] = cpu_to_le16(eeprom_buff[i]); cpu_to_le16s(&eeprom_buff[i]);
ret_val = hw->nvm.ops.write(hw, first_word, ret_val = hw->nvm.ops.write(hw, first_word,
last_word - first_word + 1, eeprom_buff); last_word - first_word + 1, eeprom_buff);
......
...@@ -356,7 +356,7 @@ static void igb_dump(struct igb_adapter *adapter) ...@@ -356,7 +356,7 @@ static void igb_dump(struct igb_adapter *adapter)
struct igb_reg_info *reginfo; struct igb_reg_info *reginfo;
struct igb_ring *tx_ring; struct igb_ring *tx_ring;
union e1000_adv_tx_desc *tx_desc; union e1000_adv_tx_desc *tx_desc;
struct my_u0 { u64 a; u64 b; } *u0; struct my_u0 { __le64 a; __le64 b; } *u0;
struct igb_ring *rx_ring; struct igb_ring *rx_ring;
union e1000_adv_rx_desc *rx_desc; union e1000_adv_rx_desc *rx_desc;
u32 staterr; u32 staterr;
...@@ -2643,7 +2643,8 @@ static int igb_parse_cls_flower(struct igb_adapter *adapter, ...@@ -2643,7 +2643,8 @@ static int igb_parse_cls_flower(struct igb_adapter *adapter,
} }
input->filter.match_flags |= IGB_FILTER_FLAG_VLAN_TCI; input->filter.match_flags |= IGB_FILTER_FLAG_VLAN_TCI;
input->filter.vlan_tci = match.key->vlan_priority; input->filter.vlan_tci =
(__force __be16)match.key->vlan_priority;
} }
} }
...@@ -6275,12 +6276,12 @@ int igb_xmit_xdp_ring(struct igb_adapter *adapter, ...@@ -6275,12 +6276,12 @@ int igb_xmit_xdp_ring(struct igb_adapter *adapter,
cmd_type |= len | IGB_TXD_DCMD; cmd_type |= len | IGB_TXD_DCMD;
tx_desc->read.cmd_type_len = cpu_to_le32(cmd_type); tx_desc->read.cmd_type_len = cpu_to_le32(cmd_type);
olinfo_status = cpu_to_le32(len << E1000_ADVTXD_PAYLEN_SHIFT); olinfo_status = len << E1000_ADVTXD_PAYLEN_SHIFT;
/* 82575 requires a unique index per ring */ /* 82575 requires a unique index per ring */
if (test_bit(IGB_RING_FLAG_TX_CTX_IDX, &tx_ring->flags)) if (test_bit(IGB_RING_FLAG_TX_CTX_IDX, &tx_ring->flags))
olinfo_status |= tx_ring->reg_idx << 4; olinfo_status |= tx_ring->reg_idx << 4;
tx_desc->read.olinfo_status = olinfo_status; tx_desc->read.olinfo_status = cpu_to_le32(olinfo_status);
netdev_tx_sent_queue(txring_txq(tx_ring), tx_buffer->bytecount); netdev_tx_sent_queue(txring_txq(tx_ring), tx_buffer->bytecount);
...@@ -8597,7 +8598,7 @@ static void igb_process_skb_fields(struct igb_ring *rx_ring, ...@@ -8597,7 +8598,7 @@ static void igb_process_skb_fields(struct igb_ring *rx_ring,
if (igb_test_staterr(rx_desc, E1000_RXDEXT_STATERR_LB) && if (igb_test_staterr(rx_desc, E1000_RXDEXT_STATERR_LB) &&
test_bit(IGB_RING_FLAG_RX_LB_VLAN_BSWAP, &rx_ring->flags)) test_bit(IGB_RING_FLAG_RX_LB_VLAN_BSWAP, &rx_ring->flags))
vid = be16_to_cpu(rx_desc->wb.upper.vlan); vid = be16_to_cpu((__force __be16)rx_desc->wb.upper.vlan);
else else
vid = le16_to_cpu(rx_desc->wb.upper.vlan); vid = le16_to_cpu(rx_desc->wb.upper.vlan);
......
...@@ -1134,12 +1134,12 @@ static int igb_ptp_set_timestamp_mode(struct igb_adapter *adapter, ...@@ -1134,12 +1134,12 @@ static int igb_ptp_set_timestamp_mode(struct igb_adapter *adapter,
| E1000_FTQF_MASK); /* mask all inputs */ | E1000_FTQF_MASK); /* mask all inputs */
ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */ ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */
wr32(E1000_IMIR(3), htons(PTP_EV_PORT)); wr32(E1000_IMIR(3), (__force unsigned int)htons(PTP_EV_PORT));
wr32(E1000_IMIREXT(3), wr32(E1000_IMIREXT(3),
(E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP)); (E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP));
if (hw->mac.type == e1000_82576) { if (hw->mac.type == e1000_82576) {
/* enable source port check */ /* enable source port check */
wr32(E1000_SPQF(3), htons(PTP_EV_PORT)); wr32(E1000_SPQF(3), (__force unsigned int)htons(PTP_EV_PORT));
ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP; ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP;
} }
wr32(E1000_FTQF(3), ftqf); wr32(E1000_FTQF(3), ftqf);
......
...@@ -83,14 +83,14 @@ static int igbvf_desc_unused(struct igbvf_ring *ring) ...@@ -83,14 +83,14 @@ static int igbvf_desc_unused(struct igbvf_ring *ring)
static void igbvf_receive_skb(struct igbvf_adapter *adapter, static void igbvf_receive_skb(struct igbvf_adapter *adapter,
struct net_device *netdev, struct net_device *netdev,
struct sk_buff *skb, struct sk_buff *skb,
u32 status, u16 vlan) u32 status, __le16 vlan)
{ {
u16 vid; u16 vid;
if (status & E1000_RXD_STAT_VP) { if (status & E1000_RXD_STAT_VP) {
if ((adapter->flags & IGBVF_FLAG_RX_LB_VLAN_BSWAP) && if ((adapter->flags & IGBVF_FLAG_RX_LB_VLAN_BSWAP) &&
(status & E1000_RXDEXT_STATERR_LB)) (status & E1000_RXDEXT_STATERR_LB))
vid = be16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK; vid = be16_to_cpu((__force __be16)vlan) & E1000_RXD_SPC_VLAN_MASK;
else else
vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK; vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
if (test_bit(vid, adapter->active_vlans)) if (test_bit(vid, adapter->active_vlans))
...@@ -2056,7 +2056,7 @@ static int igbvf_tso(struct igbvf_ring *tx_ring, ...@@ -2056,7 +2056,7 @@ static int igbvf_tso(struct igbvf_ring *tx_ring,
/* remove payload length from inner checksum */ /* remove payload length from inner checksum */
paylen = skb->len - l4_offset; paylen = skb->len - l4_offset;
csum_replace_by_diff(&l4.tcp->check, htonl(paylen)); csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
/* MSS L4LEN IDX */ /* MSS L4LEN IDX */
mss_l4len_idx = (*hdr_len - l4_offset) << E1000_ADVTXD_L4LEN_SHIFT; mss_l4len_idx = (*hdr_len - l4_offset) << E1000_ADVTXD_L4LEN_SHIFT;
......
...@@ -35,31 +35,31 @@ struct e1000_hw; ...@@ -35,31 +35,31 @@ struct e1000_hw;
/* Receive Descriptor - Advanced */ /* Receive Descriptor - Advanced */
union e1000_adv_rx_desc { union e1000_adv_rx_desc {
struct { struct {
u64 pkt_addr; /* Packet buffer address */ __le64 pkt_addr; /* Packet buffer address */
u64 hdr_addr; /* Header buffer address */ __le64 hdr_addr; /* Header buffer address */
} read; } read;
struct { struct {
struct { struct {
union { union {
u32 data; __le32 data;
struct { struct {
u16 pkt_info; /* RSS/Packet type */ __le16 pkt_info; /* RSS/Packet type */
/* Split Header, hdr buffer length */ /* Split Header, hdr buffer length */
u16 hdr_info; __le16 hdr_info;
} hs_rss; } hs_rss;
} lo_dword; } lo_dword;
union { union {
u32 rss; /* RSS Hash */ __le32 rss; /* RSS Hash */
struct { struct {
u16 ip_id; /* IP id */ __le16 ip_id; /* IP id */
u16 csum; /* Packet Checksum */ __le16 csum; /* Packet Checksum */
} csum_ip; } csum_ip;
} hi_dword; } hi_dword;
} lower; } lower;
struct { struct {
u32 status_error; /* ext status/error */ __le32 status_error; /* ext status/error */
u16 length; /* Packet length */ __le16 length; /* Packet length */
u16 vlan; /* VLAN tag */ __le16 vlan; /* VLAN tag */
} upper; } upper;
} wb; /* writeback */ } wb; /* writeback */
}; };
...@@ -70,14 +70,14 @@ union e1000_adv_rx_desc { ...@@ -70,14 +70,14 @@ union e1000_adv_rx_desc {
/* Transmit Descriptor - Advanced */ /* Transmit Descriptor - Advanced */
union e1000_adv_tx_desc { union e1000_adv_tx_desc {
struct { struct {
u64 buffer_addr; /* Address of descriptor's data buf */ __le64 buffer_addr; /* Address of descriptor's data buf */
u32 cmd_type_len; __le32 cmd_type_len;
u32 olinfo_status; __le32 olinfo_status;
} read; } read;
struct { struct {
u64 rsvd; /* Reserved */ __le64 rsvd; /* Reserved */
u32 nxtseq_seed; __le32 nxtseq_seed;
u32 status; __le32 status;
} wb; } wb;
}; };
...@@ -94,10 +94,10 @@ union e1000_adv_tx_desc { ...@@ -94,10 +94,10 @@ union e1000_adv_tx_desc {
/* Context descriptors */ /* Context descriptors */
struct e1000_adv_tx_context_desc { struct e1000_adv_tx_context_desc {
u32 vlan_macip_lens; __le32 vlan_macip_lens;
u32 seqnum_seed; __le32 seqnum_seed;
u32 type_tucmd_mlhl; __le32 type_tucmd_mlhl;
u32 mss_l4len_idx; __le32 mss_l4len_idx;
}; };
#define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */ #define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */
......
...@@ -112,7 +112,7 @@ static void igc_regdump(struct igc_hw *hw, struct igc_reg_info *reginfo) ...@@ -112,7 +112,7 @@ static void igc_regdump(struct igc_hw *hw, struct igc_reg_info *reginfo)
void igc_rings_dump(struct igc_adapter *adapter) void igc_rings_dump(struct igc_adapter *adapter)
{ {
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
struct my_u0 { u64 a; u64 b; } *u0; struct my_u0 { __le64 a; __le64 b; } *u0;
union igc_adv_tx_desc *tx_desc; union igc_adv_tx_desc *tx_desc;
union igc_adv_rx_desc *rx_desc; union igc_adv_rx_desc *rx_desc;
struct igc_ring *tx_ring; struct igc_ring *tx_ring;
......
...@@ -554,7 +554,7 @@ static int igc_ethtool_set_eeprom(struct net_device *netdev, ...@@ -554,7 +554,7 @@ static int igc_ethtool_set_eeprom(struct net_device *netdev,
memcpy(ptr, bytes, eeprom->len); memcpy(ptr, bytes, eeprom->len);
for (i = 0; i < last_word - first_word + 1; i++) for (i = 0; i < last_word - first_word + 1; i++)
eeprom_buff[i] = cpu_to_le16(eeprom_buff[i]); cpu_to_le16s(&eeprom_buff[i]);
ret_val = hw->nvm.ops.write(hw, first_word, ret_val = hw->nvm.ops.write(hw, first_word,
last_word - first_word + 1, eeprom_buff); last_word - first_word + 1, eeprom_buff);
......
...@@ -1514,8 +1514,7 @@ static u32 ixgbe_get_fdirtcpm_82599(union ixgbe_atr_input *input_mask) ...@@ -1514,8 +1514,7 @@ static u32 ixgbe_get_fdirtcpm_82599(union ixgbe_atr_input *input_mask)
#define IXGBE_WRITE_REG_BE32(a, reg, value) \ #define IXGBE_WRITE_REG_BE32(a, reg, value) \
IXGBE_WRITE_REG((a), (reg), IXGBE_STORE_AS_BE32(ntohl(value))) IXGBE_WRITE_REG((a), (reg), IXGBE_STORE_AS_BE32(ntohl(value)))
#define IXGBE_STORE_AS_BE16(_value) \ #define IXGBE_STORE_AS_BE16(_value) __swab16(ntohs((_value)))
ntohs(((u16)(_value) >> 8) | ((u16)(_value) << 8))
s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
union ixgbe_atr_input *input_mask) union ixgbe_atr_input *input_mask)
...@@ -1651,13 +1650,13 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw, ...@@ -1651,13 +1650,13 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
IXGBE_WRITE_REG_BE32(hw, IXGBE_FDIRIPDA, input->formatted.dst_ip[0]); IXGBE_WRITE_REG_BE32(hw, IXGBE_FDIRIPDA, input->formatted.dst_ip[0]);
/* record source and destination port (little-endian)*/ /* record source and destination port (little-endian)*/
fdirport = ntohs(input->formatted.dst_port); fdirport = be16_to_cpu(input->formatted.dst_port);
fdirport <<= IXGBE_FDIRPORT_DESTINATION_SHIFT; fdirport <<= IXGBE_FDIRPORT_DESTINATION_SHIFT;
fdirport |= ntohs(input->formatted.src_port); fdirport |= be16_to_cpu(input->formatted.src_port);
IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport); IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport);
/* record vlan (little-endian) and flex_bytes(big-endian) */ /* record vlan (little-endian) and flex_bytes(big-endian) */
fdirvlan = IXGBE_STORE_AS_BE16((__force u16)input->formatted.flex_bytes); fdirvlan = IXGBE_STORE_AS_BE16(input->formatted.flex_bytes);
fdirvlan <<= IXGBE_FDIRVLAN_FLEX_SHIFT; fdirvlan <<= IXGBE_FDIRVLAN_FLEX_SHIFT;
fdirvlan |= ntohs(input->formatted.vlan_id); fdirvlan |= ntohs(input->formatted.vlan_id);
IXGBE_WRITE_REG(hw, IXGBE_FDIRVLAN, fdirvlan); IXGBE_WRITE_REG(hw, IXGBE_FDIRVLAN, fdirvlan);
......
...@@ -511,14 +511,14 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs) ...@@ -511,14 +511,14 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs)
continue; continue;
reg = IXGBE_READ_REG(hw, MIPAF_ARR(3, i)); reg = IXGBE_READ_REG(hw, MIPAF_ARR(3, i));
if (reg == xs->id.daddr.a4) if (reg == (__force u32)xs->id.daddr.a4)
return 1; return 1;
} }
} }
if ((bmcipval & BMCIP_MASK) == BMCIP_V4) { if ((bmcipval & BMCIP_MASK) == BMCIP_V4) {
reg = IXGBE_READ_REG(hw, IXGBE_BMCIP(3)); reg = IXGBE_READ_REG(hw, IXGBE_BMCIP(3));
if (reg == xs->id.daddr.a4) if (reg == (__force u32)xs->id.daddr.a4)
return 1; return 1;
} }
...@@ -533,7 +533,7 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs) ...@@ -533,7 +533,7 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs)
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
reg = IXGBE_READ_REG(hw, MIPAF_ARR(i, j)); reg = IXGBE_READ_REG(hw, MIPAF_ARR(i, j));
if (reg != xs->id.daddr.a6[j]) if (reg != (__force u32)xs->id.daddr.a6[j])
break; break;
} }
if (j == 4) /* did we match all 4 words? */ if (j == 4) /* did we match all 4 words? */
...@@ -543,7 +543,7 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs) ...@@ -543,7 +543,7 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs)
if ((bmcipval & BMCIP_MASK) == BMCIP_V6) { if ((bmcipval & BMCIP_MASK) == BMCIP_V6) {
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
reg = IXGBE_READ_REG(hw, IXGBE_BMCIP(j)); reg = IXGBE_READ_REG(hw, IXGBE_BMCIP(j));
if (reg != xs->id.daddr.a6[j]) if (reg != (__force u32)xs->id.daddr.a6[j])
break; break;
} }
if (j == 4) /* did we match all 4 words? */ if (j == 4) /* did we match all 4 words? */
......
...@@ -3814,7 +3814,7 @@ static int ixgbevf_tso(struct ixgbevf_ring *tx_ring, ...@@ -3814,7 +3814,7 @@ static int ixgbevf_tso(struct ixgbevf_ring *tx_ring,
/* remove payload length from inner checksum */ /* remove payload length from inner checksum */
paylen = skb->len - l4_offset; paylen = skb->len - l4_offset;
csum_replace_by_diff(&l4.tcp->check, htonl(paylen)); csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
/* update gso size and bytecount with header size */ /* update gso size and bytecount with header size */
first->gso_segs = skb_shinfo(skb)->gso_segs; first->gso_segs = skb_shinfo(skb)->gso_segs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment