Skip to content

Commit

Permalink
Merge tag 'v4.19.305' into 4.19-main
Browse files Browse the repository at this point in the history
This is the 4.19.305 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWlaiQACgkQONu9yGCS
# aT4yGg/+JmoE9tuHZ9zVHYvlgOZUKbNqVt51f/WDUj4hSIGRBj+4Woi2xSoOH7Qs
# +VS/QIY3ou0r9PJYsgI4DolQWyOJjQiT/hAKyAYWORxpHfESnLwpFD3NoJO91Nmb
# b5Kx2veB2Zm8krRS/apJOZYvveYOzOJpZIZkthDk0X2aNKPOTkXQxn5lgIRrLGdq
# 3LysnL3ejcNls/YaugLHcIrB0GHMQPZFVk1frO1ymcCnuw5etnemxzMUlnV0IPG0
# /s1bAGLXDBiPz0QTeCHc/wo7+sBiDOwqD78xLnL4udBEdFq7aaE/QOm2OKZ/6zuP
# TfnQHZ5xYTI1pVhfxW1hShDxfH9gJYSfoFmuysdMqq74VgJ8ItyGbDYmJnhSbR/W
# P01I8Bg5Bw8xaNBhN+daKnHO0JdTzT/ZotBtZN6Q98dznV1WW5Ch2Pw+YM1tWaam
# /9+o/dqIR/LdtAqiMj5Gy/phVwvVKVscfotnGmsovuRxsMJG98oaslVfUtZARalD
# GrUDeQBhPa9Kqbj4wUXF0NBbFExDgkzX0lRAhzGyaDY5b1LRPpFudqa8uIDf1xUc
# c+dDOgtThTfXiAW9U/zjVZrEmZObeVEmSklsGFEnj7fW66oLwBr714Ktby5VxCza
# 7EgNmPk7lFXH3rizHiD08zqNQpYQbMO63KDt+AxVLwaeSHbhUJw=
# =5/H2
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Jan 15 18:23:48 2024 CET
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Jan 26, 2024
2 parents d01d290 + abc2dd6 commit a74dc26
Show file tree
Hide file tree
Showing 24 changed files with 330 additions and 156 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 304
SUBLEVEL = 305
EXTRAVERSION =
NAME = "People's Front"

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-sunxi/mc_smp.c
Expand Up @@ -805,12 +805,12 @@ static int __init sunxi_mc_smp_init(void)
break;
}

is_a83t = sunxi_mc_smp_data[i].is_a83t;

of_node_put(node);
if (ret)
return -ENODEV;

is_a83t = sunxi_mc_smp_data[i].is_a83t;

if (!sunxi_mc_smp_cpu_table_init())
return -EINVAL;

Expand Down
51 changes: 51 additions & 0 deletions drivers/firewire/ohci.c
Expand Up @@ -292,6 +292,51 @@ static char ohci_driver_name[] = KBUILD_MODNAME;
#define QUIRK_TI_SLLZ059 0x20
#define QUIRK_IR_WAKE 0x40

// On PCI Express Root Complex in any type of AMD Ryzen machine, VIA VT6306/6307/6308 with Asmedia
// ASM1083/1085 brings an inconvenience that the read accesses to 'Isochronous Cycle Timer' register
// (at offset 0xf0 in PCI I/O space) often causes unexpected system reboot. The mechanism is not
// clear, since the read access to the other registers is enough safe; e.g. 'Node ID' register,
// while it is probable due to detection of any type of PCIe error.
#define QUIRK_REBOOT_BY_CYCLE_TIMER_READ 0x80000000

#if IS_ENABLED(CONFIG_X86)

static bool has_reboot_by_cycle_timer_read_quirk(const struct fw_ohci *ohci)
{
return !!(ohci->quirks & QUIRK_REBOOT_BY_CYCLE_TIMER_READ);
}

#define PCI_DEVICE_ID_ASMEDIA_ASM108X 0x1080

