mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'net-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Including fixes from bluetooth, and ipsec.
Current release - regressions:
- Bluetooth: fix unbalanced unlock in set_device_flags()
- Bluetooth: fix not processing all entries on cmd_sync_work, make
connect with qualcomm and intel adapters reliable
- Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
- xdp: xdp_mem_allocator can be NULL in trace_mem_connect()
- eth: ice: fix race condition and deadlock during interface enslave
Current release - new code bugs:
- tipc: fix incorrect order of state message data sanity check
Previous releases - regressions:
- esp: fix possible buffer overflow in ESP transformation
- dsa: unlock the rtnl_mutex when dsa_master_setup() fails
- phy: meson-gxl: fix interrupt handling in forced mode
- smsc95xx: ignore -ENODEV errors when device is unplugged
Previous releases - always broken:
- xfrm: fix tunnel mode fragmentation behavior
- esp: fix inter address family tunneling on GSO
- tipc: fix null-deref due to race when enabling bearer
- sctp: fix kernel-infoleak for SCTP sockets
- eth: macb: fix lost RX packet wakeup race in NAPI receive
- eth: intel stop disabling VFs due to PF error responses
- eth: bcmgenet: don't claim WOL when its not available"
* tag 'net-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (50 commits)
xdp: xdp_mem_allocator can be NULL in trace_mem_connect().
ice: Fix race condition during interface enslave
net: phy: meson-gxl: improve link-up behavior
net: bcmgenet: Don't claim WOL when its not available
net: arc_emac: Fix use after free in arc_mdio_probe()
sctp: fix kernel-infoleak for SCTP sockets
net: phy: correct spelling error of media in documentation
net: phy: DP83822: clear MISR2 register to disable interrupts
gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
selftests: pmtu.sh: Kill nettest processes launched in subshell.
selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
NFC: port100: fix use-after-free in port100_send_complete
net/mlx5e: SHAMPO, reduce TIR indication
net/mlx5e: Lag, Only handle events from highest priority multipath entry
net/mlx5: Fix offloading with ESWITCH_IPV4_TTL_MODIFY_ENABLE
net/mlx5: Fix a race on command flush flow
net/mlx5: Fix size field in bufferx_reg struct
ax25: Fix NULL pointer dereference in ax25_kill_by_device
net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr
net: ethernet: lpc_eth: Handle error for clk_enable
...
This commit is contained in:
commit
186d32bbf0
57 files changed
+387
-248
No files matched your search
@@ -2005,7 +2005,11 @@ setup_hw(struct hfc_pci *hc)
|
||||
}
|
||||
/* Allocate memory for FIFOS */
|
||||
/* the memory needs to be on a 32k boundary within the first 4G */
|
||||
dma_set_mask(&hc->pdev->dev, 0xFFFF8000);
|
||||
if (dma_set_mask(&hc->pdev->dev, 0xFFFF8000)) {
|
||||
printk(KERN_WARNING
|
||||
"HFC-PCI: No usable DMA configuration!\n");
|
||||
return -EIO;
|
||||
}
|
||||
buffer = dma_alloc_coherent(&hc->pdev->dev, 0x8000, &hc->hw.dmahandle,
|
||||
GFP_KERNEL);
|
||||
/* We silently assume the address is okay if nonzero */
|
||||
|
||||
@@ -192,7 +192,7 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline)
|
||||
int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
|
||||
{
|
||||
int found = 0;
|
||||
char *dup, *tok, *name, *args;
|
||||
char *dup, *next, *tok, *name, *args;
|
||||
struct dsp_element_entry *entry, *n;
|
||||
struct dsp_pipeline_entry *pipeline_entry;
|
||||
struct mISDN_dsp_element *elem;
|
||||
@@ -203,10 +203,10 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
|
||||
if (!list_empty(&pipeline->list))
|
||||
_dsp_pipeline_destroy(pipeline);
|
||||
|
||||
dup = kstrdup(cfg, GFP_ATOMIC);
|
||||
dup = next = kstrdup(cfg, GFP_ATOMIC);
|
||||
if (!dup)
|
||||
return 0;
|
||||
while ((tok = strsep(&dup, "|"))) {
|
||||
while ((tok = strsep(&next, "|"))) {
|
||||
if (!strlen(tok))
|
||||
continue;
|
||||
name = strsep(&tok, "(");
|
||||
|
||||
@@ -2936,7 +2936,7 @@ mt753x_phylink_validate(struct dsa_switch *ds, int port,
|
||||
|
||||
phylink_set_port_modes(mask);
|
||||
|
||||
if (state->interface != PHY_INTERFACE_MODE_TRGMII ||
|
||||
if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
|
||||
!phy_interface_mode_is_8023z(state->interface)) {
|
||||
phylink_set(mask, 10baseT_Half);
|
||||
phylink_set(mask, 10baseT_Full);
|
||||
|
||||
@@ -405,12 +405,12 @@ static int mcf8390_init(struct net_device *dev)
|
||||
static int mcf8390_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct resource *mem, *irq;
|
||||
struct resource *mem;
|
||||
resource_size_t msize;
|
||||
int ret;
|
||||
int ret, irq;
|
||||
|
||||
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (irq == NULL) {
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(&pdev->dev, "no IRQ specified?\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ static int mcf8390_probe(struct platform_device *pdev)
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
||||
dev->irq = irq->start;
|
||||
dev->irq = irq;
|
||||
dev->base_addr = mem->start;
|
||||
|
||||
ret = mcf8390_init(dev);
|
||||
|
||||
@@ -132,6 +132,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
|
||||
{
|
||||
struct arc_emac_mdio_bus_data *data = &priv->bus_data;
|
||||
struct device_node *np = priv->dev->of_node;
|
||||
const char *name = "Synopsys MII Bus";
|
||||
struct mii_bus *bus;
|
||||
int error;
|
||||
|
||||
@@ -142,7 +143,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
|
||||
priv->bus = bus;
|
||||
bus->priv = priv;
|
||||
bus->parent = priv->dev;
|
||||
bus->name = "Synopsys MII Bus";
|
||||
bus->name = name;
|
||||
bus->read = &arc_mdio_read;
|
||||
bus->write = &arc_mdio_write;
|
||||
bus->reset = &arc_mdio_reset;
|
||||
@@ -167,7 +168,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
|
||||
if (error) {
|
||||
mdiobus_free(bus);
|
||||
return dev_err_probe(priv->dev, error,
|
||||
"cannot register MDIO bus %s\n", bus->name);
|
||||
"cannot register MDIO bus %s\n", name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -40,6 +40,13 @@
|
||||
void bcmgenet_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
||||
{
|
||||
struct bcmgenet_priv *priv = netdev_priv(dev);
|
||||
struct device *kdev = &priv->pdev->dev;
|
||||
|
||||
if (!device_can_wakeup(kdev)) {
|
||||
wol->supported = 0;
|
||||
wol->wolopts = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
wol->supported = WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER;
|
||||
wol->wolopts = priv->wolopts;
|
||||
|
||||
@@ -1573,7 +1573,14 @@ static int macb_poll(struct napi_struct *napi, int budget)
|
||||
if (work_done < budget) {
|
||||
napi_complete_done(napi, work_done);
|
||||
|
||||
/* Packets received while interrupts were disabled */
|
||||
/* RSR bits only seem to propagate to raise interrupts when
|
||||
* interrupts are enabled at the time, so if bits are already
|
||||
* set due to packets received while interrupts were disabled,
|
||||
* they will not cause another interrupt to be generated when
|
||||
* interrupts are re-enabled.
|
||||
* Check for this case here. This has been seen to happen
|
||||
* around 30% of the time under heavy network load.
|
||||
*/
|
||||
status = macb_readl(bp, RSR);
|
||||
if (status) {
|
||||
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
|
||||
@@ -1581,6 +1588,22 @@ static int macb_poll(struct napi_struct *napi, int budget)
|
||||
napi_reschedule(napi);
|
||||
} else {
|
||||
queue_writel(queue, IER, bp->rx_intr_mask);
|
||||
|
||||
/* In rare cases, packets could have been received in
|
||||
* the window between the check above and re-enabling
|
||||
* interrupts. Therefore, a double-check is required
|
||||
* to avoid losing a wakeup. This can potentially race
|
||||
* with the interrupt handler doing the same actions
|
||||
* if an interrupt is raised just after enabling them,
|
||||
* but this should be harmless.
|
||||
*/
|
||||
status = macb_readl(bp, RSR);
|
||||
if (unlikely(status)) {
|
||||
queue_writel(queue, IDR, bp->rx_intr_mask);
|
||||
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
|
||||
queue_writel(queue, ISR, MACB_BIT(RCOMP));
|
||||
napi_schedule(napi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1464,6 +1464,7 @@ static int gfar_get_ts_info(struct net_device *dev,
|
||||
ptp_node = of_find_compatible_node(NULL, NULL, "fsl,etsec-ptp");
|
||||
if (ptp_node) {
|
||||
ptp_dev = of_find_device_by_node(ptp_node);
|
||||
of_node_put(ptp_node);
|
||||
if (ptp_dev)
|
||||
ptp = platform_get_drvdata(ptp_dev);
|
||||
}
|
||||
|
||||
@@ -742,10 +742,8 @@ static void i40e_dbg_dump_vf(struct i40e_pf *pf, int vf_id)
|
||||
vsi = pf->vsi[vf->lan_vsi_idx];
|
||||
dev_info(&pf->pdev->dev, "vf %2d: VSI id=%d, seid=%d, qps=%d\n",
|
||||
vf_id, vf->lan_vsi_id, vsi->seid, vf->num_queue_pairs);
|
||||
dev_info(&pf->pdev->dev, " num MDD=%lld, invalid msg=%lld, valid msg=%lld\n",
|
||||
vf->num_mdd_events,
|
||||
vf->num_invalid_msgs,
|
||||
vf->num_valid_msgs);
|
||||
dev_info(&pf->pdev->dev, " num MDD=%lld\n",
|
||||
vf->num_mdd_events);
|
||||
} else {
|
||||
dev_info(&pf->pdev->dev, "invalid VF id %d\n", vf_id);
|
||||
}
|
||||
|
||||
@@ -1917,19 +1917,17 @@ sriov_configure_out:
|
||||
/***********************virtual channel routines******************/
|
||||
|
||||
/**
|
||||
* i40e_vc_send_msg_to_vf_ex
|
||||
* i40e_vc_send_msg_to_vf
|
||||
* @vf: pointer to the VF info
|
||||
* @v_opcode: virtual channel opcode
|
||||
* @v_retval: virtual channel return value
|
||||
* @msg: pointer to the msg buffer
|
||||
* @msglen: msg length
|
||||
* @is_quiet: true for not printing unsuccessful return values, false otherwise
|
||||
*
|
||||
* send msg to VF
|
||||
**/
|
||||
static int i40e_vc_send_msg_to_vf_ex(struct i40e_vf *vf, u32 v_opcode,
|
||||
u32 v_retval, u8 *msg, u16 msglen,
|
||||
bool is_quiet)
|
||||
static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode,
|
||||
u32 v_retval, u8 *msg, u16 msglen)
|
||||
{
|
||||
struct i40e_pf *pf;
|
||||
struct i40e_hw *hw;
|
||||
@@ -1944,25 +1942,6 @@ static int i40e_vc_send_msg_to_vf_ex(struct i40e_vf *vf, u32 v_opcode,
|
||||
hw = &pf->hw;
|
||||
abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id;
|
||||
|
||||
/* single place to detect unsuccessful return values */
|
||||
if (v_retval && !is_quiet) {
|
||||
vf->num_invalid_msgs++;
|
||||
dev_info(&pf->pdev->dev, "VF %d failed opcode %d, retval: %d\n",
|
||||
vf->vf_id, v_opcode, v_retval);
|
||||
if (vf->num_invalid_msgs >
|
||||
I40E_DEFAULT_NUM_INVALID_MSGS_ALLOWED) {
|
||||
dev_err(&pf->pdev->dev,
|
||||
"Number of invalid messages exceeded for VF %d\n",
|
||||
vf->vf_id);
|
||||
dev_err(&pf->pdev->dev, "Use PF Control I/F to enable the VF\n");
|
||||
set_bit(I40E_VF_STATE_DISABLED, &vf->vf_states);
|
||||
}
|
||||
} else {
|
||||
vf->num_valid_msgs++;
|
||||
/* reset the invalid counter, if a valid message is received. */
|
||||
vf->num_invalid_msgs = 0;
|
||||
}
|
||||
|
||||
aq_ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, v_opcode, v_retval,
|
||||
msg, msglen, NULL);
|
||||
if (aq_ret) {
|
||||
@@ -1975,23 +1954,6 @@ static int i40e_vc_send_msg_to_vf_ex(struct i40e_vf *vf, u32 v_opcode,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vc_send_msg_to_vf
|
||||
* @vf: pointer to the VF info
|
||||
* @v_opcode: virtual channel opcode
|
||||
* @v_retval: virtual channel return value
|
||||
* @msg: pointer to the msg buffer
|
||||
* @msglen: msg length
|
||||
*
|
||||
* send msg to VF
|
||||
**/
|
||||
static int i40e_vc_send_msg_to_vf(struct i40e_vf *vf, u32 v_opcode,
|
||||
u32 v_retval, u8 *msg, u16 msglen)
|
||||
{
|
||||
return i40e_vc_send_msg_to_vf_ex(vf, v_opcode, v_retval,
|
||||
msg, msglen, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vc_send_resp_to_vf
|
||||
* @vf: pointer to the VF info
|
||||
@@ -2822,7 +2784,6 @@ error_param:
|
||||
* i40e_check_vf_permission
|
||||
* @vf: pointer to the VF info
|
||||
* @al: MAC address list from virtchnl
|
||||
* @is_quiet: set true for printing msg without opcode info, false otherwise
|
||||
*
|
||||
* Check that the given list of MAC addresses is allowed. Will return -EPERM
|
||||
* if any address in the list is not valid. Checks the following conditions:
|
||||
@@ -2837,8 +2798,7 @@ error_param:
|
||||
* addresses might not be accurate.
|
||||
**/
|
||||
static inline int i40e_check_vf_permission(struct i40e_vf *vf,
|
||||
struct virtchnl_ether_addr_list *al,
|
||||
bool *is_quiet)
|
||||
struct virtchnl_ether_addr_list *al)
|
||||
{
|
||||
struct i40e_pf *pf = vf->pf;
|
||||
struct i40e_vsi *vsi = pf->vsi[vf->lan_vsi_idx];
|
||||
@@ -2846,7 +2806,6 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf,
|
||||
int mac2add_cnt = 0;
|
||||
int i;
|
||||
|
||||
*is_quiet = false;
|
||||
for (i = 0; i < al->num_elements; i++) {
|
||||
struct i40e_mac_filter *f;
|
||||
u8 *addr = al->list[i].addr;
|
||||
@@ -2870,7 +2829,6 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf,
|
||||
!ether_addr_equal(addr, vf->default_lan_addr.addr)) {
|
||||
dev_err(&pf->pdev->dev,
|
||||
"VF attempting to override administratively set MAC address, bring down and up the VF interface to resume normal operation\n");
|
||||
*is_quiet = true;
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
@@ -2921,7 +2879,6 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
|
||||
(struct virtchnl_ether_addr_list *)msg;
|
||||
struct i40e_pf *pf = vf->pf;
|
||||
struct i40e_vsi *vsi = NULL;
|
||||
bool is_quiet = false;
|
||||
i40e_status ret = 0;
|
||||
int i;
|
||||
|
||||
@@ -2938,7 +2895,7 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
|
||||
*/
|
||||
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
||||
|
||||
ret = i40e_check_vf_permission(vf, al, &is_quiet);
|
||||
ret = i40e_check_vf_permission(vf, al);
|
||||
if (ret) {
|
||||
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
||||
goto error_param;
|
||||
@@ -2976,8 +2933,8 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
|
||||
|
||||
error_param:
|
||||
/* send the response to the VF */
|
||||
return i40e_vc_send_msg_to_vf_ex(vf, VIRTCHNL_OP_ADD_ETH_ADDR,
|
||||
ret, NULL, 0, is_quiet);
|
||||
return i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ADD_ETH_ADDR,
|
||||
ret, NULL, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#define I40E_VIRTCHNL_SUPPORTED_QTYPES 2
|
||||
|
||||
#define I40E_DEFAULT_NUM_INVALID_MSGS_ALLOWED 10
|
||||
|
||||
#define I40E_VLAN_PRIORITY_SHIFT 13
|
||||
#define I40E_VLAN_MASK 0xFFF
|
||||
#define I40E_PRIORITY_MASK 0xE000
|
||||
@@ -92,9 +90,6 @@ struct i40e_vf {
|
||||
u8 num_queue_pairs; /* num of qps assigned to VF vsis */
|
||||
u8 num_req_queues; /* num of requested qps */
|
||||
u64 num_mdd_events; /* num of mdd events detected */
|
||||
/* num of continuous malformed or invalid msgs detected */
|
||||
u64 num_invalid_msgs;
|
||||
u64 num_valid_msgs; /* num of valid msgs detected */
|
||||
|
||||
unsigned long vf_caps; /* vf's adv. capabilities */
|
||||
unsigned long vf_states; /* vf's runtime states */
|
||||
|
||||
@@ -288,6 +288,7 @@ struct iavf_adapter {
|
||||
#define IAVF_FLAG_REINIT_ITR_NEEDED BIT(16)
|
||||
#define IAVF_FLAG_QUEUES_DISABLED BIT(17)
|
||||
#define IAVF_FLAG_SETUP_NETDEV_FEATURES BIT(18)
|
||||
#define IAVF_FLAG_REINIT_MSIX_NEEDED BIT(20)
|
||||
/* duplicates for common code */
|
||||
#define IAVF_FLAG_DCB_ENABLED 0
|
||||
/* flags for admin queue service task */
|
||||
|
||||
@@ -2120,7 +2120,7 @@ int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter)
|
||||
"Requested %d queues, but PF only gave us %d.\n",
|
||||
num_req_queues,
|
||||
adapter->vsi_res->num_queue_pairs);
|
||||
adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED;
|
||||
adapter->flags |= IAVF_FLAG_REINIT_MSIX_NEEDED;
|
||||
adapter->num_req_queues = adapter->vsi_res->num_queue_pairs;
|
||||
iavf_schedule_reset(adapter);
|
||||
|
||||
@@ -2727,7 +2727,8 @@ continue_reset:
|
||||
err);
|
||||
adapter->aq_required = 0;
|
||||
|
||||
if (adapter->flags & IAVF_FLAG_REINIT_ITR_NEEDED) {
|
||||
if ((adapter->flags & IAVF_FLAG_REINIT_MSIX_NEEDED) ||
|
||||
(adapter->flags & IAVF_FLAG_REINIT_ITR_NEEDED)) {
|
||||
err = iavf_reinit_interrupt_scheme(adapter);
|
||||
if (err)
|
||||
goto reset_err;
|
||||
@@ -2799,12 +2800,13 @@ continue_reset:
|
||||
if (err)
|
||||
goto reset_err;
|
||||
|
||||
if (adapter->flags & IAVF_FLAG_REINIT_ITR_NEEDED) {
|
||||
if ((adapter->flags & IAVF_FLAG_REINIT_MSIX_NEEDED) ||
|
||||
(adapter->flags & IAVF_FLAG_REINIT_ITR_NEEDED)) {
|
||||
err = iavf_request_traffic_irqs(adapter, netdev->name);
|
||||
if (err)
|
||||
goto reset_err;
|
||||
|
||||
adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED;
|
||||
adapter->flags &= ~IAVF_FLAG_REINIT_MSIX_NEEDED;
|
||||
}
|
||||
|
||||
iavf_configure(adapter);
|
||||
@@ -2819,6 +2821,9 @@ continue_reset:
|
||||
iavf_change_state(adapter, __IAVF_DOWN);
|
||||
wake_up(&adapter->down_waitqueue);
|
||||
}
|
||||
|
||||
adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED;
|
||||
|
||||
mutex_unlock(&adapter->client_lock);
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
|
||||
|
||||
@@ -1834,6 +1834,22 @@ void iavf_request_reset(struct iavf_adapter *adapter)
|
||||
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
* iavf_netdev_features_vlan_strip_set - update vlan strip status
|
||||
* @netdev: ptr to netdev being adjusted
|
||||
* @enable: enable or disable vlan strip
|
||||
*
|
||||
* Helper function to change vlan strip status in netdev->features.
|
||||
*/
|
||||
static void iavf_netdev_features_vlan_strip_set(struct net_device *netdev,
|
||||
const bool enable)
|
||||
{
|
||||
if (enable)
|
||||
netdev->features |= NETIF_F_HW_VLAN_CTAG_RX;
|
||||
else
|
||||
netdev->features &= ~NETIF_F_HW_VLAN_CTAG_RX;
|
||||
}
|
||||
|
||||
/**
|
||||
* iavf_virtchnl_completion
|
||||
* @adapter: adapter structure
|
||||
@@ -2057,8 +2073,18 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
|
||||
}
|
||||
break;
|
||||
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
|
||||
dev_warn(&adapter->pdev->dev, "Changing VLAN Stripping is not allowed when Port VLAN is configured\n");
|
||||
/* Vlan stripping could not be enabled by ethtool.
|
||||
* Disable it in netdev->features.
|
||||
*/
|
||||
iavf_netdev_features_vlan_strip_set(netdev, false);
|
||||
break;
|
||||
case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:
|
||||
dev_warn(&adapter->pdev->dev, "Changing VLAN Stripping is not allowed when Port VLAN is configured\n");
|
||||
/* Vlan stripping could not be disabled by ethtool.
|
||||
* Enable it in netdev->features.
|
||||
*/
|
||||
iavf_netdev_features_vlan_strip_set(netdev, true);
|
||||
break;
|
||||
default:
|
||||
dev_err(&adapter->pdev->dev, "PF returned error %d (%s) to our request %d\n",
|
||||
@@ -2312,6 +2338,20 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
|
||||
spin_unlock_bh(&adapter->adv_rss_lock);
|
||||
}
|
||||
break;
|
||||
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
|
||||
/* PF enabled vlan strip on this VF.
|
||||
* Update netdev->features if needed to be in sync with ethtool.
|
||||
*/
|
||||
if (!v_retval)
|
||||
iavf_netdev_features_vlan_strip_set(netdev, true);
|
||||
break;
|
||||
case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:
|
||||
/* PF disabled vlan strip on this VF.
|
||||
* Update netdev->features if needed to be in sync with ethtool.
|
||||
*/
|
||||
if (!v_retval)
|
||||
iavf_netdev_features_vlan_strip_set(netdev, false);
|
||||
break;
|
||||
default:
|
||||
if (adapter->current_op && (v_opcode != adapter->current_op))
|
||||
dev_warn(&adapter->pdev->dev, "Expected response %d from PF, received %d\n",
|
||||
|
||||
@@ -483,6 +483,7 @@ enum ice_pf_flags {
|
||||
ICE_FLAG_MDD_AUTO_RESET_VF,
|
||||
ICE_FLAG_LINK_LENIENT_MODE_ENA,
|
||||
ICE_FLAG_PLUG_AUX_DEV,
|
||||
ICE_FLAG_MTU_CHANGED,
|
||||
ICE_PF_FLAGS_NBITS /* must be last */
|
||||
};
|
||||
|
||||
@@ -897,7 +898,16 @@ static inline void ice_set_rdma_cap(struct ice_pf *pf)
|
||||
*/
|
||||
static inline void ice_clear_rdma_cap(struct ice_pf *pf)
|
||||
{
|
||||
ice_unplug_aux_dev(pf);
|
||||
/* We can directly unplug aux device here only if the flag bit
|
||||
* ICE_FLAG_PLUG_AUX_DEV is not set because ice_unplug_aux_dev()
|
||||
* could race with ice_plug_aux_dev() called from
|
||||
* ice_service_task(). In this case we only clear that bit now and
|
||||
* aux device will be unplugged later once ice_plug_aux_device()
|
||||
* called from ice_service_task() finishes (see ice_service_task()).
|
||||
*/
|
||||
if (!test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags))
|
||||
ice_unplug_aux_dev(pf);
|
||||
|
||||
clear_bit(ICE_FLAG_RDMA_ENA, pf->flags);
|
||||
clear_bit(ICE_FLAG_AUX_ENA, pf->flags);
|
||||
}
|
||||
|
||||
@@ -2298,7 +2298,7 @@ ice_set_link_ksettings(struct net_device *netdev,
|
||||
if (err)
|
||||
goto done;
|
||||
|
||||
curr_link_speed = pi->phy.link_info.link_speed;
|
||||
curr_link_speed = pi->phy.curr_user_speed_req;
|
||||
adv_link_speed = ice_ksettings_find_adv_link_speed(ks);
|
||||
|
||||
/* If speed didn't get set, set it to what it currently is.
|
||||
|
||||
@@ -2255,9 +2255,30 @@ static void ice_service_task(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags))
|
||||
if (test_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags)) {
|
||||
/* Plug aux device per request */
|
||||
ice_plug_aux_dev(pf);
|
||||
|
||||
/* Mark plugging as done but check whether unplug was
|
||||
* requested during ice_plug_aux_dev() call
|
||||
* (e.g. from ice_clear_rdma_cap()) and if so then
|
||||
* plug aux device.
|
||||
*/
|
||||
if (!test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags))
|
||||
ice_unplug_aux_dev(pf);
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(ICE_FLAG_MTU_CHANGED, pf->flags)) {
|
||||
struct iidc_event *event;
|
||||
|
||||
event = kzalloc(sizeof(*event), GFP_KERNEL);
|
||||
if (event) {
|
||||
set_bit(IIDC_EVENT_AFTER_MTU_CHANGE, event->type);
|
||||
ice_send_event_to_aux(pf, event);
|
||||
kfree(event);
|
||||
}
|
||||
}
|
||||
|
||||
ice_clean_adminq_subtask(pf);
|
||||
ice_check_media_subtask(pf);
|
||||
ice_check_for_hang_subtask(pf);
|
||||
@@ -3023,7 +3044,7 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
|
||||
struct iidc_event *event;
|
||||
|
||||
ena_mask &= ~ICE_AUX_CRIT_ERR;
|
||||
event = kzalloc(sizeof(*event), GFP_KERNEL);
|
||||
event = kzalloc(sizeof(*event), GFP_ATOMIC);
|
||||
if (event) {
|
||||
set_bit(IIDC_EVENT_CRIT_ERR, event->type);
|
||||
/* report the entire OICR value to AUX driver */
|
||||
@@ -6822,7 +6843,6 @@ static int ice_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
struct ice_vsi *vsi = np->vsi;
|
||||
struct ice_pf *pf = vsi->back;
|
||||
struct iidc_event *event;
|
||||
u8 count = 0;
|
||||
int err = 0;
|
||||
|
||||
@@ -6857,14 +6877,6 @@ static int ice_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
event = kzalloc(sizeof(*event), GFP_KERNEL);
|
||||
if (!event)
|
||||
return -ENOMEM;
|
||||
|
||||
set_bit(IIDC_EVENT_BEFORE_MTU_CHANGE, event->type);
|
||||
ice_send_event_to_aux(pf, event);
|
||||
clear_bit(IIDC_EVENT_BEFORE_MTU_CHANGE, event->type);
|
||||
|
||||
netdev->mtu = (unsigned int)new_mtu;
|
||||
|
||||
/* if VSI is up, bring it down and then back up */
|
||||
@@ -6872,21 +6884,18 @@ static int ice_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
err = ice_down(vsi);
|
||||
if (err) {
|
||||
netdev_err(netdev, "change MTU if_down err %d\n", err);
|
||||
goto event_after;
|
||||
return err;
|
||||
}
|
||||
|
||||
err = ice_up(vsi);
|
||||
if (err) {
|
||||
netdev_err(netdev, "change MTU if_up err %d\n", err);
|
||||
goto event_after;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
netdev_dbg(netdev, "changed MTU to %d\n", new_mtu);
|
||||
event_after:
|
||||
set_bit(IIDC_EVENT_AFTER_MTU_CHANGE, event->type);
|
||||
ice_send_event_to_aux(pf, event);
|
||||
kfree(event);
|
||||
set_bit(ICE_FLAG_MTU_CHANGED, pf->flags);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -2182,24 +2182,6 @@ ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode,
|
||||
|
||||
dev = ice_pf_to_dev(pf);
|
||||
|
||||
/* single place to detect unsuccessful return values */
|
||||
if (v_retval) {
|
||||
vf->num_inval_msgs++;
|
||||
dev_info(dev, "VF %d failed opcode %d, retval: %d\n", vf->vf_id,
|
||||
v_opcode, v_retval);
|
||||
if (vf->num_inval_msgs > ICE_DFLT_NUM_INVAL_MSGS_ALLOWED) {
|
||||
dev_err(dev, "Number of invalid messages exceeded for VF %d\n",
|
||||
vf->vf_id);
|
||||
dev_err(dev, "Use PF Control I/F to enable the VF\n");
|
||||
set_bit(ICE_VF_STATE_DIS, vf->vf_states);
|
||||
return -EIO;
|
||||
}
|
||||
} else {
|
||||
vf->num_valid_msgs++;
|
||||
/* reset the invalid counter, if a valid message is received. */
|
||||
vf->num_inval_msgs = 0;
|
||||
}
|
||||
|
||||
aq_ret = ice_aq_send_msg_to_vf(&pf->hw, vf->vf_id, v_opcode, v_retval,
|
||||
msg, msglen, NULL);
|
||||
if (aq_ret && pf->hw.mailboxq.sq_last_status != ICE_AQ_RC_ENOSYS) {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#define ICE_MAX_MACADDR_PER_VF 18
|
||||
|
||||
/* Malicious Driver Detection */
|
||||
#define ICE_DFLT_NUM_INVAL_MSGS_ALLOWED 10
|
||||
#define ICE_MDD_EVENTS_THRESHOLD 30
|
||||
|
||||
/* Static VF transaction/status register def */
|
||||
@@ -134,8 +133,6 @@ struct ice_vf {
|
||||
unsigned int max_tx_rate; /* Maximum Tx bandwidth limit in Mbps */
|
||||
DECLARE_BITMAP(vf_states, ICE_VF_STATES_NBITS); /* VF runtime states */
|
||||
|
||||
u64 num_inval_msgs; /* number of continuous invalid msgs */
|
||||
u64 num_valid_msgs; /* number of valid msgs detected */
|
||||
unsigned long vf_caps; /* VF's adv. capabilities */
|
||||
u8 num_req_qs; /* num of queue pairs requested by VF */
|
||||
u16 num_mac;
|
||||
|
||||
@@ -260,9 +260,9 @@ static int xrx200_hw_receive(struct xrx200_chan *ch)
|
||||
|
||||
if (ctl & LTQ_DMA_EOP) {
|
||||
ch->skb_head->protocol = eth_type_trans(ch->skb_head, net_dev);
|
||||
netif_receive_skb(ch->skb_head);
|
||||
net_dev->stats.rx_packets++;
|
||||
net_dev->stats.rx_bytes += ch->skb_head->len;
|
||||
netif_receive_skb(ch->skb_head);
|
||||
ch->skb_head = NULL;
|
||||
ch->skb_tail = NULL;
|
||||
ret = XRX200_DMA_PACKET_COMPLETE;
|
||||
|
||||
Loaded 20 of 57 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user