Commit 02dc96ef authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from David Miller:

 1) Sanity check URB networking device parameters to avoid divide by
    zero, from Oliver Neukum.

 2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6
    don't work properly. Longer term this needs a better fix tho. From
    Vijay Khemka.

 3) Small fixes to selftests (use ping when ping6 is not present, etc.)
    from David Ahern.

 4) Bring back rt_uses_gateway member of struct rtable, it's semantics
    were not well understood and trying to remove it broke things. From
    David Ahern.

 5) Move usbnet snaity checking, ignore endpoints with invalid
    wMaxPacketSize. From Bjørn Mork.

 6) Missing Kconfig deps for sja1105 driver, from Mao Wenan.

 7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel,
    Alex Vesker, and Yevgeny Kliteynik

 8) Missing CAP_NET_RAW checks in various places, from Ori Nimron.

 9) Fix crash when removing sch_cbs entry while offloading is enabled,
    from Vinicius Costa Gomes.

10) Signedness bug fixes, generally in looking at the result given by
    of_get_phy_mode() and friends. From Dan Crapenter.

11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet.

12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern.

13) Fix quantization code in tcp_bbr, from Kevin Yang.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits)
  net: tap: clean up an indentation issue
  nfp: abm: fix memory leak in nfp_abm_u32_knode_replace
  tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state
  sk_buff: drop all skb extensions on free and skb scrubbing
  tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth
  mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions
  Documentation: Clarify trap's description
  mlxsw: spectrum: Clear VLAN filters during port initialization
  net: ena: clean up indentation issue
  NFC: st95hf: clean up indentation issue
  net: phy: micrel: add Asym Pause workaround for KSZ9021
  net: socionext: ave: Avoid using netdev_err() before calling register_netdev()
  ptp: correctly disable flags on old ioctls
  lib: dimlib: fix help text typos
  net: dsa: microchip: Always set regmap stride to 1
  nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
  nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
  net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N
  vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
  net: sched: sch_sfb: don't call qdisc_put() while holding tree lock
  ...
