mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
Merge 5.15.142 into android14-5.15-lts
Changes in 5.15.142 pinctrl: avoid reload of p state in list iteration firewire: core: fix possible memory leak in create_units() mmc: cqhci: Increase recovery halt timeout mmc: cqhci: Warn of halt or task clear failure mmc: cqhci: Fix task clearing in CQE error recovery mmc: block: Retry commands in CQE error recovery mmc: block: Do not lose cache flush during CQE error recovery mmc: block: Be sure to wait while busy in CQE error recovery ALSA: hda: Disable power-save on KONTRON SinglePC ALSA: hda/realtek: Headset Mic VREF to 100% ALSA: hda/realtek: Add supported ALC257 for ChromeOS dm-verity: align struct dm_verity_fec_io properly dm verity: don't perform FEC for failed readahead IO bcache: revert replacing IS_ERR_OR_NULL with IS_ERR iommu/vt-d: Add MTL to quirk list to skip TE disabling powerpc: Don't clobber f0/vs0 during fp|altivec register save parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes btrfs: add dmesg output for first mount and last unmount of a filesystem btrfs: ref-verify: fix memory leaks in btrfs_ref_tree_mod() btrfs: fix off-by-one when checking chunk map includes logical address btrfs: send: ensure send_fd is writable btrfs: make error messages more clear when getting a chunk map Input: xpad - add HyperX Clutch Gladiate Support vlan: introduce vlan_dev_free_egress_priority vlan: move dev_put into vlan_dev_uninit rcu: Avoid tracing a few functions executed in stop machine hv_netvsc: fix race of netvsc and VF register_netdevice USB: core: Change configuration warnings to notices usb: config: fix iteration issue in 'usb_get_bos_descriptor()' ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet dpaa2-eth: increase the needed headroom to account for alignment uapi: propagate __struct_group() attributes to the container union selftests/net: ipsec: fix constant out of range octeontx2-af: Fix possible buffer overflow net: stmmac: xgmac: Disable FPE MMC interrupts octeontx2-pf: Fix adding mbox work queue entry when num_vfs > 64 Revert "workqueue: remove unused cancel_work()" r8169: prevent potential deadlock in rtl8169_close ravb: Fix races between ravb_tx_timeout_work() and net related ops net: ravb: Check return value of reset_control_deassert() net: ravb: Use pm_runtime_resume_and_get() net: ravb: Start TX queues after HW initialization succeeded net: ravb: Stop DMA in case of failures on ravb_open() perf intel-pt: Fix async branch flags selftests/resctrl: Add missing SPDX license to Makefile selftests/resctrl: Move _GNU_SOURCE define into Makefile smb3: fix touch -h of symlink ASoC: Intel: Move soc_intel_is_foo() helpers to a generic header ASoC: SOF: sof-pci-dev: use community key on all Up boards ASoC: SOF: sof-pci-dev: add parameter to override topology filename ASoC: SOF: sof-pci-dev: don't use the community key on APL Chromebooks ASoC: SOF: sof-pci-dev: Fix community key quirk detection fbdev: stifb: Make the STI next font pointer a 32-bit signed offset fs: add ctime accessors infrastructure smb3: fix caching of ctime on setxattr cpufreq: imx6q: don't warn for disabling a non-existing frequency cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily iommu/vt-d: Omit devTLB invalidation requests when TES=0 iommu/vt-d: Make context clearing consistent with context mapping mmc: core: add helpers mmc_regulator_enable/disable_vqmmc mmc: sdhci-sprd: Fix vqmmc not shutting down after the card was pulled r8169: disable ASPM in case of tx timeout r8169: fix deadlock on RTL8125 in jumbo mtu mode iomap: update ki_pos a little later in iomap_dio_complete Linux 5.15.142 Change-Id: I2d05eab8dfba11864fda02413067bb3ce67ce9ea Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 15
|
||||
SUBLEVEL = 141
|
||||
SUBLEVEL = 142
|
||||
EXTRAVERSION =
|
||||
NAME = Trick or Treat
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
|
||||
/* We now return you to your regularly scheduled HPUX. */
|
||||
|
||||
#define ENOSYM 215 /* symbol does not exist in executable */
|
||||
#define ENOTSOCK 216 /* Socket operation on non-socket */
|
||||
#define EDESTADDRREQ 217 /* Destination address required */
|
||||
#define EMSGSIZE 218 /* Message too long */
|
||||
@@ -101,7 +100,6 @@
|
||||
#define ETIMEDOUT 238 /* Connection timed out */
|
||||
#define ECONNREFUSED 239 /* Connection refused */
|
||||
#define EREFUSED ECONNREFUSED /* for HP's NFS apparently */
|
||||
#define EREMOTERELEASE 240 /* Remote peer released connection */
|
||||
#define EHOSTDOWN 241 /* Host is down */
|
||||
#define EHOSTUNREACH 242 /* No route to host */
|
||||
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
#include <asm/feature-fixups.h>
|
||||
|
||||
#ifdef CONFIG_VSX
|
||||
#define __REST_1FPVSR(n,c,base) \
|
||||
BEGIN_FTR_SECTION \
|
||||
b 2f; \
|
||||
END_FTR_SECTION_IFSET(CPU_FTR_VSX); \
|
||||
REST_FPR(n,base); \
|
||||
b 3f; \
|
||||
2: REST_VSR(n,c,base); \
|
||||
3:
|
||||
|
||||
#define __REST_32FPVSRS(n,c,base) \
|
||||
BEGIN_FTR_SECTION \
|
||||
b 2f; \
|
||||
@@ -41,9 +50,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX); \
|
||||
2: SAVE_32VSRS(n,c,base); \
|
||||
3:
|
||||
#else
|
||||
#define __REST_1FPVSR(n,b,base) REST_FPR(n, base)
|
||||
#define __REST_32FPVSRS(n,b,base) REST_32FPRS(n, base)
|
||||
#define __SAVE_32FPVSRS(n,b,base) SAVE_32FPRS(n, base)
|
||||
#endif
|
||||
#define REST_1FPVSR(n,c,base) __REST_1FPVSR(n,__REG_##c,__REG_##base)
|
||||
#define REST_32FPVSRS(n,c,base) __REST_32FPVSRS(n,__REG_##c,__REG_##base)
|
||||
#define SAVE_32FPVSRS(n,c,base) __SAVE_32FPVSRS(n,__REG_##c,__REG_##base)
|
||||
|
||||
@@ -67,6 +78,7 @@ _GLOBAL(store_fp_state)
|
||||
SAVE_32FPVSRS(0, R4, R3)
|
||||
mffs fr0
|
||||
stfd fr0,FPSTATE_FPSCR(r3)
|
||||
REST_1FPVSR(0, R4, R3)
|
||||
blr
|
||||
EXPORT_SYMBOL(store_fp_state)
|
||||
|
||||
@@ -133,4 +145,5 @@ _GLOBAL(save_fpu)
|
||||
2: SAVE_32FPVSRS(0, R4, R6)
|
||||
mffs fr0
|
||||
stfd fr0,FPSTATE_FPSCR(r6)
|
||||
REST_1FPVSR(0, R4, R6)
|
||||
blr
|
||||
|
||||
@@ -32,6 +32,7 @@ _GLOBAL(store_vr_state)
|
||||
mfvscr v0
|
||||
li r4, VRSTATE_VSCR
|
||||
stvx v0, r4, r3
|
||||
lvx v0, 0, r3
|
||||
blr
|
||||
EXPORT_SYMBOL(store_vr_state)
|
||||
|
||||
@@ -104,6 +105,7 @@ _GLOBAL(save_altivec)
|
||||
mfvscr v0
|
||||
li r4,VRSTATE_VSCR
|
||||
stvx v0,r4,r7
|
||||
lvx v0,0,r7
|
||||
blr
|
||||
|
||||
#ifdef CONFIG_VSX
|
||||
|
||||
@@ -209,6 +209,14 @@ static struct cpufreq_driver imx6q_cpufreq_driver = {
|
||||
.suspend = cpufreq_generic_suspend,
|
||||
};
|
||||
|
||||
static void imx6x_disable_freq_in_opp(struct device *dev, unsigned long freq)
|
||||
{
|
||||
int ret = dev_pm_opp_disable(dev, freq);
|
||||
|
||||
if (ret < 0 && ret != -ENODEV)
|
||||
dev_warn(dev, "failed to disable %ldMHz OPP\n", freq / 1000000);
|
||||
}
|
||||
|
||||
#define OCOTP_CFG3 0x440
|
||||
#define OCOTP_CFG3_SPEED_SHIFT 16
|
||||
#define OCOTP_CFG3_SPEED_1P2GHZ 0x3
|
||||
@@ -254,17 +262,15 @@ static int imx6q_opp_check_speed_grading(struct device *dev)
|
||||
val &= 0x3;
|
||||
|
||||
if (val < OCOTP_CFG3_SPEED_996MHZ)
|
||||
if (dev_pm_opp_disable(dev, 996000000))
|
||||
dev_warn(dev, "failed to disable 996MHz OPP\n");
|
||||
imx6x_disable_freq_in_opp(dev, 996000000);
|
||||
|
||||
if (of_machine_is_compatible("fsl,imx6q") ||
|
||||
of_machine_is_compatible("fsl,imx6qp")) {
|
||||
if (val != OCOTP_CFG3_SPEED_852MHZ)
|
||||
if (dev_pm_opp_disable(dev, 852000000))
|
||||
dev_warn(dev, "failed to disable 852MHz OPP\n");
|
||||
imx6x_disable_freq_in_opp(dev, 852000000);
|
||||
|
||||
if (val != OCOTP_CFG3_SPEED_1P2GHZ)
|
||||
if (dev_pm_opp_disable(dev, 1200000000))
|
||||
dev_warn(dev, "failed to disable 1.2GHz OPP\n");
|
||||
imx6x_disable_freq_in_opp(dev, 1200000000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -316,20 +322,16 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
|
||||
val >>= OCOTP_CFG3_SPEED_SHIFT;
|
||||
val &= 0x3;
|
||||
|
||||
if (of_machine_is_compatible("fsl,imx6ul")) {
|
||||
if (of_machine_is_compatible("fsl,imx6ul"))
|
||||
if (val != OCOTP_CFG3_6UL_SPEED_696MHZ)
|
||||
if (dev_pm_opp_disable(dev, 696000000))
|
||||
dev_warn(dev, "failed to disable 696MHz OPP\n");
|
||||
}
|
||||
imx6x_disable_freq_in_opp(dev, 696000000);
|
||||
|
||||
if (of_machine_is_compatible("fsl,imx6ull")) {
|
||||
if (val != OCOTP_CFG3_6ULL_SPEED_792MHZ)
|
||||
if (dev_pm_opp_disable(dev, 792000000))
|
||||
dev_warn(dev, "failed to disable 792MHz OPP\n");
|
||||
if (val < OCOTP_CFG3_6ULL_SPEED_792MHZ)
|
||||
imx6x_disable_freq_in_opp(dev, 792000000);
|
||||
|
||||
if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ)
|
||||
if (dev_pm_opp_disable(dev, 900000000))
|
||||
dev_warn(dev, "failed to disable 900MHz OPP\n");
|
||||
imx6x_disable_freq_in_opp(dev, 900000000);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -719,14 +719,11 @@ static void create_units(struct fw_device *device)
|
||||
fw_unit_attributes,
|
||||
&unit->attribute_group);
|
||||
|
||||
if (device_register(&unit->device) < 0)
|
||||
goto skip_unit;
|
||||
|
||||
fw_device_get(device);
|
||||
continue;
|
||||
|
||||
skip_unit:
|
||||
kfree(unit);
|
||||
if (device_register(&unit->device) < 0) {
|
||||
put_device(&unit->device);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ static const struct xpad_device {
|
||||
{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
|
||||
{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
|
||||
{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
|
||||
{ 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE },
|
||||
{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
|
||||
{ 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
|
||||
{ 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
|
||||
@@ -434,6 +435,7 @@ static const struct usb_device_id xpad_table[] = {
|
||||
XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 Controller */
|
||||
XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */
|
||||
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x03f0), /* HP HyperX Xbox One Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
|
||||
|
||||
@@ -1518,6 +1518,15 @@ void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 pfsid,
|
||||
{
|
||||
struct qi_desc desc;
|
||||
|
||||
/*
|
||||
* VT-d spec, section 4.3:
|
||||
*
|
||||
* Software is recommended to not submit any Device-TLB invalidation
|
||||
* requests while address remapping hardware is disabled.
|
||||
*/
|
||||
if (!(iommu->gcmd & DMA_GCMD_TE))
|
||||
return;
|
||||
|
||||
if (mask) {
|
||||
addr |= (1ULL << (VTD_PAGE_SHIFT + mask - 1)) - 1;
|
||||
desc.qw1 = QI_DEV_IOTLB_ADDR(addr) | QI_DEV_IOTLB_SIZE;
|
||||
@@ -1583,6 +1592,15 @@ void qi_flush_dev_iotlb_pasid(struct intel_iommu *iommu, u16 sid, u16 pfsid,
|
||||
unsigned long mask = 1UL << (VTD_PAGE_SHIFT + size_order - 1);
|
||||
struct qi_desc desc = {.qw1 = 0, .qw2 = 0, .qw3 = 0};
|
||||
|
||||
/*
|
||||
* VT-d spec, section 4.3:
|
||||
*
|
||||
* Software is recommended to not submit any Device-TLB invalidation
|
||||
* requests while address remapping hardware is disabled.
|
||||
*/
|
||||
if (!(iommu->gcmd & DMA_GCMD_TE))
|
||||
return;
|
||||
|
||||
desc.qw0 = QI_DEV_EIOTLB_PASID(pasid) | QI_DEV_EIOTLB_SID(sid) |
|
||||
QI_DEV_EIOTLB_QDEP(qdep) | QI_DEIOTLB_TYPE |
|
||||
QI_DEV_IOTLB_PFSID(pfsid);
|
||||
|
||||
@@ -4465,8 +4465,8 @@ static int domain_context_clear_one_cb(struct pci_dev *pdev, u16 alias, void *op
|
||||
*/
|
||||
static void domain_context_clear(struct device_domain_info *info)
|
||||
{
|
||||
if (!info->iommu || !info->dev || !dev_is_pci(info->dev))
|
||||
return;
|
||||
if (!dev_is_pci(info->dev))
|
||||
domain_context_clear_one(info, info->bus, info->devfn);
|
||||
|
||||
pci_for_each_dma_alias(to_pci_dev(info->dev),
|
||||
&domain_context_clear_one_cb, info);
|
||||
@@ -5749,7 +5749,7 @@ static void quirk_igfx_skip_te_disable(struct pci_dev *dev)
|
||||
ver = (dev->device >> 8) & 0xff;
|
||||
if (ver != 0x45 && ver != 0x46 && ver != 0x4c &&
|
||||
ver != 0x4e && ver != 0x8a && ver != 0x98 &&
|
||||
ver != 0x9a && ver != 0xa7)
|
||||
ver != 0x9a && ver != 0xa7 && ver != 0x7d)
|
||||
return;
|
||||
|
||||
if (risky_device(dev))
|
||||
|
||||
@@ -1489,7 +1489,7 @@ out_nocoalesce:
|
||||
bch_keylist_free(&keylist);
|
||||
|
||||
for (i = 0; i < nodes; i++)
|
||||
if (!IS_ERR(new_nodes[i])) {
|
||||
if (!IS_ERR_OR_NULL(new_nodes[i])) {
|
||||
btree_node_free(new_nodes[i]);
|
||||
rw_unlock(true, new_nodes[i]);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ bool verity_fec_is_enabled(struct dm_verity *v)
|
||||
*/
|
||||
static inline struct dm_verity_fec_io *fec_io(struct dm_verity_io *io)
|
||||
{
|
||||
return (struct dm_verity_fec_io *) verity_io_digest_end(io->v, io);
|
||||
return (struct dm_verity_fec_io *)
|
||||
((char *)io + io->v->ti->per_io_data_size - sizeof(struct dm_verity_fec_io));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -583,7 +583,9 @@ static void verity_end_io(struct bio *bio)
|
||||
struct dm_verity_io *io = bio->bi_private;
|
||||
|
||||
if (bio->bi_status &&
|
||||
(!verity_fec_is_enabled(io->v) || verity_is_system_shutting_down())) {
|
||||
(!verity_fec_is_enabled(io->v) ||
|
||||
verity_is_system_shutting_down() ||
|
||||
(bio->bi_opf & REQ_RAHEAD))) {
|
||||
verity_finish_io(io, bio->bi_status);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,12 +111,6 @@ static inline u8 *verity_io_want_digest(struct dm_verity *v,
|
||||
return (u8 *)(io + 1) + v->ahash_reqsize + v->digest_size;
|
||||
}
|
||||
|
||||
static inline u8 *verity_io_digest_end(struct dm_verity *v,
|
||||
struct dm_verity_io *io)
|
||||
{
|
||||
return verity_io_want_digest(v, io) + v->digest_size;
|
||||
}
|
||||
|
||||
extern int verity_for_bv_block(struct dm_verity *v, struct dm_verity_io *io,
|
||||
struct bvec_iter *iter,
|
||||
int (*process)(struct dm_verity *v,
|
||||
|
||||
@@ -1476,6 +1476,8 @@ static void mmc_blk_cqe_complete_rq(struct mmc_queue *mq, struct request *req)
|
||||
blk_mq_requeue_request(req, true);
|
||||
else
|
||||
__blk_mq_end_request(req, BLK_STS_OK);
|
||||
} else if (mq->in_recovery) {
|
||||
blk_mq_requeue_request(req, true);
|
||||
} else {
|
||||
blk_mq_end_request(req, BLK_STS_OK);
|
||||
}
|
||||
|
||||
@@ -552,7 +552,9 @@ int mmc_cqe_recovery(struct mmc_host *host)
|
||||
cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;
|
||||
cmd.flags &= ~MMC_RSP_CRC; /* Ignore CRC */
|
||||
cmd.busy_timeout = MMC_CQE_RECOVERY_TIMEOUT;
|
||||
mmc_wait_for_cmd(host, &cmd, 0);
|
||||
mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
|
||||
|
||||
mmc_poll_for_busy(host->card, MMC_CQE_RECOVERY_TIMEOUT, true, MMC_BUSY_IO);
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.opcode = MMC_CMDQ_TASK_MGMT;
|
||||
@@ -560,10 +562,13 @@ int mmc_cqe_recovery(struct mmc_host *host)
|
||||
cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;
|
||||
cmd.flags &= ~MMC_RSP_CRC; /* Ignore CRC */
|
||||
cmd.busy_timeout = MMC_CQE_RECOVERY_TIMEOUT;
|
||||
err = mmc_wait_for_cmd(host, &cmd, 0);
|
||||
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
|
||||
|
||||
host->cqe_ops->cqe_recovery_finish(host);
|
||||
|
||||
if (err)
|
||||
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
|
||||
|
||||
mmc_retune_release(host);
|
||||
|
||||
return err;
|
||||
|
||||
@@ -271,3 +271,44 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mmc_regulator_get_supply);
|
||||
|
||||
/**
|
||||
* mmc_regulator_enable_vqmmc - enable VQMMC regulator for a host
|
||||
* @mmc: the host to regulate
|
||||
*
|
||||
* Returns 0 or errno. Enables the regulator for vqmmc.
|
||||
* Keeps track of the enable status for ensuring that calls to
|
||||
* regulator_enable/disable are balanced.
|
||||
*/
|
||||
int mmc_regulator_enable_vqmmc(struct mmc_host *mmc)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!IS_ERR(mmc->supply.vqmmc) && !mmc->vqmmc_enabled) {
|
||||
ret = regulator_enable(mmc->supply.vqmmc);
|
||||
if (ret < 0)
|
||||
dev_err(mmc_dev(mmc), "enabling vqmmc regulator failed\n");
|
||||
else
|
||||
mmc->vqmmc_enabled = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mmc_regulator_enable_vqmmc);
|
||||
|
||||
/**
|
||||
* mmc_regulator_disable_vqmmc - disable VQMMC regulator for a host
|
||||
* @mmc: the host to regulate
|
||||
*
|
||||
* Returns 0 or errno. Disables the regulator for vqmmc.
|
||||
* Keeps track of the enable status for ensuring that calls to
|
||||
* regulator_enable/disable are balanced.
|
||||
*/
|
||||
void mmc_regulator_disable_vqmmc(struct mmc_host *mmc)
|
||||
{
|
||||
if (!IS_ERR(mmc->supply.vqmmc) && mmc->vqmmc_enabled) {
|
||||
regulator_disable(mmc->supply.vqmmc);
|
||||
mmc->vqmmc_enabled = false;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mmc_regulator_disable_vqmmc);
|
||||
|
||||
@@ -942,8 +942,8 @@ static bool cqhci_clear_all_tasks(struct mmc_host *mmc, unsigned int timeout)
|
||||
ret = cqhci_tasks_cleared(cq_host);
|
||||
|
||||
if (!ret)
|
||||
pr_debug("%s: cqhci: Failed to clear tasks\n",
|
||||
mmc_hostname(mmc));
|
||||
pr_warn("%s: cqhci: Failed to clear tasks\n",
|
||||
mmc_hostname(mmc));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -976,7 +976,7 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout)
|
||||
ret = cqhci_halted(cq_host);
|
||||
|
||||
if (!ret)
|
||||
pr_debug("%s: cqhci: Failed to halt\n", mmc_hostname(mmc));
|
||||
pr_warn("%s: cqhci: Failed to halt\n", mmc_hostname(mmc));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -984,10 +984,10 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout)
|
||||
/*
|
||||
* After halting we expect to be able to use the command line. We interpret the
|
||||
* failure to halt to mean the data lines might still be in use (and the upper
|
||||
* layers will need to send a STOP command), so we set the timeout based on a
|
||||
* generous command timeout.
|
||||
* layers will need to send a STOP command), however failing to halt complicates
|
||||
* the recovery, so set a timeout that would reasonably allow I/O to complete.
|
||||
*/
|
||||
#define CQHCI_START_HALT_TIMEOUT 5
|
||||
#define CQHCI_START_HALT_TIMEOUT 500
|
||||
|
||||
static void cqhci_recovery_start(struct mmc_host *mmc)
|
||||
{
|
||||
@@ -1075,28 +1075,28 @@ static void cqhci_recovery_finish(struct mmc_host *mmc)
|
||||
|
||||
ok = cqhci_halt(mmc, CQHCI_FINISH_HALT_TIMEOUT);
|
||||
|
||||
if (!cqhci_clear_all_tasks(mmc, CQHCI_CLEAR_TIMEOUT))
|
||||
ok = false;
|
||||
|
||||
/*
|
||||
* The specification contradicts itself, by saying that tasks cannot be
|
||||
* cleared if CQHCI does not halt, but if CQHCI does not halt, it should
|
||||
* be disabled/re-enabled, but not to disable before clearing tasks.
|
||||
* Have a go anyway.
|
||||
*/
|
||||
if (!ok) {
|
||||
pr_debug("%s: cqhci: disable / re-enable\n", mmc_hostname(mmc));
|
||||
cqcfg = cqhci_readl(cq_host, CQHCI_CFG);
|
||||
cqcfg &= ~CQHCI_ENABLE;
|
||||
cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
|
||||
cqcfg |= CQHCI_ENABLE;
|
||||
cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
|
||||
/* Be sure that there are no tasks */
|
||||
ok = cqhci_halt(mmc, CQHCI_FINISH_HALT_TIMEOUT);
|
||||
if (!cqhci_clear_all_tasks(mmc, CQHCI_CLEAR_TIMEOUT))
|
||||
ok = false;
|
||||
WARN_ON(!ok);
|
||||
}
|
||||
if (!cqhci_clear_all_tasks(mmc, CQHCI_CLEAR_TIMEOUT))
|
||||
ok = false;
|
||||
|
||||
/* Disable to make sure tasks really are cleared */
|
||||
cqcfg = cqhci_readl(cq_host, CQHCI_CFG);
|
||||
cqcfg &= ~CQHCI_ENABLE;
|
||||
cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
|
||||
|
||||
cqcfg = cqhci_readl(cq_host, CQHCI_CFG);
|
||||
cqcfg |= CQHCI_ENABLE;
|
||||
cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
|
||||
|
||||
cqhci_halt(mmc, CQHCI_FINISH_HALT_TIMEOUT);
|
||||
|
||||
if (!ok)
|
||||
cqhci_clear_all_tasks(mmc, CQHCI_CLEAR_TIMEOUT);
|
||||
|
||||
cqhci_recover_mrqs(cq_host);
|
||||
|
||||
|
||||
@@ -392,12 +392,33 @@ static void sdhci_sprd_request_done(struct sdhci_host *host,
|
||||
mmc_request_done(host->mmc, mrq);
|
||||
}
|
||||
|
||||
static void sdhci_sprd_set_power(struct sdhci_host *host, unsigned char mode,
|
||||
unsigned short vdd)
|
||||
{
|
||||
struct mmc_host *mmc = host->mmc;
|
||||
|
||||
switch (mode) {
|
||||
case MMC_POWER_OFF:
|
||||
mmc_regulator_set_ocr(host->mmc, mmc->supply.vmmc, 0);
|
||||
|
||||
mmc_regulator_disable_vqmmc(mmc);
|
||||
break;
|
||||
case MMC_POWER_ON:
|
||||
mmc_regulator_enable_vqmmc(mmc);
|
||||
break;
|
||||
case MMC_POWER_UP:
|
||||
mmc_regulator_set_ocr(host->mmc, mmc->supply.vmmc, vdd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static struct sdhci_ops sdhci_sprd_ops = {
|
||||
.read_l = sdhci_sprd_readl,
|
||||
.write_l = sdhci_sprd_writel,
|
||||
.write_w = sdhci_sprd_writew,
|
||||
.write_b = sdhci_sprd_writeb,
|
||||
.set_clock = sdhci_sprd_set_clock,
|
||||
.set_power = sdhci_sprd_set_power,
|
||||
.get_max_clock = sdhci_sprd_get_max_clock,
|
||||
.get_min_clock = sdhci_sprd_get_min_clock,
|
||||
.set_bus_width = sdhci_set_bus_width,
|
||||
@@ -663,6 +684,10 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
|
||||
host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
|
||||
SDHCI_SUPPORT_DDR50);
|
||||
|
||||
ret = mmc_regulator_get_supply(host->mmc);
|
||||
if (ret)
|
||||
goto pm_runtime_disable;
|
||||
|
||||
ret = sdhci_setup_host(host);
|
||||
if (ret)
|
||||
goto pm_runtime_disable;
|
||||
|
||||
@@ -952,14 +952,12 @@ static int dpaa2_eth_build_single_fd(struct dpaa2_eth_priv *priv,
|
||||
dma_addr_t addr;
|
||||
|
||||
buffer_start = skb->data - dpaa2_eth_needed_headroom(skb);
|
||||
|
||||
/* If there's enough room to align the FD address, do it.
|
||||
* It will help hardware optimize accesses.
|
||||
*/
|
||||
aligned_start = PTR_ALIGN(buffer_start - DPAA2_ETH_TX_BUF_ALIGN,
|
||||
DPAA2_ETH_TX_BUF_ALIGN);
|
||||
if (aligned_start >= skb->head)
|
||||
buffer_start = aligned_start;
|
||||
else
|
||||
return -ENOMEM;
|
||||
|
||||
/* Store a backpointer to the skb at the beginning of the buffer
|
||||
* (in the private data area) such that we can release it
|
||||
@@ -4446,6 +4444,8 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev)
|
||||
if (err)
|
||||
goto err_dl_port_add;
|
||||
|
||||
net_dev->needed_headroom = DPAA2_ETH_SWA_SIZE + DPAA2_ETH_TX_BUF_ALIGN;
|
||||
|
||||
err = register_netdev(net_dev);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "register_netdev() failed\n");
|
||||
|
||||
@@ -670,7 +670,7 @@ static inline bool dpaa2_eth_rx_pause_enabled(u64 link_options)
|
||||
|
||||
static inline unsigned int dpaa2_eth_needed_headroom(struct sk_buff *skb)
|
||||
{
|
||||
unsigned int headroom = DPAA2_ETH_SWA_SIZE;
|
||||
unsigned int headroom = DPAA2_ETH_SWA_SIZE + DPAA2_ETH_TX_BUF_ALIGN;
|
||||
|
||||
/* If we don't have an skb (e.g. XDP buffer), we only need space for
|
||||
* the software annotation area
|
||||
|
||||
@@ -5045,6 +5045,8 @@ int rvu_mbox_handler_nix_bandprof_free(struct rvu *rvu,
|
||||
|
||||
ipolicer = &nix_hw->ipolicer[layer];
|
||||
for (idx = 0; idx < req->prof_count[layer]; idx++) {
|
||||
if (idx == MAX_BANDPROF_PER_PFFUNC)
|
||||
break;
|
||||
prof_idx = req->prof_idx[layer][idx];
|
||||
if (prof_idx >= ipolicer->band_prof.max ||
|
||||
ipolicer->pfvf_map[prof_idx] != pcifunc)
|
||||
@@ -5058,8 +5060,6 @@ int rvu_mbox_handler_nix_bandprof_free(struct rvu *rvu,
|
||||
ipolicer->pfvf_map[prof_idx] = 0x00;
|
||||
ipolicer->match_id[prof_idx] = 0;
|
||||
rvu_free_rsrc(&ipolicer->band_prof, prof_idx);
|
||||
if (idx == MAX_BANDPROF_PER_PFFUNC)
|
||||
break;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&rvu->rsrc_lock);
|
||||
|
||||
@@ -557,7 +557,9 @@ static irqreturn_t otx2_pfvf_mbox_intr_handler(int irq, void *pf_irq)
|
||||
otx2_write64(pf, RVU_PF_VFPF_MBOX_INTX(1), intr);
|
||||
otx2_queue_work(mbox, pf->mbox_pfvf_wq, 64, vfs, intr,
|
||||
TYPE_PFVF);
|
||||
vfs -= 64;
|
||||
if (intr)
|
||||
trace_otx2_msg_interrupt(mbox->mbox.pdev, "VF(s) to PF", intr);
|
||||
vfs = 64;
|
||||
}
|
||||
|
||||
intr = otx2_read64(pf, RVU_PF_VFPF_MBOX_INTX(0));
|
||||
@@ -565,7 +567,8 @@ static irqreturn_t otx2_pfvf_mbox_intr_handler(int irq, void *pf_irq)
|
||||
|
||||
otx2_queue_work(mbox, pf->mbox_pfvf_wq, 0, vfs, intr, TYPE_PFVF);
|
||||
|
||||
trace_otx2_msg_interrupt(mbox->mbox.pdev, "VF(s) to PF", intr);
|
||||
if (intr)
|
||||
trace_otx2_msg_interrupt(mbox->mbox.pdev, "VF(s) to PF", intr);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -588,6 +588,8 @@ struct rtl8169_tc_offsets {
|
||||
enum rtl_flag {
|
||||
RTL_FLAG_TASK_ENABLED = 0,
|
||||
RTL_FLAG_TASK_RESET_PENDING,
|
||||
RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE,
|
||||
RTL_FLAG_TASK_TX_TIMEOUT,
|
||||
RTL_FLAG_MAX
|
||||
};
|
||||
|
||||
@@ -4029,7 +4031,7 @@ static void rtl8169_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
{
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
|
||||
rtl_schedule_task(tp, RTL_FLAG_TASK_TX_TIMEOUT);
|
||||
}
|
||||
|
||||
static int rtl8169_tx_map(struct rtl8169_private *tp, const u32 *opts, u32 len,
|
||||
@@ -4624,6 +4626,7 @@ static void rtl_task(struct work_struct *work)
|
||||
{
|
||||
struct rtl8169_private *tp =
|
||||
container_of(work, struct rtl8169_private, wk.work);
|
||||
int ret;
|
||||
|
||||
rtnl_lock();
|
||||
|
||||
@@ -4631,9 +4634,21 @@ static void rtl_task(struct work_struct *work)
|
||||
!test_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags))
|
||||
goto out_unlock;
|
||||
|
||||
if (test_and_clear_bit(RTL_FLAG_TASK_TX_TIMEOUT, tp->wk.flags)) {
|
||||
/* ASPM compatibility issues are a typical reason for tx timeouts */
|
||||
ret = pci_disable_link_state(tp->pci_dev, PCIE_LINK_STATE_L1 |
|
||||
PCIE_LINK_STATE_L0S);
|
||||
if (!ret)
|
||||
netdev_warn_once(tp->dev, "ASPM disabled on Tx timeout\n");
|
||||
goto reset;
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(RTL_FLAG_TASK_RESET_PENDING, tp->wk.flags)) {
|
||||
reset:
|
||||
rtl_reset_work(tp);
|
||||
netif_wake_queue(tp->dev);
|
||||
} else if (test_and_clear_bit(RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE, tp->wk.flags)) {
|
||||
rtl_reset_work(tp);
|
||||
}
|
||||
out_unlock:
|
||||
rtnl_unlock();
|
||||
@@ -4667,7 +4682,7 @@ static void r8169_phylink_handler(struct net_device *ndev)
|
||||
} else {
|
||||
/* In few cases rx is broken after link-down otherwise */
|
||||
if (rtl_is_8125(tp))
|
||||
rtl_reset_work(tp);
|
||||
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE);
|
||||
pm_runtime_idle(d);
|
||||
}
|
||||
|
||||
@@ -4744,7 +4759,7 @@ static int rtl8169_close(struct net_device *dev)
|
||||
rtl8169_down(tp);
|
||||
rtl8169_rx_clear(tp);
|
||||
|
||||
cancel_work_sync(&tp->wk.work);
|
||||
cancel_work(&tp->wk.work);
|
||||
|
||||
free_irq(pci_irq_vector(pdev, 0), tp);
|
||||
|
||||
@@ -5000,6 +5015,8 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
if (pci_dev_run_wake(pdev))
|
||||
pm_runtime_get_noresume(&pdev->dev);
|
||||
|
||||
cancel_work_sync(&tp->wk.work);
|
||||
|
||||
unregister_netdev(tp->dev);
|
||||
|
||||
if (tp->dash_type != RTL_DASH_NONE)
|
||||
|
||||
@@ -1448,19 +1448,20 @@ static int ravb_open(struct net_device *ndev)
|
||||
if (info->gptp)
|
||||
ravb_ptp_init(ndev, priv->pdev);
|
||||
|
||||
netif_tx_start_all_queues(ndev);
|
||||
|
||||
/* PHY control start */
|
||||
error = ravb_phy_start(ndev);
|
||||
if (error)
|
||||
goto out_ptp_stop;
|
||||
|
||||
netif_tx_start_all_queues(ndev);
|
||||
|
||||
return 0;
|
||||
|
||||
out_ptp_stop:
|
||||
/* Stop PTP Clock driver */
|
||||
if (info->gptp)
|
||||
ravb_ptp_stop(ndev);
|
||||
ravb_stop_dma(ndev);
|
||||
out_free_irq_nc_tx:
|
||||
if (!info->multi_irqs)
|
||||
goto out_free_irq;
|
||||
@@ -1504,6 +1505,12 @@ static void ravb_tx_timeout_work(struct work_struct *work)
|
||||
struct net_device *ndev = priv->ndev;
|
||||
int error;
|
||||
|
||||
if (!rtnl_trylock()) {
|
||||
usleep_range(1000, 2000);
|
||||
schedule_work(&priv->work);
|
||||
return;
|
||||
}
|
||||
|
||||
netif_tx_stop_all_queues(ndev);
|
||||
|
||||
/* Stop PTP Clock driver */
|
||||
@@ -1536,7 +1543,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
|
||||
*/
|
||||
netdev_err(ndev, "%s: ravb_dmac_init() failed, error %d\n",
|
||||
__func__, error);
|
||||
return;
|
||||
goto out_unlock;
|
||||
}
|
||||
ravb_emac_init(ndev);
|
||||
|
||||
@@ -1546,6 +1553,9 @@ out:
|
||||
ravb_ptp_init(ndev, priv->pdev);
|
||||
|
||||
netif_tx_start_all_queues(ndev);
|
||||
|
||||
out_unlock:
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
/* Packet transmit function for Ethernet AVB */
|
||||
@@ -2179,9 +2189,14 @@ static int ravb_probe(struct platform_device *pdev)
|
||||
ndev->features = info->net_features;
|
||||
ndev->hw_features = info->net_hw_features;
|
||||
|
||||
reset_control_deassert(rstc);
|
||||
error = reset_control_deassert(rstc);
|
||||
if (error)
|
||||
goto out_free_netdev;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
error = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (error < 0)
|
||||
goto out_rpm_disable;
|
||||
|
||||
if (info->multi_irqs)
|
||||
irq = platform_get_irq_byname(pdev, "ch22");
|
||||
@@ -2364,11 +2379,12 @@ out_dma_free:
|
||||
out_disable_refclk:
|
||||
clk_disable_unprepare(priv->refclk);
|
||||
out_release:
|
||||
free_netdev(ndev);
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
out_rpm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
reset_control_assert(rstc);
|
||||
out_free_netdev:
|
||||
free_netdev(ndev);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,8 +177,10 @@
|
||||
#define MMC_XGMAC_RX_DISCARD_OCT_GB 0x1b4
|
||||
#define MMC_XGMAC_RX_ALIGN_ERR_PKT 0x1bc
|
||||
|
||||
#define MMC_XGMAC_TX_FPE_INTR_MASK 0x204
|
||||
#define MMC_XGMAC_TX_FPE_FRAG 0x208
|
||||
#define MMC_XGMAC_TX_HOLD_REQ 0x20c
|
||||
#define MMC_XGMAC_RX_FPE_INTR_MASK 0x224
|
||||
#define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR 0x228
|
||||
#define MMC_XGMAC_RX_PKT_SMD_ERR 0x22c
|
||||
#define MMC_XGMAC_RX_PKT_ASSEMBLY_OK 0x230
|
||||
@@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr)
|
||||
{
|
||||
writel(0x0, mmcaddr + MMC_RX_INTR_MASK);
|
||||
writel(0x0, mmcaddr + MMC_TX_INTR_MASK);
|
||||
writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_TX_FPE_INTR_MASK);
|
||||
writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_FPE_INTR_MASK);
|
||||
writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK);
|
||||
}
|
||||
|
||||
|
||||
@@ -2563,6 +2563,21 @@ static int netvsc_probe(struct hv_device *dev,
|
||||
goto devinfo_failed;
|
||||
}
|
||||
|
||||
/* We must get rtnl lock before scheduling nvdev->subchan_work,
|
||||
* otherwise netvsc_subchan_work() can get rtnl lock first and wait
|
||||
* all subchannels to show up, but that may not happen because
|
||||
* netvsc_probe() can't get rtnl lock and as a result vmbus_onoffer()
|
||||
* -> ... -> device_add() -> ... -> __device_attach() can't get
|
||||
* the device lock, so all the subchannels can't be processed --
|
||||
* finally netvsc_subchan_work() hangs forever.
|
||||
*
|
||||
* The rtnl lock also needs to be held before rndis_filter_device_add()
|
||||
* which advertises nvsp_2_vsc_capability / sriov bit, and triggers
|
||||
* VF NIC offering and registering. If VF NIC finished register_netdev()
|
||||
* earlier it may cause name based config failure.
|
||||
*/
|
||||
rtnl_lock();
|
||||
|
||||
nvdev = rndis_filter_device_add(dev, device_info);
|
||||
if (IS_ERR(nvdev)) {
|
||||
ret = PTR_ERR(nvdev);
|
||||
@@ -2572,16 +2587,6 @@ static int netvsc_probe(struct hv_device *dev,
|
||||
|
||||
memcpy(net->dev_addr, device_info->mac_adr, ETH_ALEN);
|
||||
|
||||
/* We must get rtnl lock before scheduling nvdev->subchan_work,
|
||||
* otherwise netvsc_subchan_work() can get rtnl lock first and wait
|
||||
* all subchannels to show up, but that may not happen because
|
||||
* netvsc_probe() can't get rtnl lock and as a result vmbus_onoffer()
|
||||
* -> ... -> device_add() -> ... -> __device_attach() can't get
|
||||
* the device lock, so all the subchannels can't be processed --
|
||||
* finally netvsc_subchan_work() hangs forever.
|
||||
*/
|
||||
rtnl_lock();
|
||||
|
||||
if (nvdev->num_chn > 1)
|
||||
schedule_work(&nvdev->subchan_work);
|
||||
|
||||
@@ -2615,9 +2620,9 @@ static int netvsc_probe(struct hv_device *dev,
|
||||
return 0;
|
||||
|
||||
register_failed:
|
||||
rtnl_unlock();
|
||||
rndis_filter_device_remove(dev, nvdev);
|
||||
rndis_failed:
|
||||
rtnl_unlock();
|
||||
netvsc_devinfo_put(device_info);
|
||||
devinfo_failed:
|
||||
free_percpu(net_device_ctx->vf_stats);
|
||||
|
||||
@@ -1239,17 +1239,17 @@ static void pinctrl_link_add(struct pinctrl_dev *pctldev,
|
||||
static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
|
||||
{
|
||||
struct pinctrl_setting *setting, *setting2;
|
||||
struct pinctrl_state *old_state = p->state;
|
||||
struct pinctrl_state *old_state = READ_ONCE(p->state);
|
||||
int ret;
|
||||
|
||||
if (p->state) {
|
||||
if (old_state) {
|
||||
/*
|
||||
* For each pinmux setting in the old state, forget SW's record
|
||||
* of mux owner for that pingroup. Any pingroups which are
|
||||
* still owned by the new state will be re-acquired by the call
|
||||
* to pinmux_enable_setting() in the loop below.
|
||||
*/
|
||||
list_for_each_entry(setting, &p->state->settings, node) {
|
||||
list_for_each_entry(setting, &old_state->settings, node) {
|
||||
if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
|
||||
continue;
|
||||
pinmux_disable_setting(setting);
|
||||
|
||||
@@ -61,7 +61,7 @@ static void usb_parse_ssp_isoc_endpoint_companion(struct device *ddev,
|
||||
desc = (struct usb_ssp_isoc_ep_comp_descriptor *) buffer;
|
||||
if (desc->bDescriptorType != USB_DT_SSP_ISOC_ENDPOINT_COMP ||
|
||||
size < USB_DT_SSP_ISOC_EP_COMP_SIZE) {
|
||||
dev_warn(ddev, "Invalid SuperSpeedPlus isoc endpoint companion"
|
||||
dev_notice(ddev, "Invalid SuperSpeedPlus isoc endpoint companion"
|
||||
"for config %d interface %d altsetting %d ep %d.\n",
|
||||
cfgno, inum, asnum, ep->desc.bEndpointAddress);
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
|
||||
|
||||
if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP ||
|
||||
size < USB_DT_SS_EP_COMP_SIZE) {
|
||||
dev_warn(ddev, "No SuperSpeed endpoint companion for config %d "
|
||||
dev_notice(ddev, "No SuperSpeed endpoint companion for config %d "
|
||||
" interface %d altsetting %d ep %d: "
|
||||
"using minimum values\n",
|
||||
cfgno, inum, asnum, ep->desc.bEndpointAddress);
|
||||
@@ -109,13 +109,13 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
|
||||
|
||||
/* Check the various values */
|
||||
if (usb_endpoint_xfer_control(&ep->desc) && desc->bMaxBurst != 0) {
|
||||
dev_warn(ddev, "Control endpoint with bMaxBurst = %d in "
|
||||
dev_notice(ddev, "Control endpoint with bMaxBurst = %d in "
|
||||
"config %d interface %d altsetting %d ep %d: "
|
||||
"setting to zero\n", desc->bMaxBurst,
|
||||
cfgno, inum, asnum, ep->desc.bEndpointAddress);
|
||||
ep->ss_ep_comp.bMaxBurst = 0;
|
||||
} else if (desc->bMaxBurst > 15) {
|
||||
dev_warn(ddev, "Endpoint with bMaxBurst = %d in "
|
||||
dev_notice(ddev, "Endpoint with bMaxBurst = %d in "
|
||||
"config %d interface %d altsetting %d ep %d: "
|
||||
"setting to 15\n", desc->bMaxBurst,
|
||||
cfgno, inum, asnum, ep->desc.bEndpointAddress);
|
||||
@@ -125,7 +125,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
|
||||
if ((usb_endpoint_xfer_control(&ep->desc) ||
|
||||
usb_endpoint_xfer_int(&ep->desc)) &&
|
||||
desc->bmAttributes != 0) {
|
||||
dev_warn(ddev, "%s endpoint with bmAttributes = %d in "
|
||||
dev_notice(ddev, "%s endpoint with bmAttributes = %d in "
|
||||
"config %d interface %d altsetting %d ep %d: "
|
||||
"setting to zero\n",
|
||||
usb_endpoint_xfer_control(&ep->desc) ? "Control" : "Bulk",
|
||||
@@ -134,7 +134,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
|
||||
ep->ss_ep_comp.bmAttributes = 0;
|
||||
} else if (usb_endpoint_xfer_bulk(&ep->desc) &&
|
||||
desc->bmAttributes > 16) {
|
||||
dev_warn(ddev, "Bulk endpoint with more than 65536 streams in "
|
||||
dev_notice(ddev, "Bulk endpoint with more than 65536 streams in "
|
||||
"config %d interface %d altsetting %d ep %d: "
|
||||
"setting to max\n",
|
||||
cfgno, inum, asnum, ep->desc.bEndpointAddress);
|
||||
@@ -142,7 +142,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
|
||||
} else if (usb_endpoint_xfer_isoc(&ep->desc) &&
|
||||
!USB_SS_SSP_ISOC_COMP(desc->bmAttributes) &&
|
||||
USB_SS_MULT(desc->bmAttributes) > 3) {
|
||||
dev_warn(ddev, "Isoc endpoint has Mult of %d in "
|
||||
dev_notice(ddev, "Isoc endpoint has Mult of %d in "
|
||||
"config %d interface %d altsetting %d ep %d: "
|
||||
"setting to 3\n",
|
||||
USB_SS_MULT(desc->bmAttributes),
|
||||
@@ -160,7 +160,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
|
||||
else
|
||||
max_tx = 999999;
|
||||
if (le16_to_cpu(desc->wBytesPerInterval) > max_tx) {
|
||||
dev_warn(ddev, "%s endpoint with wBytesPerInterval of %d in "
|
||||
dev_notice(ddev, "%s endpoint with wBytesPerInterval of %d in "
|
||||
"config %d interface %d altsetting %d ep %d: "
|
||||
"setting to %d\n",
|
||||
usb_endpoint_xfer_isoc(&ep->desc) ? "Isoc" : "Int",
|
||||
@@ -273,7 +273,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
else if (d->bLength >= USB_DT_ENDPOINT_SIZE)
|
||||
n = USB_DT_ENDPOINT_SIZE;
|
||||
else {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d has an "
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d has an "
|
||||
"invalid endpoint descriptor of length %d, skipping\n",
|
||||
cfgno, inum, asnum, d->bLength);
|
||||
goto skip_to_next_endpoint_or_interface_descriptor;
|
||||
@@ -281,7 +281,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
|
||||
i = d->bEndpointAddress & ~USB_ENDPOINT_DIR_MASK;
|
||||
if (i >= 16 || i == 0) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d has an "
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d has an "
|
||||
"invalid endpoint with address 0x%X, skipping\n",
|
||||
cfgno, inum, asnum, d->bEndpointAddress);
|
||||
goto skip_to_next_endpoint_or_interface_descriptor;
|
||||
@@ -293,7 +293,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
|
||||
/* Check for duplicate endpoint addresses */
|
||||
if (config_endpoint_is_duplicate(config, inum, asnum, d)) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
|
||||
cfgno, inum, asnum, d->bEndpointAddress);
|
||||
goto skip_to_next_endpoint_or_interface_descriptor;
|
||||
}
|
||||
@@ -301,7 +301,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
/* Ignore some endpoints */
|
||||
if (udev->quirks & USB_QUIRK_ENDPOINT_IGNORE) {
|
||||
if (usb_endpoint_is_ignored(udev, ifp, d)) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d has an ignored endpoint with address 0x%X, skipping\n",
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d has an ignored endpoint with address 0x%X, skipping\n",
|
||||
cfgno, inum, asnum,
|
||||
d->bEndpointAddress);
|
||||
goto skip_to_next_endpoint_or_interface_descriptor;
|
||||
@@ -378,7 +378,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
}
|
||||
}
|
||||
if (d->bInterval < i || d->bInterval > j) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d "
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d "
|
||||
"endpoint 0x%X has an invalid bInterval %d, "
|
||||
"changing to %d\n",
|
||||
cfgno, inum, asnum,
|
||||
@@ -391,7 +391,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
* them usable, we will try treating them as Interrupt endpoints.
|
||||
*/
|
||||
if (udev->speed == USB_SPEED_LOW && usb_endpoint_xfer_bulk(d)) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d "
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d "
|
||||
"endpoint 0x%X is Bulk; changing to Interrupt\n",
|
||||
cfgno, inum, asnum, d->bEndpointAddress);
|
||||
endpoint->desc.bmAttributes = USB_ENDPOINT_XFER_INT;
|
||||
@@ -408,7 +408,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
*/
|
||||
maxp = le16_to_cpu(endpoint->desc.wMaxPacketSize);
|
||||
if (maxp == 0 && !(usb_endpoint_xfer_isoc(d) && asnum == 0)) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d endpoint 0x%X has invalid wMaxPacketSize 0\n",
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d endpoint 0x%X has invalid wMaxPacketSize 0\n",
|
||||
cfgno, inum, asnum, d->bEndpointAddress);
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
j = maxpacket_maxes[usb_endpoint_type(&endpoint->desc)];
|
||||
|
||||
if (maxp > j) {
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d endpoint 0x%X has invalid maxpacket %d, setting to %d\n",
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d endpoint 0x%X has invalid maxpacket %d, setting to %d\n",
|
||||
cfgno, inum, asnum, d->bEndpointAddress, maxp, j);
|
||||
maxp = j;
|
||||
endpoint->desc.wMaxPacketSize = cpu_to_le16(i | maxp);
|
||||
@@ -452,7 +452,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
|
||||
*/
|
||||
if (udev->speed == USB_SPEED_HIGH && usb_endpoint_xfer_bulk(d)) {
|
||||
if (maxp != 512)
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d "
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d "
|
||||
"bulk endpoint 0x%X has invalid maxpacket %d\n",
|
||||
cfgno, inum, asnum, d->bEndpointAddress,
|
||||
maxp);
|
||||
@@ -533,7 +533,7 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
|
||||
i < intfc->num_altsetting;
|
||||
(++i, ++alt)) {
|
||||
if (alt->desc.bAlternateSetting == asnum) {
|
||||
dev_warn(ddev, "Duplicate descriptor for config %d "
|
||||
dev_notice(ddev, "Duplicate descriptor for config %d "
|
||||
"interface %d altsetting %d, skipping\n",
|
||||
cfgno, inum, asnum);
|
||||
goto skip_to_next_interface_descriptor;
|
||||
@@ -559,7 +559,7 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
|
||||
num_ep = num_ep_orig = alt->desc.bNumEndpoints;
|
||||
alt->desc.bNumEndpoints = 0; /* Use as a counter */
|
||||
if (num_ep > USB_MAXENDPOINTS) {
|
||||
dev_warn(ddev, "too many endpoints for config %d interface %d "
|
||||
dev_notice(ddev, "too many endpoints for config %d interface %d "
|
||||
"altsetting %d: %d, using maximum allowed: %d\n",
|
||||
cfgno, inum, asnum, num_ep, USB_MAXENDPOINTS);
|
||||
num_ep = USB_MAXENDPOINTS;
|
||||
@@ -590,7 +590,7 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
|
||||
}
|
||||
|
||||
if (n != num_ep_orig)
|
||||
dev_warn(ddev, "config %d interface %d altsetting %d has %d "
|
||||
dev_notice(ddev, "config %d interface %d altsetting %d has %d "
|
||||
"endpoint descriptor%s, different from the interface "
|
||||
"descriptor's value: %d\n",
|
||||
cfgno, inum, asnum, n, plural(n), num_ep_orig);
|
||||
@@ -625,7 +625,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
if (config->desc.bDescriptorType != USB_DT_CONFIG ||
|
||||
config->desc.bLength < USB_DT_CONFIG_SIZE ||
|
||||
config->desc.bLength > size) {
|
||||
dev_err(ddev, "invalid descriptor for config index %d: "
|
||||
dev_notice(ddev, "invalid descriptor for config index %d: "
|
||||
"type = 0x%X, length = %d\n", cfgidx,
|
||||
config->desc.bDescriptorType, config->desc.bLength);
|
||||
return -EINVAL;
|
||||
@@ -636,7 +636,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
size -= config->desc.bLength;
|
||||
|
||||
if (nintf > USB_MAXINTERFACES) {
|
||||
dev_warn(ddev, "config %d has too many interfaces: %d, "
|
||||
dev_notice(ddev, "config %d has too many interfaces: %d, "
|
||||
"using maximum allowed: %d\n",
|
||||
cfgno, nintf, USB_MAXINTERFACES);
|
||||
nintf = USB_MAXINTERFACES;
|
||||
@@ -650,7 +650,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
(buffer2 += header->bLength, size2 -= header->bLength)) {
|
||||
|
||||
if (size2 < sizeof(struct usb_descriptor_header)) {
|
||||
dev_warn(ddev, "config %d descriptor has %d excess "
|
||||
dev_notice(ddev, "config %d descriptor has %d excess "
|
||||
"byte%s, ignoring\n",
|
||||
cfgno, size2, plural(size2));
|
||||
break;
|
||||
@@ -658,7 +658,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
|
||||
header = (struct usb_descriptor_header *) buffer2;
|
||||
if ((header->bLength > size2) || (header->bLength < 2)) {
|
||||
dev_warn(ddev, "config %d has an invalid descriptor "
|
||||
dev_notice(ddev, "config %d has an invalid descriptor "
|
||||
"of length %d, skipping remainder of the config\n",
|
||||
cfgno, header->bLength);
|
||||
break;
|
||||
@@ -670,7 +670,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
|
||||
d = (struct usb_interface_descriptor *) header;
|
||||
if (d->bLength < USB_DT_INTERFACE_SIZE) {
|
||||
dev_warn(ddev, "config %d has an invalid "
|
||||
dev_notice(ddev, "config %d has an invalid "
|
||||
"interface descriptor of length %d, "
|
||||
"skipping\n", cfgno, d->bLength);
|
||||
continue;
|
||||
@@ -680,7 +680,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
|
||||
if ((dev->quirks & USB_QUIRK_HONOR_BNUMINTERFACES) &&
|
||||
n >= nintf_orig) {
|
||||
dev_warn(ddev, "config %d has more interface "
|
||||
dev_notice(ddev, "config %d has more interface "
|
||||
"descriptors, than it declares in "
|
||||
"bNumInterfaces, ignoring interface "
|
||||
"number: %d\n", cfgno, inum);
|
||||
@@ -688,7 +688,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
}
|
||||
|
||||
if (inum >= nintf_orig)
|
||||
dev_warn(ddev, "config %d has an invalid "
|
||||
dev_notice(ddev, "config %d has an invalid "
|
||||
"interface number: %d but max is %d\n",
|
||||
cfgno, inum, nintf_orig - 1);
|
||||
|
||||
@@ -713,14 +713,14 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
|
||||
d = (struct usb_interface_assoc_descriptor *)header;
|
||||
if (d->bLength < USB_DT_INTERFACE_ASSOCIATION_SIZE) {
|
||||
dev_warn(ddev,
|
||||
dev_notice(ddev,
|
||||
"config %d has an invalid interface association descriptor of length %d, skipping\n",
|
||||
cfgno, d->bLength);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (iad_num == USB_MAXIADS) {
|
||||
dev_warn(ddev, "found more Interface "
|
||||
dev_notice(ddev, "found more Interface "
|
||||
"Association Descriptors "
|
||||
"than allocated for in "
|
||||
"configuration %d\n", cfgno);
|
||||
@@ -731,7 +731,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
|
||||
} else if (header->bDescriptorType == USB_DT_DEVICE ||
|
||||
header->bDescriptorType == USB_DT_CONFIG)
|
||||
dev_warn(ddev, "config %d contains an unexpected "
|
||||
dev_notice(ddev, "config %d contains an unexpected "
|
||||
"descriptor of type 0x%X, skipping\n",
|
||||
cfgno, header->bDescriptorType);
|
||||
|
||||
@@ -740,11 +740,11 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
config->desc.wTotalLength = cpu_to_le16(buffer2 - buffer0);
|
||||
|
||||
if (n != nintf)
|
||||
dev_warn(ddev, "config %d has %d interface%s, different from "
|
||||
dev_notice(ddev, "config %d has %d interface%s, different from "
|
||||
"the descriptor's value: %d\n",
|
||||
cfgno, n, plural(n), nintf_orig);
|
||||
else if (n == 0)
|
||||
dev_warn(ddev, "config %d has no interfaces?\n", cfgno);
|
||||
dev_notice(ddev, "config %d has no interfaces?\n", cfgno);
|
||||
config->desc.bNumInterfaces = nintf = n;
|
||||
|
||||
/* Check for missing interface numbers */
|
||||
@@ -754,7 +754,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
break;
|
||||
}
|
||||
if (j >= nintf)
|
||||
dev_warn(ddev, "config %d has no interface number "
|
||||
dev_notice(ddev, "config %d has no interface number "
|
||||
"%d\n", cfgno, i);
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
for (i = 0; i < nintf; ++i) {
|
||||
j = nalts[i];
|
||||
if (j > USB_MAXALTSETTING) {
|
||||
dev_warn(ddev, "too many alternate settings for "
|
||||
dev_notice(ddev, "too many alternate settings for "
|
||||
"config %d interface %d: %d, "
|
||||
"using maximum allowed: %d\n",
|
||||
cfgno, inums[i], j, USB_MAXALTSETTING);
|
||||
@@ -811,7 +811,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
|
||||
break;
|
||||
}
|
||||
if (n >= intfc->num_altsetting)
|
||||
dev_warn(ddev, "config %d interface %d has no "
|
||||
dev_notice(ddev, "config %d interface %d has no "
|
||||
"altsetting %d\n", cfgno, inums[i], j);
|
||||
}
|
||||
}
|
||||
@@ -868,7 +868,7 @@ int usb_get_configuration(struct usb_device *dev)
|
||||
int result;
|
||||
|
||||
if (ncfg > USB_MAXCONFIG) {
|
||||
dev_warn(ddev, "too many configurations: %d, "
|
||||
dev_notice(ddev, "too many configurations: %d, "
|
||||
"using maximum allowed: %d\n", ncfg, USB_MAXCONFIG);
|
||||
dev->descriptor.bNumConfigurations = ncfg = USB_MAXCONFIG;
|
||||
}
|
||||
@@ -902,7 +902,7 @@ int usb_get_configuration(struct usb_device *dev)
|
||||
"descriptor/%s: %d\n", cfgno, "start", result);
|
||||
if (result != -EPIPE)
|
||||
goto err;
|
||||
dev_err(ddev, "chopping to %d config(s)\n", cfgno);
|
||||
dev_notice(ddev, "chopping to %d config(s)\n", cfgno);
|
||||
dev->descriptor.bNumConfigurations = cfgno;
|
||||
break;
|
||||
} else if (result < 4) {
|
||||
@@ -934,7 +934,7 @@ int usb_get_configuration(struct usb_device *dev)
|
||||
goto err;
|
||||
}
|
||||
if (result < length) {
|
||||
dev_warn(ddev, "config index %d descriptor too short "
|
||||
dev_notice(ddev, "config index %d descriptor too short "
|
||||
"(expected %i, got %i)\n", cfgno, length, result);
|
||||
length = result;
|
||||
}
|
||||
@@ -993,7 +993,7 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
||||
/* Get BOS descriptor */
|
||||
ret = usb_get_descriptor(dev, USB_DT_BOS, 0, bos, USB_DT_BOS_SIZE);
|
||||
if (ret < USB_DT_BOS_SIZE || bos->bLength < USB_DT_BOS_SIZE) {
|
||||
dev_err(ddev, "unable to get BOS descriptor or descriptor too short\n");
|
||||
dev_notice(ddev, "unable to get BOS descriptor or descriptor too short\n");
|
||||
if (ret >= 0)
|
||||
ret = -ENOMSG;
|
||||
kfree(bos);
|
||||
@@ -1021,7 +1021,7 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
||||
|
||||
ret = usb_get_descriptor(dev, USB_DT_BOS, 0, buffer, total_len);
|
||||
if (ret < total_len) {
|
||||
dev_err(ddev, "unable to get BOS descriptor set\n");
|
||||
dev_notice(ddev, "unable to get BOS descriptor set\n");
|
||||
if (ret >= 0)
|
||||
ret = -ENOMSG;
|
||||
goto err;
|
||||
@@ -1046,8 +1046,8 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
||||
}
|
||||
|
||||
if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) {
|
||||
dev_warn(ddev, "descriptor type invalid, skip\n");
|
||||
continue;
|
||||
dev_notice(ddev, "descriptor type invalid, skip\n");
|
||||
goto skip_to_next_descriptor;
|
||||
}
|
||||
|
||||
switch (cap_type) {
|
||||
@@ -1081,6 +1081,7 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
||||
break;
|
||||
}
|
||||
|
||||
skip_to_next_descriptor:
|
||||
total_len -= length;
|
||||
buffer += length;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ struct sti_rom_font {
|
||||
u8 height;
|
||||
u8 font_type; /* language type */
|
||||
u8 bytes_per_char;
|
||||
u32 next_font;
|
||||
s32 next_font; /* note: signed int */
|
||||
u8 underline_height;
|
||||
u8 underline_pos;
|
||||
u8 res008[2];
|
||||
|
||||
@@ -3204,6 +3204,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
|
||||
goto fail_alloc;
|
||||
}
|
||||
|
||||
btrfs_info(fs_info, "first mount of filesystem %pU", disk_super->fsid);
|
||||
/*
|
||||
* Verify the type first, if that or the checksum value are
|
||||
* corrupted, we'll find out
|
||||
|
||||
@@ -788,6 +788,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
|
||||
dump_ref_action(fs_info, ra);
|
||||
kfree(ref);
|
||||
kfree(ra);
|
||||
kfree(re);
|
||||
goto out_unlock;
|
||||
} else if (be->num_refs == 0) {
|
||||
btrfs_err(fs_info,
|
||||
@@ -797,6 +798,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
|
||||
dump_ref_action(fs_info, ra);
|
||||
kfree(ref);
|
||||
kfree(ra);
|
||||
kfree(re);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
|
||||
@@ -7576,7 +7576,7 @@ long btrfs_ioctl_send(struct file *mnt_file, struct btrfs_ioctl_send_args *arg)
|
||||
sctx->flags = arg->flags;
|
||||
|
||||
sctx->send_filp = fget(arg->send_fd);
|
||||
if (!sctx->send_filp) {
|
||||
if (!sctx->send_filp || !(sctx->send_filp->f_mode & FMODE_WRITE)) {
|
||||
ret = -EBADF;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -337,7 +337,10 @@ void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
|
||||
|
||||
static void btrfs_put_super(struct super_block *sb)
|
||||
{
|
||||
close_ctree(btrfs_sb(sb));
|
||||
struct btrfs_fs_info *fs_info = btrfs_sb(sb);
|
||||
|
||||
btrfs_info(fs_info, "last unmount of filesystem %pU", fs_info->fs_devices->fsid);
|
||||
close_ctree(fs_info);
|
||||
}
|
||||
|
||||
enum {
|
||||
|
||||
@@ -3064,15 +3064,16 @@ struct extent_map *btrfs_get_chunk_map(struct btrfs_fs_info *fs_info,
|
||||
read_unlock(&em_tree->lock);
|
||||
|
||||
if (!em) {
|
||||
btrfs_crit(fs_info, "unable to find logical %llu length %llu",
|
||||
btrfs_crit(fs_info,
|
||||
"unable to find chunk map for logical %llu length %llu",
|
||||
logical, length);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
if (em->start > logical || em->start + em->len < logical) {
|
||||
if (em->start > logical || em->start + em->len <= logical) {
|
||||
btrfs_crit(fs_info,
|
||||
"found a bad mapping, wanted %llu-%llu, found %llu-%llu",
|
||||
logical, length, em->start, em->start + em->len);
|
||||
"found a bad chunk map, wanted %llu-%llu, found %llu-%llu",
|
||||
logical, logical + length, em->start, em->start + em->len);
|
||||
free_extent_map(em);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
@@ -1127,6 +1127,7 @@ const struct inode_operations cifs_file_inode_ops = {
|
||||
|
||||
const struct inode_operations cifs_symlink_inode_ops = {
|
||||
.get_link = cifs_get_link,
|
||||
.setattr = cifs_setattr,
|
||||
.permission = cifs_permission,
|
||||
.listxattr = cifs_listxattr,
|
||||
};
|
||||
|
||||
@@ -150,10 +150,13 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
|
||||
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
|
||||
goto out;
|
||||
|
||||
if (pTcon->ses->server->ops->set_EA)
|
||||
if (pTcon->ses->server->ops->set_EA) {
|
||||
rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
|
||||
full_path, name, value, (__u16)size,
|
||||
cifs_sb->local_nls, cifs_sb);
|
||||
if (rc == 0)
|
||||
inode_set_ctime_current(inode);
|
||||
}
|
||||
break;
|
||||
|
||||
case XATTR_CIFS_ACL:
|
||||
|
||||
16
fs/inode.c
16
fs/inode.c
@@ -2335,6 +2335,22 @@ struct timespec64 current_time(struct inode *inode)
|
||||
}
|
||||
EXPORT_SYMBOL(current_time);
|
||||
|
||||
/**
|
||||
* inode_set_ctime_current - set the ctime to current_time
|
||||
* @inode: inode
|
||||
*
|
||||
* Set the inode->i_ctime to the current value for the inode. Returns
|
||||
* the current value that was assigned to i_ctime.
|
||||
*/
|
||||
struct timespec64 inode_set_ctime_current(struct inode *inode)
|
||||
{
|
||||
struct timespec64 now = current_time(inode);
|
||||
|
||||
inode_set_ctime(inode, now.tv_sec, now.tv_nsec);
|
||||
return now;
|
||||
}
|
||||
EXPORT_SYMBOL(inode_set_ctime_current);
|
||||
|
||||
/**
|
||||
* in_group_or_capable - check whether caller is CAP_FSETID privileged
|
||||
* @mnt_userns: user namespace of the mount @inode was found from
|
||||
|
||||
@@ -93,7 +93,6 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
|
||||
if (offset + ret > dio->i_size &&
|
||||
!(dio->flags & IOMAP_DIO_WRITE))
|
||||
ret = dio->i_size - offset;
|
||||
iocb->ki_pos += ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -119,18 +118,19 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
|
||||
}
|
||||
|
||||
inode_dio_end(file_inode(iocb->ki_filp));
|
||||
/*
|
||||
* If this is a DSYNC write, make sure we push it to stable storage now
|
||||
* that we've written data.
|
||||
*/
|
||||
if (ret > 0 && (dio->flags & IOMAP_DIO_NEED_SYNC))
|
||||
ret = generic_write_sync(iocb, ret);
|
||||
|
||||
if (ret > 0)
|
||||
ret += dio->done_before;
|
||||
if (ret > 0) {
|
||||
iocb->ki_pos += ret;
|
||||
|
||||
/*
|
||||
* If this is a DSYNC write, make sure we push it to stable
|
||||
* storage now that we've written data.
|
||||
*/
|
||||
if (dio->flags & IOMAP_DIO_NEED_SYNC)
|
||||
ret = generic_write_sync(iocb, ret);
|
||||
if (ret > 0)
|
||||
ret += dio->done_before;
|
||||
}
|
||||
kfree(dio);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iomap_dio_complete);
|
||||
|
||||
@@ -1761,7 +1761,50 @@ static inline bool fsuidgid_has_mapping(struct super_block *sb,
|
||||
kgid_has_mapping(fs_userns, kgid);
|
||||
}
|
||||
|
||||
extern struct timespec64 current_time(struct inode *inode);
|
||||
struct timespec64 current_time(struct inode *inode);
|
||||
struct timespec64 inode_set_ctime_current(struct inode *inode);
|
||||
|
||||
/**
|
||||
* inode_get_ctime - fetch the current ctime from the inode
|
||||
* @inode: inode from which to fetch ctime
|
||||
*
|
||||
* Grab the current ctime from the inode and return it.
|
||||
*/
|
||||
static inline struct timespec64 inode_get_ctime(const struct inode *inode)
|
||||
{
|
||||
return inode->i_ctime;
|
||||
}
|
||||
|
||||
/**
|
||||
* inode_set_ctime_to_ts - set the ctime in the inode
|
||||
* @inode: inode in which to set the ctime
|
||||
* @ts: value to set in the ctime field
|
||||
*
|
||||
* Set the ctime in @inode to @ts
|
||||
*/
|
||||
static inline struct timespec64 inode_set_ctime_to_ts(struct inode *inode,
|
||||
struct timespec64 ts)
|
||||
{
|
||||
inode->i_ctime = ts;
|
||||
return ts;
|
||||
}
|
||||
|
||||
/**
|
||||
* inode_set_ctime - set the ctime in the inode
|
||||
* @inode: inode in which to set the ctime
|
||||
* @sec: tv_sec value to set
|
||||
* @nsec: tv_nsec value to set
|
||||
*
|
||||
* Set the ctime in @inode to { @sec, @nsec }
|
||||
*/
|
||||
static inline struct timespec64 inode_set_ctime(struct inode *inode,
|
||||
time64_t sec, long nsec)
|
||||
{
|
||||
struct timespec64 ts = { .tv_sec = sec,
|
||||
.tv_nsec = nsec };
|
||||
|
||||
return inode_set_ctime_to_ts(inode, ts);
|
||||
}
|
||||
|
||||
/*
|
||||
* Snapshotting support.
|
||||
|
||||
@@ -460,6 +460,7 @@ struct mmc_host {
|
||||
unsigned int retune_paused:1; /* re-tuning is temporarily disabled */
|
||||
unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */
|
||||
unsigned int can_dma_map_merge:1; /* merging can be used */
|
||||
unsigned int vqmmc_enabled:1; /* vqmmc regulator is enabled */
|
||||
|
||||
int rescan_disable; /* disable card detection */
|
||||
int rescan_entered; /* used with nonremovable devices */
|
||||
@@ -613,6 +614,8 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc,
|
||||
#endif
|
||||
|
||||
int mmc_regulator_get_supply(struct mmc_host *mmc);
|
||||
int mmc_regulator_enable_vqmmc(struct mmc_host *mmc);
|
||||
void mmc_regulator_disable_vqmmc(struct mmc_host *mmc);
|
||||
|
||||
static inline int mmc_card_is_removable(struct mmc_host *host)
|
||||
{
|
||||
|
||||
65
include/linux/platform_data/x86/soc.h
Normal file
65
include/linux/platform_data/x86/soc.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Helpers for Intel SoC model detection
|
||||
*
|
||||
* Copyright (c) 2019, Intel Corporation.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_DATA_X86_SOC_H
|
||||
#define __PLATFORM_DATA_X86_SOC_H
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86)
|
||||
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/intel-family.h>
|
||||
|
||||
#define SOC_INTEL_IS_CPU(soc, type) \
|
||||
static inline bool soc_intel_is_##soc(void) \
|
||||
{ \
|
||||
static const struct x86_cpu_id soc##_cpu_ids[] = { \
|
||||
X86_MATCH_INTEL_FAM6_MODEL(type, NULL), \
|
||||
{} \
|
||||
}; \
|
||||
const struct x86_cpu_id *id; \
|
||||
\
|
||||
id = x86_match_cpu(soc##_cpu_ids); \
|
||||
if (id) \
|
||||
return true; \
|
||||
return false; \
|
||||
}
|
||||
|
||||
SOC_INTEL_IS_CPU(byt, ATOM_SILVERMONT);
|
||||
SOC_INTEL_IS_CPU(cht, ATOM_AIRMONT);
|
||||
SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT);
|
||||
SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);
|
||||
SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
|
||||
|
||||
#else /* IS_ENABLED(CONFIG_X86) */
|
||||
|
||||
static inline bool soc_intel_is_byt(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_cht(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_apl(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_glk(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_cml(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* IS_ENABLED(CONFIG_X86) */
|
||||
|
||||
#endif /* __PLATFORM_DATA_X86_SOC_H */
|
||||
@@ -460,6 +460,7 @@ extern int schedule_on_each_cpu(work_func_t func);
|
||||
int execute_in_process_context(work_func_t fn, struct execute_work *);
|
||||
|
||||
extern bool flush_work(struct work_struct *work);
|
||||
extern bool cancel_work(struct work_struct *work);
|
||||
extern bool cancel_work_sync(struct work_struct *work);
|
||||
|
||||
extern bool flush_delayed_work(struct delayed_work *dwork);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
union { \
|
||||
struct { MEMBERS } ATTRS; \
|
||||
struct TAG { MEMBERS } ATTRS NAME; \
|
||||
}
|
||||
} ATTRS
|
||||
|
||||
/**
|
||||
* __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
|
||||
|
||||
@@ -458,7 +458,7 @@ static bool rcu_preempt_has_tasks(struct rcu_node *rnp)
|
||||
* be quite short, for example, in the case of the call from
|
||||
* rcu_read_unlock_special().
|
||||
*/
|
||||
static void
|
||||
static notrace void
|
||||
rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
|
||||
{
|
||||
bool empty_exp;
|
||||
@@ -578,7 +578,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
|
||||
* is disabled. This function cannot be expected to understand these
|
||||
* nuances, so the caller must handle them.
|
||||
*/
|
||||
static bool rcu_preempt_need_deferred_qs(struct task_struct *t)
|
||||
static notrace bool rcu_preempt_need_deferred_qs(struct task_struct *t)
|
||||
{
|
||||
return (__this_cpu_read(rcu_data.exp_deferred_qs) ||
|
||||
READ_ONCE(t->rcu_read_unlock_special.s)) &&
|
||||
@@ -592,7 +592,7 @@ static bool rcu_preempt_need_deferred_qs(struct task_struct *t)
|
||||
* evaluate safety in terms of interrupt, softirq, and preemption
|
||||
* disabling.
|
||||
*/
|
||||
static void rcu_preempt_deferred_qs(struct task_struct *t)
|
||||
static notrace void rcu_preempt_deferred_qs(struct task_struct *t)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -923,7 +923,7 @@ static bool rcu_preempt_has_tasks(struct rcu_node *rnp)
|
||||
* Because there is no preemptible RCU, there can be no deferred quiescent
|
||||
* states.
|
||||
*/
|
||||
static bool rcu_preempt_need_deferred_qs(struct task_struct *t)
|
||||
static notrace bool rcu_preempt_need_deferred_qs(struct task_struct *t)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3284,6 +3284,15 @@ static bool __cancel_work(struct work_struct *work, bool is_dwork)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* See cancel_delayed_work()
|
||||
*/
|
||||
bool cancel_work(struct work_struct *work)
|
||||
{
|
||||
return __cancel_work(work, false);
|
||||
}
|
||||
EXPORT_SYMBOL(cancel_work);
|
||||
|
||||
/**
|
||||
* cancel_delayed_work - cancel a delayed work
|
||||
* @dwork: delayed_work to cancel
|
||||
|
||||
@@ -111,9 +111,6 @@ static const char *names_0[] = {
|
||||
E(ENOSPC),
|
||||
E(ENOSR),
|
||||
E(ENOSTR),
|
||||
#ifdef ENOSYM
|
||||
E(ENOSYM),
|
||||
#endif
|
||||
E(ENOSYS),
|
||||
E(ENOTBLK),
|
||||
E(ENOTCONN),
|
||||
@@ -144,9 +141,6 @@ static const char *names_0[] = {
|
||||
#endif
|
||||
E(EREMOTE),
|
||||
E(EREMOTEIO),
|
||||
#ifdef EREMOTERELEASE
|
||||
E(EREMOTERELEASE),
|
||||
#endif
|
||||
E(ERESTART),
|
||||
E(ERFKILL),
|
||||
E(EROFS),
|
||||
|
||||
@@ -129,6 +129,7 @@ void vlan_dev_set_ingress_priority(const struct net_device *dev,
|
||||
u32 skb_prio, u16 vlan_prio);
|
||||
int vlan_dev_set_egress_priority(const struct net_device *dev,
|
||||
u32 skb_prio, u16 vlan_prio);
|
||||
void vlan_dev_free_egress_priority(const struct net_device *dev);
|
||||
int vlan_dev_change_flags(const struct net_device *dev, u32 flag, u32 mask);
|
||||
void vlan_dev_get_realdev_name(const struct net_device *dev, char *result,
|
||||
size_t size);
|
||||
@@ -139,7 +140,6 @@ int vlan_check_real_dev(struct net_device *real_dev,
|
||||
void vlan_setup(struct net_device *dev);
|
||||
int register_vlan_dev(struct net_device *dev, struct netlink_ext_ack *extack);
|
||||
void unregister_vlan_dev(struct net_device *dev, struct list_head *head);
|
||||
void vlan_dev_uninit(struct net_device *dev);
|
||||
bool vlan_dev_inherit_address(struct net_device *dev,
|
||||
struct net_device *real_dev);
|
||||
|
||||
|
||||
@@ -622,7 +622,7 @@ static int vlan_dev_init(struct net_device *dev)
|
||||
}
|
||||
|
||||
/* Note: this function might be called multiple times for the same device. */
|
||||
void vlan_dev_uninit(struct net_device *dev)
|
||||
void vlan_dev_free_egress_priority(const struct net_device *dev)
|
||||
{
|
||||
struct vlan_priority_tci_mapping *pm;
|
||||
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
|
||||
@@ -636,6 +636,16 @@ void vlan_dev_uninit(struct net_device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
static void vlan_dev_uninit(struct net_device *dev)
|
||||
{
|
||||
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
|
||||
|
||||
vlan_dev_free_egress_priority(dev);
|
||||
|
||||
/* Get rid of the vlan's reference to real_dev */
|
||||
dev_put(vlan->real_dev);
|
||||
}
|
||||
|
||||
static netdev_features_t vlan_dev_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
@@ -846,9 +856,6 @@ static void vlan_dev_free(struct net_device *dev)
|
||||
|
||||
free_percpu(vlan->vlan_pcpu_stats);
|
||||
vlan->vlan_pcpu_stats = NULL;
|
||||
|
||||
/* Get rid of the vlan's reference to real_dev */
|
||||
dev_put(vlan->real_dev);
|
||||
}
|
||||
|
||||
void vlan_setup(struct net_device *dev)
|
||||
|
||||
@@ -183,10 +183,11 @@ static int vlan_newlink(struct net *src_net, struct net_device *dev,
|
||||
return -EINVAL;
|
||||
|
||||
err = vlan_changelink(dev, tb, data, extack);
|
||||
if (!err)
|
||||
err = register_vlan_dev(dev, extack);
|
||||
if (err)
|
||||
vlan_dev_uninit(dev);
|
||||
return err;
|
||||
err = register_vlan_dev(dev, extack);
|
||||
if (err)
|
||||
vlan_dev_free_egress_priority(dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,8 +216,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay)
|
||||
int tv = prandom_u32() % max_delay;
|
||||
|
||||
im->tm_running = 1;
|
||||
if (!mod_timer(&im->timer, jiffies+tv+2))
|
||||
refcount_inc(&im->refcnt);
|
||||
if (refcount_inc_not_zero(&im->refcnt)) {
|
||||
if (mod_timer(&im->timer, jiffies + tv + 2))
|
||||
ip_ma_put(im);
|
||||
}
|
||||
}
|
||||
|
||||
static void igmp_gq_start_timer(struct in_device *in_dev)
|
||||
|
||||
@@ -2210,6 +2210,8 @@ static const struct snd_pci_quirk power_save_denylist[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
|
||||
/* https://bugs.launchpad.net/bugs/1821663 */
|
||||
SND_PCI_QUIRK(0x1631, 0xe017, "Packard Bell NEC IMEDIA 5204", 0),
|
||||
/* KONTRON SinglePC may cause a stall at runtime resume */
|
||||
SND_PCI_QUIRK(0x1734, 0x1232, "KONTRON SinglePC", 0),
|
||||
{}
|
||||
};
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -1980,6 +1980,7 @@ enum {
|
||||
ALC887_FIXUP_ASUS_AUDIO,
|
||||
ALC887_FIXUP_ASUS_HMIC,
|
||||
ALCS1200A_FIXUP_MIC_VREF,
|
||||
ALC888VD_FIXUP_MIC_100VREF,
|
||||
};
|
||||
|
||||
static void alc889_fixup_coef(struct hda_codec *codec,
|
||||
@@ -2533,6 +2534,13 @@ static const struct hda_fixup alc882_fixups[] = {
|
||||
{}
|
||||
}
|
||||
},
|
||||
[ALC888VD_FIXUP_MIC_100VREF] = {
|
||||
.type = HDA_FIXUP_PINCTLS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
{ 0x18, PIN_VREF100 }, /* headset mic */
|
||||
{}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
@@ -2602,6 +2610,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
|
||||
|
||||
SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x10ec, 0x12d8, "iBase Elo Touch", ALC888VD_FIXUP_MIC_100VREF),
|
||||
SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
|
||||
@@ -3249,6 +3258,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x10ec0257:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x48, 0x0);
|
||||
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
|
||||
@@ -3278,6 +3288,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
|
||||
case 0x10ec0230:
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0256:
|
||||
case 0x10ec0257:
|
||||
case 0x19e58326:
|
||||
alc_write_coef_idx(codec, 0x48, 0xd011);
|
||||
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
|
||||
@@ -6472,6 +6483,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
|
||||
case 0x10ec0236:
|
||||
case 0x10ec0255:
|
||||
case 0x10ec0256:
|
||||
case 0x10ec0257:
|
||||
case 0x19e58326:
|
||||
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
|
||||
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
|
||||
|
||||
@@ -9,34 +9,13 @@
|
||||
#ifndef _SND_SOC_INTEL_QUIRKS_H
|
||||
#define _SND_SOC_INTEL_QUIRKS_H
|
||||
|
||||
#include <linux/platform_data/x86/soc.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86)
|
||||
|
||||
#include <linux/dmi.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/intel-family.h>
|
||||
#include <asm/iosf_mbi.h>
|
||||
|
||||
#define SOC_INTEL_IS_CPU(soc, type) \
|
||||
static inline bool soc_intel_is_##soc(void) \
|
||||
{ \
|
||||
static const struct x86_cpu_id soc##_cpu_ids[] = { \
|
||||
X86_MATCH_INTEL_FAM6_MODEL(type, NULL), \
|
||||
{} \
|
||||
}; \
|
||||
const struct x86_cpu_id *id; \
|
||||
\
|
||||
id = x86_match_cpu(soc##_cpu_ids); \
|
||||
if (id) \
|
||||
return true; \
|
||||
return false; \
|
||||
}
|
||||
|
||||
SOC_INTEL_IS_CPU(byt, ATOM_SILVERMONT);
|
||||
SOC_INTEL_IS_CPU(cht, ATOM_AIRMONT);
|
||||
SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT);
|
||||
SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);
|
||||
SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
|
||||
|
||||
static inline bool soc_intel_is_byt_cr(struct platform_device *pdev)
|
||||
{
|
||||
/*
|
||||
@@ -114,30 +93,6 @@ static inline bool soc_intel_is_byt_cr(struct platform_device *pdev)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_byt(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_cht(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_apl(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_glk(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool soc_intel_is_cml(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SND_SOC_INTEL_QUIRKS_H */
|
||||
#endif /* _SND_SOC_INTEL_QUIRKS_H */
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/platform_data/x86/soc.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <sound/soc-acpi.h>
|
||||
#include <sound/soc-acpi-intel-match.h>
|
||||
@@ -27,17 +28,22 @@ static char *tplg_path;
|
||||
module_param(tplg_path, charp, 0444);
|
||||
MODULE_PARM_DESC(tplg_path, "alternate path for SOF topology.");
|
||||
|
||||
static char *tplg_filename;
|
||||
module_param(tplg_filename, charp, 0444);
|
||||
MODULE_PARM_DESC(tplg_filename, "alternate filename for SOF topology.");
|
||||
|
||||
static int sof_pci_debug;
|
||||
module_param_named(sof_pci_debug, sof_pci_debug, int, 0444);
|
||||
MODULE_PARM_DESC(sof_pci_debug, "SOF PCI debug options (0x0 all off)");
|
||||
|
||||
static const char *sof_override_tplg_name;
|
||||
static const char *sof_dmi_override_tplg_name;
|
||||
static bool sof_dmi_use_community_key;
|
||||
|
||||
#define SOF_PCI_DISABLE_PM_RUNTIME BIT(0)
|
||||
|
||||
static int sof_tplg_cb(const struct dmi_system_id *id)
|
||||
{
|
||||
sof_override_tplg_name = id->driver_data;
|
||||
sof_dmi_override_tplg_name = id->driver_data;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -62,27 +68,46 @@ static const struct dmi_system_id sof_tplg_table[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
/* all Up boards use the community key */
|
||||
static int up_use_community_key(const struct dmi_system_id *id)
|
||||
{
|
||||
sof_dmi_use_community_key = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* For ApolloLake Chromebooks we want to force the use of the Intel production key.
|
||||
* All newer platforms use the community key
|
||||
*/
|
||||
static int chromebook_use_community_key(const struct dmi_system_id *id)
|
||||
{
|
||||
if (!soc_intel_is_apl())
|
||||
sof_dmi_use_community_key = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const struct dmi_system_id community_key_platforms[] = {
|
||||
{
|
||||
.ident = "Up Squared",
|
||||
.ident = "Up boards",
|
||||
.callback = up_use_community_key,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "AAEON"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "UP-APL01"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "Up Extreme",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "AAEON"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "UP-WHL01"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "Google Chromebooks",
|
||||
.callback = chromebook_use_community_key,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "Google"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "Google firmware",
|
||||
.callback = chromebook_use_community_key,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BIOS_VERSION, "Google"),
|
||||
}
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -171,7 +196,7 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
"Module parameter used, changed fw path to %s\n",
|
||||
sof_pdata->fw_filename_prefix);
|
||||
|
||||
} else if (dmi_check_system(community_key_platforms)) {
|
||||
} else if (dmi_check_system(community_key_platforms) && sof_dmi_use_community_key) {
|
||||
sof_pdata->fw_filename_prefix =
|
||||
devm_kasprintf(dev, GFP_KERNEL, "%s/%s",
|
||||
sof_pdata->desc->default_fw_path,
|
||||
@@ -191,9 +216,20 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
sof_pdata->tplg_filename_prefix =
|
||||
sof_pdata->desc->default_tplg_path;
|
||||
|
||||
dmi_check_system(sof_tplg_table);
|
||||
if (sof_override_tplg_name)
|
||||
sof_pdata->tplg_filename = sof_override_tplg_name;
|
||||
/*
|
||||
* the topology filename will be provided in the machine descriptor, unless
|
||||
* it is overridden by a module parameter or DMI quirk.
|
||||
*/
|
||||
if (tplg_filename) {
|
||||
sof_pdata->tplg_filename = tplg_filename;
|
||||
|
||||
dev_dbg(dev, "Module parameter used, changed tplg filename to %s\n",
|
||||
sof_pdata->tplg_filename);
|
||||
} else {
|
||||
dmi_check_system(sof_tplg_table);
|
||||
if (sof_dmi_override_tplg_name)
|
||||
sof_pdata->tplg_filename = sof_dmi_override_tplg_name;
|
||||
}
|
||||
|
||||
/* set callback to be called on successful device probe to enable runtime_pm */
|
||||
sof_pdata->sof_probe_complete = sof_pci_probe_complete;
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
|
||||
/* We now return you to your regularly scheduled HPUX. */
|
||||
|
||||
#define ENOSYM 215 /* symbol does not exist in executable */
|
||||
#define ENOTSOCK 216 /* Socket operation on non-socket */
|
||||
#define EDESTADDRREQ 217 /* Destination address required */
|
||||
#define EMSGSIZE 218 /* Message too long */
|
||||
@@ -101,7 +100,6 @@
|
||||
#define ETIMEDOUT 238 /* Connection timed out */
|
||||
#define ECONNREFUSED 239 /* Connection refused */
|
||||
#define EREFUSED ECONNREFUSED /* for HP's NFS apparently */
|
||||
#define EREMOTERELEASE 240 /* Remote peer released connection */
|
||||
#define EHOSTDOWN 241 /* Host is down */
|
||||
#define EHOSTUNREACH 242 /* No route to host */
|
||||
|
||||
|
||||
@@ -1346,9 +1346,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq)
|
||||
} else if (ptq->state->flags & INTEL_PT_ASYNC) {
|
||||
if (!ptq->state->to_ip)
|
||||
ptq->flags = PERF_IP_FLAG_BRANCH |
|
||||
PERF_IP_FLAG_ASYNC |
|
||||
PERF_IP_FLAG_TRACE_END;
|
||||
else if (ptq->state->from_nr && !ptq->state->to_nr)
|
||||
ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
|
||||
PERF_IP_FLAG_ASYNC |
|
||||
PERF_IP_FLAG_VMEXIT;
|
||||
else
|
||||
ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
|
||||
|
||||
@@ -2278,7 +2278,7 @@ static int check_results(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
unsigned int nr_process = 1;
|
||||
long nr_process = 1;
|
||||
int route_sock = -1, ret = KSFT_SKIP;
|
||||
int test_desc_fd[2];
|
||||
uint32_t route_seq;
|
||||
@@ -2299,7 +2299,7 @@ int main(int argc, char **argv)
|
||||
exit_usage(argv);
|
||||
}
|
||||
|
||||
if (nr_process > MAX_PROCESSES || !nr_process) {
|
||||
if (nr_process > MAX_PROCESSES || nr_process < 1) {
|
||||
printk("nr_process should be between [1; %u]",
|
||||
MAX_PROCESSES);
|
||||
exit_usage(argv);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
CFLAGS = -g -Wall -O2 -D_FORTIFY_SOURCE=2
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
CFLAGS = -g -Wall -O2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
|
||||
CFLAGS += $(KHDR_INCLUDES)
|
||||
|
||||
TEST_GEN_PROGS := resctrl_tests
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#define _GNU_SOURCE
|
||||
#ifndef RESCTRL_H
|
||||
#define RESCTRL_H
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user