Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'net-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
"Happy May Day.

Things have calmed down on our end (knock on wood), no outstanding
investigations. Including fixes from Bluetooth and WiFi.

Current release - fix to a fix:

- igc: fix lock order in igc_ptp_reset

Current release - new code bugs:

- Revert "wifi: iwlwifi: make no_160 more generic", fixes regression
to Killer line of devices reported by a number of people

- Revert "wifi: iwlwifi: add support for BE213", initial FW is too
buggy

- number of fixes for mld, the new Intel WiFi subdriver

Previous releases - regressions:

- wifi: mac80211: restore monitor for outgoing frames

- drv: vmxnet3: fix malformed packet sizing in vmxnet3_process_xdp

- eth: bnxt_en: fix timestamping FIFO getting out of sync on reset,
delivering stale timestamps

- use sock_gen_put() in the TCP fraglist GRO heuristic, don't assume
every socket is a full socket

Previous releases - always broken:

- sched: adapt qdiscs for reentrant enqueue cases, fix list
corruptions

- xsk: fix race condition in AF_XDP generic RX path, shared UMEM
can't be protected by a per-socket lock

- eth: mtk-star-emac: fix spinlock recursion issues on rx/tx poll

- btusb: avoid NULL pointer dereference in skb_dequeue()

- dsa: felix: fix broken taprio gate states after clock jump"

* tag 'net-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits)
net: vertexcom: mse102x: Fix RX error handling
net: vertexcom: mse102x: Add range check for CMD_RTS
net: vertexcom: mse102x: Fix LEN_MASK
net: vertexcom: mse102x: Fix possible stuck of SPI interrupt
net: hns3: defer calling ptp_clock_register()
net: hns3: fixed debugfs tm_qset size
net: hns3: fix an interrupt residual problem
net: hns3: store rx VLAN tag offload state for VF
octeon_ep: Fix host hang issue during device reboot
net: fec: ERR007885 Workaround for conventional TX
net: lan743x: Fix memleak issue when GSO enabled
ptp: ocp: Fix NULL dereference in Adva board SMA sysfs operations
net: use sock_gen_put() when sk_state is TCP_TIME_WAIT
bnxt_en: fix module unload sequence
bnxt_en: Fix ethtool -d byte order for 32-bit values
bnxt_en: Fix out-of-bound memcpy() during ethtool -w
bnxt_en: Fix coredump logic to free allocated buffer
bnxt_en: delay pci_alloc_irq_vectors() in the AER path
bnxt_en: call pci_alloc_irq_vectors() after bnxt_reserve_rings()
bnxt_en: Add missing skb_mark_for_recycle() in bnxt_rx_vlan()
...

