mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Including fixes from IPSec, netfilter and Bluetooth.
Nothing really stands out, but as usual there's a slight concentration
of fixes for issues added in the last two weeks before the merge
window, and driver bugs from 6.13 which tend to get discovered upon
wider distribution.
Current release - regressions:
- net: revert RTNL changes in unregister_netdevice_many_notify()
- Bluetooth: fix possible infinite recursion of btusb_reset
- eth: adjust locking in some old drivers which protect their state
with spinlocks to avoid sleeping in atomic; core protects netdev
state with a mutex now
Previous releases - regressions:
- eth:
- mlx5e: make sure we pass node ID, not CPU ID to kvzalloc_node()
- bgmac: reduce max frame size to support just 1500 bytes; the
jumbo frame support would previously cause OOB writes, but now
fails outright
- mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted, avoid
false detection of MPTCP blackholing
Previous releases - always broken:
- mptcp: handle fastopen disconnect correctly
- xfrm:
- make sure skb->sk is a full sock before accessing its fields
- fix taking a lock with preempt disabled for RT kernels
- usb: ipheth: improve safety of packet metadata parsing; prevent
potential OOB accesses
- eth: renesas: fix missing rtnl lock in suspend/resume path"
* tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits)
MAINTAINERS: add Neal to TCP maintainers
net: revert RTNL changes in unregister_netdevice_many_notify()
net: hsr: fix fill_frame_info() regression vs VLAN packets
doc: mptcp: sysctl: blackhole_timeout is per-netns
mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted
netfilter: nf_tables: reject mismatching sum of field_len with set key length
net: sh_eth: Fix missing rtnl lock in suspend/resume path
net: ravb: Fix missing rtnl lock in suspend/resume path
selftests/net: Add test for loading devbound XDP program in generic mode
net: xdp: Disallow attaching device-bound programs in generic mode
tcp: correct handling of extreme memory squeeze
bgmac: reduce max frame size to support just MTU 1500
vsock/test: Add test for connect() retries
vsock/test: Add test for UAF due to socket unbinding
vsock/test: Introduce vsock_connect_fd()
vsock/test: Introduce vsock_bind()
vsock: Allow retrying on connect() failure
vsock: Keep the binding until socket destruction
Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection
Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming
...
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
What: /sys/class/bluetooth/hci<index>/reset
|
||||
Date: 14-Jan-2025
|
||||
KernelVersion: 6.13
|
||||
Contact: linux-bluetooth@vger.kernel.org
|
||||
Description: This write-only attribute allows users to trigger the vendor reset
|
||||
method on the Bluetooth device when arbitrary data is written.
|
||||
The reset may or may not be done through the device transport
|
||||
(e.g., UART/USB), and can also be done through an out-of-band
|
||||
approach such as GPIO.
|
||||
@@ -22,12 +22,12 @@ properties:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,qcs8300-ethqos
|
||||
- const: qcom,sa8775p-ethqos
|
||||
- qcom,qcs615-ethqos
|
||||
- const: qcom,qcs404-ethqos
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,qcs615-ethqos
|
||||
- const: qcom,sm8150-ethqos
|
||||
- qcom,qcs8300-ethqos
|
||||
- const: qcom,sa8775p-ethqos
|
||||
- enum:
|
||||
- qcom,qcs404-ethqos
|
||||
- qcom,sa8775p-ethqos
|
||||
|
||||
@@ -699,10 +699,10 @@ RAW socket option CAN_RAW_JOIN_FILTERS
|
||||
|
||||
The CAN_RAW socket can set multiple CAN identifier specific filters that
|
||||
lead to multiple filters in the af_can.c filter processing. These filters
|
||||
are indenpendent from each other which leads to logical OR'ed filters when
|
||||
are independent from each other which leads to logical OR'ed filters when
|
||||
applied (see :ref:`socketcan-rawfilter`).
|
||||
|
||||
This socket option joines the given CAN filters in the way that only CAN
|
||||
This socket option joins the given CAN filters in the way that only CAN
|
||||
frames are passed to user space that matched *all* given CAN filters. The
|
||||
semantic for the applied filters is therefore changed to a logical AND.
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ blackhole_timeout - INTEGER (seconds)
|
||||
MPTCP is re-enabled and will reset to the initial value when the
|
||||
blackhole issue goes away.
|
||||
|
||||
0 to disable the blackhole detection.
|
||||
0 to disable the blackhole detection. This is a per-namespace sysctl.
|
||||
|
||||
Default: 3600
|
||||
|
||||
|
||||
@@ -362,7 +362,7 @@ It is expected that ``irq-suspend-timeout`` will be set to a value much larger
|
||||
than ``gro_flush_timeout`` as ``irq-suspend-timeout`` should suspend IRQs for
|
||||
the duration of one userland processing cycle.
|
||||
|
||||
While it is not stricly necessary to use ``napi_defer_hard_irqs`` and
|
||||
While it is not strictly necessary to use ``napi_defer_hard_irqs`` and
|
||||
``gro_flush_timeout`` to use IRQ suspension, their use is strongly
|
||||
recommended.
|
||||
|
||||
|
||||
@@ -4102,6 +4102,7 @@ S: Supported
|
||||
W: http://www.bluez.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
|
||||
F: Documentation/ABI/stable/sysfs-class-bluetooth
|
||||
F: include/net/bluetooth/
|
||||
F: net/bluetooth/
|
||||
|
||||
@@ -16277,6 +16278,7 @@ F: drivers/scsi/sun3_scsi_vme.c
|
||||
|
||||
NCSI LIBRARY
|
||||
M: Samuel Mendoza-Jonas <sam@mendozajonas.com>
|
||||
R: Paul Fertser <fercerpav@gmail.com>
|
||||
S: Maintained
|
||||
F: net/ncsi/
|
||||
|
||||
@@ -16611,6 +16613,7 @@ F: tools/testing/selftests/net/mptcp/
|
||||
|
||||
NETWORKING [TCP]
|
||||
M: Eric Dumazet <edumazet@google.com>
|
||||
M: Neal Cardwell <ncardwell@google.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/networking/net_cachelines/tcp_sock.rst
|
||||
|
||||
@@ -1381,13 +1381,12 @@ static void btnxpuart_tx_work(struct work_struct *work)
|
||||
|
||||
while ((skb = nxp_dequeue(nxpdev))) {
|
||||
len = serdev_device_write_buf(serdev, skb->data, skb->len);
|
||||
serdev_device_wait_until_sent(serdev, 0);
|
||||
hdev->stat.byte_tx += len;
|
||||
|
||||
skb_pull(skb, len);
|
||||
if (skb->len > 0) {
|
||||
skb_queue_head(&nxpdev->txq, skb);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (hci_skb_pkt_type(skb)) {
|
||||
|
||||
@@ -899,11 +899,6 @@ static void btusb_reset(struct hci_dev *hdev)
|
||||
struct btusb_data *data;
|
||||
int err;
|
||||
|
||||
if (hdev->reset) {
|
||||
hdev->reset(hdev);
|
||||
return;
|
||||
}
|
||||
|
||||
data = hci_get_drvdata(hdev);
|
||||
/* This is not an unbalanced PM reference since the device will reset */
|
||||
err = usb_autopm_get_interface(data->intf);
|
||||
@@ -2639,8 +2634,15 @@ static void btusb_mtk_claim_iso_intf(struct btusb_data *data)
|
||||
struct btmtk_data *btmtk_data = hci_get_priv(data->hdev);
|
||||
int err;
|
||||
|
||||
/*
|
||||
* The function usb_driver_claim_interface() is documented to need
|
||||
* locks held if it's not called from a probe routine. The code here
|
||||
* is called from the hci_power_on workqueue, so grab the lock.
|
||||
*/
|
||||
device_lock(&btmtk_data->isopkt_intf->dev);
|
||||
err = usb_driver_claim_interface(&btusb_driver,
|
||||
btmtk_data->isopkt_intf, data);
|
||||
device_unlock(&btmtk_data->isopkt_intf->dev);
|
||||
if (err < 0) {
|
||||
btmtk_data->isopkt_intf = NULL;
|
||||
bt_dev_err(data->hdev, "Failed to claim iso interface");
|
||||
|
||||
@@ -1538,17 +1538,20 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
|
||||
NETIF_F_HIGHDMA | NETIF_F_LRO)
|
||||
|
||||
#define BOND_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
|
||||
NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE)
|
||||
NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE | \
|
||||
NETIF_F_GSO_PARTIAL)
|
||||
|
||||
#define BOND_MPLS_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
|
||||
NETIF_F_GSO_SOFTWARE)
|
||||
|
||||
#define BOND_GSO_PARTIAL_FEATURES (NETIF_F_GSO_ESP)
|
||||
|
||||
|
||||
static void bond_compute_features(struct bonding *bond)
|
||||
{
|
||||
netdev_features_t gso_partial_features = BOND_GSO_PARTIAL_FEATURES;
|
||||
unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
|
||||
IFF_XMIT_DST_RELEASE_PERM;
|
||||
netdev_features_t gso_partial_features = NETIF_F_GSO_ESP;
|
||||
netdev_features_t vlan_features = BOND_VLAN_FEATURES;
|
||||
netdev_features_t enc_features = BOND_ENC_FEATURES;
|
||||
#ifdef CONFIG_XFRM_OFFLOAD
|
||||
@@ -1582,8 +1585,9 @@ static void bond_compute_features(struct bonding *bond)
|
||||
BOND_XFRM_FEATURES);
|
||||
#endif /* CONFIG_XFRM_OFFLOAD */
|
||||
|
||||
if (slave->dev->hw_enc_features & NETIF_F_GSO_PARTIAL)
|
||||
gso_partial_features &= slave->dev->gso_partial_features;
|
||||
gso_partial_features = netdev_increment_features(gso_partial_features,
|
||||
slave->dev->gso_partial_features,
|
||||
BOND_GSO_PARTIAL_FEATURES);
|
||||
|
||||
mpls_features = netdev_increment_features(mpls_features,
|
||||
slave->dev->mpls_features,
|
||||
@@ -1598,12 +1602,8 @@ static void bond_compute_features(struct bonding *bond)
|
||||
}
|
||||
bond_dev->hard_header_len = max_hard_header_len;
|
||||
|
||||
if (gso_partial_features & NETIF_F_GSO_ESP)
|
||||
bond_dev->gso_partial_features |= NETIF_F_GSO_ESP;
|
||||
else
|
||||
bond_dev->gso_partial_features &= ~NETIF_F_GSO_ESP;
|
||||
|
||||
done:
|
||||
bond_dev->gso_partial_features = gso_partial_features;
|
||||
bond_dev->vlan_features = vlan_features;
|
||||
bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
|
||||
NETIF_F_HW_VLAN_CTAG_TX |
|
||||
@@ -6046,6 +6046,7 @@ void bond_setup(struct net_device *bond_dev)
|
||||
bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL;
|
||||
bond_dev->features |= bond_dev->hw_features;
|
||||
bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
|
||||
bond_dev->features |= NETIF_F_GSO_PARTIAL;
|
||||
#ifdef CONFIG_XFRM_OFFLOAD
|
||||
bond_dev->hw_features |= BOND_XFRM_FEATURES;
|
||||
/* Only enable XFRM features if this is an active-backup config */
|
||||
|
||||
@@ -328,8 +328,7 @@
|
||||
#define BGMAC_RX_FRAME_OFFSET 30 /* There are 2 unused bytes between header and real data */
|
||||
#define BGMAC_RX_BUF_OFFSET (NET_SKB_PAD + NET_IP_ALIGN - \
|
||||
BGMAC_RX_FRAME_OFFSET)
|
||||
/* Jumbo frame size with FCS */
|
||||
#define BGMAC_RX_MAX_FRAME_SIZE 9724
|
||||
#define BGMAC_RX_MAX_FRAME_SIZE 1536
|
||||
#define BGMAC_RX_BUF_SIZE (BGMAC_RX_FRAME_OFFSET + BGMAC_RX_MAX_FRAME_SIZE)
|
||||
#define BGMAC_RX_ALLOC_SIZE (SKB_DATA_ALIGN(BGMAC_RX_BUF_SIZE + BGMAC_RX_BUF_OFFSET) + \
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
|
||||
|
||||
@@ -7424,7 +7424,7 @@ static void tg3_napi_enable(struct tg3 *tp)
|
||||
|
||||
for (i = 0; i < tp->irq_cnt; i++) {
|
||||
tnapi = &tp->napi[i];
|
||||
napi_enable(&tnapi->napi);
|
||||
napi_enable_locked(&tnapi->napi);
|
||||
if (tnapi->tx_buffers) {
|
||||
netif_queue_set_napi(tp->dev, txq_idx,
|
||||
NETDEV_QUEUE_TYPE_TX,
|
||||
@@ -7445,9 +7445,10 @@ static void tg3_napi_init(struct tg3 *tp)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < tp->irq_cnt; i++) {
|
||||
netif_napi_add(tp->dev, &tp->napi[i].napi,
|
||||
i ? tg3_poll_msix : tg3_poll);
|
||||
netif_napi_set_irq(&tp->napi[i].napi, tp->napi[i].irq_vec);
|
||||
netif_napi_add_locked(tp->dev, &tp->napi[i].napi,
|
||||
i ? tg3_poll_msix : tg3_poll);
|
||||
netif_napi_set_irq_locked(&tp->napi[i].napi,
|
||||
tp->napi[i].irq_vec);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11259,6 +11260,8 @@ static void tg3_timer_stop(struct tg3 *tp)
|
||||
static int tg3_restart_hw(struct tg3 *tp, bool reset_phy)
|
||||
__releases(tp->lock)
|
||||
__acquires(tp->lock)
|
||||
__releases(tp->dev->lock)
|
||||
__acquires(tp->dev->lock)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -11271,7 +11274,9 @@ static int tg3_restart_hw(struct tg3 *tp, bool reset_phy)
|
||||
tg3_timer_stop(tp);
|
||||
tp->irq_sync = 0;
|
||||
tg3_napi_enable(tp);
|
||||
netdev_unlock(tp->dev);
|
||||
dev_close(tp->dev);
|
||||
netdev_lock(tp->dev);
|
||||
tg3_full_lock(tp, 0);
|
||||
}
|
||||
return err;
|
||||
@@ -11299,6 +11304,7 @@ static void tg3_reset_task(struct work_struct *work)
|
||||
|
||||
tg3_netif_stop(tp);
|
||||
|
||||
netdev_lock(tp->dev);
|
||||
tg3_full_lock(tp, 1);
|
||||
|
||||
if (tg3_flag(tp, TX_RECOVERY_PENDING)) {
|
||||
@@ -11318,12 +11324,14 @@ static void tg3_reset_task(struct work_struct *work)
|
||||
* call cancel_work_sync() and wait forever.
|
||||
*/
|
||||
tg3_flag_clear(tp, RESET_TASK_PENDING);
|
||||
netdev_unlock(tp->dev);
|
||||
dev_close(tp->dev);
|
||||
goto out;
|
||||
}
|
||||
|
||||
tg3_netif_start(tp);
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(tp->dev);
|
||||
tg3_phy_start(tp);
|
||||
tg3_flag_clear(tp, RESET_TASK_PENDING);
|
||||
out:
|
||||
@@ -11683,9 +11691,11 @@ static int tg3_start(struct tg3 *tp, bool reset_phy, bool test_irq,
|
||||
if (err)
|
||||
goto out_ints_fini;
|
||||
|
||||
netdev_lock(dev);
|
||||
tg3_napi_init(tp);
|
||||
|
||||
tg3_napi_enable(tp);
|
||||
netdev_unlock(dev);
|
||||
|
||||
for (i = 0; i < tp->irq_cnt; i++) {
|
||||
err = tg3_request_irq(tp, i);
|
||||
@@ -12569,6 +12579,7 @@ static int tg3_set_ringparam(struct net_device *dev,
|
||||
irq_sync = 1;
|
||||
}
|
||||
|
||||
netdev_lock(dev);
|
||||
tg3_full_lock(tp, irq_sync);
|
||||
|
||||
tp->rx_pending = ering->rx_pending;
|
||||
@@ -12597,6 +12608,7 @@ static int tg3_set_ringparam(struct net_device *dev,
|
||||
}
|
||||
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(dev);
|
||||
|
||||
if (irq_sync && !err)
|
||||
tg3_phy_start(tp);
|
||||
@@ -12678,6 +12690,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
|
||||
irq_sync = 1;
|
||||
}
|
||||
|
||||
netdev_lock(dev);
|
||||
tg3_full_lock(tp, irq_sync);
|
||||
|
||||
if (epause->autoneg)
|
||||
@@ -12707,6 +12720,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
|
||||
}
|
||||
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(dev);
|
||||
}
|
||||
|
||||
tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
|
||||
@@ -13911,6 +13925,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
|
||||
data[TG3_INTERRUPT_TEST] = 1;
|
||||
}
|
||||
|
||||
netdev_lock(dev);
|
||||
tg3_full_lock(tp, 0);
|
||||
|
||||
tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
|
||||
@@ -13922,6 +13937,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
|
||||
}
|
||||
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(dev);
|
||||
|
||||
if (irq_sync && !err2)
|
||||
tg3_phy_start(tp);
|
||||
@@ -14365,6 +14381,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
|
||||
|
||||
tg3_set_mtu(dev, tp, new_mtu);
|
||||
|
||||
netdev_lock(dev);
|
||||
tg3_full_lock(tp, 1);
|
||||
|
||||
tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
|
||||
@@ -14384,6 +14401,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
|
||||
tg3_netif_start(tp);
|
||||
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(dev);
|
||||
|
||||
if (!err)
|
||||
tg3_phy_start(tp);
|
||||
@@ -18164,6 +18182,7 @@ static int tg3_resume(struct device *device)
|
||||
|
||||
netif_device_attach(dev);
|
||||
|
||||
netdev_lock(dev);
|
||||
tg3_full_lock(tp, 0);
|
||||
|
||||
tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
|
||||
@@ -18180,6 +18199,7 @@ static int tg3_resume(struct device *device)
|
||||
|
||||
out:
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(dev);
|
||||
|
||||
if (!err)
|
||||
tg3_phy_start(tp);
|
||||
@@ -18260,7 +18280,9 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
|
||||
done:
|
||||
if (state == pci_channel_io_perm_failure) {
|
||||
if (netdev) {
|
||||
netdev_lock(netdev);
|
||||
tg3_napi_enable(tp);
|
||||
netdev_unlock(netdev);
|
||||
dev_close(netdev);
|
||||
}
|
||||
err = PCI_ERS_RESULT_DISCONNECT;
|
||||
@@ -18314,7 +18336,9 @@ static pci_ers_result_t tg3_io_slot_reset(struct pci_dev *pdev)
|
||||
|
||||
done:
|
||||
if (rc != PCI_ERS_RESULT_RECOVERED && netdev && netif_running(netdev)) {
|
||||
netdev_lock(netdev);
|
||||
tg3_napi_enable(tp);
|
||||
netdev_unlock(netdev);
|
||||
dev_close(netdev);
|
||||
}
|
||||
rtnl_unlock();
|
||||
@@ -18340,12 +18364,14 @@ static void tg3_io_resume(struct pci_dev *pdev)
|
||||
if (!netdev || !netif_running(netdev))
|
||||
goto done;
|
||||
|
||||
netdev_lock(netdev);
|
||||
tg3_full_lock(tp, 0);
|
||||
tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
|
||||
tg3_flag_set(tp, INIT_COMPLETE);
|
||||
err = tg3_restart_hw(tp, true);
|
||||
if (err) {
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(netdev);
|
||||
netdev_err(netdev, "Cannot restart hardware after reset.\n");
|
||||
goto done;
|
||||
}
|
||||
@@ -18357,6 +18383,7 @@ static void tg3_io_resume(struct pci_dev *pdev)
|
||||
tg3_netif_start(tp);
|
||||
|
||||
tg3_full_unlock(tp);
|
||||
netdev_unlock(netdev);
|
||||
|
||||
tg3_phy_start(tp);
|
||||
|
||||
|
||||
@@ -1777,10 +1777,11 @@ static void dm9000_drv_remove(struct platform_device *pdev)
|
||||
|
||||
unregister_netdev(ndev);
|
||||
dm9000_release_board(pdev, dm);
|
||||
free_netdev(ndev); /* free device structure */
|
||||
if (dm->power_supply)
|
||||
regulator_disable(dm->power_supply);
|
||||
|
||||
free_netdev(ndev); /* free device structure */
|
||||
|
||||
dev_dbg(&pdev->dev, "released and freed device\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -840,6 +840,8 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,
|
||||
struct fec_enet_private *fep = netdev_priv(ndev);
|
||||
int hdr_len, total_len, data_left;
|
||||
struct bufdesc *bdp = txq->bd.cur;
|
||||
struct bufdesc *tmp_bdp;
|
||||
struct bufdesc_ex *ebdp;
|
||||
struct tso_t tso;
|
||||
unsigned int index = 0;
|
||||
int ret;
|
||||
@@ -913,7 +915,34 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,
|
||||
return 0;
|
||||
|
||||
err_release:
|
||||
/* TODO: Release all used data descriptors for TSO */
|
||||
/* Release all used data descriptors for TSO */
|
||||
tmp_bdp = txq->bd.cur;
|
||||
|
||||
while (tmp_bdp != bdp) {
|
||||
/* Unmap data buffers */
|
||||
if (tmp_bdp->cbd_bufaddr &&
|
||||
!IS_TSO_HEADER(txq, fec32_to_cpu(tmp_bdp->cbd_bufaddr)))
|
||||
dma_unmap_single(&fep->pdev->dev,
|
||||
fec32_to_cpu(tmp_bdp->cbd_bufaddr),
|
||||
fec16_to_cpu(tmp_bdp->cbd_datlen),
|
||||
DMA_TO_DEVICE);
|
||||
|
||||
/* Clear standard buffer descriptor fields */
|
||||
tmp_bdp->cbd_sc = 0;
|
||||
tmp_bdp->cbd_datlen = 0;
|
||||
tmp_bdp->cbd_bufaddr = 0;
|
||||
|
||||
/* Handle extended descriptor if enabled */
|
||||
if (fep->bufdesc_ex) {
|
||||
ebdp = (struct bufdesc_ex *)tmp_bdp;
|
||||
ebdp->cbd_esc = 0;
|
||||
}
|
||||
|
||||
tmp_bdp = fec_enet_get_nextdesc(tmp_bdp, &txq->bd);
|
||||
}
|
||||
|
||||
dev_kfree_skb_any(skb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,21 @@ EXPORT_SYMBOL(hnae3_unregister_ae_algo_prepare);
|
||||
*/
|
||||
static DEFINE_MUTEX(hnae3_common_lock);
|
||||
|
||||
/* ensure the drivers being unloaded one by one */
|
||||
static DEFINE_MUTEX(hnae3_unload_lock);
|
||||
|
||||
void hnae3_acquire_unload_lock(void)
|
||||
{
|
||||
mutex_lock(&hnae3_unload_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(hnae3_acquire_unload_lock);
|
||||
|
||||
void hnae3_release_unload_lock(void)
|
||||
{
|
||||
mutex_unlock(&hnae3_unload_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(hnae3_release_unload_lock);
|
||||
|
||||
static bool hnae3_client_match(enum hnae3_client_type client_type)
|
||||
{
|
||||
if (client_type == HNAE3_CLIENT_KNIC ||
|
||||
|
||||
@@ -963,4 +963,6 @@ int hnae3_register_client(struct hnae3_client *client);
|
||||
void hnae3_set_client_init_flag(struct hnae3_client *client,
|
||||
struct hnae3_ae_dev *ae_dev,
|
||||
unsigned int inited);
|
||||
void hnae3_acquire_unload_lock(void);
|
||||
void hnae3_release_unload_lock(void);
|
||||
#endif
|
||||
|
||||
@@ -6002,9 +6002,11 @@ module_init(hns3_init_module);
|
||||
*/
|
||||
static void __exit hns3_exit_module(void)
|
||||
{
|
||||
hnae3_acquire_unload_lock();
|
||||
pci_unregister_driver(&hns3_driver);
|
||||
hnae3_unregister_client(&client);
|
||||
hns3_dbg_unregister_debugfs();
|
||||
hnae3_release_unload_lock();
|
||||
}
|
||||
module_exit(hns3_exit_module);
|
||||
|
||||
|
||||
@@ -12919,9 +12919,11 @@ static int __init hclge_init(void)
|
||||
|
||||
static void __exit hclge_exit(void)
|
||||
{
|
||||
hnae3_acquire_unload_lock();
|
||||
hnae3_unregister_ae_algo_prepare(&ae_algo);
|
||||
hnae3_unregister_ae_algo(&ae_algo);
|
||||
destroy_workqueue(hclge_wq);
|
||||
hnae3_release_unload_lock();
|
||||
}
|
||||
module_init(hclge_init);
|
||||
module_exit(hclge_exit);
|
||||
|
||||
@@ -3410,8 +3410,10 @@ static int __init hclgevf_init(void)
|
||||
|
||||
static void __exit hclgevf_exit(void)
|
||||
{
|
||||
hnae3_acquire_unload_lock();
|
||||
hnae3_unregister_ae_algo(&ae_algovf);
|
||||
destroy_workqueue(hclgevf_wq);
|
||||
hnae3_release_unload_lock();
|
||||
}
|
||||
module_init(hclgevf_init);
|
||||
module_exit(hclgevf_exit);
|
||||
|
||||
@@ -773,6 +773,11 @@ iavf_vlan_filter *iavf_add_vlan(struct iavf_adapter *adapter,
|
||||
f->state = IAVF_VLAN_ADD;
|
||||
adapter->num_vlan_filters++;
|
||||
iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_ADD_VLAN_FILTER);
|
||||
} else if (f->state == IAVF_VLAN_REMOVE) {
|
||||
/* IAVF_VLAN_REMOVE means that VLAN wasn't yet removed.
|
||||
* We can safely only change the state here.
|
||||
*/
|
||||
f->state = IAVF_VLAN_ACTIVE;
|
||||
}
|
||||
|
||||
clearout:
|
||||
@@ -793,8 +798,18 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, struct iavf_vlan vlan)
|
||||
|
||||
f = iavf_find_vlan(adapter, vlan);
|
||||
if (f) {
|
||||
f->state = IAVF_VLAN_REMOVE;
|
||||
iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_DEL_VLAN_FILTER);
|
||||
/* IAVF_ADD_VLAN means that VLAN wasn't even added yet.
|
||||
* Remove it from the list.
|
||||
*/
|
||||
if (f->state == IAVF_VLAN_ADD) {
|
||||
list_del(&f->list);
|
||||
kfree(f);
|
||||
adapter->num_vlan_filters--;
|
||||
} else {
|
||||
f->state = IAVF_VLAN_REMOVE;
|
||||
iavf_schedule_aq_request(adapter,
|
||||
IAVF_FLAG_AQ_DEL_VLAN_FILTER);
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_bh(&adapter->mac_vlan_list_lock);
|
||||
|
||||
@@ -1498,7 +1498,6 @@ struct ice_aqc_dnl_equa_param {
|
||||
#define ICE_AQC_RX_EQU_POST1 (0x12 << ICE_AQC_RX_EQU_SHIFT)
|
||||
#define ICE_AQC_RX_EQU_BFLF (0x13 << ICE_AQC_RX_EQU_SHIFT)
|
||||
#define ICE_AQC_RX_EQU_BFHF (0x14 << ICE_AQC_RX_EQU_SHIFT)
|
||||
#define ICE_AQC_RX_EQU_DRATE (0x15 << ICE_AQC_RX_EQU_SHIFT)
|
||||
#define ICE_AQC_RX_EQU_CTLE_GAINHF (0x20 << ICE_AQC_RX_EQU_SHIFT)
|
||||
#define ICE_AQC_RX_EQU_CTLE_GAINLF (0x21 << ICE_AQC_RX_EQU_SHIFT)
|
||||
#define ICE_AQC_RX_EQU_CTLE_GAINDC (0x22 << ICE_AQC_RX_EQU_SHIFT)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user