static bool detect_vt630x_with_asm1083_on_amd_ryzen_machine(const struct pci_dev *pdev)
{
const struct pci_dev *pcie_to_pci_bridge;

// Detect any type of AMD Ryzen machine.
if (!static_cpu_has(X86_FEATURE_ZEN))
return false;

// Detect VIA VT6306/6307/6308.
if (pdev->vendor != PCI_VENDOR_ID_VIA)
return false;
if (pdev->device != PCI_DEVICE_ID_VIA_VT630X)
return false;

// Detect Asmedia ASM1083/1085.
pcie_to_pci_bridge = pdev->bus->self;
if (pcie_to_pci_bridge->vendor != PCI_VENDOR_ID_ASMEDIA)
return false;
if (pcie_to_pci_bridge->device != PCI_DEVICE_ID_ASMEDIA_ASM108X)
return false;

return true;
}

#else
#define has_reboot_by_cycle_timer_read_quirk(ohci) false
#define detect_vt630x_with_asm1083_on_amd_ryzen_machine(pdev) false
#endif

/* In case of multiple matches in ohci_quirks[], only the first one is used. */
static const struct {
unsigned short vendor, device, revision, flags;
Expand Down Expand Up @@ -1730,6 +1775,9 @@ static u32 get_cycle_time(struct fw_ohci *ohci)
s32 diff01, diff12;
int i;

if (has_reboot_by_cycle_timer_read_quirk(ohci))
return 0;

c2 = reg_read(ohci, OHCI1394_IsochronousCycleTimer);

if (ohci->quirks & QUIRK_CYCLE_TIMER) {
Expand Down Expand Up @@ -3633,6 +3681,9 @@ static int pci_probe(struct pci_dev *dev,
if (param_quirks)
ohci->quirks = param_quirks;

if (detect_vt630x_with_asm1083_on_amd_ryzen_machine(dev))
ohci->quirks |= QUIRK_REBOOT_BY_CYCLE_TIMER_READ;

/*
* Because dma_alloc_coherent() allocates at least one page,
* we save space by using a common buffer for the AR request/
Expand Down
7 changes: 4 additions & 3 deletions drivers/mmc/core/block.c
Expand Up @@ -851,9 +851,10 @@ static const struct block_device_operations mmc_bdops = {
static int mmc_blk_part_switch_pre(struct mmc_card *card,
unsigned int part_type)
{
const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
int ret = 0;

if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
if ((part_type & mask) == mask) {
if (card->ext_csd.cmdq_en) {
ret = mmc_cmdq_disable(card);
if (ret)
Expand All @@ -868,9 +869,10 @@ static int mmc_blk_part_switch_pre(struct mmc_card *card,
static int mmc_blk_part_switch_post(struct mmc_card *card,
unsigned int part_type)
{
const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
int ret = 0;

if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
if ((part_type & mask) == mask) {
mmc_retune_unpause(card->host);
if (card->reenable_cmdq && !card->ext_csd.cmdq_en)
ret = mmc_cmdq_enable(card);
Expand Down Expand Up @@ -3102,4 +3104,3 @@ module_exit(mmc_blk_exit);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");

1 change: 1 addition & 0 deletions drivers/mmc/core/host.c
Expand Up @@ -489,6 +489,7 @@ EXPORT_SYMBOL(mmc_remove_host);
*/
void mmc_free_host(struct mmc_host *host)
{
cancel_delayed_work_sync(&host->detect);
mmc_pwrseq_free(host);
put_device(&host->class_dev);
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Expand Up @@ -7847,6 +7847,8 @@ static void bnxt_sp_task(struct work_struct *work)
bnxt_cfg_ntp_filters(bp);
if (test_and_clear_bit(BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT, &bp->sp_event))
bnxt_hwrm_exec_fwd_req(bp);
if (test_and_clear_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event))
netdev_info(bp->dev, "Receive PF driver unload event!\n");
if (test_and_clear_bit(BNXT_VXLAN_ADD_PORT_SP_EVENT, &bp->sp_event)) {
bnxt_hwrm_tunnel_dst_port_alloc(
bp, bp->vxlan_port,
Expand Down Expand Up @@ -8407,8 +8409,6 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
}
}
}
if (test_and_clear_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event))
netdev_info(bp->dev, "Receive PF driver unload event!");
}

#else
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/ethernet/broadcom/genet/bcmgenet.c
Expand Up @@ -1650,8 +1650,10 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
/* Note: if we ever change from DMA_TX_APPEND_CRC below we
* will need to restore software padding of "runt" packets
*/
len_stat |= DMA_TX_APPEND_CRC;