+1785 -737
+3 -1
Documentation/netlink/specs/ethtool.yaml
··· 89 89 doc: Group of short_detected states 90 90 - 91 91 name: phy-upstream-type 92 - enum-name: 92 + enum-name: phy-upstream 93 + header: linux/ethtool.h 93 94 type: enum 95 + name-prefix: phy-upstream 94 96 entries: [ mac, phy ] 95 97 - 96 98 name: tcp-data-split
+31 -26
drivers/bluetooth/btintel_pcie.c
··· 957 957 /* This is a debug event that comes from IML and OP image when it 958 958 * starts execution. There is no need pass this event to stack. 959 959 */ 960 - if (skb->data[2] == 0x97) 960 + if (skb->data[2] == 0x97) { 961 + hci_recv_diag(hdev, skb); 961 962 return 0; 963 + } 962 964 } 963 965 964 966 return hci_recv_frame(hdev, skb); ··· 976 974 u8 pkt_type; 977 975 u16 plen; 978 976 u32 pcie_pkt_type; 979 - struct sk_buff *new_skb; 980 977 void *pdata; 981 978 struct hci_dev *hdev = data->hdev; 982 979 ··· 1052 1051 1053 1052 bt_dev_dbg(hdev, "pkt_type: 0x%2.2x len: %u", pkt_type, plen); 1054 1053 1055 - new_skb = bt_skb_alloc(plen, GFP_ATOMIC); 1056 - if (!new_skb) { 1057 - bt_dev_err(hdev, "Failed to allocate memory for skb of len: %u", 1058 - skb->len); 1059 - ret = -ENOMEM; 1060 - goto exit_error; 1061 - } 1062 - 1063 - hci_skb_pkt_type(new_skb) = pkt_type; 1064 - skb_put_data(new_skb, skb->data, plen); 1054 + hci_skb_pkt_type(skb) = pkt_type; 1065 1055 hdev->stat.byte_rx += plen; 1056 + skb_trim(skb, plen); 1066 1057 1067 1058 if (pcie_pkt_type == BTINTEL_PCIE_HCI_EVT_PKT) 1068 - ret = btintel_pcie_recv_event(hdev, new_skb); 1059 + ret = btintel_pcie_recv_event(hdev, skb); 1069 1060 else 1070 - ret = hci_recv_frame(hdev, new_skb); 1061 + ret = hci_recv_frame(hdev, skb); 1062 + skb = NULL; /* skb is freed in the callee */ 1071 1063 1072 1064 exit_error: 1065 + if (skb) 1066 + kfree_skb(skb); 1067 + 1073 1068 if (ret) 1074 1069 hdev->stat.err_rx++; 1075 1070 ··· 1199 1202 struct btintel_pcie_data *data = container_of(work, 1200 1203 struct btintel_pcie_data, rx_work); 1201 1204 struct sk_buff *skb; 1202 - int err; 1203 - struct hci_dev *hdev = data->hdev; 1204 1205 1205 1206 if (test_bit(BTINTEL_PCIE_HWEXP_INPROGRESS, &data->flags)) { 1206 1207 /* Unlike usb products, controller will not send hardware ··· 1219 1224 1220 1225 /* Process the sk_buf in queue and send to the HCI layer */ 1221 1226 while ((skb = skb_dequeue(&data->rx_skb_q))) { 1222 - err = btintel_pcie_recv_frame(data, skb); 1223 - if (err) 1224 - bt_dev_err(hdev, "Failed to send received frame: %d", 1225 - err); 1226 - kfree_skb(skb); 1227 + btintel_pcie_recv_frame(data, skb); 1227 1228 } 1228 1229 } 1229 1230 ··· 1272 1281 bt_dev_dbg(hdev, "RXQ: cr_hia: %u cr_tia: %u", cr_hia, cr_tia); 1273 1282 1274 1283 /* Check CR_TIA and CR_HIA for change */ 1275 - if (cr_tia == cr_hia) { 1276 - bt_dev_warn(hdev, "RXQ: no new CD found"); 1284 + if (cr_tia == cr_hia) 1277 1285 return; 1278 - } 1279 1286 1280 1287 rxq = &data->rxq; 1281 1288 ··· 1309 1320 return IRQ_WAKE_THREAD; 1310 1321 } 1311 1322 1323 + static inline bool btintel_pcie_is_rxq_empty(struct btintel_pcie_data *data) 1324 + { 1325 + return data->ia.cr_hia[BTINTEL_PCIE_RXQ_NUM] == data->ia.cr_tia[BTINTEL_PCIE_RXQ_NUM]; 1326 + } 1327 + 1328 + static inline bool btintel_pcie_is_txackq_empty(struct btintel_pcie_data *data) 1329 + { 1330 + return data->ia.cr_tia[BTINTEL_PCIE_TXQ_NUM] == data->ia.cr_hia[BTINTEL_PCIE_TXQ_NUM]; 1331 + } 1332 + 1312 1333 static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id) 1313 1334 { 1314 1335 struct msix_entry *entry = dev_id; ··· 1350 1351 btintel_pcie_msix_gp0_handler(data); 1351 1352 1352 1353 /* For TX */ 1353 - if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_0) 1354 + if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_0) { 1354 1355 btintel_pcie_msix_tx_handle(data); 1356 + if (!btintel_pcie_is_rxq_empty(data)) 1357 + btintel_pcie_msix_rx_handle(data); 1358 + } 1355 1359 1356 1360 /* For RX */ 1357 - if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_1) 1361 + if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_1) { 1358 1362 btintel_pcie_msix_rx_handle(data); 1363 + if (!btintel_pcie_is_txackq_empty(data)) 1364 + btintel_pcie_msix_tx_handle(data); 1365 + } 1359 1366 1360 1367 /* 1361 1368 * Before sending the interrupt the HW disables it to prevent a nested
+10 -2
drivers/bluetooth/btmtksdio.c
··· 723 723 { 724 724 struct btmtksdio_dev *bdev = hci_get_drvdata(hdev); 725 725 726 + /* Skip btmtksdio_close if BTMTKSDIO_FUNC_ENABLED isn't set */ 727 + if (!test_bit(BTMTKSDIO_FUNC_ENABLED, &bdev->tx_state)) 728 + return 0; 729 + 726 730 sdio_claim_host(bdev->func); 727 731 728 732 /* Disable interrupt */ ··· 1447 1443 if (!bdev) 1448 1444 return; 1449 1445 1446 + hdev = bdev->hdev; 1447 + 1448 + /* Make sure to call btmtksdio_close before removing sdio card */ 1449 + if (test_bit(BTMTKSDIO_FUNC_ENABLED, &bdev->tx_state)) 1450 + btmtksdio_close(hdev); 1451 + 1450 1452 /* Be consistent the state in btmtksdio_probe */ 1451 1453 pm_runtime_get_noresume(bdev->dev); 1452 - 1453 - hdev = bdev->hdev; 1454 1454 1455 1455 sdio_set_drvdata(func, NULL); 1456 1456 hci_unregister_dev(hdev);
+73 -28
drivers/bluetooth/btusb.c
··· 3010 3010 bt_dev_err(hdev, "%s: triggle crash failed (%d)", __func__, err); 3011 3011 } 3012 3012 3013 - /* 3014 - * ==0: not a dump pkt. 3015 - * < 0: fails to handle a dump pkt 3016 - * > 0: otherwise. 3017 - */ 3013 + /* Return: 0 on success, negative errno on failure. */ 3018 3014 static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb) 3019 3015 { 3020 - int ret = 1; 3016 + int ret = 0; 3021 3017 u8 pkt_type; 3022 3018 u8 *sk_ptr; 3023 3019 unsigned int sk_len; 3024 3020 u16 seqno; 3025 3021 u32 dump_size; 3026 3022 3027 - struct hci_event_hdr *event_hdr; 3028 - struct hci_acl_hdr *acl_hdr; 3029 3023 struct qca_dump_hdr *dump_hdr; 3030 3024 struct btusb_data *btdata = hci_get_drvdata(hdev); 3031 3025 struct usb_device *udev = btdata->udev; ··· 3029 3035 sk_len = skb->len; 3030 3036 3031 3037 if (pkt_type == HCI_ACLDATA_PKT) { 3032 - acl_hdr = hci_acl_hdr(skb); 3033 - if (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE) 3034 - return 0; 3035 3038 sk_ptr += HCI_ACL_HDR_SIZE; 3036 3039 sk_len -= HCI_ACL_HDR_SIZE; 3037 - event_hdr = (struct hci_event_hdr *)sk_ptr; 3038 - } else { 3039 - event_hdr = hci_event_hdr(skb); 3040 3040 } 3041 - 3042 - if ((event_hdr->evt != HCI_VENDOR_PKT) 3043 - || (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE))) 3044 - return 0; 3045 3041 3046 3042 sk_ptr += HCI_EVENT_HDR_SIZE; 3047 3043 sk_len -= HCI_EVENT_HDR_SIZE; 3048 3044 3049 3045 dump_hdr = (struct qca_dump_hdr *)sk_ptr; 3050 - if ((sk_len < offsetof(struct qca_dump_hdr, data)) 3051 - || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) 3052 - || (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE)) 3053 - return 0; 3054 - 3055 - /*it is dump pkt now*/ 3056 3046 seqno = le16_to_cpu(dump_hdr->seqno); 3057 3047 if (seqno == 0) { 3058 3048 set_bit(BTUSB_HW_SSR_ACTIVE, &btdata->flags); ··· 3110 3132 return ret; 3111 3133 } 3112 3134 3135 + /* Return: true if the ACL packet is a dump packet, false otherwise. */ 3136 + static bool acl_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb) 3137 + { 3138 + u8 *sk_ptr; 3139 + unsigned int sk_len; 3140 + 3141 + struct hci_event_hdr *event_hdr; 3142 + struct hci_acl_hdr *acl_hdr; 3143 + struct qca_dump_hdr *dump_hdr; 3144 + 3145 + sk_ptr = skb->data; 3146 + sk_len = skb->len; 3147 + 3148 + acl_hdr = hci_acl_hdr(skb); 3149 + if (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE) 3150 + return false; 3151 + 3152 + sk_ptr += HCI_ACL_HDR_SIZE; 3153 + sk_len -= HCI_ACL_HDR_SIZE; 3154 + event_hdr = (struct hci_event_hdr *)sk_ptr; 3155 + 3156 + if ((event_hdr->evt != HCI_VENDOR_PKT) || 3157 + (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE))) 3158 + return false; 3159 + 3160 + sk_ptr += HCI_EVENT_HDR_SIZE; 3161 + sk_len -= HCI_EVENT_HDR_SIZE; 3162 + 3163 + dump_hdr = (struct qca_dump_hdr *)sk_ptr; 3164 + if ((sk_len < offsetof(struct qca_dump_hdr, data)) || 3165 + (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) || 3166 + (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE)) 3167 + return false; 3168 + 3169 + return true; 3170 + } 3171 + 3172 + /* Return: true if the event packet is a dump packet, false otherwise. */ 3173 + static bool evt_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb) 3174 + { 3175 + u8 *sk_ptr; 3176 + unsigned int sk_len; 3177 + 3178 + struct hci_event_hdr *event_hdr; 3179 + struct qca_dump_hdr *dump_hdr; 3180 + 3181 + sk_ptr = skb->data; 3182 + sk_len = skb->len; 3183 + 3184 + event_hdr = hci_event_hdr(skb); 3185 + 3186 + if ((event_hdr->evt != HCI_VENDOR_PKT) 3187 + || (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE))) 3188 + return false; 3189 + 3190 + sk_ptr += HCI_EVENT_HDR_SIZE; 3191 + sk_len -= HCI_EVENT_HDR_SIZE; 3192 + 3193 + dump_hdr = (struct qca_dump_hdr *)sk_ptr; 3194 + if ((sk_len < offsetof(struct qca_dump_hdr, data)) || 3195 + (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) || 3196 + (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE)) 3197 + return false; 3198 + 3199 + return true; 3200 + } 3201 + 3113 3202 static int btusb_recv_acl_qca(struct hci_dev *hdev, struct sk_buff *skb) 3114 3203 { 3115 - if (handle_dump_pkt_qca(hdev, skb)) 3116 - return 0; 3204 + if (acl_pkt_is_dump_qca(hdev, skb)) 3205 + return handle_dump_pkt_qca(hdev, skb); 3117 3206 return hci_recv_frame(hdev, skb); 3118 3207 } 3119 3208 3120 3209 static int btusb_recv_evt_qca(struct hci_dev *hdev, struct sk_buff *skb) 3121 3210 { 3122 - if (handle_dump_pkt_qca(hdev, skb)) 3123 - return 0; 3211 + if (evt_pkt_is_dump_qca(hdev, skb)) 3212 + return handle_dump_pkt_qca(hdev, skb); 3124 3213 return hci_recv_frame(hdev, skb); 3125 3214 } 3126 3215
+4 -1
drivers/net/dsa/ocelot/felix_vsc9959.c
··· 1543 1543 struct tc_taprio_qopt_offload *taprio; 1544 1544 struct ocelot_port *ocelot_port; 1545 1545 struct timespec64 base_ts; 1546 - int port; 1546 + int i, port; 1547 1547 u32 val; 1548 1548 1549 1549 mutex_lock(&ocelot->fwd_domain_lock); ··· 1574 1574 QSYS_PARAM_CFG_REG_3_BASE_TIME_SEC_MSB(val), 1575 1575 QSYS_PARAM_CFG_REG_3_BASE_TIME_SEC_MSB_M, 1576 1576 QSYS_PARAM_CFG_REG_3); 1577 + 1578 + for (i = 0; i < taprio->num_entries; i++) 1579 + vsc9959_tas_gcl_set(ocelot, i, &taprio->entries[i]); 1577 1580 1578 1581 ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_CONFIG_CHANGE, 1579 1582 QSYS_TAS_PARAM_CFG_CTRL_CONFIG_CHANGE,
-1
drivers/net/ethernet/amd/pds_core/auxbus.c
··· 186 186 pds_client_unregister(pf, padev->client_id); 187 187 auxiliary_device_delete(&padev->aux_dev); 188 188 auxiliary_device_uninit(&padev->aux_dev); 189 - padev->client_id = 0; 190 189 *pd_ptr = NULL; 191 190 192 191 mutex_unlock(&pf->config_lock);
+7 -2
drivers/net/ethernet/amd/xgbe/xgbe-desc.c
··· 373 373 } 374 374 375 375 /* Set up the header page info */ 376 - xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa, 377 - XGBE_SKB_ALLOC_SIZE); 376 + if (pdata->netdev->features & NETIF_F_RXCSUM) { 377 + xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa, 378 + XGBE_SKB_ALLOC_SIZE); 379 + } else { 380 + xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa, 381 + pdata->rx_buf_size); 382 + } 378 383 379 384 /* Set up the buffer page info */ 380 385 xgbe_set_buffer_data(&rdata->rx.buf, &ring->rx_buf_pa,
+22 -2
drivers/net/ethernet/amd/xgbe/xgbe-dev.c
··· 320 320 XGMAC_IOWRITE_BITS(pdata, MAC_RCR, HDSMS, XGBE_SPH_HDSMS_SIZE); 321 321 } 322 322 323 + static void xgbe_disable_sph_mode(struct xgbe_prv_data *pdata) 324 + { 325 + unsigned int i; 326 + 327 + for (i = 0; i < pdata->channel_count; i++) { 328 + if (!pdata->channel[i]->rx_ring) 329 + break; 330 + 331 + XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_CR, SPH, 0); 332 + } 333 + } 334 + 323 335 static int xgbe_write_rss_reg(struct xgbe_prv_data *pdata, unsigned int type, 324 336 unsigned int index, unsigned int val) 325 337 { ··· 3557 3545 xgbe_config_tx_coalesce(pdata); 3558 3546 xgbe_config_rx_buffer_size(pdata); 3559 3547 xgbe_config_tso_mode(pdata); 3560 - xgbe_config_sph_mode(pdata); 3561 - xgbe_config_rss(pdata); 3548 + 3549 + if (pdata->netdev->features & NETIF_F_RXCSUM) { 3550 + xgbe_config_sph_mode(pdata); 3551 + xgbe_config_rss(pdata); 3552 + } 3553 + 3562 3554 desc_if->wrapper_tx_desc_init(pdata); 3563 3555 desc_if->wrapper_rx_desc_init(pdata); 3564 3556 xgbe_enable_dma_interrupts(pdata); ··· 3717 3701 hw_if->enable_vxlan = xgbe_enable_vxlan; 3718 3702 hw_if->disable_vxlan = xgbe_disable_vxlan; 3719 3703 hw_if->set_vxlan_id = xgbe_set_vxlan_id; 3704 + 3705 + /* For Split Header*/ 3706 + hw_if->enable_sph = xgbe_config_sph_mode; 3707 + hw_if->disable_sph = xgbe_disable_sph_mode; 3720 3708 3721 3709 DBGPR("<--xgbe_init_function_ptrs\n"); 3722 3710 }
+9 -2
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
··· 2257 2257 if (ret) 2258 2258 return ret; 2259 2259 2260 - if ((features & NETIF_F_RXCSUM) && !rxcsum) 2260 + if ((features & NETIF_F_RXCSUM) && !rxcsum) { 2261 + hw_if->enable_sph(pdata); 2262 + hw_if->enable_vxlan(pdata); 2261 2263 hw_if->enable_rx_csum(pdata); 2262 - else if (!(features & NETIF_F_RXCSUM) && rxcsum) 2264 + schedule_work(&pdata->restart_work); 2265 + } else if (!(features & NETIF_F_RXCSUM) && rxcsum) { 2266 + hw_if->disable_sph(pdata); 2267 + hw_if->disable_vxlan(pdata); 2263 2268 hw_if->disable_rx_csum(pdata); 2269 + schedule_work(&pdata->restart_work); 2270 + } 2264 2271 2265 2272 if ((features & NETIF_F_HW_VLAN_CTAG_RX) && !rxvlan) 2266 2273 hw_if->enable_rx_vlan_stripping(pdata);
+4
drivers/net/ethernet/amd/xgbe/xgbe.h
··· 865 865 void (*enable_vxlan)(struct xgbe_prv_data *); 866 866 void (*disable_vxlan)(struct xgbe_prv_data *); 867 867 void (*set_vxlan_id)(struct xgbe_prv_data *); 868 + 869 + /* For Split Header */ 870 + void (*enable_sph)(struct xgbe_prv_data *pdata); 871 + void (*disable_sph)(struct xgbe_prv_data *pdata); 868 872 }; 869 873 870 874 /* This structure represents implementation specific routines for an
+20 -15
drivers/net/ethernet/broadcom/bnxt/bnxt.c
··· 2015 2015 } 2016 2016 return skb; 2017 2017 vlan_err: 2018 + skb_mark_for_recycle(skb); 2018 2019 dev_kfree_skb(skb); 2019 2020 return NULL; 2020 2021 } ··· 3415 3414 3416 3415 bnxt_free_one_tx_ring_skbs(bp, txr, i); 3417 3416 } 3417 + 3418 + if (bp->ptp_cfg && !(bp->fw_cap & BNXT_FW_CAP_TX_TS_CMP)) 3419 + bnxt_ptp_free_txts_skbs(bp->ptp_cfg); 3418 3420 } 3419 3421 3420 3422 static void bnxt_free_one_rx_ring(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) ··· 11603 11599 poll_fn = bnxt_poll_p5; 11604 11600 else if (BNXT_CHIP_TYPE_NITRO_A0(bp)) 11605 11601 cp_nr_rings--; 11602 + 11603 + set_bit(BNXT_STATE_NAPI_DISABLED, &bp->state); 11604 + 11606 11605 for (i = 0; i < cp_nr_rings; i++) { 11607 11606 bnapi = bp->bnapi[i]; 11608 11607 netif_napi_add_config_locked(bp->dev, &bnapi->napi, poll_fn, ··· 12325 12318 { 12326 12319 struct hwrm_func_drv_if_change_output *resp; 12327 12320 struct hwrm_func_drv_if_change_input *req; 12328 - bool fw_reset = !bp->irq_tbl; 12329 12321 bool resc_reinit = false; 12330 12322 bool caps_change = false; 12331 12323 int rc, retry = 0; 12324 + bool fw_reset; 12332 12325 u32 flags = 0; 12326 + 12327 + fw_reset = (bp->fw_reset_state == BNXT_FW_RESET_STATE_ABORT); 12328 + bp->fw_reset_state = 0; 12333 12329 12334 12330 if (!(bp->fw_cap & BNXT_FW_CAP_IF_CHANGE)) 12335 12331 return 0; ··· 12402 12392 set_bit(BNXT_STATE_ABORT_ERR, &bp->state); 12403 12393 return rc; 12404 12394 } 12395 + /* IRQ will be initialized later in bnxt_request_irq()*/ 12405 12396 bnxt_clear_int_mode(bp); 12406 - rc = bnxt_init_int_mode(bp); 12407 - if (rc) { 12408 - clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state); 12409 - netdev_err(bp->dev, "init int mode failed\n"); 12410 - return rc; 12411 - } 12412 12397 } 12413 12398 rc = bnxt_cancel_reservations(bp, fw_reset); 12414 12399 } ··· 12802 12797 /* VF-reps may need to be re-opened after the PF is re-opened */ 12803 12798 if (BNXT_PF(bp)) 12804 12799 bnxt_vf_reps_open(bp); 12805 - if (bp->ptp_cfg && !(bp->fw_cap & BNXT_FW_CAP_TX_TS_CMP)) 12806 - WRITE_ONCE(bp->ptp_cfg->tx_avail, BNXT_MAX_TX_TS); 12807 12800 bnxt_ptp_init_rtc(bp, true); 12808 12801 bnxt_ptp_cfg_tstamp_filters(bp); 12809 12802 if (BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) ··· 14836 14833 clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); 14837 14834 if (bp->fw_reset_state != BNXT_FW_RESET_STATE_POLL_VF) 14838 14835 bnxt_dl_health_fw_status_update(bp, false); 14839 - bp->fw_reset_state = 0; 14836 + bp->fw_reset_state = BNXT_FW_RESET_STATE_ABORT; 14840 14837 netif_close(bp->dev); 14841 14838 } 14842 14839 ··· 16006 16003 16007 16004 bnxt_rdma_aux_device_del(bp); 16008 16005 16009 - bnxt_ptp_clear(bp); 16010 16006 unregister_netdev(dev); 16007 + bnxt_ptp_clear(bp); 16011 16008 16012 16009 bnxt_rdma_aux_device_uninit(bp); 16013 16010 ··· 16934 16931 if (!err) 16935 16932 result = PCI_ERS_RESULT_RECOVERED; 16936 16933 16934 + /* IRQ will be initialized later in bnxt_io_resume */ 16937 16935 bnxt_ulp_irq_stop(bp); 16938 16936 bnxt_clear_int_mode(bp); 16939 - err = bnxt_init_int_mode(bp); 16940 - bnxt_ulp_irq_restart(bp, err); 16941 16937 } 16942 16938 16943 16939 reset_exit: ··· 16965 16963 16966 16964 err = bnxt_hwrm_func_qcaps(bp); 16967 16965 if (!err) { 16968 - if (netif_running(netdev)) 16966 + if (netif_running(netdev)) { 16969 16967 err = bnxt_open(netdev); 16970 - else 16968 + } else { 16971 16969 err = bnxt_reserve_rings(bp, true); 16970 + if (!err) 16971 + err = bnxt_init_int_mode(bp); 16972 + } 16972 16973 } 16973 16974 16974 16975 if (!err)
+1
drivers/net/ethernet/broadcom/bnxt/bnxt.h
··· 2614 2614 #define BNXT_FW_RESET_STATE_POLL_FW 4 2615 2615 #define BNXT_FW_RESET_STATE_OPENING 5 2616 2616 #define BNXT_FW_RESET_STATE_POLL_FW_DOWN 6 2617 + #define BNXT_FW_RESET_STATE_ABORT 7 2617 2618 2618 2619 u16 fw_reset_min_dsecs; 2619 2620 #define BNXT_DFLT_FW_RST_MIN_DSECS 20
+20 -10
drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c
··· 110 110 } 111 111 } 112 112 113 - if (info->dest_buf) { 114 - if ((info->seg_start + off + len) <= 115 - BNXT_COREDUMP_BUF_LEN(info->buf_len)) { 116 - memcpy(info->dest_buf + off, dma_buf, len); 117 - } else { 118 - rc = -ENOBUFS; 119 - break; 120 - } 121 - } 122 - 123 113 if (cmn_req->req_type == 124 114 cpu_to_le16(HWRM_DBG_COREDUMP_RETRIEVE)) 125 115 info->dest_buf_size += len; 116 + 117 + if (info->dest_buf) { 118 + if ((info->seg_start + off + len) <= 119 + BNXT_COREDUMP_BUF_LEN(info->buf_len)) { 120 + u16 copylen = min_t(u16, len, 121 + info->dest_buf_size - off); 122 + 123 + memcpy(info->dest_buf + off, dma_buf, copylen); 124 + if (copylen < len) 125 + break; 126 + } else { 127 + rc = -ENOBUFS; 128 + if (cmn_req->req_type == 129 + cpu_to_le16(HWRM_DBG_COREDUMP_LIST)) { 130 + kfree(info->dest_buf); 131 + info->dest_buf = NULL; 132 + } 133 + break; 134 + } 135 + } 126 136 127 137 if (!(cmn_resp->flags & HWRM_DBG_CMN_FLAGS_MORE)) 128 138 break;
+32 -6
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
··· 2062 2062 return reg_len; 2063 2063 } 2064 2064 2065 + #define BNXT_PCIE_32B_ENTRY(start, end) \ 2066 + { offsetof(struct pcie_ctx_hw_stats, start), \ 2067 + offsetof(struct pcie_ctx_hw_stats, end) } 2068 + 2069 + static const struct { 2070 + u16 start; 2071 + u16 end; 2072 + } bnxt_pcie_32b_entries[] = { 2073 + BNXT_PCIE_32B_ENTRY(pcie_ltssm_histogram[0], pcie_ltssm_histogram[3]), 2074 + }; 2075 + 2065 2076 static void bnxt_get_regs(struct net_device *dev, struct ethtool_regs *regs, 2066 2077 void *_p) 2067 2078 { ··· 2105 2094 req->pcie_stat_host_addr = cpu_to_le64(hw_pcie_stats_addr); 2106 2095 rc = hwrm_req_send(bp, req); 2107 2096 if (!rc) { 2108 - __le64 *src = (__le64 *)hw_pcie_stats; 2109 - u64 *dst = (u64 *)(_p + BNXT_PXP_REG_LEN); 2110 - int i; 2097 + u8 *dst = (u8 *)(_p + BNXT_PXP_REG_LEN); 2098 + u8 *src = (u8 *)hw_pcie_stats; 2099 + int i, j; 2111 2100 2112 - for (i = 0; i < sizeof(*hw_pcie_stats) / sizeof(__le64); i++) 2113 - dst[i] = le64_to_cpu(src[i]); 2101 + for (i = 0, j = 0; i < sizeof(*hw_pcie_stats); ) { 2102 + if (i >= bnxt_pcie_32b_entries[j].start && 2103 + i <= bnxt_pcie_32b_entries[j].end) { 2104 + u32 *dst32 = (u32 *)(dst + i); 2105 + 2106 + *dst32 = le32_to_cpu(*(__le32 *)(src + i)); 2107 + i += 4; 2108 + if (i > bnxt_pcie_32b_entries[j].end && 2109 + j < ARRAY_SIZE(bnxt_pcie_32b_entries) - 1) 2110 + j++; 2111 + } else { 2112 + u64 *dst64 = (u64 *)(dst + i); 2113 + 2114 + *dst64 = le64_to_cpu(*(__le64 *)(src + i)); 2115 + i += 8; 2116 + } 2117 + } 2114 2118 } 2115 2119 hwrm_req_drop(bp, req); 2116 2120 } ··· 5017 4991 if (!bp->num_tests || !BNXT_PF(bp)) 5018 4992 return; 5019 4993 4994 + memset(buf, 0, sizeof(u64) * bp->num_tests); 5020 4995 if (etest->flags & ETH_TEST_FL_OFFLINE && 5021 4996 bnxt_ulp_registered(bp->edev)) { 5022 4997 etest->flags |= ETH_TEST_FL_FAILED; ··· 5025 4998 return; 5026 4999 } 5027 5000 5028 - memset(buf, 0, sizeof(u64) * bp->num_tests); 5029 5001 if (!netif_running(dev)) { 5030 5002 etest->flags |= ETH_TEST_FL_FAILED; 5031 5003 return;
+21 -8
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
··· 794 794 return HZ; 795 795 } 796 796 797 + void bnxt_ptp_free_txts_skbs(struct bnxt_ptp_cfg *ptp) 798 + { 799 + struct bnxt_ptp_tx_req *txts_req; 800 + u16 cons = ptp->txts_cons; 801 + 802 + /* make sure ptp aux worker finished with 803 + * possible BNXT_STATE_OPEN set 804 + */ 805 + ptp_cancel_worker_sync(ptp->ptp_clock); 806 + 807 + ptp->tx_avail = BNXT_MAX_TX_TS; 808 + while (cons != ptp->txts_prod) { 809 + txts_req = &ptp->txts_req[cons]; 810 + if (!IS_ERR_OR_NULL(txts_req->tx_skb)) 811 + dev_kfree_skb_any(txts_req->tx_skb); 812 + cons = NEXT_TXTS(cons); 813 + } 814 + ptp->txts_cons = cons; 815 + ptp_schedule_worker(ptp->ptp_clock, 0); 816 + } 817 + 797 818 int bnxt_ptp_get_txts_prod(struct bnxt_ptp_cfg *ptp, u16 *prod) 798 819 { 799 820 spin_lock_bh(&ptp->ptp_tx_lock); ··· 1126 1105 void bnxt_ptp_clear(struct bnxt *bp) 1127 1106 { 1128 1107 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; 1129 - int i; 1130 1108 1131 1109 if (!ptp) 1132 1110 return; ··· 1136 1116 ptp->ptp_clock = NULL; 1137 1117 kfree(ptp->ptp_info.pin_config); 1138 1118 ptp->ptp_info.pin_config = NULL; 1139 - 1140 - for (i = 0; i < BNXT_MAX_TX_TS; i++) { 1141 - if (ptp->txts_req[i].tx_skb) { 1142 - dev_kfree_skb_any(ptp->txts_req[i].tx_skb); 1143 - ptp->txts_req[i].tx_skb = NULL; 1144 - } 1145 - } 1146 1119 1147 1120 bnxt_unmap_ptp_regs(bp); 1148 1121 }
+1
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
··· 162 162 void bnxt_ptp_reapply_pps(struct bnxt *bp); 163 163 int bnxt_hwtstamp_set(struct net_device *dev, struct ifreq *ifr); 164 164 int bnxt_hwtstamp_get(struct net_device *dev, struct ifreq *ifr); 165 + void bnxt_ptp_free_txts_skbs(struct bnxt_ptp_cfg *ptp); 165 166 int bnxt_ptp_get_txts_prod(struct bnxt_ptp_cfg *ptp, u16 *prod); 166 167 void bnxt_get_tx_ts_p5(struct bnxt *bp, struct sk_buff *skb, u16 prod); 167 168 int bnxt_get_rx_ts_p5(struct bnxt *bp, u64 *ts, u32 pkt_ts);
+1 -1
drivers/net/ethernet/dlink/dl2k.c
··· 352 352 eth_hw_addr_set(dev, psrom->mac_addr); 353 353 354 354 if (np->chip_id == CHIP_IP1000A) { 355 - np->led_mode = psrom->led_mode; 355 + np->led_mode = le16_to_cpu(psrom->led_mode); 356 356 return 0; 357 357 } 358 358
+1 -1
drivers/net/ethernet/dlink/dl2k.h
··· 335 335 u16 sub_system_id; /* 0x06 */ 336 336 u16 pci_base_1; /* 0x08 (IP1000A only) */ 337 337 u16 pci_base_2; /* 0x0a (IP1000A only) */ 338 - u16 led_mode; /* 0x0c (IP1000A only) */ 338 + __le16 led_mode; /* 0x0c (IP1000A only) */ 339 339 u16 reserved1[9]; /* 0x0e-0x1f */ 340 340 u8 mac_addr[6]; /* 0x20-0x25 */ 341 341 u8 reserved2[10]; /* 0x26-0x2f */
+6 -1
drivers/net/ethernet/freescale/fec_main.c
··· 714 714 txq->bd.cur = bdp; 715 715 716 716 /* Trigger transmission start */ 717 - writel(0, txq->bd.reg_desc_active); 717 + if (!(fep->quirks & FEC_QUIRK_ERR007885) || 718 + !readl(txq->bd.reg_desc_active) || 719 + !readl(txq->bd.reg_desc_active) || 720 + !readl(txq->bd.reg_desc_active) || 721 + !readl(txq->bd.reg_desc_active)) 722 + writel(0, txq->bd.reg_desc_active); 718 723 719 724 return 0; 720 725 }
+1 -1
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
··· 61 61 .name = "tm_qset", 62 62 .cmd = HNAE3_DBG_CMD_TM_QSET, 63 63 .dentry = HNS3_DBG_DENTRY_TM, 64 - .buf_len = HNS3_DBG_READ_LEN, 64 + .buf_len = HNS3_DBG_READ_LEN_1MB, 65 65 .init = hns3_dbg_common_file_init, 66 66 }, 67 67 {
+39 -43
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
··· 473 473 writel(mask_en, tqp_vector->mask_addr); 474 474 } 475 475 476 - static void hns3_vector_enable(struct hns3_enet_tqp_vector *tqp_vector) 476 + static void hns3_irq_enable(struct hns3_enet_tqp_vector *tqp_vector) 477 477 { 478 478 napi_enable(&tqp_vector->napi); 479 479 enable_irq(tqp_vector->vector_irq); 480 - 481 - /* enable vector */ 482 - hns3_mask_vector_irq(tqp_vector, 1); 483 480 } 484 481 485 - static void hns3_vector_disable(struct hns3_enet_tqp_vector *tqp_vector) 482 + static void hns3_irq_disable(struct hns3_enet_tqp_vector *tqp_vector) 486 483 { 487 - /* disable vector */ 488 - hns3_mask_vector_irq(tqp_vector, 0); 489 - 490 484 disable_irq(tqp_vector->vector_irq); 491 485 napi_disable(&tqp_vector->napi); 492 486 cancel_work_sync(&tqp_vector->rx_group.dim.work); ··· 701 707 return 0; 702 708 } 703 709 710 + static void hns3_enable_irqs_and_tqps(struct net_device *netdev) 711 + { 712 + struct hns3_nic_priv *priv = netdev_priv(netdev); 713 + struct hnae3_handle *h = priv->ae_handle; 714 + u16 i; 715 + 716 + for (i = 0; i < priv->vector_num; i++) 717 + hns3_irq_enable(&priv->tqp_vector[i]); 718 + 719 + for (i = 0; i < priv->vector_num; i++) 720 + hns3_mask_vector_irq(&priv->tqp_vector[i], 1); 721 + 722 + for (i = 0; i < h->kinfo.num_tqps; i++) 723 + hns3_tqp_enable(h->kinfo.tqp[i]); 724 + } 725 + 726 + static void hns3_disable_irqs_and_tqps(struct net_device *netdev) 727 + { 728 + struct hns3_nic_priv *priv = netdev_priv(netdev); 729 + struct hnae3_handle *h = priv->ae_handle; 730 + u16 i; 731 + 732 + for (i = 0; i < h->kinfo.num_tqps; i++) 733 + hns3_tqp_disable(h->kinfo.tqp[i]); 734 + 735 + for (i = 0; i < priv->vector_num; i++) 736 + hns3_mask_vector_irq(&priv->tqp_vector[i], 0); 737 + 738 + for (i = 0; i < priv->vector_num; i++) 739 + hns3_irq_disable(&priv->tqp_vector[i]); 740 + } 741 + 704 742 static int hns3_nic_net_up(struct net_device *netdev) 705 743 { 706 744 struct hns3_nic_priv *priv = netdev_priv(netdev); 707 745 struct hnae3_handle *h = priv->ae_handle; 708 - int i, j; 709 746 int ret; 710 747 711 748 ret = hns3_nic_reset_all_ring(h); ··· 745 720 746 721 clear_bit(HNS3_NIC_STATE_DOWN, &priv->state); 747 722 748 - /* enable the vectors */ 749 - for (i = 0; i < priv->vector_num; i++) 750 - hns3_vector_enable(&priv->tqp_vector[i]); 751 - 752 - /* enable rcb */ 753 - for (j = 0; j < h->kinfo.num_tqps; j++) 754 - hns3_tqp_enable(h->kinfo.tqp[j]); 723 + hns3_enable_irqs_and_tqps(netdev); 755 724 756 725 /* start the ae_dev */ 757 726 ret = h->ae_algo->ops->start ? h->ae_algo->ops->start(h) : 0; 758 727 if (ret) { 759 728 set_bit(HNS3_NIC_STATE_DOWN, &priv->state); 760 - while (j--) 761 - hns3_tqp_disable(h->kinfo.tqp[j]); 762 - 763 - for (j = i - 1; j >= 0; j--) 764 - hns3_vector_disable(&priv->tqp_vector[j]); 729 + hns3_disable_irqs_and_tqps(netdev); 765 730 } 766 731 767 732 return ret; ··· 838 823 static void hns3_nic_net_down(struct net_device *netdev) 839 824 { 840 825 struct hns3_nic_priv *priv = netdev_priv(netdev); 841 - struct hnae3_handle *h = hns3_get_handle(netdev); 842 826 const struct hnae3_ae_ops *ops; 843 - int i; 844 827 845 - /* disable vectors */ 846 - for (i = 0; i < priv->vector_num; i++) 847 - hns3_vector_disable(&priv->tqp_vector[i]); 848 - 849 - /* disable rcb */ 850 - for (i = 0; i < h->kinfo.num_tqps; i++) 851 - hns3_tqp_disable(h->kinfo.tqp[i]); 828 + hns3_disable_irqs_and_tqps(netdev); 852 829 853 830 /* stop ae_dev */ 854 831 ops = priv->ae_handle->ae_algo->ops; ··· 5871 5864 void hns3_external_lb_prepare(struct net_device *ndev, bool if_running) 5872 5865 { 5873 5866 struct hns3_nic_priv *priv = netdev_priv(ndev); 5874 - struct hnae3_handle *h = priv->ae_handle; 5875 - int i; 5876 5867 5877 5868 if (!if_running) 5878 5869 return; ··· 5881 5876 netif_carrier_off(ndev); 5882 5877 netif_tx_disable(ndev); 5883 5878 5884 - for (i = 0; i < priv->vector_num; i++) 5885 - hns3_vector_disable(&priv->tqp_vector[i]); 5886 - 5887 - for (i = 0; i < h->kinfo.num_tqps; i++) 5888 - hns3_tqp_disable(h->kinfo.tqp[i]); 5879 + hns3_disable_irqs_and_tqps(ndev); 5889 5880 5890 5881 /* delay ring buffer clearing to hns3_reset_notify_uninit_enet 5891 5882 * during reset process, because driver may not be able ··· 5897 5896 { 5898 5897 struct hns3_nic_priv *priv = netdev_priv(ndev); 5899 5898 struct hnae3_handle *h = priv->ae_handle; 5900 - int i; 5901 5899 5902 5900 if (!if_running) 5903 5901 return; ··· 5912 5912 5913 5913 clear_bit(HNS3_NIC_STATE_DOWN, &priv->state); 5914 5914 5915 - for (i = 0; i < priv->vector_num; i++) 5916 - hns3_vector_enable(&priv->tqp_vector[i]); 5917 - 5918 - for (i = 0; i < h->kinfo.num_tqps; i++) 5919 - hns3_tqp_enable(h->kinfo.tqp[i]); 5915 + hns3_enable_irqs_and_tqps(ndev); 5920 5916 5921 5917 netif_tx_wake_all_queues(ndev); 5922 5918
+7 -6
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
··· 440 440 ptp->info.settime64 = hclge_ptp_settime; 441 441 442 442 ptp->info.n_alarm = 0; 443 + 444 + spin_lock_init(&ptp->lock); 445 + ptp->io_base = hdev->hw.hw.io_base + HCLGE_PTP_REG_OFFSET; 446 + ptp->ts_cfg.rx_filter = HWTSTAMP_FILTER_NONE; 447 + ptp->ts_cfg.tx_type = HWTSTAMP_TX_OFF; 448 + hdev->ptp = ptp; 449 + 443 450 ptp->clock = ptp_clock_register(&ptp->info, &hdev->pdev->dev); 444 451 if (IS_ERR(ptp->clock)) { 445 452 dev_err(&hdev->pdev->dev, ··· 457 450 dev_err(&hdev->pdev->dev, "failed to register ptp clock\n"); 458 451 return -ENODEV; 459 452 } 460 - 461 - spin_lock_init(&ptp->lock); 462 - ptp->io_base = hdev->hw.hw.io_base + HCLGE_PTP_REG_OFFSET; 463 - ptp->ts_cfg.rx_filter = HWTSTAMP_FILTER_NONE; 464 - ptp->ts_cfg.tx_type = HWTSTAMP_TX_OFF; 465 - hdev->ptp = ptp; 466 453 467 454 return 0; 468 455 }
+19 -6
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
··· 1292 1292 rtnl_unlock(); 1293 1293 } 1294 1294 1295 - static int hclgevf_en_hw_strip_rxvtag(struct hnae3_handle *handle, bool enable) 1295 + static int hclgevf_en_hw_strip_rxvtag_cmd(struct hclgevf_dev *hdev, bool enable) 1296 1296 { 1297 - struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle); 1298 1297 struct hclge_vf_to_pf_msg send_msg; 1299 1298 1300 1299 hclgevf_build_send_msg(&send_msg, HCLGE_MBX_SET_VLAN, 1301 1300 HCLGE_MBX_VLAN_RX_OFF_CFG); 1302 1301 send_msg.data[0] = enable ? 1 : 0; 1303 1302 return hclgevf_send_mbx_msg(hdev, &send_msg, false, NULL, 0); 1303 + } 1304 + 1305 + static int hclgevf_en_hw_strip_rxvtag(struct hnae3_handle *handle, bool enable) 1306 + { 1307 + struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle); 1308 + int ret; 1309 + 1310 + ret = hclgevf_en_hw_strip_rxvtag_cmd(hdev, enable); 1311 + if (ret) 1312 + return ret; 1313 + 1314 + hdev->rxvtag_strip_en = enable; 1315 + return 0; 1304 1316 } 1305 1317 1306 1318 static int hclgevf_reset_tqp(struct hnae3_handle *handle) ··· 2216 2204 tc_valid, tc_size); 2217 2205 } 2218 2206 2219 - static int hclgevf_init_vlan_config(struct hclgevf_dev *hdev) 2207 + static int hclgevf_init_vlan_config(struct hclgevf_dev *hdev, 2208 + bool rxvtag_strip_en) 2220 2209 { 2221 2210 struct hnae3_handle *nic = &hdev->nic; 2222 2211 int ret; 2223 2212 2224 - ret = hclgevf_en_hw_strip_rxvtag(nic, true); 2213 + ret = hclgevf_en_hw_strip_rxvtag(nic, rxvtag_strip_en); 2225 2214 if (ret) { 2226 2215 dev_err(&hdev->pdev->dev, 2227 2216 "failed to enable rx vlan offload, ret = %d\n", ret); ··· 2892 2879 if (ret) 2893 2880 return ret; 2894 2881 2895 - ret = hclgevf_init_vlan_config(hdev); 2882 + ret = hclgevf_init_vlan_config(hdev, hdev->rxvtag_strip_en); 2896 2883 if (ret) { 2897 2884 dev_err(&hdev->pdev->dev, 2898 2885 "failed(%d) to initialize VLAN config\n", ret); ··· 3007 2994 goto err_config; 3008 2995 } 3009 2996 3010 - ret = hclgevf_init_vlan_config(hdev); 2997 + ret = hclgevf_init_vlan_config(hdev, true); 3011 2998 if (ret) { 3012 2999 dev_err(&hdev->pdev->dev, 3013 3000 "failed(%d) to initialize VLAN config\n", ret);
+1
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
··· 253 253 int *vector_irq; 254 254 255 255 bool gro_en; 256 + bool rxvtag_strip_en; 256 257 257 258 unsigned long vlan_del_fail_bmap[BITS_TO_LONGS(VLAN_N_VID)]; 258 259
+5 -5
drivers/net/ethernet/intel/ice/ice_ddp.c
··· 2345 2345 cmd->set_flags |= ICE_AQC_TX_TOPO_FLAGS_SRC_RAM | 2346 2346 ICE_AQC_TX_TOPO_FLAGS_LOAD_NEW; 2347 2347 2348 - if (hw->mac_type == ICE_MAC_GENERIC_3K_E825) 2349 - desc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD); 2348 + desc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD); 2350 2349 } else { 2351 2350 ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_tx_topo); 2352 2351 cmd->get_flags = ICE_AQC_TX_TOPO_GET_RAM; 2353 - } 2354 2352 2355 - if (hw->mac_type != ICE_MAC_GENERIC_3K_E825) 2356 - desc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD); 2353 + if (hw->mac_type == ICE_MAC_E810 || 2354 + hw->mac_type == ICE_MAC_GENERIC) 2355 + desc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD); 2356 + } 2357 2357 2358 2358 status = ice_aq_send_cmd(hw, &desc, buf, buf_size, cd); 2359 2359 if (status)
+5
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
··· 2097 2097 pf = vf->pf; 2098 2098 dev = ice_pf_to_dev(pf); 2099 2099 vf_vsi = ice_get_vf_vsi(vf); 2100 + if (!vf_vsi) { 2101 + dev_err(dev, "Can not get FDIR vf_vsi for VF %u\n", vf->vf_id); 2102 + v_ret = VIRTCHNL_STATUS_ERR_PARAM; 2103 + goto err_exit; 2104 + } 2100 2105 2101 2106 #define ICE_VF_MAX_FDIR_FILTERS 128 2102 2107 if (!ice_fdir_num_avail_fltr(&pf->hw, vf_vsi) ||
+8 -10
drivers/net/ethernet/intel/idpf/idpf.h
··· 629 629 VIRTCHNL2_CAP_RX_HSPLIT_AT_L4V4 |\ 630 630 VIRTCHNL2_CAP_RX_HSPLIT_AT_L4V6) 631 631 632 - #define IDPF_CAP_RX_CSUM_L4V4 (\ 633 - VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_TCP |\ 634 - VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_UDP) 632 + #define IDPF_CAP_TX_CSUM_L4V4 (\ 633 + VIRTCHNL2_CAP_TX_CSUM_L4_IPV4_TCP |\ 634 + VIRTCHNL2_CAP_TX_CSUM_L4_IPV4_UDP) 635 635 636 - #define IDPF_CAP_RX_CSUM_L4V6 (\ 637 - VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_TCP |\ 638 - VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_UDP) 636 + #define IDPF_CAP_TX_CSUM_L4V6 (\ 637 + VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_TCP |\ 638 + VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_UDP) 639 639 640 640 #define IDPF_CAP_RX_CSUM (\ 641 641 VIRTCHNL2_CAP_RX_CSUM_L3_IPV4 |\ ··· 644 644 VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_TCP |\ 645 645 VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_UDP) 646 646 647 - #define IDPF_CAP_SCTP_CSUM (\ 647 + #define IDPF_CAP_TX_SCTP_CSUM (\ 648 648 VIRTCHNL2_CAP_TX_CSUM_L4_IPV4_SCTP |\ 649 - VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_SCTP |\ 650 - VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_SCTP |\ 651 - VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_SCTP) 649 + VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_SCTP) 652 650 653 651 #define IDPF_CAP_TUNNEL_TX_CSUM (\ 654 652 VIRTCHNL2_CAP_TX_CSUM_L3_SINGLE_TUNNEL |\
+30 -46
drivers/net/ethernet/intel/idpf/idpf_lib.c
··· 703 703 { 704 704 struct idpf_adapter *adapter = vport->adapter; 705 705 struct idpf_vport_config *vport_config; 706 + netdev_features_t other_offloads = 0; 707 + netdev_features_t csum_offloads = 0; 708 + netdev_features_t tso_offloads = 0; 706 709 netdev_features_t dflt_features; 707 - netdev_features_t offloads = 0; 708 710 struct idpf_netdev_priv *np; 709 711 struct net_device *netdev; 710 712 u16 idx = vport->idx; ··· 768 766 769 767 if (idpf_is_cap_ena_all(adapter, IDPF_RSS_CAPS, IDPF_CAP_RSS)) 770 768 dflt_features |= NETIF_F_RXHASH; 771 - if (idpf_is_cap_ena_all(adapter, IDPF_CSUM_CAPS, IDPF_CAP_RX_CSUM_L4V4)) 772 - dflt_features |= NETIF_F_IP_CSUM; 773 - if (idpf_is_cap_ena_all(adapter, IDPF_CSUM_CAPS, IDPF_CAP_RX_CSUM_L4V6)) 774 - dflt_features |= NETIF_F_IPV6_CSUM; 769 + if (idpf_is_cap_ena_all(adapter, IDPF_CSUM_CAPS, IDPF_CAP_TX_CSUM_L4V4)) 770 + csum_offloads |= NETIF_F_IP_CSUM; 771 + if (idpf_is_cap_ena_all(adapter, IDPF_CSUM_CAPS, IDPF_CAP_TX_CSUM_L4V6)) 772 + csum_offloads |= NETIF_F_IPV6_CSUM; 775 773 if (idpf_is_cap_ena(adapter, IDPF_CSUM_CAPS, IDPF_CAP_RX_CSUM)) 776 - dflt_features |= NETIF_F_RXCSUM; 777 - if (idpf_is_cap_ena_all(adapter, IDPF_CSUM_CAPS, IDPF_CAP_SCTP_CSUM)) 778 - dflt_features |= NETIF_F_SCTP_CRC; 774 + csum_offloads |= NETIF_F_RXCSUM; 775 + if (idpf_is_cap_ena_all(adapter, IDPF_CSUM_CAPS, IDPF_CAP_TX_SCTP_CSUM)) 776 + csum_offloads |= NETIF_F_SCTP_CRC; 779 777 780 778 if (idpf_is_cap_ena(adapter, IDPF_SEG_CAPS, VIRTCHNL2_CAP_SEG_IPV4_TCP)) 781 - dflt_features |= NETIF_F_TSO; 779 + tso_offloads |= NETIF_F_TSO; 782 780 if (idpf_is_cap_ena(adapter, IDPF_SEG_CAPS, VIRTCHNL2_CAP_SEG_IPV6_TCP)) 783 - dflt_features |= NETIF_F_TSO6; 781 + tso_offloads |= NETIF_F_TSO6; 784 782 if (idpf_is_cap_ena_all(adapter, IDPF_SEG_CAPS, 785 783 VIRTCHNL2_CAP_SEG_IPV4_UDP | 786 784 VIRTCHNL2_CAP_SEG_IPV6_UDP)) 787 - dflt_features |= NETIF_F_GSO_UDP_L4; 785 + tso_offloads |= NETIF_F_GSO_UDP_L4; 788 786 if (idpf_is_cap_ena_all(adapter, IDPF_RSC_CAPS, IDPF_CAP_RSC)) 789 - offloads |= NETIF_F_GRO_HW; 790 - /* advertise to stack only if offloads for encapsulated packets is 791 - * supported 792 - */ 793 - if (idpf_is_cap_ena(vport->adapter, IDPF_SEG_CAPS, 794 - VIRTCHNL2_CAP_SEG_TX_SINGLE_TUNNEL)) { 795 - offloads |= NETIF_F_GSO_UDP_TUNNEL | 796 - NETIF_F_GSO_GRE | 797 - NETIF_F_GSO_GRE_CSUM | 798 - NETIF_F_GSO_PARTIAL | 799 - NETIF_F_GSO_UDP_TUNNEL_CSUM | 800 - NETIF_F_GSO_IPXIP4 | 801 - NETIF_F_GSO_IPXIP6 | 802 - 0; 803 - 804 - if (!idpf_is_cap_ena_all(vport->adapter, IDPF_CSUM_CAPS, 805 - IDPF_CAP_TUNNEL_TX_CSUM)) 806 - netdev->gso_partial_features |= 807 - NETIF_F_GSO_UDP_TUNNEL_CSUM; 808 - 809 - netdev->gso_partial_features |= NETIF_F_GSO_GRE_CSUM; 810 - offloads |= NETIF_F_TSO_MANGLEID; 811 - } 787 + other_offloads |= NETIF_F_GRO_HW; 812 788 if (idpf_is_cap_ena(adapter, IDPF_OTHER_CAPS, VIRTCHNL2_CAP_LOOPBACK)) 813 - offloads |= NETIF_F_LOOPBACK; 789 + other_offloads |= NETIF_F_LOOPBACK; 814 790 815 - netdev->features |= dflt_features; 816 - netdev->hw_features |= dflt_features | offloads; 817 - netdev->hw_enc_features |= dflt_features | offloads; 791 + netdev->features |= dflt_features | csum_offloads | tso_offloads; 792 + netdev->hw_features |= netdev->features | other_offloads; 793 + netdev->vlan_features |= netdev->features | other_offloads; 794 + netdev->hw_enc_features |= dflt_features | other_offloads; 818 795 idpf_set_ethtool_ops(netdev); 819 796 netif_set_affinity_auto(netdev); 820 797 SET_NETDEV_DEV(netdev, &adapter->pdev->dev); ··· 1113 1132 1114 1133 num_max_q = max(max_q->max_txq, max_q->max_rxq); 1115 1134 vport->q_vector_idxs = kcalloc(num_max_q, sizeof(u16), GFP_KERNEL); 1116 - if (!vport->q_vector_idxs) { 1117 - kfree(vport); 1135 + if (!vport->q_vector_idxs) 1136 + goto free_vport; 1118 1137 1119 - return NULL; 1120 - } 1121 1138 idpf_vport_init(vport, max_q); 1122 1139 1123 1140 /* This alloc is done separate from the LUT because it's not strictly ··· 1125 1146 */ 1126 1147 rss_data = &adapter->vport_config[idx]->user_config.rss_data; 1127 1148 rss_data->rss_key = kzalloc(rss_data->rss_key_size, GFP_KERNEL); 1128 - if (!rss_data->rss_key) { 1129 - kfree(vport); 1149 + if (!rss_data->rss_key) 1150 + goto free_vector_idxs; 1130 1151 1131 - return NULL; 1132 - } 1133 1152 /* Initialize default rss key */ 1134 1153 netdev_rss_key_fill((void *)rss_data->rss_key, rss_data->rss_key_size); 1135 1154 ··· 1140 1163 adapter->next_vport = idpf_get_free_slot(adapter); 1141 1164 1142 1165 return vport; 1166 + 1167 + free_vector_idxs: 1168 + kfree(vport->q_vector_idxs); 1169 + free_vport: 1170 + kfree(vport); 1171 + 1172 + return NULL; 1143 1173 } 1144 1174 1145 1175 /**
+1
drivers/net/ethernet/intel/idpf/idpf_main.c
··· 89 89 { 90 90 struct idpf_adapter *adapter = pci_get_drvdata(pdev); 91 91 92 + cancel_delayed_work_sync(&adapter->serv_task); 92 93 cancel_delayed_work_sync(&adapter->vc_event_task); 93 94 idpf_vc_core_deinit(adapter); 94 95 idpf_deinit_dflt_mbx(adapter);
+4 -2
drivers/net/ethernet/intel/igc/igc_ptp.c
··· 1290 1290 /* reset the tstamp_config */ 1291 1291 igc_ptp_set_timestamp_mode(adapter, &adapter->tstamp_config); 1292 1292 1293 + mutex_lock(&adapter->ptm_lock); 1294 + 1293 1295 spin_lock_irqsave(&adapter->tmreg_lock, flags); 1294 1296 1295 1297 switch (adapter->hw.mac.type) { ··· 1310 1308 if (!igc_is_crosststamp_supported(adapter)) 1311 1309 break; 1312 1310 1313 - mutex_lock(&adapter->ptm_lock); 1314 1311 wr32(IGC_PCIE_DIG_DELAY, IGC_PCIE_DIG_DELAY_DEFAULT); 1315 1312 wr32(IGC_PCIE_PHY_DELAY, IGC_PCIE_PHY_DELAY_DEFAULT); 1316 1313 ··· 1333 1332 netdev_err(adapter->netdev, "Timeout reading IGC_PTM_STAT register\n"); 1334 1333 1335 1334 igc_ptm_reset(hw); 1336 - mutex_unlock(&adapter->ptm_lock); 1337 1335 break; 1338 1336 default: 1339 1337 /* No work to do. */ ··· 1348 1348 } 1349 1349 out: 1350 1350 spin_unlock_irqrestore(&adapter->tmreg_lock, flags); 1351 + 1352 + mutex_unlock(&adapter->ptm_lock); 1351 1353 1352 1354 wrfl(); 1353 1355 }
+1 -1
drivers/net/ethernet/marvell/octeon_ep/octep_main.c
··· 1223 1223 miss_cnt); 1224 1224 rtnl_lock(); 1225 1225 if (netif_running(oct->netdev)) 1226 - octep_stop(oct->netdev); 1226 + dev_close(oct->netdev); 1227 1227 rtnl_unlock(); 1228 1228 } 1229 1229
+3 -1
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
··· 835 835 struct octep_vf_device *oct = netdev_priv(netdev); 836 836 837 837 netdev_hold(netdev, NULL, GFP_ATOMIC); 838 - schedule_work(&oct->tx_timeout_task); 838 + if (!schedule_work(&oct->tx_timeout_task)) 839 + netdev_put(netdev, NULL); 840 + 839 841 } 840 842 841 843 static int octep_vf_set_mac(struct net_device *netdev, void *p)
+9 -9
drivers/net/ethernet/mediatek/mtk_eth_soc.c
··· 269 269 "ethwarp_wocpu2", 270 270 "ethwarp_wocpu1", 271 271 "ethwarp_wocpu0", 272 - "top_usxgmii0_sel", 273 - "top_usxgmii1_sel", 274 272 "top_sgm0_sel", 275 273 "top_sgm1_sel", 276 - "top_xfi_phy0_xtal_sel", 277 - "top_xfi_phy1_xtal_sel", 278 274 "top_eth_gmii_sel", 279 275 "top_eth_refck_50m_sel", 280 276 "top_eth_sys_200m_sel", ··· 2248 2252 ring->data[idx] = new_data; 2249 2253 rxd->rxd1 = (unsigned int)dma_addr; 2250 2254 release_desc: 2255 + if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) { 2256 + if (unlikely(dma_addr == DMA_MAPPING_ERROR)) 2257 + addr64 = FIELD_GET(RX_DMA_ADDR64_MASK, 2258 + rxd->rxd2); 2259 + else 2260 + addr64 = RX_DMA_PREP_ADDR64(dma_addr); 2261 + } 2262 + 2251 2263 if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) 2252 2264 rxd->rxd2 = RX_DMA_LSO; 2253 2265 else 2254 - rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); 2255 - 2256 - if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA) && 2257 - likely(dma_addr != DMA_MAPPING_ERROR)) 2258 - rxd->rxd2 |= RX_DMA_PREP_ADDR64(dma_addr); 2266 + rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size) | addr64; 2259 2267 2260 2268 ring->calc_idx = idx; 2261 2269 done++;
+7 -6
drivers/net/ethernet/mediatek/mtk_star_emac.c
··· 1163 1163 struct net_device *ndev = priv->ndev; 1164 1164 unsigned int head = ring->head; 1165 1165 unsigned int entry = ring->tail; 1166 + unsigned long flags; 1166 1167 1167 1168 while (entry != head && count < (MTK_STAR_RING_NUM_DESCS - 1)) { 1168 1169 ret = mtk_star_tx_complete_one(priv); ··· 1183 1182 netif_wake_queue(ndev); 1184 1183 1185 1184 if (napi_complete(napi)) { 1186 - spin_lock(&priv->lock); 1185 + spin_lock_irqsave(&priv->lock, flags); 1187 1186 mtk_star_enable_dma_irq(priv, false, true); 1188 - spin_unlock(&priv->lock); 1187 + spin_unlock_irqrestore(&priv->lock, flags); 1189 1188 } 1190 1189 1191 1190 return 0; ··· 1342 1341 static int mtk_star_rx_poll(struct napi_struct *napi, int budget) 1343 1342 { 1344 1343 struct mtk_star_priv *priv; 1344 + unsigned long flags; 1345 1345 int work_done = 0; 1346 1346 1347 1347 priv = container_of(napi, struct mtk_star_priv, rx_napi); 1348 1348 1349 1349 work_done = mtk_star_rx(priv, budget); 1350 - if (work_done < budget) { 1351 - napi_complete_done(napi, work_done); 1352 - spin_lock(&priv->lock); 1350 + if (work_done < budget && napi_complete_done(napi, work_done)) { 1351 + spin_lock_irqsave(&priv->lock, flags); 1353 1352 mtk_star_enable_dma_irq(priv, true, false); 1354 - spin_unlock(&priv->lock); 1353 + spin_unlock_irqrestore(&priv->lock, flags); 1355 1354 } 1356 1355 1357 1356 return work_done;
+2 -4
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
··· 176 176 177 177 priv = ptpsq->txqsq.priv; 178 178 179 + rtnl_lock(); 179 180 mutex_lock(&priv->state_lock); 180 181 chs = &priv->channels; 181 182 netdev = priv->netdev; ··· 184 183 carrier_ok = netif_carrier_ok(netdev); 185 184 netif_carrier_off(netdev); 186 185 187 - rtnl_lock(); 188 186 mlx5e_deactivate_priv_channels(priv); 189 - rtnl_unlock(); 190 187 191 188 mlx5e_ptp_close(chs->ptp); 192 189 err = mlx5e_ptp_open(priv, &chs->params, chs->c[0]->lag_port, &chs->ptp); 193 190 194 - rtnl_lock(); 195 191 mlx5e_activate_priv_channels(priv); 196 - rtnl_unlock(); 197 192 198 193 /* return carrier back if needed */ 199 194 if (carrier_ok) 200 195 netif_carrier_on(netdev); 201 196 202 197 mutex_unlock(&priv->state_lock); 198 + rtnl_unlock(); 203 199 204 200 return err; 205 201 }
+29 -3
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c
··· 165 165 struct flow_match_enc_keyid enc_keyid; 166 166 void *misc_c, *misc_v; 167 167 168 - misc_c = MLX5_ADDR_OF(fte_match_param, spec->match_criteria, misc_parameters); 169 - misc_v = MLX5_ADDR_OF(fte_match_param, spec->match_value, misc_parameters); 170 - 171 168 if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_KEYID)) 172 169 return 0; 173 170 ··· 179 182 err = mlx5e_tc_tun_parse_vxlan_gbp_option(priv, spec, f); 180 183 if (err) 181 184 return err; 185 + 186 + /* We can't mix custom tunnel headers with symbolic ones and we 187 + * don't have a symbolic field name for GBP, so we use custom 188 + * tunnel headers in this case. We need hardware support to 189 + * match on custom tunnel headers, but we already know it's 190 + * supported because the previous call successfully checked for 191 + * that. 192 + */ 193 + misc_c = MLX5_ADDR_OF(fte_match_param, spec->match_criteria, 194 + misc_parameters_5); 195 + misc_v = MLX5_ADDR_OF(fte_match_param, spec->match_value, 196 + misc_parameters_5); 197 + 198 + /* Shift by 8 to account for the reserved bits in the vxlan 199 + * header after the VNI. 200 + */ 201 + MLX5_SET(fte_match_set_misc5, misc_c, tunnel_header_1, 202 + be32_to_cpu(enc_keyid.mask->keyid) << 8); 203 + MLX5_SET(fte_match_set_misc5, misc_v, tunnel_header_1, 204 + be32_to_cpu(enc_keyid.key->keyid) << 8); 205 + 206 + spec->match_criteria_enable |= MLX5_MATCH_MISC_PARAMETERS_5; 207 + 208 + return 0; 182 209 } 183 210 184 211 /* match on VNI is required */ ··· 215 194 "Matching on VXLAN VNI is not supported\n"); 216 195 return -EOPNOTSUPP; 217 196 } 197 + 198 + misc_c = MLX5_ADDR_OF(fte_match_param, spec->match_criteria, 199 + misc_parameters); 200 + misc_v = MLX5_ADDR_OF(fte_match_param, spec->match_value, 201 + misc_parameters); 218 202 219 203 MLX5_SET(fte_match_set_misc, misc_c, vxlan_vni, 220 204 be32_to_cpu(enc_keyid.mask->keyid));
+1 -4
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
··· 1750 1750 !list_is_first(&attr->list, &flow->attrs)) 1751 1751 return 0; 1752 1752 1753 - if (flow_flag_test(flow, SLOW)) 1754 - return 0; 1755 - 1756 1753 esw_attr = attr->esw_attr; 1757 1754 if (!esw_attr->split_count || 1758 1755 esw_attr->split_count == esw_attr->out_count - 1) ··· 1763 1766 for (i = esw_attr->split_count; i < esw_attr->out_count; i++) { 1764 1767 /* external dest with encap is considered as internal by firmware */ 1765 1768 if (esw_attr->dests[i].vport == MLX5_VPORT_UPLINK && 1766 - !(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP_VALID)) 1769 + !(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP)) 1767 1770 ext_dest = true; 1768 1771 else 1769 1772 int_dest = true;
+4 -1
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
··· 3533 3533 int err; 3534 3534 3535 3535 mutex_init(&esw->offloads.termtbl_mutex); 3536 - mlx5_rdma_enable_roce(esw->dev); 3536 + err = mlx5_rdma_enable_roce(esw->dev); 3537 + if (err) 3538 + goto err_roce; 3537 3539 3538 3540 err = mlx5_esw_host_number_init(esw); 3539 3541 if (err) ··· 3596 3594 esw_offloads_metadata_uninit(esw); 3597 3595 err_metadata: 3598 3596 mlx5_rdma_disable_roce(esw->dev); 3597 + err_roce: 3599 3598 mutex_destroy(&esw->offloads.termtbl_mutex); 3600 3599 return err; 3601 3600 }
+6 -5
drivers/net/ethernet/mellanox/mlx5/core/rdma.c
··· 118 118 119 119 static int mlx5_rdma_add_roce_addr(struct mlx5_core_dev *dev) 120 120 { 121 + u8 mac[ETH_ALEN] = {}; 121 122 union ib_gid gid; 122 - u8 mac[ETH_ALEN]; 123 123 124 124 mlx5_rdma_make_default_gid(dev, &gid); 125 125 return mlx5_core_roce_gid_set(dev, 0, ··· 140 140 mlx5_nic_vport_disable_roce(dev); 141 141 } 142 142 143 - void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) 143 + int mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) 144 144 { 145 145 int err; 146 146 147 147 if (!MLX5_CAP_GEN(dev, roce)) 148 - return; 148 + return 0; 149 149 150 150 err = mlx5_nic_vport_enable_roce(dev); 151 151 if (err) { 152 152 mlx5_core_err(dev, "Failed to enable RoCE: %d\n", err); 153 - return; 153 + return err; 154 154 } 155 155 156 156 err = mlx5_rdma_add_roce_addr(dev); ··· 165 165 goto del_roce_addr; 166 166 } 167 167 168 - return; 168 + return err; 169 169 170 170 del_roce_addr: 171 171 mlx5_rdma_del_roce_addr(dev); 172 172 disable_roce: 173 173 mlx5_nic_vport_disable_roce(dev); 174 + return err; 174 175 }
+2 -2
drivers/net/ethernet/mellanox/mlx5/core/rdma.h
··· 8 8 9 9 #ifdef CONFIG_MLX5_ESWITCH 10 10 11 - void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev); 11 + int mlx5_rdma_enable_roce(struct mlx5_core_dev *dev); 12 12 void mlx5_rdma_disable_roce(struct mlx5_core_dev *dev); 13 13 14 14 #else /* CONFIG_MLX5_ESWITCH */ 15 15 16 - static inline void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) {} 16 + static inline int mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) { return 0; } 17 17 static inline void mlx5_rdma_disable_roce(struct mlx5_core_dev *dev) {} 18 18 19 19 #endif /* CONFIG_MLX5_ESWITCH */
+6 -2
drivers/net/ethernet/microchip/lan743x_main.c
··· 1815 1815 if (nr_frags <= 0) { 1816 1816 tx->frame_data0 |= TX_DESC_DATA0_LS_; 1817 1817 tx->frame_data0 |= TX_DESC_DATA0_IOC_; 1818 + tx->frame_last = tx->frame_first; 1818 1819 } 1819 1820 tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail]; 1820 1821 tx_descriptor->data0 = cpu_to_le32(tx->frame_data0); ··· 1885 1884 tx->frame_first = 0; 1886 1885 tx->frame_data0 = 0; 1887 1886 tx->frame_tail = 0; 1887 + tx->frame_last = 0; 1888 1888 return -ENOMEM; 1889 1889 } 1890 1890 ··· 1926 1924 TX_DESC_DATA0_DTYPE_DATA_) { 1927 1925 tx->frame_data0 |= TX_DESC_DATA0_LS_; 1928 1926 tx->frame_data0 |= TX_DESC_DATA0_IOC_; 1927 + tx->frame_last = tx->frame_tail; 1929 1928 } 1930 1929 1931 - tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail]; 1932 - buffer_info = &tx->buffer_info[tx->frame_tail]; 1930 + tx_descriptor = &tx->ring_cpu_ptr[tx->frame_last]; 1931 + buffer_info = &tx->buffer_info[tx->frame_last]; 1933 1932 buffer_info->skb = skb; 1934 1933 if (time_stamp) 1935 1934 buffer_info->flags |= TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED; 1936 1935 if (ignore_sync) 1937 1936 buffer_info->flags |= TX_BUFFER_INFO_FLAG_IGNORE_SYNC; 1938 1937 1938 + tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail]; 1939 1939 tx_descriptor->data0 = cpu_to_le32(tx->frame_data0); 1940 1940 tx->frame_tail = lan743x_tx_next_index(tx, tx->frame_tail); 1941 1941 tx->last_tail = tx->frame_tail;
+1
drivers/net/ethernet/microchip/lan743x_main.h
··· 980 980 u32 frame_first; 981 981 u32 frame_data0; 982 982 u32 frame_tail; 983 + u32 frame_last; 983 984 984 985 struct lan743x_tx_buffer_info *buffer_info; 985 986
+6
drivers/net/ethernet/mscc/ocelot.c
··· 830 830 int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid, 831 831 bool untagged) 832 832 { 833 + struct ocelot_port *ocelot_port = ocelot->ports[port]; 833 834 int err; 834 835 835 836 /* Ignore VID 0 added to our RX filter by the 8021q module, since ··· 848 847 if (pvid) { 849 848 err = ocelot_port_set_pvid(ocelot, port, 850 849 ocelot_bridge_vlan_find(ocelot, vid)); 850 + if (err) 851 + return err; 852 + } else if (ocelot_port->pvid_vlan && 853 + ocelot_bridge_vlan_find(ocelot, vid) == ocelot_port->pvid_vlan) { 854 + err = ocelot_port_set_pvid(ocelot, port, NULL); 851 855 if (err) 852 856 return err; 853 857 }
+2 -2
drivers/net/ethernet/realtek/rtase/rtase_main.c
··· 1925 1925 1926 1926 time_us = min_t(int, time_us, RTASE_MITI_MAX_TIME); 1927 1927 1928 - msb = fls(time_us); 1929 - if (msb >= RTASE_MITI_COUNT_BIT_NUM) { 1928 + if (time_us > RTASE_MITI_TIME_COUNT_MASK) { 1929 + msb = fls(time_us); 1930 1930 time_unit = msb - RTASE_MITI_COUNT_BIT_NUM; 1931 1931 time_count = time_us >> (msb - RTASE_MITI_COUNT_BIT_NUM); 1932 1932 } else {
+29 -7
drivers/net/ethernet/vertexcom/mse102x.c
··· 6 6 7 7 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 8 8 9 + #include <linux/if_vlan.h> 9 10 #include <linux/interrupt.h> 10 11 #include <linux/module.h> 11 12 #include <linux/kernel.h> ··· 34 33 #define CMD_CTR (0x2 << CMD_SHIFT) 35 34 36 35 #define CMD_MASK GENMASK(15, CMD_SHIFT) 37 - #define LEN_MASK GENMASK(CMD_SHIFT - 1, 0) 36 + #define LEN_MASK GENMASK(CMD_SHIFT - 2, 0) 38 37 39 38 #define DET_CMD_LEN 4 40 39 #define DET_SOF_LEN 2 ··· 263 262 } 264 263 265 264 static int mse102x_rx_frame_spi(struct mse102x_net *mse, u8 *buff, 266 - unsigned int frame_len) 265 + unsigned int frame_len, bool drop) 267 266 { 268 267 struct mse102x_net_spi *mses = to_mse102x_spi(mse); 269 268 struct spi_transfer *xfer = &mses->spi_xfer; ··· 281 280 netdev_err(mse->ndev, "%s: spi_sync() failed: %d\n", 282 281 __func__, ret); 283 282 mse->stats.xfer_err++; 283 + } else if (drop) { 284 + netdev_dbg(mse->ndev, "%s: Drop frame\n", __func__); 285 + ret = -EINVAL; 284 286 } else if (*sof != cpu_to_be16(DET_SOF)) { 285 287 netdev_dbg(mse->ndev, "%s: SPI start of frame is invalid (0x%04x)\n", 286 288 __func__, *sof); ··· 311 307 struct sk_buff *skb; 312 308 unsigned int rxalign; 313 309 unsigned int rxlen; 310 + bool drop = false; 314 311 __be16 rx = 0; 315 312 u16 cmd_resp; 316 313 u8 *rxpkt; ··· 334 329 net_dbg_ratelimited("%s: Unexpected response (0x%04x)\n", 335 330 __func__, cmd_resp); 336 331 mse->stats.invalid_rts++; 337 - return; 332 + drop = true; 333 + goto drop; 338 334 } 339 335 340 336 net_dbg_ratelimited("%s: Unexpected response to first CMD\n", ··· 343 337 } 344 338 345 339 rxlen = cmd_resp & LEN_MASK; 346 - if (!rxlen) { 347 - net_dbg_ratelimited("%s: No frame length defined\n", __func__); 340 + if (rxlen < ETH_ZLEN || rxlen > VLAN_ETH_FRAME_LEN) { 341 + net_dbg_ratelimited("%s: Invalid frame length: %d\n", __func__, 342 + rxlen); 348 343 mse->stats.invalid_len++; 349 - return; 344 + drop = true; 350 345 } 346 + 347 + /* In case of a invalid CMD_RTS, the frame must be consumed anyway. 348 + * So assume the maximum possible frame length. 349 + */ 350 + drop: 351 + if (drop) 352 + rxlen = VLAN_ETH_FRAME_LEN; 351 353 352 354 rxalign = ALIGN(rxlen + DET_SOF_LEN + DET_DFT_LEN, 4); 353 355 skb = netdev_alloc_skb_ip_align(mse->ndev, rxalign); ··· 367 353 * They are copied, but ignored. 368 354 */ 369 355 rxpkt = skb_put(skb, rxlen) - DET_SOF_LEN; 370 - if (mse102x_rx_frame_spi(mse, rxpkt, rxlen)) { 356 + if (mse102x_rx_frame_spi(mse, rxpkt, rxlen, drop)) { 371 357 mse->ndev->stats.rx_errors++; 372 358 dev_kfree_skb(skb); 373 359 return; ··· 523 509 static int mse102x_net_open(struct net_device *ndev) 524 510 { 525 511 struct mse102x_net *mse = netdev_priv(ndev); 512 + struct mse102x_net_spi *mses = to_mse102x_spi(mse); 526 513 int ret; 527 514 528 515 ret = request_threaded_irq(ndev->irq, NULL, mse102x_irq, IRQF_ONESHOT, ··· 538 523 netif_start_queue(ndev); 539 524 540 525 netif_carrier_on(ndev); 526 + 527 + /* The SPI interrupt can stuck in case of pending packet(s). 528 + * So poll for possible packet(s) to re-arm the interrupt. 529 + */ 530 + mutex_lock(&mses->lock); 531 + mse102x_rx_pkt_spi(mse); 532 + mutex_unlock(&mses->lock); 541 533 542 534 netif_dbg(mse, ifup, ndev, "network device up\n"); 543 535
+2 -1
drivers/net/mdio/mdio-mux-meson-gxl.c
··· 17 17 #define REG2_LEDACT GENMASK(23, 22) 18 18 #define REG2_LEDLINK GENMASK(25, 24) 19 19 #define REG2_DIV4SEL BIT(27) 20 + #define REG2_REVERSED BIT(28) 20 21 #define REG2_ADCBYPASS BIT(30) 21 22 #define REG2_CLKINSEL BIT(31) 22 23 #define ETH_REG3 0x4 ··· 66 65 * The only constraint is that it must match the one in 67 66 * drivers/net/phy/meson-gxl.c to properly match the PHY. 68 67 */ 69 - writel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID), 68 + writel(REG2_REVERSED | FIELD_PREP(REG2_PHYID, EPHY_GXL_ID), 70 69 priv->regs + ETH_REG2); 71 70 72 71 /* Enable the internal phy */
+2 -14
drivers/net/usb/rndis_host.c
··· 630 630 .tx_fixup = rndis_tx_fixup, 631 631 }; 632 632 633 - static const struct driver_info wwan_rndis_info = { 634 - .description = "Mobile Broadband RNDIS device", 635 - .flags = FLAG_WWAN | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT, 636 - .bind = rndis_bind, 637 - .unbind = rndis_unbind, 638 - .status = rndis_status, 639 - .rx_fixup = rndis_rx_fixup, 640 - .tx_fixup = rndis_tx_fixup, 641 - }; 642 - 643 633 /*-------------------------------------------------------------------------*/ 644 634 645 635 static const struct usb_device_id products [] = { ··· 666 676 USB_INTERFACE_INFO(USB_CLASS_WIRELESS_CONTROLLER, 1, 3), 667 677 .driver_info = (unsigned long) &rndis_info, 668 678 }, { 669 - /* Mobile Broadband Modem, seen in Novatel Verizon USB730L and 670 - * Telit FN990A (RNDIS) 671 - */ 679 + /* Novatel Verizon USB730L */ 672 680 USB_INTERFACE_INFO(USB_CLASS_MISC, 4, 1), 673 - .driver_info = (unsigned long)&wwan_rndis_info, 681 + .driver_info = (unsigned long) &rndis_info, 674 682 }, 675 683 { }, // END 676 684 };
+1 -1
drivers/net/vmxnet3/vmxnet3_xdp.c
··· 397 397 398 398 xdp_init_buff(&xdp, PAGE_SIZE, &rq->xdp_rxq); 399 399 xdp_prepare_buff(&xdp, page_address(page), rq->page_pool->p.offset, 400 - rbi->len, false); 400 + rcd->len, false); 401 401 xdp_buff_clear_frags_flag(&xdp); 402 402 403 403 xdp_prog = rcu_dereference(rq->adapter->xdp_bpf_prog);
+7 -1
drivers/net/vxlan/vxlan_vnifilter.c
··· 627 627 * default dst remote_ip previously added for this vni 628 628 */ 629 629 if (!vxlan_addr_any(&vninode->remote_ip) || 630 - !vxlan_addr_any(&dst->remote_ip)) 630 + !vxlan_addr_any(&dst->remote_ip)) { 631 + u32 hash_index = fdb_head_index(vxlan, all_zeros_mac, 632 + vninode->vni); 633 + 634 + spin_lock_bh(&vxlan->hash_lock[hash_index]); 631 635 __vxlan_fdb_delete(vxlan, all_zeros_mac, 632 636 (vxlan_addr_any(&vninode->remote_ip) ? 633 637 dst->remote_ip : vninode->remote_ip), ··· 639 635 vninode->vni, vninode->vni, 640 636 dst->remote_ifindex, 641 637 true); 638 + spin_unlock_bh(&vxlan->hash_lock[hash_index]); 639 + } 642 640 643 641 if (vxlan->dev->flags & IFF_UP) { 644 642 if (vxlan_addr_multicast(&vninode->remote_ip) &&
+4 -2
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
··· 896 896 } 897 897 898 898 /* 1) Prepare USB boot loader for runtime image */ 899 - brcmf_usb_dl_cmd(devinfo, DL_START, &state, sizeof(state)); 899 + err = brcmf_usb_dl_cmd(devinfo, DL_START, &state, sizeof(state)); 900 + if (err) 901 + goto fail; 900 902 901 903 rdlstate = le32_to_cpu(state.state); 902 904 rdlbytes = le32_to_cpu(state.bytes); 903 905 904 906 /* 2) Check we are in the Waiting state */ 905 907 if (rdlstate != DL_WAITING) { 906 - brcmf_err("Failed to DL_START\n"); 908 + brcmf_err("Invalid DL state: %u\n", rdlstate); 907 909 err = -EINVAL; 908 910 goto fail; 909 911 }
-2
drivers/net/wireless/intel/iwlwifi/cfg/sc.c
··· 142 142 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, 143 143 }; 144 144 145 - const char iwl_sp_name[] = "Intel(R) Wi-Fi 7 BE213 160MHz"; 146 - 147 145 const struct iwl_cfg iwl_cfg_sc = { 148 146 .fw_name_mac = "sc", 149 147 IWL_DEVICE_SC,
+9 -7
drivers/net/wireless/intel/iwlwifi/iwl-config.h
··· 2 2 /* 3 3 * Copyright (C) 2005-2014, 2018-2021 Intel Corporation 4 4 * Copyright (C) 2016-2017 Intel Deutschland GmbH 5 - * Copyright (C) 2018-2025 Intel Corporation 5 + * Copyright (C) 2018-2024 Intel Corporation 6 6 */ 7 7 #ifndef __IWL_CONFIG_H__ 8 8 #define __IWL_CONFIG_H__ ··· 451 451 #define IWL_CFG_RF_ID_HR 0x7 452 452 #define IWL_CFG_RF_ID_HR1 0x4 453 453 454 - #define IWL_CFG_BW_NO_LIM (U16_MAX - 1) 455 - #define IWL_CFG_BW_ANY U16_MAX 454 + #define IWL_CFG_NO_160 0x1 455 + #define IWL_CFG_160 0x0 456 + 457 + #define IWL_CFG_NO_320 0x1 458 + #define IWL_CFG_320 0x0 456 459 457 460 #define IWL_CFG_CORES_BT 0x0 458 461 #define IWL_CFG_CORES_BT_GNSS 0x5 ··· 467 464 #define IWL_CFG_IS_JACKET 0x1 468 465 469 466 #define IWL_SUBDEVICE_RF_ID(subdevice) ((u16)((subdevice) & 0x00F0) >> 4) 470 - #define IWL_SUBDEVICE_BW_LIM(subdevice) ((u16)((subdevice) & 0x0200) >> 9) 467 + #define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0200) >> 9) 471 468 #define IWL_SUBDEVICE_CORES(subdevice) ((u16)((subdevice) & 0x1C00) >> 10) 472 469 473 470 struct iwl_dev_info { ··· 475 472 u16 subdevice; 476 473 u16 mac_type; 477 474 u16 rf_type; 478 - u16 bw_limit; 479 475 u8 mac_step; 480 476 u8 rf_step; 481 477 u8 rf_id; 478 + u8 no_160; 482 479 u8 cores; 483 480 u8 cdb; 484 481 u8 jacket; ··· 492 489 const struct iwl_dev_info * 493 490 iwl_pci_find_dev_info(u16 device, u16 subsystem_device, 494 491 u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb, 495 - u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step); 492 + u8 jacket, u8 rf_id, u8 no_160, u8 cores, u8 rf_step); 496 493 extern const struct pci_device_id iwl_hw_card_ids[]; 497 494 #endif 498 495 ··· 553 550 extern const char iwl_ax411_name[]; 554 551 extern const char iwl_fm_name[]; 555 552 extern const char iwl_wh_name[]; 556 - extern const char iwl_sp_name[]; 557 553 extern const char iwl_gl_name[]; 558 554 extern const char iwl_mtp_name[]; 559 555 extern const char iwl_dr_name[];
+1
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
··· 148 148 * during a error FW error. 149 149 */ 150 150 #define CSR_FUNC_SCRATCH_INIT_VALUE (0x01010101) 151 + #define CSR_FUNC_SCRATCH_POWER_OFF_MASK 0xFFFF 151 152 152 153 /* Bits for CSR_HW_IF_CONFIG_REG */ 153 154 #define CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP_DASH (0x0000000F)
+6 -10
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 2 /* 3 - * Copyright (C) 2005-2014, 2018-2023, 2025 Intel Corporation 3 + * Copyright (C) 2005-2014, 2018-2023 Intel Corporation 4 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 6 */ ··· 944 944 IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK); 945 945 break; 946 946 case NL80211_BAND_6GHZ: 947 - if (!trans->reduced_cap_sku && 948 - trans->bw_limit >= 320) { 947 + if (!trans->reduced_cap_sku) { 949 948 iftype_data->eht_cap.eht_cap_elem.phy_cap_info[0] |= 950 949 IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ; 951 950 iftype_data->eht_cap.eht_cap_elem.phy_cap_info[1] |= ··· 1094 1095 iftype_data->eht_cap.eht_mcs_nss_supp.bw._320.rx_tx_mcs13_max_nss = 0; 1095 1096 } 1096 1097 1097 - if (trans->bw_limit < 160) 1098 + if (trans->no_160) 1098 1099 iftype_data->he_cap.he_cap_elem.phy_cap_info[0] &= 1099 1100 ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G; 1100 1101 1101 - if (trans->bw_limit < 320 || trans->reduced_cap_sku) { 1102 + if (trans->reduced_cap_sku) { 1102 1103 memset(&iftype_data->eht_cap.eht_mcs_nss_supp.bw._320, 0, 1103 1104 sizeof(iftype_data->eht_cap.eht_mcs_nss_supp.bw._320)); 1104 - iftype_data->eht_cap.eht_cap_elem.phy_cap_info[2] &= 1105 - ~IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK; 1106 - } 1107 - 1108 - if (trans->reduced_cap_sku) { 1109 1105 iftype_data->eht_cap.eht_mcs_nss_supp.bw._80.rx_tx_mcs13_max_nss = 0; 1110 1106 iftype_data->eht_cap.eht_mcs_nss_supp.bw._160.rx_tx_mcs13_max_nss = 0; 1111 1107 iftype_data->eht_cap.eht_cap_elem.phy_cap_info[8] &= 1112 1108 ~IEEE80211_EHT_PHY_CAP8_RX_4096QAM_WIDER_BW_DL_OFDMA; 1109 + iftype_data->eht_cap.eht_cap_elem.phy_cap_info[2] &= 1110 + ~IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK; 1113 1111 } 1114 1112 } 1115 1113
+21 -7
drivers/net/wireless/intel/iwlwifi/iwl-trans.c
··· 21 21 struct list_head list; 22 22 unsigned int restart_count; 23 23 time64_t last_error; 24 + bool backoff; 24 25 char name[]; 25 26 }; 26 27 ··· 126 125 if (!data) 127 126 return at_least; 128 127 129 - if (ktime_get_boottime_seconds() - data->last_error >= 128 + if (!data->backoff && 129 + ktime_get_boottime_seconds() - data->last_error >= 130 130 IWL_TRANS_RESET_OK_TIME) 131 131 data->restart_count = 0; 132 132 133 133 index = data->restart_count; 134 - if (index >= ARRAY_SIZE(escalation_list)) 134 + if (index >= ARRAY_SIZE(escalation_list)) { 135 135 index = ARRAY_SIZE(escalation_list) - 1; 136 + if (!data->backoff) { 137 + data->backoff = true; 138 + return IWL_RESET_MODE_BACKOFF; 139 + } 140 + data->backoff = false; 141 + } 136 142 137 143 return max(at_least, escalation_list[index]); 138 144 } ··· 148 140 149 141 static void iwl_trans_restart_wk(struct work_struct *wk) 150 142 { 151 - struct iwl_trans *trans = container_of(wk, typeof(*trans), restart.wk); 143 + struct iwl_trans *trans = container_of(wk, typeof(*trans), 144 + restart.wk.work); 152 145 struct iwl_trans_reprobe *reprobe; 153 146 enum iwl_reset_mode mode; 154 147 ··· 177 168 return; 178 169 179 170 mode = iwl_trans_determine_restart_mode(trans); 171 + if (mode == IWL_RESET_MODE_BACKOFF) { 172 + IWL_ERR(trans, "Too many device errors - delay next reset\n"); 173 + queue_delayed_work(system_unbound_wq, &trans->restart.wk, 174 + IWL_TRANS_RESET_DELAY); 175 + return; 176 + } 180 177 181 178 iwl_trans_inc_restart_count(trans->dev); 182 179 ··· 242 227 trans->dev = dev; 243 228 trans->num_rx_queues = 1; 244 229 245 - INIT_WORK(&trans->restart.wk, iwl_trans_restart_wk); 230 + INIT_DELAYED_WORK(&trans->restart.wk, iwl_trans_restart_wk); 246 231 247 232 return trans; 248 233 } ··· 286 271 287 272 void iwl_trans_free(struct iwl_trans *trans) 288 273 { 289 - cancel_work_sync(&trans->restart.wk); 274 + cancel_delayed_work_sync(&trans->restart.wk); 290 275 kmem_cache_destroy(trans->dev_cmd_pool); 291 276 } 292 277 ··· 418 403 419 404 iwl_trans_pcie_op_mode_leave(trans); 420 405 421 - cancel_work_sync(&trans->restart.wk); 406 + cancel_delayed_work_sync(&trans->restart.wk); 422 407 423 408 trans->op_mode = NULL; 424 409 ··· 555 540 iwl_trans_release_nic_access(struct iwl_trans *trans) 556 541 { 557 542 iwl_trans_pcie_release_nic_access(trans); 558 - __release(nic_access); 559 543 } 560 544 IWL_EXPORT_SYMBOL(iwl_trans_release_nic_access); 561 545
+8 -6
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 2 /* 3 - * Copyright (C) 2005-2014, 2018-2023, 2025 Intel Corporation 3 + * Copyright (C) 2005-2014, 2018-2023 Intel Corporation 4 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 6 */ ··· 876 876 * only valid for discrete (not integrated) NICs 877 877 * @invalid_tx_cmd: invalid TX command buffer 878 878 * @reduced_cap_sku: reduced capability supported SKU 879 - * @bw_limit: the max bandwidth 879 + * @no_160: device not supporting 160 MHz 880 880 * @step_urm: STEP is in URM, no support for MCS>9 in 320 MHz 881 881 * @restart: restart worker data 882 882 * @restart.wk: restart worker ··· 911 911 char hw_id_str[52]; 912 912 u32 sku_id[3]; 913 913 bool reduced_cap_sku; 914 - u16 bw_limit; 915 - bool step_urm; 914 + u8 no_160:1, step_urm:1; 916 915 917 916 u8 dsbr_urm_fw_dependent:1, 918 917 dsbr_urm_permanent:1; ··· 961 962 struct iwl_dma_ptr invalid_tx_cmd; 962 963 963 964 struct { 964 - struct work_struct wk; 965 + struct delayed_work wk; 965 966 struct iwl_fw_error_dump_mode mode; 966 967 bool during_reset; 967 968 } restart; ··· 1162 1163 */ 1163 1164 trans->restart.during_reset = test_bit(STATUS_IN_SW_RESET, 1164 1165 &trans->status); 1165 - queue_work(system_unbound_wq, &trans->restart.wk); 1166 + queue_delayed_work(system_unbound_wq, &trans->restart.wk, 0); 1166 1167 } 1167 1168 1168 1169 static inline void iwl_trans_fw_error(struct iwl_trans *trans, ··· 1261 1262 IWL_RESET_MODE_RESCAN, 1262 1263 IWL_RESET_MODE_FUNC_RESET, 1263 1264 IWL_RESET_MODE_PROD_RESET, 1265 + 1266 + /* keep last - special backoff value */ 1267 + IWL_RESET_MODE_BACKOFF, 1264 1268 }; 1265 1269 1266 1270 void iwl_trans_pcie_reset(struct iwl_trans *trans, enum iwl_reset_mode mode);
+3 -3
drivers/net/wireless/intel/iwlwifi/mld/agg.c
··· 124 124 125 125 rcu_read_lock(); 126 126 baid_data = rcu_dereference(mld->fw_id_to_ba[baid]); 127 - if (!IWL_FW_CHECK(mld, !baid_data, 128 - "Got valid BAID %d but not allocated, invalid BAR release!\n", 129 - baid)) 127 + if (IWL_FW_CHECK(mld, !baid_data, 128 + "Got valid BAID %d but not allocated, invalid BAR release!\n", 129 + baid)) 130 130 goto out_unlock; 131 131 132 132 if (IWL_FW_CHECK(mld, tid != baid_data->tid ||
+3 -2
drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
··· 949 949 snprintf(name, sizeof(name), "%pd", vif->debugfs_dir); 950 950 snprintf(target, sizeof(target), "../../../%pd3/iwlmld", 951 951 vif->debugfs_dir); 952 - mld_vif->dbgfs_slink = 953 - debugfs_create_symlink(name, mld->debugfs_dir, target); 952 + if (!mld_vif->dbgfs_slink) 953 + mld_vif->dbgfs_slink = 954 + debugfs_create_symlink(name, mld->debugfs_dir, target); 954 955 955 956 if (iwlmld_mod_params.power_scheme != IWL_POWER_SCHEME_CAM && 956 957 vif->type == NL80211_IFTYPE_STATION) {
+10 -3
drivers/net/wireless/intel/iwlwifi/mld/fw.c
··· 333 333 334 334 ret = iwl_trans_start_hw(mld->trans); 335 335 if (ret) 336 - return ret; 336 + goto err; 337 337 338 338 ret = iwl_mld_run_fw_init_sequence(mld); 339 339 if (ret) 340 - return ret; 340 + goto err; 341 341 342 342 ret = iwl_mld_init_mcc(mld); 343 343 if (ret) 344 - return ret; 344 + goto err; 345 345 346 346 mld->fw_status.running = true; 347 347 348 348 return 0; 349 + err: 350 + iwl_mld_stop_fw(mld); 351 + return ret; 349 352 } 350 353 351 354 void iwl_mld_stop_fw(struct iwl_mld *mld) ··· 360 357 iwl_fw_dbg_stop_sync(&mld->fwrt); 361 358 362 359 iwl_trans_stop_device(mld->trans); 360 + 361 + wiphy_work_cancel(mld->wiphy, &mld->async_handlers_wk); 362 + 363 + iwl_mld_purge_async_handlers_list(mld); 363 364 364 365 mld->fw_status.running = false; 365 366 }
+1
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
··· 651 651 652 652 #ifdef CONFIG_IWLWIFI_DEBUGFS 653 653 debugfs_remove(iwl_mld_vif_from_mac80211(vif)->dbgfs_slink); 654 + iwl_mld_vif_from_mac80211(vif)->dbgfs_slink = NULL; 654 655 #endif 655 656 656 657 iwl_mld_rm_vif(mld, vif);
+9 -2
drivers/net/wireless/intel/iwlwifi/mld/mld.c
··· 75 75 76 76 /* Setup async RX handling */ 77 77 spin_lock_init(&mld->async_handlers_lock); 78 + INIT_LIST_HEAD(&mld->async_handlers_list); 78 79 wiphy_work_init(&mld->async_handlers_wk, 79 80 iwl_mld_async_handlers_wk); 80 81 ··· 415 414 wiphy_unlock(mld->wiphy); 416 415 rtnl_unlock(); 417 416 iwl_fw_flush_dumps(&mld->fwrt); 418 - goto free_hw; 417 + goto err; 419 418 } 419 + 420 + /* We are about to stop the FW. Notifications may require an 421 + * operational FW, so handle them all here before we stop. 422 + */ 423 + wiphy_work_flush(mld->wiphy, &mld->async_handlers_wk); 420 424 421 425 iwl_mld_stop_fw(mld); 422 426 ··· 461 455 iwl_mld_leds_exit(mld); 462 456 free_nvm: 463 457 kfree(mld->nvm_data); 464 - free_hw: 458 + err: 459 + iwl_trans_op_mode_leave(mld->trans); 465 460 ieee80211_free_hw(mld->hw); 466 461 return ERR_PTR(ret); 467 462 }
-5
drivers/net/wireless/intel/iwlwifi/mld/mld.h
··· 298 298 #endif 299 299 300 300 iwl_mld_low_latency_restart_cleanup(mld); 301 - 302 - /* Empty the list of async notification handlers so we won't process 303 - * notifications from the dead fw after the reconfig flow. 304 - */ 305 - iwl_mld_purge_async_handlers_list(mld); 306 301 } 307 302 308 303 enum iwl_power_scheme {
+119 -126
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 2 /* 3 - * Copyright (C) 2005-2014, 2018-2025 Intel Corporation 3 + * Copyright (C) 2005-2014, 2018-2024 Intel Corporation 4 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 6 */ ··· 552 552 EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_hw_card_ids); 553 553 554 554 #define _IWL_DEV_INFO(_device, _subdevice, _mac_type, _mac_step, _rf_type, \ 555 - _rf_id, _rf_step, _bw_limit, _cores, _cdb, _cfg, _name) \ 555 + _rf_id, _rf_step, _no_160, _cores, _cdb, _cfg, _name) \ 556 556 { .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg), \ 557 557 .name = _name, .mac_type = _mac_type, .rf_type = _rf_type, .rf_step = _rf_step, \ 558 - .bw_limit = _bw_limit, .cores = _cores, .rf_id = _rf_id, \ 558 + .no_160 = _no_160, .cores = _cores, .rf_id = _rf_id, \ 559 559 .mac_step = _mac_step, .cdb = _cdb, .jacket = IWL_CFG_ANY } 560 560 561 561 #define IWL_DEV_INFO(_device, _subdevice, _cfg, _name) \ 562 562 _IWL_DEV_INFO(_device, _subdevice, IWL_CFG_ANY, IWL_CFG_ANY, \ 563 - IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, \ 564 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_ANY, \ 565 - _cfg, _name) 563 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, \ 564 + IWL_CFG_ANY, _cfg, _name) 566 565 567 566 VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { 568 567 #if IS_ENABLED(CONFIG_IWLMVM) ··· 724 725 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 725 726 IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY, 726 727 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 727 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 728 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 728 729 iwl9560_2ac_cfg_soc, iwl9461_160_name), 729 730 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 730 731 IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY, 731 732 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 732 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 733 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 733 734 iwl9560_2ac_cfg_soc, iwl9461_name), 734 735 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 735 736 IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY, 736 737 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 737 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 738 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 738 739 iwl9560_2ac_cfg_soc, iwl9462_160_name), 739 740 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 740 741 IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY, 741 742 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 742 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 743 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 743 744 iwl9560_2ac_cfg_soc, iwl9462_name), 744 745 745 746 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 746 747 IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY, 747 748 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 748 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 749 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 749 750 iwl9560_2ac_cfg_soc, iwl9560_160_name), 750 751 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 751 752 IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY, 752 753 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 753 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 754 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 754 755 iwl9560_2ac_cfg_soc, iwl9560_name), 755 756 756 757 _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, 757 758 IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY, 758 759 IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY, 759 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB, 760 + IWL_CFG_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB, 760 761 iwl9260_2ac_cfg, iwl9270_160_name), 761 762 _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, 762 763 IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY, 763 764 IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY, 764 - 80, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB, 765 + IWL_CFG_NO_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB, 765 766 iwl9260_2ac_cfg, iwl9270_name), 766 767 767 768 _IWL_DEV_INFO(0x271B, IWL_CFG_ANY, 768 769 IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY, 769 770 IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY, IWL_CFG_ANY, 770 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 771 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 771 772 iwl9260_2ac_cfg, iwl9162_160_name), 772 773 _IWL_DEV_INFO(0x271B, IWL_CFG_ANY, 773 774 IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY, 774 775 IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY, IWL_CFG_ANY, 775 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 776 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 776 777 iwl9260_2ac_cfg, iwl9162_name), 777 778 778 779 _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, 779 780 IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY, 780 781 IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY, 781 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 782 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 782 783 iwl9260_2ac_cfg, iwl9260_160_name), 783 784 _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, 784 785 IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY, 785 786 IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY, IWL_CFG_ANY, 786 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 787 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 787 788 iwl9260_2ac_cfg, iwl9260_name), 788 789 789 790 /* Qu with Jf */ ··· 791 792 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 792 793 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 793 794 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 794 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 795 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 795 796 iwl9560_qu_b0_jf_b0_cfg, iwl9461_160_name), 796 797 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 797 798 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 798 799 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 799 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 800 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 800 801 iwl9560_qu_b0_jf_b0_cfg, iwl9461_name), 801 802 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 802 803 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 803 804 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 804 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 805 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 805 806 iwl9560_qu_b0_jf_b0_cfg, iwl9462_160_name), 806 807 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 807 808 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 808 809 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 809 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 810 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 810 811 iwl9560_qu_b0_jf_b0_cfg, iwl9462_name), 811 812 812 813 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 813 814 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 814 815 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 815 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 816 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 816 817 iwl9560_qu_b0_jf_b0_cfg, iwl9560_160_name), 817 818 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 818 819 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 819 820 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 820 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 821 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 821 822 iwl9560_qu_b0_jf_b0_cfg, iwl9560_name), 822 823 823 824 _IWL_DEV_INFO(IWL_CFG_ANY, 0x1551, 824 825 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 825 826 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 826 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 827 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 827 828 iwl9560_qu_b0_jf_b0_cfg, iwl9560_killer_1550s_name), 828 829 _IWL_DEV_INFO(IWL_CFG_ANY, 0x1552, 829 830 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 830 831 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 831 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 832 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 832 833 iwl9560_qu_b0_jf_b0_cfg, iwl9560_killer_1550i_name), 833 834 834 835 /* Qu C step */ 835 836 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 836 837 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 837 838 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 838 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 839 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 839 840 iwl9560_qu_c0_jf_b0_cfg, iwl9461_160_name), 840 841 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 841 842 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 842 843 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 843 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 844 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 844 845 iwl9560_qu_c0_jf_b0_cfg, iwl9461_name), 845 846 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 846 847 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 847 848 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 848 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 849 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 849 850 iwl9560_qu_c0_jf_b0_cfg, iwl9462_160_name), 850 851 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 851 852 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 852 853 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 853 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 854 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 854 855 iwl9560_qu_c0_jf_b0_cfg, iwl9462_name), 855 856 856 857 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 857 858 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 858 859 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 859 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 860 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 860 861 iwl9560_qu_c0_jf_b0_cfg, iwl9560_160_name), 861 862 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 862 863 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 863 864 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 864 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 865 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 865 866 iwl9560_qu_c0_jf_b0_cfg, iwl9560_name), 866 867 867 868 _IWL_DEV_INFO(IWL_CFG_ANY, 0x1551, 868 869 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 869 870 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 870 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 871 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 871 872 iwl9560_qu_c0_jf_b0_cfg, iwl9560_killer_1550s_name), 872 873 _IWL_DEV_INFO(IWL_CFG_ANY, 0x1552, 873 874 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 874 875 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 875 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 876 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 876 877 iwl9560_qu_c0_jf_b0_cfg, iwl9560_killer_1550i_name), 877 878 878 879 /* QuZ */ 879 880 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 880 881 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 881 882 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 882 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 883 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 883 884 iwl9560_quz_a0_jf_b0_cfg, iwl9461_160_name), 884 885 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 885 886 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 886 887 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 887 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 888 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 888 889 iwl9560_quz_a0_jf_b0_cfg, iwl9461_name), 889 890 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 890 891 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 891 892 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 892 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 893 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 893 894 iwl9560_quz_a0_jf_b0_cfg, iwl9462_160_name), 894 895 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 895 896 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 896 897 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 897 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 898 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 898 899 iwl9560_quz_a0_jf_b0_cfg, iwl9462_name), 899 900 900 901 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 901 902 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 902 903 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 903 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 904 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 904 905 iwl9560_quz_a0_jf_b0_cfg, iwl9560_160_name), 905 906 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 906 907 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 907 908 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 908 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 909 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 909 910 iwl9560_quz_a0_jf_b0_cfg, iwl9560_name), 910 911 911 912 _IWL_DEV_INFO(IWL_CFG_ANY, 0x1551, 912 913 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 913 914 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 914 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 915 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 915 916 iwl9560_quz_a0_jf_b0_cfg, iwl9560_killer_1550s_name), 916 917 _IWL_DEV_INFO(IWL_CFG_ANY, 0x1552, 917 918 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 918 919 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 919 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 920 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 920 921 iwl9560_quz_a0_jf_b0_cfg, iwl9560_killer_1550i_name), 921 922 922 923 /* Qu with Hr */ ··· 924 925 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 925 926 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 926 927 IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, 927 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 928 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 928 929 iwl_qu_b0_hr1_b0, iwl_ax101_name), 929 930 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 930 931 IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP, 931 932 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 932 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 933 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 933 934 iwl_qu_b0_hr_b0, iwl_ax203_name), 934 935 935 936 /* Qu C step */ 936 937 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 937 938 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 938 939 IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, 939 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 940 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 940 941 iwl_qu_c0_hr1_b0, iwl_ax101_name), 941 942 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 942 943 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 943 944 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 944 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 945 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 945 946 iwl_qu_c0_hr_b0, iwl_ax203_name), 946 947 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 947 948 IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP, 948 949 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 949 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 950 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 950 951 iwl_qu_c0_hr_b0, iwl_ax201_name), 951 952 952 953 /* QuZ */ 953 954 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 954 955 IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY, 955 956 IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, 956 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 957 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 957 958 iwl_quz_a0_hr1_b0, iwl_ax101_name), 958 959 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 959 960 IWL_CFG_MAC_TYPE_QUZ, SILICON_B_STEP, 960 961 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 961 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 962 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 962 963 iwl_cfg_quz_a0_hr_b0, iwl_ax203_name), 963 964 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 964 965 IWL_CFG_MAC_TYPE_QUZ, SILICON_B_STEP, 965 966 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 966 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 967 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 967 968 iwl_cfg_quz_a0_hr_b0, iwl_ax201_name), 968 969 969 970 /* Ma */ 970 971 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 971 972 IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY, 972 973 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 973 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 974 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 974 975 iwl_cfg_ma, iwl_ax201_name), 975 976 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 976 977 IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY, 977 978 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 978 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 979 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 979 980 iwl_cfg_ma, iwl_ax211_name), 980 981 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 981 982 IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY, 982 983 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 983 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 984 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, 984 985 iwl_cfg_ma, iwl_ax231_name), 985 986 986 987 /* So with Hr */ 987 988 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 988 989 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 989 990 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 990 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 991 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 991 992 iwl_cfg_so_a0_hr_a0, iwl_ax203_name), 992 993 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 993 994 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 994 995 IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, 995 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 996 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 996 997 iwl_cfg_so_a0_hr_a0, iwl_ax101_name), 997 998 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 998 999 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 999 1000 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 1000 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1001 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1001 1002 iwl_cfg_so_a0_hr_a0, iwl_ax201_name), 1002 1003 1003 1004 /* So-F with Hr */ 1004 1005 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1005 1006 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1006 1007 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 1007 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1008 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1008 1009 iwl_cfg_so_a0_hr_a0, iwl_ax203_name), 1009 1010 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1010 1011 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1011 1012 IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY, 1012 - 80, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1013 + IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1013 1014 iwl_cfg_so_a0_hr_a0, iwl_ax101_name), 1014 1015 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1015 1016 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1016 1017 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 1017 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1018 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1018 1019 iwl_cfg_so_a0_hr_a0, iwl_ax201_name), 1019 1020 1020 1021 /* So-F with Gf */ 1021 1022 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1022 1023 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1023 1024 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1024 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1025 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1025 1026 iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name), 1026 1027 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1027 1028 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1028 1029 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1029 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_CDB, 1030 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB, 1030 1031 iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name), 1031 1032 1032 1033 /* SoF with JF2 */ 1033 1034 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1034 1035 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1035 1036 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 1036 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1037 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1037 1038 iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name), 1038 1039 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1039 1040 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1040 1041 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 1041 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1042 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1042 1043 iwlax210_2ax_cfg_so_jf_b0, iwl9560_name), 1043 1044 1044 1045 /* SoF with JF */ 1045 1046 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1046 1047 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1047 1048 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 1048 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1049 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1049 1050 iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name), 1050 1051 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1051 1052 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1052 1053 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 1053 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1054 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1054 1055 iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name), 1055 1056 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1056 1057 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1057 1058 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 1058 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1059 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1059 1060 iwlax210_2ax_cfg_so_jf_b0, iwl9461_name), 1060 1061 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1061 1062 IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, 1062 1063 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 1063 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1064 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1064 1065 iwlax210_2ax_cfg_so_jf_b0, iwl9462_name), 1065 1066 1066 1067 /* So with GF */ 1067 1068 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1068 1069 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1069 1070 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1070 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1071 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1071 1072 iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name), 1072 1073 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1073 1074 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1074 1075 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1075 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_CDB, 1076 + IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB, 1076 1077 iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name), 1077 1078 1078 1079 /* So with JF2 */ 1079 1080 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1080 1081 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1081 1082 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 1082 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1083 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1083 1084 iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name), 1084 1085 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1085 1086 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1086 1087 IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF, IWL_CFG_ANY, 1087 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1088 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1088 1089 iwlax210_2ax_cfg_so_jf_b0, iwl9560_name), 1089 1090 1090 1091 /* So with JF */ 1091 1092 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1092 1093 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1093 1094 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 1094 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1095 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1095 1096 iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name), 1096 1097 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1097 1098 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1098 1099 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 1099 - IWL_CFG_BW_NO_LIM, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1100 + IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1100 1101 iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name), 1101 1102 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1102 1103 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1103 1104 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1, IWL_CFG_ANY, 1104 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1105 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1105 1106 iwlax210_2ax_cfg_so_jf_b0, iwl9461_name), 1106 1107 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1107 1108 IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, 1108 1109 IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV, IWL_CFG_ANY, 1109 - 80, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1110 + IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, 1110 1111 iwlax210_2ax_cfg_so_jf_b0, iwl9462_name), 1111 1112 1112 1113 #endif /* CONFIG_IWLMVM */ ··· 1115 1116 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1116 1117 IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY, 1117 1118 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 1118 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1119 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1119 1120 iwl_cfg_bz, iwl_ax201_name), 1120 1121 1121 1122 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1122 1123 IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY, 1123 1124 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1124 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1125 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1125 1126 iwl_cfg_bz, iwl_ax211_name), 1126 1127 1127 1128 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, ··· 1133 1134 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1134 1135 IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY, 1135 1136 IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1136 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1137 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1137 1138 iwl_cfg_bz, iwl_wh_name), 1138 1139 1139 1140 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1140 1141 IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY, 1141 1142 IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY, 1142 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1143 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1143 1144 iwl_cfg_bz, iwl_ax201_name), 1144 1145 1145 1146 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1146 1147 IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY, 1147 1148 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1148 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1149 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1149 1150 iwl_cfg_bz, iwl_ax211_name), 1150 1151 1151 1152 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1152 1153 IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY, 1153 1154 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 1154 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1155 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1155 1156 iwl_cfg_bz, iwl_fm_name), 1156 1157 1157 1158 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1158 1159 IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY, 1159 1160 IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1160 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1161 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1161 1162 iwl_cfg_bz, iwl_wh_name), 1162 1163 1163 1164 /* Ga (Gl) */ 1164 1165 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1165 1166 IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY, 1166 1167 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 1167 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1168 + IWL_CFG_320, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1168 1169 iwl_cfg_gl, iwl_gl_name), 1169 1170 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1170 1171 IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY, 1171 1172 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 1172 - 160, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1173 + IWL_CFG_NO_320, IWL_CFG_ANY, IWL_CFG_NO_CDB, 1173 1174 iwl_cfg_gl, iwl_mtp_name), 1174 1175 1175 1176 /* Sc */ 1176 1177 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1177 1178 IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY, 1178 1179 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1179 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1180 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1180 1181 iwl_cfg_sc, iwl_ax211_name), 1181 1182 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1182 1183 IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY, 1183 1184 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 1184 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1185 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1185 1186 iwl_cfg_sc, iwl_fm_name), 1186 1187 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1187 1188 IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY, 1188 1189 IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1189 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_ANY, 1190 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1190 1191 iwl_cfg_sc, iwl_wh_name), 1191 - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1192 - IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY, 1193 - IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1194 - 160, IWL_CFG_ANY, IWL_CFG_ANY, 1195 - iwl_cfg_sc, iwl_sp_name), 1196 1192 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1197 1193 IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY, 1198 1194 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1199 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1195 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1200 1196 iwl_cfg_sc2, iwl_ax211_name), 1201 1197 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1202 1198 IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY, 1203 1199 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 1204 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1200 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1205 1201 iwl_cfg_sc2, iwl_fm_name), 1206 1202 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1207 1203 IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY, 1208 1204 IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1209 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_ANY, 1205 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1210 1206 iwl_cfg_sc2, iwl_wh_name), 1211 - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1212 - IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY, 1213 - IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1214 - 160, IWL_CFG_ANY, IWL_CFG_ANY, 1215 - iwl_cfg_sc2, iwl_sp_name), 1216 1207 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1217 1208 IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY, 1218 1209 IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, 1219 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1210 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1220 1211 iwl_cfg_sc2f, iwl_ax211_name), 1221 1212 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1222 1213 IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY, 1223 1214 IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, 1224 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1215 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1225 1216 iwl_cfg_sc2f, iwl_fm_name), 1226 1217 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1227 1218 IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY, 1228 1219 IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1229 - IWL_CFG_BW_NO_LIM, IWL_CFG_ANY, IWL_CFG_ANY, 1220 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1230 1221 iwl_cfg_sc2f, iwl_wh_name), 1231 - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1232 - IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY, 1233 - IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY, 1234 - 160, IWL_CFG_ANY, IWL_CFG_ANY, 1235 - iwl_cfg_sc2f, iwl_sp_name), 1236 1222 1237 1223 /* Dr */ 1238 1224 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1239 1225 IWL_CFG_MAC_TYPE_DR, IWL_CFG_ANY, 1240 1226 IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1241 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1227 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1242 1228 iwl_cfg_dr, iwl_dr_name), 1243 1229 1244 1230 /* Br */ 1245 1231 _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, 1246 1232 IWL_CFG_MAC_TYPE_BR, IWL_CFG_ANY, 1247 1233 IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1248 - IWL_CFG_BW_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1234 + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, 1249 1235 iwl_cfg_br, iwl_br_name), 1250 1236 #endif /* CONFIG_IWLMLD */ 1251 1237 }; ··· 1382 1398 VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info * 1383 1399 iwl_pci_find_dev_info(u16 device, u16 subsystem_device, 1384 1400 u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb, 1385 - u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step) 1401 + u8 jacket, u8 rf_id, u8 no_160, u8 cores, u8 rf_step) 1386 1402 { 1387 1403 int num_devices = ARRAY_SIZE(iwl_dev_info_table); 1388 1404 int i; ··· 1425 1441 dev_info->rf_id != rf_id) 1426 1442 continue; 1427 1443 1428 - /* 1429 - * Check that bw_limit have the same "boolean" value since 1430 - * IWL_SUBDEVICE_BW_LIM can only return a boolean value and 1431 - * dev_info->bw_limit encodes a non-boolean value. 1432 - * dev_info->bw_limit == IWL_CFG_BW_NO_LIM must be equal to 1433 - * !bw_limit to have a match. 1434 - */ 1435 - if (dev_info->bw_limit != IWL_CFG_BW_ANY && 1436 - (dev_info->bw_limit == IWL_CFG_BW_NO_LIM) == !!bw_limit) 1444 + if (dev_info->no_160 != (u8)IWL_CFG_ANY && 1445 + dev_info->no_160 != no_160) 1437 1446 continue; 1438 1447 1439 1448 if (dev_info->cores != (u8)IWL_CFG_ANY && ··· 1564 1587 CSR_HW_RFID_IS_CDB(iwl_trans->hw_rf_id), 1565 1588 CSR_HW_RFID_IS_JACKET(iwl_trans->hw_rf_id), 1566 1589 IWL_SUBDEVICE_RF_ID(pdev->subsystem_device), 1567 - IWL_SUBDEVICE_BW_LIM(pdev->subsystem_device), 1590 + IWL_SUBDEVICE_NO_160(pdev->subsystem_device), 1568 1591 IWL_SUBDEVICE_CORES(pdev->subsystem_device), 1569 1592 CSR_HW_RFID_STEP(iwl_trans->hw_rf_id)); 1570 1593 if (dev_info) { 1571 1594 iwl_trans->cfg = dev_info->cfg; 1572 1595 iwl_trans->name = dev_info->name; 1573 - iwl_trans->bw_limit = dev_info->bw_limit; 1596 + iwl_trans->no_160 = dev_info->no_160 == IWL_CFG_NO_160; 1574 1597 } 1575 1598 1576 1599 #if IS_ENABLED(CONFIG_IWLMVM) ··· 1736 1759 * Scratch value was altered, this means the device was powered off, we 1737 1760 * need to reset it completely. 1738 1761 * Note: MAC (bits 0:7) will be cleared upon suspend even with wowlan, 1739 - * so assume that any bits there mean that the device is usable. 1762 + * but not bits [15:8]. So if we have bits set in lower word, assume 1763 + * the device is alive. 1764 + * For older devices, just try silently to grab the NIC. 1740 1765 */ 1741 - if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ && 1742 - !iwl_read32(trans, CSR_FUNC_SCRATCH)) 1743 - device_was_powered_off = true; 1766 + if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) { 1767 + if (!(iwl_read32(trans, CSR_FUNC_SCRATCH) & 1768 + CSR_FUNC_SCRATCH_POWER_OFF_MASK)) 1769 + device_was_powered_off = true; 1770 + } else { 1771 + /* 1772 + * bh are re-enabled by iwl_trans_pcie_release_nic_access, 1773 + * so re-enable them if _iwl_trans_pcie_grab_nic_access fails. 1774 + */ 1775 + local_bh_disable(); 1776 + if (_iwl_trans_pcie_grab_nic_access(trans, true)) { 1777 + iwl_trans_pcie_release_nic_access(trans); 1778 + } else { 1779 + device_was_powered_off = true; 1780 + local_bh_enable(); 1781 + } 1782 + } 1744 1783 1745 1784 if (restore || device_was_powered_off) { 1746 1785 trans->state = IWL_TRANS_NO_FW;
+5 -4
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
··· 558 558 void iwl_trans_pcie_free_pnvm_dram_regions(struct iwl_dram_regions *dram_regions, 559 559 struct device *dev); 560 560 561 - bool __iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans); 562 - #define _iwl_trans_pcie_grab_nic_access(trans) \ 561 + bool __iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent); 562 + #define _iwl_trans_pcie_grab_nic_access(trans, silent) \ 563 563 __cond_lock(nic_access_nobh, \ 564 - likely(__iwl_trans_pcie_grab_nic_access(trans))) 564 + likely(__iwl_trans_pcie_grab_nic_access(trans, silent))) 565 565 566 566 void iwl_trans_pcie_check_product_reset_status(struct pci_dev *pdev); 567 567 void iwl_trans_pcie_check_product_reset_mode(struct pci_dev *pdev); ··· 1105 1105 int iwl_trans_pcie_read_config32(struct iwl_trans *trans, u32 ofs, 1106 1106 u32 *val); 1107 1107 bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans); 1108 - void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans); 1108 + void __releases(nic_access_nobh) 1109 + iwl_trans_pcie_release_nic_access(struct iwl_trans *trans); 1109 1110 1110 1111 /* transport gen 1 exported functions */ 1111 1112 void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr);
+12 -4
drivers/net/wireless/intel/iwlwifi/pcie/trans.c
··· 2351 2351 struct iwl_trans_pcie_removal *removal; 2352 2352 char _msg = 0, *msg = &_msg; 2353 2353 2354 - if (WARN_ON(mode < IWL_RESET_MODE_REMOVE_ONLY)) 2354 + if (WARN_ON(mode < IWL_RESET_MODE_REMOVE_ONLY || 2355 + mode == IWL_RESET_MODE_BACKOFF)) 2355 2356 return; 2356 2357 2357 2358 if (test_bit(STATUS_TRANS_DEAD, &trans->status)) ··· 2406 2405 * This version doesn't disable BHs but rather assumes they're 2407 2406 * already disabled. 2408 2407 */ 2409 - bool __iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans) 2408 + bool __iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent) 2410 2409 { 2411 2410 int ret; 2412 2411 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); ··· 2458 2457 if (unlikely(ret < 0)) { 2459 2458 u32 cntrl = iwl_read32(trans, CSR_GP_CNTRL); 2460 2459 2460 + if (silent) { 2461 + spin_unlock(&trans_pcie->reg_lock); 2462 + return false; 2463 + } 2464 + 2461 2465 WARN_ONCE(1, 2462 2466 "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n", 2463 2467 cntrl); ··· 2494 2488 bool ret; 2495 2489 2496 2490 local_bh_disable(); 2497 - ret = __iwl_trans_pcie_grab_nic_access(trans); 2491 + ret = __iwl_trans_pcie_grab_nic_access(trans, false); 2498 2492 if (ret) { 2499 2493 /* keep BHs disabled until iwl_trans_pcie_release_nic_access */ 2500 2494 return ret; ··· 2503 2497 return false; 2504 2498 } 2505 2499 2506 - void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans) 2500 + void __releases(nic_access_nobh) 2501 + iwl_trans_pcie_release_nic_access(struct iwl_trans *trans) 2507 2502 { 2508 2503 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 2509 2504 ··· 2531 2524 * scheduled on different CPUs (after we drop reg_lock). 2532 2525 */ 2533 2526 out: 2527 + __release(nic_access_nobh); 2534 2528 spin_unlock_bh(&trans_pcie->reg_lock); 2535 2529 } 2536 2530
+1 -1
drivers/net/wireless/intel/iwlwifi/pcie/tx.c
··· 1021 1021 * returned. This needs to be done only on NICs that have 1022 1022 * apmg_wake_up_wa set (see above.) 1023 1023 */ 1024 - if (!_iwl_trans_pcie_grab_nic_access(trans)) 1024 + if (!_iwl_trans_pcie_grab_nic_access(trans, false)) 1025 1025 return -EIO; 1026 1026 1027 1027 /*
+5 -10
drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
··· 2 2 /* 3 3 * KUnit tests for the iwlwifi device info table 4 4 * 5 - * Copyright (C) 2023-2025 Intel Corporation 5 + * Copyright (C) 2023-2024 Intel Corporation 6 6 */ 7 7 #include <kunit/test.h> 8 8 #include <linux/pci.h> ··· 13 13 14 14 static void iwl_pci_print_dev_info(const char *pfx, const struct iwl_dev_info *di) 15 15 { 16 - printk(KERN_DEBUG "%sdev=%.4x,subdev=%.4x,mac_type=%.4x,mac_step=%.4x,rf_type=%.4x,cdb=%d,jacket=%d,rf_id=%.2x,bw_limit=%d,cores=%.2x\n", 16 + printk(KERN_DEBUG "%sdev=%.4x,subdev=%.4x,mac_type=%.4x,mac_step=%.4x,rf_type=%.4x,cdb=%d,jacket=%d,rf_id=%.2x,no_160=%d,cores=%.2x\n", 17 17 pfx, di->device, di->subdevice, di->mac_type, di->mac_step, 18 - di->rf_type, di->cdb, di->jacket, di->rf_id, di->bw_limit, 18 + di->rf_type, di->cdb, di->jacket, di->rf_id, di->no_160, 19 19 di->cores); 20 20 } 21 21 ··· 31 31 di->mac_type, di->mac_step, 32 32 di->rf_type, di->cdb, 33 33 di->jacket, di->rf_id, 34 - di->bw_limit != IWL_CFG_BW_NO_LIM, 35 - di->cores, di->rf_step); 36 - if (!ret) { 37 - iwl_pci_print_dev_info("No entry found for: ", di); 38 - KUNIT_FAIL(test, 39 - "No entry found for entry at index %d\n", idx); 40 - } else if (ret != di) { 34 + di->no_160, di->cores, di->rf_step); 35 + if (ret != di) { 41 36 iwl_pci_print_dev_info("searched: ", di); 42 37 iwl_pci_print_dev_info("found: ", ret); 43 38 KUNIT_FAIL(test,
-1
drivers/net/wireless/purelifi/plfxlc/mac.c
··· 102 102 void plfxlc_mac_release(struct plfxlc_mac *mac) 103 103 { 104 104 plfxlc_chip_release(&mac->chip); 105 - lockdep_assert_held(&mac->lock); 106 105 } 107 106 108 107 int plfxlc_op_start(struct ieee80211_hw *hw)
+50 -2
drivers/ptp/ptp_ocp.c
··· 2578 2578 .set_output = ptp_ocp_sma_fb_set_output, 2579 2579 }; 2580 2580 2581 + static int 2582 + ptp_ocp_sma_adva_set_output(struct ptp_ocp *bp, int sma_nr, u32 val) 2583 + { 2584 + u32 reg, mask, shift; 2585 + unsigned long flags; 2586 + u32 __iomem *gpio; 2587 + 2588 + gpio = sma_nr > 2 ? &bp->sma_map1->gpio2 : &bp->sma_map2->gpio2; 2589 + shift = sma_nr & 1 ? 0 : 16; 2590 + 2591 + mask = 0xffff << (16 - shift); 2592 + 2593 + spin_lock_irqsave(&bp->lock, flags); 2594 + 2595 + reg = ioread32(gpio); 2596 + reg = (reg & mask) | (val << shift); 2597 + 2598 + iowrite32(reg, gpio); 2599 + 2600 + spin_unlock_irqrestore(&bp->lock, flags); 2601 + 2602 + return 0; 2603 + } 2604 + 2605 + static int 2606 + ptp_ocp_sma_adva_set_inputs(struct ptp_ocp *bp, int sma_nr, u32 val) 2607 + { 2608 + u32 reg, mask, shift; 2609 + unsigned long flags; 2610 + u32 __iomem *gpio; 2611 + 2612 + gpio = sma_nr > 2 ? &bp->sma_map2->gpio1 : &bp->sma_map1->gpio1; 2613 + shift = sma_nr & 1 ? 0 : 16; 2614 + 2615 + mask = 0xffff << (16 - shift); 2616 + 2617 + spin_lock_irqsave(&bp->lock, flags); 2618 + 2619 + reg = ioread32(gpio); 2620 + reg = (reg & mask) | (val << shift); 2621 + 2622 + iowrite32(reg, gpio); 2623 + 2624 + spin_unlock_irqrestore(&bp->lock, flags); 2625 + 2626 + return 0; 2627 + } 2628 + 2581 2629 static const struct ocp_sma_op ocp_adva_sma_op = { 2582 2630 .tbl = { ptp_ocp_adva_sma_in, ptp_ocp_adva_sma_out }, 2583 2631 .init = ptp_ocp_sma_fb_init, 2584 2632 .get = ptp_ocp_sma_fb_get, 2585 - .set_inputs = ptp_ocp_sma_fb_set_inputs, 2586 - .set_output = ptp_ocp_sma_fb_set_output, 2633 + .set_inputs = ptp_ocp_sma_adva_set_inputs, 2634 + .set_output = ptp_ocp_sma_adva_set_output, 2587 2635 }; 2588 2636 2589 2637 static int
+3 -1
include/net/bluetooth/hci.h
··· 1931 1931 __u8 sync_cte_type; 1932 1932 } __packed; 1933 1933 1934 + #define HCI_OP_LE_PA_CREATE_SYNC_CANCEL 0x2045 1935 + 1934 1936 #define HCI_OP_LE_PA_TERM_SYNC 0x2046 1935 1937 struct hci_cp_le_pa_term_sync { 1936 1938 __le16 handle; ··· 2832 2830 __le16 bis_handle[]; 2833 2831 } __packed; 2834 2832 2835 - #define HCI_EVT_LE_BIG_SYNC_ESTABILISHED 0x1d 2833 + #define HCI_EVT_LE_BIG_SYNC_ESTABLISHED 0x1d 2836 2834 struct hci_evt_le_big_sync_estabilished { 2837 2835 __u8 status; 2838 2836 __u8 handle;
+9 -11
include/net/bluetooth/hci_core.h
··· 1113 1113 return NULL; 1114 1114 } 1115 1115 1116 - static inline struct hci_conn *hci_conn_hash_lookup_sid(struct hci_dev *hdev, 1117 - __u8 sid, 1118 - bdaddr_t *dst, 1119 - __u8 dst_type) 1116 + static inline struct hci_conn * 1117 + hci_conn_hash_lookup_create_pa_sync(struct hci_dev *hdev) 1120 1118 { 1121 1119 struct hci_conn_hash *h = &hdev->conn_hash; 1122 1120 struct hci_conn *c; ··· 1122 1124 rcu_read_lock(); 1123 1125 1124 1126 list_for_each_entry_rcu(c, &h->list, list) { 1125 - if (c->type != ISO_LINK || bacmp(&c->dst, dst) || 1126 - c->dst_type != dst_type || c->sid != sid) 1127 + if (c->type != ISO_LINK) 1128 + continue; 1129 + 1130 + if (!test_bit(HCI_CONN_CREATE_PA_SYNC, &c->flags)) 1127 1131 continue; 1128 1132 1129 1133 rcu_read_unlock(); ··· 1524 1524 void hci_sco_setup(struct hci_conn *conn, __u8 status); 1525 1525 bool hci_iso_setup_path(struct hci_conn *conn); 1526 1526 int hci_le_create_cis_pending(struct hci_dev *hdev); 1527 - int hci_pa_create_sync_pending(struct hci_dev *hdev); 1528 - int hci_le_big_create_sync_pending(struct hci_dev *hdev); 1529 1527 int hci_conn_check_create_cis(struct hci_conn *conn); 1530 1528 1531 1529 struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst, ··· 1564 1566 __u8 data_len, __u8 *data); 1565 1567 struct hci_conn *hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst, 1566 1568 __u8 dst_type, __u8 sid, struct bt_iso_qos *qos); 1567 - int hci_le_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon, 1568 - struct bt_iso_qos *qos, 1569 - __u16 sync_handle, __u8 num_bis, __u8 bis[]); 1569 + int hci_conn_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon, 1570 + struct bt_iso_qos *qos, __u16 sync_handle, 1571 + __u8 num_bis, __u8 bis[]); 1570 1572 int hci_conn_check_link_mode(struct hci_conn *conn); 1571 1573 int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level); 1572 1574 int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type,
+3
include/net/bluetooth/hci_sync.h
··· 185 185 int hci_cancel_connect_sync(struct hci_dev *hdev, struct hci_conn *conn); 186 186 int hci_le_conn_update_sync(struct hci_dev *hdev, struct hci_conn *conn, 187 187 struct hci_conn_params *params); 188 + 189 + int hci_connect_pa_sync(struct hci_dev *hdev, struct hci_conn *conn); 190 + int hci_connect_big_sync(struct hci_dev *hdev, struct hci_conn *conn);
-3
include/net/xdp_sock.h
··· 71 71 */ 72 72 u32 tx_budget_spent; 73 73 74 - /* Protects generic receive. */ 75 - spinlock_t rx_lock; 76 - 77 74 /* Statistics */ 78 75 u64 rx_dropped; 79 76 u64 rx_queue_full;
+3 -1
include/net/xsk_buff_pool.h
··· 53 53 refcount_t users; 54 54 struct xdp_umem *umem; 55 55 struct work_struct work; 56 + /* Protects generic receive in shared and non-shared umem mode. */ 57 + spinlock_t rx_lock; 56 58 struct list_head free_list; 57 59 struct list_head xskb_list; 58 60 u32 heads_cnt; ··· 240 238 return orig_addr; 241 239 242 240 offset = xskb->xdp.data - xskb->xdp.data_hard_start; 243 - orig_addr -= offset; 244 241 offset += pool->headroom; 242 + orig_addr -= offset; 245 243 return orig_addr + (offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT); 246 244 } 247 245
+7 -174
net/bluetooth/hci_conn.c
··· 2064 2064 return hci_le_create_big(conn, &conn->iso_qos); 2065 2065 } 2066 2066 2067 - static void create_pa_complete(struct hci_dev *hdev, void *data, int err) 2068 - { 2069 - bt_dev_dbg(hdev, ""); 2070 - 2071 - if (err) 2072 - bt_dev_err(hdev, "Unable to create PA: %d", err); 2073 - } 2074 - 2075 - static bool hci_conn_check_create_pa_sync(struct hci_conn *conn) 2076 - { 2077 - if (conn->type != ISO_LINK || conn->sid == HCI_SID_INVALID) 2078 - return false; 2079 - 2080 - return true; 2081 - } 2082 - 2083 - static int create_pa_sync(struct hci_dev *hdev, void *data) 2084 - { 2085 - struct hci_cp_le_pa_create_sync cp = {0}; 2086 - struct hci_conn *conn; 2087 - int err = 0; 2088 - 2089 - hci_dev_lock(hdev); 2090 - 2091 - rcu_read_lock(); 2092 - 2093 - /* The spec allows only one pending LE Periodic Advertising Create 2094 - * Sync command at a time. If the command is pending now, don't do 2095 - * anything. We check for pending connections after each PA Sync 2096 - * Established event. 2097 - * 2098 - * BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E 2099 - * page 2493: 2100 - * 2101 - * If the Host issues this command when another HCI_LE_Periodic_ 2102 - * Advertising_Create_Sync command is pending, the Controller shall 2103 - * return the error code Command Disallowed (0x0C). 2104 - */ 2105 - list_for_each_entry_rcu(conn, &hdev->conn_hash.list, list) { 2106 - if (test_bit(HCI_CONN_CREATE_PA_SYNC, &conn->flags)) 2107 - goto unlock; 2108 - } 2109 - 2110 - list_for_each_entry_rcu(conn, &hdev->conn_hash.list, list) { 2111 - if (hci_conn_check_create_pa_sync(conn)) { 2112 - struct bt_iso_qos *qos = &conn->iso_qos; 2113 - 2114 - cp.options = qos->bcast.options; 2115 - cp.sid = conn->sid; 2116 - cp.addr_type = conn->dst_type; 2117 - bacpy(&cp.addr, &conn->dst); 2118 - cp.skip = cpu_to_le16(qos->bcast.skip); 2119 - cp.sync_timeout = cpu_to_le16(qos->bcast.sync_timeout); 2120 - cp.sync_cte_type = qos->bcast.sync_cte_type; 2121 - 2122 - break; 2123 - } 2124 - } 2125 - 2126 - unlock: 2127 - rcu_read_unlock(); 2128 - 2129 - hci_dev_unlock(hdev); 2130 - 2131 - if (bacmp(&cp.addr, BDADDR_ANY)) { 2132 - hci_dev_set_flag(hdev, HCI_PA_SYNC); 2133 - set_bit(HCI_CONN_CREATE_PA_SYNC, &conn->flags); 2134 - 2135 - err = __hci_cmd_sync_status(hdev, HCI_OP_LE_PA_CREATE_SYNC, 2136 - sizeof(cp), &cp, HCI_CMD_TIMEOUT); 2137 - if (!err) 2138 - err = hci_update_passive_scan_sync(hdev); 2139 - 2140 - if (err) { 2141 - hci_dev_clear_flag(hdev, HCI_PA_SYNC); 2142 - clear_bit(HCI_CONN_CREATE_PA_SYNC, &conn->flags); 2143 - } 2144 - } 2145 - 2146 - return err; 2147 - } 2148 - 2149 - int hci_pa_create_sync_pending(struct hci_dev *hdev) 2150 - { 2151 - /* Queue start pa_create_sync and scan */ 2152 - return hci_cmd_sync_queue(hdev, create_pa_sync, 2153 - NULL, create_pa_complete); 2154 - } 2155 - 2156 2067 struct hci_conn *hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst, 2157 2068 __u8 dst_type, __u8 sid, 2158 2069 struct bt_iso_qos *qos) ··· 2078 2167 conn->dst_type = dst_type; 2079 2168 conn->sid = sid; 2080 2169 conn->state = BT_LISTEN; 2170 + conn->conn_timeout = msecs_to_jiffies(qos->bcast.sync_timeout * 10); 2081 2171 2082 2172 hci_conn_hold(conn); 2083 2173 2084 - hci_pa_create_sync_pending(hdev); 2174 + hci_connect_pa_sync(hdev, conn); 2085 2175 2086 2176 return conn; 2087 2177 } 2088 2178 2089 - static bool hci_conn_check_create_big_sync(struct hci_conn *conn) 2090 - { 2091 - if (!conn->num_bis) 2092 - return false; 2093 - 2094 - return true; 2095 - } 2096 - 2097 - static void big_create_sync_complete(struct hci_dev *hdev, void *data, int err) 2098 - { 2099 - bt_dev_dbg(hdev, ""); 2100 - 2101 - if (err) 2102 - bt_dev_err(hdev, "Unable to create BIG sync: %d", err); 2103 - } 2104 - 2105 - static int big_create_sync(struct hci_dev *hdev, void *data) 2106 - { 2107 - DEFINE_FLEX(struct hci_cp_le_big_create_sync, pdu, bis, num_bis, 0x11); 2108 - struct hci_conn *conn; 2109 - 2110 - rcu_read_lock(); 2111 - 2112 - pdu->num_bis = 0; 2113 - 2114 - /* The spec allows only one pending LE BIG Create Sync command at 2115 - * a time. If the command is pending now, don't do anything. We 2116 - * check for pending connections after each BIG Sync Established 2117 - * event. 2118 - * 2119 - * BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E 2120 - * page 2586: 2121 - * 2122 - * If the Host sends this command when the Controller is in the 2123 - * process of synchronizing to any BIG, i.e. the HCI_LE_BIG_Sync_ 2124 - * Established event has not been generated, the Controller shall 2125 - * return the error code Command Disallowed (0x0C). 2126 - */ 2127 - list_for_each_entry_rcu(conn, &hdev->conn_hash.list, list) { 2128 - if (test_bit(HCI_CONN_CREATE_BIG_SYNC, &conn->flags)) 2129 - goto unlock; 2130 - } 2131 - 2132 - list_for_each_entry_rcu(conn, &hdev->conn_hash.list, list) { 2133 - if (hci_conn_check_create_big_sync(conn)) { 2134 - struct bt_iso_qos *qos = &conn->iso_qos; 2135 - 2136 - set_bit(HCI_CONN_CREATE_BIG_SYNC, &conn->flags); 2137 - 2138 - pdu->handle = qos->bcast.big; 2139 - pdu->sync_handle = cpu_to_le16(conn->sync_handle); 2140 - pdu->encryption = qos->bcast.encryption; 2141 - memcpy(pdu->bcode, qos->bcast.bcode, 2142 - sizeof(pdu->bcode)); 2143 - pdu->mse = qos->bcast.mse; 2144 - pdu->timeout = cpu_to_le16(qos->bcast.timeout); 2145 - pdu->num_bis = conn->num_bis; 2146 - memcpy(pdu->bis, conn->bis, conn->num_bis); 2147 - 2148 - break; 2149 - } 2150 - } 2151 - 2152 - unlock: 2153 - rcu_read_unlock(); 2154 - 2155 - if (!pdu->num_bis) 2156 - return 0; 2157 - 2158 - return hci_send_cmd(hdev, HCI_OP_LE_BIG_CREATE_SYNC, 2159 - struct_size(pdu, bis, pdu->num_bis), pdu); 2160 - } 2161 - 2162 - int hci_le_big_create_sync_pending(struct hci_dev *hdev) 2163 - { 2164 - /* Queue big_create_sync */ 2165 - return hci_cmd_sync_queue_once(hdev, big_create_sync, 2166 - NULL, big_create_sync_complete); 2167 - } 2168 - 2169 - int hci_le_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon, 2170 - struct bt_iso_qos *qos, 2171 - __u16 sync_handle, __u8 num_bis, __u8 bis[]) 2179 + int hci_conn_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon, 2180 + struct bt_iso_qos *qos, __u16 sync_handle, 2181 + __u8 num_bis, __u8 bis[]) 2172 2182 { 2173 2183 int err; 2174 2184 ··· 2106 2274 2107 2275 hcon->num_bis = num_bis; 2108 2276 memcpy(hcon->bis, bis, num_bis); 2277 + hcon->conn_timeout = msecs_to_jiffies(qos->bcast.timeout * 10); 2109 2278 } 2110 2279 2111 - return hci_le_big_create_sync_pending(hdev); 2280 + return hci_connect_big_sync(hdev, hcon); 2112 2281 } 2113 2282 2114 2283 static void create_big_complete(struct hci_dev *hdev, void *data, int err)
+4 -11
net/bluetooth/hci_event.c
··· 6378 6378 6379 6379 hci_dev_clear_flag(hdev, HCI_PA_SYNC); 6380 6380 6381 - conn = hci_conn_hash_lookup_sid(hdev, ev->sid, &ev->bdaddr, 6382 - ev->bdaddr_type); 6381 + conn = hci_conn_hash_lookup_create_pa_sync(hdev); 6383 6382 if (!conn) { 6384 6383 bt_dev_err(hdev, 6385 6384 "Unable to find connection for dst %pMR sid 0x%2.2x", ··· 6417 6418 } 6418 6419 6419 6420 unlock: 6420 - /* Handle any other pending PA sync command */ 6421 - hci_pa_create_sync_pending(hdev); 6422 - 6423 6421 hci_dev_unlock(hdev); 6424 6422 } 6425 6423 ··· 6928 6932 6929 6933 bt_dev_dbg(hdev, "status 0x%2.2x", ev->status); 6930 6934 6931 - if (!hci_le_ev_skb_pull(hdev, skb, HCI_EVT_LE_BIG_SYNC_ESTABILISHED, 6935 + if (!hci_le_ev_skb_pull(hdev, skb, HCI_EVT_LE_BIG_SYNC_ESTABLISHED, 6932 6936 flex_array_size(ev, bis, ev->num_bis))) 6933 6937 return; 6934 6938 ··· 6999 7003 } 7000 7004 7001 7005 unlock: 7002 - /* Handle any other pending BIG sync command */ 7003 - hci_le_big_create_sync_pending(hdev); 7004 - 7005 7006 hci_dev_unlock(hdev); 7006 7007 } 7007 7008 ··· 7120 7127 hci_le_create_big_complete_evt, 7121 7128 sizeof(struct hci_evt_le_create_big_complete), 7122 7129 HCI_MAX_EVENT_SIZE), 7123 - /* [0x1d = HCI_EV_LE_BIG_SYNC_ESTABILISHED] */ 7124 - HCI_LE_EV_VL(HCI_EVT_LE_BIG_SYNC_ESTABILISHED, 7130 + /* [0x1d = HCI_EV_LE_BIG_SYNC_ESTABLISHED] */ 7131 + HCI_LE_EV_VL(HCI_EVT_LE_BIG_SYNC_ESTABLISHED, 7125 7132 hci_le_big_sync_established_evt, 7126 7133 sizeof(struct hci_evt_le_big_sync_estabilished), 7127 7134 HCI_MAX_EVENT_SIZE),
+145 -5
net/bluetooth/hci_sync.c
··· 2693 2693 2694 2694 /* Force address filtering if PA Sync is in progress */ 2695 2695 if (hci_dev_test_flag(hdev, HCI_PA_SYNC)) { 2696 - struct hci_cp_le_pa_create_sync *sent; 2696 + struct hci_conn *conn; 2697 2697 2698 - sent = hci_sent_cmd_data(hdev, HCI_OP_LE_PA_CREATE_SYNC); 2699 - if (sent) { 2698 + conn = hci_conn_hash_lookup_create_pa_sync(hdev); 2699 + if (conn) { 2700 2700 struct conn_params pa; 2701 2701 2702 2702 memset(&pa, 0, sizeof(pa)); 2703 2703 2704 - bacpy(&pa.addr, &sent->addr); 2705 - pa.addr_type = sent->addr_type; 2704 + bacpy(&pa.addr, &conn->dst); 2705 + pa.addr_type = conn->dst_type; 2706 2706 2707 2707 /* Clear first since there could be addresses left 2708 2708 * behind. ··· 6894 6894 6895 6895 return __hci_cmd_sync_status(hdev, HCI_OP_LE_CONN_UPDATE, 6896 6896 sizeof(cp), &cp, HCI_CMD_TIMEOUT); 6897 + } 6898 + 6899 + static void create_pa_complete(struct hci_dev *hdev, void *data, int err) 6900 + { 6901 + bt_dev_dbg(hdev, "err %d", err); 6902 + 6903 + if (!err) 6904 + return; 6905 + 6906 + hci_dev_clear_flag(hdev, HCI_PA_SYNC); 6907 + 6908 + if (err == -ECANCELED) 6909 + return; 6910 + 6911 + hci_dev_lock(hdev); 6912 + 6913 + hci_update_passive_scan_sync(hdev); 6914 + 6915 + hci_dev_unlock(hdev); 6916 + } 6917 + 6918 + static int hci_le_pa_create_sync(struct hci_dev *hdev, void *data) 6919 + { 6920 + struct hci_cp_le_pa_create_sync cp; 6921 + struct hci_conn *conn = data; 6922 + struct bt_iso_qos *qos = &conn->iso_qos; 6923 + int err; 6924 + 6925 + if (!hci_conn_valid(hdev, conn)) 6926 + return -ECANCELED; 6927 + 6928 + if (hci_dev_test_and_set_flag(hdev, HCI_PA_SYNC)) 6929 + return -EBUSY; 6930 + 6931 + /* Mark HCI_CONN_CREATE_PA_SYNC so hci_update_passive_scan_sync can 6932 + * program the address in the allow list so PA advertisements can be 6933 + * received. 6934 + */ 6935 + set_bit(HCI_CONN_CREATE_PA_SYNC, &conn->flags); 6936 + 6937 + hci_update_passive_scan_sync(hdev); 6938 + 6939 + memset(&cp, 0, sizeof(cp)); 6940 + cp.options = qos->bcast.options; 6941 + cp.sid = conn->sid; 6942 + cp.addr_type = conn->dst_type; 6943 + bacpy(&cp.addr, &conn->dst); 6944 + cp.skip = cpu_to_le16(qos->bcast.skip); 6945 + cp.sync_timeout = cpu_to_le16(qos->bcast.sync_timeout); 6946 + cp.sync_cte_type = qos->bcast.sync_cte_type; 6947 + 6948 + /* The spec allows only one pending LE Periodic Advertising Create 6949 + * Sync command at a time so we forcefully wait for PA Sync Established 6950 + * event since cmd_work can only schedule one command at a time. 6951 + * 6952 + * BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E 6953 + * page 2493: 6954 + * 6955 + * If the Host issues this command when another HCI_LE_Periodic_ 6956 + * Advertising_Create_Sync command is pending, the Controller shall 6957 + * return the error code Command Disallowed (0x0C). 6958 + */ 6959 + err = __hci_cmd_sync_status_sk(hdev, HCI_OP_LE_PA_CREATE_SYNC, 6960 + sizeof(cp), &cp, 6961 + HCI_EV_LE_PA_SYNC_ESTABLISHED, 6962 + conn->conn_timeout, NULL); 6963 + if (err == -ETIMEDOUT) 6964 + __hci_cmd_sync_status(hdev, HCI_OP_LE_PA_CREATE_SYNC_CANCEL, 6965 + 0, NULL, HCI_CMD_TIMEOUT); 6966 + 6967 + return err; 6968 + } 6969 + 6970 + int hci_connect_pa_sync(struct hci_dev *hdev, struct hci_conn *conn) 6971 + { 6972 + return hci_cmd_sync_queue_once(hdev, hci_le_pa_create_sync, conn, 6973 + create_pa_complete); 6974 + } 6975 + 6976 + static void create_big_complete(struct hci_dev *hdev, void *data, int err) 6977 + { 6978 + struct hci_conn *conn = data; 6979 + 6980 + bt_dev_dbg(hdev, "err %d", err); 6981 + 6982 + if (err == -ECANCELED) 6983 + return; 6984 + 6985 + if (hci_conn_valid(hdev, conn)) 6986 + clear_bit(HCI_CONN_CREATE_BIG_SYNC, &conn->flags); 6987 + } 6988 + 6989 + static int hci_le_big_create_sync(struct hci_dev *hdev, void *data) 6990 + { 6991 + DEFINE_FLEX(struct hci_cp_le_big_create_sync, cp, bis, num_bis, 0x11); 6992 + struct hci_conn *conn = data; 6993 + struct bt_iso_qos *qos = &conn->iso_qos; 6994 + int err; 6995 + 6996 + if (!hci_conn_valid(hdev, conn)) 6997 + return -ECANCELED; 6998 + 6999 + set_bit(HCI_CONN_CREATE_BIG_SYNC, &conn->flags); 7000 + 7001 + memset(cp, 0, sizeof(*cp)); 7002 + cp->handle = qos->bcast.big; 7003 + cp->sync_handle = cpu_to_le16(conn->sync_handle); 7004 + cp->encryption = qos->bcast.encryption; 7005 + memcpy(cp->bcode, qos->bcast.bcode, sizeof(cp->bcode)); 7006 + cp->mse = qos->bcast.mse; 7007 + cp->timeout = cpu_to_le16(qos->bcast.timeout); 7008 + cp->num_bis = conn->num_bis; 7009 + memcpy(cp->bis, conn->bis, conn->num_bis); 7010 + 7011 + /* The spec allows only one pending LE BIG Create Sync command at 7012 + * a time, so we forcefully wait for BIG Sync Established event since 7013 + * cmd_work can only schedule one command at a time. 7014 + * 7015 + * BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E 7016 + * page 2586: 7017 + * 7018 + * If the Host sends this command when the Controller is in the 7019 + * process of synchronizing to any BIG, i.e. the HCI_LE_BIG_Sync_ 7020 + * Established event has not been generated, the Controller shall 7021 + * return the error code Command Disallowed (0x0C). 7022 + */ 7023 + err = __hci_cmd_sync_status_sk(hdev, HCI_OP_LE_BIG_CREATE_SYNC, 7024 + struct_size(cp, bis, cp->num_bis), cp, 7025 + HCI_EVT_LE_BIG_SYNC_ESTABLISHED, 7026 + conn->conn_timeout, NULL); 7027 + if (err == -ETIMEDOUT) 7028 + hci_le_big_terminate_sync(hdev, cp->handle); 7029 + 7030 + return err; 7031 + } 7032 + 7033 + int hci_connect_big_sync(struct hci_dev *hdev, struct hci_conn *conn) 7034 + { 7035 + return hci_cmd_sync_queue_once(hdev, hci_le_big_create_sync, conn, 7036 + create_big_complete); 6897 7037 }
+12 -14
net/bluetooth/iso.c
··· 1462 1462 lock_sock(sk); 1463 1463 1464 1464 if (!test_and_set_bit(BT_SK_BIG_SYNC, &iso_pi(sk)->flags)) { 1465 - err = hci_le_big_create_sync(hdev, iso_pi(sk)->conn->hcon, 1466 - &iso_pi(sk)->qos, 1467 - iso_pi(sk)->sync_handle, 1468 - iso_pi(sk)->bc_num_bis, 1469 - iso_pi(sk)->bc_bis); 1465 + err = hci_conn_big_create_sync(hdev, iso_pi(sk)->conn->hcon, 1466 + &iso_pi(sk)->qos, 1467 + iso_pi(sk)->sync_handle, 1468 + iso_pi(sk)->bc_num_bis, 1469 + iso_pi(sk)->bc_bis); 1470 1470 if (err) 1471 - bt_dev_err(hdev, "hci_le_big_create_sync: %d", 1472 - err); 1471 + bt_dev_err(hdev, "hci_big_create_sync: %d", err); 1473 1472 } 1474 1473 1475 1474 release_sock(sk); ··· 1921 1922 hcon); 1922 1923 } else if (test_bit(HCI_CONN_BIG_SYNC_FAILED, &hcon->flags)) { 1923 1924 ev = hci_recv_event_data(hcon->hdev, 1924 - HCI_EVT_LE_BIG_SYNC_ESTABILISHED); 1925 + HCI_EVT_LE_BIG_SYNC_ESTABLISHED); 1925 1926 1926 1927 /* Get reference to PA sync parent socket, if it exists */ 1927 1928 parent = iso_get_sock(&hcon->src, &hcon->dst, ··· 2112 2113 2113 2114 if (!test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags) && 2114 2115 !test_and_set_bit(BT_SK_BIG_SYNC, &iso_pi(sk)->flags)) { 2115 - err = hci_le_big_create_sync(hdev, 2116 - hcon, 2117 - &iso_pi(sk)->qos, 2118 - iso_pi(sk)->sync_handle, 2119 - iso_pi(sk)->bc_num_bis, 2120 - iso_pi(sk)->bc_bis); 2116 + err = hci_conn_big_create_sync(hdev, hcon, 2117 + &iso_pi(sk)->qos, 2118 + iso_pi(sk)->sync_handle, 2119 + iso_pi(sk)->bc_num_bis, 2120 + iso_pi(sk)->bc_bis); 2121 2121 if (err) { 2122 2122 bt_dev_err(hdev, "hci_le_big_create_sync: %d", 2123 2123 err);
+3
net/bluetooth/l2cap_core.c
··· 7415 7415 return -ENOMEM; 7416 7416 /* Init rx_len */ 7417 7417 conn->rx_len = len; 7418 + 7419 + skb_set_delivery_time(conn->rx_skb, skb->tstamp, 7420 + skb->tstamp_type); 7418 7421 } 7419 7422 7420 7423 /* Copy as much as the rx_skb can hold */
+1 -1
net/ipv4/tcp_offload.c
··· 439 439 iif, sdif); 440 440 NAPI_GRO_CB(skb)->is_flist = !sk; 441 441 if (sk) 442 - sock_put(sk); 442 + sock_gen_put(sk); 443 443 } 444 444 445 445 INDIRECT_CALLABLE_SCOPE
+60 -1
net/ipv4/udp_offload.c
··· 247 247 return segs; 248 248 } 249 249 250 + static void __udpv6_gso_segment_csum(struct sk_buff *seg, 251 + struct in6_addr *oldip, 252 + const struct in6_addr *newip, 253 + __be16 *oldport, __be16 newport) 254 + { 255 + struct udphdr *uh = udp_hdr(seg); 256 + 257 + if (ipv6_addr_equal(oldip, newip) && *oldport == newport) 258 + return; 259 + 260 + if (uh->check) { 261 + inet_proto_csum_replace16(&uh->check, seg, oldip->s6_addr32, 262 + newip->s6_addr32, true); 263 + 264 + inet_proto_csum_replace2(&uh->check, seg, *oldport, newport, 265 + false); 266 + if (!uh->check) 267 + uh->check = CSUM_MANGLED_0; 268 + } 269 + 270 + *oldip = *newip; 271 + *oldport = newport; 272 + } 273 + 274 + static struct sk_buff *__udpv6_gso_segment_list_csum(struct sk_buff *segs) 275 + { 276 + const struct ipv6hdr *iph; 277 + const struct udphdr *uh; 278 + struct ipv6hdr *iph2; 279 + struct sk_buff *seg; 280 + struct udphdr *uh2; 281 + 282 + seg = segs; 283 + uh = udp_hdr(seg); 284 + iph = ipv6_hdr(seg); 285 + uh2 = udp_hdr(seg->next); 286 + iph2 = ipv6_hdr(seg->next); 287 + 288 + if (!(*(const u32 *)&uh->source ^ *(const u32 *)&uh2->source) && 289 + ipv6_addr_equal(&iph->saddr, &iph2->saddr) && 290 + ipv6_addr_equal(&iph->daddr, &iph2->daddr)) 291 + return segs; 292 + 293 + while ((seg = seg->next)) { 294 + uh2 = udp_hdr(seg); 295 + iph2 = ipv6_hdr(seg); 296 + 297 + __udpv6_gso_segment_csum(seg, &iph2->saddr, &iph->saddr, 298 + &uh2->source, uh->source); 299 + __udpv6_gso_segment_csum(seg, &iph2->daddr, &iph->daddr, 300 + &uh2->dest, uh->dest); 301 + } 302 + 303 + return segs; 304 + } 305 + 250 306 static struct sk_buff *__udp_gso_segment_list(struct sk_buff *skb, 251 307 netdev_features_t features, 252 308 bool is_ipv6) ··· 315 259 316 260 udp_hdr(skb)->len = htons(sizeof(struct udphdr) + mss); 317 261 318 - return is_ipv6 ? skb : __udpv4_gso_segment_list_csum(skb); 262 + if (is_ipv6) 263 + return __udpv6_gso_segment_list_csum(skb); 264 + else 265 + return __udpv4_gso_segment_list_csum(skb); 319 266 } 320 267 321 268 struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
+1 -1
net/ipv6/tcpv6_offload.c
··· 42 42 iif, sdif); 43 43 NAPI_GRO_CB(skb)->is_flist = !sk; 44 44 if (sk) 45 - sock_put(sk); 45 + sock_gen_put(sk); 46 46 #endif /* IS_ENABLED(CONFIG_IPV6) */ 47 47 } 48 48
+7 -1
net/mac80211/status.c
··· 1085 1085 1086 1086 ieee80211_report_used_skb(local, skb, false, status->ack_hwtstamp); 1087 1087 1088 - if (status->free_list) 1088 + /* 1089 + * This is a bit racy but we can avoid a lot of work 1090 + * with this test... 1091 + */ 1092 + if (local->tx_mntrs) 1093 + ieee80211_tx_monitor(local, skb, retry_count, status); 1094 + else if (status->free_list) 1089 1095 list_add_tail(&skb->list, status->free_list); 1090 1096 else 1091 1097 dev_kfree_skb(skb);
+6 -3
net/sched/sch_drr.c
··· 35 35 struct Qdisc_class_hash clhash; 36 36 }; 37 37 38 + static bool cl_is_active(struct drr_class *cl) 39 + { 40 + return !list_empty(&cl->alist); 41 + } 42 + 38 43 static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid) 39 44 { 40 45 struct drr_sched *q = qdisc_priv(sch); ··· 342 337 struct drr_sched *q = qdisc_priv(sch); 343 338 struct drr_class *cl; 344 339 int err = 0; 345 - bool first; 346 340 347 341 cl = drr_classify(skb, sch, &err); 348 342 if (cl == NULL) { ··· 351 347 return err; 352 348 } 353 349 354 - first = !cl->qdisc->q.qlen; 355 350 err = qdisc_enqueue(skb, cl->qdisc, to_free); 356 351 if (unlikely(err != NET_XMIT_SUCCESS)) { 357 352 if (net_xmit_drop_count(err)) { ··· 360 357 return err; 361 358 } 362 359 363 - if (first) { 360 + if (!cl_is_active(cl)) { 364 361 list_add_tail(&cl->alist, &q->active); 365 362 cl->deficit = cl->quantum; 366 363 }
+6 -3
net/sched/sch_ets.c
··· 74 74 [TCA_ETS_QUANTA_BAND] = { .type = NLA_U32 }, 75 75 }; 76 76 77 + static bool cl_is_active(struct ets_class *cl) 78 + { 79 + return !list_empty(&cl->alist); 80 + } 81 + 77 82 static int ets_quantum_parse(struct Qdisc *sch, const struct nlattr *attr, 78 83 unsigned int *quantum, 79 84 struct netlink_ext_ack *extack) ··· 421 416 struct ets_sched *q = qdisc_priv(sch); 422 417 struct ets_class *cl; 423 418 int err = 0; 424 - bool first; 425 419 426 420 cl = ets_classify(skb, sch, &err); 427 421 if (!cl) { ··· 430 426 return err; 431 427 } 432 428 433 - first = !cl->qdisc->q.qlen; 434 429 err = qdisc_enqueue(skb, cl->qdisc, to_free); 435 430 if (unlikely(err != NET_XMIT_SUCCESS)) { 436 431 if (net_xmit_drop_count(err)) { ··· 439 436 return err; 440 437 } 441 438 442 - if (first && !ets_class_is_strict(q, cl)) { 439 + if (!cl_is_active(cl) && !ets_class_is_strict(q, cl)) { 443 440 list_add_tail(&cl->alist, &q->active); 444 441 cl->deficit = cl->quantum; 445 442 }
+1 -1
net/sched/sch_hfsc.c
··· 1569 1569 return err; 1570 1570 } 1571 1571 1572 - if (first) { 1572 + if (first && !cl->cl_nactive) { 1573 1573 if (cl->cl_flags & HFSC_RSC) 1574 1574 init_ed(cl, len); 1575 1575 if (cl->cl_flags & HFSC_FSC)
+7 -4
net/sched/sch_qfq.c
··· 202 202 */ 203 203 enum update_reason {enqueue, requeue}; 204 204 205 + static bool cl_is_active(struct qfq_class *cl) 206 + { 207 + return !list_empty(&cl->alist); 208 + } 209 + 205 210 static struct qfq_class *qfq_find_class(struct Qdisc *sch, u32 classid) 206 211 { 207 212 struct qfq_sched *q = qdisc_priv(sch); ··· 1220 1215 struct qfq_class *cl; 1221 1216 struct qfq_aggregate *agg; 1222 1217 int err = 0; 1223 - bool first; 1224 1218 1225 1219 cl = qfq_classify(skb, sch, &err); 1226 1220 if (cl == NULL) { ··· 1241 1237 } 1242 1238 1243 1239 gso_segs = skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1; 1244 - first = !cl->qdisc->q.qlen; 1245 1240 err = qdisc_enqueue(skb, cl->qdisc, to_free); 1246 1241 if (unlikely(err != NET_XMIT_SUCCESS)) { 1247 1242 pr_debug("qfq_enqueue: enqueue failed %d\n", err); ··· 1256 1253 ++sch->q.qlen; 1257 1254 1258 1255 agg = cl->agg; 1259 - /* if the queue was not empty, then done here */ 1260 - if (!first) { 1256 + /* if the class is active, then done here */ 1257 + if (cl_is_active(cl)) { 1261 1258 if (unlikely(skb == cl->qdisc->ops->peek(cl->qdisc)) && 1262 1259 list_first_entry(&agg->active, struct qfq_class, alist) 1263 1260 == cl && cl->deficit < len)
+3 -3
net/xdp/xsk.c
··· 338 338 u32 len = xdp_get_buff_len(xdp); 339 339 int err; 340 340 341 - spin_lock_bh(&xs->rx_lock); 342 341 err = xsk_rcv_check(xs, xdp, len); 343 342 if (!err) { 343 + spin_lock_bh(&xs->pool->rx_lock); 344 344 err = __xsk_rcv(xs, xdp, len); 345 345 xsk_flush(xs); 346 + spin_unlock_bh(&xs->pool->rx_lock); 346 347 } 347 - spin_unlock_bh(&xs->rx_lock); 348 + 348 349 return err; 349 350 } 350 351 ··· 1735 1734 xs = xdp_sk(sk); 1736 1735 xs->state = XSK_READY; 1737 1736 mutex_init(&xs->mutex); 1738 - spin_lock_init(&xs->rx_lock); 1739 1737 1740 1738 INIT_LIST_HEAD(&xs->map_list); 1741 1739 spin_lock_init(&xs->map_list_lock);
+1
net/xdp/xsk_buff_pool.c
··· 89 89 pool->addrs = umem->addrs; 90 90 pool->tx_metadata_len = umem->tx_metadata_len; 91 91 pool->tx_sw_csum = umem->flags & XDP_UMEM_TX_SW_CSUM; 92 + spin_lock_init(&pool->rx_lock); 92 93 INIT_LIST_HEAD(&pool->free_list); 93 94 INIT_LIST_HEAD(&pool->xskb_list); 94 95 INIT_LIST_HEAD(&pool->xsk_tx_list);
+2 -6
tools/testing/selftests/drivers/net/ocelot/psfp.sh
··· 266 266 "${base_time}" \ 267 267 "${CYCLE_TIME_NS}" \ 268 268 "${SHIFT_TIME_NS}" \ 269 + "${GATE_DURATION_NS}" \ 269 270 "${NUM_PKTS}" \ 270 271 "${STREAM_VID}" \ 271 272 "${STREAM_PRIO}" \ 272 273 "" \ 273 274 "${isochron_dat}" 274 275 275 - # Count all received packets by looking at the non-zero RX timestamps 276 - received=$(isochron report \ 277 - --input-file "${isochron_dat}" \ 278 - --printf-format "%u\n" --printf-args "R" | \ 279 - grep -w -v '0' | wc -l) 280 - 276 + received=$(isochron_report_num_received "${isochron_dat}") 281 277 if [ "${received}" = "${expected}" ]; then 282 278 RET=0 283 279 else
+95 -1
tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh
··· 1 1 #!/bin/bash 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 4 - ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding vlan_deletion extern_learn other_tpid" 4 + ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding vlan_deletion extern_learn other_tpid 8021p drop_untagged" 5 5 NUM_NETIFS=4 6 6 CHECK_TC="yes" 7 7 source lib.sh ··· 190 190 log_test "Reception of VLAN with other TPID as untagged (no PVID)" 191 191 192 192 bridge vlan add dev $swp1 vid 1 pvid untagged 193 + ip link set $h2 promisc off 194 + tc qdisc del dev $h2 clsact 195 + } 196 + 197 + 8021p_do() 198 + { 199 + local should_fail=$1; shift 200 + local mac=de:ad:be:ef:13:37 201 + 202 + tc filter add dev $h2 ingress protocol all pref 1 handle 101 \ 203 + flower dst_mac $mac action drop 204 + 205 + $MZ -q $h1 -c 1 -b $mac -a own "81:00 00:00 08:00 aa-aa-aa-aa-aa-aa-aa-aa-aa" 206 + sleep 1 207 + 208 + tc -j -s filter show dev $h2 ingress \ 209 + | jq -e ".[] | select(.options.handle == 101) \ 210 + | select(.options.actions[0].stats.packets == 1)" &> /dev/null 211 + check_err_fail $should_fail $? "802.1p-tagged reception" 212 + 213 + tc filter del dev $h2 ingress pref 1 214 + } 215 + 216 + 8021p() 217 + { 218 + RET=0 219 + 220 + tc qdisc add dev $h2 clsact 221 + ip link set $h2 promisc on 222 + 223 + # Test that with the default_pvid, 1, packets tagged with VID 0 are 224 + # accepted. 225 + 8021p_do 0 226 + 227 + # Test that packets tagged with VID 0 are still accepted after changing 228 + # the default_pvid. 229 + ip link set br0 type bridge vlan_default_pvid 10 230 + 8021p_do 0 231 + 232 + log_test "Reception of 802.1p-tagged traffic" 233 + 234 + ip link set $h2 promisc off 235 + tc qdisc del dev $h2 clsact 236 + } 237 + 238 + send_untagged_and_8021p() 239 + { 240 + ping_do $h1 192.0.2.2 241 + check_fail $? 242 + 243 + 8021p_do 1 244 + } 245 + 246 + drop_untagged() 247 + { 248 + RET=0 249 + 250 + tc qdisc add dev $h2 clsact 251 + ip link set $h2 promisc on 252 + 253 + # Test that with no PVID, untagged and 802.1p-tagged traffic is 254 + # dropped. 255 + ip link set br0 type bridge vlan_default_pvid 1 256 + 257 + # First we reconfigure the default_pvid, 1, as a non-PVID VLAN. 258 + bridge vlan add dev $swp1 vid 1 untagged 259 + send_untagged_and_8021p 260 + bridge vlan add dev $swp1 vid 1 pvid untagged 261 + 262 + # Next we try to delete VID 1 altogether 263 + bridge vlan del dev $swp1 vid 1 264 + send_untagged_and_8021p 265 + bridge vlan add dev $swp1 vid 1 pvid untagged 266 + 267 + # Set up the bridge without a default_pvid, then check that the 8021q 268 + # module, when the bridge port goes down and then up again, does not 269 + # accidentally re-enable untagged packet reception. 270 + ip link set br0 type bridge vlan_default_pvid 0 271 + ip link set $swp1 down 272 + ip link set $swp1 up 273 + setup_wait 274 + send_untagged_and_8021p 275 + 276 + # Remove swp1 as a bridge port and let it rejoin the bridge while it 277 + # has no default_pvid. 278 + ip link set $swp1 nomaster 279 + ip link set $swp1 master br0 280 + send_untagged_and_8021p 281 + 282 + # Restore settings 283 + ip link set br0 type bridge vlan_default_pvid 1 284 + 285 + log_test "Dropping of untagged and 802.1p-tagged traffic with no PVID" 286 + 193 287 ip link set $h2 promisc off 194 288 tc qdisc del dev $h2 clsact 195 289 }
+421
tools/testing/selftests/net/forwarding/tc_taprio.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + ALL_TESTS=" \ 5 + test_clock_jump_backward \ 6 + test_taprio_after_ptp \ 7 + test_max_sdu \ 8 + test_clock_jump_backward_forward \ 9 + " 10 + NUM_NETIFS=4 11 + source tc_common.sh 12 + source lib.sh 13 + source tsn_lib.sh 14 + 15 + require_command python3 16 + 17 + # The test assumes the usual topology from the README, where h1 is connected to 18 + # swp1, h2 to swp2, and swp1 and swp2 are together in a bridge. 19 + # Additional assumption: h1 and h2 use the same PHC, and so do swp1 and swp2. 20 + # By synchronizing h1 to swp1 via PTP, h2 is also implicitly synchronized to 21 + # swp1 (and both to CLOCK_REALTIME). 22 + h1=${NETIFS[p1]} 23 + swp1=${NETIFS[p2]} 24 + swp2=${NETIFS[p3]} 25 + h2=${NETIFS[p4]} 26 + 27 + UDS_ADDRESS_H1="/var/run/ptp4l_h1" 28 + UDS_ADDRESS_SWP1="/var/run/ptp4l_swp1" 29 + 30 + H1_IPV4="192.0.2.1" 31 + H2_IPV4="192.0.2.2" 32 + H1_IPV6="2001:db8:1::1" 33 + H2_IPV6="2001:db8:1::2" 34 + 35 + # Tunables 36 + NUM_PKTS=100 37 + STREAM_VID=10 38 + STREAM_PRIO_1=6 39 + STREAM_PRIO_2=5 40 + STREAM_PRIO_3=4 41 + # PTP uses TC 0 42 + ALL_GATES=$((1 << 0 | 1 << STREAM_PRIO_1 | 1 << STREAM_PRIO_2)) 43 + # Use a conservative cycle of 10 ms to allow the test to still pass when the 44 + # kernel has some extra overhead like lockdep etc 45 + CYCLE_TIME_NS=10000000 46 + # Create two Gate Control List entries, one OPEN and one CLOSE, of equal 47 + # durations 48 + GATE_DURATION_NS=$((CYCLE_TIME_NS / 2)) 49 + # Give 2/3 of the cycle time to user space and 1/3 to the kernel 50 + FUDGE_FACTOR=$((CYCLE_TIME_NS / 3)) 51 + # Shift the isochron base time by half the gate time, so that packets are 52 + # always received by swp1 close to the middle of the time slot, to minimize 53 + # inaccuracies due to network sync 54 + SHIFT_TIME_NS=$((GATE_DURATION_NS / 2)) 55 + 56 + path_delay= 57 + 58 + h1_create() 59 + { 60 + simple_if_init $h1 $H1_IPV4/24 $H1_IPV6/64 61 + } 62 + 63 + h1_destroy() 64 + { 65 + simple_if_fini $h1 $H1_IPV4/24 $H1_IPV6/64 66 + } 67 + 68 + h2_create() 69 + { 70 + simple_if_init $h2 $H2_IPV4/24 $H2_IPV6/64 71 + } 72 + 73 + h2_destroy() 74 + { 75 + simple_if_fini $h2 $H2_IPV4/24 $H2_IPV6/64 76 + } 77 + 78 + switch_create() 79 + { 80 + local h2_mac_addr=$(mac_get $h2) 81 + 82 + ip link set $swp1 up 83 + ip link set $swp2 up 84 + 85 + ip link add br0 type bridge vlan_filtering 1 86 + ip link set $swp1 master br0 87 + ip link set $swp2 master br0 88 + ip link set br0 up 89 + 90 + bridge vlan add dev $swp2 vid $STREAM_VID 91 + bridge vlan add dev $swp1 vid $STREAM_VID 92 + bridge fdb add dev $swp2 \ 93 + $h2_mac_addr vlan $STREAM_VID static master 94 + } 95 + 96 + switch_destroy() 97 + { 98 + ip link del br0 99 + } 100 + 101 + ptp_setup() 102 + { 103 + # Set up swp1 as a master PHC for h1, synchronized to the local 104 + # CLOCK_REALTIME. 105 + phc2sys_start $UDS_ADDRESS_SWP1 106 + ptp4l_start $h1 true $UDS_ADDRESS_H1 107 + ptp4l_start $swp1 false $UDS_ADDRESS_SWP1 108 + } 109 + 110 + ptp_cleanup() 111 + { 112 + ptp4l_stop $swp1 113 + ptp4l_stop $h1 114 + phc2sys_stop 115 + } 116 + 117 + txtime_setup() 118 + { 119 + local if_name=$1 120 + 121 + tc qdisc add dev $if_name clsact 122 + # Classify PTP on TC 7 and isochron on TC 6 123 + tc filter add dev $if_name egress protocol 0x88f7 \ 124 + flower action skbedit priority 7 125 + tc filter add dev $if_name egress protocol 802.1Q \ 126 + flower vlan_ethtype 0xdead action skbedit priority 6 127 + tc qdisc add dev $if_name handle 100: parent root mqprio num_tc 8 \ 128 + queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ 129 + map 0 1 2 3 4 5 6 7 \ 130 + hw 1 131 + # Set up TC 5, 6, 7 for SO_TXTIME. tc-mqprio queues count from 1. 132 + tc qdisc replace dev $if_name parent 100:$((STREAM_PRIO_1 + 1)) etf \ 133 + clockid CLOCK_TAI offload delta $FUDGE_FACTOR 134 + tc qdisc replace dev $if_name parent 100:$((STREAM_PRIO_2 + 1)) etf \ 135 + clockid CLOCK_TAI offload delta $FUDGE_FACTOR 136 + tc qdisc replace dev $if_name parent 100:$((STREAM_PRIO_3 + 1)) etf \ 137 + clockid CLOCK_TAI offload delta $FUDGE_FACTOR 138 + } 139 + 140 + txtime_cleanup() 141 + { 142 + local if_name=$1 143 + 144 + tc qdisc del dev $if_name clsact 145 + tc qdisc del dev $if_name root 146 + } 147 + 148 + taprio_replace() 149 + { 150 + local if_name="$1"; shift 151 + local extra_args="$1"; shift 152 + 153 + # STREAM_PRIO_1 always has an open gate. 154 + # STREAM_PRIO_2 has a gate open for GATE_DURATION_NS (half the cycle time) 155 + # STREAM_PRIO_3 always has a closed gate. 156 + tc qdisc replace dev $if_name root stab overhead 24 taprio num_tc 8 \ 157 + queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ 158 + map 0 1 2 3 4 5 6 7 \ 159 + sched-entry S $(printf "%x" $ALL_GATES) $GATE_DURATION_NS \ 160 + sched-entry S $(printf "%x" $((ALL_GATES & ~(1 << STREAM_PRIO_2)))) $GATE_DURATION_NS \ 161 + base-time 0 flags 0x2 $extra_args 162 + taprio_wait_for_admin $if_name 163 + } 164 + 165 + taprio_cleanup() 166 + { 167 + local if_name=$1 168 + 169 + tc qdisc del dev $if_name root 170 + } 171 + 172 + probe_path_delay() 173 + { 174 + local isochron_dat="$(mktemp)" 175 + local received 176 + 177 + log_info "Probing path delay" 178 + 179 + isochron_do "$h1" "$h2" "$UDS_ADDRESS_H1" "" 0 \ 180 + "$CYCLE_TIME_NS" "" "" "$NUM_PKTS" \ 181 + "$STREAM_VID" "$STREAM_PRIO_1" "" "$isochron_dat" 182 + 183 + received=$(isochron_report_num_received "$isochron_dat") 184 + if [ "$received" != "$NUM_PKTS" ]; then 185 + echo "Cannot establish basic data path between $h1 and $h2" 186 + exit $ksft_fail 187 + fi 188 + 189 + printf "pdelay = {}\n" > isochron_data.py 190 + isochron report --input-file "$isochron_dat" \ 191 + --printf-format "pdelay[%u] = %d - %d\n" \ 192 + --printf-args "qRT" \ 193 + >> isochron_data.py 194 + cat <<-'EOF' > isochron_postprocess.py 195 + #!/usr/bin/env python3 196 + 197 + from isochron_data import pdelay 198 + import numpy as np 199 + 200 + w = np.array(list(pdelay.values())) 201 + print("{}".format(np.max(w))) 202 + EOF 203 + path_delay=$(python3 ./isochron_postprocess.py) 204 + 205 + log_info "Path delay from $h1 to $h2 estimated at $path_delay ns" 206 + 207 + if [ "$path_delay" -gt "$GATE_DURATION_NS" ]; then 208 + echo "Path delay larger than gate duration, aborting" 209 + exit $ksft_fail 210 + fi 211 + 212 + rm -f ./isochron_data.py 2> /dev/null 213 + rm -f ./isochron_postprocess.py 2> /dev/null 214 + rm -f "$isochron_dat" 2> /dev/null 215 + } 216 + 217 + setup_prepare() 218 + { 219 + vrf_prepare 220 + 221 + h1_create 222 + h2_create 223 + switch_create 224 + 225 + txtime_setup $h1 226 + 227 + # Temporarily set up PTP just to probe the end-to-end path delay. 228 + ptp_setup 229 + probe_path_delay 230 + ptp_cleanup 231 + } 232 + 233 + cleanup() 234 + { 235 + pre_cleanup 236 + 237 + isochron_recv_stop 238 + txtime_cleanup $h1 239 + 240 + switch_destroy 241 + h2_destroy 242 + h1_destroy 243 + 244 + vrf_cleanup 245 + } 246 + 247 + run_test() 248 + { 249 + local base_time=$1; shift 250 + local stream_prio=$1; shift 251 + local expected_delay=$1; shift 252 + local should_fail=$1; shift 253 + local test_name=$1; shift 254 + local isochron_dat="$(mktemp)" 255 + local received 256 + local median_delay 257 + 258 + RET=0 259 + 260 + # Set the shift time equal to the cycle time, which effectively 261 + # cancels the default advance time. Packets won't be sent early in 262 + # software, which ensures that they won't prematurely enter through 263 + # the open gate in __test_out_of_band(). Also, the gate is open for 264 + # long enough that this won't cause a problem in __test_in_band(). 265 + isochron_do "$h1" "$h2" "$UDS_ADDRESS_H1" "" "$base_time" \ 266 + "$CYCLE_TIME_NS" "$SHIFT_TIME_NS" "$GATE_DURATION_NS" \ 267 + "$NUM_PKTS" "$STREAM_VID" "$stream_prio" "" "$isochron_dat" 268 + 269 + received=$(isochron_report_num_received "$isochron_dat") 270 + [ "$received" = "$NUM_PKTS" ] 271 + check_err_fail $should_fail $? "Reception of $NUM_PKTS packets" 272 + 273 + if [ $should_fail = 0 ] && [ "$received" = "$NUM_PKTS" ]; then 274 + printf "pdelay = {}\n" > isochron_data.py 275 + isochron report --input-file "$isochron_dat" \ 276 + --printf-format "pdelay[%u] = %d - %d\n" \ 277 + --printf-args "qRT" \ 278 + >> isochron_data.py 279 + cat <<-'EOF' > isochron_postprocess.py 280 + #!/usr/bin/env python3 281 + 282 + from isochron_data import pdelay 283 + import numpy as np 284 + 285 + w = np.array(list(pdelay.values())) 286 + print("{}".format(int(np.median(w)))) 287 + EOF 288 + median_delay=$(python3 ./isochron_postprocess.py) 289 + 290 + # If the condition below is true, packets were delayed by a closed gate 291 + [ "$median_delay" -gt $((path_delay + expected_delay)) ] 292 + check_fail $? "Median delay $median_delay is greater than expected delay $expected_delay plus path delay $path_delay" 293 + 294 + # If the condition below is true, packets were sent expecting them to 295 + # hit a closed gate in the switch, but were not delayed 296 + [ "$expected_delay" -gt 0 ] && [ "$median_delay" -lt "$expected_delay" ] 297 + check_fail $? "Median delay $median_delay is less than expected delay $expected_delay" 298 + fi 299 + 300 + log_test "$test_name" 301 + 302 + rm -f ./isochron_data.py 2> /dev/null 303 + rm -f ./isochron_postprocess.py 2> /dev/null 304 + rm -f "$isochron_dat" 2> /dev/null 305 + } 306 + 307 + __test_always_open() 308 + { 309 + run_test 0.000000000 $STREAM_PRIO_1 0 0 "Gate always open" 310 + } 311 + 312 + __test_always_closed() 313 + { 314 + run_test 0.000000000 $STREAM_PRIO_3 0 1 "Gate always closed" 315 + } 316 + 317 + __test_in_band() 318 + { 319 + # Send packets in-band with the OPEN gate entry 320 + run_test 0.000000000 $STREAM_PRIO_2 0 0 "In band with gate" 321 + } 322 + 323 + __test_out_of_band() 324 + { 325 + # Send packets in-band with the CLOSE gate entry 326 + run_test 0.005000000 $STREAM_PRIO_2 \ 327 + $((GATE_DURATION_NS - SHIFT_TIME_NS)) 0 \ 328 + "Out of band with gate" 329 + } 330 + 331 + run_subtests() 332 + { 333 + __test_always_open 334 + __test_always_closed 335 + __test_in_band 336 + __test_out_of_band 337 + } 338 + 339 + test_taprio_after_ptp() 340 + { 341 + log_info "Setting up taprio after PTP" 342 + ptp_setup 343 + taprio_replace $swp2 344 + run_subtests 345 + taprio_cleanup $swp2 346 + ptp_cleanup 347 + } 348 + 349 + __test_under_max_sdu() 350 + { 351 + # Limit max-sdu for STREAM_PRIO_1 352 + taprio_replace "$swp2" "max-sdu 0 0 0 0 0 0 100 0" 353 + run_test 0.000000000 $STREAM_PRIO_1 0 0 "Under maximum SDU" 354 + } 355 + 356 + __test_over_max_sdu() 357 + { 358 + # Limit max-sdu for STREAM_PRIO_1 359 + taprio_replace "$swp2" "max-sdu 0 0 0 0 0 0 20 0" 360 + run_test 0.000000000 $STREAM_PRIO_1 0 1 "Over maximum SDU" 361 + } 362 + 363 + test_max_sdu() 364 + { 365 + ptp_setup 366 + __test_under_max_sdu 367 + __test_over_max_sdu 368 + taprio_cleanup $swp2 369 + ptp_cleanup 370 + } 371 + 372 + # Perform a clock jump in the past without synchronization running, so that the 373 + # time base remains where it was set by phc_ctl. 374 + test_clock_jump_backward() 375 + { 376 + # This is a more complex schedule specifically crafted in a way that 377 + # has been problematic on NXP LS1028A. Not much to test with it other 378 + # than the fact that it passes traffic. 379 + tc qdisc replace dev $swp2 root stab overhead 24 taprio num_tc 8 \ 380 + queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 map 0 1 2 3 4 5 6 7 \ 381 + base-time 0 sched-entry S 20 300000 sched-entry S 10 200000 \ 382 + sched-entry S 20 300000 sched-entry S 48 200000 \ 383 + sched-entry S 20 300000 sched-entry S 83 200000 \ 384 + sched-entry S 40 300000 sched-entry S 00 200000 flags 2 385 + 386 + log_info "Forcing a backward clock jump" 387 + phc_ctl $swp1 set 0 388 + 389 + ping_test $h1 192.0.2.2 390 + taprio_cleanup $swp2 391 + } 392 + 393 + # Test that taprio tolerates clock jumps. 394 + # Since ptp4l and phc2sys are running, it is expected for the time to 395 + # eventually recover (through yet another clock jump). Isochron waits 396 + # until that is the case. 397 + test_clock_jump_backward_forward() 398 + { 399 + log_info "Forcing a backward and a forward clock jump" 400 + taprio_replace $swp2 401 + phc_ctl $swp1 set 0 402 + ptp_setup 403 + ping_test $h1 192.0.2.2 404 + run_subtests 405 + ptp_cleanup 406 + taprio_cleanup $swp2 407 + } 408 + 409 + tc_offload_check 410 + if [[ $? -ne 0 ]]; then 411 + log_test_skip "Could not test offloaded functionality" 412 + exit $EXIT_STATUS 413 + fi 414 + 415 + trap cleanup EXIT 416 + 417 + setup_prepare 418 + setup_wait 419 + tests_run 420 + 421 + exit $EXIT_STATUS
+26
tools/testing/selftests/net/forwarding/tsn_lib.sh
··· 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 # Copyright 2021-2022 NXP 4 4 5 + tc_testing_scripts_dir=$(dirname $0)/../../tc-testing/scripts 6 + 5 7 REQUIRE_ISOCHRON=${REQUIRE_ISOCHRON:=yes} 6 8 REQUIRE_LINUXPTP=${REQUIRE_LINUXPTP:=yes} 7 9 ··· 20 18 if [[ "$REQUIRE_LINUXPTP" = "yes" ]]; then 21 19 require_command phc2sys 22 20 require_command ptp4l 21 + require_command phc_ctl 23 22 fi 24 23 25 24 phc2sys_start() ··· 185 182 local base_time=$1; shift 186 183 local cycle_time=$1; shift 187 184 local shift_time=$1; shift 185 + local window_size=$1; shift 188 186 local num_pkts=$1; shift 189 187 local vid=$1; shift 190 188 local priority=$1; shift ··· 214 210 215 211 if ! [ -z "${shift_time}" ]; then 216 212 extra_args="${extra_args} --shift-time=${shift_time}" 213 + fi 214 + 215 + if ! [ -z "${window_size}" ]; then 216 + extra_args="${extra_args} --window-size=${window_size}" 217 217 fi 218 218 219 219 if [ "${use_l2}" = "true" ]; then ··· 254 246 isochron_recv_stop 5000 255 247 256 248 cpufreq_restore ${ISOCHRON_CPU} 249 + } 250 + 251 + isochron_report_num_received() 252 + { 253 + local isochron_dat=$1; shift 254 + 255 + # Count all received packets by looking at the non-zero RX timestamps 256 + isochron report \ 257 + --input-file "${isochron_dat}" \ 258 + --printf-format "%u\n" --printf-args "R" | \ 259 + grep -w -v '0' | wc -l 260 + } 261 + 262 + taprio_wait_for_admin() 263 + { 264 + local if_name="$1"; shift 265 + 266 + "$tc_testing_scripts_dir/taprio_wait_for_admin.sh" "$(which tc)" "$if_name" 257 267 }
+186
tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
··· 352 352 "$TC qdisc del dev $DUMMY handle 1:0 root", 353 353 "$IP addr del 10.10.10.10/24 dev $DUMMY || true" 354 354 ] 355 + }, 356 + { 357 + "id": "90ec", 358 + "name": "Test DRR's enqueue reentrant behaviour with netem", 359 + "category": [ 360 + "qdisc", 361 + "drr" 362 + ], 363 + "plugins": { 364 + "requires": "nsPlugin" 365 + }, 366 + "setup": [ 367 + "$IP link set dev $DUMMY up || true", 368 + "$IP addr add 10.10.10.10/24 dev $DUMMY || true", 369 + "$TC qdisc add dev $DUMMY handle 1:0 root drr", 370 + "$TC class replace dev $DUMMY parent 1:0 classid 1:1 drr", 371 + "$TC qdisc add dev $DUMMY parent 1:1 handle 2:0 netem duplicate 100%", 372 + "$TC filter add dev $DUMMY parent 1:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:1" 373 + ], 374 + "cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true", 375 + "expExitCode": "0", 376 + "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0", 377 + "matchJSON": [ 378 + { 379 + "kind": "drr", 380 + "handle": "1:", 381 + "bytes": 196, 382 + "packets": 2 383 + } 384 + ], 385 + "matchCount": "1", 386 + "teardown": [ 387 + "$TC qdisc del dev $DUMMY handle 1:0 root", 388 + "$IP addr del 10.10.10.10/24 dev $DUMMY || true" 389 + ] 390 + }, 391 + { 392 + "id": "1f1f", 393 + "name": "Test ETS's enqueue reentrant behaviour with netem", 394 + "category": [ 395 + "qdisc", 396 + "ets" 397 + ], 398 + "plugins": { 399 + "requires": "nsPlugin" 400 + }, 401 + "setup": [ 402 + "$IP link set dev $DUMMY up || true", 403 + "$IP addr add 10.10.10.10/24 dev $DUMMY || true", 404 + "$TC qdisc add dev $DUMMY handle 1:0 root ets bands 2", 405 + "$TC class replace dev $DUMMY parent 1:0 classid 1:1 ets quantum 1500", 406 + "$TC qdisc add dev $DUMMY parent 1:1 handle 2:0 netem duplicate 100%", 407 + "$TC filter add dev $DUMMY parent 1:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:1" 408 + ], 409 + "cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true", 410 + "expExitCode": "0", 411 + "verifyCmd": "$TC -j -s class show dev $DUMMY", 412 + "matchJSON": [ 413 + { 414 + "class": "ets", 415 + "handle": "1:1", 416 + "stats": { 417 + "bytes": 196, 418 + "packets": 2 419 + } 420 + } 421 + ], 422 + "matchCount": "1", 423 + "teardown": [ 424 + "$TC qdisc del dev $DUMMY handle 1:0 root", 425 + "$IP addr del 10.10.10.10/24 dev $DUMMY || true" 426 + ] 427 + }, 428 + { 429 + "id": "5e6d", 430 + "name": "Test QFQ's enqueue reentrant behaviour with netem", 431 + "category": [ 432 + "qdisc", 433 + "qfq" 434 + ], 435 + "plugins": { 436 + "requires": "nsPlugin" 437 + }, 438 + "setup": [ 439 + "$IP link set dev $DUMMY up || true", 440 + "$IP addr add 10.10.10.10/24 dev $DUMMY || true", 441 + "$TC qdisc add dev $DUMMY handle 1:0 root qfq", 442 + "$TC class replace dev $DUMMY parent 1:0 classid 1:1 qfq weight 100 maxpkt 1500", 443 + "$TC qdisc add dev $DUMMY parent 1:1 handle 2:0 netem duplicate 100%", 444 + "$TC filter add dev $DUMMY parent 1:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:1" 445 + ], 446 + "cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true", 447 + "expExitCode": "0", 448 + "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0", 449 + "matchJSON": [ 450 + { 451 + "kind": "qfq", 452 + "handle": "1:", 453 + "bytes": 196, 454 + "packets": 2 455 + } 456 + ], 457 + "matchCount": "1", 458 + "teardown": [ 459 + "$TC qdisc del dev $DUMMY handle 1:0 root", 460 + "$IP addr del 10.10.10.10/24 dev $DUMMY || true" 461 + ] 462 + }, 463 + { 464 + "id": "bf1d", 465 + "name": "Test HFSC's enqueue reentrant behaviour with netem", 466 + "category": [ 467 + "qdisc", 468 + "hfsc" 469 + ], 470 + "plugins": { 471 + "requires": "nsPlugin" 472 + }, 473 + "setup": [ 474 + "$IP link set dev $DUMMY up || true", 475 + "$IP addr add 10.10.10.10/24 dev $DUMMY || true", 476 + "$TC qdisc add dev $DUMMY handle 1:0 root hfsc", 477 + "$TC class add dev $DUMMY parent 1:0 classid 1:1 hfsc ls m2 10Mbit", 478 + "$TC qdisc add dev $DUMMY parent 1:1 handle 2:0 netem duplicate 100%", 479 + "$TC filter add dev $DUMMY parent 1:0 protocol ip prio 1 u32 match ip dst 10.10.10.1/32 flowid 1:1", 480 + "$TC class add dev $DUMMY parent 1:0 classid 1:2 hfsc ls m2 10Mbit", 481 + "$TC qdisc add dev $DUMMY parent 1:2 handle 3:0 netem duplicate 100%", 482 + "$TC filter add dev $DUMMY parent 1:0 protocol ip prio 2 u32 match ip dst 10.10.10.2/32 flowid 1:2", 483 + "ping -c 1 10.10.10.1 -I$DUMMY > /dev/null || true", 484 + "$TC filter del dev $DUMMY parent 1:0 protocol ip prio 1", 485 + "$TC class del dev $DUMMY classid 1:1" 486 + ], 487 + "cmdUnderTest": "ping -c 1 10.10.10.2 -I$DUMMY > /dev/null || true", 488 + "expExitCode": "0", 489 + "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0", 490 + "matchJSON": [ 491 + { 492 + "kind": "hfsc", 493 + "handle": "1:", 494 + "bytes": 392, 495 + "packets": 4 496 + } 497 + ], 498 + "matchCount": "1", 499 + "teardown": [ 500 + "$TC qdisc del dev $DUMMY handle 1:0 root", 501 + "$IP addr del 10.10.10.10/24 dev $DUMMY || true" 502 + ] 503 + }, 504 + { 505 + "id": "7c3b", 506 + "name": "Test nested DRR's enqueue reentrant behaviour with netem", 507 + "category": [ 508 + "qdisc", 509 + "drr" 510 + ], 511 + "plugins": { 512 + "requires": "nsPlugin" 513 + }, 514 + "setup": [ 515 + "$IP link set dev $DUMMY up || true", 516 + "$IP addr add 10.10.10.10/24 dev $DUMMY || true", 517 + "$TC qdisc add dev $DUMMY handle 1:0 root drr", 518 + "$TC class add dev $DUMMY parent 1:0 classid 1:1 drr", 519 + "$TC filter add dev $DUMMY parent 1:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:1", 520 + "$TC qdisc add dev $DUMMY handle 2:0 parent 1:1 drr", 521 + "$TC class add dev $DUMMY classid 2:1 parent 2:0 drr", 522 + "$TC filter add dev $DUMMY parent 2:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 2:1", 523 + "$TC qdisc add dev $DUMMY parent 2:1 handle 3:0 netem duplicate 100%" 524 + ], 525 + "cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true", 526 + "expExitCode": "0", 527 + "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0", 528 + "matchJSON": [ 529 + { 530 + "kind": "drr", 531 + "handle": "1:", 532 + "bytes": 196, 533 + "packets": 2 534 + } 535 + ], 536 + "matchCount": "1", 537 + "teardown": [ 538 + "$TC qdisc del dev $DUMMY handle 1:0 root", 539 + "$IP addr del 10.10.10.10/24 dev $DUMMY || true" 540 + ] 355 541 } 356 542 ]