This is the 5.10.177 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmQtPjAACgkQONu9yGCS aT4xmRAAvwO3WPc76Yo+6GQRbtKotLTPDz5njffcHeQwDnsdjMKwHnn9lH9Xt44v YdBtRtKql9MUSR9voqx+nXX25g7m5yemLEam5BNRInGZ2jyKNXXc/5VmQvQukbFc DWlM3wuzeGSJ8nWit6fWGvi4xNcQPjcVyyuhba27YMAU2qz4dgOOccnDXoVA3goz 5VqsZkw6UHKQRTzVs/ygJ2Ke4YldPB3QV4TBvpJFgJVQRm0f/vigKlaUgvOoawDc +iulDe2tvQNn2nQakP7KNzRntfY75iuJs+eexyfkxhTdAPtwRuZrztZpA5sL+c1N MYSZk3Gldz05EsAc9FKwLy+CP2L7yCNpdQso8r7cXPlO8J4MLbpuTBzCbM26CaCH IJigHCya38mgQX2VfpWxegNgft2D9WoIMdjMtQG8AqNEynG86PBBD48MHP1eNC8X CnBSVt+Ho31FMwfrzT1en2ExbEbZXsKNHdY8077iiCO+/Zc+aea7BXzEAiL0Ui1z 6Qo0zLTG9Wmhwl3Q6R2iShf7zJIM0kpGJ+5qjpE1qhihFFRIe4aYuhrDRH4F01ec XJFxBr94brfgCp9F/XnFLOQ2SqXGn5C3pJiu6UymcTF9XJUT9llNNt4v6Xbnp/8Y YsDF16Fm0mpperbG0m9LBtUP4zmA1soZtNC4EEI3YsXVe9x6uEA= =ArYR -----END PGP SIGNATURE----- Merge 5.10.177 into android12-5.10-lts Changes in 5.10.177 interconnect: qcom: osm-l3: fix icc_onecell_data allocation perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output perf: fix perf_event_context->time ipmi:ssif: make ssif_i2c_send() void ipmi:ssif: Increase the message retry time ipmi:ssif: resend_msg() cannot fail ipmi:ssif: Add a timer between request retries KVM: Clean up benign vcpu->cpu data races when kicking vCPUs KVM: KVM: Use cpumask_available() to check for NULL cpumask when kicking vCPUs KVM: Optimize kvm_make_vcpus_request_mask() a bit KVM: Pre-allocate cpumasks for kvm_make_all_cpus_request_except() KVM: Register /dev/kvm as the _very_ last thing during initialization serial: fsl_lpuart: Fix comment typo tty: serial: fsl_lpuart: fix race on RX DMA shutdown serial: 8250: SERIAL_8250_ASPEED_VUART should depend on ARCH_ASPEED serial: 8250: ASPEED_VUART: select REGMAP instead of depending on it drm/sun4i: fix missing component unbind on bind errors net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf() power: supply: bq24190_charger: using pm_runtime_resume_and_get instead of pm_runtime_get_sync power: supply: bq24190: Fix use after free bug in bq24190_remove due to race condition power: supply: da9150: Fix use after free bug in da9150_charger_remove due to race condition ARM: dts: imx6sll: e60k02: fix usbotg1 pinctrl ARM: dts: imx6sl: tolino-shine2hd: fix usbotg1 pinctrl xsk: Add missing overflow check in xdp_umem_reg iavf: fix inverted Rx hash condition leading to disabled hash iavf: fix non-tunneled IPv6 UDP packet type and hashing intel/igbvf: free irq on the error path in igbvf_request_msix() igbvf: Regard vf reset nack as success igc: fix the validation logic for taprio's gate list i2c: imx-lpi2c: check only for enabled interrupt flags scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate() net: usb: smsc95xx: Limit packet length to skb->len qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info xirc2ps_cs: Fix use after free bug in xirc2ps_detach net: phy: Ensure state transitions are processed from phy_stop() net: mdio: fix owner field for mdio buses registered using device-tree net: qcom/emac: Fix use after free bug in emac_remove due to race condition net/ps3_gelic_net: Fix RX sk_buff length net/ps3_gelic_net: Use dma_mapping_error bootconfig: Fix testcase to increase max node keys: Do not cache key in task struct if key is requested from kernel thread bpf: Adjust insufficient default bpf_jit_limit net/mlx5: Fix steering rules cleanup net/mlx5: Read the TC mapping of all priorities on ETS query net/mlx5: E-Switch, Fix an Oops in error handling code atm: idt77252: fix kmemleak when rmmod idt77252 erspan: do not use skb_mac_header() in ndo_start_xmit() net/sonic: use dma_mapping_error() for error check nvme-tcp: fix nvme_tcp_term_pdu to match spec gve: Cache link_speed value from device net: mdio: thunder: Add missing fwnode_handle_put() Bluetooth: btqcomsmd: Fix command timeout after setting BD address Bluetooth: L2CAP: Fix not checking for maximum number of DCID Bluetooth: L2CAP: Fix responding with wrong PDU type Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl hwmon: fix potential sensor registration fail if of_node is missing hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs scsi: qla2xxx: Perform lockless command completion in abort path uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 thunderbolt: Use scale field when allocating USB3 bandwidth thunderbolt: Use const qualifier for `ring_interrupt_index` riscv: Bump COMMAND_LINE_SIZE value to 1024 HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded ca8210: fix mac_len negative array access m68k: Only force 030 bus error if PC not in exception table selftests/bpf: check that modifier resolves after pointer scsi: target: iscsi: Fix an error message in iscsi_check_key() scsi: hisi_sas: Check devm_add_action() return value scsi: ufs: core: Add soft dependency on governor_simpleondemand scsi: lpfc: Avoid usage of list iterator variable after loop scsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990 net: usb: qmi_wwan: add Telit 0x1080 composition sh: sanitize the flags on sigreturn cifs: empty interface list when server doesn't support query interfaces scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR usb: dwc2: fix a devres leak in hw_enable upon suspend resume usb: gadget: u_audio: don't let userspace block driver unbind fsverity: Remove WQ_UNBOUND from fsverity read workqueue igb: revert rtnl_lock() that causes deadlock dm thin: fix deadlock when swapping to thin device usb: cdns3: Fix issue with using incorrect PCI device function usb: chipdea: core: fix return -EINVAL if request role is the same with current role usb: chipidea: core: fix possible concurrent when switch role usb: ucsi: Fix NULL pointer deref in ucsi_connector_change() wifi: mac80211: fix qos on mesh interfaces nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy() drm/i915/active: Fix missing debug object activation drm/i915: Preserve crtc_state->inherited during state clearing tee: amdtee: fix race condition in amdtee_open_session firmware: arm_scmi: Fix device node validation for mailbox transport i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer() dm stats: check for and propagate alloc_percpu failure dm crypt: add cond_resched() to dmcrypt_write() sched/fair: sanitize vruntime of entity being placed sched/fair: Sanitize vruntime of entity being migrated ocfs2: fix data corruption after failed write xfs: shut down the filesystem if we screw up quota reservation xfs: don't reuse busy extents on extent trim KVM: fix memoryleak in kvm_init() NFSD: fix use-after-free in __nfs42_ssc_open() usb: dwc3: gadget: move cmd_endtransfer to extra function usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC kernel: kcsan: kcsan_test: build without structleak plugin kcsan: avoid passing -g for test drm/meson: Fix error handling when afbcd.ops->init fails drm/meson: fix missing component unbind on bind errors bus: imx-weim: fix branch condition evaluates to a garbage value dm crypt: avoid accessing uninitialized tasklet fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY md: avoid signed overflow in slot_store() net: hsr: Don't log netdev_err message on unknown prp dst node ALSA: asihpi: check pao in control_message() ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set() fbdev: tgafb: Fix potential divide by zero sched_getaffinity: don't assume 'cpumask_size()' is fully initialized fbdev: nvidia: Fix potential divide by zero fbdev: intelfb: Fix potential divide by zero fbdev: lxfb: Fix potential divide by zero fbdev: au1200fb: Fix potential divide by zero tools/power turbostat: Fix /dev/cpu_dma_latency warnings tracing: Fix wrong return in kprobe_event_gen_test.c ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx() mips: bmips: BCM6358: disable RAC flush for TP1 mtd: rawnand: meson: invalidate cache on polling ECC bit sfc: ef10: don't overwrite offload features at NIC reset scsi: megaraid_sas: Fix crash after a double completion ptp_qoriq: fix memory leak in probe() r8169: fix RTL8168H and RTL8107E rx crc error regulator: Handle deferred clk net/net_failover: fix txq exceeding warning net: stmmac: don't reject VLANs when IFF_PROMISC is set can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write s390/vfio-ap: fix memory leak in vfio_ap device driver ALSA: ymfpci: Fix assignment in if condition ALSA: ymfpci: Fix BUG_ON in probe function net: ipa: compute DMA pool size properly i40e: fix registers dump after run ethtool adapter self test bnxt_en: Fix typo in PCI id to device description string mapping bnxt_en: Add missing 200G link speed reporting net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only pinctrl: ocelot: Fix alt mode for ocelot Input: alps - fix compatibility with -funsigned-char Input: focaltech - use explicitly signed char type cifs: prevent infinite recursion in CIFSGetDFSRefer() cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table btrfs: fix race between quota disable and quota assign ioctls xen/netback: don't do grant copy across page boundary net: phy: dp83869: fix default value for tx-/rx-internal-delay pinctrl: amd: Disable and mask interrupts on resume pinctrl: at91-pio4: fix domain name assignment powerpc: Don't try to copy PPR for task with NULL pt_regs NFSv4: Fix hangs when recovering open state after a server reboot ALSA: hda/conexant: Partial revert of a quirk for Lenovo ALSA: usb-audio: Fix regression on detection of Roland VS-100 ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z xtensa: fix KASAN report for show_stack rcu: Fix rcu_torture_read ftrace event drm/etnaviv: fix reference leak when mmaping imported buffer drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub s390/uaccess: add missing earlyclobber annotations to __clear_user() btrfs: scan device in non-exclusive mode zonefs: Fix error message in zonefs_file_dio_append() selftests/bpf: Test btf dump for struct with padding only fields libbpf: Fix BTF-to-C converter's padding logic selftests/bpf: Add few corner cases to test padding handling of btf_dump libbpf: Fix btf_dump's packed struct determination ext4: fix kernel BUG in 'ext4_write_inline_data_end()' gfs2: Always check inode size of inline inodes hsr: ratelimit only when errors are printed Linux 5.10.177 Change-Id: Ib596b399350d080d7e94c80c1a6bb3c64e971187 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
f3670bd0ff
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 176
|
||||
SUBLEVEL = 177
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
@ -296,6 +296,7 @@ &usdhc3 {
|
||||
|
||||
&usbotg1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbotg1>;
|
||||
disable-over-current;
|
||||
srp-disable;
|
||||
hnp-disable;
|
||||
|
@ -580,6 +580,7 @@ &usdhc3 {
|
||||
|
||||
&usbotg1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbotg1>;
|
||||
disable-over-current;
|
||||
srp-disable;
|
||||
hnp-disable;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/extable.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/fpu.h>
|
||||
@ -549,7 +550,8 @@ static inline void bus_error030 (struct frame *fp)
|
||||
errorcode |= 2;
|
||||
|
||||
if (mmusr & (MMU_I | MMU_WP)) {
|
||||
if (ssw & 4) {
|
||||
/* We might have an exception table for this PC */
|
||||
if (ssw & 4 && !search_exception_tables(fp->ptregs.pc)) {
|
||||
pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",
|
||||
ssw & RW ? "read" : "write",
|
||||
fp->un.fmtb.daddr,
|
||||
|
@ -64,6 +64,8 @@ phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
|
||||
return dma_addr;
|
||||
}
|
||||
|
||||
bool bmips_rac_flush_disable;
|
||||
|
||||
void arch_sync_dma_for_cpu_all(void)
|
||||
{
|
||||
void __iomem *cbr = BMIPS_GET_CBR();
|
||||
@ -74,6 +76,9 @@ void arch_sync_dma_for_cpu_all(void)
|
||||
boot_cpu_type() != CPU_BMIPS4380)
|
||||
return;
|
||||
|
||||
if (unlikely(bmips_rac_flush_disable))
|
||||
return;
|
||||
|
||||
/* Flush stale data out of the readahead cache */
|
||||
cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
|
||||
|
@ -34,6 +34,8 @@
|
||||
#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
|
||||
#define BCM6328_TP1_DISABLED BIT(9)
|
||||
|
||||
extern bool bmips_rac_flush_disable;
|
||||
|
||||
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
|
||||
|
||||
struct bmips_quirk {
|
||||
@ -103,6 +105,12 @@ static void bcm6358_quirks(void)
|
||||
* disable SMP for now
|
||||
*/
|
||||
bmips_smp_enabled = 0;
|
||||
|
||||
/*
|
||||
* RAC flush causes kernel panics on BCM6358 when booting from TP1
|
||||
* because the bootloader is not initializing it properly.
|
||||
*/
|
||||
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31));
|
||||
}
|
||||
|
||||
static void bcm6368_quirks(void)
|
||||
|
@ -298,6 +298,9 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset,
|
||||
static int ppr_get(struct task_struct *target, const struct user_regset *regset,
|
||||
struct membuf to)
|
||||
{
|
||||
if (!target->thread.regs)
|
||||
return -EINVAL;
|
||||
|
||||
return membuf_write(&to, &target->thread.regs->ppr, sizeof(u64));
|
||||
}
|
||||
|
||||
@ -305,6 +308,9 @@ static int ppr_set(struct task_struct *target, const struct user_regset *regset,
|
||||
unsigned int pos, unsigned int count, const void *kbuf,
|
||||
const void __user *ubuf)
|
||||
{
|
||||
if (!target->thread.regs)
|
||||
return -EINVAL;
|
||||
|
||||
return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
|
||||
&target->thread.regs->ppr, 0, sizeof(u64));
|
||||
}
|
||||
|
8
arch/riscv/include/uapi/asm/setup.h
Normal file
8
arch/riscv/include/uapi/asm/setup.h
Normal file
@ -0,0 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
|
||||
#ifndef _UAPI_ASM_RISCV_SETUP_H
|
||||
#define _UAPI_ASM_RISCV_SETUP_H
|
||||
|
||||
#define COMMAND_LINE_SIZE 1024
|
||||
|
||||
#endif /* _UAPI_ASM_RISCV_SETUP_H */
|
@ -339,7 +339,7 @@ static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size
|
||||
"4: slgr %0,%0\n"
|
||||
"5:\n"
|
||||
EX_TABLE(0b,2b) EX_TABLE(3b,5b)
|
||||
: "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2)
|
||||
: "+&a" (size), "+&a" (to), "+a" (tmp1), "=&a" (tmp2)
|
||||
: "a" (empty_zero_page), "d" (reg0) : "cc", "memory");
|
||||
return size;
|
||||
}
|
||||
|
@ -50,6 +50,7 @@
|
||||
#define SR_FD 0x00008000
|
||||
#define SR_MD 0x40000000
|
||||
|
||||
#define SR_USER_MASK 0x00000303 // M, Q, S, T bits
|
||||
/*
|
||||
* DSP structure and data
|
||||
*/
|
||||
|
@ -115,6 +115,7 @@ static int
|
||||
restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p)
|
||||
{
|
||||
unsigned int err = 0;
|
||||
unsigned int sr = regs->sr & ~SR_USER_MASK;
|
||||
|
||||
#define COPY(x) err |= __get_user(regs->x, &sc->sc_##x)
|
||||
COPY(regs[1]);
|
||||
@ -130,6 +131,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p
|
||||
COPY(sr); COPY(pc);
|
||||
#undef COPY
|
||||
|
||||
regs->sr = (regs->sr & SR_USER_MASK) | sr;
|
||||
|
||||
#ifdef CONFIG_SH_FPU
|
||||
if (boot_cpu_data.flags & CPU_HAS_FPU) {
|
||||
int owned_fp;
|
||||
|
@ -503,7 +503,7 @@ static size_t kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
|
||||
|
||||
void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
|
||||
{
|
||||
size_t len;
|
||||
size_t len, off = 0;
|
||||
|
||||
if (!sp)
|
||||
sp = stack_pointer(task);
|
||||
@ -512,9 +512,17 @@ void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
|
||||
kstack_depth_to_print * STACK_DUMP_ENTRY_SIZE);
|
||||
|
||||
printk("%sStack:\n", loglvl);
|
||||
while (off < len) {
|
||||
u8 line[STACK_DUMP_LINE_SIZE];
|
||||
size_t line_len = len - off > STACK_DUMP_LINE_SIZE ?
|
||||
STACK_DUMP_LINE_SIZE : len - off;
|
||||
|
||||
__memcpy(line, (u8 *)sp + off, line_len);
|
||||
print_hex_dump(loglvl, " ", DUMP_PREFIX_NONE,
|
||||
STACK_DUMP_LINE_SIZE, STACK_DUMP_ENTRY_SIZE,
|
||||
sp, len, false);
|
||||
line, line_len, false);
|
||||
off += STACK_DUMP_LINE_SIZE;
|
||||
}
|
||||
show_trace(task, sp, loglvl);
|
||||
}
|
||||
|
||||
|
@ -2915,6 +2915,7 @@ close_card_oam(struct idt77252_dev *card)
|
||||
|
||||
recycle_rx_pool_skb(card, &vc->rcv.rx_pool);
|
||||
}
|
||||
kfree(vc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2958,6 +2959,15 @@ open_card_ubr0(struct idt77252_dev *card)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
close_card_ubr0(struct idt77252_dev *card)
|
||||
{
|
||||
struct vc_map *vc = card->vcs[0];
|
||||
|
||||
free_scq(card, vc->scq);
|
||||
kfree(vc);
|
||||
}
|
||||
|
||||
static int
|
||||
idt77252_dev_open(struct idt77252_dev *card)
|
||||
{
|
||||
@ -3007,6 +3017,7 @@ static void idt77252_dev_close(struct atm_dev *dev)
|
||||
struct idt77252_dev *card = dev->dev_data;
|
||||
u32 conf;
|
||||
|
||||
close_card_ubr0(card);
|
||||
close_card_oam(card);
|
||||
|
||||
conf = SAR_CFG_RXPTH | /* enable receive path */
|
||||
|
@ -122,6 +122,21 @@ static int btqcomsmd_setup(struct hci_dev *hdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btqcomsmd_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = qca_set_bdaddr_rome(hdev, bdaddr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* The firmware stops responding for a while after setting the bdaddr,
|
||||
* causing timeouts for subsequent commands. Sleep a bit to avoid this.
|
||||
*/
|
||||
usleep_range(1000, 10000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btqcomsmd_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct btqcomsmd *btq;
|
||||
@ -162,7 +177,7 @@ static int btqcomsmd_probe(struct platform_device *pdev)
|
||||
hdev->close = btqcomsmd_close;
|
||||
hdev->send = btqcomsmd_send;
|
||||
hdev->setup = btqcomsmd_setup;
|
||||
hdev->set_bdaddr = qca_set_bdaddr_rome;
|
||||
hdev->set_bdaddr = btqcomsmd_set_bdaddr;
|
||||
|
||||
ret = hci_register_dev(hdev);
|
||||
if (ret < 0)
|
||||
|
@ -352,6 +352,7 @@ static void btsdio_remove(struct sdio_func *func)
|
||||
|
||||
BT_DBG("func %p", func);
|
||||
|
||||
cancel_work_sync(&data->work);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
@ -192,8 +192,8 @@ static int weim_parse_dt(struct platform_device *pdev, void __iomem *base)
|
||||
const struct of_device_id *of_id = of_match_device(weim_id_table,
|
||||
&pdev->dev);
|
||||
const struct imx_weim_devtype *devtype = of_id->data;
|
||||
int ret = 0, have_child = 0;
|
||||
struct device_node *child;
|
||||
int ret, have_child = 0;
|
||||
struct cs_timing_state ts = {};
|
||||
u32 reg;
|
||||
|
||||
|
@ -74,7 +74,8 @@
|
||||
/*
|
||||
* Timer values
|
||||
*/
|
||||
#define SSIF_MSG_USEC 20000 /* 20ms between message tries. */
|
||||
#define SSIF_MSG_USEC 60000 /* 60ms between message tries (T3). */
|
||||
#define SSIF_REQ_RETRY_USEC 60000 /* 60ms between send retries (T6). */
|
||||
#define SSIF_MSG_PART_USEC 5000 /* 5ms for a message part */
|
||||
|
||||
/* How many times to we retry sending/receiving the message. */
|
||||
@ -82,7 +83,9 @@
|
||||
#define SSIF_RECV_RETRIES 250
|
||||
|
||||
#define SSIF_MSG_MSEC (SSIF_MSG_USEC / 1000)
|
||||
#define SSIF_REQ_RETRY_MSEC (SSIF_REQ_RETRY_USEC / 1000)
|
||||
#define SSIF_MSG_JIFFIES ((SSIF_MSG_USEC * 1000) / TICK_NSEC)
|
||||
#define SSIF_REQ_RETRY_JIFFIES ((SSIF_REQ_RETRY_USEC * 1000) / TICK_NSEC)
|
||||
#define SSIF_MSG_PART_JIFFIES ((SSIF_MSG_PART_USEC * 1000) / TICK_NSEC)
|
||||
|
||||
/*
|
||||
@ -229,6 +232,9 @@ struct ssif_info {
|
||||
bool got_alert;
|
||||
bool waiting_alert;
|
||||
|
||||
/* Used to inform the timeout that it should do a resend. */
|
||||
bool do_resend;
|
||||
|
||||
/*
|
||||
* If set to true, this will request events the next time the
|
||||
* state machine is idle.
|
||||
@ -510,7 +516,7 @@ static int ipmi_ssif_thread(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ssif_i2c_send(struct ssif_info *ssif_info,
|
||||
static void ssif_i2c_send(struct ssif_info *ssif_info,
|
||||
ssif_i2c_done handler,
|
||||
int read_write, int command,
|
||||
unsigned char *data, unsigned int size)
|
||||
@ -522,7 +528,6 @@ static int ssif_i2c_send(struct ssif_info *ssif_info,
|
||||
ssif_info->i2c_data = data;
|
||||
ssif_info->i2c_size = size;
|
||||
complete(&ssif_info->wake_thread);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -531,40 +536,36 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
|
||||
static void start_get(struct ssif_info *ssif_info)
|
||||
{
|
||||
int rv;
|
||||
|
||||
ssif_info->rtc_us_timer = 0;
|
||||
ssif_info->multi_pos = 0;
|
||||
|
||||
rv = ssif_i2c_send(ssif_info, msg_done_handler, I2C_SMBUS_READ,
|
||||
ssif_i2c_send(ssif_info, msg_done_handler, I2C_SMBUS_READ,
|
||||
SSIF_IPMI_RESPONSE,
|
||||
ssif_info->recv, I2C_SMBUS_BLOCK_DATA);
|
||||
if (rv < 0) {
|
||||
/* request failed, just return the error. */
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"Error from i2c_non_blocking_op(5)\n");
|
||||
|
||||
msg_done_handler(ssif_info, -EIO, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void start_resend(struct ssif_info *ssif_info);
|
||||
|
||||
static void retry_timeout(struct timer_list *t)
|
||||
{
|
||||
struct ssif_info *ssif_info = from_timer(ssif_info, t, retry_timer);
|
||||
unsigned long oflags, *flags;
|
||||
bool waiting;
|
||||
bool waiting, resend;
|
||||
|
||||
if (ssif_info->stopping)
|
||||
return;
|
||||
|
||||
flags = ipmi_ssif_lock_cond(ssif_info, &oflags);
|
||||
resend = ssif_info->do_resend;
|
||||
ssif_info->do_resend = false;
|
||||
waiting = ssif_info->waiting_alert;
|
||||
ssif_info->waiting_alert = false;
|
||||
ipmi_ssif_unlock_cond(ssif_info, flags);
|
||||
|
||||
if (waiting)
|
||||
start_get(ssif_info);
|
||||
if (resend)
|
||||
start_resend(ssif_info);
|
||||
}
|
||||
|
||||
static void watch_timeout(struct timer_list *t)
|
||||
@ -613,14 +614,11 @@ static void ssif_alert(struct i2c_client *client, enum i2c_alert_protocol type,
|
||||
start_get(ssif_info);
|
||||
}
|
||||
|
||||
static int start_resend(struct ssif_info *ssif_info);
|
||||
|
||||
static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
unsigned char *data, unsigned int len)
|
||||
{
|
||||
struct ipmi_smi_msg *msg;
|
||||
unsigned long oflags, *flags;
|
||||
int rv;
|
||||
|
||||
/*
|
||||
* We are single-threaded here, so no need for a lock until we
|
||||
@ -666,16 +664,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
ssif_info->multi_len = len;
|
||||
ssif_info->multi_pos = 1;
|
||||
|
||||
rv = ssif_i2c_send(ssif_info, msg_done_handler, I2C_SMBUS_READ,
|
||||
ssif_i2c_send(ssif_info, msg_done_handler, I2C_SMBUS_READ,
|
||||
SSIF_IPMI_MULTI_PART_RESPONSE_MIDDLE,
|
||||
ssif_info->recv, I2C_SMBUS_BLOCK_DATA);
|
||||
if (rv < 0) {
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"Error from i2c_non_blocking_op(1)\n");
|
||||
|
||||
result = -EIO;
|
||||
} else
|
||||
return;
|
||||
} else if (ssif_info->multi_pos) {
|
||||
/* Middle of multi-part read. Start the next transaction. */
|
||||
@ -738,18 +729,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
|
||||
ssif_info->multi_pos++;
|
||||
|
||||
rv = ssif_i2c_send(ssif_info, msg_done_handler,
|
||||
ssif_i2c_send(ssif_info, msg_done_handler,
|
||||
I2C_SMBUS_READ,
|
||||
SSIF_IPMI_MULTI_PART_RESPONSE_MIDDLE,
|
||||
ssif_info->recv,
|
||||
I2C_SMBUS_BLOCK_DATA);
|
||||
if (rv < 0) {
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"Error from ssif_i2c_send\n");
|
||||
|
||||
result = -EIO;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -931,40 +915,30 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
static void msg_written_handler(struct ssif_info *ssif_info, int result,
|
||||
unsigned char *data, unsigned int len)
|
||||
{
|
||||
int rv;
|
||||
|
||||
/* We are single-threaded here, so no need for a lock. */
|
||||
if (result < 0) {
|
||||
ssif_info->retries_left--;
|
||||
if (ssif_info->retries_left > 0) {
|
||||
if (!start_resend(ssif_info)) {
|
||||
ssif_inc_stat(ssif_info, send_retries);
|
||||
/*
|
||||
* Wait the retry timeout time per the spec,
|
||||
* then redo the send.
|
||||
*/
|
||||
ssif_info->do_resend = true;
|
||||
mod_timer(&ssif_info->retry_timer,
|
||||
jiffies + SSIF_REQ_RETRY_JIFFIES);
|
||||
return;
|
||||
}
|
||||
/* request failed, just return the error. */
|
||||
|
||||
ssif_inc_stat(ssif_info, send_errors);
|
||||
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"%s: Out of retries\n", __func__);
|
||||
|
||||
msg_done_handler(ssif_info, -EIO, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
ssif_inc_stat(ssif_info, send_errors);
|
||||
|
||||
/*
|
||||
* Got an error on transmit, let the done routine
|
||||
* handle it.
|
||||
*/
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"%s: Error %d\n", __func__, result);
|
||||
|
||||
msg_done_handler(ssif_info, result, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ssif_info->multi_data) {
|
||||
/*
|
||||
* In the middle of a multi-data write. See the comment
|
||||
@ -995,18 +969,9 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result,
|
||||
ssif_info->multi_data = NULL;
|
||||
}
|
||||
|
||||
rv = ssif_i2c_send(ssif_info, msg_written_handler,
|
||||
ssif_i2c_send(ssif_info, msg_written_handler,
|
||||
I2C_SMBUS_WRITE, cmd,
|
||||
data_to_send, I2C_SMBUS_BLOCK_DATA);
|
||||
if (rv < 0) {
|
||||
/* request failed, just return the error. */
|
||||
ssif_inc_stat(ssif_info, send_errors);
|
||||
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"Error from i2c_non_blocking_op(3)\n");
|
||||
msg_done_handler(ssif_info, -EIO, NULL, 0);
|
||||
}
|
||||
} else {
|
||||
/* Ready to request the result. */
|
||||
unsigned long oflags, *flags;
|
||||
@ -1033,9 +998,8 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result,
|
||||
}
|
||||
}
|
||||
|
||||
static int start_resend(struct ssif_info *ssif_info)
|
||||
static void start_resend(struct ssif_info *ssif_info)
|
||||
{
|
||||
int rv;
|
||||
int command;
|
||||
|
||||
ssif_info->got_alert = false;
|
||||
@ -1057,12 +1021,8 @@ static int start_resend(struct ssif_info *ssif_info)
|
||||
ssif_info->data[0] = ssif_info->data_len;
|
||||
}
|
||||
|
||||
rv = ssif_i2c_send(ssif_info, msg_written_handler, I2C_SMBUS_WRITE,
|
||||
ssif_i2c_send(ssif_info, msg_written_handler, I2C_SMBUS_WRITE,
|
||||
command, ssif_info->data, I2C_SMBUS_BLOCK_DATA);
|
||||
if (rv && (ssif_info->ssif_debug & SSIF_DEBUG_MSG))
|
||||
dev_dbg(&ssif_info->client->dev,
|
||||
"Error from i2c_non_blocking_op(4)\n");
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int start_send(struct ssif_info *ssif_info,
|
||||
@ -1077,7 +1037,8 @@ static int start_send(struct ssif_info *ssif_info,
|
||||
ssif_info->retries_left = SSIF_SEND_RETRIES;
|
||||
memcpy(ssif_info->data + 1, data, len);
|
||||
ssif_info->data_len = len;
|
||||
return start_resend(ssif_info);
|
||||
start_resend(ssif_info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Must be called with the message lock held. */
|
||||
@ -1377,8 +1338,10 @@ static int do_cmd(struct i2c_client *client, int len, unsigned char *msg,
|
||||
ret = i2c_smbus_write_block_data(client, SSIF_IPMI_REQUEST, len, msg);
|
||||
if (ret) {
|
||||
retry_cnt--;
|
||||
if (retry_cnt > 0)
|
||||
if (retry_cnt > 0) {
|
||||
msleep(SSIF_REQ_RETRY_MSEC);
|
||||
goto retry1;
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -1519,8 +1482,10 @@ static int start_multipart_test(struct i2c_client *client,
|
||||
32, msg);
|
||||
if (ret) {
|
||||
retry_cnt--;
|
||||
if (retry_cnt > 0)
|
||||
if (retry_cnt > 0) {
|
||||
msleep(SSIF_REQ_RETRY_MSEC);
|
||||
goto retry_write;
|
||||
}
|
||||
dev_err(&client->dev, "Could not write multi-part start, though the BMC said it could handle it. Just limit sends to one part.\n");
|
||||
return ret;
|
||||
}
|
||||
|
@ -52,6 +52,39 @@ static bool mailbox_chan_available(struct device *dev, int idx)
|
||||
"#mbox-cells", idx, NULL);
|
||||
}
|
||||
|
||||
static int mailbox_chan_validate(struct device *cdev)
|
||||
{
|
||||
int num_mb, num_sh, ret = 0;
|
||||
struct device_node *np = cdev->of_node;
|
||||
|
||||
num_mb = of_count_phandle_with_args(np, "mboxes", "#mbox-cells");
|
||||
num_sh = of_count_phandle_with_args(np, "shmem", NULL);
|
||||
/* Bail out if mboxes and shmem descriptors are inconsistent */
|
||||
if (num_mb <= 0 || num_sh > 2 || num_mb != num_sh) {
|
||||
dev_warn(cdev, "Invalid channel descriptor for '%s'\n",
|
||||
of_node_full_name(np));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (num_sh > 1) {
|
||||
struct device_node *np_tx, *np_rx;
|
||||
|
||||
np_tx = of_parse_phandle(np, "shmem", 0);
|
||||
np_rx = of_parse_phandle(np, "shmem", 1);
|
||||
/* SCMI Tx and Rx shared mem areas have to be distinct */
|
||||
if (!np_tx || !np_rx || np_tx == np_rx) {
|
||||
dev_warn(cdev, "Invalid shmem descriptor for '%s'\n",
|
||||
of_node_full_name(np));
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
of_node_put(np_tx);
|
||||
of_node_put(np_rx);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
|
||||
bool tx)
|
||||
{
|
||||
@ -64,6 +97,10 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
|
||||
resource_size_t size;
|
||||
struct resource res;
|
||||
|
||||
ret = mailbox_chan_validate(cdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
smbox = devm_kzalloc(dev, sizeof(*smbox), GFP_KERNEL);
|
||||
if (!smbox)
|
||||
return -ENOMEM;
|
||||
|
@ -164,6 +164,21 @@ static bool needs_dsc_aux_workaround(struct dc_link *link)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_synaptics_cascaded_panamera(struct dc_link *link, struct drm_dp_mst_port *port)
|
||||
{
|
||||
u8 branch_vendor_data[4] = { 0 }; // Vendor data 0x50C ~ 0x50F
|
||||
|
||||
if (drm_dp_dpcd_read(port->mgr->aux, DP_BRANCH_VENDOR_SPECIFIC_START, &branch_vendor_data, 4) == 4) {
|
||||
if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_90CC24 &&
|
||||
IS_SYNAPTICS_CASCADED_PANAMERA(link->dpcd_caps.branch_dev_name, branch_vendor_data)) {
|
||||
DRM_INFO("Synaptics Cascaded MST hub\n");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool validate_dsc_caps_on_connector(struct amdgpu_dm_connector *aconnector)
|
||||
{
|
||||
struct dc_sink *dc_sink = aconnector->dc_sink;
|
||||
@ -185,6 +200,10 @@ static bool validate_dsc_caps_on_connector(struct amdgpu_dm_connector *aconnecto
|
||||
needs_dsc_aux_workaround(aconnector->dc_link))
|
||||
aconnector->dsc_aux = &aconnector->mst_port->dm_dp_aux.aux;
|
||||
|
||||
/* synaptics cascaded MST hub case */
|
||||
if (!aconnector->dsc_aux && is_synaptics_cascaded_panamera(aconnector->dc_link, port))
|
||||
aconnector->dsc_aux = port->mgr->aux;
|
||||
|
||||
if (!aconnector->dsc_aux)
|
||||
return false;
|
||||
|
||||
|
@ -26,6 +26,18 @@
|
||||
#ifndef __DAL_AMDGPU_DM_MST_TYPES_H__
|
||||
#define __DAL_AMDGPU_DM_MST_TYPES_H__
|
||||
|
||||
#define DP_BRANCH_VENDOR_SPECIFIC_START 0x50C
|
||||
|
||||
/**
|
||||
* Panamera MST Hub detection
|
||||
* Offset DPCD 050Eh == 0x5A indicates cascaded MST hub case
|
||||
* Check from beginning of branch device vendor specific field (050Ch)
|
||||
*/
|
||||
#define IS_SYNAPTICS_PANAMERA(branchDevName) (((int)branchDevName[4] & 0xF0) == 0x50 ? 1 : 0)
|
||||
#define BRANCH_HW_REVISION_PANAMERA_A2 0x10
|
||||
#define SYNAPTICS_CASCADED_HUB_ID 0x5A
|
||||
#define IS_SYNAPTICS_CASCADED_PANAMERA(devName, data) ((IS_SYNAPTICS_PANAMERA(devName) && ((int)data[2] == SYNAPTICS_CASCADED_HUB_ID)) ? 1 : 0)
|
||||
|
||||
struct amdgpu_display_manager;
|
||||
struct amdgpu_dm_connector;
|
||||
|
||||
|
@ -93,7 +93,15 @@ static void *etnaviv_gem_prime_vmap_impl(struct etnaviv_gem_object *etnaviv_obj)
|
||||
static int etnaviv_gem_prime_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
|
||||
struct vm_area_struct *vma)
|
||||
{
|
||||
return dma_buf_mmap(etnaviv_obj->base.dma_buf, vma, 0);
|
||||
int ret;
|
||||
|
||||
ret = dma_buf_mmap(etnaviv_obj->base.dma_buf, vma, 0);
|
||||
if (!ret) {
|
||||
/* Drop the reference acquired by drm_gem_mmap_obj(). */
|
||||
drm_gem_object_put(&etnaviv_obj->base);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct etnaviv_gem_ops etnaviv_gem_prime_ops = {
|
||||
|
@ -13335,6 +13335,7 @@ intel_crtc_prepare_cleared_state(struct intel_crtc_state *crtc_state)
|
||||
* only fields that are know to not cause problems are preserved. */
|
||||
|
||||
saved_state->uapi = crtc_state->uapi;
|
||||
saved_state->inherited = crtc_state->inherited;
|
||||
saved_state->scaler_state = crtc_state->scaler_state;
|
||||
saved_state->shared_dpll = crtc_state->shared_dpll;
|
||||
saved_state->dpll_hw_state = crtc_state->dpll_hw_state;
|
||||
|
@ -96,7 +96,6 @@ static void debug_active_init(struct i915_active *ref)
|
||||
static void debug_active_activate(struct i915_active *ref)
|
||||
{
|
||||
lockdep_assert_held(&ref->tree_lock);
|
||||
if (!atomic_read(&ref->count)) /* before the first inc */
|
||||
debug_object_activate(ref, &active_debug_desc);
|
||||
}
|
||||
|
||||
|
@ -320,38 +320,38 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
if (priv->afbcd.ops) {
|
||||
ret = priv->afbcd.ops->init(priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto free_drm;
|
||||
}
|
||||
|
||||
/* Encoder Initialization */
|
||||
|
||||
ret = meson_venc_cvbs_create(priv);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto exit_afbcd;
|
||||
|
||||
if (has_components) {
|
||||
ret = component_bind_all(drm->dev, drm);
|
||||
if (ret) {
|
||||
dev_err(drm->dev, "Couldn't bind all components\n");
|
||||
goto free_drm;
|
||||
goto exit_afbcd;
|
||||
}
|
||||
}
|
||||
|
||||
ret = meson_plane_create(priv);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto unbind_all;
|
||||
|
||||
ret = meson_overlay_create(priv);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto unbind_all;
|
||||
|
||||
ret = meson_crtc_create(priv);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto unbind_all;
|
||||
|
||||
ret = drm_irq_install(drm, priv->vsync_irq);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto unbind_all;
|
||||
|
||||
drm_mode_config_reset(drm);
|
||||
|
||||
@ -369,6 +369,12 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
|
||||
uninstall_irq:
|
||||
drm_irq_uninstall(drm);
|
||||
unbind_all:
|
||||
if (has_components)
|
||||
component_unbind_all(drm->dev, drm);
|
||||
exit_afbcd:
|
||||
if (priv->afbcd.ops)
|
||||
priv->afbcd.ops->exit(priv);
|
||||
free_drm:
|
||||
drm_dev_put(drm);
|
||||
|
||||
|
@ -93,7 +93,7 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
/* drm_vblank_init calls kcalloc, which can fail */
|
||||
ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
|
||||
if (ret)
|
||||
goto cleanup_mode_config;
|
||||
goto unbind_all;
|
||||
|
||||
drm->irq_enabled = true;
|
||||
|
||||
@ -117,6 +117,8 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
|
||||
finish_poll:
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
unbind_all:
|
||||
component_unbind_all(dev, NULL);
|
||||
cleanup_mode_config:
|
||||
drm_mode_config_cleanup(drm);
|
||||
of_reserved_mem_device_release(dev);
|
||||
|
@ -1352,6 +1352,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
girq->parents = NULL;
|
||||
girq->default_type = IRQ_TYPE_NONE;
|
||||
girq->handler = handle_simple_irq;
|
||||
girq->threaded = true;
|
||||
|
||||
ret = gpiochip_add_data(&dev->gc, dev);
|
||||
if (ret < 0) {
|
||||
|
@ -700,6 +700,7 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
|
||||
{
|
||||
struct hwmon_device *hwdev;
|
||||
struct device *hdev;
|
||||
struct device *tdev = dev;
|
||||
int i, err, id;
|
||||
|
||||
/* Complain about invalid characters in hwmon name attribute */
|
||||
@ -757,7 +758,9 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
|
||||
hwdev->name = name;
|
||||
hdev->class = &hwmon_class;
|
||||
hdev->parent = dev;
|
||||
hdev->of_node = dev ? dev->of_node : NULL;
|
||||
while (tdev && !tdev->of_node)
|
||||
tdev = tdev->parent;
|
||||
hdev->of_node = tdev ? tdev->of_node : NULL;
|
||||
hwdev->chip = chip;
|
||||
dev_set_drvdata(hdev, drvdata);
|
||||
dev_set_name(hdev, HWMON_ID_FORMAT, id);
|
||||
@ -769,7 +772,7 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
|
||||
|
||||
INIT_LIST_HEAD(&hwdev->tzdata);
|
||||
|
||||
if (dev && dev->of_node && chip && chip->ops->read &&
|
||||
if (hdev->of_node && chip && chip->ops->read &&
|
||||
chip->info[0]->type == hwmon_chip &&
|
||||
(chip->info[0]->config[0] & HWMON_C_REGISTER_TZ)) {
|
||||
err = hwmon_thermal_register_sensors(hdev);
|
||||
|
@ -486,6 +486,8 @@ static const struct it87_devices it87_devices[] = {
|
||||
#define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2)
|
||||
#define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP)
|
||||
#define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V)
|
||||
#define has_scaling(data) ((data)->features & (FEAT_12MV_ADC | \
|
||||
FEAT_10_9MV_ADC))
|
||||
|
||||
struct it87_sio_data {
|
||||
int sioaddr;
|
||||
@ -3098,7 +3100,7 @@ static int it87_probe(struct platform_device *pdev)
|
||||
"Detected broken BIOS defaults, disabling PWM interface\n");
|
||||
|
||||
/* Starting with IT8721F, we handle scaling of internal voltages */
|
||||
if (has_12mv_adc(data)) {
|
||||
if (has_scaling(data)) {
|
||||
if (sio_data->internal & BIT(0))
|
||||
data->in_scaled |= BIT(3); /* in3 is AVCC */
|
||||
if (sio_data->internal & BIT(1))
|
||||
|
@ -502,10 +502,14 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter,
|
||||
static irqreturn_t lpi2c_imx_isr(int irq, void *dev_id)
|
||||
{
|
||||
struct lpi2c_imx_struct *lpi2c_imx = dev_id;
|
||||
unsigned int enabled;
|
||||
unsigned int temp;
|
||||
|
||||
enabled = readl(lpi2c_imx->base + LPI2C_MIER);
|
||||
|
||||
lpi2c_imx_intctrl(lpi2c_imx, 0);
|
||||
temp = readl(lpi2c_imx->base + LPI2C_MSR);
|
||||
temp &= enabled;
|
||||
|
||||
if (temp & MSR_RDF)
|
||||
lpi2c_imx_read_rxfifo(lpi2c_imx);
|
||||
|
@ -308,6 +308,9 @@ static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip,
|
||||
u32 msg[3];
|
||||
int rc;
|
||||
|
||||
if (writelen > I2C_SMBUS_BLOCK_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
memcpy(ctx->dma_buffer, data, writelen);
|
||||
paddr = dma_map_single(ctx->dev, ctx->dma_buffer, writelen,
|
||||
DMA_TO_DEVICE);
|
||||
|
@ -852,8 +852,8 @@ static void alps_process_packet_v6(struct psmouse *psmouse)
|
||||
x = y = z = 0;
|
||||
|
||||
/* Divide 4 since trackpoint's speed is too fast */
|
||||
input_report_rel(dev2, REL_X, (char)x / 4);
|
||||
input_report_rel(dev2, REL_Y, -((char)y / 4));
|
||||
input_report_rel(dev2, REL_X, (s8)x / 4);
|
||||
input_report_rel(dev2, REL_Y, -((s8)y / 4));
|
||||
|
||||
psmouse_report_standard_buttons(dev2, packet[3]);
|
||||
|
||||
@ -1104,8 +1104,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
|
||||
((packet[3] & 0x20) << 1);
|
||||
z = (packet[5] & 0x3f) | ((packet[3] & 0x80) >> 1);
|
||||
|
||||
input_report_rel(dev2, REL_X, (char)x);
|
||||
input_report_rel(dev2, REL_Y, -((char)y));
|
||||
input_report_rel(dev2, REL_X, (s8)x);
|
||||
input_report_rel(dev2, REL_Y, -((s8)y));
|
||||
input_report_abs(dev2, ABS_PRESSURE, z);
|
||||
|
||||
psmouse_report_standard_buttons(dev2, packet[1]);
|
||||
@ -2294,20 +2294,20 @@ static int alps_get_v3_v7_resolution(struct psmouse *psmouse, int reg_pitch)
|
||||
if (reg < 0)
|
||||
return reg;
|
||||
|
||||
x_pitch = (char)(reg << 4) >> 4; /* sign extend lower 4 bits */
|
||||
x_pitch = (s8)(reg << 4) >> 4; /* sign extend lower 4 bits */
|
||||
x_pitch = 50 + 2 * x_pitch; /* In 0.1 mm units */
|
||||
|
||||
y_pitch = (char)reg >> 4; /* sign extend upper 4 bits */
|
||||
y_pitch = (s8)reg >> 4; /* sign extend upper 4 bits */
|
||||
y_pitch = 36 + 2 * y_pitch; /* In 0.1 mm units */
|
||||
|
||||
reg = alps_command_mode_read_reg(psmouse, reg_pitch + 1);
|
||||
if (reg < 0)
|
||||
return reg;
|
||||
|
||||
x_electrode = (char)(reg << 4) >> 4; /* sign extend lower 4 bits */
|
||||
x_electrode = (s8)(reg << 4) >> 4; /* sign extend lower 4 bits */
|
||||
x_electrode = 17 + x_electrode;
|
||||
|
||||
y_electrode = (char)reg >> 4; /* sign extend upper 4 bits */
|
||||
y_electrode = (s8)reg >> 4; /* sign extend upper 4 bits */
|
||||
y_electrode = 13 + y_electrode;
|
||||
|
||||
x_phys = x_pitch * (x_electrode - 1); /* In 0.1 mm units */
|
||||
|
@ -202,8 +202,8 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse,
|
||||
state->pressed = packet[0] >> 7;
|
||||
finger1 = ((packet[0] >> 4) & 0x7) - 1;
|
||||
if (finger1 < FOC_MAX_FINGERS) {
|
||||
state->fingers[finger1].x += (char)packet[1];
|
||||
state->fingers[finger1].y += (char)packet[2];
|
||||
state->fingers[finger1].x += (s8)packet[1];
|
||||
state->fingers[finger1].y += (s8)packet[2];
|
||||
} else {
|
||||
psmouse_err(psmouse, "First finger in rel packet invalid: %d\n",
|
||||
finger1);
|
||||
@ -218,8 +218,8 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse,
|
||||
*/
|
||||
finger2 = ((packet[3] >> 4) & 0x7) - 1;
|
||||
if (finger2 < FOC_MAX_FINGERS) {
|
||||
state->fingers[finger2].x += (char)packet[4];
|
||||
state->fingers[finger2].y += (char)packet[5];
|
||||
state->fingers[finger2].x += (s8)packet[4];
|
||||
state->fingers[finger2].y += (s8)packet[5];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,10 +183,18 @@ static const unsigned long goodix_irq_flags[] = {
|
||||
static const struct dmi_system_id nine_bytes_report[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
.ident = "Lenovo YogaBook",
|
||||
/* YB1-X91L/F and YB1-X90L/F */
|
||||
/* Lenovo Yoga Book X90F / X90L */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9")
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
|
||||
}
|
||||
},
|
||||
{
|
||||
/* Lenovo Yoga Book X91F / X91L */
|
||||
.matches = {
|
||||
/* Non exact match to match F + L versions */
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"),
|
||||
}
|
||||
},
|
||||
#endif
|
||||
|
@ -258,7 +258,7 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
|
||||
qnodes = desc->nodes;
|
||||
num_nodes = desc->num_nodes;
|
||||
|
||||
data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL);
|
||||
data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes), GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -67,7 +67,9 @@ struct dm_crypt_io {
|
||||
struct crypt_config *cc;
|
||||
struct bio *base_bio;
|
||||
u8 *integrity_metadata;
|
||||
bool integrity_metadata_from_pool;
|
||||
bool integrity_metadata_from_pool:1;
|
||||
bool in_tasklet:1;
|
||||
|
||||
struct work_struct work;
|
||||
struct tasklet_struct tasklet;
|
||||
|
||||
@ -1722,6 +1724,7 @@ static void crypt_io_init(struct dm_crypt_io *io, struct crypt_config *cc,
|
||||
io->ctx.r.req = NULL;
|
||||
io->integrity_metadata = NULL;
|
||||
io->integrity_metadata_from_pool = false;
|
||||
io->in_tasklet = false;
|
||||
atomic_set(&io->io_pending, 0);
|
||||
}
|
||||
|
||||
@ -1767,14 +1770,13 @@ static void crypt_dec_pending(struct dm_crypt_io *io)
|
||||
* our tasklet. In this case we need to delay bio_endio()
|
||||
* execution to after the tasklet is done and dequeued.
|
||||
*/
|
||||
if (tasklet_trylock(&io->tasklet)) {
|
||||
tasklet_unlock(&io->tasklet);
|
||||
bio_endio(base_bio);
|
||||
if (io->in_tasklet) {
|
||||
INIT_WORK(&io->work, kcryptd_io_bio_endio);
|
||||
queue_work(cc->io_queue, &io->work);
|
||||
return;
|
||||
}
|
||||
|
||||
INIT_WORK(&io->work, kcryptd_io_bio_endio);
|
||||
queue_work(cc->io_queue, &io->work);
|
||||
bio_endio(base_bio);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1934,6 +1936,7 @@ static int dmcrypt_write(void *data)
|
||||
io = crypt_io_from_node(rb_first(&write_tree));
|
||||
rb_erase(&io->rb_node, &write_tree);
|
||||
kcryptd_io_write(io);
|
||||
cond_resched();
|
||||
} while (!RB_EMPTY_ROOT(&write_tree));
|
||||
blk_finish_plug(&plug);
|
||||
}
|
||||
@ -2227,6 +2230,7 @@ static void kcryptd_queue_crypt(struct dm_crypt_io *io)
|
||||
* it is being executed with irqs disabled.
|
||||
*/
|
||||
if (in_irq() || irqs_disabled()) {
|
||||
io->in_tasklet = true;
|
||||
tasklet_init(&io->tasklet, kcryptd_crypt_tasklet, (unsigned long)&io->work);
|
||||
tasklet_schedule(&io->tasklet);
|
||||
return;
|
||||
|
@ -188,7 +188,7 @@ static int dm_stat_in_flight(struct dm_stat_shared *shared)
|
||||
atomic_read(&shared->in_flight[WRITE]);
|
||||
}
|
||||
|
||||
void dm_stats_init(struct dm_stats *stats)
|
||||
int dm_stats_init(struct dm_stats *stats)
|
||||
{
|
||||
int cpu;
|
||||
struct dm_stats_last_position *last;
|
||||
@ -196,11 +196,16 @@ void dm_stats_init(struct dm_stats *stats)
|
||||
mutex_init(&stats->mutex);
|
||||
INIT_LIST_HEAD(&stats->list);
|
||||
stats->last = alloc_percpu(struct dm_stats_last_position);
|
||||
if (!stats->last)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
last = per_cpu_ptr(stats->last, cpu);
|
||||
last->last_sector = (sector_t)ULLONG_MAX;
|
||||
last->last_rw = UINT_MAX;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dm_stats_cleanup(struct dm_stats *stats)
|
||||
|
@ -22,7 +22,7 @@ struct dm_stats_aux {
|
||||
unsigned long long duration_ns;
|
||||
};
|
||||
|
||||
void dm_stats_init(struct dm_stats *st);
|
||||
int dm_stats_init(struct dm_stats *st);
|
||||
void dm_stats_cleanup(struct dm_stats *st);
|
||||
|
||||
struct mapped_device;
|
||||
|
@ -3383,6 +3383,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
pt->low_water_blocks = low_water_blocks;
|
||||
pt->adjusted_pf = pt->requested_pf = pf;
|
||||
ti->num_flush_bios = 1;
|
||||
ti->limit_swap_bios = true;
|
||||
|
||||
/*
|
||||
* Only need to enable discards if the pool should pass
|
||||
@ -4259,6 +4260,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
goto bad;
|
||||
|
||||
ti->num_flush_bios = 1;
|
||||
ti->limit_swap_bios = true;
|
||||
ti->flush_supported = true;
|
||||
ti->per_io_data_size = sizeof(struct dm_thin_endio_hook);
|
||||
|
||||
|
@ -1926,7 +1926,9 @@ static struct mapped_device *alloc_dev(int minor)
|
||||
if (!md->bdev)
|
||||
goto bad;
|
||||
|
||||
dm_stats_init(&md->stats);
|
||||
r = dm_stats_init(&md->stats);
|
||||
if (r < 0)
|
||||
goto bad;
|
||||
|
||||
/* Populate the mapping, nobody knows we exist yet */
|
||||
spin_lock(&_minor_lock);
|
||||
|
@ -3207,6 +3207,9 @@ slot_store(struct md_rdev *rdev, const char *buf, size_t len)
|
||||
err = kstrtouint(buf, 10, (unsigned int *)&slot);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (slot < 0)
|
||||
/* overflow */
|
||||
return -ENOSPC;
|
||||
}
|
||||
if (rdev->mddev->pers && slot == -1) {
|
||||
/* Setting 'slot' on an active array requires also
|
||||
|
@ -172,6 +172,7 @@ struct meson_nfc {
|
||||
|
||||
dma_addr_t daddr;
|
||||
dma_addr_t iaddr;
|
||||
u32 info_bytes;
|
||||
|
||||
unsigned long assigned_cs;
|
||||
};
|
||||
@ -499,6 +500,7 @@ static int meson_nfc_dma_buffer_setup(struct nand_chip *nand, void *databuf,
|
||||
nfc->daddr, datalen, dir);
|
||||
return ret;
|
||||
}
|
||||
nfc->info_bytes = infolen;
|
||||
cmd = GENCMDIADDRL(NFC_CMD_AIL, nfc->iaddr);
|
||||
writel(cmd, nfc->reg_base + NFC_REG_CMD);
|
||||
|
||||
@ -516,8 +518,10 @@ static void meson_nfc_dma_buffer_release(struct nand_chip *nand,
|
||||
struct meson_nfc *nfc = nand_get_controller_data(nand);
|
||||
|
||||
dma_unmap_single(nfc->dev, nfc->daddr, datalen, dir);
|
||||
if (infolen)
|
||||
if (infolen) {
|
||||
dma_unmap_single(nfc->dev, nfc->iaddr, infolen, dir);
|
||||
nfc->info_bytes = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len)
|
||||
@ -706,6 +710,8 @@ static void meson_nfc_check_ecc_pages_valid(struct meson_nfc *nfc,
|
||||
usleep_range(10, 15);
|
||||
/* info is updated by nfc dma engine*/
|
||||
smp_rmb();
|
||||
dma_sync_single_for_cpu(nfc->dev, nfc->iaddr, nfc->info_bytes,
|
||||
DMA_FROM_DEVICE);
|
||||
ret = *info & ECC_COMPLETE;
|
||||
} while (!ret);
|
||||
}
|
||||
|
@ -2611,9 +2611,14 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
|
||||
* If this is the upstream port for this switch, enable
|
||||
* forwarding of unknown unicasts and multicasts.
|
||||
*/
|
||||
reg = MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP |
|
||||
MV88E6185_PORT_CTL0_USE_TAG | MV88E6185_PORT_CTL0_USE_IP |
|
||||
reg = MV88E6185_PORT_CTL0_USE_TAG | MV88E6185_PORT_CTL0_USE_IP |
|
||||
MV88E6XXX_PORT_CTL0_STATE_FORWARDING;
|
||||
/* Forward any IPv4 IGMP or IPv6 MLD frames received
|
||||
* by a USER port to the CPU port to allow snooping.
|
||||
*/
|
||||
if (dsa_is_user_port(ds, port))
|
||||
reg |= MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP;
|
||||
|
||||
err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL0, reg);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -219,12 +219,12 @@ static const struct pci_device_id bnxt_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1750), .driver_data = BCM57508 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1751), .driver_data = BCM57504 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1752), .driver_data = BCM57502 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1801), .driver_data = BCM57504_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1804), .driver_data = BCM57504_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0xd802), .driver_data = BCM58802 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0xd804), .driver_data = BCM58804 },
|
||||
#ifdef CONFIG_BNXT_SRIOV
|
||||
|
@ -1198,6 +1198,7 @@ struct bnxt_link_info {
|
||||
#define BNXT_LINK_SPEED_40GB PORT_PHY_QCFG_RESP_LINK_SPEED_40GB
|
||||
#define BNXT_LINK_SPEED_50GB PORT_PHY_QCFG_RESP_LINK_SPEED_50GB
|
||||
#define BNXT_LINK_SPEED_100GB PORT_PHY_QCFG_RESP_LINK_SPEED_100GB
|
||||
#define BNXT_LINK_SPEED_200GB PORT_PHY_QCFG_RESP_LINK_SPEED_200GB
|
||||
u16 support_speeds;
|
||||
u16 support_pam4_speeds;
|
||||
u16 auto_link_speeds; /* fw adv setting */
|
||||
|
@ -1653,6 +1653,8 @@ u32 bnxt_fw_to_ethtool_speed(u16 fw_link_speed)
|
||||
return SPEED_50000;
|
||||
case BNXT_LINK_SPEED_100GB:
|
||||
return SPEED_100000;
|
||||
case BNXT_LINK_SPEED_200GB:
|
||||
return SPEED_200000;
|
||||
default:
|
||||
return SPEED_UNKNOWN;
|
||||
}
|
||||
|
@ -510,7 +510,10 @@ static int gve_get_link_ksettings(struct net_device *netdev,
|
||||
struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
struct gve_priv *priv = netdev_priv(netdev);
|
||||
int err = gve_adminq_report_link_speed(priv);
|
||||
int err = 0;
|
||||
|
||||
if (priv->link_speed == 0)
|
||||
err = gve_adminq_report_link_speed(priv);
|
||||
|
||||
cmd->base.speed = priv->link_speed;
|
||||
return err;
|
||||
|
@ -44,7 +44,7 @@ static i40e_status i40e_diag_reg_pattern_test(struct i40e_hw *hw,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct i40e_diag_reg_test_info i40e_reg_list[] = {
|
||||
const struct i40e_diag_reg_test_info i40e_reg_list[] = {
|
||||
/* offset mask elements stride */
|
||||
{I40E_QTX_CTL(0), 0x0000FFBF, 1,
|
||||
I40E_QTX_CTL(1) - I40E_QTX_CTL(0)},
|
||||
@ -78,27 +78,28 @@ i40e_status i40e_diag_reg_test(struct i40e_hw *hw)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
u32 reg, mask;
|
||||
u32 elements;
|
||||
u32 i, j;
|
||||
|
||||
for (i = 0; i40e_reg_list[i].offset != 0 &&
|
||||
!ret_code; i++) {
|
||||
|
||||
elements = i40e_reg_list[i].elements;
|
||||
/* set actual reg range for dynamically allocated resources */
|
||||
if (i40e_reg_list[i].offset == I40E_QTX_CTL(0) &&
|
||||
hw->func_caps.num_tx_qp != 0)
|
||||
i40e_reg_list[i].elements = hw->func_caps.num_tx_qp;
|
||||
elements = hw->func_caps.num_tx_qp;
|
||||
if ((i40e_reg_list[i].offset == I40E_PFINT_ITRN(0, 0) ||
|
||||
i40e_reg_list[i].offset == I40E_PFINT_ITRN(1, 0) ||
|
||||
i40e_reg_list[i].offset == I40E_PFINT_ITRN(2, 0) ||
|
||||
i40e_reg_list[i].offset == I40E_QINT_TQCTL(0) ||
|
||||
i40e_reg_list[i].offset == I40E_QINT_RQCTL(0)) &&
|
||||
hw->func_caps.num_msix_vectors != 0)
|
||||
i40e_reg_list[i].elements =
|
||||
hw->func_caps.num_msix_vectors - 1;
|
||||
elements = hw->func_caps.num_msix_vectors - 1;
|
||||
|
||||
/* test register access */
|
||||
mask = i40e_reg_list[i].mask;
|
||||
for (j = 0; j < i40e_reg_list[i].elements && !ret_code; j++) {
|
||||
for (j = 0; j < elements && !ret_code; j++) {
|
||||
reg = i40e_reg_list[i].offset +
|
||||
(j * i40e_reg_list[i].stride);
|
||||
ret_code = i40e_diag_reg_pattern_test(hw, reg, mask);
|
||||
|
@ -20,7 +20,7 @@ struct i40e_diag_reg_test_info {
|
||||
u32 stride; /* bytes between each element */
|
||||
};
|
||||
|
||||
extern struct i40e_diag_reg_test_info i40e_reg_list[];
|
||||
extern const struct i40e_diag_reg_test_info i40e_reg_list[];
|
||||
|
||||
i40e_status i40e_diag_reg_test(struct i40e_hw *hw);
|
||||
i40e_status i40e_diag_eeprom_test(struct i40e_hw *hw);
|
||||
|
@ -662,7 +662,7 @@ struct iavf_rx_ptype_decoded iavf_ptype_lookup[] = {
|
||||
/* Non Tunneled IPv6 */
|
||||
IAVF_PTT(88, IP, IPV6, FRG, NONE, NONE, NOF, NONE, PAY3),
|
||||
IAVF_PTT(89, IP, IPV6, NOF, NONE, NONE, NOF, NONE, PAY3),
|
||||
IAVF_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY3),
|
||||
IAVF_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY4),
|
||||
IAVF_PTT_UNUSED_ENTRY(91),
|
||||
IAVF_PTT(92, IP, IPV6, NOF, NONE, NONE, NOF, TCP, PAY4),
|
||||
IAVF_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4),
|
||||
|
@ -1061,7 +1061,7 @@ static inline void iavf_rx_hash(struct iavf_ring *ring,
|
||||
cpu_to_le64((u64)IAVF_RX_DESC_FLTSTAT_RSS_HASH <<
|
||||
IAVF_RX_DESC_STATUS_FLTSTAT_SHIFT);
|
||||
|
||||
if (ring->netdev->features & NETIF_F_RXHASH)
|
||||
if (!(ring->netdev->features & NETIF_F_RXHASH))
|
||||
return;
|
||||
|
||||
if ((rx_desc->wb.qword1.status_error_len & rss_mask) == rss_mask) {
|
||||
|
@ -3821,9 +3821,7 @@ static void igb_remove(struct pci_dev *pdev)
|
||||
igb_release_hw_control(adapter);
|
||||
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
rtnl_lock();
|
||||
igb_disable_sriov(pdev);
|
||||
rtnl_unlock();
|
||||
#endif
|
||||
|
||||
unregister_netdev(netdev);
|
||||
|
@ -1074,7 +1074,7 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter)
|
||||
igbvf_intr_msix_rx, 0, adapter->rx_ring->name,
|
||||
netdev);
|
||||
if (err)
|
||||
goto out;
|
||||
goto free_irq_tx;
|
||||
|
||||
adapter->rx_ring->itr_register = E1000_EITR(vector);
|
||||
adapter->rx_ring->itr_val = adapter->current_itr;
|
||||
@ -1083,10 +1083,14 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter)
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
igbvf_msix_other, 0, netdev->name, netdev);
|
||||
if (err)
|
||||
goto out;
|
||||
goto free_irq_rx;
|
||||
|
||||
igbvf_configure_msix(adapter);
|
||||
return 0;
|
||||
free_irq_rx:
|
||||
free_irq(adapter->msix_entries[--vector].vector, netdev);
|
||||
free_irq_tx:
|
||||
free_irq(adapter->msix_entries[--vector].vector, netdev);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/* Copyright(c) 2009 - 2018 Intel Corporation. */
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
#include "vf.h"
|
||||
|
||||
static s32 e1000_check_for_link_vf(struct e1000_hw *hw);
|
||||
@ -131,13 +133,18 @@ static s32 e1000_reset_hw_vf(struct e1000_hw *hw)
|
||||
/* set our "perm_addr" based on info provided by PF */
|
||||
ret_val = mbx->ops.read_posted(hw, msgbuf, 3);
|
||||
if (!ret_val) {
|
||||
if (msgbuf[0] == (E1000_VF_RESET |
|
||||
E1000_VT_MSGTYPE_ACK))
|
||||
switch (msgbuf[0]) {
|
||||
case E1000_VF_RESET | E1000_VT_MSGTYPE_ACK:
|
||||
memcpy(hw->mac.perm_addr, addr, ETH_ALEN);
|
||||
else
|
||||
break;
|
||||
case E1000_VF_RESET | E1000_VT_MSGTYPE_NACK:
|
||||
eth_zero_addr(hw->mac.perm_addr);
|
||||
break;
|
||||
default:
|
||||
ret_val = -E1000_ERR_MAC_INIT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
@ -4874,13 +4874,13 @@ static bool validate_schedule(struct igc_adapter *adapter,
|
||||
if (e->command != TC_TAPRIO_CMD_SET_GATES)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < adapter->num_tx_queues; i++) {
|
||||
if (e->gate_mask & BIT(i))
|
||||
for (i = 0; i < adapter->num_tx_queues; i++)
|
||||
if (e->gate_mask & BIT(i)) {
|
||||
queue_uses[i]++;
|
||||
|
||||
/* There are limitations: A single queue cannot be
|
||||
* opened and closed multiple times per cycle unless the
|
||||
* gate stays open. Check for it.
|
||||
/* There are limitations: A single queue cannot
|
||||
* be opened and closed multiple times per cycle
|
||||
* unless the gate stays open. Check for it.
|
||||
*/
|
||||
if (queue_uses[i] > 1 &&
|
||||
!(prev->gate_mask & BIT(i)))
|
||||
|
@ -117,12 +117,14 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
|
||||
if (!MLX5_CAP_GEN(priv->mdev, ets))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
|
||||
for (i = 0; i < ets->ets_cap; i++) {
|
||||
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
|
||||
err = mlx5_query_port_prio_tc(mdev, i, &ets->prio_tc[i]);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
|
||||
for (i = 0; i < ets->ets_cap; i++) {
|
||||
err = mlx5_query_port_tc_group(mdev, i, &tc_group[i]);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -301,8 +301,7 @@ int mlx5_esw_acl_ingress_vport_bond_update(struct mlx5_eswitch *esw, u16 vport_n
|
||||
|
||||
if (WARN_ON_ONCE(IS_ERR(vport))) {
|
||||
esw_warn(esw->dev, "vport(%d) invalid!\n", vport_num);
|
||||
err = PTR_ERR(vport);
|
||||
goto out;
|
||||
return PTR_ERR(vport);
|
||||
}
|
||||
|
||||
esw_acl_ingress_ofld_rules_destroy(esw, vport);
|
||||
|
@ -1339,6 +1339,7 @@ static void esw_disable_vport(struct mlx5_eswitch *esw, u16 vport_num)
|
||||
*/
|
||||
esw_vport_change_handle_locked(vport);
|
||||
vport->enabled_events = 0;
|
||||
esw_apply_vport_rx_mode(esw, vport, false, false);
|
||||
esw_vport_cleanup(esw, vport);
|
||||
esw->enabled_vports--;
|
||||
|
||||
|
@ -292,7 +292,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
|
||||
*/
|
||||
|
||||
laddr = dma_map_single(lp->device, skb->data, length, DMA_TO_DEVICE);
|
||||
if (!laddr) {
|
||||
if (dma_mapping_error(lp->device, laddr)) {
|
||||
pr_err_ratelimited("%s: failed to map tx DMA buffer.\n", dev->name);
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
@ -509,7 +509,7 @@ static bool sonic_alloc_rb(struct net_device *dev, struct sonic_local *lp,
|
||||
|
||||
*new_addr = dma_map_single(lp->device, skb_put(*new_skb, SONIC_RBSIZE),
|
||||
SONIC_RBSIZE, DMA_FROM_DEVICE);
|
||||
if (!*new_addr) {
|
||||
if (dma_mapping_error(lp->device, *new_addr)) {
|
||||
dev_kfree_skb(*new_skb);
|
||||
*new_skb = NULL;
|
||||
return false;
|
||||
|
@ -4378,6 +4378,9 @@ qed_iov_configure_min_tx_rate(struct qed_dev *cdev, int vfid, u32 rate)
|
||||
}
|
||||
|
||||
vf = qed_iov_get_vf_info(QED_LEADING_HWFN(cdev), (u16)vfid, true);
|
||||
if (!vf)
|
||||
return -EINVAL;
|
||||
|
||||
vport_id = vf->vport_id;
|
||||
|
||||
return qed_configure_vport_wfq(cdev, vport_id, rate);
|
||||
@ -5123,7 +5126,7 @@ static void qed_iov_handle_trust_change(struct qed_hwfn *hwfn)
|
||||
|
||||
/* Validate that the VF has a configured vport */
|
||||
vf = qed_iov_get_vf_info(hwfn, i, true);
|
||||
if (!vf->vport_instance)
|
||||
if (!vf || !vf->vport_instance)
|
||||
continue;
|
||||
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
|
@ -728,9 +728,15 @@ static int emac_remove(struct platform_device *pdev)
|
||||
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
|
||||
struct emac_adapter *adpt = netdev_priv(netdev);
|
||||
|
||||
netif_carrier_off(netdev);
|
||||
netif_tx_disable(netdev);
|
||||
|
||||
unregister_netdev(netdev);
|
||||
netif_napi_del(&adpt->rx_q.napi);
|
||||
|
||||
free_irq(adpt->irq.irq, &adpt->irq);
|
||||
cancel_work_sync(&adpt->work_thread);
|
||||
|
||||
emac_clks_teardown(adpt);
|
||||
|
||||
put_device(&adpt->phydev->mdio.dev);
|
||||
|
@ -970,6 +970,9 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp,
|
||||
/* disable phy pfm mode */
|
||||
phy_modify_paged(phydev, 0x0a44, 0x11, BIT(7), 0);
|
||||
|
||||
/* disable 10m pll off */
|
||||
phy_modify_paged(phydev, 0x0a43, 0x10, BIT(0), 0);
|
||||
|
||||
rtl8168g_disable_aldps(phydev);
|
||||
rtl8168g_config_eee_phy(phydev);
|
||||
}
|
||||
|
@ -1304,7 +1304,8 @@ static void efx_ef10_fini_nic(struct efx_nic *efx)
|
||||
static int efx_ef10_init_nic(struct efx_nic *efx)
|
||||
{
|
||||
struct efx_ef10_nic_data *nic_data = efx->nic_data;
|
||||
netdev_features_t hw_enc_features = 0;
|
||||
struct net_device *net_dev = efx->net_dev;
|
||||
netdev_features_t tun_feats, tso_feats;
|
||||
int rc;
|
||||
|
||||
if (nic_data->must_check_datapath_caps) {
|
||||
@ -1349,20 +1350,30 @@ static int efx_ef10_init_nic(struct efx_nic *efx)
|
||||
nic_data->must_restore_piobufs = false;
|
||||
}
|
||||
|
||||
/* add encapsulated checksum offload features */
|
||||
/* encap features might change during reset if fw variant changed */
|
||||
if (efx_has_cap(efx, VXLAN_NVGRE) && !efx_ef10_is_vf(efx))
|
||||
hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
|
||||
/* add encapsulated TSO features */
|
||||
if (efx_has_cap(efx, TX_TSO_V2_ENCAP)) {
|
||||
netdev_features_t encap_tso_features;
|
||||
net_dev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
|
||||
else
|
||||
net_dev->hw_enc_features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
|
||||
|
||||
encap_tso_features = NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_GRE |
|
||||
tun_feats = NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_GRE |
|
||||
NETIF_F_GSO_UDP_TUNNEL_CSUM | NETIF_F_GSO_GRE_CSUM;
|
||||
tso_feats = NETIF_F_TSO | NETIF_F_TSO6;
|
||||
|
||||
hw_enc_features |= encap_tso_features | NETIF_F_TSO;
|
||||
efx->net_dev->features |= encap_tso_features;
|
||||
if (efx_has_cap(efx, TX_TSO_V2_ENCAP)) {
|
||||
/* If this is first nic_init, or if it is a reset and a new fw
|
||||
* variant has added new features, enable them by default.
|
||||
* If the features are not new, maintain their current value.
|
||||
*/
|
||||
if (!(net_dev->hw_features & tun_feats))
|
||||
net_dev->features |= tun_feats;
|
||||
net_dev->hw_enc_features |= tun_feats | tso_feats;
|
||||
net_dev->hw_features |= tun_feats;
|
||||
} else {
|
||||
net_dev->hw_enc_features &= ~(tun_feats | tso_feats);
|
||||
net_dev->hw_features &= ~tun_feats;
|
||||
net_dev->features &= ~tun_feats;
|
||||
}
|
||||
efx->net_dev->hw_enc_features = hw_enc_features;
|
||||
|
||||
/* don't fail init if RSS setup doesn't work */
|
||||
rc = efx->type->rx_push_rss_config(efx, false,
|
||||
@ -3977,7 +3988,10 @@ static unsigned int ef10_check_caps(const struct efx_nic *efx,
|
||||
NETIF_F_HW_VLAN_CTAG_FILTER | \
|
||||
NETIF_F_IPV6_CSUM | \
|
||||
NETIF_F_RXHASH | \
|
||||
NETIF_F_NTUPLE)
|
||||
NETIF_F_NTUPLE | \
|
||||
NETIF_F_SG | \
|
||||
NETIF_F_RXCSUM | \
|
||||
NETIF_F_RXALL)
|
||||
|
||||
const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
|
||||
.is_vf = true,
|
||||
|
@ -1045,21 +1045,18 @@ static int efx_pci_probe_post_io(struct efx_nic *efx)
|
||||
}
|
||||
|
||||
/* Determine netdevice features */
|
||||
net_dev->features |= (efx->type->offload_features | NETIF_F_SG |
|
||||
NETIF_F_TSO | NETIF_F_RXCSUM | NETIF_F_RXALL);
|
||||
if (efx->type->offload_features & (NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM)) {
|
||||
net_dev->features |= NETIF_F_TSO6;
|
||||
if (efx_has_cap(efx, TX_TSO_V2_ENCAP))
|
||||
net_dev->hw_enc_features |= NETIF_F_TSO6;
|
||||
}
|
||||
/* Check whether device supports TSO */
|
||||
if (!efx->type->tso_versions || !efx->type->tso_versions(efx))
|
||||
net_dev->features &= ~NETIF_F_ALL_TSO;
|
||||
net_dev->features |= efx->type->offload_features;
|
||||
|
||||
/* Add TSO features */
|
||||
if (efx->type->tso_versions && efx->type->tso_versions(efx))
|
||||
net_dev->features |= NETIF_F_TSO | NETIF_F_TSO6;
|
||||
|
||||
/* Mask for features that also apply to VLAN devices */
|
||||
net_dev->vlan_features |= (NETIF_F_HW_CSUM | NETIF_F_SG |
|
||||
NETIF_F_HIGHDMA | NETIF_F_ALL_TSO |
|
||||
NETIF_F_RXCSUM);
|
||||
|
||||
/* Determine user configurable features */
|
||||
net_dev->hw_features |= net_dev->features & ~efx->fixed_features;
|
||||
|
||||
/* Disable receiving frames with bad FCS, by default. */
|
||||
|
@ -480,7 +480,6 @@ struct mac_device_info {
|
||||
unsigned int xlgmac;
|
||||
unsigned int num_vlan;
|
||||
u32 vlan_filter[32];
|
||||
unsigned int promisc;
|
||||
bool vlan_fail_q_en;
|
||||
u8 vlan_fail_q;
|
||||
};
|
||||
|
@ -453,12 +453,6 @@ static int dwmac4_add_hw_vlan_rx_fltr(struct net_device *dev,
|
||||
if (vid > 4095)
|
||||
return -EINVAL;
|
||||
|
||||
if (hw->promisc) {
|
||||
netdev_err(dev,
|
||||
"Adding VLAN in promisc mode not supported\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
/* Single Rx VLAN Filter */
|
||||
if (hw->num_vlan == 1) {
|
||||
/* For single VLAN filter, VID 0 means VLAN promiscuous */
|
||||
@ -508,12 +502,6 @@ static int dwmac4_del_hw_vlan_rx_fltr(struct net_device *dev,
|
||||
{
|
||||
int i, ret = 0;
|
||||
|
||||
if (hw->promisc) {
|
||||
netdev_err(dev,
|
||||
"Deleting VLAN in promisc mode not supported\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
/* Single Rx VLAN Filter */
|
||||
if (hw->num_vlan == 1) {
|
||||
if ((hw->vlan_filter[0] & GMAC_VLAN_TAG_VID) == vid) {
|
||||
@ -538,39 +526,6 @@ static int dwmac4_del_hw_vlan_rx_fltr(struct net_device *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void dwmac4_vlan_promisc_enable(struct net_device *dev,
|
||||
struct mac_device_info *hw)
|
||||
{
|
||||
void __iomem *ioaddr = hw->pcsr;
|
||||
u32 value;
|
||||
u32 hash;
|
||||
u32 val;
|
||||
int i;
|
||||
|
||||
/* Single Rx VLAN Filter */
|
||||
if (hw->num_vlan == 1) {
|
||||
dwmac4_write_single_vlan(dev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Extended Rx VLAN Filter Enable */
|
||||
for (i = 0; i < hw->num_vlan; i++) {
|
||||
if (hw->vlan_filter[i] & GMAC_VLAN_TAG_DATA_VEN) {
|
||||
val = hw->vlan_filter[i] & ~GMAC_VLAN_TAG_DATA_VEN;
|
||||
dwmac4_write_vlan_filter(dev, hw, i, val);
|
||||
}
|
||||
}
|
||||
|
||||
hash = readl(ioaddr + GMAC_VLAN_HASH_TABLE);
|
||||
if (hash & GMAC_VLAN_VLHT) {
|
||||
value = readl(ioaddr + GMAC_VLAN_TAG);
|
||||
if (value & GMAC_VLAN_VTHM) {
|
||||
value &= ~GMAC_VLAN_VTHM;
|
||||
writel(value, ioaddr + GMAC_VLAN_TAG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void dwmac4_restore_hw_vlan_rx_fltr(struct net_device *dev,
|
||||
struct mac_device_info *hw)
|
||||
{
|
||||
@ -690,22 +645,12 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
|
||||
}
|
||||
|
||||
/* VLAN filtering */
|
||||
if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)
|
||||
if (dev->flags & IFF_PROMISC && !hw->vlan_fail_q_en)
|
||||
value &= ~GMAC_PACKET_FILTER_VTFE;
|
||||
else if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)
|
||||
value |= GMAC_PACKET_FILTER_VTFE;
|
||||
|
||||
writel(value, ioaddr + GMAC_PACKET_FILTER);
|
||||
|
||||
if (dev->flags & IFF_PROMISC && !hw->vlan_fail_q_en) {
|
||||
if (!hw->promisc) {
|
||||
hw->promisc = 1;
|
||||
dwmac4_vlan_promisc_enable(dev, hw);
|
||||
}
|
||||
} else {
|
||||
if (hw->promisc) {
|
||||
hw->promisc = 0;
|
||||
dwmac4_restore_hw_vlan_rx_fltr(dev, hw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void dwmac4_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
|
||||
|
@ -317,15 +317,17 @@ static int gelic_card_init_chain(struct gelic_card *card,
|
||||
|
||||
/* set up the hardware pointers in each descriptor */
|
||||
for (i = 0; i < no; i++, descr++) {
|
||||
gelic_descr_set_status(descr, GELIC_DESCR_DMA_NOT_IN_USE);
|
||||
descr->bus_addr =
|
||||
dma_map_single(ctodev(card), descr,
|
||||
GELIC_DESCR_SIZE,
|
||||
DMA_BIDIRECTIONAL);
|
||||
dma_addr_t cpu_addr;
|
||||
|
||||
if (!descr->bus_addr)
|
||||
gelic_descr_set_status(descr, GELIC_DESCR_DMA_NOT_IN_USE);
|
||||
|
||||
cpu_addr = dma_map_single(ctodev(card), descr,
|
||||
GELIC_DESCR_SIZE, DMA_BIDIRECTIONAL);
|
||||
|
||||
if (dma_mapping_error(ctodev(card), cpu_addr))
|
||||
goto iommu_error;
|
||||
|
||||
descr->bus_addr = cpu_to_be32(cpu_addr);
|
||||
descr->next = descr + 1;
|
||||
descr->prev = descr - 1;
|
||||
}
|
||||
@ -365,26 +367,28 @@ static int gelic_card_init_chain(struct gelic_card *card,
|
||||
*
|
||||
* allocates a new rx skb, iommu-maps it and attaches it to the descriptor.
|
||||
* Activate the descriptor state-wise
|
||||
*
|
||||
* Gelic RX sk_buffs must be aligned to GELIC_NET_RXBUF_ALIGN and the length
|
||||
* must be a multiple of GELIC_NET_RXBUF_ALIGN.
|
||||
*/
|
||||
static int gelic_descr_prepare_rx(struct gelic_card *card,
|
||||
struct gelic_descr *descr)
|
||||
{
|
||||
static const unsigned int rx_skb_size =
|
||||
ALIGN(GELIC_NET_MAX_FRAME, GELIC_NET_RXBUF_ALIGN) +
|
||||
GELIC_NET_RXBUF_ALIGN - 1;
|
||||
dma_addr_t cpu_addr;
|
||||
int offset;
|
||||
unsigned int bufsize;
|
||||
|
||||
if (gelic_descr_get_status(descr) != GELIC_DESCR_DMA_NOT_IN_USE)
|
||||
dev_info(ctodev(card), "%s: ERROR status\n", __func__);
|
||||
/* we need to round up the buffer size to a multiple of 128 */
|
||||
bufsize = ALIGN(GELIC_NET_MAX_MTU, GELIC_NET_RXBUF_ALIGN);
|
||||
|
||||
/* and we need to have it 128 byte aligned, therefore we allocate a
|
||||
* bit more */
|
||||
descr->skb = dev_alloc_skb(bufsize + GELIC_NET_RXBUF_ALIGN - 1);
|
||||
descr->skb = netdev_alloc_skb(*card->netdev, rx_skb_size);
|
||||
if (!descr->skb) {
|
||||
descr->buf_addr = 0; /* tell DMAC don't touch memory */
|
||||
return -ENOMEM;
|
||||
}
|
||||
descr->buf_size = cpu_to_be32(bufsize);
|
||||
descr->buf_size = cpu_to_be32(rx_skb_size);
|
||||
descr->dmac_cmd_status = 0;
|
||||
descr->result_size = 0;
|
||||
descr->valid_size = 0;
|
||||
@ -395,11 +399,10 @@ static int gelic_descr_prepare_rx(struct gelic_card *card,
|
||||
if (offset)
|
||||
skb_reserve(descr->skb, GELIC_NET_RXBUF_ALIGN - offset);
|
||||
/* io-mmu-map the skb */
|
||||
descr->buf_addr = cpu_to_be32(dma_map_single(ctodev(card),
|
||||
descr->skb->data,
|
||||
GELIC_NET_MAX_MTU,
|
||||
DMA_FROM_DEVICE));
|
||||
if (!descr->buf_addr) {
|
||||
cpu_addr = dma_map_single(ctodev(card), descr->skb->data,
|
||||
GELIC_NET_MAX_FRAME, DMA_FROM_DEVICE);
|
||||
descr->buf_addr = cpu_to_be32(cpu_addr);
|
||||
if (dma_mapping_error(ctodev(card), cpu_addr)) {
|
||||
dev_kfree_skb_any(descr->skb);
|
||||
descr->skb = NULL;
|
||||
dev_info(ctodev(card),
|
||||
@ -779,7 +782,7 @@ static int gelic_descr_prepare_tx(struct gelic_card *card,
|
||||
|
||||
buf = dma_map_single(ctodev(card), skb->data, skb->len, DMA_TO_DEVICE);
|
||||
|
||||
if (!buf) {
|
||||
if (dma_mapping_error(ctodev(card), buf)) {
|
||||
dev_err(ctodev(card),
|
||||
"dma map 2 failed (%p, %i). Dropping packet\n",
|
||||
skb->data, skb->len);
|
||||
@ -915,7 +918,7 @@ static void gelic_net_pass_skb_up(struct gelic_descr *descr,
|
||||
data_error = be32_to_cpu(descr->data_error);
|
||||
/* unmap skb buffer */
|
||||
dma_unmap_single(ctodev(card), be32_to_cpu(descr->buf_addr),
|
||||
GELIC_NET_MAX_MTU,
|
||||
GELIC_NET_MAX_FRAME,
|
||||
DMA_FROM_DEVICE);
|
||||
|
||||
skb_put(skb, be32_to_cpu(descr->valid_size)?
|
||||
|
@ -19,8 +19,9 @@
|
||||
#define GELIC_NET_RX_DESCRIPTORS 128 /* num of descriptors */
|
||||
#define GELIC_NET_TX_DESCRIPTORS 128 /* num of descriptors */
|
||||
|
||||
#define GELIC_NET_MAX_MTU VLAN_ETH_FRAME_LEN
|
||||
#define GELIC_NET_MIN_MTU VLAN_ETH_ZLEN
|
||||
#define GELIC_NET_MAX_FRAME 2312
|
||||
#define GELIC_NET_MAX_MTU 2294
|
||||
#define GELIC_NET_MIN_MTU 64
|
||||
#define GELIC_NET_RXBUF_ALIGN 128
|
||||
#define GELIC_CARD_RX_CSUM_DEFAULT 1 /* hw chksum */
|
||||
#define GELIC_NET_WATCHDOG_TIMEOUT 5*HZ
|
||||
|
@ -503,6 +503,11 @@ static void
|
||||
xirc2ps_detach(struct pcmcia_device *link)
|
||||
{
|
||||
struct net_device *dev = link->priv;
|
||||
struct local_info *local = netdev_priv(dev);
|
||||
|
||||
netif_carrier_off(dev);
|
||||
netif_tx_disable(dev);
|
||||
cancel_work_sync(&local->tx_timeout_task);
|
||||
|
||||
dev_dbg(&link->dev, "detach\n");
|
||||
|
||||
|
@ -1945,10 +1945,9 @@ static int ca8210_skb_tx(
|
||||
struct ca8210_priv *priv
|
||||
)
|
||||
{
|
||||
int status;
|
||||
struct ieee802154_hdr header = { };
|
||||
struct secspec secspec;
|
||||
unsigned int mac_len;
|
||||
int mac_len, status;
|
||||
|
||||
dev_dbg(&priv->spi->dev, "%s called\n", __func__);
|
||||
|
||||
@ -1956,6 +1955,8 @@ static int ca8210_skb_tx(
|
||||
* packet
|
||||
*/
|
||||
mac_len = ieee802154_hdr_peek_addrs(skb, &header);
|
||||
if (mac_len < 0)
|
||||
return mac_len;
|
||||
|
||||
secspec.security_level = header.sec.level;
|
||||
secspec.key_id_mode = header.sec.key_id_mode;
|
||||
|
@ -159,7 +159,7 @@ int gsi_trans_pool_init_dma(struct device *dev, struct gsi_trans_pool *pool,
|
||||
* gsi_trans_pool_exit_dma() can assume the total allocated
|
||||
* size is exactly (count * size).
|
||||
*/
|
||||
total_size = get_order(total_size) << PAGE_SHIFT;
|
||||
total_size = PAGE_SIZE << get_order(total_size);
|
||||
|
||||
virt = dma_alloc_coherent(dev, total_size, &addr, GFP_KERNEL);
|
||||
if (!virt)
|
||||
|
@ -104,6 +104,7 @@ static int thunder_mdiobus_pci_probe(struct pci_dev *pdev,
|
||||
if (i >= ARRAY_SIZE(nexus->buses))
|
||||
break;
|
||||
}
|
||||
fwnode_handle_put(fwn);
|
||||
return 0;
|
||||
|
||||
err_release_regions:
|
||||
|
@ -238,21 +238,23 @@ bool of_mdiobus_child_is_phy(struct device_node *child)
|
||||
EXPORT_SYMBOL(of_mdiobus_child_is_phy);
|
||||
|
||||
/**
|
||||
* of_mdiobus_register - Register mii_bus and create PHYs from the device tree
|
||||
* __of_mdiobus_register - Register mii_bus and create PHYs from the device tree
|
||||
* @mdio: pointer to mii_bus structure
|
||||
* @np: pointer to device_node of MDIO bus.
|
||||
* @owner: module owning the @mdio object.
|
||||
*
|
||||
* This function registers the mii_bus structure and registers a phy_device
|
||||
* for each child node of @np.
|
||||
*/
|
||||
int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
||||
int __of_mdiobus_register(struct mii_bus *mdio, struct device_node *np,
|
||||
struct module *owner)
|
||||
{
|
||||
struct device_node *child;
|
||||
bool scanphys = false;
|
||||
int addr, rc;
|
||||
|
||||
if (!np)
|
||||
return mdiobus_register(mdio);
|
||||
return __mdiobus_register(mdio, owner);
|
||||
|
||||
/* Do not continue if the node is disabled */
|
||||
if (!of_device_is_available(np))
|
||||
@ -272,7 +274,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
||||
of_property_read_u32(np, "reset-post-delay-us", &mdio->reset_post_delay_us);
|
||||
|
||||
/* Register the MDIO bus */
|
||||
rc = mdiobus_register(mdio);
|
||||
rc = __mdiobus_register(mdio, owner);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
@ -336,7 +338,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
||||
mdiobus_unregister(mdio);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(of_mdiobus_register);
|
||||
EXPORT_SYMBOL(__of_mdiobus_register);
|
||||
|
||||
/**
|
||||
* of_mdio_find_device - Given a device tree node, find the mdio_device
|
||||
|
@ -130,13 +130,9 @@ static u16 net_failover_select_queue(struct net_device *dev,
|
||||
txq = ops->ndo_select_queue(primary_dev, skb, sb_dev);
|
||||
else
|
||||
txq = netdev_pick_tx(primary_dev, skb, NULL);
|
||||
|
||||
qdisc_skb_cb(skb)->slave_dev_queue_mapping = skb->queue_mapping;
|
||||
|
||||
return txq;
|
||||
}
|
||||
|
||||
} else {
|
||||
txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
|
||||
}
|
||||
|
||||
/* Save the original txq to restore before passing to the driver */
|
||||
qdisc_skb_cb(skb)->slave_dev_queue_mapping = skb->queue_mapping;
|
||||
|
@ -553,15 +553,13 @@ static int dp83869_of_init(struct phy_device *phydev)
|
||||
&dp83869_internal_delay[0],
|
||||
delay_size, true);
|
||||
if (dp83869->rx_int_delay < 0)
|
||||
dp83869->rx_int_delay =
|
||||
dp83869_internal_delay[DP83869_CLK_DELAY_DEF];
|
||||
dp83869->rx_int_delay = DP83869_CLK_DELAY_DEF;
|
||||
|
||||
dp83869->tx_int_delay = phy_get_internal_delay(phydev, dev,
|
||||
&dp83869_internal_delay[0],
|
||||
delay_size, false);
|
||||
if (dp83869->tx_int_delay < 0)
|
||||
dp83869->tx_int_delay =
|
||||
dp83869_internal_delay[DP83869_CLK_DELAY_DEF];
|
||||
dp83869->tx_int_delay = DP83869_CLK_DELAY_DEF;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -98,13 +98,14 @@ EXPORT_SYMBOL(__devm_mdiobus_register);
|
||||
|
||||
#if IS_ENABLED(CONFIG_OF_MDIO)
|
||||
/**
|
||||
* devm_of_mdiobus_register - Resource managed variant of of_mdiobus_register()
|
||||
* __devm_of_mdiobus_register - Resource managed variant of of_mdiobus_register()
|
||||
* @dev: Device to register mii_bus for
|
||||
* @mdio: MII bus structure to register
|
||||
* @np: Device node to parse
|
||||
* @owner: Owning module
|
||||
*/
|
||||
int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio,
|
||||
struct device_node *np)
|
||||
int __devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio,
|
||||
struct device_node *np, struct module *owner)
|
||||
{
|
||||
struct mdiobus_devres *dr;
|
||||
int ret;
|
||||
@ -117,7 +118,7 @@ int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio,
|
||||
if (!dr)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = of_mdiobus_register(mdio, np);
|
||||
ret = __of_mdiobus_register(mdio, np, owner);
|
||||
if (ret) {
|
||||
devres_free(dr);
|
||||
return ret;
|
||||
@ -127,7 +128,7 @@ int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio,
|
||||
devres_add(dev, dr);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(devm_of_mdiobus_register);
|
||||
EXPORT_SYMBOL(__devm_of_mdiobus_register);
|
||||
#endif /* CONFIG_OF_MDIO */
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -56,6 +56,18 @@ static const char *phy_state_to_str(enum phy_state st)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void phy_process_state_change(struct phy_device *phydev,
|
||||
enum phy_state old_state)
|
||||
{
|
||||
if (old_state != phydev->state) {
|
||||
phydev_dbg(phydev, "PHY state change %s -> %s\n",
|
||||
phy_state_to_str(old_state),
|
||||
phy_state_to_str(phydev->state));
|
||||
if (phydev->drv && phydev->drv->link_change_notify)
|
||||
phydev->drv->link_change_notify(phydev);
|
||||
}
|
||||
}
|
||||
|
||||
static void phy_link_up(struct phy_device *phydev)
|
||||
{
|
||||
phydev->phy_link_change(phydev, true);
|
||||
@ -1110,6 +1122,7 @@ EXPORT_SYMBOL(phy_free_interrupt);
|
||||
void phy_stop(struct phy_device *phydev)
|
||||
{
|
||||
struct net_device *dev = phydev->attached_dev;
|
||||
enum phy_state old_state;
|
||||
|
||||
if (!phy_is_started(phydev) && phydev->state != PHY_DOWN) {
|
||||
WARN(1, "called from state %s\n",
|
||||
@ -1118,6 +1131,7 @@ void phy_stop(struct phy_device *phydev)
|
||||
}
|
||||
|
||||
mutex_lock(&phydev->lock);
|
||||
old_state = phydev->state;
|
||||
|
||||
if (phydev->state == PHY_CABLETEST) {
|
||||
phy_abort_cable_test(phydev);
|
||||
@ -1128,6 +1142,7 @@ void phy_stop(struct phy_device *phydev)
|
||||
sfp_upstream_stop(phydev->sfp_bus);
|
||||
|
||||
phydev->state = PHY_HALTED;
|
||||
phy_process_state_change(phydev, old_state);
|
||||
|
||||
mutex_unlock(&phydev->lock);
|
||||
|
||||
@ -1242,13 +1257,7 @@ void phy_state_machine(struct work_struct *work)
|
||||
if (err < 0)
|
||||
phy_error(phydev);
|
||||
|
||||
if (old_state != phydev->state) {
|
||||
phydev_dbg(phydev, "PHY state change %s -> %s\n",
|
||||
phy_state_to_str(old_state),
|
||||
phy_state_to_str(phydev->state));
|
||||
if (phydev->drv && phydev->drv->link_change_notify)
|
||||
phydev->drv->link_change_notify(phydev);
|
||||
}
|
||||
phy_process_state_change(phydev, old_state);
|
||||
|
||||
/* Only re-schedule a PHY state machine change if we are polling the
|
||||
* PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving
|
||||
|
@ -663,6 +663,11 @@ static const struct usb_device_id mbim_devs[] = {
|
||||
.driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle,
|
||||
},
|
||||
|
||||
/* Telit FE990 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x1bc7, 0x1081, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
||||
.driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle,
|
||||
},
|
||||
|
||||
/* default entry */
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
|
||||
.driver_info = (unsigned long)&cdc_mbim_info_zlp,
|
||||
|
@ -1297,6 +1297,7 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1060, 2)}, /* Telit LN920 */
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1070, 2)}, /* Telit FN990 */
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1080, 2)}, /* Telit FE990 */
|
||||
{QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */
|
||||
{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */
|
||||
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
||||
|
@ -1824,6 +1824,12 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
size = (u16)((header & RX_STS_FL_) >> 16);
|
||||
align_count = (4 - ((size + NET_IP_ALIGN) % 4)) % 4;
|
||||
|
||||
if (unlikely(size > skb->len)) {
|
||||
netif_dbg(dev, rx_err, dev->net,
|
||||
"size err header=0x%08x\n", header);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (unlikely(header & RX_STS_ES_)) {
|
||||
netif_dbg(dev, rx_err, dev->net,
|
||||
"Error header=0x%08x\n", header);
|
||||
|
@ -166,7 +166,7 @@ struct xenvif_queue { /* Per-queue data for xenvif */
|
||||
struct pending_tx_info pending_tx_info[MAX_PENDING_REQS];
|
||||
grant_handle_t grant_tx_handle[MAX_PENDING_REQS];
|
||||
|
||||
struct gnttab_copy tx_copy_ops[MAX_PENDING_REQS];
|
||||
struct gnttab_copy tx_copy_ops[2 * MAX_PENDING_REQS];
|
||||
struct gnttab_map_grant_ref tx_map_ops[MAX_PENDING_REQS];
|
||||
struct gnttab_unmap_grant_ref tx_unmap_ops[MAX_PENDING_REQS];
|
||||
/* passed to gnttab_[un]map_refs with pages under (un)mapping */
|
||||
|
@ -334,6 +334,7 @@ static int xenvif_count_requests(struct xenvif_queue *queue,
|
||||
struct xenvif_tx_cb {
|
||||
u16 copy_pending_idx[XEN_NETBK_LEGACY_SLOTS_MAX + 1];
|
||||
u8 copy_count;
|
||||
u32 split_mask;
|
||||
};
|
||||
|
||||
#define XENVIF_TX_CB(skb) ((struct xenvif_tx_cb *)(skb)->cb)
|
||||
@ -361,6 +362,8 @@ static inline struct sk_buff *xenvif_alloc_skb(unsigned int size)
|
||||
struct sk_buff *skb =
|
||||
alloc_skb(size + NET_SKB_PAD + NET_IP_ALIGN,
|
||||
GFP_ATOMIC | __GFP_NOWARN);
|
||||
|
||||
BUILD_BUG_ON(sizeof(*XENVIF_TX_CB(skb)) > sizeof(skb->cb));
|
||||
if (unlikely(skb == NULL))
|
||||
return NULL;
|
||||
|
||||
@ -396,11 +399,13 @@ static void xenvif_get_requests(struct xenvif_queue *queue,
|
||||
nr_slots = shinfo->nr_frags + 1;
|
||||
|
||||
copy_count(skb) = 0;
|
||||
XENVIF_TX_CB(skb)->split_mask = 0;
|
||||
|
||||
/* Create copy ops for exactly data_len bytes into the skb head. */
|
||||
__skb_put(skb, data_len);
|
||||
while (data_len > 0) {
|
||||
int amount = data_len > txp->size ? txp->size : data_len;
|
||||
bool split = false;
|
||||
|
||||
cop->source.u.ref = txp->gref;
|
||||
cop->source.domid = queue->vif->domid;
|
||||
@ -413,6 +418,13 @@ static void xenvif_get_requests(struct xenvif_queue *queue,
|
||||
cop->dest.u.gmfn = virt_to_gfn(skb->data + skb_headlen(skb)
|
||||
- data_len);
|
||||
|
||||
/* Don't cross local page boundary! */
|
||||
if (cop->dest.offset + amount > XEN_PAGE_SIZE) {
|
||||
amount = XEN_PAGE_SIZE - cop->dest.offset;
|
||||
XENVIF_TX_CB(skb)->split_mask |= 1U << copy_count(skb);
|
||||
split = true;
|
||||
}
|
||||
|
||||
cop->len = amount;
|
||||
cop->flags = GNTCOPY_source_gref;
|
||||
|
||||
@ -420,6 +432,7 @@ static void xenvif_get_requests(struct xenvif_queue *queue,
|
||||
pending_idx = queue->pending_ring[index];
|
||||
callback_param(queue, pending_idx).ctx = NULL;
|
||||
copy_pending_idx(skb, copy_count(skb)) = pending_idx;
|
||||
if (!split)
|
||||
copy_count(skb)++;
|
||||
|
||||
cop++;
|
||||
@ -441,7 +454,8 @@ static void xenvif_get_requests(struct xenvif_queue *queue,
|
||||
nr_slots--;
|
||||
} else {
|
||||
/* The copy op partially covered the tx_request.
|
||||
* The remainder will be mapped.
|
||||
* The remainder will be mapped or copied in the next
|
||||
* iteration.
|
||||
*/
|
||||
txp->offset += amount;
|
||||
txp->size -= amount;
|
||||
@ -539,6 +553,13 @@ static int xenvif_tx_check_gop(struct xenvif_queue *queue,
|
||||
pending_idx = copy_pending_idx(skb, i);
|
||||
|
||||
newerr = (*gopp_copy)->status;
|
||||
|
||||
/* Split copies need to be handled together. */
|
||||
if (XENVIF_TX_CB(skb)->split_mask & (1U << i)) {
|
||||
(*gopp_copy)++;
|
||||
if (!newerr)
|
||||
newerr = (*gopp_copy)->status;
|
||||
}
|
||||
if (likely(!newerr)) {
|
||||
/* The first frag might still have this slot mapped */
|
||||
if (i < copy_count(skb) - 1 || !sharedslot)
|
||||
|
@ -764,32 +764,34 @@ static const struct pinconf_ops amd_pinconf_ops = {
|
||||
.pin_config_group_set = amd_pinconf_group_set,
|
||||
};
|
||||
|
||||
static void amd_gpio_irq_init(struct amd_gpio *gpio_dev)
|
||||
static void amd_gpio_irq_init_pin(struct amd_gpio *gpio_dev, int pin)
|
||||
{
|
||||
struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
const struct pin_desc *pd;
|
||||
unsigned long flags;
|
||||
u32 pin_reg, mask;
|
||||
int i;
|
||||
|
||||
mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
|
||||
BIT(INTERRUPT_MASK_OFF) | BIT(INTERRUPT_ENABLE_OFF) |
|
||||
BIT(WAKE_CNTRL_OFF_S4);
|
||||
|
||||
for (i = 0; i < desc->npins; i++) {
|
||||
int pin = desc->pins[i].number;
|
||||
const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin);
|
||||
|
||||
pd = pin_desc_get(gpio_dev->pctrl, pin);
|
||||
if (!pd)
|
||||
continue;
|
||||
return;
|
||||
|
||||
raw_spin_lock_irqsave(&gpio_dev->lock, flags);
|
||||
|
||||
pin_reg = readl(gpio_dev->base + i * 4);
|
||||
pin_reg = readl(gpio_dev->base + pin * 4);
|
||||
pin_reg &= ~mask;
|
||||
writel(pin_reg, gpio_dev->base + i * 4);
|
||||
|
||||
writel(pin_reg, gpio_dev->base + pin * 4);
|
||||
raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void amd_gpio_irq_init(struct amd_gpio *gpio_dev)
|
||||
{
|
||||
struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < desc->npins; i++)
|
||||
amd_gpio_irq_init_pin(gpio_dev, i);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@ -842,8 +844,10 @@ static int amd_gpio_resume(struct device *dev)
|
||||
for (i = 0; i < desc->npins; i++) {
|
||||
int pin = desc->pins[i].number;
|
||||
|
||||
if (!amd_gpio_should_save(gpio_dev, pin))
|
||||
if (!amd_gpio_should_save(gpio_dev, pin)) {
|
||||
amd_gpio_irq_init_pin(gpio_dev, pin);
|
||||
continue;
|
||||
}
|
||||
|
||||
raw_spin_lock_irqsave(&gpio_dev->lock, flags);
|
||||
gpio_dev->saved_regs[i] |= readl(gpio_dev->base + pin * 4) & PIN_IRQ_PENDING;
|
||||
|
@ -1139,7 +1139,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
|
||||
dev_err(dev, "can't add the irq domain\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
atmel_pioctrl->irq_domain->name = "atmel gpio";
|
||||
|
||||
for (i = 0; i < atmel_pioctrl->npins; i++) {
|
||||
int irq = irq_create_mapping(atmel_pioctrl->irq_domain, i);
|
||||
|
@ -575,7 +575,7 @@ static int ocelot_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
regmap_update_bits(info->map, REG_ALT(0, info, pin->pin),
|
||||
BIT(p), f << p);
|
||||
regmap_update_bits(info->map, REG_ALT(1, info, pin->pin),
|
||||
BIT(p), f << (p - 1));
|
||||
BIT(p), (f >> 1) << p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ static long cros_ec_chardev_ioctl_xcmd(struct cros_ec_dev *ec, void __user *arg)
|
||||
u_cmd.insize > EC_MAX_MSG_BYTES)
|
||||
return -EINVAL;
|
||||
|
||||
s_cmd = kmalloc(sizeof(*s_cmd) + max(u_cmd.outsize, u_cmd.insize),
|
||||
s_cmd = kzalloc(sizeof(*s_cmd) + max(u_cmd.outsize, u_cmd.insize),
|
||||
GFP_KERNEL);
|
||||
if (!s_cmd)
|
||||
return -ENOMEM;
|
||||
|
@ -448,11 +448,9 @@ static ssize_t bq24190_sysfs_show(struct device *dev,
|
||||
if (!info)
|
||||
return -EINVAL;
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = bq24190_read_mask(bdi, info->reg, info->mask, info->shift, &v);
|
||||
if (ret)
|
||||
@ -483,11 +481,9 @@ static ssize_t bq24190_sysfs_store(struct device *dev,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = bq24190_write_mask(bdi, info->reg, info->mask, info->shift, v);
|
||||
if (ret)
|
||||
@ -506,10 +502,9 @@ static int bq24190_set_charge_mode(struct regulator_dev *dev, u8 val)
|
||||
struct bq24190_dev_info *bdi = rdev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0) {
|
||||
dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", ret);
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -539,10 +534,9 @@ static int bq24190_vbus_is_enabled(struct regulator_dev *dev)
|
||||
int ret;
|
||||
u8 val;
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0) {
|
||||
dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", ret);
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1083,11 +1077,9 @@ static int bq24190_charger_get_property(struct power_supply *psy,
|
||||
|
||||
dev_dbg(bdi->dev, "prop: %d\n", psp);
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_CHARGE_TYPE:
|
||||
@ -1157,11 +1149,9 @@ static int bq24190_charger_set_property(struct power_supply *psy,
|
||||
|
||||
dev_dbg(bdi->dev, "prop: %d\n", psp);
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_ONLINE:
|
||||
@ -1420,11 +1410,9 @@ static int bq24190_battery_get_property(struct power_supply *psy,
|
||||
dev_warn(bdi->dev, "warning: /sys/class/power_supply/bq24190-battery is deprecated\n");
|
||||
dev_dbg(bdi->dev, "prop: %d\n", psp);
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_STATUS:
|
||||
@ -1468,11 +1456,9 @@ static int bq24190_battery_set_property(struct power_supply *psy,
|
||||
dev_warn(bdi->dev, "warning: /sys/class/power_supply/bq24190-battery is deprecated\n");
|
||||
dev_dbg(bdi->dev, "prop: %d\n", psp);
|
||||
|
||||
ret = pm_runtime_get_sync(bdi->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
ret = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_ONLINE:
|
||||
@ -1626,10 +1612,9 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
|
||||
int error;
|
||||
|
||||
bdi->irq_event = true;
|
||||
error = pm_runtime_get_sync(bdi->dev);
|
||||
error = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (error < 0) {
|
||||
dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", error);
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
bq24190_check_status(bdi);
|
||||
@ -1849,11 +1834,10 @@ static int bq24190_remove(struct i2c_client *client)
|
||||
struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
|
||||
int error;
|
||||
|
||||
error = pm_runtime_get_sync(bdi->dev);
|
||||
if (error < 0) {
|
||||
cancel_delayed_work_sync(&bdi->input_current_limit_work);
|
||||
error = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (error < 0)
|
||||
dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", error);
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
}
|
||||
|
||||
bq24190_register_reset(bdi);
|
||||
if (bdi->battery)
|
||||
@ -1902,11 +1886,9 @@ static __maybe_unused int bq24190_pm_suspend(struct device *dev)
|
||||
struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
|
||||
int error;
|
||||
|
||||
error = pm_runtime_get_sync(bdi->dev);
|
||||
if (error < 0) {
|
||||
error = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (error < 0)
|
||||
dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", error);
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
}
|
||||
|
||||
bq24190_register_reset(bdi);
|
||||
|
||||
@ -1927,11 +1909,9 @@ static __maybe_unused int bq24190_pm_resume(struct device *dev)
|
||||
bdi->f_reg = 0;
|
||||
bdi->ss_reg = BQ24190_REG_SS_VBUS_STAT_MASK; /* impossible state */
|
||||
|
||||
error = pm_runtime_get_sync(bdi->dev);
|
||||
if (error < 0) {
|
||||
error = pm_runtime_resume_and_get(bdi->dev);
|
||||
if (error < 0)
|
||||
dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", error);
|
||||
pm_runtime_put_noidle(bdi->dev);
|
||||
}
|
||||
|
||||
bq24190_register_reset(bdi);
|
||||
bq24190_set_config(bdi);
|
||||
|
@ -662,6 +662,7 @@ static int da9150_charger_remove(struct platform_device *pdev)
|
||||
|
||||
if (!IS_ERR_OR_NULL(charger->usb_phy))
|
||||
usb_unregister_notifier(charger->usb_phy, &charger->otg_nb);
|
||||
cancel_work_sync(&charger->otg_work);
|
||||
|
||||
power_supply_unregister(charger->battery);
|
||||
power_supply_unregister(charger->usb);
|
||||
|
@ -601,7 +601,7 @@ static int ptp_qoriq_probe(struct platform_device *dev)
|
||||
return 0;
|
||||
|
||||
no_clock:
|
||||
iounmap(ptp_qoriq->base);
|
||||
iounmap(base);
|
||||
no_ioremap:
|
||||
release_resource(ptp_qoriq->rsrc);
|
||||
no_resource:
|
||||
|
@ -175,7 +175,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
|
||||
drvdata->enable_clock = devm_clk_get(dev, NULL);
|
||||
if (IS_ERR(drvdata->enable_clock)) {
|
||||
dev_err(dev, "Can't get enable-clock from devicetree\n");
|
||||
return -ENOENT;
|
||||
return PTR_ERR(drvdata->enable_clock);
|
||||
}
|
||||
} else {
|
||||
drvdata->desc.ops = &fixed_voltage_ops;
|
||||
|
@ -82,8 +82,9 @@ static void vfio_ap_queue_dev_remove(struct ap_device *apdev)
|
||||
|
||||
static void vfio_ap_matrix_dev_release(struct device *dev)
|
||||
{
|
||||
struct ap_matrix_dev *matrix_dev = dev_get_drvdata(dev);
|
||||
struct ap_matrix_dev *matrix_dev;
|
||||
|
||||
matrix_dev = container_of(dev, struct ap_matrix_dev, device);
|
||||
kfree(matrix_dev);
|
||||
}
|
||||
|
||||
|
@ -1036,10 +1036,12 @@ static int alua_activate(struct scsi_device *sdev,
|
||||
rcu_read_unlock();
|
||||
mutex_unlock(&h->init_mutex);
|
||||
|
||||
if (alua_rtpg_queue(pg, sdev, qdata, true))
|
||||
if (alua_rtpg_queue(pg, sdev, qdata, true)) {
|
||||
fn = NULL;
|
||||
else
|
||||
} else {
|
||||
kfree(qdata);
|
||||
err = SCSI_DH_DEV_OFFLINED;
|
||||
}
|
||||
kref_put(&pg->kref, release_port_group);
|
||||
out:
|
||||
if (fn)
|
||||
|
@ -2402,8 +2402,7 @@ static int interrupt_preinit_v3_hw(struct hisi_hba *hisi_hba)
|
||||
hisi_hba->cq_nvecs = vectors - BASE_VECTORS_V3_HW;
|
||||
shost->nr_hw_queues = hisi_hba->cq_nvecs;
|
||||
|
||||
devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev);
|
||||
return 0;
|
||||
return devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev);
|
||||
}
|
||||
|
||||
static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba)
|
||||
|
@ -20816,20 +20816,20 @@ lpfc_get_io_buf_from_private_pool(struct lpfc_hba *phba,
|
||||
static struct lpfc_io_buf *
|
||||
lpfc_get_io_buf_from_expedite_pool(struct lpfc_hba *phba)
|
||||
{
|
||||
struct lpfc_io_buf *lpfc_ncmd;
|
||||
struct lpfc_io_buf *lpfc_ncmd = NULL, *iter;
|
||||
struct lpfc_io_buf *lpfc_ncmd_next;
|
||||
unsigned long iflag;
|
||||
struct lpfc_epd_pool *epd_pool;
|
||||
|
||||
epd_pool = &phba->epd_pool;
|
||||
lpfc_ncmd = NULL;
|
||||
|
||||
spin_lock_irqsave(&epd_pool->lock, iflag);
|
||||
if (epd_pool->count > 0) {
|
||||
list_for_each_entry_safe(lpfc_ncmd, lpfc_ncmd_next,
|
||||
list_for_each_entry_safe(iter, lpfc_ncmd_next,
|
||||
&epd_pool->list, list) {
|
||||
list_del(&lpfc_ncmd->list);
|
||||
list_del(&iter->list);
|
||||
epd_pool->count--;
|
||||
lpfc_ncmd = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4656,7 +4656,7 @@ int megasas_task_abort_fusion(struct scsi_cmnd *scmd)
|
||||
devhandle = megasas_get_tm_devhandle(scmd->device);
|
||||
|
||||
if (devhandle == (u16)ULONG_MAX) {
|
||||
ret = SUCCESS;
|
||||
ret = FAILED;
|
||||
sdev_printk(KERN_INFO, scmd->device,
|
||||
"task abort issued for invalid devhandle\n");
|
||||
mutex_unlock(&instance->reset_mutex);
|
||||
@ -4726,7 +4726,7 @@ int megasas_reset_target_fusion(struct scsi_cmnd *scmd)
|
||||
devhandle = megasas_get_tm_devhandle(scmd->device);
|
||||
|
||||
if (devhandle == (u16)ULONG_MAX) {
|
||||
ret = SUCCESS;
|
||||
ret = FAILED;
|
||||
sdev_printk(KERN_INFO, scmd->device,
|
||||
"target reset issued for invalid devhandle\n");
|
||||
mutex_unlock(&instance->reset_mutex);
|
||||
|
@ -1762,6 +1762,17 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
|
||||
for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) {
|
||||
sp = req->outstanding_cmds[cnt];
|
||||
if (sp) {
|
||||
/*
|
||||
* perform lockless completion during driver unload
|
||||
*/
|
||||
if (qla2x00_chip_is_down(vha)) {
|
||||
req->outstanding_cmds[cnt] = NULL;
|
||||
spin_unlock_irqrestore(qp->qp_lock_ptr, flags);
|
||||
sp->done(sp, res);
|
||||
spin_lock_irqsave(qp->qp_lock_ptr, flags);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (sp->cmd_type) {
|
||||
case TYPE_SRB:
|
||||
qla2x00_abort_srb(qp, sp, res, &flags);
|
||||
|
@ -232,6 +232,7 @@ static struct {
|
||||
{"SGI", "RAID5", "*", BLIST_SPARSELUN},
|
||||
{"SGI", "TP9100", "*", BLIST_REPORTLUN2},
|
||||
{"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
|
||||
{"SKhynix", "H28U74301AMR", NULL, BLIST_SKIP_VPD_PAGES},
|
||||
{"IBM", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
|
||||
{"SUN", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
|
||||
{"DELL", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
|
||||
|
@ -1013,6 +1013,22 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
|
||||
goto do_work;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for "Operating parameters have changed"
|
||||
* due to Hyper-V changing the VHD/VHDX BlockSize
|
||||
* when adding/removing a differencing disk. This
|
||||
* causes discard_granularity to change, so do a
|
||||
* rescan to pick up the new granularity. We don't
|
||||
* want scsi_report_sense() to output a message
|
||||
* that a sysadmin wouldn't know what to do with.
|
||||
*/
|
||||
if ((asc == 0x3f) && (ascq != 0x03) &&
|
||||
(ascq != 0x0e)) {
|
||||
process_err_fn = storvsc_device_scan;
|
||||
set_host_byte(scmnd, DID_REQUEUE);
|
||||
goto do_work;
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, let upper layer deal with the
|
||||
* error when sense message is present
|
||||
|
@ -9485,5 +9485,6 @@ module_exit(ufshcd_core_exit);
|
||||
MODULE_AUTHOR("Santosh Yaragnavi <santosh.sy@samsung.com>");
|
||||
MODULE_AUTHOR("Vinayak Holikatti <h.vinayak@samsung.com>");
|
||||
MODULE_DESCRIPTION("Generic UFS host controller driver Core");
|
||||
MODULE_SOFTDEP("pre: governor_simpleondemand");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(UFSHCD_DRIVER_VERSION);
|
||||
|
@ -1262,18 +1262,20 @@ static struct iscsi_param *iscsi_check_key(
|
||||
return param;
|
||||
|
||||
if (!(param->phase & phase)) {
|
||||
pr_err("Key \"%s\" may not be negotiated during ",
|
||||
param->name);
|
||||
char *phase_name;
|
||||
|
||||
switch (phase) {
|
||||
case PHASE_SECURITY:
|
||||
pr_debug("Security phase.\n");
|
||||
phase_name = "Security";
|
||||
break;
|
||||
case PHASE_OPERATIONAL:
|
||||
pr_debug("Operational phase.\n");
|
||||
phase_name = "Operational";
|
||||
break;
|
||||
default:
|
||||
pr_debug("Unknown phase.\n");
|
||||
phase_name = "Unknown";
|
||||
}
|
||||
pr_err("Key \"%s\" may not be negotiated during %s phase.\n",
|
||||
param->name, phase_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -267,35 +267,34 @@ int amdtee_open_session(struct tee_context *ctx,
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Open session with loaded TA */
|
||||
handle_open_session(arg, &session_info, param);
|
||||
if (arg->ret != TEEC_SUCCESS) {
|
||||
pr_err("open_session failed %d\n", arg->ret);
|
||||
handle_unload_ta(ta_handle);
|
||||
kref_put(&sess->refcount, destroy_session);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Find an empty session index for the given TA */
|
||||
spin_lock(&sess->lock);
|
||||
i = find_first_zero_bit(sess->sess_mask, TEE_NUM_SESSIONS);
|
||||
if (i < TEE_NUM_SESSIONS)
|
||||
if (i < TEE_NUM_SESSIONS) {
|
||||
sess->session_info[i] = session_info;
|
||||
set_session_id(ta_handle, i, &arg->session);
|
||||
set_bit(i, sess->sess_mask);
|
||||
}
|
||||
spin_unlock(&sess->lock);
|
||||
|
||||
if (i >= TEE_NUM_SESSIONS) {
|
||||
pr_err("reached maximum session count %d\n", TEE_NUM_SESSIONS);
|
||||
handle_close_session(ta_handle, session_info);
|
||||
handle_unload_ta(ta_handle);
|
||||
kref_put(&sess->refcount, destroy_session);
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Open session with loaded TA */
|
||||
handle_open_session(arg, &session_info, param);
|
||||
if (arg->ret != TEEC_SUCCESS) {
|
||||
pr_err("open_session failed %d\n", arg->ret);
|
||||
spin_lock(&sess->lock);
|
||||
clear_bit(i, sess->sess_mask);
|
||||
spin_unlock(&sess->lock);
|
||||
handle_unload_ta(ta_handle);
|
||||
kref_put(&sess->refcount, destroy_session);
|
||||
goto out;
|
||||
}
|
||||
|
||||
sess->session_info[i] = session_info;
|
||||
set_session_id(ta_handle, i, &arg->session);
|
||||
out:
|
||||
free_pages((u64)ta, get_order(ta_size));
|
||||
return rc;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user