* Re: [PATCH 1/3] net: usb: r8152: Check used MAC passthrough address
From: Henning Schild @ 2022-01-05 14:48 UTC (permalink / raw)
To: Aaron Ma; +Cc: kuba, linux-usb, netdev, linux-kernel, davem, hayeswang, tiwai
In-Reply-To: <20220105142351.8026-1-aaron.ma@canonical.com>
No cover letter?
I think p1 and 2 should be squashed.
Am Wed, 5 Jan 2022 22:23:49 +0800
schrieb Aaron Ma <aaron.ma@canonical.com>:
> When plugin multiple r8152 ethernet dongles to Lenovo Docks
> or USB hub, MAC passthrough address from BIOS should be
> checked if it had been used to avoid using on other dongles.
>
> Skip builtin PCI MAC address which is share MAC address with
> passthrough MAC.
> Check thunderbolt based ethernet.
>
> Currently builtin r8152 on Dock still can't be identified.
> First detected r8152 will use the MAC passthrough address.
>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
> drivers/net/usb/r8152.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index f9877a3e83ac..91f4b2761f8e 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -25,6 +25,7 @@
> #include <linux/atomic.h>
> #include <linux/acpi.h>
> #include <linux/firmware.h>
> +#include <linux/pci.h>
> #include <crypto/hash.h>
> #include <linux/usb/r8152.h>
>
> @@ -1605,6 +1606,7 @@ static int vendor_mac_passthru_addr_read(struct
> r8152 *tp, struct sockaddr *sa) char *mac_obj_name;
> acpi_object_type mac_obj_type;
> int mac_strlen;
> + struct net_device *ndev;
reverse xmas tree
>
> if (tp->lenovo_macpassthru) {
> mac_obj_name = "\\MACA";
> @@ -1662,6 +1664,18 @@ static int
> vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa)
> ret = -EINVAL; goto amacout;
> }
> + rcu_read_lock();
> + for_each_netdev_rcu(&init_net, ndev) {
> + if (ndev->dev.parent && dev_is_pci(ndev->dev.parent)
> &&
> +
> !pci_is_thunderbolt_attached(to_pci_dev(ndev->dev.parent)))
> + continue;
> + if (strncmp(buf, ndev->dev_addr, 6) == 0) {
> + rcu_read_unlock();
ret = -EBUSY; or anything but 0, otherwise you get a random MAC from a
calling stack.
Henning
> + goto amacout;
> + }
> + }
> + rcu_read_unlock();
> +
> memcpy(sa->sa_data, buf, 6);
> netif_info(tp, probe, tp->netdev,
> "Using pass-thru MAC addr %pM\n", sa->sa_data);
^ permalink raw reply
* Re: [PATCH v1 21/34] hw/arm: add control knob to disable kaslr_seed via DTB
From: Andrew Jones @ 2022-01-05 14:49 UTC (permalink / raw)
To: Alex Bennée
Cc: qemu-devel, fam, Peter Maydell, berrange, Heinrich Schuchardt,
Ilias Apalodimas, f4bug, Jerome Forissier, stefanha, crosa,
pbonzini, open list:Virt, aurelien
In-Reply-To: <20220105135009.1584676-22-alex.bennee@linaro.org>
On Wed, Jan 05, 2022 at 01:49:56PM +0000, Alex Bennée wrote:
> Generally a guest needs an external source of randomness to properly
> enable things like address space randomisation. However in a trusted
> boot environment where the firmware will cryptographically verify
> components having random data in the DTB will cause verification to
> fail. Add a control knob so we can prevent this being added to the
> system DTB.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Acked-by: Jerome Forissier <jerome@forissier.org>
> Message-Id: <20211215120926.1696302-1-alex.bennee@linaro.org>
> ---
> docs/system/arm/virt.rst | 7 +++++++
> include/hw/arm/virt.h | 1 +
> hw/arm/virt.c | 32 ++++++++++++++++++++++++++++++--
> 3 files changed, 38 insertions(+), 2 deletions(-)
>
> diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst
> index 850787495b..c86a4808df 100644
> --- a/docs/system/arm/virt.rst
> +++ b/docs/system/arm/virt.rst
> @@ -121,6 +121,13 @@ ras
> Set ``on``/``off`` to enable/disable reporting host memory errors to a guest
> using ACPI and guest external abort exceptions. The default is off.
>
> +kaslr-dtb-seed
> + Set ``on``/``off`` to pass a random seed via the guest dtb to use for features
> + like address space randomisation. The default is ``on``. You will want
> + to disable it if your trusted boot chain will verify the DTB it is
> + passed. It would be the responsibility of the firmware to come up
> + with a seed and pass it on if it wants to.
> +
> Linux guest kernel configuration
> """"""""""""""""""""""""""""""""
>
> diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
> index dc6b66ffc8..acd0665fe7 100644
> --- a/include/hw/arm/virt.h
> +++ b/include/hw/arm/virt.h
> @@ -148,6 +148,7 @@ struct VirtMachineState {
> bool virt;
> bool ras;
> bool mte;
> + bool kaslr_dtb_seed;
> OnOffAuto acpi;
> VirtGICType gic_version;
> VirtIOMMUType iommu;
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 6bce595aba..1781e47c76 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -247,11 +247,15 @@ static void create_fdt(VirtMachineState *vms)
>
> /* /chosen must exist for load_dtb to fill in necessary properties later */
> qemu_fdt_add_subnode(fdt, "/chosen");
> - create_kaslr_seed(ms, "/chosen");
> + if (vms->kaslr_dtb_seed) {
> + create_kaslr_seed(ms, "/chosen");
> + }
>
> if (vms->secure) {
> qemu_fdt_add_subnode(fdt, "/secure-chosen");
> - create_kaslr_seed(ms, "/secure-chosen");
> + if (vms->kaslr_dtb_seed) {
> + create_kaslr_seed(ms, "/secure-chosen");
> + }
> }
>
> /* Clock node, for the benefit of the UART. The kernel device tree
> @@ -2235,6 +2239,20 @@ static void virt_set_its(Object *obj, bool value, Error **errp)
> vms->its = value;
> }
>
> +static bool virt_get_kaslr_dtb_seed(Object *obj, Error **errp)
> +{
> + VirtMachineState *vms = VIRT_MACHINE(obj);
> +
> + return vms->kaslr_dtb_seed;
> +}
> +
> +static void virt_set_kaslr_dtb_seed(Object *obj, bool value, Error **errp)
> +{
> + VirtMachineState *vms = VIRT_MACHINE(obj);
> +
> + vms->kaslr_dtb_seed = value;
> +}
> +
> static char *virt_get_oem_id(Object *obj, Error **errp)
> {
> VirtMachineState *vms = VIRT_MACHINE(obj);
> @@ -2764,6 +2782,13 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
> "Set on/off to enable/disable "
> "ITS instantiation");
>
> + object_class_property_add_bool(oc, "kaslr-dtb-seed",
> + virt_get_kaslr_dtb_seed,
> + virt_set_kaslr_dtb_seed);
> + object_class_property_set_description(oc, "kaslr-dtb-seed",
> + "Set off to disable passing of kaslr "
> + "dtb node to guest");
> +
> object_class_property_add_str(oc, "x-oem-id",
> virt_get_oem_id,
> virt_set_oem_id);
> @@ -2828,6 +2853,9 @@ static void virt_instance_init(Object *obj)
> /* MTE is disabled by default. */
> vms->mte = false;
>
> + /* Supply a kaslr-seed by default */
> + vms->kaslr_dtb_seed = true;
> +
> vms->irqmap = a15irqmap;
>
> virt_flash_create(vms);
> --
> 2.30.2
>
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
^ permalink raw reply
* [kvalo-ath:pending 8/17] drivers/net/wireless/ath/ath11k/dp_tx.c:511 ath11k_dp_tx_update_txcompl() error: uninitialized symbol 'rate_idx'.
From: Dan Carpenter @ 2022-01-05 14:49 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 8459 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head: c9a516b946c4b3ce25d422890ca78d0ca730b065
commit: 1b8bb94c0612cf32e418e90ae93cf37214d84669 [8/17] ath11k: report tx bitrate for iw wlan station dump
config: microblaze-randconfig-m031-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230637.BasxPV7i-lkp(a)intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/net/wireless/ath/ath11k/dp_tx.c:511 ath11k_dp_tx_update_txcompl() error: uninitialized symbol 'rate_idx'.
vim +/rate_idx +511 drivers/net/wireless/ath/ath11k/dp_tx.c
1b8bb94c0612cf Wen Gong 2021-12-20 418 void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
1b8bb94c0612cf Wen Gong 2021-12-20 419 {
1b8bb94c0612cf Wen Gong 2021-12-20 420 struct ath11k_base *ab = ar->ab;
1b8bb94c0612cf Wen Gong 2021-12-20 421 struct ath11k_per_peer_tx_stats *peer_stats = &ar->cached_stats;
1b8bb94c0612cf Wen Gong 2021-12-20 422 enum hal_tx_rate_stats_pkt_type pkt_type;
1b8bb94c0612cf Wen Gong 2021-12-20 423 enum hal_tx_rate_stats_sgi sgi;
1b8bb94c0612cf Wen Gong 2021-12-20 424 enum hal_tx_rate_stats_bw bw;
1b8bb94c0612cf Wen Gong 2021-12-20 425 struct ath11k_peer *peer;
1b8bb94c0612cf Wen Gong 2021-12-20 426 struct ath11k_sta *arsta;
1b8bb94c0612cf Wen Gong 2021-12-20 427 struct ieee80211_sta *sta;
1b8bb94c0612cf Wen Gong 2021-12-20 428 u16 rate, ru_tones;
1b8bb94c0612cf Wen Gong 2021-12-20 429 u8 mcs, rate_idx, ofdma;
1b8bb94c0612cf Wen Gong 2021-12-20 430 int ret;
1b8bb94c0612cf Wen Gong 2021-12-20 431
1b8bb94c0612cf Wen Gong 2021-12-20 432 spin_lock_bh(&ab->base_lock);
1b8bb94c0612cf Wen Gong 2021-12-20 433 peer = ath11k_peer_find_by_id(ab, ts->peer_id);
1b8bb94c0612cf Wen Gong 2021-12-20 434 if (!peer || !peer->sta) {
1b8bb94c0612cf Wen Gong 2021-12-20 435 ath11k_dbg(ab, ATH11K_DBG_DP_TX,
1b8bb94c0612cf Wen Gong 2021-12-20 436 "failed to find the peer by id %u\n", ts->peer_id);
1b8bb94c0612cf Wen Gong 2021-12-20 437 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 438 }
1b8bb94c0612cf Wen Gong 2021-12-20 439
1b8bb94c0612cf Wen Gong 2021-12-20 440 sta = peer->sta;
1b8bb94c0612cf Wen Gong 2021-12-20 441 arsta = (struct ath11k_sta *)sta->drv_priv;
1b8bb94c0612cf Wen Gong 2021-12-20 442
1b8bb94c0612cf Wen Gong 2021-12-20 443 memset(&arsta->txrate, 0, sizeof(arsta->txrate));
1b8bb94c0612cf Wen Gong 2021-12-20 444 pkt_type = FIELD_GET(HAL_TX_RATE_STATS_INFO0_PKT_TYPE,
1b8bb94c0612cf Wen Gong 2021-12-20 445 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 446 mcs = FIELD_GET(HAL_TX_RATE_STATS_INFO0_MCS,
1b8bb94c0612cf Wen Gong 2021-12-20 447 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 448 sgi = FIELD_GET(HAL_TX_RATE_STATS_INFO0_SGI,
1b8bb94c0612cf Wen Gong 2021-12-20 449 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 450 bw = FIELD_GET(HAL_TX_RATE_STATS_INFO0_BW, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 451 ru_tones = FIELD_GET(HAL_TX_RATE_STATS_INFO0_TONES_IN_RU, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 452 ofdma = FIELD_GET(HAL_TX_RATE_STATS_INFO0_OFDMA_TX, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 453
1b8bb94c0612cf Wen Gong 2021-12-20 454 /* This is to prefer choose the real NSS value arsta->last_txrate.nss,
1b8bb94c0612cf Wen Gong 2021-12-20 455 * if it is invalid, then choose the NSS value while assoc.
1b8bb94c0612cf Wen Gong 2021-12-20 456 */
1b8bb94c0612cf Wen Gong 2021-12-20 457 if (arsta->last_txrate.nss)
1b8bb94c0612cf Wen Gong 2021-12-20 458 arsta->txrate.nss = arsta->last_txrate.nss;
1b8bb94c0612cf Wen Gong 2021-12-20 459 else
1b8bb94c0612cf Wen Gong 2021-12-20 460 arsta->txrate.nss = arsta->peer_nss;
1b8bb94c0612cf Wen Gong 2021-12-20 461
1b8bb94c0612cf Wen Gong 2021-12-20 462 if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11A ||
1b8bb94c0612cf Wen Gong 2021-12-20 463 pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11B) {
1b8bb94c0612cf Wen Gong 2021-12-20 464 ret = ath11k_mac_hw_ratecode_to_legacy_rate(mcs,
1b8bb94c0612cf Wen Gong 2021-12-20 465 pkt_type,
1b8bb94c0612cf Wen Gong 2021-12-20 466 &rate_idx,
1b8bb94c0612cf Wen Gong 2021-12-20 467 &rate);
1b8bb94c0612cf Wen Gong 2021-12-20 468 if (ret < 0)
1b8bb94c0612cf Wen Gong 2021-12-20 469 goto err_out;
"rate_idx" not initialized on other paths.
1b8bb94c0612cf Wen Gong 2021-12-20 470 arsta->txrate.legacy = rate;
1b8bb94c0612cf Wen Gong 2021-12-20 471 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11N) {
1b8bb94c0612cf Wen Gong 2021-12-20 472 if (mcs > 7) {
1b8bb94c0612cf Wen Gong 2021-12-20 473 ath11k_warn(ab, "Invalid HT mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 474 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 475 }
1b8bb94c0612cf Wen Gong 2021-12-20 476
1b8bb94c0612cf Wen Gong 2021-12-20 477 if (arsta->txrate.nss != 0)
1b8bb94c0612cf Wen Gong 2021-12-20 478 arsta->txrate.mcs = mcs + 8 * (arsta->txrate.nss - 1);
1b8bb94c0612cf Wen Gong 2021-12-20 479 arsta->txrate.flags = RATE_INFO_FLAGS_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 480 if (sgi)
1b8bb94c0612cf Wen Gong 2021-12-20 481 arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
1b8bb94c0612cf Wen Gong 2021-12-20 482 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AC) {
1b8bb94c0612cf Wen Gong 2021-12-20 483 if (mcs > 9) {
1b8bb94c0612cf Wen Gong 2021-12-20 484 ath11k_warn(ab, "Invalid VHT mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 485 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 486 }
1b8bb94c0612cf Wen Gong 2021-12-20 487
1b8bb94c0612cf Wen Gong 2021-12-20 488 arsta->txrate.mcs = mcs;
1b8bb94c0612cf Wen Gong 2021-12-20 489 arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 490 if (sgi)
1b8bb94c0612cf Wen Gong 2021-12-20 491 arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
1b8bb94c0612cf Wen Gong 2021-12-20 492 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
1b8bb94c0612cf Wen Gong 2021-12-20 493 if (mcs > 11) {
1b8bb94c0612cf Wen Gong 2021-12-20 494 ath11k_warn(ab, "Invalid HE mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 495 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 496 }
1b8bb94c0612cf Wen Gong 2021-12-20 497
1b8bb94c0612cf Wen Gong 2021-12-20 498 arsta->txrate.mcs = mcs;
1b8bb94c0612cf Wen Gong 2021-12-20 499 arsta->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 500 arsta->txrate.he_gi = ath11k_mac_he_gi_to_nl80211_he_gi(sgi);
1b8bb94c0612cf Wen Gong 2021-12-20 501 }
1b8bb94c0612cf Wen Gong 2021-12-20 502
1b8bb94c0612cf Wen Gong 2021-12-20 503 arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
1b8bb94c0612cf Wen Gong 2021-12-20 504 if (ofdma && pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
1b8bb94c0612cf Wen Gong 2021-12-20 505 arsta->txrate.bw = RATE_INFO_BW_HE_RU;
1b8bb94c0612cf Wen Gong 2021-12-20 506 arsta->txrate.he_ru_alloc =
1b8bb94c0612cf Wen Gong 2021-12-20 507 ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
1b8bb94c0612cf Wen Gong 2021-12-20 508 }
1b8bb94c0612cf Wen Gong 2021-12-20 509
1b8bb94c0612cf Wen Gong 2021-12-20 510 if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
1b8bb94c0612cf Wen Gong 2021-12-20 @511 ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
^^^^^^^^
1b8bb94c0612cf Wen Gong 2021-12-20 512
1b8bb94c0612cf Wen Gong 2021-12-20 513 err_out:
1b8bb94c0612cf Wen Gong 2021-12-20 514 spin_unlock_bh(&ab->base_lock);
1b8bb94c0612cf Wen Gong 2021-12-20 515 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply
* [kvalo-ath:pending 8/17] drivers/net/wireless/ath/ath11k/dp_tx.c:511 ath11k_dp_tx_update_txcompl() error: uninitialized symbol 'rate_idx'.
From: Dan Carpenter @ 2022-01-05 14:49 UTC (permalink / raw)
To: kbuild, Wen Gong
Cc: lkp, kbuild-all, Kalle Valo, ath10k, linux-kernel, Kalle Valo
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head: c9a516b946c4b3ce25d422890ca78d0ca730b065
commit: 1b8bb94c0612cf32e418e90ae93cf37214d84669 [8/17] ath11k: report tx bitrate for iw wlan station dump
config: microblaze-randconfig-m031-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230637.BasxPV7i-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/net/wireless/ath/ath11k/dp_tx.c:511 ath11k_dp_tx_update_txcompl() error: uninitialized symbol 'rate_idx'.
vim +/rate_idx +511 drivers/net/wireless/ath/ath11k/dp_tx.c
1b8bb94c0612cf Wen Gong 2021-12-20 418 void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
1b8bb94c0612cf Wen Gong 2021-12-20 419 {
1b8bb94c0612cf Wen Gong 2021-12-20 420 struct ath11k_base *ab = ar->ab;
1b8bb94c0612cf Wen Gong 2021-12-20 421 struct ath11k_per_peer_tx_stats *peer_stats = &ar->cached_stats;
1b8bb94c0612cf Wen Gong 2021-12-20 422 enum hal_tx_rate_stats_pkt_type pkt_type;
1b8bb94c0612cf Wen Gong 2021-12-20 423 enum hal_tx_rate_stats_sgi sgi;
1b8bb94c0612cf Wen Gong 2021-12-20 424 enum hal_tx_rate_stats_bw bw;
1b8bb94c0612cf Wen Gong 2021-12-20 425 struct ath11k_peer *peer;
1b8bb94c0612cf Wen Gong 2021-12-20 426 struct ath11k_sta *arsta;
1b8bb94c0612cf Wen Gong 2021-12-20 427 struct ieee80211_sta *sta;
1b8bb94c0612cf Wen Gong 2021-12-20 428 u16 rate, ru_tones;
1b8bb94c0612cf Wen Gong 2021-12-20 429 u8 mcs, rate_idx, ofdma;
1b8bb94c0612cf Wen Gong 2021-12-20 430 int ret;
1b8bb94c0612cf Wen Gong 2021-12-20 431
1b8bb94c0612cf Wen Gong 2021-12-20 432 spin_lock_bh(&ab->base_lock);
1b8bb94c0612cf Wen Gong 2021-12-20 433 peer = ath11k_peer_find_by_id(ab, ts->peer_id);
1b8bb94c0612cf Wen Gong 2021-12-20 434 if (!peer || !peer->sta) {
1b8bb94c0612cf Wen Gong 2021-12-20 435 ath11k_dbg(ab, ATH11K_DBG_DP_TX,
1b8bb94c0612cf Wen Gong 2021-12-20 436 "failed to find the peer by id %u\n", ts->peer_id);
1b8bb94c0612cf Wen Gong 2021-12-20 437 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 438 }
1b8bb94c0612cf Wen Gong 2021-12-20 439
1b8bb94c0612cf Wen Gong 2021-12-20 440 sta = peer->sta;
1b8bb94c0612cf Wen Gong 2021-12-20 441 arsta = (struct ath11k_sta *)sta->drv_priv;
1b8bb94c0612cf Wen Gong 2021-12-20 442
1b8bb94c0612cf Wen Gong 2021-12-20 443 memset(&arsta->txrate, 0, sizeof(arsta->txrate));
1b8bb94c0612cf Wen Gong 2021-12-20 444 pkt_type = FIELD_GET(HAL_TX_RATE_STATS_INFO0_PKT_TYPE,
1b8bb94c0612cf Wen Gong 2021-12-20 445 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 446 mcs = FIELD_GET(HAL_TX_RATE_STATS_INFO0_MCS,
1b8bb94c0612cf Wen Gong 2021-12-20 447 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 448 sgi = FIELD_GET(HAL_TX_RATE_STATS_INFO0_SGI,
1b8bb94c0612cf Wen Gong 2021-12-20 449 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 450 bw = FIELD_GET(HAL_TX_RATE_STATS_INFO0_BW, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 451 ru_tones = FIELD_GET(HAL_TX_RATE_STATS_INFO0_TONES_IN_RU, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 452 ofdma = FIELD_GET(HAL_TX_RATE_STATS_INFO0_OFDMA_TX, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 453
1b8bb94c0612cf Wen Gong 2021-12-20 454 /* This is to prefer choose the real NSS value arsta->last_txrate.nss,
1b8bb94c0612cf Wen Gong 2021-12-20 455 * if it is invalid, then choose the NSS value while assoc.
1b8bb94c0612cf Wen Gong 2021-12-20 456 */
1b8bb94c0612cf Wen Gong 2021-12-20 457 if (arsta->last_txrate.nss)
1b8bb94c0612cf Wen Gong 2021-12-20 458 arsta->txrate.nss = arsta->last_txrate.nss;
1b8bb94c0612cf Wen Gong 2021-12-20 459 else
1b8bb94c0612cf Wen Gong 2021-12-20 460 arsta->txrate.nss = arsta->peer_nss;
1b8bb94c0612cf Wen Gong 2021-12-20 461
1b8bb94c0612cf Wen Gong 2021-12-20 462 if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11A ||
1b8bb94c0612cf Wen Gong 2021-12-20 463 pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11B) {
1b8bb94c0612cf Wen Gong 2021-12-20 464 ret = ath11k_mac_hw_ratecode_to_legacy_rate(mcs,
1b8bb94c0612cf Wen Gong 2021-12-20 465 pkt_type,
1b8bb94c0612cf Wen Gong 2021-12-20 466 &rate_idx,
1b8bb94c0612cf Wen Gong 2021-12-20 467 &rate);
1b8bb94c0612cf Wen Gong 2021-12-20 468 if (ret < 0)
1b8bb94c0612cf Wen Gong 2021-12-20 469 goto err_out;
"rate_idx" not initialized on other paths.
1b8bb94c0612cf Wen Gong 2021-12-20 470 arsta->txrate.legacy = rate;
1b8bb94c0612cf Wen Gong 2021-12-20 471 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11N) {
1b8bb94c0612cf Wen Gong 2021-12-20 472 if (mcs > 7) {
1b8bb94c0612cf Wen Gong 2021-12-20 473 ath11k_warn(ab, "Invalid HT mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 474 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 475 }
1b8bb94c0612cf Wen Gong 2021-12-20 476
1b8bb94c0612cf Wen Gong 2021-12-20 477 if (arsta->txrate.nss != 0)
1b8bb94c0612cf Wen Gong 2021-12-20 478 arsta->txrate.mcs = mcs + 8 * (arsta->txrate.nss - 1);
1b8bb94c0612cf Wen Gong 2021-12-20 479 arsta->txrate.flags = RATE_INFO_FLAGS_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 480 if (sgi)
1b8bb94c0612cf Wen Gong 2021-12-20 481 arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
1b8bb94c0612cf Wen Gong 2021-12-20 482 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AC) {
1b8bb94c0612cf Wen Gong 2021-12-20 483 if (mcs > 9) {
1b8bb94c0612cf Wen Gong 2021-12-20 484 ath11k_warn(ab, "Invalid VHT mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 485 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 486 }
1b8bb94c0612cf Wen Gong 2021-12-20 487
1b8bb94c0612cf Wen Gong 2021-12-20 488 arsta->txrate.mcs = mcs;
1b8bb94c0612cf Wen Gong 2021-12-20 489 arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 490 if (sgi)
1b8bb94c0612cf Wen Gong 2021-12-20 491 arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
1b8bb94c0612cf Wen Gong 2021-12-20 492 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
1b8bb94c0612cf Wen Gong 2021-12-20 493 if (mcs > 11) {
1b8bb94c0612cf Wen Gong 2021-12-20 494 ath11k_warn(ab, "Invalid HE mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 495 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 496 }
1b8bb94c0612cf Wen Gong 2021-12-20 497
1b8bb94c0612cf Wen Gong 2021-12-20 498 arsta->txrate.mcs = mcs;
1b8bb94c0612cf Wen Gong 2021-12-20 499 arsta->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 500 arsta->txrate.he_gi = ath11k_mac_he_gi_to_nl80211_he_gi(sgi);
1b8bb94c0612cf Wen Gong 2021-12-20 501 }
1b8bb94c0612cf Wen Gong 2021-12-20 502
1b8bb94c0612cf Wen Gong 2021-12-20 503 arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
1b8bb94c0612cf Wen Gong 2021-12-20 504 if (ofdma && pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
1b8bb94c0612cf Wen Gong 2021-12-20 505 arsta->txrate.bw = RATE_INFO_BW_HE_RU;
1b8bb94c0612cf Wen Gong 2021-12-20 506 arsta->txrate.he_ru_alloc =
1b8bb94c0612cf Wen Gong 2021-12-20 507 ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
1b8bb94c0612cf Wen Gong 2021-12-20 508 }
1b8bb94c0612cf Wen Gong 2021-12-20 509
1b8bb94c0612cf Wen Gong 2021-12-20 510 if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
1b8bb94c0612cf Wen Gong 2021-12-20 @511 ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
^^^^^^^^
1b8bb94c0612cf Wen Gong 2021-12-20 512
1b8bb94c0612cf Wen Gong 2021-12-20 513 err_out:
1b8bb94c0612cf Wen Gong 2021-12-20 514 spin_unlock_bh(&ab->base_lock);
1b8bb94c0612cf Wen Gong 2021-12-20 515 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [kvalo-ath:pending 8/17] drivers/net/wireless/ath/ath11k/dp_tx.c:511 ath11k_dp_tx_update_txcompl() error: uninitialized symbol 'rate_idx'.
From: Dan Carpenter @ 2022-01-05 14:49 UTC (permalink / raw)
To: kbuild, Wen Gong
Cc: lkp, kbuild-all, Kalle Valo, ath10k, linux-kernel, Kalle Valo
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head: c9a516b946c4b3ce25d422890ca78d0ca730b065
commit: 1b8bb94c0612cf32e418e90ae93cf37214d84669 [8/17] ath11k: report tx bitrate for iw wlan station dump
config: microblaze-randconfig-m031-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230637.BasxPV7i-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/net/wireless/ath/ath11k/dp_tx.c:511 ath11k_dp_tx_update_txcompl() error: uninitialized symbol 'rate_idx'.
vim +/rate_idx +511 drivers/net/wireless/ath/ath11k/dp_tx.c
1b8bb94c0612cf Wen Gong 2021-12-20 418 void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
1b8bb94c0612cf Wen Gong 2021-12-20 419 {
1b8bb94c0612cf Wen Gong 2021-12-20 420 struct ath11k_base *ab = ar->ab;
1b8bb94c0612cf Wen Gong 2021-12-20 421 struct ath11k_per_peer_tx_stats *peer_stats = &ar->cached_stats;
1b8bb94c0612cf Wen Gong 2021-12-20 422 enum hal_tx_rate_stats_pkt_type pkt_type;
1b8bb94c0612cf Wen Gong 2021-12-20 423 enum hal_tx_rate_stats_sgi sgi;
1b8bb94c0612cf Wen Gong 2021-12-20 424 enum hal_tx_rate_stats_bw bw;
1b8bb94c0612cf Wen Gong 2021-12-20 425 struct ath11k_peer *peer;
1b8bb94c0612cf Wen Gong 2021-12-20 426 struct ath11k_sta *arsta;
1b8bb94c0612cf Wen Gong 2021-12-20 427 struct ieee80211_sta *sta;
1b8bb94c0612cf Wen Gong 2021-12-20 428 u16 rate, ru_tones;
1b8bb94c0612cf Wen Gong 2021-12-20 429 u8 mcs, rate_idx, ofdma;
1b8bb94c0612cf Wen Gong 2021-12-20 430 int ret;
1b8bb94c0612cf Wen Gong 2021-12-20 431
1b8bb94c0612cf Wen Gong 2021-12-20 432 spin_lock_bh(&ab->base_lock);
1b8bb94c0612cf Wen Gong 2021-12-20 433 peer = ath11k_peer_find_by_id(ab, ts->peer_id);
1b8bb94c0612cf Wen Gong 2021-12-20 434 if (!peer || !peer->sta) {
1b8bb94c0612cf Wen Gong 2021-12-20 435 ath11k_dbg(ab, ATH11K_DBG_DP_TX,
1b8bb94c0612cf Wen Gong 2021-12-20 436 "failed to find the peer by id %u\n", ts->peer_id);
1b8bb94c0612cf Wen Gong 2021-12-20 437 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 438 }
1b8bb94c0612cf Wen Gong 2021-12-20 439
1b8bb94c0612cf Wen Gong 2021-12-20 440 sta = peer->sta;
1b8bb94c0612cf Wen Gong 2021-12-20 441 arsta = (struct ath11k_sta *)sta->drv_priv;
1b8bb94c0612cf Wen Gong 2021-12-20 442
1b8bb94c0612cf Wen Gong 2021-12-20 443 memset(&arsta->txrate, 0, sizeof(arsta->txrate));
1b8bb94c0612cf Wen Gong 2021-12-20 444 pkt_type = FIELD_GET(HAL_TX_RATE_STATS_INFO0_PKT_TYPE,
1b8bb94c0612cf Wen Gong 2021-12-20 445 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 446 mcs = FIELD_GET(HAL_TX_RATE_STATS_INFO0_MCS,
1b8bb94c0612cf Wen Gong 2021-12-20 447 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 448 sgi = FIELD_GET(HAL_TX_RATE_STATS_INFO0_SGI,
1b8bb94c0612cf Wen Gong 2021-12-20 449 ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 450 bw = FIELD_GET(HAL_TX_RATE_STATS_INFO0_BW, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 451 ru_tones = FIELD_GET(HAL_TX_RATE_STATS_INFO0_TONES_IN_RU, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 452 ofdma = FIELD_GET(HAL_TX_RATE_STATS_INFO0_OFDMA_TX, ts->rate_stats);
1b8bb94c0612cf Wen Gong 2021-12-20 453
1b8bb94c0612cf Wen Gong 2021-12-20 454 /* This is to prefer choose the real NSS value arsta->last_txrate.nss,
1b8bb94c0612cf Wen Gong 2021-12-20 455 * if it is invalid, then choose the NSS value while assoc.
1b8bb94c0612cf Wen Gong 2021-12-20 456 */
1b8bb94c0612cf Wen Gong 2021-12-20 457 if (arsta->last_txrate.nss)
1b8bb94c0612cf Wen Gong 2021-12-20 458 arsta->txrate.nss = arsta->last_txrate.nss;
1b8bb94c0612cf Wen Gong 2021-12-20 459 else
1b8bb94c0612cf Wen Gong 2021-12-20 460 arsta->txrate.nss = arsta->peer_nss;
1b8bb94c0612cf Wen Gong 2021-12-20 461
1b8bb94c0612cf Wen Gong 2021-12-20 462 if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11A ||
1b8bb94c0612cf Wen Gong 2021-12-20 463 pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11B) {
1b8bb94c0612cf Wen Gong 2021-12-20 464 ret = ath11k_mac_hw_ratecode_to_legacy_rate(mcs,
1b8bb94c0612cf Wen Gong 2021-12-20 465 pkt_type,
1b8bb94c0612cf Wen Gong 2021-12-20 466 &rate_idx,
1b8bb94c0612cf Wen Gong 2021-12-20 467 &rate);
1b8bb94c0612cf Wen Gong 2021-12-20 468 if (ret < 0)
1b8bb94c0612cf Wen Gong 2021-12-20 469 goto err_out;
"rate_idx" not initialized on other paths.
1b8bb94c0612cf Wen Gong 2021-12-20 470 arsta->txrate.legacy = rate;
1b8bb94c0612cf Wen Gong 2021-12-20 471 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11N) {
1b8bb94c0612cf Wen Gong 2021-12-20 472 if (mcs > 7) {
1b8bb94c0612cf Wen Gong 2021-12-20 473 ath11k_warn(ab, "Invalid HT mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 474 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 475 }
1b8bb94c0612cf Wen Gong 2021-12-20 476
1b8bb94c0612cf Wen Gong 2021-12-20 477 if (arsta->txrate.nss != 0)
1b8bb94c0612cf Wen Gong 2021-12-20 478 arsta->txrate.mcs = mcs + 8 * (arsta->txrate.nss - 1);
1b8bb94c0612cf Wen Gong 2021-12-20 479 arsta->txrate.flags = RATE_INFO_FLAGS_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 480 if (sgi)
1b8bb94c0612cf Wen Gong 2021-12-20 481 arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
1b8bb94c0612cf Wen Gong 2021-12-20 482 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AC) {
1b8bb94c0612cf Wen Gong 2021-12-20 483 if (mcs > 9) {
1b8bb94c0612cf Wen Gong 2021-12-20 484 ath11k_warn(ab, "Invalid VHT mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 485 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 486 }
1b8bb94c0612cf Wen Gong 2021-12-20 487
1b8bb94c0612cf Wen Gong 2021-12-20 488 arsta->txrate.mcs = mcs;
1b8bb94c0612cf Wen Gong 2021-12-20 489 arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 490 if (sgi)
1b8bb94c0612cf Wen Gong 2021-12-20 491 arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
1b8bb94c0612cf Wen Gong 2021-12-20 492 } else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
1b8bb94c0612cf Wen Gong 2021-12-20 493 if (mcs > 11) {
1b8bb94c0612cf Wen Gong 2021-12-20 494 ath11k_warn(ab, "Invalid HE mcs index %d\n", mcs);
1b8bb94c0612cf Wen Gong 2021-12-20 495 goto err_out;
1b8bb94c0612cf Wen Gong 2021-12-20 496 }
1b8bb94c0612cf Wen Gong 2021-12-20 497
1b8bb94c0612cf Wen Gong 2021-12-20 498 arsta->txrate.mcs = mcs;
1b8bb94c0612cf Wen Gong 2021-12-20 499 arsta->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
1b8bb94c0612cf Wen Gong 2021-12-20 500 arsta->txrate.he_gi = ath11k_mac_he_gi_to_nl80211_he_gi(sgi);
1b8bb94c0612cf Wen Gong 2021-12-20 501 }
1b8bb94c0612cf Wen Gong 2021-12-20 502
1b8bb94c0612cf Wen Gong 2021-12-20 503 arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
1b8bb94c0612cf Wen Gong 2021-12-20 504 if (ofdma && pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
1b8bb94c0612cf Wen Gong 2021-12-20 505 arsta->txrate.bw = RATE_INFO_BW_HE_RU;
1b8bb94c0612cf Wen Gong 2021-12-20 506 arsta->txrate.he_ru_alloc =
1b8bb94c0612cf Wen Gong 2021-12-20 507 ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
1b8bb94c0612cf Wen Gong 2021-12-20 508 }
1b8bb94c0612cf Wen Gong 2021-12-20 509
1b8bb94c0612cf Wen Gong 2021-12-20 510 if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
1b8bb94c0612cf Wen Gong 2021-12-20 @511 ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
^^^^^^^^
1b8bb94c0612cf Wen Gong 2021-12-20 512
1b8bb94c0612cf Wen Gong 2021-12-20 513 err_out:
1b8bb94c0612cf Wen Gong 2021-12-20 514 spin_unlock_bh(&ab->base_lock);
1b8bb94c0612cf Wen Gong 2021-12-20 515 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply
* Re: [PATCH v8 10/14] PCI: mediatek: Allow building for ARCH_AIROHA
From: Lorenzo Pieralisi @ 2022-01-05 14:50 UTC (permalink / raw)
To: Felix Fietkau
Cc: linux-arm-kernel, Rob Herring, Krzysztof Wilczyński,
Bjorn Helgaas, Matthias Brugger, john, linux-pci, linux-kernel,
linux-mediatek
In-Reply-To: <20211220211854.89452-11-nbd@nbd.name>
On Mon, Dec 20, 2021 at 10:18:50PM +0100, Felix Fietkau wrote:
> Allow selecting the pcie-mediatek driver if ARCH_AIROHA is set, because the
> Airoha EN7523 SoC uses the same controller as MT7622.
> The driver itself is not modified. The PCIe controller DT node should use
> mediatek,mt7622-pcie after airoha,en7523-pcie.
>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> drivers/pci/controller/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 93b141110537..f1342059c2a3 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -233,7 +233,7 @@ config PCIE_ROCKCHIP_EP
>
> config PCIE_MEDIATEK
> tristate "MediaTek PCIe controller"
> - depends on ARCH_MEDIATEK || COMPILE_TEST
> + depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
> depends on OF
> depends on PCI_MSI_IRQ_DOMAIN
> help
> --
> 2.34.1
>
^ permalink raw reply
* Re: [PATCH net-next 00/15] net: hns3: refactor rss/tqp stats functions
From: patchwork-bot+netdevbpf @ 2022-01-05 14:50 UTC (permalink / raw)
To: Guangbin Huang
Cc: davem, kuba, wangjie125, netdev, linux-kernel, lipeng321,
chenhao288
In-Reply-To: <20220105142015.51097-1-huangguangbin2@huawei.com>
Hello:
This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 5 Jan 2022 22:20:00 +0800 you wrote:
> From: Jie Wang <wangjie125@huawei.com>
>
> Currently, hns3 PF and VF module have two sets of rss and tqp stats APIs
> to provide get and set functions. Most of these APIs are the same. There is
> no need to keep these two sets of same functions for double development and
> bugfix work.
>
> [...]
Here is the summary with links:
- [net-next,01/15] net: hns3: create new rss common structure hclge_comm_rss_cfg
https://git.kernel.org/netdev/net-next/c/9667b814387c
- [net-next,02/15] net: hns3: refactor hclge_comm_send function in PF/VF drivers
https://git.kernel.org/netdev/net-next/c/9970308fe6a5
- [net-next,03/15] net: hns3: create new set of common rss get APIs for PF and VF rss module
https://git.kernel.org/netdev/net-next/c/1bfd6682e9b5
- [net-next,04/15] net: hns3: refactor PF rss get APIs with new common rss get APIs
https://git.kernel.org/netdev/net-next/c/7347255ea389
- [net-next,05/15] net: hns3: refactor VF rss get APIs with new common rss get APIs
https://git.kernel.org/netdev/net-next/c/027733b12a10
- [net-next,06/15] net: hns3: create new set of common rss set APIs for PF and VF module
https://git.kernel.org/netdev/net-next/c/6de060042867
- [net-next,07/15] net: hns3: refactor PF rss set APIs with new common rss set APIs
https://git.kernel.org/netdev/net-next/c/1813ee524331
- [net-next,08/15] net: hns3: refactor VF rss set APIs with new common rss set APIs
https://git.kernel.org/netdev/net-next/c/7428d6c93665
- [net-next,09/15] net: hns3: create new set of common rss init APIs for PF and VF reuse
https://git.kernel.org/netdev/net-next/c/2c0d3f4cd25f
- [net-next,10/15] net: hns3: refactor PF rss init APIs with new common rss init APIs
https://git.kernel.org/netdev/net-next/c/07dce03cd5aa
- [net-next,11/15] net: hns3: refactor VF rss init APIs with new common rss init APIs
https://git.kernel.org/netdev/net-next/c/93969dc14fcd
- [net-next,12/15] net: hns3: create new set of common tqp stats APIs for PF and VF reuse
https://git.kernel.org/netdev/net-next/c/287db5c40d15
- [net-next,13/15] net: hns3: refactor PF tqp stats APIs with new common tqp stats APIs
https://git.kernel.org/netdev/net-next/c/add7645c841c
- [net-next,14/15] net: hns3: refactor VF tqp stats APIs with new common tqp stats APIs
https://git.kernel.org/netdev/net-next/c/4afc310cf9a8
- [net-next,15/15] net: hns3: create new common cmd code for PF and VF modules
https://git.kernel.org/netdev/net-next/c/43710bfebf23
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply
* Re: [PATCH] tools/xen-detect: avoid possible pitfall with cpuid()
From: Anthony PERARD @ 2022-01-05 14:49 UTC (permalink / raw)
To: Jan Beulich
Cc: xen-devel@lists.xenproject.org, Ian Jackson, Andrew Cooper,
Wei Liu, Roger Pau Monné
In-Reply-To: <94338540-4bcc-7ad7-9de1-944c0dc96709@suse.com>
On Fri, Dec 03, 2021 at 01:09:04PM +0100, Jan Beulich wrote:
> The 64-bit form forces %ecx to 0 while the 32-bit one so far didn't - it
> only ended up that way when "pv_context" is zero. While presently no
> leaf queried by callers has separate subleaves, let's avoid chancing it.
>
> While there
> - replace references to operands by number,
> - relax constraints where possible,
> - limit PUSH/POP to just the registers not also used as input,
> all where applicable also for the 64-bit variant.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply
* Re: [PATCH v8 10/14] PCI: mediatek: Allow building for ARCH_AIROHA
From: Lorenzo Pieralisi @ 2022-01-05 14:50 UTC (permalink / raw)
To: Felix Fietkau
Cc: linux-arm-kernel, Rob Herring, Krzysztof Wilczyński,
Bjorn Helgaas, Matthias Brugger, john, linux-pci, linux-kernel,
linux-mediatek
In-Reply-To: <20211220211854.89452-11-nbd@nbd.name>
On Mon, Dec 20, 2021 at 10:18:50PM +0100, Felix Fietkau wrote:
> Allow selecting the pcie-mediatek driver if ARCH_AIROHA is set, because the
> Airoha EN7523 SoC uses the same controller as MT7622.
> The driver itself is not modified. The PCIe controller DT node should use
> mediatek,mt7622-pcie after airoha,en7523-pcie.
>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> drivers/pci/controller/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 93b141110537..f1342059c2a3 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -233,7 +233,7 @@ config PCIE_ROCKCHIP_EP
>
> config PCIE_MEDIATEK
> tristate "MediaTek PCIe controller"
> - depends on ARCH_MEDIATEK || COMPILE_TEST
> + depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
> depends on OF
> depends on PCI_MSI_IRQ_DOMAIN
> help
> --
> 2.34.1
>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply
* Re: [PATCH 3/3] net: usb: r8152: remove unused definition
From: Henning Schild @ 2022-01-05 14:51 UTC (permalink / raw)
To: Aaron Ma; +Cc: kuba, linux-usb, netdev, linux-kernel, davem, hayeswang, tiwai
In-Reply-To: <20220105142351.8026-3-aaron.ma@canonical.com>
Am Wed, 5 Jan 2022 22:23:51 +0800
schrieb Aaron Ma <aaron.ma@canonical.com>:
Maybe add a
Fixes: f77b83b5bbab ("net: usb: r8152: Add MAC passthrough support for more Lenovo Docks")
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
> drivers/net/usb/r8152.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 3fbce3dbc04d..be2a6a2c2445 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -773,9 +773,6 @@ enum rtl8152_flags {
> RX_EPROTO,
> };
>
> -#define DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2 0x3082
> -#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387
> -
> struct tally_counter {
> __le64 tx_packets;
> __le64 rx_packets;
^ permalink raw reply
* [PATCH -next] ieee802154: atusb: move to new USB API
From: Pavel Skripkin @ 2022-01-05 14:49 UTC (permalink / raw)
To: stefan, alex.aring, davem, kuba, linux-wpan, netdev, linux-kernel
Cc: Pavel Skripkin
Old USB API is prone to uninit value bugs if error handling is not
correct. Let's move atusb to use new USB API to
1) Make code more simple, since new API does not require memory
to be allocates via kmalloc()
2) Defend driver from usb-related uninit value bugs.
3) Make code more modern and simple
This patch removes atusb usb wrappers as Greg suggested [0], this will make
code more obvious and easier to understand over time, and replaces old
API calls with new ones.
Also this patch adds and updates usb related error handling to prevent
possible uninit value bugs in future
Link: https://lore.kernel.org/all/YdL0GPxy4TdGDzOO@kroah.com/ [0]
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
Only build tested.
---
drivers/net/ieee802154/atusb.c | 182 ++++++++++++---------------------
1 file changed, 65 insertions(+), 117 deletions(-)
diff --git a/drivers/net/ieee802154/atusb.c b/drivers/net/ieee802154/atusb.c
index 2f5e7b31032a..1ba057bfec45 100644
--- a/drivers/net/ieee802154/atusb.c
+++ b/drivers/net/ieee802154/atusb.c
@@ -74,81 +74,6 @@ struct atusb_chip_data {
int (*set_txpower)(struct ieee802154_hw*, s32);
};
-/* ----- USB commands without data ----------------------------------------- */
-
-/* To reduce the number of error checks in the code, we record the first error
- * in atusb->err and reject all subsequent requests until the error is cleared.
- */
-
-static int atusb_control_msg(struct atusb *atusb, unsigned int pipe,
- __u8 request, __u8 requesttype,
- __u16 value, __u16 index,
- void *data, __u16 size, int timeout)
-{
- struct usb_device *usb_dev = atusb->usb_dev;
- int ret;
-
- if (atusb->err)
- return atusb->err;
-
- ret = usb_control_msg(usb_dev, pipe, request, requesttype,
- value, index, data, size, timeout);
- if (ret < size) {
- ret = ret < 0 ? ret : -ENODATA;
-
- atusb->err = ret;
- dev_err(&usb_dev->dev,
- "%s: req 0x%02x val 0x%x idx 0x%x, error %d\n",
- __func__, request, value, index, ret);
- }
- return ret;
-}
-
-static int atusb_command(struct atusb *atusb, u8 cmd, u8 arg)
-{
- struct usb_device *usb_dev = atusb->usb_dev;
-
- dev_dbg(&usb_dev->dev, "%s: cmd = 0x%x\n", __func__, cmd);
- return atusb_control_msg(atusb, usb_sndctrlpipe(usb_dev, 0),
- cmd, ATUSB_REQ_TO_DEV, arg, 0, NULL, 0, 1000);
-}
-
-static int atusb_write_reg(struct atusb *atusb, u8 reg, u8 value)
-{
- struct usb_device *usb_dev = atusb->usb_dev;
-
- dev_dbg(&usb_dev->dev, "%s: 0x%02x <- 0x%02x\n", __func__, reg, value);
- return atusb_control_msg(atusb, usb_sndctrlpipe(usb_dev, 0),
- ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
- value, reg, NULL, 0, 1000);
-}
-
-static int atusb_read_reg(struct atusb *atusb, u8 reg)
-{
- struct usb_device *usb_dev = atusb->usb_dev;
- int ret;
- u8 *buffer;
- u8 value;
-
- buffer = kmalloc(1, GFP_KERNEL);
- if (!buffer)
- return -ENOMEM;
-
- dev_dbg(&usb_dev->dev, "%s: reg = 0x%x\n", __func__, reg);
- ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0),
- ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
- 0, reg, buffer, 1, 1000);
-
- if (ret >= 0) {
- value = buffer[0];
- kfree(buffer);
- return value;
- } else {
- kfree(buffer);
- return ret;
- }
-}
-
static int atusb_write_subreg(struct atusb *atusb, u8 reg, u8 mask,
u8 shift, u8 value)
{
@@ -158,7 +83,10 @@ static int atusb_write_subreg(struct atusb *atusb, u8 reg, u8 mask,
dev_dbg(&usb_dev->dev, "%s: 0x%02x <- 0x%02x\n", __func__, reg, value);
- orig = atusb_read_reg(atusb, reg);
+ ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
+ 0, reg, &orig, 1, 1000, GFP_KERNEL);
+ if (ret < 0)
+ return ret;
/* Write the value only into that part of the register which is allowed
* by the mask. All other bits stay as before.
@@ -167,7 +95,8 @@ static int atusb_write_subreg(struct atusb *atusb, u8 reg, u8 mask,
tmp |= (value << shift) & mask;
if (tmp != orig)
- ret = atusb_write_reg(atusb, reg, tmp);
+ ret = usb_control_msg_send(usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ tmp, reg, NULL, 0, 1000, GFP_KERNEL);
return ret;
}
@@ -176,9 +105,13 @@ static int atusb_read_subreg(struct atusb *lp,
unsigned int addr, unsigned int mask,
unsigned int shift)
{
- int rc;
+ int rc, ret;
+
+ ret = usb_control_msg_recv(lp->usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
+ 0, addr, &rc, 1, 1000, GFP_KERNEL);
+ if (ret < 0)
+ return ret;
- rc = atusb_read_reg(lp, addr);
rc = (rc & mask) >> shift;
return rc;
@@ -419,16 +352,22 @@ static int atusb_set_hw_addr_filt(struct ieee802154_hw *hw,
u16 addr = le16_to_cpu(filt->short_addr);
dev_vdbg(dev, "%s called for saddr\n", __func__);
- atusb_write_reg(atusb, RG_SHORT_ADDR_0, addr);
- atusb_write_reg(atusb, RG_SHORT_ADDR_1, addr >> 8);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ addr, RG_SHORT_ADDR_0, NULL, 0, 1000, GFP_KERNEL);
+
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ addr >> 8, RG_SHORT_ADDR_1, NULL, 0, 1000, GFP_KERNEL);
}
if (changed & IEEE802154_AFILT_PANID_CHANGED) {
u16 pan = le16_to_cpu(filt->pan_id);
dev_vdbg(dev, "%s called for pan id\n", __func__);
- atusb_write_reg(atusb, RG_PAN_ID_0, pan);
- atusb_write_reg(atusb, RG_PAN_ID_1, pan >> 8);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ pan, RG_PAN_ID_0, NULL, 0, 1000, GFP_KERNEL);
+
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ pan >> 8, RG_PAN_ID_1, NULL, 0, 1000, GFP_KERNEL);
}
if (changed & IEEE802154_AFILT_IEEEADDR_CHANGED) {
@@ -437,7 +376,9 @@ static int atusb_set_hw_addr_filt(struct ieee802154_hw *hw,
memcpy(addr, &filt->ieee_addr, IEEE802154_EXTENDED_ADDR_LEN);
dev_vdbg(dev, "%s called for IEEE addr\n", __func__);
for (i = 0; i < 8; i++)
- atusb_write_reg(atusb, RG_IEEE_ADDR_0 + i, addr[i]);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ addr[i], RG_IEEE_ADDR_0 + i, NULL, 0,
+ 1000, GFP_KERNEL);
}
if (changed & IEEE802154_AFILT_PANC_CHANGED) {
@@ -459,7 +400,8 @@ static int atusb_start(struct ieee802154_hw *hw)
dev_dbg(&usb_dev->dev, "%s\n", __func__);
schedule_delayed_work(&atusb->work, 0);
- atusb_command(atusb, ATUSB_RX_MODE, 1);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_RX_MODE, ATUSB_REQ_TO_DEV, 1, 0,
+ NULL, 0, 1000, GFP_KERNEL);
ret = atusb_get_and_clear_error(atusb);
if (ret < 0)
usb_kill_anchored_urbs(&atusb->idle_urbs);
@@ -473,7 +415,8 @@ static void atusb_stop(struct ieee802154_hw *hw)
dev_dbg(&usb_dev->dev, "%s\n", __func__);
usb_kill_anchored_urbs(&atusb->idle_urbs);
- atusb_command(atusb, ATUSB_RX_MODE, 0);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_RX_MODE, ATUSB_REQ_TO_DEV, 0, 0,
+ NULL, 0, 1000, GFP_KERNEL);
atusb_get_and_clear_error(atusb);
}
@@ -580,9 +523,11 @@ atusb_set_cca_mode(struct ieee802154_hw *hw, const struct wpan_phy_cca *cca)
static int hulusb_set_cca_ed_level(struct atusb *lp, int rssi_base_val)
{
- unsigned int cca_ed_thres;
+ int cca_ed_thres;
cca_ed_thres = atusb_read_subreg(lp, SR_CCA_ED_THRES);
+ if (cca_ed_thres < 0)
+ return cca_ed_thres;
switch (rssi_base_val) {
case -98:
@@ -799,18 +744,13 @@ static int atusb_get_and_show_revision(struct atusb *atusb)
{
struct usb_device *usb_dev = atusb->usb_dev;
char *hw_name;
- unsigned char *buffer;
+ unsigned char buffer[3];
int ret;
- buffer = kmalloc(3, GFP_KERNEL);
- if (!buffer)
- return -ENOMEM;
-
/* Get a couple of the ATMega Firmware values */
- ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0),
- ATUSB_ID, ATUSB_REQ_FROM_DEV, 0, 0,
- buffer, 3, 1000);
- if (ret >= 0) {
+ ret = usb_control_msg_recv(atusb->usb_dev, 0, ATUSB_ID, ATUSB_REQ_FROM_DEV, 0, 0,
+ buffer, 3, 1000, GFP_KERNEL);
+ if (!ret) {
atusb->fw_ver_maj = buffer[0];
atusb->fw_ver_min = buffer[1];
atusb->fw_hw_type = buffer[2];
@@ -849,7 +789,6 @@ static int atusb_get_and_show_revision(struct atusb *atusb)
dev_info(&usb_dev->dev, "Please update to version 0.2 or newer");
}
- kfree(buffer);
return ret;
}
@@ -863,7 +802,6 @@ static int atusb_get_and_show_build(struct atusb *atusb)
if (!build)
return -ENOMEM;
- /* We cannot call atusb_control_msg() here, since this request may read various length data */
ret = usb_control_msg(atusb->usb_dev, usb_rcvctrlpipe(usb_dev, 0), ATUSB_BUILD,
ATUSB_REQ_FROM_DEV, 0, 0, build, ATUSB_BUILD_SIZE, 1000);
if (ret >= 0) {
@@ -881,14 +819,27 @@ static int atusb_get_and_conf_chip(struct atusb *atusb)
u8 man_id_0, man_id_1, part_num, version_num;
const char *chip;
struct ieee802154_hw *hw = atusb->hw;
+ int ret;
- man_id_0 = atusb_read_reg(atusb, RG_MAN_ID_0);
- man_id_1 = atusb_read_reg(atusb, RG_MAN_ID_1);
- part_num = atusb_read_reg(atusb, RG_PART_NUM);
- version_num = atusb_read_reg(atusb, RG_VERSION_NUM);
+ ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
+ 0, RG_MAN_ID_0, &man_id_0, 1, 1000, GFP_KERNEL);
+ if (ret < 0)
+ return ret;
- if (atusb->err)
- return atusb->err;
+ ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
+ 0, RG_MAN_ID_1, &man_id_1, 1, 1000, GFP_KERNEL);
+ if (ret < 0)
+ return ret;
+
+ ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
+ 0, RG_PART_NUM, &atusb, 1, 1000, GFP_KERNEL);
+ if (ret < 0)
+ return ret;
+
+ ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV,
+ 0, RG_VERSION_NUM, &version_num, 1, 1000, GFP_KERNEL);
+ if (ret < 0)
+ return ret;
hw->flags = IEEE802154_HW_TX_OMIT_CKSUM | IEEE802154_HW_AFILT |
IEEE802154_HW_PROMISCUOUS | IEEE802154_HW_CSMA_PARAMS;
@@ -969,7 +920,7 @@ static int atusb_get_and_conf_chip(struct atusb *atusb)
static int atusb_set_extended_addr(struct atusb *atusb)
{
struct usb_device *usb_dev = atusb->usb_dev;
- unsigned char *buffer;
+ unsigned char buffer[IEEE802154_EXTENDED_ADDR_LEN];
__le64 extended_addr;
u64 addr;
int ret;
@@ -982,18 +933,12 @@ static int atusb_set_extended_addr(struct atusb *atusb)
return 0;
}
- buffer = kmalloc(IEEE802154_EXTENDED_ADDR_LEN, GFP_KERNEL);
- if (!buffer)
- return -ENOMEM;
-
/* Firmware is new enough so we fetch the address from EEPROM */
- ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0),
- ATUSB_EUI64_READ, ATUSB_REQ_FROM_DEV, 0, 0,
- buffer, IEEE802154_EXTENDED_ADDR_LEN, 1000);
+ ret = usb_control_msg_recv(atusb->usb_dev, 0, ATUSB_EUI64_READ, ATUSB_REQ_FROM_DEV, 0, 0,
+ buffer, IEEE802154_EXTENDED_ADDR_LEN, 1000, GFP_KERNEL);
if (ret < 0) {
dev_err(&usb_dev->dev, "failed to fetch extended address, random address set\n");
ieee802154_random_extended_addr(&atusb->hw->phy->perm_extended_addr);
- kfree(buffer);
return ret;
}
@@ -1009,7 +954,6 @@ static int atusb_set_extended_addr(struct atusb *atusb)
&addr);
}
- kfree(buffer);
return ret;
}
@@ -1051,7 +995,8 @@ static int atusb_probe(struct usb_interface *interface,
hw->parent = &usb_dev->dev;
- atusb_command(atusb, ATUSB_RF_RESET, 0);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_RF_RESET, ATUSB_REQ_TO_DEV, 0, 0,
+ NULL, 0, 1000, GFP_KERNEL);
atusb_get_and_conf_chip(atusb);
atusb_get_and_show_revision(atusb);
atusb_get_and_show_build(atusb);
@@ -1076,7 +1021,9 @@ static int atusb_probe(struct usb_interface *interface,
* explicitly. Any resets after that will send us straight to TRX_OFF,
* making the command below redundant.
*/
- atusb_write_reg(atusb, RG_TRX_STATE, STATE_FORCE_TRX_OFF);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ STATE_FORCE_TRX_OFF, RG_TRX_STATE, NULL, 0, 1000, GFP_KERNEL);
+
msleep(1); /* reset => TRX_OFF, tTR13 = 37 us */
#if 0
@@ -1104,7 +1051,8 @@ static int atusb_probe(struct usb_interface *interface,
atusb_write_subreg(atusb, SR_RX_SAFE_MODE, 1);
#endif
- atusb_write_reg(atusb, RG_IRQ_MASK, 0xff);
+ usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV,
+ 0xff, RG_IRQ_MASK, NULL, 0, 1000, GFP_KERNEL);
ret = atusb_get_and_clear_error(atusb);
if (!ret)
--
2.34.1
^ permalink raw reply related
* Re: [PATCH v8 10/14] PCI: mediatek: Allow building for ARCH_AIROHA
From: Lorenzo Pieralisi @ 2022-01-05 14:50 UTC (permalink / raw)
To: Felix Fietkau
Cc: linux-arm-kernel, Rob Herring, Krzysztof Wilczyński,
Bjorn Helgaas, Matthias Brugger, john, linux-pci, linux-kernel,
linux-mediatek
In-Reply-To: <20211220211854.89452-11-nbd@nbd.name>
On Mon, Dec 20, 2021 at 10:18:50PM +0100, Felix Fietkau wrote:
> Allow selecting the pcie-mediatek driver if ARCH_AIROHA is set, because the
> Airoha EN7523 SoC uses the same controller as MT7622.
> The driver itself is not modified. The PCIe controller DT node should use
> mediatek,mt7622-pcie after airoha,en7523-pcie.
>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> drivers/pci/controller/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 93b141110537..f1342059c2a3 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -233,7 +233,7 @@ config PCIE_ROCKCHIP_EP
>
> config PCIE_MEDIATEK
> tristate "MediaTek PCIe controller"
> - depends on ARCH_MEDIATEK || COMPILE_TEST
> + depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
> depends on OF
> depends on PCI_MSI_IRQ_DOMAIN
> help
> --
> 2.34.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [LTP] LTP Release preparations
From: Cyril Hrubis @ 2022-01-05 14:53 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Gabriel Krisman Bertazi, LTP List
In-Reply-To: <CAOQ4uxg4sv9otWKSJCvdtaJnQrgaXUqvgPtnydDp6V8jio3nUA@mail.gmail.com>
Hi!
> > As usuall it's time to start preparing for the next release.
> >
> > Given the amount patches waiting for the review I guess that we should
> > try to get reviewed and merged as much as possible in the next few days.
> > I would go for git freeze at 14. 1. as that would give us a week for
> > pre-release testing and the release would be, as usuall, finalized
> > around the 21. 1. Feel free to reply if you think that the schedulle
> > should be different.
> >
> > Also if there are patches that you think should be merged before the
> > release let me know ASAP so we can have a look soon enough.
> >
>
> Maybe that's a good time to say I did not understand the resolution on the
> discussion [1] about timing of merging tests for new (i.e. v5.16) features.
I guess that's because we haven't ended up with one as the discussion
faded away before christmas break. I guess I will read that again and
try to do something about it.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply
* [PATCH v3 02/16] job.h: categorize fields in struct Job
From: Emanuele Giuseppe Esposito @ 2022-01-05 14:01 UTC (permalink / raw)
To: qemu-block
Cc: Kevin Wolf, Fam Zheng, Vladimir Sementsov-Ogievskiy, Wen Congyang,
Xie Changlong, Emanuele Giuseppe Esposito, Markus Armbruster,
qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini,
John Snow
In-Reply-To: <20220105140208.365608-1-eesposit@redhat.com>
Categorize the fields in struct Job to understand which ones
need to be protected by the job mutex and which don't.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
include/qemu/job.h | 63 +++++++++++++++++++++++++++-------------------
1 file changed, 37 insertions(+), 26 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 8d0d370dda..0d348ff186 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -40,27 +40,52 @@ typedef struct JobTxn JobTxn;
* Long-running operation.
*/
typedef struct Job {
+
+ /* Fields set at initialization (job_create), and never modified */
+
/** The ID of the job. May be NULL for internal jobs. */
char *id;
- /** The type of this job. */
+ /**
+ * The type of this job.
+ * All callbacks are called with job_mutex *not* held.
+ */
const JobDriver *driver;
- /** Reference count of the block job */
- int refcnt;
-
- /** Current state; See @JobStatus for details. */
- JobStatus status;
-
- /** AioContext to run the job coroutine in */
- AioContext *aio_context;
-
/**
* The coroutine that executes the job. If not NULL, it is reentered when
* busy is false and the job is cancelled.
+ * Initialized in job_start()
*/
Coroutine *co;
+ /** True if this job should automatically finalize itself */
+ bool auto_finalize;
+
+ /** True if this job should automatically dismiss itself */
+ bool auto_dismiss;
+
+ /** The completion function that will be called when the job completes. */
+ BlockCompletionFunc *cb;
+
+ /** The opaque value that is passed to the completion function. */
+ void *opaque;
+
+ /* ProgressMeter API is thread-safe */
+ ProgressMeter progress;
+
+
+ /** Protected by job_mutex */
+
+ /** AioContext to run the job coroutine in */
+ AioContext *aio_context;
+
+ /** Reference count of the block job */
+ int refcnt;
+
+ /** Current state; See @JobStatus for details. */
+ JobStatus status;
+
/**
* Timer that is used by @job_sleep_ns. Accessed under job_mutex (in
* job.c).
@@ -76,7 +101,7 @@ typedef struct Job {
/**
* Set to false by the job while the coroutine has yielded and may be
* re-entered by job_enter(). There may still be I/O or event loop activity
- * pending. Accessed under block_job_mutex (in blockjob.c).
+ * pending. Accessed under job_mutex.
*
* When the job is deferred to the main loop, busy is true as long as the
* bottom half is still pending.
@@ -112,14 +137,6 @@ typedef struct Job {
/** Set to true when the job has deferred work to the main loop. */
bool deferred_to_main_loop;
- /** True if this job should automatically finalize itself */
- bool auto_finalize;
-
- /** True if this job should automatically dismiss itself */
- bool auto_dismiss;
-
- ProgressMeter progress;
-
/**
* Return code from @run and/or @prepare callback(s).
* Not final until the job has reached the CONCLUDED status.
@@ -134,12 +151,6 @@ typedef struct Job {
*/
Error *err;
- /** The completion function that will be called when the job completes. */
- BlockCompletionFunc *cb;
-
- /** The opaque value that is passed to the completion function. */
- void *opaque;
-
/** Notifiers called when a cancelled job is finalised */
NotifierList on_finalize_cancelled;
@@ -167,6 +178,7 @@ typedef struct Job {
/**
* Callbacks and other information about a Job driver.
+ * All callbacks are invoked with job_mutex *not* held.
*/
struct JobDriver {
@@ -481,7 +493,6 @@ void job_yield(Job *job);
*/
void coroutine_fn job_sleep_ns(Job *job, int64_t ns);
-
/** Returns the JobType of a given Job. */
JobType job_type(const Job *job);
--
2.31.1
^ permalink raw reply related
* Re: [PATCH 3/3] net: usb: r8152: remove unused definition
From: Greg KH @ 2022-01-05 14:52 UTC (permalink / raw)
To: Aaron Ma
Cc: kuba, henning.schild, linux-usb, netdev, linux-kernel, davem,
hayeswang, tiwai
In-Reply-To: <20220105142351.8026-3-aaron.ma@canonical.com>
On Wed, Jan 05, 2022 at 10:23:51PM +0800, Aaron Ma wrote:
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
> drivers/net/usb/r8152.c | 3 ---
> 1 file changed, 3 deletions(-)
I know I do not take patches without any changelog text in it, maybe
other maintainers are more lax :)
Please fix.
thanks,
greg k-h
^ permalink raw reply
* [PATCH v1 16/34] tests/docker: fix sorting of alpine image package lists
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, Thomas Huth, berrange, Beraldo Leal, Alex Bennée, f4bug,
Wainer dos Santos Moschetta, stefanha, crosa, pbonzini,
Philippe Mathieu-Daudé, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
From: Daniel P. Berrangé <berrange@redhat.com>
"python" sorts alphabetically after "py3-xxxx"
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-17-berrange@redhat.com>
---
tests/docker/dockerfiles/alpine.docker | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 5a1808726e..ca4b3b58d2 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -35,9 +35,9 @@ ENV PACKAGES \
ncurses-dev \
perl \
pulseaudio-dev \
- python3 \
py3-sphinx \
py3-sphinx_rtd_theme \
+ python3 \
samurai \
snappy-dev \
spice-dev \
--
2.30.2
^ permalink raw reply related
* Re: [PATCH v1 1/1] can: mcp251x: Get rid of duplicate of_node assignment
From: Marc Kleine-Budde @ 2022-01-05 14:54 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-can, netdev, linux-kernel
In-Reply-To: <YdWvfdRTpPZ0YcSD@smile.fi.intel.com>
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
On 05.01.2022 16:47:25, Andy Shevchenko wrote:
> > > Can we have a chance to see it in the v5.17-rc1?
> >
> > Yes:
> > https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/log/?h=linux-can-next-for-5.17-20220105
> >
> > 'about to send that PR.
>
> Cool, thanks! Happy new year!
Thanks. Happy new year, too!
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* RE: [PATCH 5.15 00/72] 5.15.13-rc2 review
From: Fox Chen @ 2022-01-05 14:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, stable, Fox Chen
In-Reply-To: <20220104073845.629257314@linuxfoundation.org>
On Tue, 4 Jan 2022 08:41:12 +0100, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 5.15.13 release.
> There are 72 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 06 Jan 2022 07:38:29 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.13-rc2.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
5.15.13-rc2 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)
Tested-by: Fox Chen <foxhlchen@gmail.com>
^ permalink raw reply
* [PATCH v3 07/16] job.c: move inner aiocontext lock in callbacks
From: Emanuele Giuseppe Esposito @ 2022-01-05 14:01 UTC (permalink / raw)
To: qemu-block
Cc: Kevin Wolf, Fam Zheng, Vladimir Sementsov-Ogievskiy, Wen Congyang,
Xie Changlong, Emanuele Giuseppe Esposito, Markus Armbruster,
qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini,
John Snow
In-Reply-To: <20220105140208.365608-1-eesposit@redhat.com>
Instead of having the lock in job_tnx_apply, move it inside
in the callback. This will be helpful for next commits, when
we introduce job_lock/unlock pairs.
job_transition_to_pending() and job_needs_finalize() do not
need to be protected by the aiocontext lock.
No functional change intended.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
job.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/job.c b/job.c
index b0dba40728..2ee7233763 100644
--- a/job.c
+++ b/job.c
@@ -165,7 +165,6 @@ static void job_txn_del_job(Job *job)
static int job_txn_apply(Job *job, int fn(Job *))
{
- AioContext *inner_ctx;
Job *other_job, *next;
JobTxn *txn = job->txn;
int rc = 0;
@@ -180,10 +179,7 @@ static int job_txn_apply(Job *job, int fn(Job *))
aio_context_release(job->aio_context);
QLIST_FOREACH_SAFE(other_job, &txn->jobs, txn_list, next) {
- inner_ctx = other_job->aio_context;
- aio_context_acquire(inner_ctx);
rc = fn(other_job);
- aio_context_release(inner_ctx);
if (rc) {
break;
}
@@ -796,11 +792,15 @@ static void job_clean(Job *job)
static int job_finalize_single(Job *job)
{
+ AioContext *ctx = job->aio_context;
+
assert(job_is_completed_locked(job));
/* Ensure abort is called for late-transactional failures */
job_update_rc(job);
+ aio_context_acquire(ctx);
+
if (!job->ret) {
job_commit(job);
} else {
@@ -808,6 +808,8 @@ static int job_finalize_single(Job *job)
}
job_clean(job);
+ aio_context_release(ctx);
+
if (job->cb) {
job->cb(job->opaque, job->ret);
}
@@ -928,11 +930,16 @@ static void job_completed_txn_abort(Job *job)
static int job_prepare(Job *job)
{
+ AioContext *ctx = job->aio_context;
assert(qemu_in_main_thread());
+
if (job->ret == 0 && job->driver->prepare) {
+ aio_context_acquire(ctx);
job->ret = job->driver->prepare(job);
+ aio_context_release(ctx);
job_update_rc(job);
}
+
return job->ret;
}
--
2.31.1
^ permalink raw reply related
* [linux-next:master 5594/9257] drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'
From: Dan Carpenter @ 2022-01-05 14:56 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 8548 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2bd48302750c652889a2604b3df8b591c1d3af08
commit: 8afa13a0583f94c14607e3041c02f068ac8fb628 [5594/9257] drm/vmwgfx: Implement DRIVER_GEM
config: arm64-randconfig-m031-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230826.ADH6zTe0-lkp(a)intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1231 vmw_translate_guest_ptr() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +1177 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1163 static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1164 struct vmw_sw_context *sw_context,
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1165 SVGAMobId *id,
f1d34bfd70b1b4 Thomas Hellstrom 2018-06-19 1166 struct vmw_buffer_object **vmw_bo_p)
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1167 {
b139d43dacef68 Thomas Hellstrom 2018-09-26 1168 struct vmw_buffer_object *vmw_bo;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1169 uint32_t handle = *id;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1170 struct vmw_relocation *reloc;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1171 int ret;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1172
b139d43dacef68 Thomas Hellstrom 2018-09-26 1173 vmw_validation_preload_bo(sw_context->ctx);
8afa13a0583f94 Zack Rusin 2021-12-06 1174 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);
8afa13a0583f94 Zack Rusin 2021-12-06 1175 if (IS_ERR_OR_NULL(vmw_bo)) {
5724f899ed8265 Deepak Rawat 2019-02-11 1176 VMW_DEBUG_USER("Could not find or use MOB buffer.\n");
b139d43dacef68 Thomas Hellstrom 2018-09-26 @1177 return PTR_ERR(vmw_bo);
This used to be an IS_ERR() check. But now it is IS_ERR_OR_NULL().
When a function returns both error pointers and NULL, that means errors
are errors and NULL is when the feature is disabled in the .config or
by the admin at runtime.
But vmw_user_bo_noref_lookup() is not optional and it can never actually
return NULL... This code works but it was better before with the IS_ERR()
check.
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1178 }
b139d43dacef68 Thomas Hellstrom 2018-09-26 1179 ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false);
8afa13a0583f94 Zack Rusin 2021-12-06 1180 ttm_bo_put(&vmw_bo->base);
b139d43dacef68 Thomas Hellstrom 2018-09-26 1181 if (unlikely(ret != 0))
b139d43dacef68 Thomas Hellstrom 2018-09-26 1182 return ret;
b139d43dacef68 Thomas Hellstrom 2018-09-26 1183
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1184 reloc = vmw_validation_mem_alloc(sw_context->ctx, sizeof(*reloc));
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1185 if (!reloc)
b139d43dacef68 Thomas Hellstrom 2018-09-26 1186 return -ENOMEM;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1187
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1188 reloc->mob_loc = id;
9c079b8ce8bf8e Thomas Hellstrom 2018-09-26 1189 reloc->vbo = vmw_bo;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1190
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1191 *vmw_bo_p = vmw_bo;
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1192 list_add_tail(&reloc->head, &sw_context->bo_relocations);
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1193
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1194 return 0;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1195 }
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1196
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1197 /**
2cd80dbd35518d Zack Rusin 2021-05-05 1198 * vmw_translate_guest_ptr - Prepare to translate a user-space buffer handle
680360a4d3f695 Deepak Rawat 2019-02-13 1199 * to a valid SVGAGuestPtr
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1200 *
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1201 * @dev_priv: Pointer to a device private structure.
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1202 * @sw_context: The software context used for this command batch validation.
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1203 * @ptr: Pointer to the user-space handle to be translated.
680360a4d3f695 Deepak Rawat 2019-02-13 1204 * @vmw_bo_p: Points to a location that, on successful return will carry a
680360a4d3f695 Deepak Rawat 2019-02-13 1205 * non-reference-counted pointer to the DMA buffer identified by the user-space
680360a4d3f695 Deepak Rawat 2019-02-13 1206 * handle in @id.
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1207 *
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1208 * This function saves information needed to translate a user-space buffer
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1209 * handle to a valid SVGAGuestPtr. The translation does not take place
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1210 * immediately, but during a call to vmw_apply_relocations().
680360a4d3f695 Deepak Rawat 2019-02-13 1211 *
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1212 * This function builds a relocation list and a list of buffers to validate.
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1213 * The former needs to be freed using either vmw_apply_relocations() or
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1214 * vmw_free_relocations(). The latter needs to be freed using
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1215 * vmw_clear_validations.
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1216 */
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1217 static int vmw_translate_guest_ptr(struct vmw_private *dev_priv,
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1218 struct vmw_sw_context *sw_context,
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1219 SVGAGuestPtr *ptr,
f1d34bfd70b1b4 Thomas Hellstrom 2018-06-19 1220 struct vmw_buffer_object **vmw_bo_p)
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1221 {
b139d43dacef68 Thomas Hellstrom 2018-09-26 1222 struct vmw_buffer_object *vmw_bo;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1223 uint32_t handle = ptr->gmrId;
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1224 struct vmw_relocation *reloc;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1225 int ret;
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1226
b139d43dacef68 Thomas Hellstrom 2018-09-26 1227 vmw_validation_preload_bo(sw_context->ctx);
8afa13a0583f94 Zack Rusin 2021-12-06 1228 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);
8afa13a0583f94 Zack Rusin 2021-12-06 1229 if (IS_ERR_OR_NULL(vmw_bo)) {
5724f899ed8265 Deepak Rawat 2019-02-11 1230 VMW_DEBUG_USER("Could not find or use GMR region.\n");
b139d43dacef68 Thomas Hellstrom 2018-09-26 @1231 return PTR_ERR(vmw_bo);
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1232 }
b139d43dacef68 Thomas Hellstrom 2018-09-26 1233 ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, false, false);
8afa13a0583f94 Zack Rusin 2021-12-06 1234 ttm_bo_put(&vmw_bo->base);
b139d43dacef68 Thomas Hellstrom 2018-09-26 1235 if (unlikely(ret != 0))
b139d43dacef68 Thomas Hellstrom 2018-09-26 1236 return ret;
b139d43dacef68 Thomas Hellstrom 2018-09-26 1237
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1238 reloc = vmw_validation_mem_alloc(sw_context->ctx, sizeof(*reloc));
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1239 if (!reloc)
b139d43dacef68 Thomas Hellstrom 2018-09-26 1240 return -ENOMEM;
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1241
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1242 reloc->location = ptr;
9c079b8ce8bf8e Thomas Hellstrom 2018-09-26 1243 reloc->vbo = vmw_bo;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1244 *vmw_bo_p = vmw_bo;
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1245 list_add_tail(&reloc->head, &sw_context->bo_relocations);
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1246
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1247 return 0;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1248 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply
* Re: [PATCH 5.15 00/72] 5.15.13-rc2 review
From: Greg Kroah-Hartman @ 2022-01-05 14:56 UTC (permalink / raw)
To: Jeffrin Jose T
Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
pavel, jonathanh, f.fainelli, stable
In-Reply-To: <54461ffb9ebe34e673e6730f3e9cc94218ad2f49.camel@rajagiritech.edu.in>
On Wed, Jan 05, 2022 at 06:32:43PM +0530, Jeffrin Jose T wrote:
> On Tue, 2022-01-04 at 08:41 +0100, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 5.15.13 release.
> > There are 72 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Thu, 06 Jan 2022 07:38:29 +0000.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> >
> > https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.13-rc2.gz
> > or in the git tree and branch at:
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
> > stable-rc.git linux-5.15.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
> hello,
>
> There was a compilation error....
>
> -----------x--------------x------------------x--
> MODPOST vmlinux.symvers
> MODINFO modules.builtin.modinfo
> GEN modules.builtin
> BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
> Failed to generate BTF for vmlinux
> Try to disable CONFIG_DEBUG_INFO_BTF
> make: *** [Makefile:1183: vmlinux] Error 1
Is this a regression? If so, what commit caused this?
> i did CONFIG_DEBUG_INFO_BTF=n in .config and then compilation was
> success.
Or you can install pahole, right? That's a requirement for that build
option I think.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 0/7] y2038: cond_wait_prologue64 and related fixes
From: Bezdeka, Florian @ 2022-01-05 14:56 UTC (permalink / raw)
To: xenomai@xenomai.org, jan.kiszka@siemens.com
In-Reply-To: <13d8cb9c-591d-481a-73b6-623b892deea0@siemens.com>
On Wed, 2022-01-05 at 15:43 +0100, Jan Kiszka wrote:
> On 05.01.22 15:06, Florian Bezdeka wrote:
> > Hi all,
> >
> > this is the last missing POSIX related y2038 affected syscall in
> > Xenomai. With this applied we have two Xenomai specific syscalls
> > missing:
> >
> > - sc_cobalt_thread_setschedparam_ex
> > - sc_cobalt_thread_getschedparam_ex
> >
> > While adding tests for the introduced cond_wait_prologue64 I hit a
> > kernel OOPS due to insuficient validation of user provided pointers.
> > That has been addressed as well.
>
> Thanks for both! Is it possibly to move the fixes the front? That would
> also ensure that I can easily pick them into stable.
Yes. Patch 4 and 7 could be moved to the front easily. Do you want me
to split patch 2 into the y2038 and non y2038 part, or does that not
qualify for stable at all?
>
> Thanks,
> Jan
>
^ permalink raw reply
* [linux-next:master 5594/9257] drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'
From: Dan Carpenter @ 2022-01-05 14:56 UTC (permalink / raw)
To: kbuild, Zack Rusin
Cc: lkp, kbuild-all, Linux Memory Management List, Martin Krastev
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2bd48302750c652889a2604b3df8b591c1d3af08
commit: 8afa13a0583f94c14607e3041c02f068ac8fb628 [5594/9257] drm/vmwgfx: Implement DRIVER_GEM
config: arm64-randconfig-m031-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230826.ADH6zTe0-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1231 vmw_translate_guest_ptr() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +1177 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1163 static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1164 struct vmw_sw_context *sw_context,
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1165 SVGAMobId *id,
f1d34bfd70b1b4 Thomas Hellstrom 2018-06-19 1166 struct vmw_buffer_object **vmw_bo_p)
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1167 {
b139d43dacef68 Thomas Hellstrom 2018-09-26 1168 struct vmw_buffer_object *vmw_bo;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1169 uint32_t handle = *id;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1170 struct vmw_relocation *reloc;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1171 int ret;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1172
b139d43dacef68 Thomas Hellstrom 2018-09-26 1173 vmw_validation_preload_bo(sw_context->ctx);
8afa13a0583f94 Zack Rusin 2021-12-06 1174 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);
8afa13a0583f94 Zack Rusin 2021-12-06 1175 if (IS_ERR_OR_NULL(vmw_bo)) {
5724f899ed8265 Deepak Rawat 2019-02-11 1176 VMW_DEBUG_USER("Could not find or use MOB buffer.\n");
b139d43dacef68 Thomas Hellstrom 2018-09-26 @1177 return PTR_ERR(vmw_bo);
This used to be an IS_ERR() check. But now it is IS_ERR_OR_NULL().
When a function returns both error pointers and NULL, that means errors
are errors and NULL is when the feature is disabled in the .config or
by the admin at runtime.
But vmw_user_bo_noref_lookup() is not optional and it can never actually
return NULL... This code works but it was better before with the IS_ERR()
check.
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1178 }
b139d43dacef68 Thomas Hellstrom 2018-09-26 1179 ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false);
8afa13a0583f94 Zack Rusin 2021-12-06 1180 ttm_bo_put(&vmw_bo->base);
b139d43dacef68 Thomas Hellstrom 2018-09-26 1181 if (unlikely(ret != 0))
b139d43dacef68 Thomas Hellstrom 2018-09-26 1182 return ret;
b139d43dacef68 Thomas Hellstrom 2018-09-26 1183
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1184 reloc = vmw_validation_mem_alloc(sw_context->ctx, sizeof(*reloc));
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1185 if (!reloc)
b139d43dacef68 Thomas Hellstrom 2018-09-26 1186 return -ENOMEM;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1187
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1188 reloc->mob_loc = id;
9c079b8ce8bf8e Thomas Hellstrom 2018-09-26 1189 reloc->vbo = vmw_bo;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1190
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1191 *vmw_bo_p = vmw_bo;
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1192 list_add_tail(&reloc->head, &sw_context->bo_relocations);
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1193
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1194 return 0;
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1195 }
ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1196
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1197 /**
2cd80dbd35518d Zack Rusin 2021-05-05 1198 * vmw_translate_guest_ptr - Prepare to translate a user-space buffer handle
680360a4d3f695 Deepak Rawat 2019-02-13 1199 * to a valid SVGAGuestPtr
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1200 *
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1201 * @dev_priv: Pointer to a device private structure.
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1202 * @sw_context: The software context used for this command batch validation.
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1203 * @ptr: Pointer to the user-space handle to be translated.
680360a4d3f695 Deepak Rawat 2019-02-13 1204 * @vmw_bo_p: Points to a location that, on successful return will carry a
680360a4d3f695 Deepak Rawat 2019-02-13 1205 * non-reference-counted pointer to the DMA buffer identified by the user-space
680360a4d3f695 Deepak Rawat 2019-02-13 1206 * handle in @id.
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1207 *
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1208 * This function saves information needed to translate a user-space buffer
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1209 * handle to a valid SVGAGuestPtr. The translation does not take place
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1210 * immediately, but during a call to vmw_apply_relocations().
680360a4d3f695 Deepak Rawat 2019-02-13 1211 *
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1212 * This function builds a relocation list and a list of buffers to validate.
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1213 * The former needs to be freed using either vmw_apply_relocations() or
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1214 * vmw_free_relocations(). The latter needs to be freed using
c0951b797e7d0f Thomas Hellstrom 2012-11-20 1215 * vmw_clear_validations.
e2fa3a76839ada Thomas Hellstrom 2011-10-04 1216 */
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1217 static int vmw_translate_guest_ptr(struct vmw_private *dev_priv,
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1218 struct vmw_sw_context *sw_context,
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1219 SVGAGuestPtr *ptr,
f1d34bfd70b1b4 Thomas Hellstrom 2018-06-19 1220 struct vmw_buffer_object **vmw_bo_p)
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1221 {
b139d43dacef68 Thomas Hellstrom 2018-09-26 1222 struct vmw_buffer_object *vmw_bo;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1223 uint32_t handle = ptr->gmrId;
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1224 struct vmw_relocation *reloc;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1225 int ret;
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1226
b139d43dacef68 Thomas Hellstrom 2018-09-26 1227 vmw_validation_preload_bo(sw_context->ctx);
8afa13a0583f94 Zack Rusin 2021-12-06 1228 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);
8afa13a0583f94 Zack Rusin 2021-12-06 1229 if (IS_ERR_OR_NULL(vmw_bo)) {
5724f899ed8265 Deepak Rawat 2019-02-11 1230 VMW_DEBUG_USER("Could not find or use GMR region.\n");
b139d43dacef68 Thomas Hellstrom 2018-09-26 @1231 return PTR_ERR(vmw_bo);
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1232 }
b139d43dacef68 Thomas Hellstrom 2018-09-26 1233 ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, false, false);
8afa13a0583f94 Zack Rusin 2021-12-06 1234 ttm_bo_put(&vmw_bo->base);
b139d43dacef68 Thomas Hellstrom 2018-09-26 1235 if (unlikely(ret != 0))
b139d43dacef68 Thomas Hellstrom 2018-09-26 1236 return ret;
b139d43dacef68 Thomas Hellstrom 2018-09-26 1237
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1238 reloc = vmw_validation_mem_alloc(sw_context->ctx, sizeof(*reloc));
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1239 if (!reloc)
b139d43dacef68 Thomas Hellstrom 2018-09-26 1240 return -ENOMEM;
fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1241
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1242 reloc->location = ptr;
9c079b8ce8bf8e Thomas Hellstrom 2018-09-26 1243 reloc->vbo = vmw_bo;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1244 *vmw_bo_p = vmw_bo;
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1245 list_add_tail(&reloc->head, &sw_context->bo_relocations);
fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1246
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1247 return 0;
4e4ddd47774313 Thomas Hellstrom 2010-02-21 1248 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* Re: [PATCH v1 20/34] tests/docker: add libfuse3 development headers
From: Daniel P. Berrangé @ 2022-01-05 14:50 UTC (permalink / raw)
To: Richard W.M. Jones
Cc: fam, Thomas Huth, Beraldo Leal, qemu-devel,
Wainer dos Santos Moschetta, f4bug, Hanna Reitz, stefanha, crosa,
pbonzini, Alex Bennée, aurelien
In-Reply-To: <20220105142655.GS1127@redhat.com>
On Wed, Jan 05, 2022 at 02:26:55PM +0000, Richard W.M. Jones wrote:
> On Wed, Jan 05, 2022 at 01:49:55PM +0000, Alex Bennée wrote:
> > From: Stefan Hajnoczi <stefanha@redhat.com>
> >
> > The FUSE exports feature is not built because most container images do
> > not have libfuse3 development headers installed. Add the necessary
> > packages to the Dockerfiles.
> >
> > Cc: Hanna Reitz <hreitz@redhat.com>
> > Cc: Richard W.M. Jones <rjones@redhat.com>
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Acked-by: Richard W.M. Jones <rjones@redhat.com>
> > Reviewed-by: Beraldo Leal <bleal@redhat.com>
> > Tested-by: Beraldo Leal <bleal@redhat.com>
> > Message-Id: <20211207160025.52466-1-stefanha@redhat.com>
> > [AJB: migrate to lcitool qemu.yml and regenerate]
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
>
> I checked all the package names and they look good, so:
FYI, the libvirt-ci CI pipelines validate that all package
names are correct by creating a job for each distro and
checking that every package known to libvirt-ci can be
installed. This catches issues where distros rename or
drop packages. These are some of the reasons why we'll
benefit from using libvirt-ci / lcitool for auto-generating
these dockerfiles in QEMU.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply
* Re: [PATCH net 1/1] net: openvswitch: Fix ct_state nat flags for conns arriving from tc
From: Jamal Hadi Salim @ 2022-01-05 14:57 UTC (permalink / raw)
To: Paul Blakey, dev, netdev, Cong Wang, Pravin B Shelar, davem,
Jiri Pirko, Jakub Kicinski
Cc: Saeed Mahameed, Oz Shlomo, Vlad Buslov, Roi Dayan
In-Reply-To: <20220104082821.22487-1-paulb@nvidia.com>
On 2022-01-04 03:28, Paul Blakey wrote:
[..]
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -287,7 +287,9 @@ struct tc_skb_ext {
> __u32 chain;
> __u16 mru;
> __u16 zone;
> - bool post_ct;
> + bool post_ct:1;
> + bool post_ct_snat:1;
> + bool post_ct_dnat:1;
> };
is skb_ext intended only for ovs? If yes, why does it belong
in the core code? Ex: Looking at tcf_classify() which is such
a core function in the fast path any packet going via tc, it
is now encumbered with with checking presence of skb_ext.
I know passing around metadata is a paramount requirement
for programmability but this is getting messier with speacial
use cases for ovs and/or offload...
cheers,
jamal
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.