mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
Merge 5.15.113 into android14-5.15-lts
Changes in 5.15.113
drm/mipi-dsi: Set the fwnode for mipi_dsi_device
ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings
net: mdio: mvusb: Fix an error handling path in mvusb_mdio_probe()
scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend
tick/broadcast: Make broadcast device replacement work correctly
linux/dim: Do nothing if no time delta between samples
net: stmmac: switch to use interrupt for hw crosstimestamping
net: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register
net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
netfilter: nf_tables: always release netdev hooks from notifier
netfilter: conntrack: fix possible bug_on with enable_hooks=1
netlink: annotate accesses to nlk->cb_running
net: annotate sk->sk_err write from do_recvmmsg()
net: deal with most data-races in sk_wait_event()
net: add vlan_get_protocol_and_depth() helper
tcp: add annotations around sk->sk_shutdown accesses
gve: Remove the code of clearing PBA bit
ipvlan:Fix out-of-bounds caused by unclear skb->cb
net: datagram: fix data-races in datagram_poll()
af_unix: Fix a data race of sk->sk_receive_queue->qlen.
af_unix: Fix data races around sk->sk_shutdown.
drm/i915/dp: prevent potential div-by-zero
fbdev: arcfb: Fix error handling in arcfb_probe()
ext4: remove an unused variable warning with CONFIG_QUOTA=n
ext4: reflect error codes from ext4_multi_mount_protect() to its callers
ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled
ext4: fix lockdep warning when enabling MMP
ext4: allow to find by goal if EXT4_MB_HINT_GOAL_ONLY is set
ext4: allow ext4_get_group_info() to fail
refscale: Move shutdown from wait_event() to wait_event_idle()
rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access
fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode()
drm/displayid: add displayid_get_header() and check bounds better
drm/amd/display: Use DC_LOG_DC in the trasform pixel function
regmap: cache: Return error in cache sync operations for REGCACHE_NONE
arm64: dts: qcom: msm8996: Add missing DWC3 quirks
media: cx23885: Fix a null-ptr-deref bug in buffer_prepare() and buffer_finish()
media: pci: tw68: Fix null-ptr-deref bug in buf prepare and finish
memstick: r592: Fix UAF bug in r592_remove due to race condition
firmware: arm_sdei: Fix sleep from invalid context BUG
ACPI: EC: Fix oops when removing custom query handlers
remoteproc: stm32_rproc: Add mutex protection for workqueue
drm/tegra: Avoid potential 32-bit integer overflow
drm/msm/dp: Clean up handling of DP AUX interrupts
ACPICA: Avoid undefined behavior: applying zero offset to null pointer
ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
drm/amd: Fix an out of bounds error in BIOS parser
media: Prefer designated initializers over memset for subdev pad ops
wifi: ath: Silence memcpy run-time false positive warning
bpf: Annotate data races in bpf_local_storage
wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
ext2: Check block size validity during mount
scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow
bnxt: avoid overflow in bnxt_get_nvram_directory()
net: pasemi: Fix return type of pasemi_mac_start_tx()
net: Catch invalid index in XPS mapping
scsi: target: iscsit: Free cmds before session free
lib: cpu_rmap: Avoid use after free on rmap->obj array entries
scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
gfs2: Fix inode height consistency check
scsi: ufs: ufs-pci: Add support for Intel Lunar Lake
ext4: set goal start correctly in ext4_mb_normalize_request
ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()
f2fs: fix to drop all dirty pages during umount() if cp_error is set
f2fs: fix to check readonly condition correctly
samples/bpf: Fix fout leak in hbm's run_bpf_prog
bpf: Add preempt_count_{sub,add} into btf id deny list
wifi: iwlwifi: pcie: fix possible NULL pointer dereference
wifi: iwlwifi: pcie: Fix integer overflow in iwl_write_to_user_buf
null_blk: Always check queue mode setting from configfs
wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
wifi: ath11k: Fix SKB corruption in REO destination ring
nbd: fix incomplete validation of ioctl arg
ipvs: Update width of source for ip_vs_sync_conn_options
Bluetooth: btintel: Add LE States quirk support
Bluetooth: hci_bcm: Fall back to getting bdaddr from EFI if not set
Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
HID: logitech-hidpp: Don't use the USB serial for USB devices
HID: logitech-hidpp: Reconcile USB and Unifying serials
spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3
HID: wacom: generic: Set battery quirk only when we see battery data
usb: typec: tcpm: fix multiple times discover svids error
serial: 8250: Reinit port->pm on port specific driver unbind
mcb-pci: Reallocate memory region to avoid memory overlapping
sched: Fix KCSAN noinstr violation
recordmcount: Fix memory leaks in the uwrite function
RDMA/core: Fix multiple -Warray-bounds warnings
iommu/arm-smmu-qcom: Limit the SMR groups to 128
fs/ntfs3: Fix NULL pointer dereference in 'ni_write_inode'
fs/ntfs3: Enhance the attribute size check
fs/ntfs3: Fix NULL dereference in ni_write_inode
fs/ntfs3: Validate MFT flags before replaying logs
fs/ntfs3: Add length check in indx_get_root
fs/ntfs3: Fix a possible null-pointer dereference in ni_clear()
clk: tegra20: fix gcc-7 constant overflow warning
iommu/arm-smmu-v3: Acknowledge pri/event queue overflow if any
iommu/sprd: Release dma buffer to avoid memory leak
Input: xpad - add constants for GIP interface numbers
phy: st: miphy28lp: use _poll_timeout functions for waits
soundwire: qcom: gracefully handle too many ports in DT
mfd: dln2: Fix memory leak in dln2_probe()
parisc: Replace regular spinlock with spin_trylock on panic path
platform/x86: hp-wmi: Support touchpad on/off
platform/x86: Move existing HP drivers to a new hp subdir
platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct
xfrm: don't check the default policy if the policy allows the packet
Revert "Fix XFRM-I support for nested ESP tunnels"
drm/msm/dp: unregister audio driver during unbind
drm/msm/dpu: Add INTF_5 interrupts
drm/msm/dpu: Move non-MDP_TOP INTF_INTR offsets out of hwio header
drm/msm/dpu: Remove duplicate register defines from INTF
dt-bindings: display/msm: dsi-controller-main: Document qcom, master-dsi and qcom, sync-dual-dsi
ASoC: fsl_micfil: Fix error handler with pm_runtime_enable
cpupower: Make TSC read per CPU for Mperf monitor
af_key: Reject optional tunnel/BEET mode templates in outbound policies
selftests: seg6: disable DAD on IPv6 router cfg for srv6_end_dt4_l3vpn_test
selftets: seg6: disable rp_filter by default in srv6_end_dt4_l3vpn_test
net: fec: Better handle pm_runtime_get() failing in .remove()
net: phy: dp83867: add w/a for packet errors seen with short cables
ALSA: firewire-digi00x: prevent potential use after free
ALSA: hda/realtek: Apply HP B&O top speaker profile to Pavilion 15
vsock: avoid to close connected socket after the timeout
tcp: fix possible sk_priority leak in tcp_v4_send_reset()
serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
serial: 8250_bcm7271: balance clk_enable calls
serial: 8250_bcm7271: fix leak in `brcmuart_probe`
erspan: get the proto with the md version for collect_md
net: hns3: fix output information incomplete for dumping tx queue info with debugfs
net: hns3: fix sending pfc frames after reset issue
net: hns3: fix reset delay time to avoid configuration timeout
media: netup_unidvb: fix use-after-free at del_timer()
SUNRPC: double free xprt_ctxt while still in use
tracing: Introduce helpers to safely handle dynamic-sized sockaddrs
SUNRPC: Clean up svc_deferred_class trace events
SUNRPC: Remove dead code in svc_tcp_release_rqst()
SUNRPC: Remove svc_rqst::rq_xprt_hlen
SUNRPC: always free ctxt when freeing deferred request
SUNRPC: Fix trace_svc_register() call site
drm/exynos: fix g2d_open/close helper function definitions
net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment()
virtio-net: Maintain reverse cleanup order
virtio_net: Fix error unwinding of XDP initialization
tipc: add tipc_bearer_min_mtu to calculate min mtu
tipc: do not update mtu if msg_max is too small in mtu negotiation
tipc: check the bearer min mtu properly when setting it by netlink
s390/cio: include subchannels without devices also for evaluation
net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
net: bcmgenet: Restore phy_stop() depending upon suspend/close
wifi: mac80211: fix min center freq offset tracing
wifi: iwlwifi: mvm: fix cancel_delayed_work_sync() deadlock
wifi: iwlwifi: mvm: don't trust firmware n_channels
scsi: storvsc: Don't pass unused PFNs to Hyper-V host
cassini: Fix a memory leak in the error handling path of cas_init_one()
net: dsa: mv88e6xxx: Fix mv88e6393x EPC write command offset
igb: fix bit_shift to be in [1..8] range
vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit()
netfilter: nf_tables: fix nft_trans type confusion
netfilter: nft_set_rbtree: fix null deref on element insertion
bridge: always declare tunnel functions
ALSA: usb-audio: Add a sample rate workaround for Line6 Pod Go
USB: usbtmc: Fix direction for 0-length ioctl control messages
usb-storage: fix deadlock when a scsi command timeouts more than once
USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value
usb: dwc3: debugfs: Resume dwc3 before accessing registers
usb: gadget: u_ether: Fix host MAC address case
usb: typec: altmodes/displayport: fix pin_assignment_show
xhci-pci: Only run d3cold avoidance quirk for s2idle
xhci: Fix incorrect tracking of free space on transfer rings
ALSA: hda: Fix Oops by 9.1 surround channel names
ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table
ALSA: hda/realtek: Add quirk for Clevo L140AU
ALSA: hda/realtek: Add a quirk for HP EliteDesk 805
ALSA: hda/realtek: Add quirk for 2nd ASUS GU603
can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag
can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag
can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop()
can: kvaser_pciefd: Call request_irq() before enabling interrupts
can: kvaser_pciefd: Empty SRB buffer in probe
can: kvaser_pciefd: Clear listen-only bit if not explicitly requested
can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt
can: kvaser_pciefd: Disable interrupts in probe error path
SMB3: Close all deferred handles of inode in case of handle lease break
SMB3: drop reference to cfile before sending oplock break
ksmbd: smb2: Allow messages padded to 8byte boundary
ksmbd: allocate one more byte for implied bcc[0]
ksmbd: fix wrong UserName check in session_user
ksmbd: fix global-out-of-bounds in smb2_find_context_vals
statfs: enforce statfs[64] structure initialization
serial: Add support for Advantech PCI-1611U card
serial: 8250_exar: Add support for USR298x PCI Modems
serial: qcom-geni: fix enabling deactivated interrupt
thunderbolt: Clear registers properly when auto clear isn't in use
vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
ceph: force updating the msg pointer in non-split case
powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device
tpm/tpm_tis: Disable interrupts for more Lenovo devices
powerpc/64s/radix: Fix soft dirty tracking
nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
s390/qdio: fix do_sqbs() inline assembly constraint
HID: wacom: Force pen out of prox if no events have been received in a while
HID: wacom: Add new Intuos Pro Small (PTH-460) device IDs
HID: wacom: add three styli to wacom_intuos_get_tool_type
Linux 5.15.113
Change-Id: I569d3206b4380293549c195bf71ae101fc818c78
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -64,6 +64,18 @@ properties:
|
||||
Indicates if the DSI controller is driving a panel which needs
|
||||
2 DSI links.
|
||||
|
||||
qcom,master-dsi:
|
||||
type: boolean
|
||||
description: |
|
||||
Indicates if the DSI controller is the master DSI controller when
|
||||
qcom,dual-dsi-mode enabled.
|
||||
|
||||
qcom,sync-dual-dsi:
|
||||
type: boolean
|
||||
description: |
|
||||
Indicates if the DSI controller needs to sync the other DSI controller
|
||||
with MIPI DCS commands when qcom,dual-dsi-mode enabled.
|
||||
|
||||
assigned-clocks:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
@@ -8570,7 +8570,7 @@ F: drivers/net/wireless/intersil/hostap/
|
||||
HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Orphan
|
||||
F: drivers/platform/x86/tc1100-wmi.c
|
||||
F: drivers/platform/x86/hp/tc1100-wmi.c
|
||||
|
||||
HPET: High Precision Event Timers driver
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
@@ -10848,7 +10848,7 @@ M: Eric Piel <eric.piel@tremplin-utc.net>
|
||||
S: Maintained
|
||||
F: Documentation/misc-devices/lis3lv02d.rst
|
||||
F: drivers/misc/lis3lv02d/
|
||||
F: drivers/platform/x86/hp_accel.c
|
||||
F: drivers/platform/x86/hp/hp_accel.c
|
||||
|
||||
LIST KUNIT TEST
|
||||
M: David Gow <davidgow@google.com>
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 15
|
||||
SUBLEVEL = 112
|
||||
SUBLEVEL = 113
|
||||
EXTRAVERSION =
|
||||
NAME = Trick or Treat
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**
|
||||
/*
|
||||
* arch/arm/mac-sa1100/jornada720_ssp.c
|
||||
*
|
||||
* Copyright (C) 2006/2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
|
||||
@@ -26,6 +26,7 @@ static unsigned long jornada_ssp_flags;
|
||||
|
||||
/**
|
||||
* jornada_ssp_reverse - reverses input byte
|
||||
* @byte: input byte to reverse
|
||||
*
|
||||
* we need to reverse all data we receive from the mcu due to its physical location
|
||||
* returns : 01110111 -> 11101110
|
||||
@@ -46,6 +47,7 @@ EXPORT_SYMBOL(jornada_ssp_reverse);
|
||||
|
||||
/**
|
||||
* jornada_ssp_byte - waits for ready ssp bus and sends byte
|
||||
* @byte: input byte to transmit
|
||||
*
|
||||
* waits for fifo buffer to clear and then transmits, if it doesn't then we will
|
||||
* timeout after <timeout> rounds. Needs mcu running before its called.
|
||||
@@ -77,6 +79,7 @@ EXPORT_SYMBOL(jornada_ssp_byte);
|
||||
|
||||
/**
|
||||
* jornada_ssp_inout - decide if input is command or trading byte
|
||||
* @byte: input byte to send (may be %TXDUMMY)
|
||||
*
|
||||
* returns : (jornada_ssp_byte(byte)) on success
|
||||
* : %-ETIMEDOUT on timeout failure
|
||||
|
||||
@@ -2595,8 +2595,11 @@
|
||||
interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&hsusb_phy1>, <&ssusb_phy_0>;
|
||||
phy-names = "usb2-phy", "usb3-phy";
|
||||
snps,hird-threshold = /bits/ 8 <0>;
|
||||
snps,dis_u2_susphy_quirk;
|
||||
snps,dis_enblslpm_quirk;
|
||||
snps,is-utmi-l1-suspend;
|
||||
tx-fifo-resize;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ int pdc_do_firm_test_reset(unsigned long ftc_bitmap);
|
||||
int pdc_do_reset(void);
|
||||
int pdc_soft_power_info(unsigned long *power_reg);
|
||||
int pdc_soft_power_button(int sw_control);
|
||||
int pdc_soft_power_button_panic(int sw_control);
|
||||
void pdc_io_reset(void);
|
||||
void pdc_io_reset_devices(void);
|
||||
int pdc_iodc_getc(void);
|
||||
|
||||
@@ -1158,15 +1158,18 @@ int __init pdc_soft_power_info(unsigned long *power_reg)
|
||||
}
|
||||
|
||||
/*
|
||||
* pdc_soft_power_button - Control the soft power button behaviour
|
||||
* @sw_control: 0 for hardware control, 1 for software control
|
||||
* pdc_soft_power_button{_panic} - Control the soft power button behaviour
|
||||
* @sw_control: 0 for hardware control, 1 for software control
|
||||
*
|
||||
*
|
||||
* This PDC function places the soft power button under software or
|
||||
* hardware control.
|
||||
* Under software control the OS may control to when to allow to shut
|
||||
* down the system. Under hardware control pressing the power button
|
||||
* Under software control the OS may control to when to allow to shut
|
||||
* down the system. Under hardware control pressing the power button
|
||||
* powers off the system immediately.
|
||||
*
|
||||
* The _panic version relies on spin_trylock to prevent deadlock
|
||||
* on panic path.
|
||||
*/
|
||||
int pdc_soft_power_button(int sw_control)
|
||||
{
|
||||
@@ -1180,6 +1183,22 @@ int pdc_soft_power_button(int sw_control)
|
||||
return retval;
|
||||
}
|
||||
|
||||
int pdc_soft_power_button_panic(int sw_control)
|
||||
{
|
||||
int retval;
|
||||
unsigned long flags;
|
||||
|
||||
if (!spin_trylock_irqsave(&pdc_lock, flags)) {
|
||||
pr_emerg("Couldn't enable soft power button\n");
|
||||
return -EBUSY; /* ignored by the panic notifier */
|
||||
}
|
||||
|
||||
retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_ENABLE, __pa(pdc_result), sw_control);
|
||||
spin_unlock_irqrestore(&pdc_lock, flags);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* pdc_io_reset - Hack to avoid overlapping range registers of Bridges devices.
|
||||
* Primarily a problem on T600 (which parisc-linux doesn't support) but
|
||||
|
||||
@@ -144,7 +144,7 @@ static bool dma_iommu_bypass_supported(struct device *dev, u64 mask)
|
||||
/* We support DMA to/from any memory page via the iommu */
|
||||
int dma_iommu_dma_supported(struct device *dev, u64 mask)
|
||||
{
|
||||
struct iommu_table *tbl = get_iommu_table_base(dev);
|
||||
struct iommu_table *tbl;
|
||||
|
||||
if (dev_is_pci(dev) && dma_iommu_bypass_supported(dev, mask)) {
|
||||
/*
|
||||
@@ -162,6 +162,8 @@ int dma_iommu_dma_supported(struct device *dev, u64 mask)
|
||||
return 1;
|
||||
}
|
||||
|
||||
tbl = get_iommu_table_base(dev);
|
||||
|
||||
if (!tbl) {
|
||||
dev_err(dev, "Warning: IOMMU dma not supported: mask 0x%08llx, table unavailable\n", mask);
|
||||
return 0;
|
||||
|
||||
@@ -1045,8 +1045,8 @@ void radix__ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep,
|
||||
pte_t entry, unsigned long address, int psize)
|
||||
{
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_ACCESSED |
|
||||
_PAGE_RW | _PAGE_EXEC);
|
||||
unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_SOFT_DIRTY |
|
||||
_PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC);
|
||||
|
||||
unsigned long change = pte_val(entry) ^ pte_val(*ptep);
|
||||
/*
|
||||
|
||||
@@ -85,19 +85,24 @@ static struct iommu_table_group *iommu_pseries_alloc_group(int node)
|
||||
static void iommu_pseries_free_group(struct iommu_table_group *table_group,
|
||||
const char *node_name)
|
||||
{
|
||||
struct iommu_table *tbl;
|
||||
|
||||
if (!table_group)
|
||||
return;
|
||||
|
||||
tbl = table_group->tables[0];
|
||||
#ifdef CONFIG_IOMMU_API
|
||||
if (table_group->group) {
|
||||
iommu_group_put(table_group->group);
|
||||
BUG_ON(table_group->group);
|
||||
}
|
||||
#endif
|
||||
iommu_tce_table_put(tbl);
|
||||
|
||||
/* Default DMA window table is at index 0, while DDW at 1. SR-IOV
|
||||
* adapters only have table on index 1.
|
||||
*/
|
||||
if (table_group->tables[0])
|
||||
iommu_tce_table_put(table_group->tables[0]);
|
||||
|
||||
if (table_group->tables[1])
|
||||
iommu_tce_table_put(table_group->tables[1]);
|
||||
|
||||
kfree(table_group);
|
||||
}
|
||||
|
||||
@@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg)
|
||||
object_info =
|
||||
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info));
|
||||
|
||||
if (!object_info)
|
||||
return (AE_NO_MEMORY);
|
||||
|
||||
/* Walk the namespace from the root */
|
||||
|
||||
(void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
|
||||
|
||||
@@ -576,9 +576,14 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
|
||||
ACPI_FUNCTION_TRACE(ds_init_aml_walk);
|
||||
|
||||
walk_state->parser_state.aml =
|
||||
walk_state->parser_state.aml_start = aml_start;
|
||||
walk_state->parser_state.aml_end =
|
||||
walk_state->parser_state.pkg_end = aml_start + aml_length;
|
||||
walk_state->parser_state.aml_start =
|
||||
walk_state->parser_state.aml_end =
|
||||
walk_state->parser_state.pkg_end = aml_start;
|
||||
/* Avoid undefined behavior: applying zero offset to null pointer */
|
||||
if (aml_length != 0) {
|
||||
walk_state->parser_state.aml_end += aml_length;
|
||||
walk_state->parser_state.pkg_end += aml_length;
|
||||
}
|
||||
|
||||
/* The next_op of the next_walk will be the beginning of the method */
|
||||
|
||||
|
||||
@@ -1101,6 +1101,7 @@ static void acpi_ec_remove_query_handlers(struct acpi_ec *ec,
|
||||
void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
|
||||
{
|
||||
acpi_ec_remove_query_handlers(ec, false, query_bit);
|
||||
flush_workqueue(ec_query_wq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler);
|
||||
|
||||
|
||||
@@ -343,6 +343,9 @@ int regcache_sync(struct regmap *map)
|
||||
const char *name;
|
||||
bool bypass;
|
||||
|
||||
if (WARN_ON(map->cache_type == REGCACHE_NONE))
|
||||
return -EINVAL;
|
||||
|
||||
BUG_ON(!map->cache_ops);
|
||||
|
||||
map->lock(map->lock_arg);
|
||||
@@ -412,6 +415,9 @@ int regcache_sync_region(struct regmap *map, unsigned int min,
|
||||
const char *name;
|
||||
bool bypass;
|
||||
|
||||
if (WARN_ON(map->cache_type == REGCACHE_NONE))
|
||||
return -EINVAL;
|
||||
|
||||
BUG_ON(!map->cache_ops);
|
||||
|
||||
map->lock(map->lock_arg);
|
||||
|
||||
@@ -326,6 +326,9 @@ static int nbd_set_size(struct nbd_device *nbd, loff_t bytesize,
|
||||
if (blksize < 512 || blksize > PAGE_SIZE || !is_power_of_2(blksize))
|
||||
return -EINVAL;
|
||||
|
||||
if (bytesize < 0)
|
||||
return -EINVAL;
|
||||
|
||||
nbd->config->bytesize = bytesize;
|
||||
nbd->config->blksize_bits = __ffs(blksize);
|
||||
|
||||
@@ -1048,6 +1051,9 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
||||
struct nbd_sock *nsock;
|
||||
int err;
|
||||
|
||||
/* Arg will be cast to int, check it to avoid overflow */
|
||||
if (arg > INT_MAX)
|
||||
return -EINVAL;
|
||||
sock = nbd_get_socket(nbd, arg, &err);
|
||||
if (!sock)
|
||||
return err;
|
||||
|
||||
@@ -1744,6 +1744,11 @@ static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set)
|
||||
|
||||
static int null_validate_conf(struct nullb_device *dev)
|
||||
{
|
||||
if (dev->queue_mode == NULL_Q_RQ) {
|
||||
pr_err("legacy IO path is no longer available\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev->blocksize = round_down(dev->blocksize, 512);
|
||||
dev->blocksize = clamp_t(unsigned int, dev->blocksize, 512, 4096);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2015 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/efi.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/dmi.h>
|
||||
@@ -33,6 +34,43 @@
|
||||
/* For kmalloc-ing the fw-name array instead of putting it on the stack */
|
||||
typedef char bcm_fw_name[BCM_FW_NAME_LEN];
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
static int btbcm_set_bdaddr_from_efi(struct hci_dev *hdev)
|
||||
{
|
||||
efi_guid_t guid = EFI_GUID(0x74b00bd9, 0x805a, 0x4d61, 0xb5, 0x1f,
|
||||
0x43, 0x26, 0x81, 0x23, 0xd1, 0x13);
|
||||
bdaddr_t efi_bdaddr, bdaddr;
|
||||
efi_status_t status;
|
||||
unsigned long len;
|
||||
int ret;
|
||||
|
||||
if (!efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
len = sizeof(efi_bdaddr);
|
||||
status = efi.get_variable(L"BDADDR", &guid, NULL, &len, &efi_bdaddr);
|
||||
if (status != EFI_SUCCESS)
|
||||
return -ENXIO;
|
||||
|
||||
if (len != sizeof(efi_bdaddr))
|
||||
return -EIO;
|
||||
|
||||
baswap(&bdaddr, &efi_bdaddr);
|
||||
|
||||
ret = btbcm_set_bdaddr(hdev, &bdaddr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
bt_dev_info(hdev, "BCM: Using EFI device address (%pMR)", &bdaddr);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int btbcm_set_bdaddr_from_efi(struct hci_dev *hdev)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
||||
int btbcm_check_bdaddr(struct hci_dev *hdev)
|
||||
{
|
||||
struct hci_rp_read_bd_addr *bda;
|
||||
@@ -86,9 +124,12 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
|
||||
!bacmp(&bda->bdaddr, BDADDR_BCM4345C5) ||
|
||||
!bacmp(&bda->bdaddr, BDADDR_BCM43430A0) ||
|
||||
!bacmp(&bda->bdaddr, BDADDR_BCM43341B)) {
|
||||
bt_dev_info(hdev, "BCM: Using default device address (%pMR)",
|
||||
&bda->bdaddr);
|
||||
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
|
||||
/* Try falling back to BDADDR EFI variable */
|
||||
if (btbcm_set_bdaddr_from_efi(hdev) != 0) {
|
||||
bt_dev_info(hdev, "BCM: Using default device address (%pMR)",
|
||||
&bda->bdaddr);
|
||||
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
|
||||
}
|
||||
}
|
||||
|
||||
kfree_skb(skb);
|
||||
|
||||
@@ -2381,9 +2381,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
|
||||
*/
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
|
||||
|
||||
/* Valid LE States quirk for GfP */
|
||||
if (INTEL_HW_VARIANT(ver_tlv.cnvi_bt) == 0x18)
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
/* Apply LE States quirk from solar onwards */
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
|
||||
/* Setup MSFT Extension support */
|
||||
btintel_set_msft_opcode(hdev,
|
||||
|
||||
@@ -83,6 +83,22 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = tpm_tis_disable_irq,
|
||||
.ident = "ThinkStation P360 Tiny",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkStation P360 Tiny"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = tpm_tis_disable_irq,
|
||||
.ident = "ThinkPad L490",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L490"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -18,24 +18,24 @@
|
||||
#define MISC_CLK_ENB 0x48
|
||||
|
||||
#define OSC_CTRL 0x50
|
||||
#define OSC_CTRL_OSC_FREQ_MASK (3<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_13MHZ (0<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_19_2MHZ (1<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_12MHZ (2<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_26MHZ (3<<30)
|
||||
#define OSC_CTRL_MASK (0x3f2 | OSC_CTRL_OSC_FREQ_MASK)
|
||||
#define OSC_CTRL_OSC_FREQ_MASK (3u<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_13MHZ (0u<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_19_2MHZ (1u<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_12MHZ (2u<<30)
|
||||
#define OSC_CTRL_OSC_FREQ_26MHZ (3u<<30)
|
||||
#define OSC_CTRL_MASK (0x3f2u | OSC_CTRL_OSC_FREQ_MASK)
|
||||
|
||||
#define OSC_CTRL_PLL_REF_DIV_MASK (3<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_1 (0<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_2 (1<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_4 (2<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_MASK (3u<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_1 (0u<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_2 (1u<<28)
|
||||
#define OSC_CTRL_PLL_REF_DIV_4 (2u<<28)
|
||||
|
||||
#define OSC_FREQ_DET 0x58
|
||||
#define OSC_FREQ_DET_TRIG (1<<31)
|
||||
#define OSC_FREQ_DET_TRIG (1u<<31)
|
||||
|
||||
#define OSC_FREQ_DET_STATUS 0x5c
|
||||
#define OSC_FREQ_DET_BUSY (1<<31)
|
||||
#define OSC_FREQ_DET_CNT_MASK 0xFFFF
|
||||
#define OSC_FREQ_DET_BUSYu (1<<31)
|
||||
#define OSC_FREQ_DET_CNT_MASK 0xFFFFu
|
||||
|
||||
#define TEGRA20_CLK_PERIPH_BANKS 3
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ static asmlinkage void (*sdei_firmware_call)(unsigned long function_id,
|
||||
/* entry point from firmware to arch asm code */
|
||||
static unsigned long sdei_entry_point;
|
||||
|
||||
static int sdei_hp_state;
|
||||
|
||||
struct sdei_event {
|
||||
/* These three are protected by the sdei_list_lock */
|
||||
struct list_head list;
|
||||
@@ -301,8 +303,6 @@ int sdei_mask_local_cpu(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
WARN_ON_ONCE(preemptible());
|
||||
|
||||
err = invoke_sdei_fn(SDEI_1_0_FN_SDEI_PE_MASK, 0, 0, 0, 0, 0, NULL);
|
||||
if (err && err != -EIO) {
|
||||
pr_warn_once("failed to mask CPU[%u]: %d\n",
|
||||
@@ -315,6 +315,7 @@ int sdei_mask_local_cpu(void)
|
||||
|
||||
static void _ipi_mask_cpu(void *ignored)
|
||||
{
|
||||
WARN_ON_ONCE(preemptible());
|
||||
sdei_mask_local_cpu();
|
||||
}
|
||||
|
||||
@@ -322,8 +323,6 @@ int sdei_unmask_local_cpu(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
WARN_ON_ONCE(preemptible());
|
||||
|
||||
err = invoke_sdei_fn(SDEI_1_0_FN_SDEI_PE_UNMASK, 0, 0, 0, 0, 0, NULL);
|
||||
if (err && err != -EIO) {
|
||||
pr_warn_once("failed to unmask CPU[%u]: %d\n",
|
||||
@@ -336,6 +335,7 @@ int sdei_unmask_local_cpu(void)
|
||||
|
||||
static void _ipi_unmask_cpu(void *ignored)
|
||||
{
|
||||
WARN_ON_ONCE(preemptible());
|
||||
sdei_unmask_local_cpu();
|
||||
}
|
||||
|
||||
@@ -343,6 +343,8 @@ static void _ipi_private_reset(void *ignored)
|
||||
{
|
||||
int err;
|
||||
|
||||
WARN_ON_ONCE(preemptible());
|
||||
|
||||
err = invoke_sdei_fn(SDEI_1_0_FN_SDEI_PRIVATE_RESET, 0, 0, 0, 0, 0,
|
||||
NULL);
|
||||
if (err && err != -EIO)
|
||||
@@ -389,8 +391,6 @@ static void _local_event_enable(void *data)
|
||||
int err;
|
||||
struct sdei_crosscall_args *arg = data;
|
||||
|
||||
WARN_ON_ONCE(preemptible());
|
||||
|
||||
err = sdei_api_event_enable(arg->event->event_num);
|
||||
|
||||
sdei_cross_call_return(arg, err);
|
||||
@@ -479,8 +479,6 @@ static void _local_event_unregister(void *data)
|
||||
int err;
|
||||
struct sdei_crosscall_args *arg = data;
|
||||
|
||||
WARN_ON_ONCE(preemptible());
|
||||
|
||||
err = sdei_api_event_unregister(arg->event->event_num);
|
||||
|
||||
sdei_cross_call_return(arg, err);
|
||||
@@ -561,8 +559,6 @@ static void _local_event_register(void *data)
|
||||
struct sdei_registered_event *reg;
|
||||
struct sdei_crosscall_args *arg = data;
|
||||
|
||||
WARN_ON(preemptible());
|
||||
|
||||
reg = per_cpu_ptr(arg->event->private_registered, smp_processor_id());
|
||||
err = sdei_api_event_register(arg->event->event_num, sdei_entry_point,
|
||||
reg, 0, 0);
|
||||
@@ -717,6 +713,8 @@ static int sdei_pm_notifier(struct notifier_block *nb, unsigned long action,
|
||||
{
|
||||
int rv;
|
||||
|
||||
WARN_ON_ONCE(preemptible());
|
||||
|
||||
switch (action) {
|
||||
case CPU_PM_ENTER:
|
||||
rv = sdei_mask_local_cpu();
|
||||
@@ -765,7 +763,7 @@ static int sdei_device_freeze(struct device *dev)
|
||||
int err;
|
||||
|
||||
/* unregister private events */
|
||||
cpuhp_remove_state(CPUHP_AP_ARM_SDEI_STARTING);
|
||||
cpuhp_remove_state(sdei_entry_point);
|
||||
|
||||
err = sdei_unregister_shared();
|
||||
if (err)
|
||||
@@ -786,12 +784,15 @@ static int sdei_device_thaw(struct device *dev)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = cpuhp_setup_state(CPUHP_AP_ARM_SDEI_STARTING, "SDEI",
|
||||
err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "SDEI",
|
||||
&sdei_cpuhp_up, &sdei_cpuhp_down);
|
||||
if (err)
|
||||
if (err < 0) {
|
||||
pr_warn("Failed to re-register CPU hotplug notifier...\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
return err;
|
||||
sdei_hp_state = err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdei_device_restore(struct device *dev)
|
||||
@@ -823,7 +824,7 @@ static int sdei_reboot_notifier(struct notifier_block *nb, unsigned long action,
|
||||
* We are going to reset the interface, after this there is no point
|
||||
* doing work when we take CPUs offline.
|
||||
*/
|
||||
cpuhp_remove_state(CPUHP_AP_ARM_SDEI_STARTING);
|
||||
cpuhp_remove_state(sdei_hp_state);
|
||||
|
||||
sdei_platform_reset();
|
||||
|
||||
@@ -1003,13 +1004,15 @@ static int sdei_probe(struct platform_device *pdev)
|
||||
goto remove_cpupm;
|
||||
}
|
||||
|
||||
err = cpuhp_setup_state(CPUHP_AP_ARM_SDEI_STARTING, "SDEI",
|
||||
err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "SDEI",
|
||||
&sdei_cpuhp_up, &sdei_cpuhp_down);
|
||||
if (err) {
|
||||
if (err < 0) {
|
||||
pr_warn("Failed to register CPU hotplug notifier...\n");
|
||||
goto remove_reboot;
|
||||
}
|
||||
|
||||
sdei_hp_state = err;
|
||||
|
||||
return 0;
|
||||
|
||||
remove_reboot:
|
||||
|
||||
@@ -406,11 +406,8 @@ static enum bp_result get_gpio_i2c_info(
|
||||
info->i2c_slave_address = record->i2c_slave_addr;
|
||||
|
||||
/* TODO: check how to get register offset for en, Y, etc. */
|
||||
info->gpio_info.clk_a_register_index =
|
||||
le16_to_cpu(
|
||||
header->gpio_pin[table_index].data_a_reg_index);
|
||||
info->gpio_info.clk_a_shift =
|
||||
header->gpio_pin[table_index].gpio_bitshift;
|
||||
info->gpio_info.clk_a_register_index = le16_to_cpu(pin->data_a_reg_index);
|
||||
info->gpio_info.clk_a_shift = pin->gpio_bitshift;
|
||||
|
||||
return BP_RESULT_OK;
|
||||
}
|
||||
|
||||
@@ -1009,7 +1009,7 @@ static void dce_transform_set_pixel_storage_depth(
|
||||
color_depth = COLOR_DEPTH_101010;
|
||||
pixel_depth = 0;
|
||||
expan_mode = 1;
|
||||
BREAK_TO_DEBUGGER();
|
||||
DC_LOG_DC("The pixel depth %d is not valid, set COLOR_DEPTH_101010 instead.", depth);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1023,8 +1023,7 @@ static void dce_transform_set_pixel_storage_depth(
|
||||
if (!(xfm_dce->lb_pixel_depth_supported & depth)) {
|
||||
/*we should use unsupported capabilities
|
||||
* unless it is required by w/a*/
|
||||
DC_LOG_WARNING("%s: Capability not supported",
|
||||
__func__);
|
||||
DC_LOG_DC("%s: Capability not supported", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,28 @@
|
||||
#include <drm/drm_edid.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
static const struct displayid_header *
|
||||
displayid_get_header(const u8 *displayid, int length, int index)
|
||||
{
|
||||
const struct displayid_header *base;
|
||||
|
||||
if (sizeof(*base) > length - index)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
base = (const struct displayid_header *)&displayid[index];
|
||||
|
||||
return base;
|
||||
}
|
||||
|
||||
static int validate_displayid(const u8 *displayid, int length, int idx)
|
||||
{
|
||||
int i, dispid_length;
|
||||
u8 csum = 0;
|
||||
const struct displayid_header *base;
|
||||
|
||||
base = (const struct displayid_header *)&displayid[idx];
|
||||
base = displayid_get_header(displayid, length, idx);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
DRM_DEBUG_KMS("base revision 0x%x, length %d, %d %d\n",
|
||||
base->rev, base->bytes, base->prod_id, base->ext_count);
|
||||
|
||||
@@ -221,7 +221,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,
|
||||
return dsi;
|
||||
}
|
||||
|
||||
dsi->dev.of_node = info->node;
|
||||
device_set_node(&dsi->dev, of_fwnode_handle(info->node));
|
||||
dsi->channel = info->channel;
|
||||
strlcpy(dsi->name, info->type, sizeof(dsi->name));
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ static inline int exynos_g2d_exec_ioctl(struct drm_device *dev, void *data,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int g2d_open(struct drm_device *drm_dev, struct drm_file *file)
|
||||
static inline int g2d_open(struct drm_device *drm_dev, struct drm_file *file)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void g2d_close(struct drm_device *drm_dev, struct drm_file *file)
|
||||
static inline void g2d_close(struct drm_device *drm_dev, struct drm_file *file)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
@@ -1231,6 +1231,11 @@ static int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
pipe_config->dsc.slice_count =
|
||||
drm_dp_dsc_sink_max_slice_count(intel_dp->dsc_dpcd,
|
||||
true);
|
||||
if (!pipe_config->dsc.slice_count) {
|
||||
drm_dbg_kms(&dev_priv->drm, "Unsupported Slice Count %d\n",
|
||||
pipe_config->dsc.slice_count);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
u16 dsc_max_output_bpp;
|
||||
u8 dsc_dp_slice_count;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/**
|
||||
* Register offsets in MDSS register file for the interrupt registers
|
||||
* w.r.t. to the MDP base
|
||||
* w.r.t. the MDP base
|
||||
*/
|
||||
#define MDP_SSPP_TOP0_OFF 0x0
|
||||
#define MDP_INTF_0_OFF 0x6A000
|
||||
@@ -20,6 +20,10 @@
|
||||
#define MDP_INTF_2_OFF 0x6B000
|
||||
#define MDP_INTF_3_OFF 0x6B800
|
||||
#define MDP_INTF_4_OFF 0x6C000
|
||||
#define MDP_INTF_5_OFF 0x6C800
|
||||
#define INTF_INTR_EN 0x1c0
|
||||
#define INTF_INTR_STATUS 0x1c4
|
||||
#define INTF_INTR_CLEAR 0x1c8
|
||||
#define MDP_AD4_0_OFF 0x7C000
|
||||
#define MDP_AD4_1_OFF 0x7D000
|
||||
#define MDP_AD4_INTR_EN_OFF 0x41c
|
||||
@@ -87,6 +91,11 @@ static const struct dpu_intr_reg dpu_intr_set[] = {
|
||||
MDP_INTF_4_OFF+INTF_INTR_EN,
|
||||
MDP_INTF_4_OFF+INTF_INTR_STATUS
|
||||
},
|
||||
{
|
||||
MDP_INTF_5_OFF+INTF_INTR_CLEAR,
|
||||
MDP_INTF_5_OFF+INTF_INTR_EN,
|
||||
MDP_INTF_5_OFF+INTF_INTR_STATUS
|
||||
},
|
||||
{
|
||||
MDP_AD4_0_OFF + MDP_AD4_INTR_CLEAR_OFF,
|
||||
MDP_AD4_0_OFF + MDP_AD4_INTR_EN_OFF,
|
||||
|
||||
@@ -22,6 +22,7 @@ enum dpu_hw_intr_reg {
|
||||
MDP_INTF2_INTR,
|
||||
MDP_INTF3_INTR,
|
||||
MDP_INTF4_INTR,
|
||||
MDP_INTF5_INTR,
|
||||
MDP_AD4_0_INTR,
|
||||
MDP_AD4_1_INTR,
|
||||
MDP_INTF0_7xxx_INTR,
|
||||
|
||||
@@ -53,11 +53,6 @@
|
||||
#define INTF_TPG_RGB_MAPPING 0x11C
|
||||
#define INTF_PROG_FETCH_START 0x170
|
||||
#define INTF_PROG_ROT_START 0x174
|
||||
|
||||
#define INTF_FRAME_LINE_COUNT_EN 0x0A8
|
||||
#define INTF_FRAME_COUNT 0x0AC
|
||||
#define INTF_LINE_COUNT 0x0B0
|
||||
|
||||
#define INTF_MUX 0x25C
|
||||
|
||||
static const struct dpu_intf_cfg *_intf_offset(enum dpu_intf intf,
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
#define HIST_INTR_EN 0x01c
|
||||
#define HIST_INTR_STATUS 0x020
|
||||
#define HIST_INTR_CLEAR 0x024
|
||||
#define INTF_INTR_EN 0x1C0
|
||||
#define INTF_INTR_STATUS 0x1C4
|
||||
#define INTF_INTR_CLEAR 0x1C8
|
||||
#define SPLIT_DISPLAY_EN 0x2F4
|
||||
#define SPLIT_DISPLAY_UPPER_PIPE_CTRL 0x2F8
|
||||
#define DSPP_IGC_COLOR0_RAM_LUTN 0x300
|
||||
|
||||
@@ -577,6 +577,18 @@ static struct hdmi_codec_pdata codec_data = {
|
||||
.i2s = 1,
|
||||
};
|
||||
|
||||
void dp_unregister_audio_driver(struct device *dev, struct dp_audio *dp_audio)
|
||||
{
|
||||
struct dp_audio_private *audio_priv;
|
||||
|
||||
audio_priv = container_of(dp_audio, struct dp_audio_private, dp_audio);
|
||||
|
||||
if (audio_priv->audio_pdev) {
|
||||
platform_device_unregister(audio_priv->audio_pdev);
|
||||
audio_priv->audio_pdev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int dp_register_audio_driver(struct device *dev,
|
||||
struct dp_audio *dp_audio)
|
||||
{
|
||||
|
||||
@@ -53,6 +53,8 @@ struct dp_audio *dp_audio_get(struct platform_device *pdev,
|
||||
int dp_register_audio_driver(struct device *dev,
|
||||
struct dp_audio *dp_audio);
|
||||
|
||||
void dp_unregister_audio_driver(struct device *dev, struct dp_audio *dp_audio);
|
||||
|
||||
/**
|
||||
* dp_audio_put()
|
||||
*
|
||||
|
||||
@@ -161,47 +161,6 @@ static ssize_t dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
|
||||
return i;
|
||||
}
|
||||
|
||||
static void dp_aux_native_handler(struct dp_aux_private *aux, u32 isr)
|
||||
{
|
||||
if (isr & DP_INTR_AUX_I2C_DONE)
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
else if (isr & DP_INTR_WRONG_ADDR)
|
||||
aux->aux_error_num = DP_AUX_ERR_ADDR;
|
||||
else if (isr & DP_INTR_TIMEOUT)
|
||||
aux->aux_error_num = DP_AUX_ERR_TOUT;
|
||||
if (isr & DP_INTR_NACK_DEFER)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
if (isr & DP_INTR_AUX_ERROR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
}
|
||||
}
|
||||
|
||||
static void dp_aux_i2c_handler(struct dp_aux_private *aux, u32 isr)
|
||||
{
|
||||
if (isr & DP_INTR_AUX_I2C_DONE) {
|
||||
if (isr & (DP_INTR_I2C_NACK | DP_INTR_I2C_DEFER))
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
else
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
} else {
|
||||
if (isr & DP_INTR_WRONG_ADDR)
|
||||
aux->aux_error_num = DP_AUX_ERR_ADDR;
|
||||
else if (isr & DP_INTR_TIMEOUT)
|
||||
aux->aux_error_num = DP_AUX_ERR_TOUT;
|
||||
if (isr & DP_INTR_NACK_DEFER)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK_DEFER;
|
||||
if (isr & DP_INTR_I2C_NACK)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
if (isr & DP_INTR_I2C_DEFER)
|
||||
aux->aux_error_num = DP_AUX_ERR_DEFER;
|
||||
if (isr & DP_INTR_AUX_ERROR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void dp_aux_update_offset_and_segment(struct dp_aux_private *aux,
|
||||
struct drm_dp_aux_msg *input_msg)
|
||||
{
|
||||
@@ -410,13 +369,42 @@ void dp_aux_isr(struct drm_dp_aux *dp_aux)
|
||||
if (!isr)
|
||||
return;
|
||||
|
||||
if (!aux->cmd_busy)
|
||||
if (!aux->cmd_busy) {
|
||||
DRM_ERROR("Unexpected DP AUX IRQ %#010x when not busy\n", isr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aux->native)
|
||||
dp_aux_native_handler(aux, isr);
|
||||
else
|
||||
dp_aux_i2c_handler(aux, isr);
|
||||
/*
|
||||
* The logic below assumes only one error bit is set (other than "done"
|
||||
* which can apparently be set at the same time as some of the other
|
||||
* bits). Warn if more than one get set so we know we need to improve
|
||||
* the logic.
|
||||
*/
|
||||
if (hweight32(isr & ~DP_INTR_AUX_XFER_DONE) > 1)
|
||||
DRM_WARN("Some DP AUX interrupts unhandled: %#010x\n", isr);
|
||||
|
||||
if (isr & DP_INTR_AUX_ERROR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
} else if (isr & DP_INTR_NACK_DEFER) {
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK_DEFER;
|
||||
} else if (isr & DP_INTR_WRONG_ADDR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_ADDR;
|
||||
} else if (isr & DP_INTR_TIMEOUT) {
|
||||
aux->aux_error_num = DP_AUX_ERR_TOUT;
|
||||
} else if (!aux->native && (isr & DP_INTR_I2C_NACK)) {
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
} else if (!aux->native && (isr & DP_INTR_I2C_DEFER)) {
|
||||
if (isr & DP_INTR_AUX_XFER_DONE)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
else
|
||||
aux->aux_error_num = DP_AUX_ERR_DEFER;
|
||||
} else if (isr & DP_INTR_AUX_XFER_DONE) {
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
} else {
|
||||
DRM_WARN("Unexpected interrupt: %#010x\n", isr);
|
||||
return;
|
||||
}
|
||||
|
||||
complete(&aux->comp);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#define MSM_DP_CONTROLLER_P0_SIZE 0x0400
|
||||
|
||||
#define DP_INTERRUPT_STATUS1 \
|
||||
(DP_INTR_AUX_I2C_DONE| \
|
||||
(DP_INTR_AUX_XFER_DONE| \
|
||||
DP_INTR_WRONG_ADDR | DP_INTR_TIMEOUT | \
|
||||
DP_INTR_NACK_DEFER | DP_INTR_WRONG_DATA_CNT | \
|
||||
DP_INTR_I2C_NACK | DP_INTR_I2C_DEFER | \
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/* interrupts */
|
||||
#define DP_INTR_HPD BIT(0)
|
||||
#define DP_INTR_AUX_I2C_DONE BIT(3)
|
||||
#define DP_INTR_AUX_XFER_DONE BIT(3)
|
||||
#define DP_INTR_WRONG_ADDR BIT(6)
|
||||
#define DP_INTR_TIMEOUT BIT(9)
|
||||
#define DP_INTR_NACK_DEFER BIT(12)
|
||||
|
||||
@@ -267,6 +267,7 @@ static void dp_display_unbind(struct device *dev, struct device *master,
|
||||
kthread_stop(dp->ev_tsk);
|
||||
|
||||
dp_power_client_deinit(dp->power);
|
||||
dp_unregister_audio_driver(dev, dp->audio);
|
||||
dp_aux_unregister(dp->aux);
|
||||
priv->dp = NULL;
|
||||
}
|
||||
|
||||
@@ -1153,7 +1153,7 @@ static int tegra_sor_compute_config(struct tegra_sor *sor,
|
||||
struct drm_dp_link *link)
|
||||
{
|
||||
const u64 f = 100000, link_rate = link->rate * 1000;
|
||||
const u64 pclk = mode->clock * 1000;
|
||||
const u64 pclk = (u64)mode->clock * 1000;
|
||||
u64 input, output, watermark, num;
|
||||
struct tegra_sor_params params;
|
||||
u32 num_syms_per_line;
|
||||
|
||||
@@ -834,8 +834,7 @@ static int hidpp_unifying_init(struct hidpp_device *hidpp)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
snprintf(hdev->uniq, sizeof(hdev->uniq), "%04x-%4phD",
|
||||
hdev->product, &serial);
|
||||
snprintf(hdev->uniq, sizeof(hdev->uniq), "%4phD", &serial);
|
||||
dbg_hid("HID++ Unifying: Got serial: %s\n", hdev->uniq);
|
||||
|
||||
name = hidpp_unifying_get_name(hidpp);
|
||||
@@ -928,6 +927,54 @@ print_version:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* 0x0003: Device Information */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#define HIDPP_PAGE_DEVICE_INFORMATION 0x0003
|
||||
|
||||
#define CMD_GET_DEVICE_INFO 0x00
|
||||
|
||||
static int hidpp_get_serial(struct hidpp_device *hidpp, u32 *serial)
|
||||
{
|
||||
struct hidpp_report response;
|
||||
u8 feature_type;
|
||||
u8 feature_index;
|
||||
int ret;
|
||||
|
||||
ret = hidpp_root_get_feature(hidpp, HIDPP_PAGE_DEVICE_INFORMATION,
|
||||
&feature_index,
|
||||
&feature_type);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = hidpp_send_fap_command_sync(hidpp, feature_index,
|
||||
CMD_GET_DEVICE_INFO,
|
||||
NULL, 0, &response);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* See hidpp_unifying_get_serial() */
|
||||
*serial = *((u32 *)&response.rap.params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hidpp_serial_init(struct hidpp_device *hidpp)
|
||||
{
|
||||
struct hid_device *hdev = hidpp->hid_dev;
|
||||
u32 serial;
|
||||
int ret;
|
||||
|
||||
ret = hidpp_get_serial(hidpp, &serial);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
snprintf(hdev->uniq, sizeof(hdev->uniq), "%4phD", &serial);
|
||||
dbg_hid("HID++ DeviceInformation: Got serial: %s\n", hdev->uniq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* 0x0005: GetDeviceNameType */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@@ -4141,6 +4188,8 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
|
||||
if (hidpp->quirks & HIDPP_QUIRK_UNIFYING)
|
||||
hidpp_unifying_init(hidpp);
|
||||
else if (hid_is_usb(hidpp->hid_dev))
|
||||
hidpp_serial_init(hidpp);
|
||||
|
||||
connected = hidpp_root_get_protocol_version(hidpp) == 0;
|
||||
atomic_set(&hidpp->connected, connected);
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
#include <linux/leds.h>
|
||||
#include <linux/usb/input.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/timer.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
/*
|
||||
@@ -167,6 +168,7 @@ struct wacom {
|
||||
struct delayed_work init_work;
|
||||
struct wacom_remote *remote;
|
||||
struct work_struct mode_change_work;
|
||||
struct timer_list idleprox_timer;
|
||||
bool generic_has_leds;
|
||||
struct wacom_leds {
|
||||
struct wacom_group_leds *groups;
|
||||
@@ -239,4 +241,5 @@ struct wacom_led *wacom_led_find(struct wacom *wacom, unsigned int group,
|
||||
struct wacom_led *wacom_led_next(struct wacom *wacom, struct wacom_led *cur);
|
||||
int wacom_equivalent_usage(int usage);
|
||||
int wacom_initialize_leds(struct wacom *wacom);
|
||||
void wacom_idleprox_timeout(struct timer_list *list);
|
||||
#endif
|
||||
|
||||
@@ -2787,6 +2787,7 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
INIT_WORK(&wacom->battery_work, wacom_battery_work);
|
||||
INIT_WORK(&wacom->remote_work, wacom_remote_work);
|
||||
INIT_WORK(&wacom->mode_change_work, wacom_mode_change_work);
|
||||
timer_setup(&wacom->idleprox_timer, &wacom_idleprox_timeout, TIMER_DEFERRABLE);
|
||||
|
||||
/* ask for the report descriptor to be loaded by HID */
|
||||
error = hid_parse(hdev);
|
||||
@@ -2832,6 +2833,7 @@ static void wacom_remove(struct hid_device *hdev)
|
||||
cancel_work_sync(&wacom->battery_work);
|
||||
cancel_work_sync(&wacom->remote_work);
|
||||
cancel_work_sync(&wacom->mode_change_work);
|
||||
del_timer_sync(&wacom->idleprox_timer);
|
||||
if (hdev->bus == BUS_BLUETOOTH)
|
||||
device_remove_file(&hdev->dev, &dev_attr_speed);
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "wacom_wac.h"
|
||||
#include "wacom.h"
|
||||
#include <linux/input/mt.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
/* resolution for penabled devices */
|
||||
#define WACOM_PL_RES 20
|
||||
@@ -41,6 +42,43 @@ static int wacom_numbered_button_to_key(int n);
|
||||
|
||||
static void wacom_update_led(struct wacom *wacom, int button_count, int mask,
|
||||
int group);
|
||||
|
||||
static void wacom_force_proxout(struct wacom_wac *wacom_wac)
|
||||
{
|
||||
struct input_dev *input = wacom_wac->pen_input;
|
||||
|
||||
wacom_wac->shared->stylus_in_proximity = 0;
|
||||
|
||||
input_report_key(input, BTN_TOUCH, 0);
|
||||
input_report_key(input, BTN_STYLUS, 0);
|
||||
input_report_key(input, BTN_STYLUS2, 0);
|
||||
input_report_key(input, BTN_STYLUS3, 0);
|
||||
input_report_key(input, wacom_wac->tool[0], 0);
|
||||
if (wacom_wac->serial[0]) {
|
||||
input_report_abs(input, ABS_MISC, 0);
|
||||
}
|
||||
input_report_abs(input, ABS_PRESSURE, 0);
|
||||
|
||||
wacom_wac->tool[0] = 0;
|
||||
wacom_wac->id[0] = 0;
|
||||
wacom_wac->serial[0] = 0;
|
||||
|
||||
input_sync(input);
|
||||
}
|
||||
|
||||
void wacom_idleprox_timeout(struct timer_list *list)
|
||||
{
|
||||
struct wacom *wacom = from_timer(wacom, list, idleprox_timer);
|
||||
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
|
||||
|
||||
if (!wacom_wac->hid_data.sense_state) {
|
||||
return;
|
||||
}
|
||||
|
||||
hid_warn(wacom->hdev, "%s: tool appears to be hung in-prox. forcing it out.\n", __func__);
|
||||
wacom_force_proxout(wacom_wac);
|
||||
}
|
||||
|
||||
/*
|
||||
* Percent of battery capacity for Graphire.
|
||||
* 8th value means AC online and show 100% capacity.
|
||||
@@ -675,11 +713,14 @@ static int wacom_intuos_get_tool_type(int tool_id)
|
||||
case 0x802: /* Intuos4/5 13HD/24HD General Pen */
|
||||
case 0x8e2: /* IntuosHT2 pen */
|
||||
case 0x022:
|
||||
case 0x200: /* Pro Pen 3 */
|
||||
case 0x04200: /* Pro Pen 3 */
|
||||
case 0x10842: /* MobileStudio Pro Pro Pen slim */
|
||||
case 0x14802: /* Intuos4/5 13HD/24HD Classic Pen */
|
||||
case 0x16802: /* Cintiq 13HD Pro Pen */
|
||||
case 0x18802: /* DTH2242 Pen */
|
||||
case 0x10802: /* Intuos4/5 13HD/24HD General Pen */
|
||||
case 0x80842: /* Intuos Pro and Cintiq Pro 3D Pen */
|
||||
tool_type = BTN_TOOL_PEN;
|
||||
break;
|
||||
|
||||
@@ -1925,18 +1966,7 @@ static void wacom_map_usage(struct input_dev *input, struct hid_usage *usage,
|
||||
static void wacom_wac_battery_usage_mapping(struct hid_device *hdev,
|
||||
struct hid_field *field, struct hid_usage *usage)
|
||||
{
|
||||
struct wacom *wacom = hid_get_drvdata(hdev);
|
||||
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
|
||||
struct wacom_features *features = &wacom_wac->features;
|
||||
unsigned equivalent_usage = wacom_equivalent_usage(usage->hid);
|
||||
|
||||
switch (equivalent_usage) {
|
||||
case HID_DG_BATTERYSTRENGTH:
|
||||
case WACOM_HID_WD_BATTERY_LEVEL:
|
||||
case WACOM_HID_WD_BATTERY_CHARGING:
|
||||
features->quirks |= WACOM_QUIRK_BATTERY;
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static void wacom_wac_battery_event(struct hid_device *hdev, struct hid_field *field,
|
||||
@@ -1957,18 +1987,21 @@ static void wacom_wac_battery_event(struct hid_device *hdev, struct hid_field *f
|
||||
wacom_wac->hid_data.bat_connected = 1;
|
||||
wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO;
|
||||
}
|
||||
wacom_wac->features.quirks |= WACOM_QUIRK_BATTERY;
|
||||
break;
|
||||
case WACOM_HID_WD_BATTERY_LEVEL:
|
||||
value = value * 100 / (field->logical_maximum - field->logical_minimum);
|
||||
wacom_wac->hid_data.battery_capacity = value;
|
||||
wacom_wac->hid_data.bat_connected = 1;
|
||||
wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO;
|
||||
wacom_wac->features.quirks |= WACOM_QUIRK_BATTERY;
|
||||
break;
|
||||
case WACOM_HID_WD_BATTERY_CHARGING:
|
||||
wacom_wac->hid_data.bat_charging = value;
|
||||
wacom_wac->hid_data.ps_connected = value;
|
||||
wacom_wac->hid_data.bat_connected = 1;
|
||||
wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO;
|
||||
wacom_wac->features.quirks |= WACOM_QUIRK_BATTERY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1984,18 +2017,15 @@ static void wacom_wac_battery_report(struct hid_device *hdev,
|
||||
{
|
||||
struct wacom *wacom = hid_get_drvdata(hdev);
|
||||
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
|
||||
struct wacom_features *features = &wacom_wac->features;
|
||||
|
||||
if (features->quirks & WACOM_QUIRK_BATTERY) {
|
||||
int status = wacom_wac->hid_data.bat_status;
|
||||
int capacity = wacom_wac->hid_data.battery_capacity;
|
||||
bool charging = wacom_wac->hid_data.bat_charging;
|
||||
bool connected = wacom_wac->hid_data.bat_connected;
|
||||
bool powered = wacom_wac->hid_data.ps_connected;
|
||||
int status = wacom_wac->hid_data.bat_status;
|
||||
int capacity = wacom_wac->hid_data.battery_capacity;
|
||||
bool charging = wacom_wac->hid_data.bat_charging;
|
||||
bool connected = wacom_wac->hid_data.bat_connected;
|
||||
bool powered = wacom_wac->hid_data.ps_connected;
|
||||
|
||||
wacom_notify_battery(wacom_wac, status, capacity, charging,
|
||||
connected, powered);
|
||||
}
|
||||
wacom_notify_battery(wacom_wac, status, capacity, charging,
|
||||
connected, powered);
|
||||
}
|
||||
|
||||
static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
|
||||
@@ -2350,6 +2380,7 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field
|
||||
value = field->logical_maximum - value;
|
||||
break;
|
||||
case HID_DG_INRANGE:
|
||||
mod_timer(&wacom->idleprox_timer, jiffies + msecs_to_jiffies(100));
|
||||
wacom_wac->hid_data.inrange_state = value;
|
||||
if (!(features->quirks & WACOM_QUIRK_SENSE))
|
||||
wacom_wac->hid_data.sense_state = value;
|
||||
@@ -4843,6 +4874,10 @@ static const struct wacom_features wacom_features_0x3c6 =
|
||||
static const struct wacom_features wacom_features_0x3c8 =
|
||||
{ "Wacom Intuos BT M", 21600, 13500, 4095, 63,
|
||||
INTUOSHT3_BT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
|
||||
static const struct wacom_features wacom_features_0x3dd =
|
||||
{ "Wacom Intuos Pro S", 31920, 19950, 8191, 63,
|
||||
INTUOSP2S_BT, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7,
|
||||
.touch_max = 10 };
|
||||
|
||||
static const struct wacom_features wacom_features_HID_ANY_ID =
|
||||
{ "Wacom HID", .type = HID_GENERIC, .oVid = HID_ANY_ID, .oPid = HID_ANY_ID };
|
||||
@@ -5022,6 +5057,7 @@ const struct hid_device_id wacom_ids[] = {
|
||||
{ BT_DEVICE_WACOM(0x393) },
|
||||
{ BT_DEVICE_WACOM(0x3c6) },
|
||||
{ BT_DEVICE_WACOM(0x3c8) },
|
||||
{ BT_DEVICE_WACOM(0x3dd) },
|
||||
{ USB_DEVICE_WACOM(0x4001) },
|
||||
{ USB_DEVICE_WACOM(0x4004) },
|
||||
{ USB_DEVICE_WACOM(0x5000) },
|
||||
|
||||
@@ -131,6 +131,11 @@ struct ib_umad_packet {
|
||||
struct ib_user_mad mad;
|
||||
};
|
||||
|
||||
struct ib_rmpp_mad_hdr {
|
||||
struct ib_mad_hdr mad_hdr;
|
||||
struct ib_rmpp_hdr rmpp_hdr;
|
||||
} __packed;
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/ib_umad.h>
|
||||
|
||||
@@ -494,11 +499,11 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
|
||||
size_t count, loff_t *pos)
|
||||
{
|
||||
struct ib_umad_file *file = filp->private_data;
|
||||
struct ib_rmpp_mad_hdr *rmpp_mad_hdr;
|
||||
struct ib_umad_packet *packet;
|
||||
struct ib_mad_agent *agent;
|
||||
struct rdma_ah_attr ah_attr;
|
||||
struct ib_ah *ah;
|
||||
struct ib_rmpp_mad *rmpp_mad;
|
||||
__be64 *tid;
|
||||
int ret, data_len, hdr_len, copy_offset, rmpp_active;
|
||||
u8 base_version;
|
||||
@@ -506,7 +511,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
|
||||
if (count < hdr_size(file) + IB_MGMT_RMPP_HDR)
|
||||
return -EINVAL;
|
||||
|
||||
packet = kzalloc(sizeof *packet + IB_MGMT_RMPP_HDR, GFP_KERNEL);
|
||||
packet = kzalloc(sizeof(*packet) + IB_MGMT_RMPP_HDR, GFP_KERNEL);
|
||||
if (!packet)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -560,13 +565,13 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
|
||||
goto err_up;
|
||||
}
|
||||
|
||||
rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
|
||||
hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
|
||||
rmpp_mad_hdr = (struct ib_rmpp_mad_hdr *)packet->mad.data;
|
||||
hdr_len = ib_get_mad_data_offset(rmpp_mad_hdr->mad_hdr.mgmt_class);
|
||||
|
||||
if (ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
|
||||
if (ib_is_mad_class_rmpp(rmpp_mad_hdr->mad_hdr.mgmt_class)
|
||||
&& ib_mad_kernel_rmpp_agent(agent)) {
|
||||
copy_offset = IB_MGMT_RMPP_HDR;
|
||||
rmpp_active = ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) &
|
||||
rmpp_active = ib_get_rmpp_flags(&rmpp_mad_hdr->rmpp_hdr) &
|
||||
IB_MGMT_RMPP_FLAG_ACTIVE;
|
||||
} else {
|
||||
copy_offset = IB_MGMT_MAD_HDR;
|
||||
@@ -615,12 +620,12 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
|
||||
tid = &((struct ib_mad_hdr *) packet->msg->mad)->tid;
|
||||
*tid = cpu_to_be64(((u64) agent->hi_tid) << 32 |
|
||||
(be64_to_cpup(tid) & 0xffffffff));
|
||||
rmpp_mad->mad_hdr.tid = *tid;
|
||||
rmpp_mad_hdr->mad_hdr.tid = *tid;
|
||||
}
|
||||
|
||||
if (!ib_mad_kernel_rmpp_agent(agent)
|
||||
&& ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
|
||||
&& (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
|
||||
&& ib_is_mad_class_rmpp(rmpp_mad_hdr->mad_hdr.mgmt_class)
|
||||
&& (ib_get_rmpp_flags(&rmpp_mad_hdr->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
|
||||
spin_lock_irq(&file->send_lock);
|
||||
list_add_tail(&packet->list, &file->send_list);
|
||||
spin_unlock_irq(&file->send_lock);
|
||||
|
||||
@@ -493,6 +493,9 @@ struct xboxone_init_packet {
|
||||
}
|
||||
|
||||
|
||||
#define GIP_WIRED_INTF_DATA 0
|
||||
#define GIP_WIRED_INTF_AUDIO 1
|
||||
|
||||
/*
|
||||
* This packet is required for all Xbox One pads with 2015
|
||||
* or later firmware installed (or present from the factory).
|
||||
@@ -1821,7 +1824,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
|
||||
}
|
||||
|
||||
if (xpad->xtype == XTYPE_XBOXONE &&
|
||||
intf->cur_altsetting->desc.bInterfaceNumber != 0) {
|
||||
intf->cur_altsetting->desc.bInterfaceNumber != GIP_WIRED_INTF_DATA) {
|
||||
/*
|
||||
* The Xbox One controller lists three interfaces all with the
|
||||
* same interface class, subclass and protocol. Differentiate by
|
||||
|
||||
@@ -154,6 +154,18 @@ static void queue_inc_cons(struct arm_smmu_ll_queue *q)
|
||||
q->cons = Q_OVF(q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons);
|
||||
}
|
||||
|
||||
static void queue_sync_cons_ovf(struct arm_smmu_queue *q)
|
||||
{
|
||||
struct arm_smmu_ll_queue *llq = &q->llq;
|
||||
|
||||
if (likely(Q_OVF(llq->prod) == Q_OVF(llq->cons)))
|
||||
return;
|
||||
|
||||
llq->cons = Q_OVF(llq->prod) | Q_WRP(llq, llq->cons) |
|
||||
Q_IDX(llq, llq->cons);
|
||||
queue_sync_cons_out(q);
|
||||
}
|
||||
|
||||
static int queue_sync_prod_in(struct arm_smmu_queue *q)
|
||||
{
|
||||
u32 prod;
|
||||
@@ -1564,8 +1576,7 @@ static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev)
|
||||
} while (!queue_empty(llq));
|
||||
|
||||
/* Sync our overflow flag, as we believe we're up to speed */
|
||||
llq->cons = Q_OVF(llq->prod) | Q_WRP(llq, llq->cons) |
|
||||
Q_IDX(llq, llq->cons);
|
||||
queue_sync_cons_ovf(q);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -1623,9 +1634,7 @@ static irqreturn_t arm_smmu_priq_thread(int irq, void *dev)
|
||||
} while (!queue_empty(llq));
|
||||
|
||||
/* Sync our overflow flag, as we believe we're up to speed */
|
||||
llq->cons = Q_OVF(llq->prod) | Q_WRP(llq, llq->cons) |
|
||||
Q_IDX(llq, llq->cons);
|
||||
queue_sync_cons_out(q);
|
||||
queue_sync_cons_ovf(q);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
@@ -247,12 +247,26 @@ static int qcom_smmu_init_context(struct arm_smmu_domain *smmu_domain,
|
||||
|
||||
static int qcom_smmu_cfg_probe(struct arm_smmu_device *smmu)
|
||||
{
|
||||
unsigned int last_s2cr = ARM_SMMU_GR0_S2CR(smmu->num_mapping_groups - 1);
|
||||
struct qcom_smmu *qsmmu = to_qcom_smmu(smmu);
|
||||
unsigned int last_s2cr;
|
||||
u32 reg;
|
||||
u32 smr;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Some platforms support more than the Arm SMMU architected maximum of
|
||||
* 128 stream matching groups. For unknown reasons, the additional
|
||||
* groups don't exhibit the same behavior as the architected registers,
|
||||
* so limit the groups to 128 until the behavior is fixed for the other
|
||||
* groups.
|
||||
*/
|
||||
if (smmu->num_mapping_groups > 128) {
|
||||
dev_notice(smmu->dev, "\tLimiting the stream matching groups to 128\n");
|
||||
smmu->num_mapping_groups = 128;
|
||||
}
|
||||
|
||||
last_s2cr = ARM_SMMU_GR0_S2CR(smmu->num_mapping_groups - 1);
|
||||
|
||||
/*
|
||||
* With some firmware versions writes to S2CR of type FAULT are
|
||||
* ignored, and writing BYPASS will end up written as FAULT in the
|
||||
|
||||
@@ -151,13 +151,6 @@ static struct iommu_domain *sprd_iommu_domain_alloc(unsigned int domain_type)
|
||||
return &dom->domain;
|
||||
}
|
||||
|
||||
static void sprd_iommu_domain_free(struct iommu_domain *domain)
|
||||
{
|
||||
struct sprd_iommu_domain *dom = to_sprd_domain(domain);
|
||||
|
||||
kfree(dom);
|
||||
}
|
||||
|
||||
static void sprd_iommu_first_vpn(struct sprd_iommu_domain *dom)
|
||||
{
|
||||
struct sprd_iommu_device *sdev = dom->sdev;
|
||||
@@ -230,6 +223,28 @@ static void sprd_iommu_hw_en(struct sprd_iommu_device *sdev, bool en)
|
||||
sprd_iommu_update_bits(sdev, reg_cfg, mask, 0, val);
|
||||
}
|
||||
|
||||
static void sprd_iommu_cleanup(struct sprd_iommu_domain *dom)
|
||||
{
|
||||
size_t pgt_size;
|
||||
|
||||
/* Nothing need to do if the domain hasn't been attached */
|
||||
if (!dom->sdev)
|
||||
return;
|
||||
|
||||
pgt_size = sprd_iommu_pgt_size(&dom->domain);
|
||||
dma_free_coherent(dom->sdev->dev, pgt_size, dom->pgt_va, dom->pgt_pa);
|
||||
dom->sdev = NULL;
|
||||
sprd_iommu_hw_en(dom->sdev, false);
|
||||
}
|
||||
|
||||
static void sprd_iommu_domain_free(struct iommu_domain *domain)
|
||||
{
|
||||
struct sprd_iommu_domain *dom = to_sprd_domain(domain);
|
||||
|
||||
sprd_iommu_cleanup(dom);
|
||||
kfree(dom);
|
||||
}
|
||||
|
||||
static int sprd_iommu_attach_device(struct iommu_domain *domain,
|
||||
struct device *dev)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
struct resource *res;
|
||||
struct priv *priv;
|
||||
int ret;
|
||||
int ret, table_size;
|
||||
unsigned long flags;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(struct priv), GFP_KERNEL);
|
||||
@@ -90,7 +90,30 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
if (ret < 0)
|
||||
goto out_mcb_bus;
|
||||
|
||||
dev_dbg(&pdev->dev, "Found %d cells\n", ret);
|
||||
table_size = ret;
|
||||
|
||||
if (table_size < CHAM_HEADER_SIZE) {
|
||||
/* Release the previous resources */
|
||||
devm_iounmap(&pdev->dev, priv->base);
|
||||
devm_release_mem_region(&pdev->dev, priv->mapbase, CHAM_HEADER_SIZE);
|
||||
|
||||
/* Then, allocate it again with the actual chameleon table size */
|
||||
res = devm_request_mem_region(&pdev->dev, priv->mapbase,
|
||||
table_size,
|
||||
KBUILD_MODNAME);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "Failed to request PCI memory\n");
|
||||
ret = -EBUSY;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
priv->base = devm_ioremap(&pdev->dev, priv->mapbase, table_size);
|
||||
if (!priv->base) {
|
||||
dev_err(&pdev->dev, "Cannot ioremap\n");
|
||||
ret = -ENOMEM;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
}
|
||||
|
||||
mcb_bus_add_devices(priv->bus);
|
||||
|
||||
|
||||
@@ -1325,7 +1325,9 @@ void cx23885_free_buffer(struct cx23885_dev *dev, struct cx23885_buffer *buf)
|
||||
{
|
||||
struct cx23885_riscmem *risc = &buf->risc;
|
||||
|
||||
dma_free_coherent(&dev->pci->dev, risc->size, risc->cpu, risc->dma);
|
||||
if (risc->cpu)
|
||||
dma_free_coherent(&dev->pci->dev, risc->size, risc->cpu, risc->dma);
|
||||
memset(risc, 0, sizeof(*risc));
|
||||
}
|
||||
|
||||
static void cx23885_tsport_reg_dump(struct cx23885_tsport *port)
|
||||
|
||||
@@ -342,6 +342,7 @@ static int queue_setup(struct vb2_queue *q,
|
||||
|
||||
static int buffer_prepare(struct vb2_buffer *vb)
|
||||
{
|
||||
int ret;
|
||||
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
|
||||
struct cx23885_dev *dev = vb->vb2_queue->drv_priv;
|
||||
struct cx23885_buffer *buf =
|
||||
@@ -358,12 +359,12 @@ static int buffer_prepare(struct vb2_buffer *vb)
|
||||
|
||||
switch (dev->field) {
|
||||
case V4L2_FIELD_TOP:
|
||||
cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
ret = cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, 0, UNSET,
|
||||
buf->bpl, 0, dev->height);
|
||||
break;
|
||||
case V4L2_FIELD_BOTTOM:
|
||||
cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
ret = cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, UNSET, 0,
|
||||
buf->bpl, 0, dev->height);
|
||||
break;
|
||||
@@ -391,21 +392,21 @@ static int buffer_prepare(struct vb2_buffer *vb)
|
||||
line0_offset = 0;
|
||||
line1_offset = buf->bpl;
|
||||
}
|
||||
cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
ret = cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl, line0_offset,
|
||||
line1_offset,
|
||||
buf->bpl, buf->bpl,
|
||||
dev->height >> 1);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_TB:
|
||||
cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
ret = cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl,
|
||||
0, buf->bpl * (dev->height >> 1),
|
||||
buf->bpl, 0,
|
||||
dev->height >> 1);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_BT:
|
||||
cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
ret = cx23885_risc_buffer(dev->pci, &buf->risc,
|
||||
sgt->sgl,
|
||||
buf->bpl * (dev->height >> 1), 0,
|
||||
buf->bpl, 0,
|
||||
@@ -418,7 +419,7 @@ static int buffer_prepare(struct vb2_buffer *vb)
|
||||
buf, buf->vb.vb2_buf.index,
|
||||
dev->width, dev->height, dev->fmt->depth, dev->fmt->fourcc,
|
||||
(unsigned long)buf->risc.dma);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void buffer_finish(struct vb2_buffer *vb)
|
||||
|
||||
@@ -697,7 +697,7 @@ static void netup_unidvb_dma_fini(struct netup_unidvb_dev *ndev, int num)
|
||||
netup_unidvb_dma_enable(dma, 0);
|
||||
msleep(50);
|
||||
cancel_work_sync(&dma->work);
|
||||
del_timer(&dma->timeout);
|
||||
del_timer_sync(&dma->timeout);
|
||||
}
|
||||
|
||||
static int netup_unidvb_dma_setup(struct netup_unidvb_dev *ndev)
|
||||
|
||||
@@ -437,6 +437,7 @@ static void tw68_buf_queue(struct vb2_buffer *vb)
|
||||
*/
|
||||
static int tw68_buf_prepare(struct vb2_buffer *vb)
|
||||
{
|
||||
int ret;
|
||||
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
|
||||
struct vb2_queue *vq = vb->vb2_queue;
|
||||
struct tw68_dev *dev = vb2_get_drv_priv(vq);
|
||||
@@ -452,30 +453,30 @@ static int tw68_buf_prepare(struct vb2_buffer *vb)
|
||||
bpl = (dev->width * dev->fmt->depth) >> 3;
|
||||
switch (dev->field) {
|
||||
case V4L2_FIELD_TOP:
|
||||
tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
ret = tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
0, UNSET, bpl, 0, dev->height);
|
||||
break;
|
||||
case V4L2_FIELD_BOTTOM:
|
||||
tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
ret = tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
UNSET, 0, bpl, 0, dev->height);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_TB:
|
||||
tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
ret = tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
0, bpl * (dev->height >> 1),
|
||||
bpl, 0, dev->height >> 1);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_BT:
|
||||
tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
ret = tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
bpl * (dev->height >> 1), 0,
|
||||
bpl, 0, dev->height >> 1);
|
||||
break;
|
||||
case V4L2_FIELD_INTERLACED:
|
||||
default:
|
||||
tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
ret = tw68_risc_buffer(dev->pci, buf, dma->sgl,
|
||||
0, bpl, bpl, bpl, dev->height >> 1);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void tw68_buf_finish(struct vb2_buffer *vb)
|
||||
@@ -485,7 +486,8 @@ static void tw68_buf_finish(struct vb2_buffer *vb)
|
||||
struct tw68_dev *dev = vb2_get_drv_priv(vq);
|
||||
struct tw68_buf *buf = container_of(vbuf, struct tw68_buf, vb);
|
||||
|
||||
dma_free_coherent(&dev->pci->dev, buf->size, buf->cpu, buf->dma);
|
||||
if (buf->cpu)
|
||||
dma_free_coherent(&dev->pci->dev, buf->size, buf->cpu, buf->dma);
|
||||
}
|
||||
|
||||
static int tw68_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
|
||||
@@ -1499,7 +1499,9 @@ static int vpfe_enum_size(struct file *file, void *priv,
|
||||
struct v4l2_frmsizeenum *fsize)
|
||||
{
|
||||
struct vpfe_device *vpfe = video_drvdata(file);
|
||||
struct v4l2_subdev_frame_size_enum fse;
|
||||
struct v4l2_subdev_frame_size_enum fse = {
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
struct v4l2_subdev *sd = vpfe->current_subdev->sd;
|
||||
struct vpfe_fmt *fmt;
|
||||
int ret;
|
||||
@@ -1514,11 +1516,9 @@ static int vpfe_enum_size(struct file *file, void *priv,
|
||||
|
||||
memset(fsize->reserved, 0x0, sizeof(fsize->reserved));
|
||||
|
||||
memset(&fse, 0x0, sizeof(fse));
|
||||
fse.index = fsize->index;
|
||||
fse.pad = 0;
|
||||
fse.code = fmt->code;
|
||||
fse.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
ret = v4l2_subdev_call(sd, pad, enum_frame_size, NULL, &fse);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -2146,7 +2146,6 @@ vpfe_async_bound(struct v4l2_async_notifier *notifier,
|
||||
{
|
||||
struct vpfe_device *vpfe = container_of(notifier->v4l2_dev,
|
||||
struct vpfe_device, v4l2_dev);
|
||||
struct v4l2_subdev_mbus_code_enum mbus_code;
|
||||
struct vpfe_subdev_info *sdinfo;
|
||||
struct vpfe_fmt *fmt;
|
||||
int ret = 0;
|
||||
@@ -2173,9 +2172,11 @@ vpfe_async_bound(struct v4l2_async_notifier *notifier,
|
||||
|
||||
vpfe->num_active_fmt = 0;
|
||||
for (j = 0, i = 0; (ret != -EINVAL); ++j) {
|
||||
memset(&mbus_code, 0, sizeof(mbus_code));
|
||||
mbus_code.index = j;
|
||||
mbus_code.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
struct v4l2_subdev_mbus_code_enum mbus_code = {
|
||||
.index = j,
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
|
||||
ret = v4l2_subdev_call(subdev, pad, enum_mbus_code,
|
||||
NULL, &mbus_code);
|
||||
if (ret)
|
||||
|
||||
@@ -763,7 +763,10 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
|
||||
struct fimc_dev *fimc = ctx->fimc_dev;
|
||||
struct fimc_pipeline *p = to_fimc_pipeline(fimc->vid_cap.ve.pipe);
|
||||
struct v4l2_subdev *sd = p->subdevs[IDX_SENSOR];
|
||||
struct v4l2_subdev_format sfmt;
|
||||
struct v4l2_subdev_format sfmt = {
|
||||
.which = set ? V4L2_SUBDEV_FORMAT_ACTIVE
|
||||
: V4L2_SUBDEV_FORMAT_TRY,
|
||||
};
|
||||
struct v4l2_mbus_framefmt *mf = &sfmt.format;
|
||||
struct media_entity *me;
|
||||
struct fimc_fmt *ffmt;
|
||||
@@ -774,9 +777,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
|
||||
if (WARN_ON(!sd || !tfmt))
|
||||
return -EINVAL;
|
||||
|
||||
memset(&sfmt, 0, sizeof(sfmt));
|
||||
sfmt.format = *tfmt;
|
||||
sfmt.which = set ? V4L2_SUBDEV_FORMAT_ACTIVE : V4L2_SUBDEV_FORMAT_TRY;
|
||||
|
||||
me = fimc_pipeline_get_head(&sd->entity);
|
||||
|
||||
|
||||
@@ -814,7 +814,6 @@ static const struct v4l2_file_operations cal_fops = {
|
||||
|
||||
static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
|
||||
{
|
||||
struct v4l2_subdev_mbus_code_enum mbus_code;
|
||||
struct v4l2_mbus_framefmt mbus_fmt;
|
||||
const struct cal_format_info *fmtinfo;
|
||||
unsigned int i, j, k;
|
||||
@@ -829,10 +828,11 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
|
||||
ctx->num_active_fmt = 0;
|
||||
|
||||
for (j = 0, i = 0; ; ++j) {
|
||||
struct v4l2_subdev_mbus_code_enum mbus_code = {
|
||||
.index = j,
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
|
||||
memset(&mbus_code, 0, sizeof(mbus_code));
|
||||
mbus_code.index = j;
|
||||
mbus_code.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
ret = v4l2_subdev_call(ctx->phy->source, pad, enum_mbus_code,
|
||||
NULL, &mbus_code);
|
||||
if (ret == -EINVAL)
|
||||
|
||||
@@ -66,7 +66,9 @@ static int vsp1_du_insert_uif(struct vsp1_device *vsp1,
|
||||
struct vsp1_entity *prev, unsigned int prev_pad,
|
||||
struct vsp1_entity *next, unsigned int next_pad)
|
||||
{
|
||||
struct v4l2_subdev_format format;
|
||||
struct v4l2_subdev_format format = {
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
int ret;
|
||||
|
||||
if (!uif) {
|
||||
@@ -82,8 +84,6 @@ static int vsp1_du_insert_uif(struct vsp1_device *vsp1,
|
||||
prev->sink = uif;
|
||||
prev->sink_pad = UIF_PAD_SINK;
|
||||
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
format.pad = prev_pad;
|
||||
|
||||
ret = v4l2_subdev_call(&prev->subdev, pad, get_fmt, NULL, &format);
|
||||
@@ -118,8 +118,12 @@ static int vsp1_du_pipeline_setup_rpf(struct vsp1_device *vsp1,
|
||||
struct vsp1_entity *uif,
|
||||
unsigned int brx_input)
|
||||
{
|
||||
struct v4l2_subdev_selection sel;
|
||||
struct v4l2_subdev_format format;
|
||||
struct v4l2_subdev_selection sel = {
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
struct v4l2_subdev_format format = {
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
const struct v4l2_rect *crop;
|
||||
int ret;
|
||||
|
||||
@@ -129,8 +133,6 @@ static int vsp1_du_pipeline_setup_rpf(struct vsp1_device *vsp1,
|
||||
*/
|
||||
crop = &vsp1->drm->inputs[rpf->entity.index].crop;
|
||||
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
format.pad = RWPF_PAD_SINK;
|
||||
format.format.width = crop->width + crop->left;
|
||||
format.format.height = crop->height + crop->top;
|
||||
@@ -147,8 +149,6 @@ static int vsp1_du_pipeline_setup_rpf(struct vsp1_device *vsp1,
|
||||
__func__, format.format.width, format.format.height,
|
||||
format.format.code, rpf->entity.index);
|
||||
|
||||
memset(&sel, 0, sizeof(sel));
|
||||
sel.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
sel.pad = RWPF_PAD_SINK;
|
||||
sel.target = V4L2_SEL_TGT_CROP;
|
||||
sel.r = *crop;
|
||||
|
||||
@@ -184,15 +184,14 @@ vsp1_entity_get_pad_selection(struct vsp1_entity *entity,
|
||||
int vsp1_entity_init_cfg(struct v4l2_subdev *subdev,
|
||||
struct v4l2_subdev_state *sd_state)
|
||||
{
|
||||
struct v4l2_subdev_format format;
|
||||
unsigned int pad;
|
||||
|
||||
for (pad = 0; pad < subdev->entity.num_pads - 1; ++pad) {
|
||||
memset(&format, 0, sizeof(format));
|
||||
|
||||
format.pad = pad;
|
||||
format.which = sd_state ? V4L2_SUBDEV_FORMAT_TRY
|
||||
: V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
struct v4l2_subdev_format format = {
|
||||
.pad = pad,
|
||||
.which = sd_state ? V4L2_SUBDEV_FORMAT_TRY
|
||||
: V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
|
||||
v4l2_subdev_call(subdev, pad, set_fmt, sd_state, &format);
|
||||
}
|
||||
|
||||
@@ -1014,7 +1014,10 @@ static int cxusb_medion_try_s_fmt_vid_cap(struct file *file,
|
||||
{
|
||||
struct dvb_usb_device *dvbdev = video_drvdata(file);
|
||||
struct cxusb_medion_dev *cxdev = dvbdev->priv;
|
||||
struct v4l2_subdev_format subfmt;
|
||||
struct v4l2_subdev_format subfmt = {
|
||||
.which = isset ? V4L2_SUBDEV_FORMAT_ACTIVE :
|
||||
V4L2_SUBDEV_FORMAT_TRY,
|
||||
};
|
||||
u32 field;
|
||||
int ret;
|
||||
|
||||
@@ -1024,9 +1027,6 @@ static int cxusb_medion_try_s_fmt_vid_cap(struct file *file,
|
||||
field = vb2_start_streaming_called(&cxdev->videoqueue) ?
|
||||
cxdev->field_order : cxusb_medion_field_order(cxdev);
|
||||
|
||||
memset(&subfmt, 0, sizeof(subfmt));
|
||||
subfmt.which = isset ? V4L2_SUBDEV_FORMAT_ACTIVE :
|
||||
V4L2_SUBDEV_FORMAT_TRY;
|
||||
subfmt.format.width = f->fmt.pix.width & ~1;
|
||||
subfmt.format.height = f->fmt.pix.height & ~1;
|
||||
subfmt.format.code = MEDIA_BUS_FMT_FIXED;
|
||||
@@ -1464,7 +1464,9 @@ int cxusb_medion_analog_init(struct dvb_usb_device *dvbdev)
|
||||
.buf = tuner_analog_msg_data,
|
||||
.len =
|
||||
sizeof(tuner_analog_msg_data) };
|
||||
struct v4l2_subdev_format subfmt;
|
||||
struct v4l2_subdev_format subfmt = {
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
int ret;
|
||||
|
||||
/* switch tuner to analog mode so IF demod will become accessible */
|
||||
@@ -1507,8 +1509,6 @@ int cxusb_medion_analog_init(struct dvb_usb_device *dvbdev)
|
||||
v4l2_subdev_call(cxdev->tuner, video, s_std, cxdev->norm);
|
||||
v4l2_subdev_call(cxdev->cx25840, video, s_std, cxdev->norm);
|
||||
|
||||
memset(&subfmt, 0, sizeof(subfmt));
|
||||
subfmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
|
||||
subfmt.format.width = cxdev->width;
|
||||
subfmt.format.height = cxdev->height;
|
||||
subfmt.format.code = MEDIA_BUS_FMT_FIXED;
|
||||
|
||||
@@ -829,7 +829,7 @@ static void r592_remove(struct pci_dev *pdev)
|
||||
/* Stop the processing thread.
|
||||
That ensures that we won't take any more requests */
|
||||
kthread_stop(dev->io_thread);
|
||||
|
||||
del_timer_sync(&dev->detect_timer);
|
||||
r592_enable_device(dev, false);
|
||||
|
||||
while (!error && dev->req) {
|
||||
|
||||
@@ -1427,7 +1427,9 @@ mptlan_remove(struct pci_dev *pdev)
|
||||
{
|
||||
MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
|
||||
struct net_device *dev = ioc->netdev;
|
||||
struct mpt_lan_priv *priv = netdev_priv(dev);
|
||||
|
||||
cancel_delayed_work_sync(&priv->post_buckets_task);
|
||||
if(dev != NULL) {
|
||||
unregister_netdev(dev);
|
||||
free_netdev(dev);
|
||||
|
||||
@@ -836,6 +836,7 @@ out_stop_rx:
|
||||
dln2_stop_rx_urbs(dln2);
|
||||
|
||||
out_free:
|
||||
usb_put_dev(dln2->usb_dev);
|
||||
dln2_free(dln2);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -70,10 +70,12 @@ MODULE_DESCRIPTION("CAN driver for Kvaser CAN/PCIe devices");
|
||||
#define KVASER_PCIEFD_SYSID_BUILD_REG (KVASER_PCIEFD_SYSID_BASE + 0x14)
|
||||
/* Shared receive buffer registers */
|
||||
#define KVASER_PCIEFD_SRB_BASE 0x1f200
|
||||
#define KVASER_PCIEFD_SRB_FIFO_LAST_REG (KVASER_PCIEFD_SRB_BASE + 0x1f4)
|
||||
#define KVASER_PCIEFD_SRB_CMD_REG (KVASER_PCIEFD_SRB_BASE + 0x200)
|
||||
#define KVASER_PCIEFD_SRB_IEN_REG (KVASER_PCIEFD_SRB_BASE + 0x204)
|
||||
#define KVASER_PCIEFD_SRB_IRQ_REG (KVASER_PCIEFD_SRB_BASE + 0x20c)
|
||||
#define KVASER_PCIEFD_SRB_STAT_REG (KVASER_PCIEFD_SRB_BASE + 0x210)
|
||||
#define KVASER_PCIEFD_SRB_RX_NR_PACKETS_REG (KVASER_PCIEFD_SRB_BASE + 0x214)
|
||||
#define KVASER_PCIEFD_SRB_CTRL_REG (KVASER_PCIEFD_SRB_BASE + 0x218)
|
||||
/* EPCS flash controller registers */
|
||||
#define KVASER_PCIEFD_SPI_BASE 0x1fc00
|
||||
@@ -110,6 +112,9 @@ MODULE_DESCRIPTION("CAN driver for Kvaser CAN/PCIe devices");
|
||||
/* DMA support */
|
||||
#define KVASER_PCIEFD_SRB_STAT_DMA BIT(24)
|
||||
|
||||
/* SRB current packet level */
|
||||
#define KVASER_PCIEFD_SRB_RX_NR_PACKETS_MASK 0xff
|
||||
|
||||
/* DMA Enable */
|
||||
#define KVASER_PCIEFD_SRB_CTRL_DMA_ENABLE BIT(0)
|
||||
|
||||
@@ -528,7 +533,7 @@ static int kvaser_pciefd_set_tx_irq(struct kvaser_pciefd_can *can)
|
||||
KVASER_PCIEFD_KCAN_IRQ_TOF | KVASER_PCIEFD_KCAN_IRQ_ABD |
|
||||
KVASER_PCIEFD_KCAN_IRQ_TAE | KVASER_PCIEFD_KCAN_IRQ_TAL |
|
||||
KVASER_PCIEFD_KCAN_IRQ_FDIC | KVASER_PCIEFD_KCAN_IRQ_BPP |
|
||||
KVASER_PCIEFD_KCAN_IRQ_TAR | KVASER_PCIEFD_KCAN_IRQ_TFD;
|
||||
KVASER_PCIEFD_KCAN_IRQ_TAR;
|
||||
|
||||
iowrite32(msk, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
|
||||
@@ -556,6 +561,8 @@ static void kvaser_pciefd_setup_controller(struct kvaser_pciefd_can *can)
|
||||
|
||||
if (can->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
|
||||
mode |= KVASER_PCIEFD_KCAN_MODE_LOM;
|
||||
else
|
||||
mode &= ~KVASER_PCIEFD_KCAN_MODE_LOM;
|
||||
|
||||
mode |= KVASER_PCIEFD_KCAN_MODE_EEN;
|
||||
mode |= KVASER_PCIEFD_KCAN_MODE_EPEN;
|
||||
@@ -574,7 +581,7 @@ static void kvaser_pciefd_start_controller_flush(struct kvaser_pciefd_can *can)
|
||||
|
||||
spin_lock_irqsave(&can->lock, irq);
|
||||
iowrite32(-1, can->reg_base + KVASER_PCIEFD_KCAN_IRQ_REG);
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_ABD | KVASER_PCIEFD_KCAN_IRQ_TFD,
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_ABD,
|
||||
can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
|
||||
status = ioread32(can->reg_base + KVASER_PCIEFD_KCAN_STAT_REG);
|
||||
@@ -617,7 +624,7 @@ static int kvaser_pciefd_bus_on(struct kvaser_pciefd_can *can)
|
||||
iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
iowrite32(-1, can->reg_base + KVASER_PCIEFD_KCAN_IRQ_REG);
|
||||
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_ABD | KVASER_PCIEFD_KCAN_IRQ_TFD,
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_ABD,
|
||||
can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
|
||||
mode = ioread32(can->reg_base + KVASER_PCIEFD_KCAN_MODE_REG);
|
||||
@@ -721,6 +728,7 @@ static int kvaser_pciefd_stop(struct net_device *netdev)
|
||||
iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
del_timer(&can->bec_poll_timer);
|
||||
}
|
||||
can->can.state = CAN_STATE_STOPPED;
|
||||
close_candev(netdev);
|
||||
|
||||
return ret;
|
||||
@@ -1003,8 +1011,7 @@ static int kvaser_pciefd_setup_can_ctrls(struct kvaser_pciefd *pcie)
|
||||
SET_NETDEV_DEV(netdev, &pcie->pci->dev);
|
||||
|
||||
iowrite32(-1, can->reg_base + KVASER_PCIEFD_KCAN_IRQ_REG);
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_ABD |
|
||||
KVASER_PCIEFD_KCAN_IRQ_TFD,
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_ABD,
|
||||
can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
|
||||
pcie->can[i] = can;
|
||||
@@ -1054,6 +1061,7 @@ static int kvaser_pciefd_setup_dma(struct kvaser_pciefd *pcie)
|
||||
{
|
||||
int i;
|
||||
u32 srb_status;
|
||||
u32 srb_packet_count;
|
||||
dma_addr_t dma_addr[KVASER_PCIEFD_DMA_COUNT];
|
||||
|
||||
/* Disable the DMA */
|
||||
@@ -1081,6 +1089,15 @@ static int kvaser_pciefd_setup_dma(struct kvaser_pciefd *pcie)
|
||||
KVASER_PCIEFD_SRB_CMD_RDB1,
|
||||
pcie->reg_base + KVASER_PCIEFD_SRB_CMD_REG);
|
||||
|
||||
/* Empty Rx FIFO */
|
||||
srb_packet_count = ioread32(pcie->reg_base + KVASER_PCIEFD_SRB_RX_NR_PACKETS_REG) &
|
||||
KVASER_PCIEFD_SRB_RX_NR_PACKETS_MASK;
|
||||
while (srb_packet_count) {
|
||||
/* Drop current packet in FIFO */
|
||||
ioread32(pcie->reg_base + KVASER_PCIEFD_SRB_FIFO_LAST_REG);
|
||||
srb_packet_count--;
|
||||
}
|
||||
|
||||
srb_status = ioread32(pcie->reg_base + KVASER_PCIEFD_SRB_STAT_REG);
|
||||
if (!(srb_status & KVASER_PCIEFD_SRB_STAT_DI)) {
|
||||
dev_err(&pcie->pci->dev, "DMA not idle before enabling\n");
|
||||
@@ -1423,9 +1440,6 @@ static int kvaser_pciefd_handle_status_packet(struct kvaser_pciefd *pcie,
|
||||
cmd = KVASER_PCIEFD_KCAN_CMD_AT;
|
||||
cmd |= ++can->cmd_seq << KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT;
|
||||
iowrite32(cmd, can->reg_base + KVASER_PCIEFD_KCAN_CMD_REG);
|
||||
|
||||
iowrite32(KVASER_PCIEFD_KCAN_IRQ_TFD,
|
||||
can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
|
||||
} else if (p->header[0] & KVASER_PCIEFD_SPACK_IDET &&
|
||||
p->header[0] & KVASER_PCIEFD_SPACK_IRM &&
|
||||
cmdseq == (p->header[1] & KVASER_PCIEFD_PACKET_SEQ_MSK) &&
|
||||
@@ -1714,15 +1728,6 @@ static int kvaser_pciefd_transmit_irq(struct kvaser_pciefd_can *can)
|
||||
if (irq & KVASER_PCIEFD_KCAN_IRQ_TOF)
|
||||
netdev_err(can->can.dev, "Tx FIFO overflow\n");
|
||||
|
||||
if (irq & KVASER_PCIEFD_KCAN_IRQ_TFD) {
|
||||
u8 count = ioread32(can->reg_base +
|
||||
KVASER_PCIEFD_KCAN_TX_NPACKETS_REG) & 0xff;
|
||||
|
||||
if (count == 0)
|
||||
iowrite32(KVASER_PCIEFD_KCAN_CTRL_EFLUSH,
|
||||
can->reg_base + KVASER_PCIEFD_KCAN_CTRL_REG);
|
||||
}
|
||||
|
||||
if (irq & KVASER_PCIEFD_KCAN_IRQ_BPP)
|
||||
netdev_err(can->can.dev,
|
||||
"Fail to change bittiming, when not in reset mode\n");
|
||||
@@ -1824,6 +1829,11 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
|
||||
if (err)
|
||||
goto err_teardown_can_ctrls;
|
||||
|
||||
err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler,
|
||||
IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie);
|
||||
if (err)
|
||||
goto err_teardown_can_ctrls;
|
||||
|
||||
iowrite32(KVASER_PCIEFD_SRB_IRQ_DPD0 | KVASER_PCIEFD_SRB_IRQ_DPD1,
|
||||
pcie->reg_base + KVASER_PCIEFD_SRB_IRQ_REG);
|
||||
|
||||
@@ -1844,11 +1854,6 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
|
||||
iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1,
|
||||
pcie->reg_base + KVASER_PCIEFD_SRB_CMD_REG);
|
||||
|
||||
err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler,
|
||||
IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie);
|
||||
if (err)
|
||||
goto err_teardown_can_ctrls;
|
||||
|
||||
err = kvaser_pciefd_reg_candev(pcie);
|
||||
if (err)
|
||||
goto err_free_irq;
|
||||
@@ -1856,6 +1861,8 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
|
||||
return 0;
|
||||
|
||||
err_free_irq:
|
||||
/* Disable PCI interrupts */
|
||||
iowrite32(0, pcie->reg_base + KVASER_PCIEFD_IEN_REG);
|
||||
free_irq(pcie->pci->irq, pcie);
|
||||
|
||||
err_teardown_can_ctrls:
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
/* Offset 0x10: Extended Port Control Command */
|
||||
#define MV88E6393X_PORT_EPC_CMD 0x10
|
||||
#define MV88E6393X_PORT_EPC_CMD_BUSY 0x8000
|
||||
#define MV88E6393X_PORT_EPC_CMD_WRITE 0x0300
|
||||
#define MV88E6393X_PORT_EPC_CMD_WRITE 0x3000
|
||||
#define MV88E6393X_PORT_EPC_INDEX_PORT_ETYPE 0x02
|
||||
|
||||
/* Offset 0x11: Extended Port Control Data */
|
||||
|
||||
@@ -2709,7 +2709,7 @@ static int bnxt_get_nvram_directory(struct net_device *dev, u32 len, u8 *data)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
buflen = dir_entries * entry_length;
|
||||
buflen = mul_u32_u32(dir_entries, entry_length);
|
||||
buf = hwrm_req_dma_slice(bp, req, buflen, &dma_handle);
|
||||
if (!buf) {
|
||||
hwrm_req_drop(bp, req);
|
||||
|
||||
@@ -3401,7 +3401,7 @@ err_clk_disable:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void bcmgenet_netif_stop(struct net_device *dev)
|
||||
static void bcmgenet_netif_stop(struct net_device *dev, bool stop_phy)
|
||||
{
|
||||
struct bcmgenet_priv *priv = netdev_priv(dev);
|
||||
|
||||
@@ -3416,7 +3416,8 @@ static void bcmgenet_netif_stop(struct net_device *dev)
|
||||
/* Disable MAC transmit. TX DMA disabled must be done before this */
|
||||
umac_enable_set(priv, CMD_TX_EN, false);
|
||||
|
||||
phy_stop(dev->phydev);
|
||||
if (stop_phy)
|
||||
phy_stop(dev->phydev);
|
||||
bcmgenet_disable_rx_napi(priv);
|
||||
bcmgenet_intr_disable(priv);
|
||||
|
||||
@@ -3442,7 +3443,7 @@ static int bcmgenet_close(struct net_device *dev)
|
||||
|
||||
netif_dbg(priv, ifdown, dev, "bcmgenet_close\n");
|
||||
|
||||
bcmgenet_netif_stop(dev);
|
||||
bcmgenet_netif_stop(dev, false);
|
||||
|
||||
/* Really kill the PHY state machine and disconnect from it */
|
||||
phy_disconnect(dev->phydev);
|
||||
@@ -4242,7 +4243,7 @@ static int bcmgenet_suspend(struct device *d)
|
||||
|
||||
netif_device_detach(dev);
|
||||
|
||||
bcmgenet_netif_stop(dev);
|
||||
bcmgenet_netif_stop(dev, true);
|
||||
|
||||
if (!device_may_wakeup(d))
|
||||
phy_suspend(dev->phydev);
|
||||
|
||||
@@ -4054,9 +4054,11 @@ fec_drv_remove(struct platform_device *pdev)
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to resume device in remove callback (%pe)\n",
|
||||
ERR_PTR(ret));
|
||||
|
||||
cancel_work_sync(&fep->tx_timeout_work);
|
||||
fec_ptp_stop(pdev);
|
||||
@@ -4069,8 +4071,13 @@ fec_drv_remove(struct platform_device *pdev)
|
||||
of_phy_deregister_fixed_link(np);
|
||||
of_node_put(fep->phy_node);
|
||||
|
||||
clk_disable_unprepare(fep->clk_ahb);
|
||||
clk_disable_unprepare(fep->clk_ipg);
|
||||
/* After pm_runtime_get_sync() failed, the clks are still off, so skip
|
||||
* disabling them again.
|
||||
*/
|
||||
if (ret >= 0) {
|
||||
clk_disable_unprepare(fep->clk_ahb);
|
||||
clk_disable_unprepare(fep->clk_ipg);
|
||||
}
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
|
||||
@@ -233,19 +233,6 @@ static int gve_napi_poll_dqo(struct napi_struct *napi, int budget)
|
||||
bool reschedule = false;
|
||||
int work_done = 0;
|
||||
|
||||
/* Clear PCI MSI-X Pending Bit Array (PBA)
|
||||
*
|
||||
* This bit is set if an interrupt event occurs while the vector is
|
||||
* masked. If this bit is set and we reenable the interrupt, it will
|
||||
* fire again. Since we're just about to poll the queue state, we don't
|
||||
* need it to fire again.
|
||||
*
|
||||
* Under high softirq load, it's possible that the interrupt condition
|
||||
* is triggered twice before we got the chance to process it.
|
||||
*/
|
||||
gve_write_irq_doorbell_dqo(priv, block,
|
||||
GVE_ITR_NO_UPDATE_DQO | GVE_ITR_CLEAR_PBA_BIT_DQO);
|
||||
|
||||
if (block->tx)
|
||||
reschedule |= gve_tx_poll_dqo(block, /*do_clean=*/true);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ static struct hns3_dbg_cmd_info hns3_dbg_cmd[] = {
|
||||
.name = "tx_bd_queue",
|
||||
.cmd = HNAE3_DBG_CMD_TX_BD,
|
||||
.dentry = HNS3_DBG_DENTRY_TX_BD,
|
||||
.buf_len = HNS3_DBG_READ_LEN_4MB,
|
||||
.buf_len = HNS3_DBG_READ_LEN_5MB,
|
||||
.init = hns3_dbg_bd_file_init,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define HNS3_DBG_READ_LEN_128KB 0x20000
|
||||
#define HNS3_DBG_READ_LEN_1MB 0x100000
|
||||
#define HNS3_DBG_READ_LEN_4MB 0x400000
|
||||
#define HNS3_DBG_READ_LEN_5MB 0x500000
|
||||
#define HNS3_DBG_WRITE_LEN 1024
|
||||
|
||||
#define HNS3_DBG_DATA_STR_LEN 32
|
||||
|
||||
@@ -8134,12 +8134,15 @@ static void hclge_ae_stop(struct hnae3_handle *handle)
|
||||
/* If it is not PF reset or FLR, the firmware will disable the MAC,
|
||||
* so it only need to stop phy here.
|
||||
*/
|
||||
if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) &&
|
||||
hdev->reset_type != HNAE3_FUNC_RESET &&
|
||||
hdev->reset_type != HNAE3_FLR_RESET) {
|
||||
hclge_mac_stop_phy(hdev);
|
||||
hclge_update_link_status(hdev);
|
||||
return;
|
||||
if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state)) {
|
||||
hclge_pfc_pause_en_cfg(hdev, HCLGE_PFC_TX_RX_DISABLE,
|
||||
HCLGE_PFC_DISABLE);
|
||||
if (hdev->reset_type != HNAE3_FUNC_RESET &&
|
||||
hdev->reset_type != HNAE3_FLR_RESET) {
|
||||
hclge_mac_stop_phy(hdev);
|
||||
hclge_update_link_status(hdev);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
hclge_reset_tqp(handle);
|
||||
|
||||
@@ -171,8 +171,8 @@ int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx)
|
||||
return hclge_cmd_send(&hdev->hw, &desc, 1);
|
||||
}
|
||||
|
||||
static int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap,
|
||||
u8 pfc_bitmap)
|
||||
int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap,
|
||||
u8 pfc_bitmap)
|
||||
{
|
||||
struct hclge_desc desc;
|
||||
struct hclge_pfc_en_cmd *pfc = (struct hclge_pfc_en_cmd *)desc.data;
|
||||
|
||||
@@ -155,6 +155,9 @@ struct hclge_bp_to_qs_map_cmd {
|
||||
u32 rsvd1;
|
||||
};
|
||||
|
||||
#define HCLGE_PFC_DISABLE 0
|
||||
#define HCLGE_PFC_TX_RX_DISABLE 0
|
||||
|
||||
struct hclge_pfc_en_cmd {
|
||||
u8 tx_rx_en_bitmap;
|
||||
u8 pri_en_bitmap;
|
||||
@@ -226,6 +229,8 @@ void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc);
|
||||
void hclge_tm_pfc_info_update(struct hclge_dev *hdev);
|
||||
int hclge_tm_dwrr_cfg(struct hclge_dev *hdev);
|
||||
int hclge_tm_init_hw(struct hclge_dev *hdev, bool init);
|
||||
int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap,
|
||||
u8 pfc_bitmap);
|
||||
int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx);
|
||||
int hclge_pause_addr_cfg(struct hclge_dev *hdev, const u8 *mac_addr);
|
||||
void hclge_pfc_rx_stats_get(struct hclge_dev *hdev, u64 *stats);
|
||||
|
||||
@@ -1885,7 +1885,10 @@ static int hclgevf_reset_wait(struct hclgevf_dev *hdev)
|
||||
* might happen in case reset assertion was made by PF. Yes, this also
|
||||
* means we might end up waiting bit more even for VF reset.
|
||||
*/
|
||||
msleep(5000);
|
||||
if (hdev->reset_type == HNAE3_VF_FULL_RESET)
|
||||
msleep(5000);
|
||||
else
|
||||
msleep(500);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ void igb_mta_set(struct e1000_hw *hw, u32 hash_value)
|
||||
static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
|
||||
{
|
||||
u32 hash_value, hash_mask;
|
||||
u8 bit_shift = 0;
|
||||
u8 bit_shift = 1;
|
||||
|
||||
/* Register count multiplied by bits per register */
|
||||
hash_mask = (hw->mac.mta_reg_count * 32) - 1;
|
||||
@@ -434,7 +434,7 @@ static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
|
||||
/* For a mc_filter_type of 0, bit_shift is the number of left-shifts
|
||||
* where 0xFF would still fall within the hash mask.
|
||||
*/
|
||||
while (hash_mask >> bit_shift != 0xFF)
|
||||
while (hash_mask >> bit_shift != 0xFF && bit_shift < 4)
|
||||
bit_shift++;
|
||||
|
||||
/* The portion of the address that is used for the hash table
|
||||
|
||||
@@ -1423,7 +1423,7 @@ static void pasemi_mac_queue_csdesc(const struct sk_buff *skb,
|
||||
write_dma_reg(PAS_DMA_TXCHAN_INCR(txring->chan.chno), 2);
|
||||
}
|
||||
|
||||
static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct pasemi_mac * const mac = netdev_priv(dev);
|
||||
struct pasemi_mac_txring * const txring = tx_ring(mac);
|
||||
|
||||
@@ -298,6 +298,11 @@ static void get_arttime(struct mii_bus *mii, int intel_adhoc_addr,
|
||||
*art_time = ns;
|
||||
}
|
||||
|
||||
static int stmmac_cross_ts_isr(struct stmmac_priv *priv)
|
||||
{
|
||||
return (readl(priv->ioaddr + GMAC_INT_STATUS) & GMAC_INT_TSIE);
|
||||
}
|
||||
|
||||
static int intel_crosststamp(ktime_t *device,
|
||||
struct system_counterval_t *system,
|
||||
void *ctx)
|
||||
@@ -313,8 +318,6 @@ static int intel_crosststamp(ktime_t *device,
|
||||
u32 num_snapshot;
|
||||
u32 gpio_value;
|
||||
u32 acr_value;
|
||||
int ret;
|
||||
u32 v;
|
||||
int i;
|
||||
|
||||
if (!boot_cpu_has(X86_FEATURE_ART))
|
||||
@@ -328,6 +331,8 @@ static int intel_crosststamp(ktime_t *device,
|
||||
if (priv->plat->ext_snapshot_en)
|
||||
return -EBUSY;
|
||||
|
||||
priv->plat->int_snapshot_en = 1;
|
||||
|
||||
mutex_lock(&priv->aux_ts_lock);
|
||||
/* Enable Internal snapshot trigger */
|
||||
acr_value = readl(ptpaddr + PTP_ACR);
|
||||
@@ -347,6 +352,7 @@ static int intel_crosststamp(ktime_t *device,
|
||||
break;
|
||||
default:
|
||||
mutex_unlock(&priv->aux_ts_lock);
|
||||
priv->plat->int_snapshot_en = 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
writel(acr_value, ptpaddr + PTP_ACR);
|
||||
@@ -368,13 +374,12 @@ static int intel_crosststamp(ktime_t *device,
|
||||
gpio_value |= GMAC_GPO1;
|
||||
writel(gpio_value, ioaddr + GMAC_GPIO_STATUS);
|
||||
|
||||
/* Poll for time sync operation done */
|
||||
ret = readl_poll_timeout(priv->ioaddr + GMAC_INT_STATUS, v,
|
||||
(v & GMAC_INT_TSIE), 100, 10000);
|
||||
|
||||
if (ret == -ETIMEDOUT) {
|
||||
pr_err("%s: Wait for time sync operation timeout\n", __func__);
|
||||
return ret;
|
||||
/* Time sync done Indication - Interrupt method */
|
||||
if (!wait_event_interruptible_timeout(priv->tstamp_busy_wait,
|
||||
stmmac_cross_ts_isr(priv),
|
||||
HZ / 100)) {
|
||||
priv->plat->int_snapshot_en = 0;
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
num_snapshot = (readl(ioaddr + GMAC_TIMESTAMP_STATUS) &
|
||||
@@ -392,6 +397,7 @@ static int intel_crosststamp(ktime_t *device,
|
||||
}
|
||||
|
||||
system->cycles *= intel_priv->crossts_adj;
|
||||
priv->plat->int_snapshot_en = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -576,6 +582,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
|
||||
|
||||
plat->has_crossts = true;
|
||||
plat->crosststamp = intel_crosststamp;
|
||||
plat->int_snapshot_en = 0;
|
||||
|
||||
/* Setup MSI vector offset specific to Intel mGbE controller */
|
||||
plat->msi_mac_vec = 29;
|
||||
|
||||
@@ -150,7 +150,8 @@
|
||||
#define GMAC_PCS_IRQ_DEFAULT (GMAC_INT_RGSMIIS | GMAC_INT_PCS_LINK | \
|
||||
GMAC_INT_PCS_ANE)
|
||||
|
||||
#define GMAC_INT_DEFAULT_ENABLE (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN)
|
||||
#define GMAC_INT_DEFAULT_ENABLE (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN | \
|
||||
GMAC_INT_TSIE)
|
||||
|
||||
enum dwmac4_irq_status {
|
||||
time_stamp_irq = 0x00001000,
|
||||
@@ -180,6 +181,7 @@ enum power_event {
|
||||
#define GMAC4_LPI_CTRL_STATUS 0xd0
|
||||
#define GMAC4_LPI_TIMER_CTRL 0xd4
|
||||
#define GMAC4_LPI_ENTRY_TIMER 0xd8
|
||||
#define GMAC4_MAC_ONEUS_TIC_COUNTER 0xdc
|
||||
|
||||
/* LPI control and status defines */
|
||||
#define GMAC4_LPI_CTRL_STATUS_LPITCSE BIT(21) /* LPI Tx Clock Stop Enable */
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
static void dwmac4_core_init(struct mac_device_info *hw,
|
||||
struct net_device *dev)
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
void __iomem *ioaddr = hw->pcsr;
|
||||
u32 value = readl(ioaddr + GMAC_CONFIG);
|
||||
u32 clk_rate;
|
||||
|
||||
value |= GMAC_CORE_INIT;
|
||||
|
||||
@@ -47,6 +49,10 @@ static void dwmac4_core_init(struct mac_device_info *hw,
|
||||
|
||||
writel(value, ioaddr + GMAC_CONFIG);
|
||||
|
||||
/* Configure LPI 1us counter to number of CSR clock ticks in 1us - 1 */
|
||||
clk_rate = clk_get_rate(priv->plat->stmmac_clk);
|
||||
writel((clk_rate / 1000000) - 1, ioaddr + GMAC4_MAC_ONEUS_TIC_COUNTER);
|
||||
|
||||
/* Enable GMAC interrupts */
|
||||
value = GMAC_INT_DEFAULT_ENABLE;
|
||||
|
||||
@@ -58,6 +64,9 @@ static void dwmac4_core_init(struct mac_device_info *hw,
|
||||
value |= GMAC_INT_FPE_EN;
|
||||
|
||||
writel(value, ioaddr + GMAC_INT_EN);
|
||||
|
||||
if (GMAC_INT_DEFAULT_ENABLE & GMAC_INT_TSIE)
|
||||
init_waitqueue_head(&priv->tstamp_busy_wait);
|
||||
}
|
||||
|
||||
static void dwmac4_rx_queue_enable(struct mac_device_info *hw,
|
||||
|
||||
@@ -265,6 +265,7 @@ struct stmmac_priv {
|
||||
spinlock_t ptp_lock;
|
||||
/* Protects auxiliary snapshot registers from concurrent access. */
|
||||
struct mutex aux_ts_lock;
|
||||
wait_queue_head_t tstamp_busy_wait;
|
||||
|
||||
void __iomem *mmcaddr;
|
||||
void __iomem *ptpaddr;
|
||||
|
||||
@@ -180,6 +180,11 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
|
||||
u64 ptp_time;
|
||||
int i;
|
||||
|
||||
if (priv->plat->int_snapshot_en) {
|
||||
wake_up(&priv->tstamp_busy_wait);
|
||||
return;
|
||||
}
|
||||
|
||||
tsync_int = readl(priv->ioaddr + GMAC_INT_STATUS) & GMAC_INT_TSIE;
|
||||
|
||||
if (!tsync_int)
|
||||
|
||||
@@ -175,11 +175,10 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
|
||||
struct stmmac_priv *priv =
|
||||
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
|
||||
void __iomem *ptpaddr = priv->ptpaddr;
|
||||
void __iomem *ioaddr = priv->hw->pcsr;
|
||||
struct stmmac_pps_cfg *cfg;
|
||||
u32 intr_value, acr_value;
|
||||
int ret = -EOPNOTSUPP;
|
||||
unsigned long flags;
|
||||
u32 acr_value;
|
||||
|
||||
switch (rq->type) {
|
||||
case PTP_CLK_REQ_PEROUT:
|
||||
@@ -213,19 +212,10 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
|
||||
netdev_dbg(priv->dev, "Auxiliary Snapshot %d enabled.\n",
|
||||
priv->plat->ext_snapshot_num >>
|
||||
PTP_ACR_ATSEN_SHIFT);
|
||||
/* Enable Timestamp Interrupt */
|
||||
intr_value = readl(ioaddr + GMAC_INT_EN);
|
||||
intr_value |= GMAC_INT_TSIE;
|
||||
writel(intr_value, ioaddr + GMAC_INT_EN);
|
||||
|
||||
} else {
|
||||
netdev_dbg(priv->dev, "Auxiliary Snapshot %d disabled.\n",
|
||||
priv->plat->ext_snapshot_num >>
|
||||
PTP_ACR_ATSEN_SHIFT);
|
||||
/* Disable Timestamp Interrupt */
|
||||
intr_value = readl(ioaddr + GMAC_INT_EN);
|
||||
intr_value &= ~GMAC_INT_TSIE;
|
||||
writel(intr_value, ioaddr + GMAC_INT_EN);
|
||||
}
|
||||
writel(acr_value, ptpaddr + PTP_ACR);
|
||||
mutex_unlock(&priv->aux_ts_lock);
|
||||
|
||||
@@ -5123,6 +5123,8 @@ err_out_iounmap:
|
||||
cas_shutdown(cp);
|
||||
mutex_unlock(&cp->pm_mutex);
|
||||
|
||||
vfree(cp->fw_data);
|
||||
|
||||
pci_iounmap(pdev, cp->regs);
|
||||
|
||||
|
||||
|
||||
@@ -437,6 +437,9 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb)
|
||||
goto err;
|
||||
}
|
||||
skb_dst_set(skb, &rt->dst);
|
||||
|
||||
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
|
||||
|
||||
err = ip_local_out(net, skb->sk, skb);
|
||||
if (unlikely(net_xmit_eval(err)))
|
||||
dev->stats.tx_errors++;
|
||||
@@ -475,6 +478,9 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb)
|
||||
goto err;
|
||||
}
|
||||
skb_dst_set(skb, dst);
|
||||
|
||||
memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));
|
||||
|
||||
err = ip6_local_out(net, skb->sk, skb);
|
||||
if (unlikely(net_xmit_eval(err)))
|
||||
dev->stats.tx_errors++;
|
||||
|
||||
@@ -73,6 +73,7 @@ static int mvusb_mdio_probe(struct usb_interface *interface,
|
||||
struct device *dev = &interface->dev;
|
||||
struct mvusb_mdio *mvusb;
|
||||
struct mii_bus *mdio;
|
||||
int ret;
|
||||
|
||||
mdio = devm_mdiobus_alloc_size(dev, sizeof(*mvusb));
|
||||
if (!mdio)
|
||||
@@ -93,7 +94,15 @@ static int mvusb_mdio_probe(struct usb_interface *interface,
|
||||
mdio->write = mvusb_mdio_write;
|
||||
|
||||
usb_set_intfdata(interface, mvusb);
|
||||
return of_mdiobus_register(mdio, dev->of_node);
|
||||
ret = of_mdiobus_register(mdio, dev->of_node);
|
||||
if (ret)
|
||||
goto put_dev;
|
||||
|
||||
return 0;
|
||||
|
||||
put_dev:
|
||||
usb_put_dev(mvusb->udev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void mvusb_mdio_disconnect(struct usb_interface *interface)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#define DP83867_STRAP_STS1 0x006E
|
||||
#define DP83867_STRAP_STS2 0x006f
|
||||
#define DP83867_RGMIIDCTL 0x0086
|
||||
#define DP83867_DSP_FFE_CFG 0x012c
|
||||
#define DP83867_RXFCFG 0x0134
|
||||
#define DP83867_RXFPMD1 0x0136
|
||||
#define DP83867_RXFPMD2 0x0137
|
||||
@@ -841,8 +842,27 @@ static int dp83867_phy_reset(struct phy_device *phydev)
|
||||
|
||||
usleep_range(10, 20);
|
||||
|
||||
return phy_modify(phydev, MII_DP83867_PHYCTRL,
|
||||
err = phy_modify(phydev, MII_DP83867_PHYCTRL,
|
||||
DP83867_PHYCR_FORCE_LINK_GOOD, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* Configure the DSP Feedforward Equalizer Configuration register to
|
||||
* improve short cable (< 1 meter) performance. This will not affect
|
||||
* long cable performance.
|
||||
*/
|
||||
err = phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_DSP_FFE_CFG,
|
||||
0x0e81);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESTART);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
usleep_range(10, 20);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dp83867_link_change_notify(struct phy_device *phydev)
|
||||
|
||||
@@ -714,7 +714,7 @@ static ssize_t tap_get_user(struct tap_queue *q, void *msg_control,
|
||||
|
||||
/* Move network header to the right position for VLAN tagged packets */
|
||||
if (eth_type_vlan(skb->protocol) &&
|
||||
__vlan_get_protocol(skb, skb->protocol, &depth) != 0)
|
||||
vlan_get_protocol_and_depth(skb, skb->protocol, &depth) != 0)
|
||||
skb_set_network_header(skb, depth);
|
||||
|
||||
rcu_read_lock();
|
||||
@@ -1163,7 +1163,7 @@ static int tap_get_user_xdp(struct tap_queue *q, struct xdp_buff *xdp)
|
||||
|
||||
/* Move network header to the right position for VLAN tagged packets */
|
||||
if (eth_type_vlan(skb->protocol) &&
|
||||
__vlan_get_protocol(skb, skb->protocol, &depth) != 0)
|
||||
vlan_get_protocol_and_depth(skb, skb->protocol, &depth) != 0)
|
||||
skb_set_network_header(skb, depth);
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
@@ -1604,6 +1604,38 @@ static int virtnet_poll(struct napi_struct *napi, int budget)
|
||||
return received;
|
||||
}
|
||||
|
||||
static void virtnet_disable_queue_pair(struct virtnet_info *vi, int qp_index)
|
||||
{
|
||||
virtnet_napi_tx_disable(&vi->sq[qp_index].napi);
|
||||
napi_disable(&vi->rq[qp_index].napi);
|
||||
xdp_rxq_info_unreg(&vi->rq[qp_index].xdp_rxq);
|
||||
}
|
||||
|
||||
static int virtnet_enable_queue_pair(struct virtnet_info *vi, int qp_index)
|
||||
{
|
||||
struct net_device *dev = vi->dev;
|
||||
int err;
|
||||
|
||||
err = xdp_rxq_info_reg(&vi->rq[qp_index].xdp_rxq, dev, qp_index,
|
||||
vi->rq[qp_index].napi.napi_id);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = xdp_rxq_info_reg_mem_model(&vi->rq[qp_index].xdp_rxq,
|
||||
MEM_TYPE_PAGE_SHARED, NULL);
|
||||
if (err < 0)
|
||||
goto err_xdp_reg_mem_model;
|
||||
|
||||
virtnet_napi_enable(vi->rq[qp_index].vq, &vi->rq[qp_index].napi);
|
||||
virtnet_napi_tx_enable(vi, vi->sq[qp_index].vq, &vi->sq[qp_index].napi);
|
||||
|
||||
return 0;
|
||||
|
||||
err_xdp_reg_mem_model:
|
||||
xdp_rxq_info_unreg(&vi->rq[qp_index].xdp_rxq);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int virtnet_open(struct net_device *dev)
|
||||
{
|
||||
struct virtnet_info *vi = netdev_priv(dev);
|
||||
@@ -1617,22 +1649,20 @@ static int virtnet_open(struct net_device *dev)
|
||||
if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
|
||||
schedule_delayed_work(&vi->refill, 0);
|
||||
|
||||
err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id);
|
||||
err = virtnet_enable_queue_pair(vi, i);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq,
|
||||
MEM_TYPE_PAGE_SHARED, NULL);
|
||||
if (err < 0) {
|
||||
xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
|
||||
return err;
|
||||
}
|
||||
|
||||
virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi);
|
||||
virtnet_napi_tx_enable(vi, vi->sq[i].vq, &vi->sq[i].napi);
|
||||
goto err_enable_qp;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_enable_qp:
|
||||
disable_delayed_refill(vi);
|
||||
cancel_delayed_work_sync(&vi->refill);
|
||||
|
||||
for (i--; i >= 0; i--)
|
||||
virtnet_disable_queue_pair(vi, i);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int virtnet_poll_tx(struct napi_struct *napi, int budget)
|
||||
@@ -1998,11 +2028,8 @@ static int virtnet_close(struct net_device *dev)
|
||||
/* Make sure refill_work doesn't re-enable napi! */
|
||||
cancel_delayed_work_sync(&vi->refill);
|
||||
|
||||
for (i = 0; i < vi->max_queue_pairs; i++) {
|
||||
napi_disable(&vi->rq[i].napi);
|
||||
xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
|
||||
virtnet_napi_tx_disable(&vi->sq[i].napi);
|
||||
}
|
||||
for (i = 0; i < vi->max_queue_pairs; i++)
|
||||
virtnet_disable_queue_pair(vi, i);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,11 +96,13 @@ struct ath_keyval {
|
||||
u8 kv_type;
|
||||
u8 kv_pad;
|
||||
u16 kv_len;
|
||||
u8 kv_val[16]; /* TK */
|
||||
u8 kv_mic[8]; /* Michael MIC key */
|
||||
u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
|
||||
* supports both MIC keys in the same key cache entry;
|
||||
* in that case, kv_mic is the RX key) */
|
||||
struct_group(kv_values,
|
||||
u8 kv_val[16]; /* TK */
|
||||
u8 kv_mic[8]; /* Michael MIC key */
|
||||
u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
|
||||
* supports both MIC keys in the same key cache entry;
|
||||
* in that case, kv_mic is the RX key) */
|
||||
);
|
||||
};
|
||||
|
||||
enum ath_cipher {
|
||||
|
||||
@@ -354,10 +354,10 @@ int ath11k_dp_rxbufs_replenish(struct ath11k_base *ab, int mac_id,
|
||||
goto fail_free_skb;
|
||||
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 0,
|
||||
rx_ring->bufs_max * 3, GFP_ATOMIC);
|
||||
buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 1,
|
||||
(rx_ring->bufs_max * 3) + 1, GFP_ATOMIC);
|
||||
spin_unlock_bh(&rx_ring->idr_lock);
|
||||
if (buf_id < 0)
|
||||
if (buf_id <= 0)
|
||||
goto fail_dma_unmap;
|
||||
|
||||
desc = ath11k_hal_srng_src_get_next_entry(ab, srng);
|
||||
@@ -2602,6 +2602,9 @@ try_again:
|
||||
cookie);
|
||||
mac_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_PDEV_ID, cookie);
|
||||
|
||||
if (unlikely(buf_id == 0))
|
||||
continue;
|
||||
|
||||
ar = ab->pdevs[mac_id].ar;
|
||||
rx_ring = &ar->dp.rx_refill_buf_ring;
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
|
||||
@@ -503,7 +503,7 @@ int ath_key_config(struct ath_common *common,
|
||||
|
||||
hk.kv_len = key->keylen;
|
||||
if (key->keylen)
|
||||
memcpy(hk.kv_val, key->key, key->keylen);
|
||||
memcpy(&hk.kv_values, key->key, key->keylen);
|
||||
|
||||
if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
|
||||
switch (vif->type) {
|
||||
|
||||
@@ -1350,13 +1350,14 @@ static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len)
|
||||
{
|
||||
struct brcmf_pub *drvr = ifp->drvr;
|
||||
struct brcmf_wsec_pmk_le pmk;
|
||||
int i, err;
|
||||
int err;
|
||||
|
||||
/* convert to firmware key format */
|
||||
pmk.key_len = cpu_to_le16(pmk_len << 1);
|
||||
pmk.flags = cpu_to_le16(BRCMF_WSEC_PASSPHRASE);
|
||||
for (i = 0; i < pmk_len; i++)
|
||||
snprintf(&pmk.key[2 * i], 3, "%02x", pmk_data[i]);
|
||||
memset(&pmk, 0, sizeof(pmk));
|
||||
|
||||
/* pass pmk directly */
|
||||
pmk.key_len = cpu_to_le16(pmk_len);
|
||||
pmk.flags = cpu_to_le16(0);
|
||||
memcpy(pmk.key, pmk_data, pmk_len);
|
||||
|
||||
/* store psk in firmware */
|
||||
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_WSEC_PMK,
|
||||
|
||||
@@ -1086,6 +1086,7 @@ static int iwlagn_send_sta_key(struct iwl_priv *priv,
|
||||
{
|
||||
__le16 key_flags;
|
||||
struct iwl_addsta_cmd sta_cmd;
|
||||
size_t to_copy;
|
||||
int i;
|
||||
|
||||
spin_lock_bh(&priv->sta_lock);
|
||||
@@ -1105,7 +1106,9 @@ static int iwlagn_send_sta_key(struct iwl_priv *priv,
|
||||
sta_cmd.key.tkip_rx_tsc_byte2 = tkip_iv32;
|
||||
for (i = 0; i < 5; i++)
|
||||
sta_cmd.key.tkip_rx_ttak[i] = cpu_to_le16(tkip_p1k[i]);
|
||||
memcpy(sta_cmd.key.key, keyconf->key, keyconf->keylen);
|
||||
/* keyconf may contain MIC rx/tx keys which iwl does not use */
|
||||
to_copy = min_t(size_t, sizeof(sta_cmd.key.key), keyconf->keylen);
|
||||
memcpy(sta_cmd.key.key, keyconf->key, to_copy);
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_WEP104:
|
||||
key_flags |= STA_KEY_FLG_KEY_SIZE_MSK;
|
||||
|
||||
@@ -445,6 +445,11 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2,
|
||||
struct iwl_mcc_update_resp *mcc_resp = (void *)pkt->data;
|
||||
|
||||
n_channels = __le32_to_cpu(mcc_resp->n_channels);
|
||||
if (iwl_rx_packet_payload_len(pkt) !=
|
||||
struct_size(mcc_resp, channels, n_channels)) {
|
||||
resp_cp = ERR_PTR(-EINVAL);
|
||||
goto exit;
|
||||
}
|
||||
resp_len = sizeof(struct iwl_mcc_update_resp) +
|
||||
n_channels * sizeof(__le32);
|
||||
resp_cp = kmemdup(mcc_resp, resp_len, GFP_KERNEL);
|
||||
@@ -456,6 +461,11 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2,
|
||||
struct iwl_mcc_update_resp_v3 *mcc_resp_v3 = (void *)pkt->data;
|
||||
|
||||
n_channels = __le32_to_cpu(mcc_resp_v3->n_channels);
|
||||
if (iwl_rx_packet_payload_len(pkt) !=
|
||||
struct_size(mcc_resp_v3, channels, n_channels)) {
|
||||
resp_cp = ERR_PTR(-EINVAL);
|
||||
goto exit;
|
||||
}
|
||||
resp_len = sizeof(struct iwl_mcc_update_resp) +
|
||||
n_channels * sizeof(__le32);
|
||||
resp_cp = kzalloc(resp_len, GFP_KERNEL);
|
||||
|
||||
@@ -1910,7 +1910,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
||||
RCU_INIT_POINTER(mvm->csa_tx_blocked_vif, NULL);
|
||||
/* Unblock BCAST / MCAST station */
|
||||
iwl_mvm_modify_all_sta_disable_tx(mvm, mvmvif, false);
|
||||
cancel_delayed_work_sync(&mvm->cs_tx_unblock_dwork);
|
||||
cancel_delayed_work(&mvm->cs_tx_unblock_dwork);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1380,6 +1380,9 @@ static void iwl_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct iwl_trans *trans = pci_get_drvdata(pdev);
|
||||
|
||||
if (!trans)
|
||||
return;
|
||||
|
||||
iwl_drv_stop(trans->drv);
|
||||
|
||||
iwl_trans_pcie_free(trans);
|
||||
|
||||
@@ -2778,7 +2778,7 @@ static bool iwl_write_to_user_buf(char __user *user_buf, ssize_t count,
|
||||
void *buf, ssize_t *size,
|
||||
ssize_t *bytes_copied)
|
||||
{
|
||||
int buf_size_left = count - *bytes_copied;
|
||||
ssize_t buf_size_left = count - *bytes_copied;
|
||||
|
||||
buf_size_left = buf_size_left - (buf_size_left % sizeof(u32));
|
||||
if (*size > buf_size_left)
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/sched/signal.h>
|
||||
@@ -175,16 +174,21 @@ static void powerfail_interrupt(int code, void *x)
|
||||
|
||||
|
||||
|
||||
/* parisc_panic_event() is called by the panic handler.
|
||||
* As soon as a panic occurs, our tasklets above will not be
|
||||
* executed any longer. This function then re-enables the
|
||||
* soft-power switch and allows the user to switch off the system
|
||||
/*
|
||||
* parisc_panic_event() is called by the panic handler.
|
||||
*
|
||||
* As soon as a panic occurs, our tasklets above will not
|
||||
* be executed any longer. This function then re-enables
|
||||
* the soft-power switch and allows the user to switch off
|
||||
* the system. We rely in pdc_soft_power_button_panic()
|
||||
* since this version spin_trylocks (instead of regular
|
||||
* spinlock), preventing deadlocks on panic path.
|
||||
*/
|
||||
static int parisc_panic_event(struct notifier_block *this,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
/* re-enable the soft-power switch */
|
||||
pdc_soft_power_button(0);
|
||||
pdc_soft_power_button_panic(0);
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
@@ -484,19 +485,11 @@ static inline void miphy28lp_pcie_config_gen(struct miphy28lp_phy *miphy_phy)
|
||||
|
||||
static inline int miphy28lp_wait_compensation(struct miphy28lp_phy *miphy_phy)
|
||||
{
|
||||
unsigned long finish = jiffies + 5 * HZ;
|
||||
u8 val;
|
||||
|
||||
/* Waiting for Compensation to complete */
|
||||
do {
|
||||
val = readb_relaxed(miphy_phy->base + MIPHY_COMP_FSM_6);
|
||||
|
||||
if (time_after_eq(jiffies, finish))
|
||||
return -EBUSY;
|
||||
cpu_relax();
|
||||
} while (!(val & COMP_DONE));
|
||||
|
||||
return 0;
|
||||
return readb_relaxed_poll_timeout(miphy_phy->base + MIPHY_COMP_FSM_6,
|
||||
val, val & COMP_DONE, 1, 5 * USEC_PER_SEC);
|
||||
}
|
||||
|
||||
|
||||
@@ -805,7 +798,6 @@ static inline void miphy28lp_configure_usb3(struct miphy28lp_phy *miphy_phy)
|
||||
|
||||
static inline int miphy_is_ready(struct miphy28lp_phy *miphy_phy)
|
||||
{
|
||||
unsigned long finish = jiffies + 5 * HZ;
|
||||
u8 mask = HFC_PLL | HFC_RDY;
|
||||
u8 val;
|
||||
|
||||
@@ -816,21 +808,14 @@ static inline int miphy_is_ready(struct miphy28lp_phy *miphy_phy)
|
||||
if (miphy_phy->type == PHY_TYPE_SATA)
|
||||
mask |= PHY_RDY;
|
||||
|
||||
do {
|
||||
val = readb_relaxed(miphy_phy->base + MIPHY_STATUS_1);
|
||||
if ((val & mask) != mask)
|
||||
cpu_relax();
|
||||
else
|
||||
return 0;
|
||||
} while (!time_after_eq(jiffies, finish));
|
||||
|
||||
return -EBUSY;
|
||||
return readb_relaxed_poll_timeout(miphy_phy->base + MIPHY_STATUS_1,
|
||||
val, (val & mask) == mask, 1,
|
||||
5 * USEC_PER_SEC);
|
||||
}
|
||||
|
||||
static int miphy_osc_is_ready(struct miphy28lp_phy *miphy_phy)
|
||||
{
|
||||
struct miphy28lp_dev *miphy_dev = miphy_phy->phydev;
|
||||
unsigned long finish = jiffies + 5 * HZ;
|
||||
u32 val;
|
||||
|
||||
if (!miphy_phy->osc_rdy)
|
||||
@@ -839,17 +824,10 @@ static int miphy_osc_is_ready(struct miphy28lp_phy *miphy_phy)
|
||||
if (!miphy_phy->syscfg_reg[SYSCFG_STATUS])
|
||||
return -EINVAL;
|
||||
|
||||
do {
|
||||
regmap_read(miphy_dev->regmap,
|
||||
miphy_phy->syscfg_reg[SYSCFG_STATUS], &val);
|
||||
|
||||
if ((val & MIPHY_OSC_RDY) != MIPHY_OSC_RDY)
|
||||
cpu_relax();
|
||||
else
|
||||
return 0;
|
||||
} while (!time_after_eq(jiffies, finish));
|
||||
|
||||
return -EBUSY;
|
||||
return regmap_read_poll_timeout(miphy_dev->regmap,
|
||||
miphy_phy->syscfg_reg[SYSCFG_STATUS],
|
||||
val, val & MIPHY_OSC_RDY, 1,
|
||||
5 * USEC_PER_SEC);
|
||||
}
|
||||
|
||||
static int miphy28lp_get_resource_byname(struct device_node *child,
|
||||
|
||||
@@ -389,24 +389,7 @@ config GPD_POCKET_FAN
|
||||
of the CPU temperature. Say Y or M if the kernel may be used on a
|
||||
GPD pocket.
|
||||
|
||||
config HP_ACCEL
|
||||
tristate "HP laptop accelerometer"
|
||||
depends on INPUT && ACPI
|
||||
depends on SERIO_I8042
|
||||
select SENSORS_LIS3LV02D
|
||||
select NEW_LEDS
|
||||
select LEDS_CLASS
|
||||
help
|
||||
This driver provides support for the "Mobile Data Protection System 3D"
|
||||
or "3D DriveGuard" feature of HP laptops. On such systems the driver
|
||||
should load automatically (via ACPI alias).
|
||||
|
||||
Support for a led indicating disk protection will be provided as
|
||||
hp::hddprotect. For more information on the feature, refer to
|
||||
Documentation/misc-devices/lis3lv02d.rst.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called hp_accel.
|
||||
source "drivers/platform/x86/hp/Kconfig"
|
||||
|
||||
config WIRELESS_HOTKEY
|
||||
tristate "Wireless hotkey button"
|
||||
@@ -420,29 +403,6 @@ config WIRELESS_HOTKEY
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called wireless-hotkey.
|
||||
|
||||
config HP_WMI
|
||||
tristate "HP WMI extras"
|
||||
depends on ACPI_WMI
|
||||
depends on INPUT
|
||||
depends on RFKILL || RFKILL = n
|
||||
select INPUT_SPARSEKMAP
|
||||
select ACPI_PLATFORM_PROFILE
|
||||
help
|
||||
Say Y here if you want to support WMI-based hotkeys on HP laptops and
|
||||
to read data from WMI such as docking or ambient light sensor state.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called hp-wmi.
|
||||
|
||||
config TC1100_WMI
|
||||
tristate "HP Compaq TC1100 Tablet WMI Extras"
|
||||
depends on !X86_64
|
||||
depends on ACPI
|
||||
depends on ACPI_WMI
|
||||
help
|
||||
This is a driver for the WMI extensions (wireless and bluetooth power
|
||||
control) of the HP Compaq TC1100 tablet.
|
||||
|
||||
config IBM_RTL
|
||||
tristate "Device driver to enable PRTL support"
|
||||
depends on PCI
|
||||
|
||||
@@ -52,9 +52,7 @@ obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o
|
||||
obj-$(CONFIG_GPD_POCKET_FAN) += gpd-pocket-fan.o
|
||||
|
||||
# Hewlett Packard
|
||||
obj-$(CONFIG_HP_ACCEL) += hp_accel.o
|
||||
obj-$(CONFIG_HP_WMI) += hp-wmi.o
|
||||
obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
|
||||
obj-$(CONFIG_X86_PLATFORM_DRIVERS_HP) += hp/
|
||||
|
||||
# Hewlett Packard Enterprise
|
||||
obj-$(CONFIG_UV_SYSFS) += uv_sysfs.o
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user