parents edf445ad faeacb6d
...@@ -21,17 +21,17 @@ config NET_VENDOR_ALLWINNER ...@@ -21,17 +21,17 @@ config NET_VENDOR_ALLWINNER
if NET_VENDOR_ALLWINNER if NET_VENDOR_ALLWINNER
config SUN4I_EMAC config SUN4I_EMAC
tristate "Allwinner A10 EMAC support" tristate "Allwinner A10 EMAC support"
depends on ARCH_SUNXI depends on ARCH_SUNXI
depends on OF depends on OF
select CRC32 select CRC32
select MII select MII
select PHYLIB select PHYLIB
select MDIO_SUN4I select MDIO_SUN4I
---help--- ---help---
Support for Allwinner A10 EMAC ethernet driver. Support for Allwinner A10 EMAC ethernet driver.
To compile this driver as a module, choose M here. The module To compile this driver as a module, choose M here. The module
will be called sun4i-emac. will be called sun4i-emac.
endif # NET_VENDOR_ALLWINNER endif # NET_VENDOR_ALLWINNER
...@@ -19,6 +19,7 @@ if NET_VENDOR_AMAZON ...@@ -19,6 +19,7 @@ if NET_VENDOR_AMAZON
config ENA_ETHERNET config ENA_ETHERNET
tristate "Elastic Network Adapter (ENA) support" tristate "Elastic Network Adapter (ENA) support"
depends on PCI_MSI && !CPU_BIG_ENDIAN depends on PCI_MSI && !CPU_BIG_ENDIAN
select DIMLIB
---help--- ---help---
This driver supports Elastic Network Adapter (ENA)" This driver supports Elastic Network Adapter (ENA)"
......
...@@ -211,8 +211,8 @@ static int ena_com_sq_update_llq_tail(struct ena_com_io_sq *io_sq) ...@@ -211,8 +211,8 @@ static int ena_com_sq_update_llq_tail(struct ena_com_io_sq *io_sq)
pkt_ctrl->curr_bounce_buf = pkt_ctrl->curr_bounce_buf =
ena_com_get_next_bounce_buffer(&io_sq->bounce_buf_ctrl); ena_com_get_next_bounce_buffer(&io_sq->bounce_buf_ctrl);
memset(io_sq->llq_buf_ctrl.curr_bounce_buf, memset(io_sq->llq_buf_ctrl.curr_bounce_buf,
0x0, llq_info->desc_list_entry_size); 0x0, llq_info->desc_list_entry_size);
pkt_ctrl->idx = 0; pkt_ctrl->idx = 0;
if (unlikely(llq_info->desc_stride_ctrl == ENA_ADMIN_SINGLE_DESC_PER_ENTRY)) if (unlikely(llq_info->desc_stride_ctrl == ENA_ADMIN_SINGLE_DESC_PER_ENTRY))
......
...@@ -306,15 +306,13 @@ irqreturn_t aq_vec_isr_legacy(int irq, void *private) ...@@ -306,15 +306,13 @@ irqreturn_t aq_vec_isr_legacy(int irq, void *private)
{ {
struct aq_vec_s *self = private; struct aq_vec_s *self = private;
u64 irq_mask = 0U; u64 irq_mask = 0U;
irqreturn_t err = 0; int err;
if (!self) { if (!self)
err = -EINVAL; return IRQ_NONE;
goto err_exit;
}
err = self->aq_hw_ops->hw_irq_read(self->aq_hw, &irq_mask); err = self->aq_hw_ops->hw_irq_read(self->aq_hw, &irq_mask);
if (err < 0) if (err < 0)
goto err_exit; return IRQ_NONE;
if (irq_mask) { if (irq_mask) {
self->aq_hw_ops->hw_irq_disable(self->aq_hw, self->aq_hw_ops->hw_irq_disable(self->aq_hw,
...@@ -322,11 +320,10 @@ irqreturn_t aq_vec_isr_legacy(int irq, void *private) ...@@ -322,11 +320,10 @@ irqreturn_t aq_vec_isr_legacy(int irq, void *private)
napi_schedule(&self->napi); napi_schedule(&self->napi);
} else { } else {
self->aq_hw_ops->hw_irq_enable(self->aq_hw, 1U); self->aq_hw_ops->hw_irq_enable(self->aq_hw, 1U);
err = IRQ_NONE; return IRQ_NONE;
} }
err_exit: return IRQ_HANDLED;
return err >= 0 ? IRQ_HANDLED : IRQ_NONE;
} }
cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self) cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self)
......
...@@ -2481,7 +2481,7 @@ static int bcm_sysport_probe(struct platform_device *pdev) ...@@ -2481,7 +2481,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
priv->phy_interface = of_get_phy_mode(dn); priv->phy_interface = of_get_phy_mode(dn);
/* Default to GMII interface mode */ /* Default to GMII interface mode */
if (priv->phy_interface < 0) if ((int)priv->phy_interface < 0)
priv->phy_interface = PHY_INTERFACE_MODE_GMII; priv->phy_interface = PHY_INTERFACE_MODE_GMII;
/* In the case of a fixed PHY, the DT node associated /* In the case of a fixed PHY, the DT node associated
......
...@@ -165,9 +165,8 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx ...@@ -165,9 +165,8 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
static struct macb_dma_desc_64 *macb_64b_desc(struct macb *bp, struct macb_dma_desc *desc) static struct macb_dma_desc_64 *macb_64b_desc(struct macb *bp, struct macb_dma_desc *desc)
{ {
if (bp->hw_dma_cap & HW_DMA_CAP_64B) return (struct macb_dma_desc_64 *)((void *)desc
return (struct macb_dma_desc_64 *)((void *)desc + sizeof(struct macb_dma_desc)); + sizeof(struct macb_dma_desc));
return NULL;
} }
#endif #endif
......
...@@ -5701,7 +5701,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5701,7 +5701,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
whoami = t4_read_reg(adapter, PL_WHOAMI_A); whoami = t4_read_reg(adapter, PL_WHOAMI_A);
pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id); pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id);
chip = t4_get_chip_type(adapter, CHELSIO_PCI_ID_VER(device_id)); chip = t4_get_chip_type(adapter, CHELSIO_PCI_ID_VER(device_id));
if (chip < 0) { if ((int)chip < 0) {
dev_err(&pdev->dev, "Device %d is not supported\n", device_id); dev_err(&pdev->dev, "Device %d is not supported\n", device_id);
err = chip; err = chip;
goto out_free_adapter; goto out_free_adapter;
......
...@@ -48,5 +48,5 @@ config BE2NET_SKYHAWK ...@@ -48,5 +48,5 @@ config BE2NET_SKYHAWK
chipsets. (e.g. OneConnect OCe14xxx) chipsets. (e.g. OneConnect OCe14xxx)
comment "WARNING: be2net is useless without any enabled chip" comment "WARNING: be2net is useless without any enabled chip"
depends on BE2NET_BE2=n && BE2NET_BE3=n && BE2NET_LANCER=n && \ depends on BE2NET_BE2=n && BE2NET_BE3=n && BE2NET_LANCER=n && \
BE2NET_SKYHAWK=n && BE2NET BE2NET_SKYHAWK=n && BE2NET
...@@ -785,7 +785,7 @@ static int enetc_of_get_phy(struct enetc_ndev_priv *priv) ...@@ -785,7 +785,7 @@ static int enetc_of_get_phy(struct enetc_ndev_priv *priv)
} }
priv->if_mode = of_get_phy_mode(np); priv->if_mode = of_get_phy_mode(np);
if (priv->if_mode < 0) { if ((int)priv->if_mode < 0) {
dev_err(priv->dev, "missing phy type\n"); dev_err(priv->dev, "missing phy type\n");
of_node_put(priv->phy_node); of_node_put(priv->phy_node);
if (of_phy_is_fixed_link(np)) if (of_phy_is_fixed_link(np))
......
...@@ -2067,7 +2067,7 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu) ...@@ -2067,7 +2067,7 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
return 0; return 0;
} }
void reset_gfar(struct net_device *ndev) static void reset_gfar(struct net_device *ndev)
{ {
struct gfar_private *priv = netdev_priv(ndev); struct gfar_private *priv = netdev_priv(ndev);
......
...@@ -1194,7 +1194,7 @@ static int hix5hd2_dev_probe(struct platform_device *pdev) ...@@ -1194,7 +1194,7 @@ static int hix5hd2_dev_probe(struct platform_device *pdev)
goto err_free_mdio; goto err_free_mdio;
priv->phy_mode = of_get_phy_mode(node); priv->phy_mode = of_get_phy_mode(node);
if (priv->phy_mode < 0) { if ((int)priv->phy_mode < 0) {
netdev_err(ndev, "not find phy-mode\n"); netdev_err(ndev, "not find phy-mode\n");
ret = -EINVAL; ret = -EINVAL;
goto err_mdiobus; goto err_mdiobus;
......
...@@ -1207,7 +1207,7 @@ static void ibmvnic_cleanup(struct net_device *netdev) ...@@ -1207,7 +1207,7 @@ static void ibmvnic_cleanup(struct net_device *netdev)
struct ibmvnic_adapter *adapter = netdev_priv(netdev); struct ibmvnic_adapter *adapter = netdev_priv(netdev);
/* ensure that transmissions are stopped if called by do_reset */ /* ensure that transmissions are stopped if called by do_reset */
if (adapter->resetting) if (test_bit(0, &adapter->resetting))
netif_tx_disable(netdev); netif_tx_disable(netdev);
else else
netif_tx_stop_all_queues(netdev); netif_tx_stop_all_queues(netdev);
...@@ -1428,7 +1428,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1428,7 +1428,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
u8 proto = 0; u8 proto = 0;
netdev_tx_t ret = NETDEV_TX_OK; netdev_tx_t ret = NETDEV_TX_OK;
if (adapter->resetting) { if (test_bit(0, &adapter->resetting)) {
if (!netif_subqueue_stopped(netdev, skb)) if (!netif_subqueue_stopped(netdev, skb))
netif_stop_subqueue(netdev, queue_num); netif_stop_subqueue(netdev, queue_num);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
...@@ -1723,6 +1723,86 @@ static int ibmvnic_set_mac(struct net_device *netdev, void *p) ...@@ -1723,6 +1723,86 @@ static int ibmvnic_set_mac(struct net_device *netdev, void *p)
return rc; return rc;
} }
/**
* do_change_param_reset returns zero if we are able to keep processing reset
* events, or non-zero if we hit a fatal error and must halt.
*/
static int do_change_param_reset(struct ibmvnic_adapter *adapter,
struct ibmvnic_rwi *rwi,
u32 reset_state)
{
struct net_device *netdev = adapter->netdev;
int i, rc;
netdev_dbg(adapter->netdev, "Change param resetting driver (%d)\n",
rwi->reset_reason);
netif_carrier_off(netdev);
adapter->reset_reason = rwi->reset_reason;
ibmvnic_cleanup(netdev);
if (reset_state == VNIC_OPEN) {
rc = __ibmvnic_close(netdev);
if (rc)
return rc;
}
release_resources(adapter);
release_sub_crqs(adapter, 1);
release_crq_queue(adapter);
adapter->state = VNIC_PROBED;
rc = init_crq_queue(adapter);
if (rc) {
netdev_err(adapter->netdev,
"Couldn't initialize crq. rc=%d\n", rc);
return rc;
}
rc = ibmvnic_reset_init(adapter);
if (rc)
return IBMVNIC_INIT_FAILED;
/* If the adapter was in PROBE state prior to the reset,
* exit here.
*/
if (reset_state == VNIC_PROBED)
return 0;
rc = ibmvnic_login(netdev);
if (rc) {
adapter->state = reset_state;
return rc;
}
rc = init_resources(adapter);
if (rc)
return rc;
ibmvnic_disable_irqs(adapter);
adapter->state = VNIC_CLOSED;
if (reset_state == VNIC_CLOSED)
return 0;
rc = __ibmvnic_open(netdev);
if (rc)
return IBMVNIC_OPEN_FAILED;
/* refresh device's multicast list */
ibmvnic_set_multi(netdev);
/* kick napi */
for (i = 0; i < adapter->req_rx_queues; i++)
napi_schedule(&adapter->napi[i]);
return 0;
}
/** /**
* do_reset returns zero if we are able to keep processing reset events, or * do_reset returns zero if we are able to keep processing reset events, or
* non-zero if we hit a fatal error and must halt. * non-zero if we hit a fatal error and must halt.
...@@ -1738,6 +1818,8 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1738,6 +1818,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
netdev_dbg(adapter->netdev, "Re-setting driver (%d)\n", netdev_dbg(adapter->netdev, "Re-setting driver (%d)\n",
rwi->reset_reason); rwi->reset_reason);
rtnl_lock();
netif_carrier_off(netdev); netif_carrier_off(netdev);
adapter->reset_reason = rwi->reset_reason; adapter->reset_reason = rwi->reset_reason;
...@@ -1751,16 +1833,25 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1751,16 +1833,25 @@ static int do_reset(struct ibmvnic_adapter *adapter,
if (reset_state == VNIC_OPEN && if (reset_state == VNIC_OPEN &&
adapter->reset_reason != VNIC_RESET_MOBILITY && adapter->reset_reason != VNIC_RESET_MOBILITY &&
adapter->reset_reason != VNIC_RESET_FAILOVER) { adapter->reset_reason != VNIC_RESET_FAILOVER) {
rc = __ibmvnic_close(netdev); adapter->state = VNIC_CLOSING;
/* Release the RTNL lock before link state change and
* re-acquire after the link state change to allow
* linkwatch_event to grab the RTNL lock and run during
* a reset.
*/
rtnl_unlock();
rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_DN);
rtnl_lock();
if (rc) if (rc)
return rc; goto out;
}
if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM || if (adapter->state != VNIC_CLOSING) {
adapter->wait_for_reset) { rc = -1;
release_resources(adapter); goto out;
release_sub_crqs(adapter, 1); }
release_crq_queue(adapter);
adapter->state = VNIC_CLOSED;
} }
if (adapter->reset_reason != VNIC_RESET_NON_FATAL) { if (adapter->reset_reason != VNIC_RESET_NON_FATAL) {
...@@ -1769,9 +1860,7 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1769,9 +1860,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
*/ */
adapter->state = VNIC_PROBED; adapter->state = VNIC_PROBED;
if (adapter->wait_for_reset) { if (adapter->reset_reason == VNIC_RESET_MOBILITY) {
rc = init_crq_queue(adapter);
} else if (adapter->reset_reason == VNIC_RESET_MOBILITY) {
rc = ibmvnic_reenable_crq_queue(adapter); rc = ibmvnic_reenable_crq_queue(adapter);
release_sub_crqs(adapter, 1); release_sub_crqs(adapter, 1);
} else { } else {
...@@ -1783,36 +1872,35 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1783,36 +1872,35 @@ static int do_reset(struct ibmvnic_adapter *adapter,
if (rc) { if (rc) {
netdev_err(adapter->netdev, netdev_err(adapter->netdev,
"Couldn't initialize crq. rc=%d\n", rc); "Couldn't initialize crq. rc=%d\n", rc);
return rc; goto out;
} }
rc = ibmvnic_reset_init(adapter); rc = ibmvnic_reset_init(adapter);
if (rc) if (rc) {
return IBMVNIC_INIT_FAILED; rc = IBMVNIC_INIT_FAILED;
goto out;
}
/* If the adapter was in PROBE state prior to the reset, /* If the adapter was in PROBE state prior to the reset,
* exit here. * exit here.
*/ */
if (reset_state == VNIC_PROBED) if (reset_state == VNIC_PROBED) {
return 0; rc = 0;
goto out;
}
rc = ibmvnic_login(netdev); rc = ibmvnic_login(netdev);
if (rc) { if (rc) {
adapter->state = reset_state; adapter->state = reset_state;
return rc; goto out;
} }
if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM || if (adapter->req_rx_queues != old_num_rx_queues ||
adapter->wait_for_reset) { adapter->req_tx_queues != old_num_tx_queues ||
rc = init_resources(adapter); adapter->req_rx_add_entries_per_subcrq !=
if (rc) old_num_rx_slots ||
return rc; adapter->req_tx_entries_per_subcrq !=
} else if (adapter->req_rx_queues != old_num_rx_queues || old_num_tx_slots) {
adapter->req_tx_queues != old_num_tx_queues ||
adapter->req_rx_add_entries_per_subcrq !=
old_num_rx_slots ||
adapter->req_tx_entries_per_subcrq !=
old_num_tx_slots) {
release_rx_pools(adapter); release_rx_pools(adapter);
release_tx_pools(adapter); release_tx_pools(adapter);
release_napi(adapter); release_napi(adapter);
...@@ -1820,32 +1908,30 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1820,32 +1908,30 @@ static int do_reset(struct ibmvnic_adapter *adapter,
rc = init_resources(adapter); rc = init_resources(adapter);
if (rc) if (rc)
return rc; goto out;
} else { } else {
rc = reset_tx_pools(adapter); rc = reset_tx_pools(adapter);
if (rc) if (rc)
return rc; goto out;
rc = reset_rx_pools(adapter); rc = reset_rx_pools(adapter);
if (rc) if (rc)
return rc; goto out;
} }
ibmvnic_disable_irqs(adapter); ibmvnic_disable_irqs(adapter);
} }
adapter->state = VNIC_CLOSED; adapter->state = VNIC_CLOSED;
if (reset_state == VNIC_CLOSED) if (reset_state == VNIC_CLOSED) {
return 0; rc = 0;
goto out;
}
rc = __ibmvnic_open(netdev); rc = __ibmvnic_open(netdev);
if (rc) { if (rc) {
if (list_empty(&adapter->rwi_list)) rc = IBMVNIC_OPEN_FAILED;
adapter->state = VNIC_CLOSED; goto out;
else
adapter->state = reset_state;
return 0;
} }
/* refresh device's multicast list */ /* refresh device's multicast list */
...@@ -1855,11 +1941,15 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1855,11 +1941,15 @@ static int do_reset(struct ibmvnic_adapter *adapter,
for (i = 0; i < adapter->req_rx_queues; i++) for (i = 0; i < adapter->req_rx_queues; i++)
napi_schedule(&adapter->napi[i]); napi_schedule(&adapter->napi[i]);
if (adapter->reset_reason != VNIC_RESET_FAILOVER && if (adapter->reset_reason != VNIC_RESET_FAILOVER)
adapter->reset_reason != VNIC_RESET_CHANGE_PARAM)
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev); call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
return 0; rc = 0;
out:
rtnl_unlock();
return rc;
} }
static int do_hard_reset(struct ibmvnic_adapter *adapter, static int do_hard_reset(struct ibmvnic_adapter *adapter,
...@@ -1919,14 +2009,8 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter, ...@@ -1919,14 +2009,8 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
return 0; return 0;
rc = __ibmvnic_open(netdev); rc = __ibmvnic_open(netdev);
if (rc) { if (rc)
if (list_empty(&adapter->rwi_list)) return IBMVNIC_OPEN_FAILED;
adapter->state = VNIC_CLOSED;
else
adapter->state = reset_state;
return 0;
}
return 0; return 0;
} }
...@@ -1965,20 +2049,17 @@ static void __ibmvnic_reset(struct work_struct *work) ...@@ -1965,20 +2049,17 @@ static void __ibmvnic_reset(struct work_struct *work)
{ {
struct ibmvnic_rwi *rwi; struct ibmvnic_rwi *rwi;
struct ibmvnic_adapter *adapter; struct ibmvnic_adapter *adapter;
bool we_lock_rtnl = false;
u32 reset_state; u32 reset_state;
int rc = 0; int rc = 0;
adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset); adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset);
/* netif_set_real_num_xx_queues needs to take rtnl lock here if (test_and_set_bit_lock(0, &adapter->resetting)) {
* unless wait_for_reset is set, in which case the rtnl lock schedule_delayed_work(&adapter->ibmvnic_delayed_reset,
* has already been taken before initializing the reset IBMVNIC_RESET_DELAY);
*/ return;
if (!adapter->wait_for_reset) {
rtnl_lock();
we_lock_rtnl = true;
} }
reset_state = adapter->state; reset_state = adapter->state;
rwi = get_next_rwi(adapter); rwi = get_next_rwi(adapter);
...@@ -1990,22 +2071,43 @@ static void __ibmvnic_reset(struct work_struct *work) ...@@ -1990,22 +2071,43 @@ static void __ibmvnic_reset(struct work_struct *work)
break; break;