Skip to content

Commit 56a9a9e

Browse files
committed
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-05-17 This series contains updates to ixgbe, ixgbevf and ice drivers. Cathy Zhou resolves sparse warnings by using the force attribute. Mauro S M Rodrigues fixes a bug where IRQs were not freed if a PCI error recovery system opts to remove the device which causes ixgbe_io_error_detected() to return PCI_ERS_RESULT_DISCONNECT before calling ixgbe_close_suspend() which results in IRQs not freed and crashing when the remove handler calls pci_disable_device(). Resolved this by calling ixgbe_close_suspend() before evaluating the PCI channel state. Pavel Tatashin releases the rtnl_lock during the call to ixgbe_close_suspend() to allow scaling if device_shutdown() is multi-threaded. Emil modifies ixgbe to not validate the MAC address during a reset, unless the MAC was set on the host so that the VF will get a new MAC address every time it reloads. Also updates ixgbevf to set hw->mac.perm_addr in order to retain the custom MAC on a reset. Anirudh updates the ice NVM read/erase/update AQ commands to align with the latest specification. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 7c5995b + 43c89b1 commit 56a9a9e

File tree

11 files changed

+82
-61
lines changed

11 files changed

+82
-61
lines changed

drivers/net/ethernet/intel/ice/ice_adminq_cmd.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,9 @@ struct ice_aqc_set_event_mask {
10491049
* NVM Update commands (indirect 0x0703)
10501050
*/
10511051
struct ice_aqc_nvm {
1052-
u8 cmd_flags;
1052+
__le16 offset_low;
1053+
u8 offset_high;
1054+
u8 cmd_flags;
10531055
#define ICE_AQC_NVM_LAST_CMD BIT(0)
10541056
#define ICE_AQC_NVM_PCIR_REQ BIT(0) /* Used by NVM Update reply */
10551057
#define ICE_AQC_NVM_PRESERVATION_S 1
@@ -1058,12 +1060,11 @@ struct ice_aqc_nvm {
10581060
#define ICE_AQC_NVM_PRESERVE_ALL BIT(1)
10591061
#define ICE_AQC_NVM_PRESERVE_SELECTED (3 << CSR_AQ_NVM_PRESERVATION_S)
10601062
#define ICE_AQC_NVM_FLASH_ONLY BIT(7)
1061-
u8 module_typeid;
1062-
__le16 length;
1063+
__le16 module_typeid;
1064+
__le16 length;
10631065
#define ICE_AQC_NVM_ERASE_LEN 0xFFFF
1064-
__le32 offset;
1065-
__le32 addr_high;
1066-
__le32 addr_low;
1066+
__le32 addr_high;
1067+
__le32 addr_low;
10671068
};
10681069

10691070
/* Get/Set RSS key (indirect 0x0B04/0x0B02) */

drivers/net/ethernet/intel/ice/ice_nvm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Read the NVM using the admin queue commands (0x0701)
1717
*/
1818
static enum ice_status
19-
ice_aq_read_nvm(struct ice_hw *hw, u8 module_typeid, u32 offset, u16 length,
19+
ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length,
2020
void *data, bool last_command, struct ice_sq_cd *cd)
2121
{
2222
struct ice_aq_desc desc;
@@ -33,8 +33,9 @@ ice_aq_read_nvm(struct ice_hw *hw, u8 module_typeid, u32 offset, u16 length,
3333
/* If this is the last command in a series, set the proper flag. */
3434
if (last_command)
3535
cmd->cmd_flags |= ICE_AQC_NVM_LAST_CMD;
36-
cmd->module_typeid = module_typeid;
37-
cmd->offset = cpu_to_le32(offset);
36+
cmd->module_typeid = cpu_to_le16(module_typeid);
37+
cmd->offset_low = cpu_to_le16(offset & 0xFFFF);
38+
cmd->offset_high = (offset >> 16) & 0xFF;
3839
cmd->length = cpu_to_le16(length);
3940

4041
return ice_aq_send_cmd(hw, &desc, data, length, cd);

drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,8 @@ void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,
14361436
{
14371437

14381438
u32 hi_hash_dword, lo_hash_dword, flow_vm_vlan;
1439-
u32 bucket_hash = 0, hi_dword = 0;
1439+
u32 bucket_hash = 0;
1440+
__be32 hi_dword = 0;
14401441
int i;
14411442

14421443
/* Apply masks to input data */
@@ -1475,7 +1476,7 @@ void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,
14751476
* Limit hash to 13 bits since max bucket count is 8K.
14761477
* Store result at the end of the input stream.
14771478
*/
1478-
input->formatted.bkt_hash = bucket_hash & 0x1FFF;
1479+
input->formatted.bkt_hash = (__force __be16)(bucket_hash & 0x1FFF);
14791480
}
14801481

14811482
/**
@@ -1584,7 +1585,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
15841585
return IXGBE_ERR_CONFIG;
15851586
}
15861587

1587-
switch (input_mask->formatted.flex_bytes & 0xFFFF) {
1588+
switch ((__force u16)input_mask->formatted.flex_bytes & 0xFFFF) {
15881589
case 0x0000:
15891590
/* Mask Flex Bytes */
15901591
fdirm |= IXGBE_FDIRM_FLEX;
@@ -1654,13 +1655,13 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
16541655
IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport);
16551656

16561657
/* record vlan (little-endian) and flex_bytes(big-endian) */
1657-
fdirvlan = IXGBE_STORE_AS_BE16(input->formatted.flex_bytes);
1658+
fdirvlan = IXGBE_STORE_AS_BE16((__force u16)input->formatted.flex_bytes);
16581659
fdirvlan <<= IXGBE_FDIRVLAN_FLEX_SHIFT;
16591660
fdirvlan |= ntohs(input->formatted.vlan_id);
16601661
IXGBE_WRITE_REG(hw, IXGBE_FDIRVLAN, fdirvlan);
16611662

16621663
/* configure FDIRHASH register */
1663-
fdirhash = input->formatted.bkt_hash;
1664+
fdirhash = (__force u32)input->formatted.bkt_hash;
16641665
fdirhash |= soft_id << IXGBE_FDIRHASH_SIG_SW_INDEX_SHIFT;
16651666
IXGBE_WRITE_REG(hw, IXGBE_FDIRHASH, fdirhash);
16661667

@@ -1698,7 +1699,7 @@ s32 ixgbe_fdir_erase_perfect_filter_82599(struct ixgbe_hw *hw,
16981699
s32 err;
16991700

17001701
/* configure FDIRHASH register */
1701-
fdirhash = input->formatted.bkt_hash;
1702+
fdirhash = (__force u32)input->formatted.bkt_hash;
17021703
fdirhash |= soft_id << IXGBE_FDIRHASH_SIG_SW_INDEX_SHIFT;
17031704
IXGBE_WRITE_REG(hw, IXGBE_FDIRHASH, fdirhash);
17041705

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3626,7 +3626,7 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length,
36263626
*/
36273627
for (i = 0; i < dword_len; i++)
36283628
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_FLEX_MNG,
3629-
i, cpu_to_le32(buffer[i]));
3629+
i, (__force u32)cpu_to_le32(buffer[i]));
36303630

36313631
/* Setting this bit tells the ARC that a new command is pending. */
36323632
IXGBE_WRITE_REG(hw, IXGBE_HICR, hicr | IXGBE_HICR_C);

drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
440440
case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP):
441441
dma_unmap_sg(&adapter->pdev->dev, ddp->sgl,
442442
ddp->sgc, DMA_FROM_DEVICE);
443-
ddp->err = ddp_err;
443+
ddp->err = (__force u32)ddp_err;
444444
ddp->sgl = NULL;
445445
ddp->sgc = 0;
446446
/* fall through */

drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ static void ixgbe_ipsec_set_tx_sa(struct ixgbe_hw *hw, u16 idx,
1919
int i;
2020

2121
for (i = 0; i < 4; i++)
22-
IXGBE_WRITE_REG(hw, IXGBE_IPSTXKEY(i), cpu_to_be32(key[3 - i]));
23-
IXGBE_WRITE_REG(hw, IXGBE_IPSTXSALT, cpu_to_be32(salt));
22+
IXGBE_WRITE_REG(hw, IXGBE_IPSTXKEY(i),
23+
(__force u32)cpu_to_be32(key[3 - i]));
24+
IXGBE_WRITE_REG(hw, IXGBE_IPSTXSALT, (__force u32)cpu_to_be32(salt));
2425
IXGBE_WRITE_FLUSH(hw);
2526

2627
reg = IXGBE_READ_REG(hw, IXGBE_IPSTXIDX);
@@ -69,16 +70,18 @@ static void ixgbe_ipsec_set_rx_sa(struct ixgbe_hw *hw, u16 idx, __be32 spi,
6970
int i;
7071

7172
/* store the SPI (in bigendian) and IPidx */
72-
IXGBE_WRITE_REG(hw, IXGBE_IPSRXSPI, cpu_to_le32(spi));
73+
IXGBE_WRITE_REG(hw, IXGBE_IPSRXSPI,
74+
(__force u32)cpu_to_le32((__force u32)spi));
7375
IXGBE_WRITE_REG(hw, IXGBE_IPSRXIPIDX, ip_idx);
7476
IXGBE_WRITE_FLUSH(hw);
7577

7678
ixgbe_ipsec_set_rx_item(hw, idx, ips_rx_spi_tbl);
7779

7880
/* store the key, salt, and mode */
7981
for (i = 0; i < 4; i++)
80-
IXGBE_WRITE_REG(hw, IXGBE_IPSRXKEY(i), cpu_to_be32(key[3 - i]));
81-
IXGBE_WRITE_REG(hw, IXGBE_IPSRXSALT, cpu_to_be32(salt));
82+
IXGBE_WRITE_REG(hw, IXGBE_IPSRXKEY(i),
83+
(__force u32)cpu_to_be32(key[3 - i]));
84+
IXGBE_WRITE_REG(hw, IXGBE_IPSRXSALT, (__force u32)cpu_to_be32(salt));
8285
IXGBE_WRITE_REG(hw, IXGBE_IPSRXMOD, mode);
8386
IXGBE_WRITE_FLUSH(hw);
8487

@@ -97,7 +100,8 @@ static void ixgbe_ipsec_set_rx_ip(struct ixgbe_hw *hw, u16 idx, __be32 addr[])
97100

98101
/* store the ip address */
99102
for (i = 0; i < 4; i++)
100-
IXGBE_WRITE_REG(hw, IXGBE_IPSRXIPADDR(i), cpu_to_le32(addr[i]));
103+
IXGBE_WRITE_REG(hw, IXGBE_IPSRXIPADDR(i),
104+
(__force u32)cpu_to_le32((__force u32)addr[i]));
101105
IXGBE_WRITE_FLUSH(hw);
102106

103107
ixgbe_ipsec_set_rx_item(hw, idx, ips_rx_ip_tbl);
@@ -367,7 +371,8 @@ static struct xfrm_state *ixgbe_ipsec_find_rx_state(struct ixgbe_ipsec *ipsec,
367371
struct xfrm_state *ret = NULL;
368372

369373
rcu_read_lock();
370-
hash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist, spi)
374+
hash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist,
375+
(__force u32)spi) {
371376
if (spi == rsa->xs->id.spi &&
372377
((ip4 && *daddr == rsa->xs->id.daddr.a4) ||
373378
(!ip4 && !memcmp(daddr, &rsa->xs->id.daddr.a6,
@@ -377,6 +382,7 @@ static struct xfrm_state *ixgbe_ipsec_find_rx_state(struct ixgbe_ipsec *ipsec,
377382
xfrm_state_hold(ret);
378383
break;
379384
}
385+
}
380386
rcu_read_unlock();
381387
return ret;
382388
}
@@ -569,7 +575,7 @@ static int ixgbe_ipsec_add_sa(struct xfrm_state *xs)
569575

570576
/* hash the new entry for faster search in Rx path */
571577
hash_add_rcu(ipsec->rx_sa_list, &ipsec->rx_tbl[sa_idx].hlist,
572-
rsa.xs->id.spi);
578+
(__force u64)rsa.xs->id.spi);
573579
} else {
574580
struct tx_sa tsa;
575581

@@ -653,7 +659,8 @@ static void ixgbe_ipsec_del_sa(struct xfrm_state *xs)
653659
if (!ipsec->ip_tbl[ipi].ref_cnt) {
654660
memset(&ipsec->ip_tbl[ipi], 0,
655661
sizeof(struct rx_ip_sa));
656-
ixgbe_ipsec_set_rx_ip(hw, ipi, zerobuf);
662+
ixgbe_ipsec_set_rx_ip(hw, ipi,
663+
(__force __be32 *)zerobuf);
657664
}
658665
}
659666

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,8 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
727727
ring_desc = "";
728728
pr_info("T [0x%03X] %016llX %016llX %016llX %08X %p %016llX %p%s",
729729
i,
730-
le64_to_cpu(u0->a),
731-
le64_to_cpu(u0->b),
730+
le64_to_cpu((__force __le64)u0->a),
731+
le64_to_cpu((__force __le64)u0->b),
732732
(u64)dma_unmap_addr(tx_buffer, dma),
733733
dma_unmap_len(tx_buffer, len),
734734
tx_buffer->next_to_watch,
@@ -839,15 +839,15 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
839839
/* Descriptor Done */
840840
pr_info("RWB[0x%03X] %016llX %016llX ---------------- %p%s\n",
841841
i,
842-
le64_to_cpu(u0->a),
843-
le64_to_cpu(u0->b),
842+
le64_to_cpu((__force __le64)u0->a),
843+
le64_to_cpu((__force __le64)u0->b),
844844
rx_buffer_info->skb,
845845
ring_desc);
846846
} else {
847847
pr_info("R [0x%03X] %016llX %016llX %016llX %p%s\n",
848848
i,
849-
le64_to_cpu(u0->a),
850-
le64_to_cpu(u0->b),
849+
le64_to_cpu((__force __le64)u0->a),
850+
le64_to_cpu((__force __le64)u0->b),
851851
(u64)rx_buffer_info->dma,
852852
rx_buffer_info->skb,
853853
ring_desc);
@@ -6698,8 +6698,15 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
66986698
rtnl_lock();
66996699
netif_device_detach(netdev);
67006700

6701-
if (netif_running(netdev))
6701+
if (netif_running(netdev)) {
6702+
/* Suspend takes a long time, device_shutdown may be
6703+
* parallelized this function, so drop lock for the
6704+
* duration of this call.
6705+
*/
6706+
rtnl_unlock();
67026707
ixgbe_close_suspend(adapter);
6708+
rtnl_lock();
6709+
}
67036710

67046711
ixgbe_clear_interrupt_scheme(adapter);
67056712
rtnl_unlock();
@@ -7751,7 +7758,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
77517758

77527759
/* remove payload length from inner checksum */
77537760
paylen = skb->len - l4_offset;
7754-
csum_replace_by_diff(&l4.tcp->check, htonl(paylen));
7761+
csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
77557762

77567763
/* update gso size and bytecount with header size */
77577764
first->gso_segs = skb_shinfo(skb)->gso_segs;
@@ -9104,7 +9111,8 @@ static int ixgbe_clsu32_build_input(struct ixgbe_fdir_filter *input,
91049111

91059112
for (j = 0; field_ptr[j].val; j++) {
91069113
if (field_ptr[j].off == off) {
9107-
field_ptr[j].val(input, mask, val, m);
9114+
field_ptr[j].val(input, mask, (__force u32)val,
9115+
(__force u32)m);
91089116
input->filter.formatted.flow_type |=
91099117
field_ptr[j].type;
91109118
found_entry = true;
@@ -9113,8 +9121,10 @@ static int ixgbe_clsu32_build_input(struct ixgbe_fdir_filter *input,
91139121
}
91149122
if (nexthdr) {
91159123
if (nexthdr->off == cls->knode.sel->keys[i].off &&
9116-
nexthdr->val == cls->knode.sel->keys[i].val &&
9117-
nexthdr->mask == cls->knode.sel->keys[i].mask)
9124+
nexthdr->val ==
9125+
(__force u32)cls->knode.sel->keys[i].val &&
9126+
nexthdr->mask ==
9127+
(__force u32)cls->knode.sel->keys[i].mask)
91189128
found_jump_field = true;
91199129
else
91209130
continue;
@@ -9218,7 +9228,8 @@ static int ixgbe_configure_clsu32(struct ixgbe_adapter *adapter,
92189228
for (i = 0; nexthdr[i].jump; i++) {
92199229
if (nexthdr[i].o != cls->knode.sel->offoff ||
92209230
nexthdr[i].s != cls->knode.sel->offshift ||
9221-
nexthdr[i].m != cls->knode.sel->offmask)
9231+
nexthdr[i].m !=
9232+
(__force u32)cls->knode.sel->offmask)
92229233
return err;
92239234

92249235
jump = kzalloc(sizeof(*jump), GFP_KERNEL);
@@ -9991,7 +10002,8 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
999110002
}
999210003
} else {
999310004
for (i = 0; i < adapter->num_rx_queues; i++)
9994-
xchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog);
10005+
(void)xchg(&adapter->rx_ring[i]->xdp_prog,
10006+
adapter->xdp_prog);
999510007
}
999610008

999710009
if (old_prog)
@@ -10930,14 +10942,14 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
1093010942
rtnl_lock();
1093110943
netif_device_detach(netdev);
1093210944

10945+
if (netif_running(netdev))
10946+
ixgbe_close_suspend(adapter);
10947+
1093310948
if (state == pci_channel_io_perm_failure) {
1093410949
rtnl_unlock();
1093510950
return PCI_ERS_RESULT_DISCONNECT;
1093610951
}
1093710952

10938-
if (netif_running(netdev))
10939-
ixgbe_close_suspend(adapter);
10940-
1094110953
if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
1094210954
pci_disable_device(pdev);
1094310955
rtnl_unlock();

drivers/net/ethernet/intel/ixgbe/ixgbe_model.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ static inline int ixgbe_mat_prgm_sip(struct ixgbe_fdir_filter *input,
2929
union ixgbe_atr_input *mask,
3030
u32 val, u32 m)
3131
{
32-
input->filter.formatted.src_ip[0] = val;
33-
mask->formatted.src_ip[0] = m;
32+
input->filter.formatted.src_ip[0] = (__force __be32)val;
33+
mask->formatted.src_ip[0] = (__force __be32)m;
3434
return 0;
3535
}
3636

3737
static inline int ixgbe_mat_prgm_dip(struct ixgbe_fdir_filter *input,
3838
union ixgbe_atr_input *mask,
3939
u32 val, u32 m)
4040
{
41-
input->filter.formatted.dst_ip[0] = val;
42-
mask->formatted.dst_ip[0] = m;
41+
input->filter.formatted.dst_ip[0] = (__force __be32)val;
42+
mask->formatted.dst_ip[0] = (__force __be32)m;
4343
return 0;
4444
}
4545

@@ -55,10 +55,10 @@ static inline int ixgbe_mat_prgm_ports(struct ixgbe_fdir_filter *input,
5555
union ixgbe_atr_input *mask,
5656
u32 val, u32 m)
5757
{
58-
input->filter.formatted.src_port = val & 0xffff;
59-
mask->formatted.src_port = m & 0xffff;
60-
input->filter.formatted.dst_port = val >> 16;
61-
mask->formatted.dst_port = m >> 16;
58+
input->filter.formatted.src_port = (__force __be16)(val & 0xffff);
59+
mask->formatted.src_port = (__force __be16)(m & 0xffff);
60+
input->filter.formatted.dst_port = (__force __be16)(val >> 16);
61+
mask->formatted.dst_port = (__force __be16)(m >> 16);
6262

6363
return 0;
6464
};

drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,14 +854,11 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)
854854

855855
/* reply to reset with ack and vf mac address */
856856
msgbuf[0] = IXGBE_VF_RESET;
857-
if (!is_zero_ether_addr(vf_mac)) {
857+
if (!is_zero_ether_addr(vf_mac) && adapter->vfinfo[vf].pf_set_mac) {
858858
msgbuf[0] |= IXGBE_VT_MSGTYPE_ACK;
859859
memcpy(addr, vf_mac, ETH_ALEN);
860860
} else {
861861
msgbuf[0] |= IXGBE_VT_MSGTYPE_NACK;
862-
dev_warn(&adapter->pdev->dev,
863-
"VF %d has no MAC address assigned, you may have to assign one manually\n",
864-
vf);
865862
}
866863

867864
/*

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,9 @@ static s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
878878
buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM;
879879

880880
/* convert offset from words to bytes */
881-
buffer.address = cpu_to_be32((offset + current_word) * 2);
882-
buffer.length = cpu_to_be16(words_to_read * 2);
881+
buffer.address = (__force u32)cpu_to_be32((offset +
882+
current_word) * 2);
883+
buffer.length = (__force u16)cpu_to_be16(words_to_read * 2);
883884
buffer.pad2 = 0;
884885
buffer.pad3 = 0;
885886

@@ -1089,9 +1090,9 @@ static s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)
10891090
buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM;
10901091

10911092
/* convert offset from words to bytes */
1092-
buffer.address = cpu_to_be32(offset * 2);
1093+
buffer.address = (__force u32)cpu_to_be32(offset * 2);
10931094
/* one word */
1094-
buffer.length = cpu_to_be16(sizeof(u16));
1095+
buffer.length = (__force u16)cpu_to_be16(sizeof(u16));
10951096

10961097
status = hw->mac.ops.acquire_swfw_sync(hw, mask);
10971098
if (status)

0 commit comments

Comments
 (0)