if (!i) {
len_stat |= DMA_TX_APPEND_CRC | DMA_SOP;
len_stat |= DMA_SOP;
if (skb->ip_summed == CHECKSUM_PARTIAL)
len_stat |= DMA_TX_DO_CSUM;
}
Expand Down
11 changes: 10 additions & 1 deletion drivers/net/ethernet/intel/i40e/i40e_main.c
Expand Up @@ -99,12 +99,18 @@ static struct workqueue_struct *i40e_wq;
static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f,
struct net_device *netdev, int delta)
{
struct netdev_hw_addr_list *ha_list;
struct netdev_hw_addr *ha;

if (!f || !netdev)
return;

netdev_for_each_mc_addr(ha, netdev) {
if (is_unicast_ether_addr(f->macaddr) || is_link_local_ether_addr(f->macaddr))
ha_list = &netdev->uc;
else
ha_list = &netdev->mc;

netdev_hw_addr_list_for_each(ha, ha_list) {
if (ether_addr_equal(ha->addr, f->macaddr)) {
ha->refcount += delta;
if (ha->refcount <= 0)
Expand Down Expand Up @@ -14470,6 +14476,9 @@ static void i40e_pci_error_reset_done(struct pci_dev *pdev)
struct i40e_pf *pf = pci_get_drvdata(pdev);

i40e_reset_and_rebuild(pf, false, false);
#ifdef CONFIG_PCI_IOV
i40e_restore_all_vfs_msi_state(pdev);
#endif /* CONFIG_PCI_IOV */
}

/**
Expand Down
34 changes: 30 additions & 4 deletions drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
Expand Up @@ -99,6 +99,32 @@ void i40e_vc_notify_reset(struct i40e_pf *pf)
(u8 *)&pfe, sizeof(struct virtchnl_pf_event));
}

#ifdef CONFIG_PCI_IOV
void i40e_restore_all_vfs_msi_state(struct pci_dev *pdev)
{
u16 vf_id;
u16 pos;

/* Continue only if this is a PF */
if (!pdev->is_physfn)
return;

if (!pci_num_vf(pdev))
return;

pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
if (pos) {
struct pci_dev *vf_dev = NULL;

pci_read_config_word(pdev, pos + PCI_SRIOV_VF_DID, &vf_id);
while ((vf_dev = pci_get_device(pdev->vendor, vf_id, vf_dev))) {
if (vf_dev->is_virtfn && vf_dev->physfn == pdev)
pci_restore_msi_state(vf_dev);
}
}
}
#endif /* CONFIG_PCI_IOV */

/**
* i40e_vc_notify_vf_reset
* @vf: pointer to the VF structure
Expand Down Expand Up @@ -3143,16 +3169,16 @@ static int i40e_validate_cloud_filter(struct i40e_vf *vf,
bool found = false;
int bkt;

if (!tc_filter->action) {
if (tc_filter->action != VIRTCHNL_ACTION_TC_REDIRECT) {
dev_info(&pf->pdev->dev,
"VF %d: Currently ADq doesn't support Drop Action\n",
vf->vf_id);
"VF %d: ADQ doesn't support this action (%d)\n",
vf->vf_id, tc_filter->action);
goto err;
}

/* action_meta is TC number here to which the filter is applied */
if (!tc_filter->action_meta ||
tc_filter->action_meta > I40E_MAX_VF_VSI) {
tc_filter->action_meta > vf->num_tc) {
dev_info(&pf->pdev->dev, "VF %d: Invalid TC number %u\n",
vf->vf_id, tc_filter->action_meta);
goto err;
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
Expand Up @@ -137,5 +137,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable);

void i40e_vc_notify_link_state(struct i40e_pf *pf);
void i40e_vc_notify_reset(struct i40e_pf *pf);
#ifdef CONFIG_PCI_IOV
void i40e_restore_all_vfs_msi_state(struct pci_dev *pdev);
#endif /* CONFIG_PCI_IOV */

#endif /* _I40E_VIRTCHNL_PF_H_ */

0 comments on commit a74dc26

Please sign in to comment.