Skip to content

Commit c740261

Browse files
committed
Merge tag 'net-6.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Current release - regressions: - tcp: fix tcp_disordered_ack() vs usec TS resolution Current release - new code bugs: - dpll: sanitize possible null pointer dereference in dpll_pin_parent_pin_set() - eth: octeon_ep: initialise control mbox tasks before using APIs Previous releases - regressions: - io_uring/af_unix: disable sending io_uring over sockets - eth: mlx5e: - TC, don't offload post action rule if not supported - fix possible deadlock on mlx5e_tx_timeout_work - eth: iavf: fix iavf_shutdown to call iavf_remove instead iavf_close - eth: bnxt_en: fix skb recycling logic in bnxt_deliver_skb() - eth: ena: fix DMA syncing in XDP path when SWIOTLB is on - eth: team: fix use-after-free when an option instance allocation fails Previous releases - always broken: - neighbour: don't let neigh_forced_gc() disable preemption for long - net: prevent mss overflow in skb_segment() - ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX - tcp: remove acked SYN flag from packet in the transmit queue correctly - eth: octeontx2-af: - fix a use-after-free in rvu_nix_register_reporters - fix promisc mcam entry action - eth: dwmac-loongson: make sure MDIO is initialized before use - eth: atlantic: fix double free in ring reinit logic" * tag 'net-6.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits) net: atlantic: fix double free in ring reinit logic appletalk: Fix Use-After-Free in atalk_ioctl net: stmmac: Handle disabled MDIO busses from devicetree net: stmmac: dwmac-qcom-ethqos: Fix drops in 10M SGMII RX dpaa2-switch: do not ask for MDB, VLAN and FDB replay dpaa2-switch: fix size of the dma_unmap net: prevent mss overflow in skb_segment() vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space() Revert "tcp: disable tcp_autocorking for socket when TCP_NODELAY flag is set" MIPS: dts: loongson: drop incorrect dwmac fallback compatible stmmac: dwmac-loongson: drop useless check for compatible fallback stmmac: dwmac-loongson: Make sure MDIO is initialized before use tcp: disable tcp_autocorking for socket when TCP_NODELAY flag is set dpll: sanitize possible null pointer dereference in dpll_pin_parent_pin_set() net: ena: Fix XDP redirection error net: ena: Fix DMA syncing in XDP path when SWIOTLB is on net: ena: Fix xdp drops handling due to multibuf packets net: ena: Destroy correct number of xdp queues upon failure net: Remove acked SYN flag from packet in the transmit queue correctly qed: Fix a potential use-after-free in qed_cxt_tables_alloc ...
2 parents bdb2701 + 7bb26ea commit c740261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1150
-582
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19564,7 +19564,6 @@ S: Maintained
1956419564
F: drivers/misc/sgi-xp/
1956519565

1956619566
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
19567-
M: Karsten Graul <[email protected]>
1956819567
M: Wenjia Zhang <[email protected]>
1956919568
M: Jan Karcher <[email protected]>
1957019569
R: D. Wythe <[email protected]>

arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@
130130
compatible = "pci0014,7a03.0",
131131
"pci0014,7a03",
132132
"pciclass0c0320",
133-
"pciclass0c03",
134-
"loongson, pci-gmac";
133+
"pciclass0c03";
135134

136135
reg = <0x1800 0x0 0x0 0x0 0x0>;
137136
interrupts = <12 IRQ_TYPE_LEVEL_LOW>,

arch/mips/boot/dts/loongson/ls7a-pch.dtsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@
193193
compatible = "pci0014,7a03.0",
194194
"pci0014,7a03",
195195
"pciclass020000",
196-
"pciclass0200",
197-
"loongson, pci-gmac";
196+
"pciclass0200";
198197

199198
reg = <0x1800 0x0 0x0 0x0 0x0>;
200199
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,

drivers/atm/solos-pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,
449449
struct sk_buff *skb;
450450
unsigned int len;
451451

452-
spin_lock(&card->cli_queue_lock);
452+
spin_lock_bh(&card->cli_queue_lock);
453453
skb = skb_dequeue(&card->cli_queue[SOLOS_CHAN(atmdev)]);
454-
spin_unlock(&card->cli_queue_lock);
454+
spin_unlock_bh(&card->cli_queue_lock);
455455
if(skb == NULL)
456456
return sprintf(buf, "No data.\n");
457457

@@ -956,14 +956,14 @@ static void pclose(struct atm_vcc *vcc)
956956
struct pkt_hdr *header;
957957

