Skip to content

Commit

Permalink
Merge tag 'v5.15.1' into 5.15
Browse files Browse the repository at this point in the history
This is the 5.15.1 stable release
  • Loading branch information
xanmod committed Nov 6, 2021
2 parents 0519947 + b6abb62 commit 047c8cc
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 158 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 0
SUBLEVEL = 1
EXTRAVERSION =
NAME = Trick or Treat

Expand Down
3 changes: 0 additions & 3 deletions drivers/amba/bus.c
Expand Up @@ -377,9 +377,6 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
void __iomem *tmp;
int i, ret;

WARN_ON(dev->irq[0] == (unsigned int)-1);
WARN_ON(dev->irq[1] == (unsigned int)-1);

ret = request_resource(parent, &dev->res);
if (ret)
goto err_out;
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu.h
Expand Up @@ -1078,8 +1078,6 @@ struct amdgpu_device {
char product_name[32];
char serial[20];

struct amdgpu_autodump autodump;

atomic_t throttling_logging_enabled;
struct ratelimit_state throttling_logging_rs;
uint32_t ras_hw_enabled;
Expand Down
80 changes: 0 additions & 80 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
Expand Up @@ -27,7 +27,6 @@
#include <linux/pci.h>
#include <linux/uaccess.h>
#include <linux/pm_runtime.h>
#include <linux/poll.h>

#include "amdgpu.h"
#include "amdgpu_pm.h"
Expand All @@ -37,85 +36,7 @@
#include "amdgpu_securedisplay.h"
#include "amdgpu_fw_attestation.h"

int amdgpu_debugfs_wait_dump(struct amdgpu_device *adev)
{
#if defined(CONFIG_DEBUG_FS)
unsigned long timeout = 600 * HZ;
int ret;

wake_up_interruptible(&adev->autodump.gpu_hang);

ret = wait_for_completion_interruptible_timeout(&adev->autodump.dumping, timeout);
if (ret == 0) {
pr_err("autodump: timeout, move on to gpu recovery\n");
return -ETIMEDOUT;
}
#endif
return 0;
}

#if defined(CONFIG_DEBUG_FS)

static int amdgpu_debugfs_autodump_open(struct inode *inode, struct file *file)
{
struct amdgpu_device *adev = inode->i_private;
int ret;

file->private_data = adev;

ret = down_read_killable(&adev->reset_sem);
if (ret)
return ret;

if (adev->autodump.dumping.done) {
reinit_completion(&adev->autodump.dumping);
ret = 0;
} else {
ret = -EBUSY;
}

up_read(&adev->reset_sem);

return ret;
}

static int amdgpu_debugfs_autodump_release(struct inode *inode, struct file *file)
{
struct amdgpu_device *adev = file->private_data;

complete_all(&adev->autodump.dumping);
return 0;
}

static unsigned int amdgpu_debugfs_autodump_poll(struct file *file, struct poll_table_struct *poll_table)
{
struct amdgpu_device *adev = file->private_data;

poll_wait(file, &adev->autodump.gpu_hang, poll_table);

if (amdgpu_in_reset(adev))
return POLLIN | POLLRDNORM | POLLWRNORM;

return 0;
}

static const struct file_operations autodump_debug_fops = {
.owner = THIS_MODULE,
.open = amdgpu_debugfs_autodump_open,
.poll = amdgpu_debugfs_autodump_poll,
.release = amdgpu_debugfs_autodump_release,
};

static void amdgpu_debugfs_autodump_init(struct amdgpu_device *adev)
{
init_completion(&adev->autodump.dumping);
complete_all(&adev->autodump.dumping);
init_waitqueue_head(&adev->autodump.gpu_hang);

debugfs_create_file("amdgpu_autodump", 0600,
adev_to_drm(adev)->primary->debugfs_root,
adev, &autodump_debug_fops);
}

/**
* amdgpu_debugfs_process_reg_op - Handle MMIO register reads/writes
Expand Down Expand Up @@ -1588,7 +1509,6 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
}

amdgpu_ras_debugfs_create_all(adev);
amdgpu_debugfs_autodump_init(adev);
amdgpu_rap_debugfs_init(adev);
amdgpu_securedisplay_debugfs_init(adev);
amdgpu_fw_attestation_debugfs_init(adev);
Expand Down
5 changes: 0 additions & 5 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h
Expand Up @@ -26,15 +26,10 @@
/*
* Debugfs
*/
struct amdgpu_autodump {
struct completion dumping;
struct wait_queue_head gpu_hang;
};

int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
int amdgpu_debugfs_init(struct amdgpu_device *adev);
void amdgpu_debugfs_fini(struct amdgpu_device *adev);
void amdgpu_debugfs_fence_init(struct amdgpu_device *adev);
void amdgpu_debugfs_firmware_init(struct amdgpu_device *adev);
void amdgpu_debugfs_gem_init(struct amdgpu_device *adev);
int amdgpu_debugfs_wait_dump(struct amdgpu_device *adev);
8 changes: 0 additions & 8 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Expand Up @@ -2432,10 +2432,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
if (!adev->gmc.xgmi.pending_reset)
amdgpu_amdkfd_device_init(adev);

r = amdgpu_amdkfd_resume_iommu(adev);
if (r)
goto init_failed;

amdgpu_fru_get_product_info(adev);

init_failed:
Expand Down Expand Up @@ -4466,10 +4462,6 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
if (reset_context->reset_req_dev == adev)
job = reset_context->job;

/* no need to dump if device is not in good state during probe period */
if (!adev->gmc.xgmi.pending_reset)
amdgpu_debugfs_wait_dump(adev);

if (amdgpu_sriov_vf(adev)) {
/* stop the data exchange thread */
amdgpu_virt_fini_data_exchange(adev);
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdkfd/kfd_device.c
Expand Up @@ -924,6 +924,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,

svm_migrate_init((struct amdgpu_device *)kfd->kgd);

if(kgd2kfd_resume_iommu(kfd))
goto device_iommu_error;

if (kfd_resume(kfd))
goto kfd_resume_error;

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
Expand Up @@ -247,6 +247,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf,
{
struct amdgpu_dm_connector *connector = file_inode(f)->i_private;
struct dc_link *link = connector->dc_link;
struct dc *dc = (struct dc *)link->dc;
struct dc_link_settings prefer_link_settings;
char *wr_buf = NULL;
const uint32_t wr_buf_size = 40;
Expand Down Expand Up @@ -313,7 +314,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf,
prefer_link_settings.lane_count = param[0];
prefer_link_settings.link_rate = param[1];

dp_retrain_link_dp_test(link, &prefer_link_settings, false);
dc_link_set_preferred_training_settings(dc, &prefer_link_settings, NULL, link, true);

kfree(wr_buf);
return size;
Expand Down
4 changes: 0 additions & 4 deletions drivers/gpu/drm/i915/gt/intel_execlists_submission.c
Expand Up @@ -2140,10 +2140,6 @@ static void __execlists_unhold(struct i915_request *rq)
if (p->flags & I915_DEPENDENCY_WEAK)
continue;

/* Propagate any change in error status */
if (rq->fence.error)
i915_request_set_error_once(w, rq->fence.error);

if (w->engine != rq->engine)
continue;

Expand Down
14 changes: 11 additions & 3 deletions drivers/media/firewire/firedtv-avc.c
Expand Up @@ -1165,7 +1165,11 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
read_pos += program_info_length;
write_pos += program_info_length;
}
while (read_pos < length) {
while (read_pos + 4 < length) {
if (write_pos + 4 >= sizeof(c->operand) - 4) {
ret = -EINVAL;
goto out;
}
c->operand[write_pos++] = msg[read_pos++];
c->operand[write_pos++] = msg[read_pos++];
c->operand[write_pos++] = msg[read_pos++];
Expand All @@ -1177,13 +1181,17 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
c->operand[write_pos++] = es_info_length >> 8;
c->operand[write_pos++] = es_info_length & 0xff;
if (es_info_length > 0) {
if (read_pos >= length) {
ret = -EINVAL;
goto out;
}
pmt_cmd_id = msg[read_pos++];
if (pmt_cmd_id != 1 && pmt_cmd_id != 4)
dev_err(fdtv->device, "invalid pmt_cmd_id %d at stream level\n",
pmt_cmd_id);

if (es_info_length > sizeof(c->operand) - 4 -
write_pos) {
if (es_info_length > sizeof(c->operand) - 4 - write_pos ||
es_info_length > length - read_pos) {
ret = -EINVAL;
goto out;
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/firewire/firedtv-ci.c
Expand Up @@ -134,6 +134,8 @@ static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg)
} else {
data_length = msg->msg[3];
}
if (data_length > sizeof(msg->msg) - data_pos)
return -EINVAL;

return avc_ca_pmt(fdtv, &msg->msg[data_pos], data_length);
}
Expand Down
10 changes: 2 additions & 8 deletions drivers/net/ethernet/sfc/ethtool_common.c
Expand Up @@ -563,20 +563,14 @@ int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
{
struct efx_nic *efx = netdev_priv(net_dev);
struct efx_link_state *link_state = &efx->link_state;
u32 supported;

mutex_lock(&efx->mac_lock);
efx_mcdi_phy_get_link_ksettings(efx, cmd);
mutex_unlock(&efx->mac_lock);

/* Both MACs support pause frames (bidirectional and respond-only) */
ethtool_convert_link_mode_to_legacy_u32(&supported,
cmd->link_modes.supported);

supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;

ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
supported);
ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
ethtool_link_ksettings_add_link_mode(cmd, supported, Asym_Pause);

if (LOOPBACK_INTERNAL(efx)) {
cmd->base.speed = link_state->speed;
Expand Down
10 changes: 0 additions & 10 deletions drivers/net/wireless/ath/wcn36xx/main.c
Expand Up @@ -604,15 +604,6 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
}
}
}
/* FIXME: Only enable bmps support when encryption is enabled.
* For any reasons, when connected to open/no-security BSS,
* the wcn36xx controller in bmps mode does not forward
* 'wake-up' beacons despite AP sends DTIM with station AID.
* It could be due to a firmware issue or to the way driver
* configure the station.
*/
if (vif->type == NL80211_IFTYPE_STATION)
vif_priv->allow_bmps = true;
break;
case DISABLE_KEY:
if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
Expand Down Expand Up @@ -913,7 +904,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
vif->addr,
bss_conf->aid);
vif_priv->sta_assoc = false;
vif_priv->allow_bmps = false;
wcn36xx_smd_set_link_st(wcn,
bss_conf->bssid,
vif->addr,
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/wireless/ath/wcn36xx/pmc.c
Expand Up @@ -23,10 +23,7 @@ int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn,
{
int ret = 0;
struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);

if (!vif_priv->allow_bmps)
return -ENOTSUPP;

/* TODO: Make sure the TX chain clean */
ret = wcn36xx_smd_enter_bmps(wcn, vif);
if (!ret) {
wcn36xx_dbg(WCN36XX_DBG_PMC, "Entered BMPS\n");
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/wcn36xx/wcn36xx.h
Expand Up @@ -128,7 +128,6 @@ struct wcn36xx_vif {
enum wcn36xx_hal_bss_type bss_type;

/* Power management */
bool allow_bmps;
enum wcn36xx_power_state pw_state;

u8 bss_index;
Expand Down
4 changes: 2 additions & 2 deletions drivers/soc/imx/gpcv2.c
Expand Up @@ -244,6 +244,8 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd)
goto out_regulator_disable;
}

reset_control_assert(domain->reset);

if (domain->bits.pxx) {
/* request the domain to power up */
regmap_update_bits(domain->regmap, GPC_PU_PGC_SW_PUP_REQ,
Expand All @@ -266,8 +268,6 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd)
GPC_PGC_CTRL_PCR);
}

reset_control_assert(domain->reset);

/* delay for reset to propagate */
udelay(5);

Expand Down
29 changes: 6 additions & 23 deletions drivers/usb/core/hcd.c
Expand Up @@ -2795,7 +2795,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
{
int retval;
struct usb_device *rhdev;
struct usb_hcd *shared_hcd;

if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) {
hcd->phy_roothub = usb_phy_roothub_alloc(hcd->self.sysdev);
Expand Down Expand Up @@ -2956,26 +2955,13 @@ int usb_add_hcd(struct usb_hcd *hcd,
goto err_hcd_driver_start;
}

/* starting here, usbcore will pay attention to the shared HCD roothub */
shared_hcd = hcd->shared_hcd;
if (!usb_hcd_is_primary_hcd(hcd) && shared_hcd && HCD_DEFER_RH_REGISTER(shared_hcd)) {
retval = register_root_hub(shared_hcd);
if (retval != 0)
goto err_register_root_hub;

if (shared_hcd->uses_new_polling && HCD_POLL_RH(shared_hcd))
usb_hcd_poll_rh_status(shared_hcd);
}

/* starting here, usbcore will pay attention to this root hub */
if (!HCD_DEFER_RH_REGISTER(hcd)) {
retval = register_root_hub(hcd);
if (retval != 0)
goto err_register_root_hub;
retval = register_root_hub(hcd);
if (retval != 0)
goto err_register_root_hub;

if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
usb_hcd_poll_rh_status(hcd);
}
if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
usb_hcd_poll_rh_status(hcd);

return retval;

Expand Down Expand Up @@ -3013,7 +2999,6 @@ EXPORT_SYMBOL_GPL(usb_add_hcd);
void usb_remove_hcd(struct usb_hcd *hcd)
{
struct usb_device *rhdev = hcd->self.root_hub;
bool rh_registered;

dev_info(hcd->self.controller, "remove, state %x\n", hcd->state);

Expand All @@ -3024,7 +3009,6 @@ void usb_remove_hcd(struct usb_hcd *hcd)

dev_dbg(hcd->self.controller, "roothub graceful disconnect\n");
spin_lock_irq (&hcd_root_hub_lock);
rh_registered = hcd->rh_registered;
hcd->rh_registered = 0;
spin_unlock_irq (&hcd_root_hub_lock);

Expand All @@ -3034,8 +3018,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
cancel_work_sync(&hcd->died_work);

mutex_lock(&usb_bus_idr_lock);
if (rh_registered)
usb_disconnect(&rhdev); /* Sets rhdev to NULL */
usb_disconnect(&rhdev); /* Sets rhdev to NULL */
mutex_unlock(&usb_bus_idr_lock);

/*
Expand Down

0 comments on commit 047c8cc

Please sign in to comment.