958958
/* Remove any yet-to-be-transmitted packets from the pending queue */
959-
spin_lock(&card->tx_queue_lock);
959+
spin_lock_bh(&card->tx_queue_lock);
960960
skb_queue_walk_safe(&card->tx_queue[port], skb, tmpskb) {
961961
if (SKB_CB(skb)->vcc == vcc) {
962962
skb_unlink(skb, &card->tx_queue[port]);
963963
solos_pop(vcc, skb);
964964
}
965965
}
966-
spin_unlock(&card->tx_queue_lock);
966+
spin_unlock_bh(&card->tx_queue_lock);
967967

968968
skb = alloc_skb(sizeof(*header), GFP_KERNEL);
969969
if (!skb) {

drivers/dpll/dpll_netlink.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,6 @@ dpll_pin_parent_pin_set(struct dpll_pin *pin, struct nlattr *parent_nest,
925925
struct netlink_ext_ack *extack)
926926
{
927927
struct nlattr *tb[DPLL_A_PIN_MAX + 1];
928-
enum dpll_pin_state state;
929928
u32 ppin_idx;
930929
int ret;
931930

@@ -936,10 +935,14 @@ dpll_pin_parent_pin_set(struct dpll_pin *pin, struct nlattr *parent_nest,
936935
return -EINVAL;
937936
}
938937
ppin_idx = nla_get_u32(tb[DPLL_A_PIN_PARENT_ID]);
939-
state = nla_get_u32(tb[DPLL_A_PIN_STATE]);
940-
ret = dpll_pin_on_pin_state_set(pin, ppin_idx, state, extack);
941-
if (ret)
942-
return ret;
938+
939+
if (tb[DPLL_A_PIN_STATE]) {
940+
enum dpll_pin_state state = nla_get_u32(tb[DPLL_A_PIN_STATE]);
941+
942+
ret = dpll_pin_on_pin_state_set(pin, ppin_idx, state, extack);
943+
if (ret)
944+
return ret;
945+
}
943946

944947
return 0;
945948
}

drivers/net/ethernet/amazon/ena/ena_eth_com.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,6 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,
328328
* compare it to the stored version, just create the meta
329329
*/
330330
if (io_sq->disable_meta_caching) {
331-
if (unlikely(!ena_tx_ctx->meta_valid))
332-
return -EINVAL;
333-
334331
*have_meta = true;
335332
return ena_com_create_meta(io_sq, ena_meta);
336333
}

drivers/net/ethernet/amazon/ena/ena_netdev.c

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ static void ena_unmap_tx_buff(struct ena_ring *tx_ring,
7474
struct ena_tx_buffer *tx_info);
7575
static int ena_create_io_tx_queues_in_range(struct ena_adapter *adapter,
7676
int first_index, int count);
77+
static void ena_free_all_io_tx_resources_in_range(struct ena_adapter *adapter,
78+
int first_index, int count);
7779

7880
/* Increase a stat by cnt while holding syncp seqlock on 32bit machines */
7981
static void ena_increase_stat(u64 *statp, u64 cnt,
@@ -457,23 +459,22 @@ static void ena_init_all_xdp_queues(struct ena_adapter *adapter)
457459

458460
static int ena_setup_and_create_all_xdp_queues(struct ena_adapter *adapter)
459461
{
462+
u32 xdp_first_ring = adapter->xdp_first_ring;
463+
u32 xdp_num_queues = adapter->xdp_num_queues;
460464
int rc = 0;
461465

462-
rc = ena_setup_tx_resources_in_range(adapter, adapter->xdp_first_ring,
463-
adapter->xdp_num_queues);
466+
rc = ena_setup_tx_resources_in_range(adapter, xdp_first_ring, xdp_num_queues);
464467
if (rc)
465468
goto setup_err;
466469

467-
rc = ena_create_io_tx_queues_in_range(adapter,
468-
adapter->xdp_first_ring,
469-
adapter->xdp_num_queues);
470+
rc = ena_create_io_tx_queues_in_range(adapter, xdp_first_ring, xdp_num_queues);
470471
if (rc)
471472
goto create_err;
472473

473474
return 0;
474475

475476
create_err:
476-
ena_free_all_io_tx_resources(adapter);
477+
ena_free_all_io_tx_resources_in_range(adapter, xdp_first_ring, xdp_num_queues);
477478
setup_err:
478479
return rc;
479480
}
@@ -1492,11 +1493,6 @@ static struct sk_buff *ena_rx_skb(struct ena_ring *rx_ring,
14921493
if (unlikely(!skb))
14931494
return NULL;
14941495

1495-
/* sync this buffer for CPU use */
1496-
dma_sync_single_for_cpu(rx_ring->dev,
1497-
dma_unmap_addr(&rx_info->ena_buf, paddr) + pkt_offset,
1498-
len,
1499-
DMA_FROM_DEVICE);
15001496
skb_copy_to_linear_data(skb, buf_addr + buf_offset, len);
15011497
dma_sync_single_for_device(rx_ring->dev,
15021498
dma_unmap_addr(&rx_info->ena_buf, paddr) + pkt_offset,
@@ -1515,17 +1511,10 @@ static struct sk_buff *ena_rx_skb(struct ena_ring *rx_ring,
15151511

15161512
buf_len = SKB_DATA_ALIGN(len + buf_offset + tailroom);
15171513

1518-
pre_reuse_paddr = dma_unmap_addr(&rx_info->ena_buf, paddr);
1519-
15201514
/* If XDP isn't loaded try to reuse part of the RX buffer */
15211515
reuse_rx_buf_page = !is_xdp_loaded &&
15221516
ena_try_rx_buf_page_reuse(rx_info, buf_len, len, pkt_offset);
15231517

1524-
dma_sync_single_for_cpu(rx_ring->dev,
1525-
pre_reuse_paddr + pkt_offset,
1526-
len,
1527-
DMA_FROM_DEVICE);
1528-
15291518
if (!reuse_rx_buf_page)
15301519
ena_unmap_rx_buff_attrs(rx_ring, rx_info, DMA_ATTR_SKIP_CPU_SYNC);
15311520

@@ -1671,20 +1660,23 @@ static void ena_set_rx_hash(struct ena_ring *rx_ring,
16711660
}
16721661
}
16731662

1674-
static int ena_xdp_handle_buff(struct ena_ring *rx_ring, struct xdp_buff *xdp)
1663+
static int ena_xdp_handle_buff(struct ena_ring *rx_ring, struct xdp_buff *xdp, u16 num_descs)
16751664
{
16761665
struct ena_rx_buffer *rx_info;
16771666
int ret;
16781667

1668+
/* XDP multi-buffer packets not supported */
1669+
if (unlikely(num_descs > 1)) {
1670+
netdev_err_once(rx_ring->adapter->netdev,
1671+
"xdp: dropped unsupported multi-buffer packets\n");
1672+
ena_increase_stat(&rx_ring->rx_stats.xdp_drop, 1, &rx_ring->syncp);
1673+
return ENA_XDP_DROP;
1674+
}
1675+
16791676
rx_info = &rx_ring->rx_buffer_info[rx_ring->ena_bufs[0].req_id];
16801677
xdp_prepare_buff(xdp, page_address(rx_info->page),
16811678
rx_info->buf_offset,
16821679
rx_ring->ena_bufs[0].len, false);
1683-
/* If for some reason we received a bigger packet than
1684-
* we expect, then we simply drop it
1685-
*/
1686-
if (unlikely(rx_ring->ena_bufs[0].len > ENA_XDP_MAX_MTU))
1687-
return ENA_XDP_DROP;
16881680

16891681
ret = ena_xdp_execute(rx_ring, xdp);
16901682

@@ -1719,6 +1711,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
17191711
int xdp_flags = 0;
17201712
int total_len = 0;
17211713
int xdp_verdict;
1714+
u8 pkt_offset;
17221715
int rc = 0;
17231716
int i;
17241717

@@ -1745,15 +1738,21 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
17451738

17461739
/* First descriptor might have an offset set by the device */
17471740
rx_info = &rx_ring->rx_buffer_info[rx_ring->ena_bufs[0].req_id];
1748-
rx_info->buf_offset += ena_rx_ctx.pkt_offset;
1741+
pkt_offset = ena_rx_ctx.pkt_offset;
1742+
rx_info->buf_offset += pkt_offset;
17491743

17501744
netif_dbg(rx_ring->adapter, rx_status, rx_ring->netdev,
17511745
"rx_poll: q %d got packet from ena. descs #: %d l3 proto %d l4 proto %d hash: %x\n",
17521746
rx_ring->qid, ena_rx_ctx.descs, ena_rx_ctx.l3_proto,
17531747
ena_rx_ctx.l4_proto, ena_rx_ctx.hash);
17541748

1749+
dma_sync_single_for_cpu(rx_ring->dev,
1750+
dma_unmap_addr(&rx_info->ena_buf, paddr) + pkt_offset,
1751+
rx_ring->ena_bufs[0].len,
1752+
DMA_FROM_DEVICE);
1753+
17551754
if (ena_xdp_present_ring(rx_ring))
1756-
xdp_verdict = ena_xdp_handle_buff(rx_ring, &xdp);
1755+
xdp_verdict = ena_xdp_handle_buff(rx_ring, &xdp, ena_rx_ctx.descs);
17571756

17581757
/* allocate skb and fill it */
17591758
if (xdp_verdict == ENA_XDP_PASS)
@@ -1777,7 +1776,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
17771776
if (xdp_verdict & ENA_XDP_FORWARDED) {
17781777
ena_unmap_rx_buff_attrs(rx_ring,
17791778
&rx_ring->rx_buffer_info[req_id],
1780-
0);
1779+
DMA_ATTR_SKIP_CPU_SYNC);
17811780
rx_ring->rx_buffer_info[req_id].page = NULL;
17821781
}
17831782
}

drivers/net/ethernet/aquantia/atlantic/aq_ring.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,11 +938,14 @@ void aq_ring_free(struct aq_ring_s *self)
938938
return;
939939

940940
kfree(self->buff_ring);
941+
self->buff_ring = NULL;
941942

942-
if (self->dx_ring)
943+
if (self->dx_ring) {
943944
dma_free_coherent(aq_nic_get_dev(self->aq_nic),
944945
self->size * self->dx_size, self->dx_ring,
945946
self->dx_ring_pa);
947+
self->dx_ring = NULL;
948+
}
946949
}
947950

948951
unsigned int aq_ring_fill_stats_data(struct aq_ring_s *self, u64 *data)

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,16 +1748,32 @@ static void bnxt_tpa_agg(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
17481748
static void bnxt_deliver_skb(struct bnxt *bp, struct bnxt_napi *bnapi,
17491749
struct sk_buff *skb)
17501750
{
1751+
skb_mark_for_recycle(skb);
1752+
17511753
if (skb->dev != bp->dev) {
17521754
/* this packet belongs to a vf-rep */
17531755
bnxt_vf_rep_rx(bp, skb);
17541756
return;
17551757
}
17561758
skb_record_rx_queue(skb, bnapi->index);
1757-
skb_mark_for_recycle(skb);
17581759
napi_gro_receive(&bnapi->napi, skb);
17591760
}
17601761

1762+
static bool bnxt_rx_ts_valid(struct bnxt *bp, u32 flags,
1763+
struct rx_cmp_ext *rxcmp1, u32 *cmpl_ts)
1764+
{
1765+
u32 ts = le32_to_cpu(rxcmp1->rx_cmp_timestamp);
1766+
1767+
if (BNXT_PTP_RX_TS_VALID(flags))
1768+
goto ts_valid;
1769+
if (!bp->ptp_all_rx_tstamp || !ts || !BNXT_ALL_RX_TS_VALID(flags))
1770+
return false;
1771+
1772+
ts_valid:
1773+
*cmpl_ts = ts;
1774+
return true;
1775+
}
1776+
17611777
/* returns the following:
17621778
* 1 - 1 packet successfully received
17631779
* 0 - successful TPA_START, packet not completed yet
@@ -1783,6 +1799,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
17831799
struct sk_buff *skb;
17841800
struct xdp_buff xdp;
17851801
u32 flags, misc;
1802+
u32 cmpl_ts;
17861803
void *data;
17871804
int rc = 0;
17881805

@@ -2005,10 +2022,8 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
20052022
}
20062023
}
20072024

2008-
if (unlikely((flags & RX_CMP_FLAGS_ITYPES_MASK) ==
2009-
RX_CMP_FLAGS_ITYPE_PTP_W_TS) || bp->ptp_all_rx_tstamp) {
2025+
if (bnxt_rx_ts_valid(bp, flags, rxcmp1, &cmpl_ts)) {
20102026
if (bp->flags & BNXT_FLAG_CHIP_P5) {
2011-
u32 cmpl_ts = le32_to_cpu(rxcmp1->rx_cmp_timestamp);
20122027
u64 ns, ts;
20132028

20142029
if (!bnxt_get_rx_ts_p5(bp, &ts, cmpl_ts)) {
@@ -10731,10 +10746,8 @@ static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init,
1073110746
bnxt_free_mem(bp, irq_re_init);
1073210747
}
1073310748

10734-
int bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
10749+
void bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
1073510750
{
10736-
int rc = 0;
10737-
1073810751
if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) {
1073910752
/* If we get here, it means firmware reset is in progress
1074010753
* while we are trying to close. We can safely proceed with
@@ -10749,15 +10762,18 @@ int bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
1074910762

1075010763
#ifdef CONFIG_BNXT_SRIOV
1075110764
if (bp->sriov_cfg) {
10765+
int rc;
10766+
1075210767
rc = wait_event_interruptible_timeout(bp->sriov_cfg_wait,
1075310768
!bp->sriov_cfg,
1075410769
BNXT_SRIOV_CFG_WAIT_TMO);
10755-
if (rc)
10756-
netdev_warn(bp->dev, "timeout waiting for SRIOV config operation to complete!\n");
10770+
if (!rc)
10771+
netdev_warn(bp->dev, "timeout waiting for SRIOV config operation to complete, proceeding to close!\n");
10772+
else if (rc < 0)
10773+
netdev_warn(bp->dev, "SRIOV config operation interrupted, proceeding to close!\n");
1075710774
}
1075810775
#endif
1075910776
__bnxt_close_nic(bp, irq_re_init, link_re_init);
10760-
return rc;
1076110777
}
1076210778

1076310779
static int bnxt_close(struct net_device *dev)
@@ -13940,6 +13956,8 @@ static int bnxt_resume(struct device *device)
1394013956
if (rc)
1394113957
goto resume_exit;
1394213958

13959+
bnxt_clear_reservations(bp, true);
13960+
1394313961
if (bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false)) {
1394413962
rc = -ENODEV;
1394513963
goto resume_exit;

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct rx_cmp {
161161
#define RX_CMP_FLAGS_ERROR (1 << 6)
162162
#define RX_CMP_FLAGS_PLACEMENT (7 << 7)
163163
#define RX_CMP_FLAGS_RSS_VALID (1 << 10)
164-
#define RX_CMP_FLAGS_UNUSED (1 << 11)
164+
#define RX_CMP_FLAGS_PKT_METADATA_PRESENT (1 << 11)
165165
#define RX_CMP_FLAGS_ITYPES_SHIFT 12
166166
#define RX_CMP_FLAGS_ITYPES_MASK 0xf000
167167
#define RX_CMP_FLAGS_ITYPE_UNKNOWN (0 << 12)
@@ -188,6 +188,12 @@ struct rx_cmp {
188188
__le32 rx_cmp_rss_hash;
189189
};
190190

191+
#define BNXT_PTP_RX_TS_VALID(flags) \
192+
(((flags) & RX_CMP_FLAGS_ITYPES_MASK) == RX_CMP_FLAGS_ITYPE_PTP_W_TS)
193+
194+
#define BNXT_ALL_RX_TS_VALID(flags) \
195+
!((flags) & RX_CMP_FLAGS_PKT_METADATA_PRESENT)
196+
191197
#define RX_CMP_HASH_VALID(rxcmp) \
192198
((rxcmp)->rx_cmp_len_flags_type & cpu_to_le32(RX_CMP_FLAGS_RSS_VALID))
193199

@@ -2375,7 +2381,7 @@ int bnxt_open_nic(struct bnxt *, bool, bool);
23752381
int bnxt_half_open_nic(struct bnxt *bp);
23762382
void bnxt_half_close_nic(struct bnxt *bp);
23772383
void bnxt_reenable_sriov(struct bnxt *bp);
2378-
int bnxt_close_nic(struct bnxt *, bool, bool);
2384+
void bnxt_close_nic(struct bnxt *, bool, bool);
23792385
void bnxt_get_ring_err_stats(struct bnxt *bp,
23802386
struct bnxt_total_ring_err_stats *stats);
23812387
int bnxt_dbg_hwrm_rd_reg(struct bnxt *bp, u32 reg_off, u16 num_words,

drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -449,15 +449,8 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
449449
return -ENODEV;
450450
}
451451
bnxt_ulp_stop(bp);
452-
if (netif_running(bp->dev)) {
453-
rc = bnxt_close_nic(bp, true, true);
454-
if (rc) {
455-
NL_SET_ERR_MSG_MOD(extack, "Failed to close");
456-
dev_close(bp->dev);
457-
rtnl_unlock();
458-
break;
459-
}
460-
}
452+
if (netif_running(bp->dev))
453+
bnxt_close_nic(bp, true, true);
461454
bnxt_vf_reps_free(bp);
462455
rc = bnxt_hwrm_func_drv_unrgtr(bp);
463456
if (rc) {

0 commit comments

Comments
 (0)