mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Merge 6.1.80 into android14-6.1-lts
Changes in 6.1.80
net/sched: Retire CBQ qdisc
net/sched: Retire ATM qdisc
net/sched: Retire dsmark qdisc
sched/rt: Disallow writing invalid values to sched_rt_period_us
sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
PCI: dwc: Fix a 64bit bug in dw_pcie_ep_raise_msix_irq()
riscv/efistub: Ensure GP-relative addressing is not used
dmaengine: apple-admac: Keep upper bits of REG_BUS_WIDTH
scsi: target: core: Add TMF to tmr_list handling
cifs: open_cached_dir should not rely on primary channel
dmaengine: shdma: increase size of 'dev_id'
dmaengine: fsl-qdma: increase size of 'irq_name'
wifi: cfg80211: fix missing interfaces when dumping
wifi: mac80211: fix race condition on enabling fast-xmit
fbdev: savage: Error out if pixclock equals zero
fbdev: sis: Error out if pixclock equals zero
spi: hisi-sfc-v3xx: Return IRQ_NONE if no interrupts were detected
block: Fix WARNING in _copy_from_iter
smb: Work around Clang __bdos() type confusion
cifs: translate network errors on send to -ECONNABORTED
ahci: asm1166: correct count of reported ports
aoe: avoid potential deadlock at set_capacity
ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers
MIPS: reserve exception vector space ONLY ONCE
platform/x86: touchscreen_dmi: Add info for the TECLAST X16 Plus tablet
ext4: avoid dividing by 0 in mb_update_avg_fragment_size() when block bitmap corrupt
ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found()
ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()
Input: goodix - accept ACPI resources with gpio_count == 3 && gpio_int_idx == 0
dmaengine: ti: edma: Add some null pointer checks to the edma_probe
regulator: pwm-regulator: Add validity checks in continuous .get_voltage
nvmet-tcp: fix nvme tcp ida memory leak
usb: ucsi_acpi: Quirk to ack a connector change ack cmd
ALSA: usb-audio: Check presence of valid altsetting control
ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616
spi: sh-msiof: avoid integer overflow in constants
Input: xpad - add Lenovo Legion Go controllers
misc: open-dice: Fix spurious lockdep warning
netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new
drm/amd/display: increased min_dcfclk_mhz and min_fclk_mhz
ASoC: wm_adsp: Don't overwrite fwf_name with the default
ALSA: usb-audio: Ignore clock selector errors for single connection
nvme-fc: do not wait in vain when unloading module
nvmet-fcloop: swap the list_add_tail arguments
nvmet-fc: release reference on target port
nvmet-fc: defer cleanup using RCU properly
nvmet-fc: hold reference on hostport match
nvmet-fc: abort command when there is no binding
nvmet-fc: avoid deadlock on delete association path
nvmet-fc: take ref count on tgtport before delete assoc
smb: client: increase number of PDUs allowed in a compound request
ext4: correct the hole length returned by ext4_map_blocks()
Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table
fs/ntfs3: Modified fix directory element type detection
fs/ntfs3: Improve ntfs_dir_count
fs/ntfs3: Correct hard links updating when dealing with DOS names
fs/ntfs3: Print warning while fixing hard links count
fs/ntfs3: Fix detected field-spanning write (size 8) of single field "le->name"
fs/ntfs3: Add NULL ptr dereference checking at the end of attr_allocate_frame()
fs/ntfs3: Disable ATTR_LIST_ENTRY size check
fs/ntfs3: use non-movable memory for ntfs3 MFT buffer cache
fs/ntfs3: Prevent generic message "attempt to access beyond end of device"
fs/ntfs3: Correct function is_rst_area_valid
fs/ntfs3: Update inode->i_size after success write into compressed file
fs/ntfs3: Fix oob in ntfs_listxattr
wifi: mac80211: set station RX-NSS on reconfig
wifi: mac80211: adding missing drv_mgd_complete_tx() call
efi: runtime: Fix potential overflow of soft-reserved region size
efi: Don't add memblocks for soft-reserved memory
hwmon: (coretemp) Enlarge per package core count limit
scsi: lpfc: Use unsigned type for num_sge
scsi: ufs: core: Remove the ufshcd_release() in ufshcd_err_handling_prepare()
LoongArch: Select ARCH_ENABLE_THP_MIGRATION instead of redefining it
LoongArch: Select HAVE_ARCH_SECCOMP to use the common SECCOMP menu
firewire: core: send bus reset promptly on gap count error
drm/amdgpu: skip to program GFXDEC registers for suspend abort
drm/amdgpu: reset gpu for s3 suspend abort case
smb: client: set correct d_type for reparse points under DFS mounts
virtio-blk: Ensure no requests in virtqueues before deleting vqs.
smb3: clarify mount warning
pmdomain: mediatek: fix race conditions with genpd
pmdomain: renesas: r8a77980-sysc: CR7 must be always on
IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
LoongArch: Disable IRQ before init_fn() for nonboot CPUs
drm/ttm: Fix an invalid freeing on already freed page in error path
s390/cio: fix invalid -EBUSY on ccw_device_start
ata: libata-core: Do not try to set sleeping devices to standby
dm-crypt: recheck the integrity tag after a failure
Revert "parisc: Only list existing CPUs in cpu_possible_mask"
dm-integrity: recheck the integrity tag after a failure
dm-crypt: don't modify the data when using authenticated encryption
dm-verity: recheck the hash after a failure
cxl/pci: Fix disabling memory if DVSEC CXL Range does not match a CFMWS window
scsi: target: pscsi: Fix bio_put() for error case
scsi: core: Consult supported VPD page list prior to fetching page
mm/swap: fix race when skipping swapcache
mm/damon/lru_sort: fix quota status loss due to online tunings
mm: memcontrol: clarify swapaccount=0 deprecation warning
platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler
platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names
cachefiles: fix memory leak in cachefiles_add_cache()
md: Fix missing release of 'active_io' for flush
KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
crypto: virtio/akcipher - Fix stack overflow on memcpy
irqchip/gic-v3-its: Do not assume vPE tables are preallocated
irqchip/sifive-plic: Enable interrupt if needed before EOI
PCI/MSI: Prevent MSI hardware interrupt number truncation
l2tp: pass correct message length to ip6_append_data
ARM: ep93xx: Add terminator to gpiod_lookup_table
x86/returnthunk: Allow different return thunks
Revert "x86/alternative: Make custom return thunk unconditional"
x86/alternative: Make custom return thunk unconditional
dm-integrity, dm-verity: reduce stack usage for recheck
erofs: fix refcount on the metabuf used for inode lookup
serial: amba-pl011: Fix DMA transmission in RS485 mode
usb: dwc3: gadget: Don't disconnect if not started
usb: cdnsp: blocked some cdns3 specific code
usb: cdnsp: fixed issue with incorrect detecting CDNSP family controllers
usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable()
usb: cdns3: fix memory double free when handle zero packet
usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
usb: roles: fix NULL pointer issue when put module's reference
usb: roles: don't get/set_role() when usb_role_switch is unregistered
mptcp: make userspace_pm_append_new_local_addr static
mptcp: add needs_id for userspace appending addr
mptcp: fix lockless access in subflow ULP diag
Revert "drm/amd/display: increased min_dcfclk_mhz and min_fclk_mhz"
IB/hfi1: Fix a memleak in init_credit_return
RDMA/bnxt_re: Return error for SRQ resize
RDMA/irdma: Fix KASAN issue with tasklet
RDMA/irdma: Validate max_send_wr and max_recv_wr
RDMA/irdma: Set the CQ read threshold for GEN 1
RDMA/irdma: Add AE for too many RNRS
RDMA/srpt: Support specifying the srpt_service_guid parameter
iommufd/iova_bitmap: Bounds check mapped::pages access
iommufd/iova_bitmap: Switch iova_bitmap::bitmap to an u8 array
iommufd/iova_bitmap: Consider page offset for the pages to be pinned
RDMA/qedr: Fix qedr_create_user_qp error flow
arm64: dts: rockchip: set num-cs property for spi on px30
RDMA/srpt: fix function pointer cast warnings
bpf, scripts: Correct GPL license name
scsi: smartpqi: Fix disable_managed_interrupts
scsi: jazz_esp: Only build if SCSI core is builtin
net: bridge: switchdev: Skip MDB replays of deferred events on offload
net: bridge: switchdev: Ensure deferred event delivery on unoffload
dccp/tcp: Unhash sk from ehash for tb2 alloc failure after check_estalblished().
nouveau: fix function cast warnings
x86/numa: Fix the address overlap check in numa_fill_memblks()
x86/numa: Fix the sort compare func used in numa_fill_memblks()
net: stmmac: Fix incorrect dereference in interrupt handlers
ipv4: properly combine dev_base_seq and ipv4.dev_addr_genid
ipv6: properly combine dev_base_seq and ipv6.dev_addr_genid
ata: ahci_ceva: fix error handling for Xilinx GT PHY support
bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel
afs: Increase buffer size in afs_update_volume_status()
ipv6: sr: fix possible use-after-free and null-ptr-deref
net: dev: Convert sa_data to flexible array in struct sockaddr
arm64/sme: Restore SME registers on exit from suspend
platform/x86: thinkpad_acpi: Only update profile if successfully converted
octeontx2-af: Consider the action set by PF
s390: use the correct count for __iowrite64_copy()
bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
tls: break out of main loop when PEEK gets a non-data record
tls: stop recv() if initial process_rx_list gave us non-DATA
tls: don't skip over different type records from the rx_list
netfilter: nf_tables: set dormant flag on hook register failure
netfilter: flowtable: simplify route logic
netfilter: nft_flow_offload: reset dst in route object after setting up flow
netfilter: nft_flow_offload: release dst in case direct xmit path is used
netfilter: nf_tables: rename function to destroy hook list
netfilter: nf_tables: register hooks last when adding new chain/flowtable
netfilter: nf_tables: use kzalloc for hook allocation
net: mctp: put sock on tag allocation failure
net: sparx5: Add spinlock for frame transmission from CPU
phonet: take correct lock to peek at the RX queue
phonet/pep: fix racy skb_queue_empty() use
Fix write to cloned skb in ipv6_hop_ioam()
net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY
drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set
drm/amd/display: Fix memory leak in dm_sw_fini()
i2c: imx: when being a target, mark the last read as processed
erofs: simplify compression configuration parser
erofs: fix inconsistent per-file compression format
mm/damon/reclaim: fix quota stauts loss due to online tunings
fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
mm: zswap: fix missing folio cleanup in writeback race path
mptcp: userspace pm send RM_ADDR for ID 0
mptcp: add needs_id for netlink appending addr
ata: ahci: add identifiers for ASM2116 series adapters
ahci: Extend ASM1061 43-bit DMA address quirk to other ASM106x parts
arp: Prevent overflow in arp_req_get().
fs/ntfs3: Enhance the attribute size check
Linux 6.1.80
Change-Id: If7ea9da891b2f34cf97bc5f656e00be8f361cc65
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 79
|
||||
SUBLEVEL = 80
|
||||
EXTRAVERSION =
|
||||
NAME = Curry Ramen
|
||||
|
||||
|
||||
@@ -339,6 +339,7 @@ static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = {
|
||||
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
||||
GPIO_LOOKUP_IDX("G", 0, NULL, 1,
|
||||
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
||||
{ }
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -607,6 +607,7 @@
|
||||
clock-names = "spiclk", "apb_pclk";
|
||||
dmas = <&dmac 12>, <&dmac 13>;
|
||||
dma-names = "tx", "rx";
|
||||
num-cs = <2>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>;
|
||||
#address-cells = <1>;
|
||||
@@ -622,6 +623,7 @@
|
||||
clock-names = "spiclk", "apb_pclk";
|
||||
dmas = <&dmac 14>, <&dmac 15>;
|
||||
dma-names = "tx", "rx";
|
||||
num-cs = <2>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_csn1 &spi1_miso &spi1_mosi>;
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -343,6 +343,7 @@ extern void sme_alloc(struct task_struct *task, bool flush);
|
||||
extern unsigned int sme_get_vl(void);
|
||||
extern int sme_set_current_vl(unsigned long arg);
|
||||
extern int sme_get_current_vl(void);
|
||||
extern void sme_suspend_exit(void);
|
||||
|
||||
/*
|
||||
* Return how many bytes of memory are required to store the full SME
|
||||
@@ -372,6 +373,7 @@ static inline int sme_max_vl(void) { return 0; }
|
||||
static inline int sme_max_virtualisable_vl(void) { return 0; }
|
||||
static inline int sme_set_current_vl(unsigned long arg) { return -EINVAL; }
|
||||
static inline int sme_get_current_vl(void) { return -EINVAL; }
|
||||
static inline void sme_suspend_exit(void) { }
|
||||
|
||||
static inline size_t za_state_size(struct task_struct const *task)
|
||||
{
|
||||
|
||||
@@ -1347,6 +1347,20 @@ void __init sme_setup(void)
|
||||
get_sme_default_vl());
|
||||
}
|
||||
|
||||
void sme_suspend_exit(void)
|
||||
{
|
||||
u64 smcr = 0;
|
||||
|
||||
if (!system_supports_sme())
|
||||
return;
|
||||
|
||||
if (system_supports_fa64())
|
||||
smcr |= SMCR_ELx_FA64;
|
||||
|
||||
write_sysreg_s(smcr, SYS_SMCR_EL1);
|
||||
write_sysreg_s(0, SYS_SMPRI_EL1);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARM64_SME */
|
||||
|
||||
static void sve_init_regs(void)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <asm/daifflags.h>
|
||||
#include <asm/debug-monitors.h>
|
||||
#include <asm/exec.h>
|
||||
#include <asm/fpsimd.h>
|
||||
#include <asm/mte.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/mmu_context.h>
|
||||
@@ -77,6 +78,8 @@ void notrace __cpu_suspend_exit(void)
|
||||
*/
|
||||
spectre_v4_enable_mitigation(NULL);
|
||||
|
||||
sme_suspend_exit();
|
||||
|
||||
/* Restore additional feature-specific configuration */
|
||||
ptrauth_suspend_exit();
|
||||
}
|
||||
|
||||
@@ -462,6 +462,9 @@ static int its_sync_lpi_pending_table(struct kvm_vcpu *vcpu)
|
||||
}
|
||||
|
||||
irq = vgic_get_irq(vcpu->kvm, NULL, intids[i]);
|
||||
if (!irq)
|
||||
continue;
|
||||
|
||||
raw_spin_lock_irqsave(&irq->irq_lock, flags);
|
||||
irq->pending_latch = pendmask & (1U << bit_nr);
|
||||
vgic_queue_irq_unlock(vcpu->kvm, irq, flags);
|
||||
@@ -1427,6 +1430,8 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
|
||||
|
||||
for (i = 0; i < irq_count; i++) {
|
||||
irq = vgic_get_irq(kvm, NULL, intids[i]);
|
||||
if (!irq)
|
||||
continue;
|
||||
|
||||
update_affinity(irq, vcpu2);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ config LOONGARCH
|
||||
select ARCH_BINFMT_ELF_STATE
|
||||
select ARCH_ENABLE_MEMORY_HOTPLUG
|
||||
select ARCH_ENABLE_MEMORY_HOTREMOVE
|
||||
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
|
||||
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
||||
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
|
||||
select ARCH_HAS_PTE_SPECIAL
|
||||
@@ -80,6 +81,7 @@ config LOONGARCH
|
||||
select GPIOLIB
|
||||
select HAVE_ARCH_AUDITSYSCALL
|
||||
select HAVE_ARCH_MMAP_RND_BITS if MMU
|
||||
select HAVE_ARCH_SECCOMP
|
||||
select HAVE_ARCH_SECCOMP_FILTER
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
||||
@@ -461,23 +463,6 @@ config PHYSICAL_START
|
||||
specified in the "crashkernel=YM@XM" command line boot parameter
|
||||
passed to the panic-ed kernel).
|
||||
|
||||
config SECCOMP
|
||||
bool "Enable seccomp to safely compute untrusted bytecode"
|
||||
depends on PROC_FS
|
||||
default y
|
||||
help
|
||||
This kernel feature is useful for number crunching applications
|
||||
that may need to compute untrusted bytecode during their
|
||||
execution. By using pipes or other transports made available to
|
||||
the process as file descriptors supporting the read/write
|
||||
syscalls, it's possible to isolate those applications in
|
||||
their own address space using seccomp. Once seccomp is
|
||||
enabled via /proc/<pid>/seccomp, it cannot be disabled
|
||||
and the task is only allowed to execute a few safe syscalls
|
||||
defined by each seccomp mode.
|
||||
|
||||
If unsure, say Y. Only embedded should say N here.
|
||||
|
||||
endmenu
|
||||
|
||||
config ARCH_SELECT_MEMORY_MODEL
|
||||
@@ -495,10 +480,6 @@ config ARCH_SPARSEMEM_ENABLE
|
||||
or have huge holes in the physical address space for other reasons.
|
||||
See <file:Documentation/mm/numa.rst> for more.
|
||||
|
||||
config ARCH_ENABLE_THP_MIGRATION
|
||||
def_bool y
|
||||
depends on TRANSPARENT_HUGEPAGE
|
||||
|
||||
config ARCH_MEMORY_PROBE
|
||||
def_bool y
|
||||
depends on MEMORY_HOTPLUG
|
||||
|
||||
@@ -297,6 +297,7 @@ void play_dead(void)
|
||||
addr = iocsr_read64(LOONGARCH_IOCSR_MBUF0);
|
||||
} while (addr == 0);
|
||||
|
||||
local_irq_disable();
|
||||
init_fn = (void *)TO_CACHE(addr);
|
||||
iocsr_write32(0xffffffff, LOONGARCH_IOCSR_IPI_CLEAR);
|
||||
|
||||
|
||||
@@ -2007,7 +2007,13 @@ unsigned long vi_handlers[64];
|
||||
|
||||
void reserve_exception_space(phys_addr_t addr, unsigned long size)
|
||||
{
|
||||
memblock_reserve(addr, size);
|
||||
/*
|
||||
* reserve exception space on CPUs other than CPU0
|
||||
* is too late, since memblock is unavailable when APs
|
||||
* up
|
||||
*/
|
||||
if (smp_processor_id() == 0)
|
||||
memblock_reserve(addr, size);
|
||||
}
|
||||
|
||||
void __init *set_except_vector(int n, void *addr)
|
||||
|
||||
@@ -171,7 +171,6 @@ static int __init processor_probe(struct parisc_device *dev)
|
||||
p->cpu_num = cpu_info.cpu_num;
|
||||
p->cpu_loc = cpu_info.cpu_loc;
|
||||
|
||||
set_cpu_possible(cpuid, true);
|
||||
store_cpu_topology(cpuid);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -466,13 +465,6 @@ static struct parisc_driver cpu_driver __refdata = {
|
||||
*/
|
||||
void __init processor_init(void)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
reset_cpu_topology();
|
||||
|
||||
/* reset possible mask. We will mark those which are possible. */
|
||||
for_each_possible_cpu(cpu)
|
||||
set_cpu_possible(cpu, false);
|
||||
|
||||
register_parisc_driver(&cpu_driver);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
|
||||
/* combine single writes by using store-block insn */
|
||||
void __iowrite64_copy(void __iomem *to, const void *from, size_t count)
|
||||
{
|
||||
zpci_memcpy_toio(to, from, count);
|
||||
zpci_memcpy_toio(to, from, count * 8);
|
||||
}
|
||||
|
||||
static void __iomem *__ioremap(phys_addr_t addr, size_t size, pgprot_t prot)
|
||||
|
||||
@@ -222,6 +222,8 @@ extern void srso_alias_untrain_ret(void);
|
||||
extern void entry_untrain_ret(void);
|
||||
extern void entry_ibpb(void);
|
||||
|
||||
extern void (*x86_return_thunk)(void);
|
||||
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
|
||||
#define GEN(reg) \
|
||||
|
||||
@@ -536,6 +536,7 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RETHUNK
|
||||
|
||||
/*
|
||||
* Rewrite the compiler generated return thunk tail-calls.
|
||||
*
|
||||
@@ -551,14 +552,18 @@ static int patch_return(void *addr, struct insn *insn, u8 *bytes)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
|
||||
return -1;
|
||||
if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
|
||||
if (x86_return_thunk == __x86_return_thunk)
|
||||
return -1;
|
||||
|
||||
bytes[i++] = RET_INSN_OPCODE;
|
||||
i = JMP32_INSN_SIZE;
|
||||
__text_gen_insn(bytes, JMP32_INSN_OPCODE, addr, x86_return_thunk, i);
|
||||
} else {
|
||||
bytes[i++] = RET_INSN_OPCODE;
|
||||
}
|
||||
|
||||
for (; i < insn->length;)
|
||||
bytes[i++] = INT3_INSN_OPCODE;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
|
||||
|
||||
ip = trampoline + size;
|
||||
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
|
||||
__text_gen_insn(ip, JMP32_INSN_OPCODE, ip, &__x86_return_thunk, JMP32_INSN_SIZE);
|
||||
__text_gen_insn(ip, JMP32_INSN_OPCODE, ip, x86_return_thunk, JMP32_INSN_SIZE);
|
||||
else
|
||||
memcpy(ip, retq, sizeof(retq));
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type,
|
||||
|
||||
case RET:
|
||||
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
|
||||
code = text_gen_insn(JMP32_INSN_OPCODE, insn, &__x86_return_thunk);
|
||||
code = text_gen_insn(JMP32_INSN_OPCODE, insn, x86_return_thunk);
|
||||
else
|
||||
code = &retinsn;
|
||||
break;
|
||||
|
||||
@@ -961,7 +961,7 @@ static int __init cmp_memblk(const void *a, const void *b)
|
||||
const struct numa_memblk *ma = *(const struct numa_memblk **)a;
|
||||
const struct numa_memblk *mb = *(const struct numa_memblk **)b;
|
||||
|
||||
return ma->start - mb->start;
|
||||
return (ma->start > mb->start) - (ma->start < mb->start);
|
||||
}
|
||||
|
||||
static struct numa_memblk *numa_memblk_list[NR_NODE_MEMBLKS] __initdata;
|
||||
@@ -971,14 +971,12 @@ static struct numa_memblk *numa_memblk_list[NR_NODE_MEMBLKS] __initdata;
|
||||
* @start: address to begin fill
|
||||
* @end: address to end fill
|
||||
*
|
||||
* Find and extend numa_meminfo memblks to cover the @start-@end
|
||||
* physical address range, such that the first memblk includes
|
||||
* @start, the last memblk includes @end, and any gaps in between
|
||||
* are filled.
|
||||
* Find and extend numa_meminfo memblks to cover the physical
|
||||
* address range @start-@end
|
||||
*
|
||||
* RETURNS:
|
||||
* 0 : Success
|
||||
* NUMA_NO_MEMBLK : No memblk exists in @start-@end range
|
||||
* NUMA_NO_MEMBLK : No memblks exist in address range @start-@end
|
||||
*/
|
||||
|
||||
int __init numa_fill_memblks(u64 start, u64 end)
|
||||
@@ -990,17 +988,14 @@ int __init numa_fill_memblks(u64 start, u64 end)
|
||||
|
||||
/*
|
||||
* Create a list of pointers to numa_meminfo memblks that
|
||||
* overlap start, end. Exclude (start == bi->end) since
|
||||
* end addresses in both a CFMWS range and a memblk range
|
||||
* are exclusive.
|
||||
*
|
||||
* This list of pointers is used to make in-place changes
|
||||
* that fill out the numa_meminfo memblks.
|
||||
* overlap start, end. The list is used to make in-place
|
||||
* changes that fill out the numa_meminfo memblks.
|
||||
*/
|
||||
for (int i = 0; i < mi->nr_blks; i++) {
|
||||
struct numa_memblk *bi = &mi->blk[i];
|
||||
|
||||
if (start < bi->end && end >= bi->start) {
|
||||
if (memblock_addrs_overlap(start, end - start, bi->start,
|
||||
bi->end - bi->start)) {
|
||||
blk[count] = &mi->blk[i];
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ static void emit_return(u8 **pprog, u8 *ip)
|
||||
u8 *prog = *pprog;
|
||||
|
||||
if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
|
||||
emit_jump(&prog, &__x86_return_thunk, ip);
|
||||
emit_jump(&prog, x86_return_thunk, ip);
|
||||
} else {
|
||||
EMIT1(0xC3); /* ret */
|
||||
if (IS_ENABLED(CONFIG_SLS))
|
||||
|
||||
@@ -203,12 +203,19 @@ static int bio_copy_user_iov(struct request *rq, struct rq_map_data *map_data,
|
||||
/*
|
||||
* success
|
||||
*/
|
||||
if ((iov_iter_rw(iter) == WRITE &&
|
||||
(!map_data || !map_data->null_mapped)) ||
|
||||
(map_data && map_data->from_user)) {
|
||||
if (iov_iter_rw(iter) == WRITE &&
|
||||
(!map_data || !map_data->null_mapped)) {
|
||||
ret = bio_copy_from_iter(bio, iter);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
} else if (map_data && map_data->from_user) {
|
||||
struct iov_iter iter2 = *iter;
|
||||
|
||||
/* This is the copy-in part of SG_DXFER_TO_FROM_DEV. */
|
||||
iter2.data_source = ITER_SOURCE;
|
||||
ret = bio_copy_from_iter(bio, &iter2);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
} else {
|
||||
if (bmd->is_our_pages)
|
||||
zero_fill_bio(bio);
|
||||
|
||||
@@ -49,6 +49,7 @@ enum {
|
||||
enum board_ids {
|
||||
/* board IDs by feature in alphabetical order */
|
||||
board_ahci,
|
||||
board_ahci_43bit_dma,
|
||||
board_ahci_ign_iferr,
|
||||
board_ahci_low_power,
|
||||
board_ahci_no_debounce_delay,
|
||||
@@ -129,6 +130,13 @@ static const struct ata_port_info ahci_port_info[] = {
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_43bit_dma] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_43BIT_ONLY),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_ops,
|
||||
},
|
||||
[board_ahci_ign_iferr] = {
|
||||
AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
|
||||
.flags = AHCI_FLAG_COMMON,
|
||||
@@ -597,14 +605,19 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
|
||||
{ PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
|
||||
|
||||
/* Asmedia */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci }, /* ASM1061R */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci }, /* ASM1062R */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci }, /* ASM1062+JMB575 */
|
||||
/* ASMedia */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci_43bit_dma }, /* ASM1060 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci_43bit_dma }, /* ASM1060 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci_43bit_dma }, /* ASM1061 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci_43bit_dma }, /* ASM1061/1062 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci_43bit_dma }, /* ASM1061R */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci_43bit_dma }, /* ASM1062R */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci_43bit_dma }, /* ASM1062+JMB575 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x1062), board_ahci }, /* ASM1062A */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x1064), board_ahci }, /* ASM1064 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x1164), board_ahci }, /* ASM1164 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x1165), board_ahci }, /* ASM1165 */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x1166), board_ahci }, /* ASM1166 */
|
||||
|
||||
/*
|
||||
* Samsung SSDs found on some macbooks. NCQ times out if MSI is
|
||||
@@ -658,6 +671,11 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");
|
||||
static void ahci_pci_save_initial_config(struct pci_dev *pdev,
|
||||
struct ahci_host_priv *hpriv)
|
||||
{
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && pdev->device == 0x1166) {
|
||||
dev_info(&pdev->dev, "ASM1166 has only six ports\n");
|
||||
hpriv->saved_port_map = 0x3f;
|
||||
}
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {
|
||||
dev_info(&pdev->dev, "JMB361 has only one port\n");
|
||||
hpriv->saved_port_map = 1;
|
||||
@@ -944,11 +962,20 @@ static int ahci_pci_device_resume(struct device *dev)
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
|
||||
static int ahci_configure_dma_masks(struct pci_dev *pdev,
|
||||
struct ahci_host_priv *hpriv)
|
||||
{
|
||||
const int dma_bits = using_dac ? 64 : 32;
|
||||
int dma_bits;
|
||||
int rc;
|
||||
|
||||
if (hpriv->cap & HOST_CAP_64) {
|
||||
dma_bits = 64;
|
||||
if (hpriv->flags & AHCI_HFLAG_43BIT_ONLY)
|
||||
dma_bits = 43;
|
||||
} else {
|
||||
dma_bits = 32;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the device fixup already set the dma_mask to some non-standard
|
||||
* value, don't extend it here. This happens on STA2X11, for example.
|
||||
@@ -1921,7 +1948,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
ahci_gtf_filter_workaround(host);
|
||||
|
||||
/* initialize adapter */
|
||||
rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64);
|
||||
rc = ahci_configure_dma_masks(pdev, hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -247,6 +247,7 @@ enum {
|
||||
AHCI_HFLAG_SUSPEND_PHYS = BIT(26), /* handle PHYs during
|
||||
suspend/resume */
|
||||
AHCI_HFLAG_NO_SXS = BIT(28), /* SXS not supported */
|
||||
AHCI_HFLAG_43BIT_ONLY = BIT(29), /* 43bit DMA addr limit */
|
||||
|
||||
/* ap->flags bits */
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ struct ceva_ahci_priv {
|
||||
u32 axicc;
|
||||
bool is_cci_enabled;
|
||||
int flags;
|
||||
struct reset_control *rst;
|
||||
};
|
||||
|
||||
static unsigned int ceva_ahci_read_id(struct ata_device *dev,
|
||||
@@ -189,6 +188,60 @@ static struct scsi_host_template ahci_platform_sht = {
|
||||
AHCI_SHT(DRV_NAME),
|
||||
};
|
||||
|
||||
static int ceva_ahci_platform_enable_resources(struct ahci_host_priv *hpriv)
|
||||
{
|
||||
int rc, i;
|
||||
|
||||
rc = ahci_platform_enable_regulators(hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = ahci_platform_enable_clks(hpriv);
|
||||
if (rc)
|
||||
goto disable_regulator;
|
||||
|
||||
/* Assert the controller reset */
|
||||
rc = ahci_platform_assert_rsts(hpriv);
|
||||
if (rc)
|
||||
goto disable_clks;
|
||||
|
||||
for (i = 0; i < hpriv->nports; i++) {
|
||||
rc = phy_init(hpriv->phys[i]);
|
||||
if (rc)
|
||||
goto disable_rsts;
|
||||
}
|
||||
|
||||
/* De-assert the controller reset */
|
||||
ahci_platform_deassert_rsts(hpriv);
|
||||
|
||||
for (i = 0; i < hpriv->nports; i++) {
|
||||
rc = phy_power_on(hpriv->phys[i]);
|
||||
if (rc) {
|
||||
phy_exit(hpriv->phys[i]);
|
||||
goto disable_phys;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
disable_rsts:
|
||||
ahci_platform_deassert_rsts(hpriv);
|
||||
|
||||
disable_phys:
|
||||
while (--i >= 0) {
|
||||
phy_power_off(hpriv->phys[i]);
|
||||
phy_exit(hpriv->phys[i]);
|
||||
}
|
||||
|
||||
disable_clks:
|
||||
ahci_platform_disable_clks(hpriv);
|
||||
|
||||
disable_regulator:
|
||||
ahci_platform_disable_regulators(hpriv);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ceva_ahci_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
@@ -203,47 +256,19 @@ static int ceva_ahci_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
cevapriv->ahci_pdev = pdev;
|
||||
|
||||
cevapriv->rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
|
||||
NULL);
|
||||
if (IS_ERR(cevapriv->rst))
|
||||
dev_err_probe(&pdev->dev, PTR_ERR(cevapriv->rst),
|
||||
"failed to get reset\n");
|
||||
|
||||
hpriv = ahci_platform_get_resources(pdev, 0);
|
||||
if (IS_ERR(hpriv))
|
||||
return PTR_ERR(hpriv);
|
||||
|
||||
if (!cevapriv->rst) {
|
||||
rc = ahci_platform_enable_resources(hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
} else {
|
||||
int i;
|
||||
hpriv->rsts = devm_reset_control_get_optional_exclusive(&pdev->dev,
|
||||
NULL);
|
||||
if (IS_ERR(hpriv->rsts))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(hpriv->rsts),
|
||||
"failed to get reset\n");
|
||||
|
||||
rc = ahci_platform_enable_clks(hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
/* Assert the controller reset */
|
||||
reset_control_assert(cevapriv->rst);
|
||||
|
||||
for (i = 0; i < hpriv->nports; i++) {
|
||||
rc = phy_init(hpriv->phys[i]);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* De-assert the controller reset */
|
||||
reset_control_deassert(cevapriv->rst);
|
||||
|
||||
for (i = 0; i < hpriv->nports; i++) {
|
||||
rc = phy_power_on(hpriv->phys[i]);
|
||||
if (rc) {
|
||||
phy_exit(hpriv->phys[i]);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
}
|
||||
rc = ceva_ahci_platform_enable_resources(hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (of_property_read_bool(np, "ceva,broken-gen2"))
|
||||
cevapriv->flags = CEVA_FLAG_BROKEN_GEN2;
|
||||
@@ -252,52 +277,60 @@ static int ceva_ahci_probe(struct platform_device *pdev)
|
||||
if (of_property_read_u8_array(np, "ceva,p0-cominit-params",
|
||||
(u8 *)&cevapriv->pp2c[0], 4) < 0) {
|
||||
dev_warn(dev, "ceva,p0-cominit-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
if (of_property_read_u8_array(np, "ceva,p1-cominit-params",
|
||||
(u8 *)&cevapriv->pp2c[1], 4) < 0) {
|
||||
dev_warn(dev, "ceva,p1-cominit-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
/* Read OOB timing value for COMWAKE from device-tree*/
|
||||
if (of_property_read_u8_array(np, "ceva,p0-comwake-params",
|
||||
(u8 *)&cevapriv->pp3c[0], 4) < 0) {
|
||||
dev_warn(dev, "ceva,p0-comwake-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
if (of_property_read_u8_array(np, "ceva,p1-comwake-params",
|
||||
(u8 *)&cevapriv->pp3c[1], 4) < 0) {
|
||||
dev_warn(dev, "ceva,p1-comwake-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
/* Read phy BURST timing value from device-tree */
|
||||
if (of_property_read_u8_array(np, "ceva,p0-burst-params",
|
||||
(u8 *)&cevapriv->pp4c[0], 4) < 0) {
|
||||
dev_warn(dev, "ceva,p0-burst-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
if (of_property_read_u8_array(np, "ceva,p1-burst-params",
|
||||
(u8 *)&cevapriv->pp4c[1], 4) < 0) {
|
||||
dev_warn(dev, "ceva,p1-burst-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
/* Read phy RETRY interval timing value from device-tree */
|
||||
if (of_property_read_u16_array(np, "ceva,p0-retry-params",
|
||||
(u16 *)&cevapriv->pp5c[0], 2) < 0) {
|
||||
dev_warn(dev, "ceva,p0-retry-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
if (of_property_read_u16_array(np, "ceva,p1-retry-params",
|
||||
(u16 *)&cevapriv->pp5c[1], 2) < 0) {
|
||||
dev_warn(dev, "ceva,p1-retry-params property not defined\n");
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -335,7 +368,7 @@ static int __maybe_unused ceva_ahci_resume(struct device *dev)
|
||||
struct ahci_host_priv *hpriv = host->private_data;
|
||||
int rc;
|
||||
|
||||
rc = ahci_platform_enable_resources(hpriv);
|
||||
rc = ceva_ahci_platform_enable_resources(hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -2005,6 +2005,10 @@ void ata_dev_power_set_active(struct ata_device *dev)
|
||||
struct ata_taskfile tf;
|
||||
unsigned int err_mask;
|
||||
|
||||
/* If the device is already sleeping, do nothing. */
|
||||
if (dev->flags & ATA_DFLAG_SLEEPING)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Issue READ VERIFY SECTORS command for 1 sector at lba=0 only
|
||||
* if supported by the device.
|
||||
|
||||
@@ -333,6 +333,7 @@ aoeblk_gdalloc(void *vp)
|
||||
struct gendisk *gd;
|
||||
mempool_t *mp;
|
||||
struct blk_mq_tag_set *set;
|
||||
sector_t ssize;
|
||||
ulong flags;
|
||||
int late = 0;
|
||||
int err;
|
||||
@@ -395,7 +396,7 @@ aoeblk_gdalloc(void *vp)
|
||||
gd->minors = AOE_PARTITIONS;
|
||||
gd->fops = &aoe_bdops;
|
||||
gd->private_data = d;
|
||||
set_capacity(gd, d->ssize);
|
||||
ssize = d->ssize;
|
||||
snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%d",
|
||||
d->aoemajor, d->aoeminor);
|
||||
|
||||
@@ -404,6 +405,8 @@ aoeblk_gdalloc(void *vp)
|
||||
|
||||
spin_unlock_irqrestore(&d->lock, flags);
|
||||
|
||||
set_capacity(gd, ssize);
|
||||
|
||||
err = device_add_disk(NULL, gd, aoe_attr_groups);
|
||||
if (err)
|
||||
goto out_disk_cleanup;
|
||||
|
||||
@@ -1206,14 +1206,15 @@ static int virtblk_freeze(struct virtio_device *vdev)
|
||||
{
|
||||
struct virtio_blk *vblk = vdev->priv;
|
||||
|
||||
/* Ensure no requests in virtqueues before deleting vqs. */
|
||||
blk_mq_freeze_queue(vblk->disk->queue);
|
||||
|
||||
/* Ensure we don't receive any more interrupts */
|
||||
virtio_reset_device(vdev);
|
||||
|
||||
/* Make sure no work handler is accessing the device. */
|
||||
flush_work(&vblk->config_work);
|
||||
|
||||
blk_mq_quiesce_queue(vblk->disk->queue);
|
||||
|
||||
vdev->config->del_vqs(vdev);
|
||||
kfree(vblk->vqs);
|
||||
|
||||
@@ -1231,7 +1232,7 @@ static int virtblk_restore(struct virtio_device *vdev)
|
||||
|
||||
virtio_device_ready(vdev);
|
||||
|
||||
blk_mq_unquiesce_queue(vblk->disk->queue);
|
||||
blk_mq_unfreeze_queue(vblk->disk->queue);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -104,7 +104,8 @@ static void virtio_crypto_dataq_akcipher_callback(struct virtio_crypto_request *
|
||||
}
|
||||
|
||||
static int virtio_crypto_alg_akcipher_init_session(struct virtio_crypto_akcipher_ctx *ctx,
|
||||
struct virtio_crypto_ctrl_header *header, void *para,
|
||||
struct virtio_crypto_ctrl_header *header,
|
||||
struct virtio_crypto_akcipher_session_para *para,
|
||||
const uint8_t *key, unsigned int keylen)
|
||||
{
|
||||
struct scatterlist outhdr_sg, key_sg, inhdr_sg, *sgs[3];
|
||||
@@ -128,7 +129,7 @@ static int virtio_crypto_alg_akcipher_init_session(struct virtio_crypto_akcipher
|
||||
|
||||
ctrl = &vc_ctrl_req->ctrl;
|
||||
memcpy(&ctrl->header, header, sizeof(ctrl->header));
|
||||
memcpy(&ctrl->u, para, sizeof(ctrl->u));
|
||||
memcpy(&ctrl->u.akcipher_create_session.para, para, sizeof(*para));
|
||||
input = &vc_ctrl_req->input;
|
||||
input->status = cpu_to_le32(VIRTIO_CRYPTO_ERR);
|
||||
|
||||
|
||||
@@ -376,9 +376,9 @@ static bool __cxl_hdm_decode_init(struct cxl_dev_state *cxlds,
|
||||
allowed++;
|
||||
}
|
||||
|
||||
if (!allowed) {
|
||||
cxl_set_mem_enable(cxlds, 0);
|
||||
info->mem_enabled = 0;
|
||||
if (!allowed && info->mem_enabled) {
|
||||
dev_err(dev, "Range register decodes outside platform defined CXL ranges.\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
|
||||
#define REG_BUS_WIDTH(ch) (0x8040 + (ch) * 0x200)
|
||||
|
||||
#define BUS_WIDTH_WORD_SIZE GENMASK(3, 0)
|
||||
#define BUS_WIDTH_FRAME_SIZE GENMASK(7, 4)
|
||||
#define BUS_WIDTH_8BIT 0x00
|
||||
#define BUS_WIDTH_16BIT 0x01
|
||||
#define BUS_WIDTH_32BIT 0x02
|
||||
@@ -739,7 +741,8 @@ static int admac_device_config(struct dma_chan *chan,
|
||||
struct admac_data *ad = adchan->host;
|
||||
bool is_tx = admac_chan_direction(adchan->no) == DMA_MEM_TO_DEV;
|
||||
int wordsize = 0;
|
||||
u32 bus_width = 0;
|
||||
u32 bus_width = readl_relaxed(ad->base + REG_BUS_WIDTH(adchan->no)) &
|
||||
~(BUS_WIDTH_WORD_SIZE | BUS_WIDTH_FRAME_SIZE);
|
||||
|
||||
switch (is_tx ? config->dst_addr_width : config->src_addr_width) {
|
||||
case DMA_SLAVE_BUSWIDTH_1_BYTE:
|
||||
|
||||
@@ -805,7 +805,7 @@ fsl_qdma_irq_init(struct platform_device *pdev,
|
||||
int i;
|
||||
int cpu;
|
||||
int ret;
|
||||
char irq_name[20];
|
||||
char irq_name[32];
|
||||
|
||||
fsl_qdma->error_irq =
|
||||
platform_get_irq_byname(pdev, "qdma-error");
|
||||
|
||||
@@ -25,7 +25,7 @@ struct sh_dmae_chan {
|
||||
const struct sh_dmae_slave_config *config; /* Slave DMA configuration */
|
||||
int xmit_shift; /* log_2(bytes_per_xfer) */
|
||||
void __iomem *base;
|
||||
char dev_id[16]; /* unique name per DMAC of channel */
|
||||
char dev_id[32]; /* unique name per DMAC of channel */
|
||||
int pm_error;
|
||||
dma_addr_t slave_addr;
|
||||
};
|
||||
|
||||
@@ -2413,6 +2413,11 @@ static int edma_probe(struct platform_device *pdev)
|
||||
if (irq > 0) {
|
||||
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccint",
|
||||
dev_name(dev));
|
||||
if (!irq_name) {
|
||||
ret = -ENOMEM;
|
||||
goto err_disable_pm;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(dev, irq, dma_irq_handler, 0, irq_name,
|
||||
ecc);
|
||||
if (ret) {
|
||||
@@ -2429,6 +2434,11 @@ static int edma_probe(struct platform_device *pdev)
|
||||
if (irq > 0) {
|
||||
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccerrint",
|
||||
dev_name(dev));
|
||||
if (!irq_name) {
|
||||
ret = -ENOMEM;
|
||||
goto err_disable_pm;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(dev, irq, dma_ccerr_handler, 0, irq_name,
|
||||
ecc);
|
||||
if (ret) {
|
||||
|
||||
@@ -429,7 +429,23 @@ static void bm_work(struct work_struct *work)
|
||||
*/
|
||||
card->bm_generation = generation;
|
||||
|
||||
if (root_device == NULL) {
|
||||
if (card->gap_count == 0) {
|
||||
/*
|
||||
* If self IDs have inconsistent gap counts, do a
|
||||
* bus reset ASAP. The config rom read might never
|
||||
* complete, so don't wait for it. However, still
|
||||
* send a PHY configuration packet prior to the
|
||||
* bus reset. The PHY configuration packet might
|
||||
* fail, but 1394-2008 8.4.5.2 explicitly permits
|
||||
* it in this case, so it should be safe to try.
|
||||
*/
|
||||
new_root_id = local_id;
|
||||
/*
|
||||
* We must always send a bus reset if the gap count
|
||||
* is inconsistent, so bypass the 5-reset limit.
|
||||
*/
|
||||
card->bm_retries = 0;
|
||||
} else if (root_device == NULL) {
|
||||
/*
|
||||
* Either link_on is false, or we failed to read the
|
||||
* config rom. In either case, pick another root.
|
||||
|
||||
@@ -107,7 +107,7 @@ static int __init arm_enable_runtime_services(void)
|
||||
efi_memory_desc_t *md;
|
||||
|
||||
for_each_efi_memory_desc(md) {
|
||||
int md_size = md->num_pages << EFI_PAGE_SHIFT;
|
||||
u64 md_size = md->num_pages << EFI_PAGE_SHIFT;
|
||||
struct resource *res;
|
||||
|
||||
if (!(md->attribute & EFI_MEMORY_SP))
|
||||
|
||||
@@ -116,15 +116,6 @@ static __init int is_usable_memory(efi_memory_desc_t *md)
|
||||
case EFI_BOOT_SERVICES_DATA:
|
||||
case EFI_CONVENTIONAL_MEMORY:
|
||||
case EFI_PERSISTENT_MEMORY:
|
||||
/*
|
||||
* Special purpose memory is 'soft reserved', which means it
|
||||
* is set aside initially, but can be hotplugged back in or
|
||||
* be assigned to the dax driver after boot.
|
||||
*/
|
||||
if (efi_soft_reserve_enabled() &&
|
||||
(md->attribute & EFI_MEMORY_SP))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* According to the spec, these regions are no longer reserved
|
||||
* after calling ExitBootServices(). However, we can only use
|
||||
@@ -169,6 +160,16 @@ static __init void reserve_regions(void)
|
||||
size = npages << PAGE_SHIFT;
|
||||
|
||||
if (is_memory(md)) {
|
||||
/*
|
||||
* Special purpose memory is 'soft reserved', which
|
||||
* means it is set aside initially. Don't add a memblock
|
||||
* for it now so that it can be hotplugged back in or
|
||||
* be assigned to the dax driver after boot.
|
||||
*/
|
||||
if (efi_soft_reserve_enabled() &&
|
||||
(md->attribute & EFI_MEMORY_SP))
|
||||
continue;
|
||||
|
||||
early_init_dt_add_memory_arch(paddr, size);
|
||||
|
||||
if (!is_usable_memory(md))
|
||||
|
||||
@@ -26,7 +26,7 @@ cflags-$(CONFIG_ARM) := $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) \
|
||||
-fno-builtin -fpic \
|
||||
$(call cc-option,-mno-single-pic-base)
|
||||
cflags-$(CONFIG_RISCV) := $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) \
|
||||
-fpic
|
||||
-fpic -mno-relax
|
||||
cflags-$(CONFIG_LOONGARCH) := $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) \
|
||||
-fpie
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ static int __init riscv_enable_runtime_services(void)
|
||||
efi_memory_desc_t *md;
|
||||
|
||||
for_each_efi_memory_desc(md) {
|
||||
int md_size = md->num_pages << EFI_PAGE_SHIFT;
|
||||
u64 md_size = md->num_pages << EFI_PAGE_SHIFT;
|
||||
struct resource *res;
|
||||
|
||||
if (!(md->attribute & EFI_MEMORY_SP))
|
||||
|
||||
@@ -999,6 +999,8 @@ struct amdgpu_device {
|
||||
bool in_s3;
|
||||
bool in_s4;
|
||||
bool in_s0ix;
|
||||
/* indicate amdgpu suspension status */
|
||||
bool suspend_complete;
|
||||
|
||||
enum pp_mp1_state mp1_state;
|
||||
struct amdgpu_doorbell_index doorbell_index;
|
||||
|
||||
@@ -2414,6 +2414,7 @@ static int amdgpu_pmops_suspend(struct device *dev)
|
||||
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||
struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||
|
||||
adev->suspend_complete = false;
|
||||
if (amdgpu_acpi_is_s0ix_active(adev))
|
||||
adev->in_s0ix = true;
|
||||
else if (amdgpu_acpi_is_s3_active(adev))
|
||||
@@ -2428,6 +2429,7 @@ static int amdgpu_pmops_suspend_noirq(struct device *dev)
|
||||
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||
struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||
|
||||
adev->suspend_complete = true;
|
||||
if (amdgpu_acpi_should_gpu_reset(adev))
|
||||
return amdgpu_asic_reset(adev);
|
||||
|
||||
|
||||
@@ -3064,6 +3064,14 @@ static int gfx_v9_0_cp_gfx_start(struct amdgpu_device *adev)
|
||||
|
||||
gfx_v9_0_cp_gfx_enable(adev, true);
|
||||
|
||||
/* Now only limit the quirk on the APU gfx9 series and already
|
||||
* confirmed that the APU gfx10/gfx11 needn't such update.
|
||||
*/
|
||||
if (adev->flags & AMD_IS_APU &&
|
||||
adev->in_s3 && !adev->suspend_complete) {
|
||||
DRM_INFO(" Will skip the CSB packet resubmit\n");
|
||||
return 0;
|
||||
}
|
||||
r = amdgpu_ring_alloc(ring, gfx_v9_0_get_csb_size(adev) + 4 + 3);
|
||||
if (r) {
|
||||
DRM_ERROR("amdgpu: cp failed to lock ring (%d).\n", r);
|
||||
|
||||
@@ -1285,10 +1285,32 @@ static int soc15_common_suspend(void *handle)
|
||||
return soc15_common_hw_fini(adev);
|
||||
}
|
||||
|
||||
static bool soc15_need_reset_on_resume(struct amdgpu_device *adev)
|
||||
{
|
||||
u32 sol_reg;
|
||||
|
||||
sol_reg = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_81);
|
||||
|
||||
/* Will reset for the following suspend abort cases.
|
||||
* 1) Only reset limit on APU side, dGPU hasn't checked yet.
|
||||
* 2) S3 suspend abort and TOS already launched.
|
||||
*/
|
||||
if (adev->flags & AMD_IS_APU && adev->in_s3 &&
|
||||
!adev->suspend_complete &&
|
||||
sol_reg)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int soc15_common_resume(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
if (soc15_need_reset_on_resume(adev)) {
|
||||
dev_info(adev->dev, "S3 suspend abort case, let's reset ASIC.\n");
|
||||
soc15_asic_reset(adev);
|
||||
}
|
||||
return soc15_common_hw_init(adev);
|
||||
}
|
||||
|
||||
|
||||
@@ -2255,6 +2255,7 @@ static int dm_sw_fini(void *handle)
|
||||
|
||||
if (adev->dm.dmub_srv) {
|
||||
dmub_srv_destroy(adev->dm.dmub_srv);
|
||||
kfree(adev->dm.dmub_srv);
|
||||
adev->dm.dmub_srv = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -980,7 +980,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
|
||||
uint64_t *points;
|
||||
uint32_t signaled_count, i;
|
||||
|
||||
if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT)
|
||||
if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
|
||||
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE))
|
||||
lockdep_assert_none_held_once();
|
||||
|
||||
points = kmalloc_array(count, sizeof(*points), GFP_KERNEL);
|
||||
@@ -1049,7 +1050,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
|
||||
* fallthough and try a 0 timeout wait!
|
||||
*/
|
||||
|
||||
if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
|
||||
if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
|
||||
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE)) {
|
||||
for (i = 0; i < count; ++i)
|
||||
drm_syncobj_fence_add_wait(syncobjs[i], &entries[i]);
|
||||
}
|
||||
|
||||
@@ -154,11 +154,17 @@ shadow_fw_init(struct nvkm_bios *bios, const char *name)
|
||||
return (void *)fw;
|
||||
}
|
||||
|
||||
static void
|
||||
shadow_fw_release(void *fw)
|
||||
{
|
||||
release_firmware(fw);
|
||||
}
|
||||
|
||||
static const struct nvbios_source
|
||||
shadow_fw = {
|
||||
.name = "firmware",
|
||||
.init = shadow_fw_init,
|
||||
.fini = (void(*)(void *))release_firmware,
|
||||
.fini = shadow_fw_release,
|
||||
.read = shadow_fw_read,
|
||||
.rw = false,
|
||||
};
|
||||
|
||||
@@ -383,7 +383,7 @@ static void ttm_pool_free_range(struct ttm_pool *pool, struct ttm_tt *tt,
|
||||
enum ttm_caching caching,
|
||||
pgoff_t start_page, pgoff_t end_page)
|
||||
{
|
||||
struct page **pages = tt->pages;
|
||||
struct page **pages = &tt->pages[start_page];
|
||||
unsigned int order;
|
||||
pgoff_t i, nr;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
|
||||
|
||||
#define PKG_SYSFS_ATTR_NO 1 /* Sysfs attribute for package temp */
|
||||
#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
|
||||
#define NUM_REAL_CORES 128 /* Number of Real cores per cpu */
|
||||
#define NUM_REAL_CORES 512 /* Number of Real cores per cpu */
|
||||
#define CORETEMP_NAME_LENGTH 28 /* String Length of attrs */
|
||||
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
|
||||
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
|
||||
|
||||
@@ -804,6 +804,11 @@ static irqreturn_t i2c_imx_slave_handle(struct imx_i2c_struct *i2c_imx,
|
||||
ctl &= ~I2CR_MTX;
|
||||
imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
|
||||
imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
|
||||
|
||||
/* flag the last byte as processed */
|
||||
i2c_imx_slave_event(i2c_imx,
|
||||
I2C_SLAVE_READ_PROCESSED, &value);
|
||||
|
||||
i2c_imx_slave_finish_op(i2c_imx);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -1710,7 +1710,7 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,
|
||||
switch (srq_attr_mask) {
|
||||
case IB_SRQ_MAX_WR:
|
||||
/* SRQ resize is not supported */
|
||||
break;
|
||||
return -EINVAL;
|
||||
case IB_SRQ_LIMIT:
|
||||
/* Change the SRQ threshold */
|
||||
if (srq_attr->srq_limit > srq->qplib_srq.max_wqe)
|
||||
@@ -1725,13 +1725,12 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,
|
||||
/* On success, update the shadow */
|
||||
srq->srq_limit = srq_attr->srq_limit;
|
||||
/* No need to Build and send response back to udata */
|
||||
break;
|
||||
return 0;
|
||||
default:
|
||||
ibdev_err(&rdev->ibdev,
|
||||
"Unsupported srq_attr_mask 0x%x", srq_attr_mask);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bnxt_re_query_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr)
|
||||
|
||||
@@ -2089,7 +2089,7 @@ int init_credit_return(struct hfi1_devdata *dd)
|
||||
"Unable to allocate credit return DMA range for NUMA %d\n",
|
||||
i);
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
goto free_cr_base;
|
||||
}
|
||||
}
|
||||
set_dev_node(&dd->pcidev->dev, dd->node);
|
||||
@@ -2097,6 +2097,10 @@ int init_credit_return(struct hfi1_devdata *dd)
|
||||
ret = 0;
|
||||
done:
|
||||
return ret;
|
||||
|
||||
free_cr_base:
|
||||
free_credit_return(dd);
|
||||
goto done;
|
||||
}
|
||||
|
||||
void free_credit_return(struct hfi1_devdata *dd)
|
||||
|
||||
@@ -3158,7 +3158,7 @@ int _pad_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx)
|
||||
{
|
||||
int rval = 0;
|
||||
|
||||
if ((unlikely(tx->num_desc + 1 == tx->desc_limit))) {
|
||||
if ((unlikely(tx->num_desc == tx->desc_limit))) {
|
||||
rval = _extend_sdma_tx_descs(dd, tx);
|
||||
if (rval) {
|
||||
__sdma_txclean(dd, tx);
|
||||
|
||||
@@ -345,6 +345,7 @@ enum irdma_cqp_op_type {
|
||||
#define IRDMA_AE_LLP_TOO_MANY_KEEPALIVE_RETRIES 0x050b
|
||||
#define IRDMA_AE_LLP_DOUBT_REACHABILITY 0x050c
|
||||
#define IRDMA_AE_LLP_CONNECTION_ESTABLISHED 0x050e
|
||||
#define IRDMA_AE_LLP_TOO_MANY_RNRS 0x050f
|
||||
#define IRDMA_AE_RESOURCE_EXHAUSTION 0x0520
|
||||
#define IRDMA_AE_RESET_SENT 0x0601
|
||||
#define IRDMA_AE_TERMINATE_SENT 0x0602
|
||||
|
||||
@@ -379,6 +379,7 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
|
||||
case IRDMA_AE_LLP_TOO_MANY_RETRIES:
|
||||
case IRDMA_AE_LCE_QP_CATASTROPHIC:
|
||||
case IRDMA_AE_LCE_FUNCTION_CATASTROPHIC:
|
||||
case IRDMA_AE_LLP_TOO_MANY_RNRS:
|
||||
case IRDMA_AE_LCE_CQ_CATASTROPHIC:
|
||||
case IRDMA_AE_UDA_XMIT_DGRAM_TOO_LONG:
|
||||
default:
|
||||
@@ -562,6 +563,13 @@ static void irdma_destroy_irq(struct irdma_pci_f *rf,
|
||||
dev->irq_ops->irdma_dis_irq(dev, msix_vec->idx);
|
||||
irq_update_affinity_hint(msix_vec->irq, NULL);
|
||||
free_irq(msix_vec->irq, dev_id);
|
||||
if (rf == dev_id) {
|
||||
tasklet_kill(&rf->dpc_tasklet);
|
||||
} else {
|
||||
struct irdma_ceq *iwceq = (struct irdma_ceq *)dev_id;
|
||||
|
||||
tasklet_kill(&iwceq->dpc_tasklet);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -762,7 +762,9 @@ static int irdma_validate_qp_attrs(struct ib_qp_init_attr *init_attr,
|
||||
|
||||
if (init_attr->cap.max_inline_data > uk_attrs->max_hw_inline ||
|
||||
init_attr->cap.max_send_sge > uk_attrs->max_hw_wq_frags ||
|
||||
init_attr->cap.max_recv_sge > uk_attrs->max_hw_wq_frags)
|
||||
init_attr->cap.max_recv_sge > uk_attrs->max_hw_wq_frags ||
|
||||
init_attr->cap.max_send_wr > uk_attrs->max_hw_wq_quanta ||
|
||||
init_attr->cap.max_recv_wr > uk_attrs->max_hw_rq_quanta)
|
||||
return -EINVAL;
|
||||
|
||||
if (rdma_protocol_roce(&iwdev->ibdev, 1)) {
|
||||
@@ -2119,9 +2121,8 @@ static int irdma_create_cq(struct ib_cq *ibcq,
|
||||
info.cq_base_pa = iwcq->kmem.pa;
|
||||
}
|
||||
|
||||
if (dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2)
|
||||
info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2,
|
||||
(u32)IRDMA_MAX_CQ_READ_THRESH);
|
||||
info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2,
|
||||
(u32)IRDMA_MAX_CQ_READ_THRESH);
|
||||
|
||||
if (irdma_sc_cq_init(cq, &info)) {
|
||||
ibdev_dbg(&iwdev->ibdev, "VERBS: init cq fail\n");
|
||||
|
||||
@@ -1879,8 +1879,17 @@ static int qedr_create_user_qp(struct qedr_dev *dev,
|
||||
/* RQ - read access only (0) */
|
||||
rc = qedr_init_user_queue(udata, dev, &qp->urq, ureq.rq_addr,
|
||||
ureq.rq_len, true, 0, alloc_and_init);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
ib_umem_release(qp->usq.umem);
|
||||
qp->usq.umem = NULL;
|
||||
if (rdma_protocol_roce(&dev->ibdev, 1)) {
|
||||
qedr_free_pbl(dev, &qp->usq.pbl_info,
|
||||
qp->usq.pbl_tbl);
|
||||
} else {
|
||||
kfree(qp->usq.pbl_tbl);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
memset(&in_params, 0, sizeof(in_params));
|
||||
|
||||
@@ -79,12 +79,16 @@ module_param(srpt_srq_size, int, 0444);
|
||||
MODULE_PARM_DESC(srpt_srq_size,
|
||||
"Shared receive queue (SRQ) size.");
|
||||
|
||||
static int srpt_set_u64_x(const char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
return kstrtou64(buffer, 16, (u64 *)kp->arg);
|
||||
}
|
||||
static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
return sprintf(buffer, "0x%016llx\n", *(u64 *)kp->arg);
|
||||
}
|
||||
module_param_call(srpt_service_guid, NULL, srpt_get_u64_x, &srpt_service_guid,
|
||||
0444);
|
||||
module_param_call(srpt_service_guid, srpt_set_u64_x, srpt_get_u64_x,
|
||||
&srpt_service_guid, 0444);
|
||||
MODULE_PARM_DESC(srpt_service_guid,
|
||||
"Using this value for ioc_guid, id_ext, and cm_listen_id instead of using the node_guid of the first HCA.");
|
||||
|
||||
@@ -210,10 +214,12 @@ static const char *get_ch_state_name(enum rdma_ch_state s)
|
||||
/**
|
||||
* srpt_qp_event - QP event callback function
|
||||
* @event: Description of the event that occurred.
|
||||
* @ch: SRPT RDMA channel.
|
||||
* @ptr: SRPT RDMA channel.
|
||||
*/
|
||||
static void srpt_qp_event(struct ib_event *event, struct srpt_rdma_ch *ch)
|
||||
static void srpt_qp_event(struct ib_event *event, void *ptr)
|
||||
{
|
||||
struct srpt_rdma_ch *ch = ptr;
|
||||
|
||||
pr_debug("QP event %d on ch=%p sess_name=%s-%d state=%s\n",
|
||||
event->event, ch, ch->sess_name, ch->qp->qp_num,
|
||||
get_ch_state_name(ch->state));
|
||||
@@ -1807,8 +1813,7 @@ retry:
|
||||
ch->cq_size = ch->rq_size + sq_size;
|
||||
|
||||
qp_init->qp_context = (void *)ch;
|
||||
qp_init->event_handler
|
||||
= (void(*)(struct ib_event *, void*))srpt_qp_event;
|
||||
qp_init->event_handler = srpt_qp_event;
|
||||
qp_init->send_cq = ch->cq;
|
||||
qp_init->recv_cq = ch->cq;
|
||||
qp_init->sq_sig_type = IB_SIGNAL_REQ_WR;
|
||||
|
||||
@@ -294,6 +294,7 @@ static const struct xpad_device {
|
||||
{ 0x1689, 0xfd00, "Razer Onza Tournament Edition", 0, XTYPE_XBOX360 },
|
||||
{ 0x1689, 0xfd01, "Razer Onza Classic Edition", 0, XTYPE_XBOX360 },
|
||||
{ 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
||||
{ 0x17ef, 0x6182, "Lenovo Legion Controller for Windows", 0, XTYPE_XBOX360 },
|
||||
{ 0x1949, 0x041a, "Amazon Game Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
@@ -489,6 +490,7 @@ static const struct usb_device_id xpad_table[] = {
|
||||
XPAD_XBOX360_VENDOR(0x15e4), /* Numark X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
|
||||
XPAD_XBOX360_VENDOR(0x17ef), /* Lenovo */
|
||||
XPAD_XBOX360_VENDOR(0x1949), /* Amazon controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
|
||||
XPAD_XBOX360_VENDOR(0x20d6), /* PowerA Controllers */
|
||||
|
||||
@@ -634,6 +634,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
|
||||
},
|
||||
.driver_data = (void *)(SERIO_QUIRK_NOAUX)
|
||||
},
|
||||
{
|
||||
/* Fujitsu Lifebook U728 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U728"),
|
||||
},
|
||||
.driver_data = (void *)(SERIO_QUIRK_NOAUX)
|
||||
},
|
||||
{
|
||||
/* Gigabyte M912 */
|
||||
.matches = {
|
||||
|
||||
@@ -884,7 +884,8 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
|
||||
}
|
||||
}
|
||||
|
||||
if (ts->gpio_count == 2 && ts->gpio_int_idx == 0) {
|
||||
/* Some devices with gpio_int_idx 0 list a third unused GPIO */
|
||||
if ((ts->gpio_count == 2 || ts->gpio_count == 3) && ts->gpio_int_idx == 0) {
|
||||
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
|
||||
gpio_mapping = acpi_goodix_int_first_gpios;
|
||||
} else if (ts->gpio_count == 2 && ts->gpio_int_idx == 1) {
|
||||
|
||||
@@ -3161,6 +3161,7 @@ static void its_cpu_init_lpis(void)
|
||||
val |= GICR_CTLR_ENABLE_LPIS;
|
||||
writel_relaxed(val, rbase + GICR_CTLR);
|
||||
|
||||
out:
|
||||
if (gic_rdists->has_vlpis && !gic_rdists->has_rvpeid) {
|
||||
void __iomem *vlpi_base = gic_data_rdist_vlpi_base();
|
||||
|
||||
@@ -3196,7 +3197,6 @@ static void its_cpu_init_lpis(void)
|
||||
|
||||
/* Make sure the GIC has seen the above */
|
||||
dsb(sy);
|
||||
out:
|
||||
gic_data_rdist()->flags |= RD_LOCAL_LPI_ENABLED;
|
||||
pr_info("GICv3: CPU%d: using %s LPI pending table @%pa\n",
|
||||
smp_processor_id(),
|
||||
|
||||
@@ -144,7 +144,13 @@ static void plic_irq_eoi(struct irq_data *d)
|
||||
{
|
||||
struct plic_handler *handler = this_cpu_ptr(&plic_handlers);
|
||||
|
||||
writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM);
|
||||
if (unlikely(irqd_irq_disabled(d))) {
|
||||
plic_toggle(handler, d->hwirq, 1);
|
||||
writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM);
|
||||
plic_toggle(handler, d->hwirq, 0);
|
||||
} else {
|
||||
writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
@@ -61,6 +61,8 @@ struct convert_context {
|
||||
struct skcipher_request *req;
|
||||
struct aead_request *req_aead;
|
||||
} r;
|
||||
bool aead_recheck;
|
||||
bool aead_failed;
|
||||
|
||||
};
|
||||
|
||||
@@ -81,6 +83,8 @@ struct dm_crypt_io {
|
||||
blk_status_t error;
|
||||
sector_t sector;
|
||||
|
||||
struct bvec_iter saved_bi_iter;
|
||||
|
||||
struct rb_node rb_node;
|
||||
} CRYPTO_MINALIGN_ATTR;
|
||||
|
||||
@@ -1365,10 +1369,13 @@ static int crypt_convert_block_aead(struct crypt_config *cc,
|
||||
if (r == -EBADMSG) {
|
||||
sector_t s = le64_to_cpu(*sector);
|
||||
|
||||
DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu",
|
||||
ctx->bio_in->bi_bdev, s);
|
||||
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead",
|
||||
ctx->bio_in, s, 0);
|
||||
ctx->aead_failed = true;
|
||||
if (ctx->aead_recheck) {
|
||||
DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu",
|
||||
ctx->bio_in->bi_bdev, s);
|
||||
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead",
|
||||
ctx->bio_in, s, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!r && cc->iv_gen_ops && cc->iv_gen_ops->post)
|
||||
@@ -1724,6 +1731,8 @@ static void crypt_io_init(struct dm_crypt_io *io, struct crypt_config *cc,
|
||||
io->base_bio = bio;
|
||||
io->sector = sector;
|
||||
io->error = 0;
|
||||
io->ctx.aead_recheck = false;
|
||||
io->ctx.aead_failed = false;
|
||||
io->ctx.r.req = NULL;
|
||||
io->integrity_metadata = NULL;
|
||||
io->integrity_metadata_from_pool = false;
|
||||
@@ -1735,6 +1744,8 @@ static void crypt_inc_pending(struct dm_crypt_io *io)
|
||||
atomic_inc(&io->io_pending);
|
||||
}
|
||||
|
||||
static void kcryptd_queue_read(struct dm_crypt_io *io);
|
||||
|
||||
/*
|
||||
* One of the bios was finished. Check for completion of
|
||||
* the whole request and correctly clean up the buffer.
|
||||
@@ -1748,6 +1759,15 @@ static void crypt_dec_pending(struct dm_crypt_io *io)
|
||||
if (!atomic_dec_and_test(&io->io_pending))
|
||||
return;
|
||||
|
||||
if (likely(!io->ctx.aead_recheck) && unlikely(io->ctx.aead_failed) &&
|
||||
cc->on_disk_tag_size && bio_data_dir(base_bio) == READ) {
|
||||
io->ctx.aead_recheck = true;
|
||||
io->ctx.aead_failed = false;
|
||||
io->error = 0;
|
||||
kcryptd_queue_read(io);
|
||||
return;
|
||||
}
|
||||
|
||||
if (io->ctx.r.req)
|
||||
crypt_free_req(cc, io->ctx.r.req, base_bio);
|
||||
|
||||
@@ -1783,15 +1803,19 @@ static void crypt_endio(struct bio *clone)
|
||||
struct dm_crypt_io *io = clone->bi_private;
|
||||
struct crypt_config *cc = io->cc;
|
||||
unsigned int rw = bio_data_dir(clone);
|
||||
blk_status_t error;
|
||||
blk_status_t error = clone->bi_status;
|
||||
|
||||
if (io->ctx.aead_recheck && !error) {
|
||||
kcryptd_queue_crypt(io);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* free the processed pages
|
||||
*/
|
||||
if (rw == WRITE)
|
||||
if (rw == WRITE || io->ctx.aead_recheck)
|
||||
crypt_free_buffer_pages(cc, clone);
|
||||
|
||||
error = clone->bi_status;
|
||||
bio_put(clone);
|
||||
|
||||
if (rw == READ && !error) {
|
||||
@@ -1812,6 +1836,22 @@ static int kcryptd_io_read(struct dm_crypt_io *io, gfp_t gfp)
|
||||
struct crypt_config *cc = io->cc;
|
||||
struct bio *clone;
|
||||
|
||||
if (io->ctx.aead_recheck) {
|
||||
if (!(gfp & __GFP_DIRECT_RECLAIM))
|
||||
return 1;
|
||||
crypt_inc_pending(io);
|
||||
clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size);
|
||||
if (unlikely(!clone)) {
|
||||
crypt_dec_pending(io);
|
||||
return 1;
|
||||
}
|
||||
clone->bi_iter.bi_sector = cc->start + io->sector;
|
||||
crypt_convert_init(cc, &io->ctx, clone, clone, io->sector);
|
||||
io->saved_bi_iter = clone->bi_iter;
|
||||
dm_submit_bio_remap(io->base_bio, clone);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We need the original biovec array in order to decrypt the whole bio
|
||||
* data *afterwards* -- thanks to immutable biovecs we don't need to
|
||||
@@ -2038,6 +2078,12 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
|
||||
io->ctx.bio_out = clone;
|
||||
io->ctx.iter_out = clone->bi_iter;
|
||||
|
||||
if (crypt_integrity_aead(cc)) {
|
||||
bio_copy_data(clone, io->base_bio);
|
||||
io->ctx.bio_in = clone;
|
||||
io->ctx.iter_in = clone->bi_iter;
|
||||
}
|
||||
|
||||
sector += bio_sectors(clone);
|
||||
|
||||
crypt_inc_pending(io);
|
||||
@@ -2074,6 +2120,14 @@ dec:
|
||||
|
||||
static void kcryptd_crypt_read_done(struct dm_crypt_io *io)
|
||||
{
|
||||
if (io->ctx.aead_recheck) {
|
||||
if (!io->error) {
|
||||
io->ctx.bio_in->bi_iter = io->saved_bi_iter;
|
||||
bio_copy_data(io->base_bio, io->ctx.bio_in);
|
||||
}
|
||||
crypt_free_buffer_pages(io->cc, io->ctx.bio_in);
|
||||
bio_put(io->ctx.bio_in);
|
||||
}
|
||||
crypt_dec_pending(io);
|
||||
}
|
||||
|
||||
@@ -2103,11 +2157,17 @@ static void kcryptd_crypt_read_convert(struct dm_crypt_io *io)
|
||||
|
||||
crypt_inc_pending(io);
|
||||
|
||||
crypt_convert_init(cc, &io->ctx, io->base_bio, io->base_bio,
|
||||
io->sector);
|
||||
if (io->ctx.aead_recheck) {
|
||||
io->ctx.cc_sector = io->sector + cc->iv_offset;
|
||||
r = crypt_convert(cc, &io->ctx,
|
||||
test_bit(DM_CRYPT_NO_READ_WORKQUEUE, &cc->flags), true);
|
||||
} else {
|
||||
crypt_convert_init(cc, &io->ctx, io->base_bio, io->base_bio,
|
||||
io->sector);
|
||||
|
||||
r = crypt_convert(cc, &io->ctx,
|
||||
test_bit(DM_CRYPT_NO_READ_WORKQUEUE, &cc->flags), true);
|
||||
r = crypt_convert(cc, &io->ctx,
|
||||
test_bit(DM_CRYPT_NO_READ_WORKQUEUE, &cc->flags), true);
|
||||
}
|
||||
/*
|
||||
* Crypto API backlogged the request, because its queue was full
|
||||
* and we're in softirq context, so continue from a workqueue
|
||||
@@ -2150,10 +2210,13 @@ static void kcryptd_async_done(struct crypto_async_request *async_req,
|
||||
if (error == -EBADMSG) {
|
||||
sector_t s = le64_to_cpu(*org_sector_of_dmreq(cc, dmreq));
|
||||
|
||||
DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu",
|
||||
ctx->bio_in->bi_bdev, s);
|
||||
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead",
|
||||
ctx->bio_in, s, 0);
|
||||
ctx->aead_failed = true;
|
||||
if (ctx->aead_recheck) {
|
||||
DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu",
|
||||
ctx->bio_in->bi_bdev, s);
|
||||
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead",
|
||||
ctx->bio_in, s, 0);
|
||||
}
|
||||
io->error = BLK_STS_PROTECTION;
|
||||
} else if (error < 0)
|
||||
io->error = BLK_STS_IOERR;
|
||||
@@ -3079,7 +3142,7 @@ static int crypt_ctr_optional(struct dm_target *ti, unsigned int argc, char **ar
|
||||
sval = strchr(opt_string + strlen("integrity:"), ':') + 1;
|
||||
if (!strcasecmp(sval, "aead")) {
|
||||
set_bit(CRYPT_MODE_INTEGRITY_AEAD, &cc->cipher_flags);
|
||||
} else if (strcasecmp(sval, "none")) {
|
||||
} else if (strcasecmp(sval, "none")) {
|
||||
ti->error = "Unknown integrity profile";
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -279,6 +279,8 @@ struct dm_integrity_c {
|
||||
|
||||
atomic64_t number_of_mismatches;
|
||||
|
||||
mempool_t recheck_pool;
|
||||
|
||||
struct notifier_block reboot_notifier;
|
||||
};
|
||||
|
||||
@@ -1699,6 +1701,77 @@ failed:
|
||||
get_random_bytes(result, ic->tag_size);
|
||||
}
|
||||
|
||||
static noinline void integrity_recheck(struct dm_integrity_io *dio, char *checksum)
|
||||
{
|
||||
struct bio *bio = dm_bio_from_per_bio_data(dio, sizeof(struct dm_integrity_io));
|
||||
struct dm_integrity_c *ic = dio->ic;
|
||||
struct bvec_iter iter;
|
||||
struct bio_vec bv;
|
||||
sector_t sector, logical_sector, area, offset;
|
||||
struct page *page;
|
||||
void *buffer;
|
||||
|
||||
get_area_and_offset(ic, dio->range.logical_sector, &area, &offset);
|
||||
dio->metadata_block = get_metadata_sector_and_offset(ic, area, offset,
|
||||
&dio->metadata_offset);
|
||||
sector = get_data_sector(ic, area, offset);
|
||||
logical_sector = dio->range.logical_sector;
|
||||
|
||||
page = mempool_alloc(&ic->recheck_pool, GFP_NOIO);
|
||||
buffer = page_to_virt(page);
|
||||
|
||||
__bio_for_each_segment(bv, bio, iter, dio->bio_details.bi_iter) {
|
||||
unsigned pos = 0;
|
||||
|
||||
do {
|
||||
char *mem;
|
||||
int r;
|
||||
struct dm_io_request io_req;
|
||||
struct dm_io_region io_loc;
|
||||
io_req.bi_opf = REQ_OP_READ;
|
||||
io_req.mem.type = DM_IO_KMEM;
|
||||
io_req.mem.ptr.addr = buffer;
|
||||
io_req.notify.fn = NULL;
|
||||
io_req.client = ic->io;
|
||||
io_loc.bdev = ic->dev->bdev;
|
||||
io_loc.sector = sector;
|
||||
io_loc.count = ic->sectors_per_block;
|
||||
|
||||
r = dm_io(&io_req, 1, &io_loc, NULL);
|
||||
if (unlikely(r)) {
|
||||
dio->bi_status = errno_to_blk_status(r);
|
||||
goto free_ret;
|
||||
}
|
||||
|
||||
integrity_sector_checksum(ic, logical_sector, buffer, checksum);
|
||||
r = dm_integrity_rw_tag(ic, checksum, &dio->metadata_block,
|
||||
&dio->metadata_offset, ic->tag_size, TAG_CMP);
|
||||
if (r) {
|
||||
if (r > 0) {
|
||||
DMERR_LIMIT("%pg: Checksum failed at sector 0x%llx",
|
||||
bio->bi_bdev, logical_sector);
|
||||
atomic64_inc(&ic->number_of_mismatches);
|
||||
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-checksum",
|
||||
bio, logical_sector, 0);
|
||||
r = -EILSEQ;
|
||||
}
|
||||
dio->bi_status = errno_to_blk_status(r);
|
||||
goto free_ret;
|
||||
}
|
||||
|
||||
mem = bvec_kmap_local(&bv);
|
||||
memcpy(mem + pos, buffer, ic->sectors_per_block << SECTOR_SHIFT);
|
||||
kunmap_local(mem);
|
||||
|
||||
pos += ic->sectors_per_block << SECTOR_SHIFT;
|
||||
sector += ic->sectors_per_block;
|
||||
logical_sector += ic->sectors_per_block;
|
||||
} while (pos < bv.bv_len);
|
||||
}
|
||||
free_ret:
|
||||
mempool_free(page, &ic->recheck_pool);
|
||||
}
|
||||
|
||||
static void integrity_metadata(struct work_struct *w)
|
||||
{
|
||||
struct dm_integrity_io *dio = container_of(w, struct dm_integrity_io, work);
|
||||
@@ -1784,15 +1857,8 @@ again:
|
||||
checksums_ptr - checksums, dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE);
|
||||
if (unlikely(r)) {
|
||||
if (r > 0) {
|
||||
sector_t s;
|
||||
|
||||
s = sector - ((r + ic->tag_size - 1) / ic->tag_size);
|
||||
DMERR_LIMIT("%pg: Checksum failed at sector 0x%llx",
|
||||
bio->bi_bdev, s);
|
||||
r = -EILSEQ;
|
||||
atomic64_inc(&ic->number_of_mismatches);
|
||||
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-checksum",
|
||||
bio, s, 0);
|
||||
integrity_recheck(dio, checksums);
|
||||
goto skip_io;
|
||||
}
|
||||
if (likely(checksums != checksums_onstack))
|
||||
kfree(checksums);
|
||||
@@ -4208,6 +4274,12 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv
|
||||
goto bad;
|
||||
}
|
||||
|
||||
r = mempool_init_page_pool(&ic->recheck_pool, 1, 0);
|
||||
if (r) {
|
||||
ti->error = "Cannot allocate mempool";
|
||||
goto bad;
|
||||
}
|
||||
|
||||
ic->metadata_wq = alloc_workqueue("dm-integrity-metadata",
|
||||
WQ_MEM_RECLAIM, METADATA_WORKQUEUE_MAX_ACTIVE);
|
||||
if (!ic->metadata_wq) {
|
||||
@@ -4572,6 +4644,7 @@ static void dm_integrity_dtr(struct dm_target *ti)
|
||||
kvfree(ic->bbs);
|
||||
if (ic->bufio)
|
||||
dm_bufio_client_destroy(ic->bufio);
|
||||
mempool_exit(&ic->recheck_pool);
|
||||
mempool_exit(&ic->journal_io_mempool);
|
||||
if (ic->io)
|
||||
dm_io_client_destroy(ic->io);
|
||||
|
||||
@@ -474,6 +474,63 @@ int verity_for_bv_block(struct dm_verity *v, struct dm_verity_io *io,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int verity_recheck_copy(struct dm_verity *v, struct dm_verity_io *io,
|
||||
u8 *data, size_t len)
|
||||
{
|
||||
memcpy(data, io->recheck_buffer, len);
|
||||
io->recheck_buffer += len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static noinline int verity_recheck(struct dm_verity *v, struct dm_verity_io *io,
|
||||
struct bvec_iter start, sector_t cur_block)
|
||||
{
|
||||
struct page *page;
|
||||
void *buffer;
|
||||
int r;
|
||||
struct dm_io_request io_req;
|
||||
struct dm_io_region io_loc;
|
||||
|
||||
page = mempool_alloc(&v->recheck_pool, GFP_NOIO);
|
||||
buffer = page_to_virt(page);
|
||||
|
||||
io_req.bi_opf = REQ_OP_READ;
|
||||
io_req.mem.type = DM_IO_KMEM;
|
||||
io_req.mem.ptr.addr = buffer;
|
||||
io_req.notify.fn = NULL;
|
||||
io_req.client = v->io;
|
||||
io_loc.bdev = v->data_dev->bdev;
|
||||
io_loc.sector = cur_block << (v->data_dev_block_bits - SECTOR_SHIFT);
|
||||
io_loc.count = 1 << (v->data_dev_block_bits - SECTOR_SHIFT);
|
||||
r = dm_io(&io_req, 1, &io_loc, NULL);
|
||||
if (unlikely(r))
|
||||
goto free_ret;
|
||||
|
||||
r = verity_hash(v, verity_io_hash_req(v, io), buffer,
|
||||
1 << v->data_dev_block_bits,
|
||||
verity_io_real_digest(v, io), true);
|
||||
if (unlikely(r))
|
||||
goto free_ret;
|
||||
|
||||
if (memcmp(verity_io_real_digest(v, io),
|
||||
verity_io_want_digest(v, io), v->digest_size)) {
|
||||
r = -EIO;
|
||||
goto free_ret;
|
||||
}
|
||||
|
||||
io->recheck_buffer = buffer;
|
||||
r = verity_for_bv_block(v, io, &start, verity_recheck_copy);
|
||||
if (unlikely(r))
|
||||
goto free_ret;
|
||||
|
||||
r = 0;
|
||||
free_ret:
|
||||
mempool_free(page, &v->recheck_pool);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static int verity_bv_zero(struct dm_verity *v, struct dm_verity_io *io,
|
||||
u8 *data, size_t len)
|
||||
{
|
||||
@@ -500,9 +557,7 @@ static int verity_verify_io(struct dm_verity_io *io)
|
||||
{
|
||||
bool is_zero;
|
||||
struct dm_verity *v = io->v;
|
||||
#if defined(CONFIG_DM_VERITY_FEC)
|
||||
struct bvec_iter start;
|
||||
#endif
|
||||
struct bvec_iter iter_copy;
|
||||
struct bvec_iter *iter;
|
||||
struct crypto_wait wait;
|
||||
@@ -553,10 +608,7 @@ static int verity_verify_io(struct dm_verity_io *io)
|
||||
if (unlikely(r < 0))
|
||||
return r;
|
||||
|
||||
#if defined(CONFIG_DM_VERITY_FEC)
|
||||
if (verity_fec_is_enabled(v))
|
||||
start = *iter;
|
||||
#endif
|
||||
start = *iter;
|
||||
r = verity_for_io_block(v, io, iter, &wait);
|
||||
if (unlikely(r < 0))
|
||||
return r;
|
||||
@@ -578,6 +630,10 @@ static int verity_verify_io(struct dm_verity_io *io)
|
||||
* tasklet since it may sleep, so fallback to work-queue.
|
||||
*/
|
||||
return -EAGAIN;
|
||||
} else if (verity_recheck(v, io, start, cur_block) == 0) {
|
||||
if (v->validated_blocks)
|
||||
set_bit(cur_block, v->validated_blocks);
|
||||
continue;
|
||||
#if defined(CONFIG_DM_VERITY_FEC)
|
||||
} else if (verity_fec_decode(v, io, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
cur_block, NULL, &start) == 0) {
|
||||
@@ -928,6 +984,10 @@ static void verity_dtr(struct dm_target *ti)
|
||||
if (v->verify_wq)
|
||||
destroy_workqueue(v->verify_wq);
|
||||
|
||||
mempool_exit(&v->recheck_pool);
|
||||
if (v->io)
|
||||
dm_io_client_destroy(v->io);
|
||||
|
||||
if (v->bufio)
|
||||
dm_bufio_client_destroy(v->bufio);
|
||||
|
||||
@@ -1363,6 +1423,20 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
}
|
||||
v->hash_blocks = hash_position;
|
||||
|
||||
r = mempool_init_page_pool(&v->recheck_pool, 1, 0);
|
||||
if (unlikely(r)) {
|
||||
ti->error = "Cannot allocate mempool";
|
||||
goto bad;
|
||||
}
|
||||
|
||||
v->io = dm_io_client_create();
|
||||
if (IS_ERR(v->io)) {
|
||||
r = PTR_ERR(v->io);
|
||||
v->io = NULL;
|
||||
ti->error = "Cannot allocate dm io";
|
||||
goto bad;
|
||||
}
|
||||
|
||||
v->bufio = dm_bufio_client_create(v->hash_dev->bdev,
|
||||
1 << v->hash_dev_block_bits, 1, sizeof(struct buffer_aux),
|
||||
dm_bufio_alloc_callback, NULL,
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef DM_VERITY_H
|
||||
#define DM_VERITY_H
|
||||
|
||||
#include <linux/dm-io.h>
|
||||
#include <linux/dm-bufio.h>
|
||||
#include <linux/device-mapper.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -68,6 +69,9 @@ struct dm_verity {
|
||||
unsigned long *validated_blocks; /* bitset blocks validated */
|
||||
|
||||
char *signature_key_desc; /* signature keyring reference */
|
||||
|
||||
struct dm_io_client *io;
|
||||
mempool_t recheck_pool;
|
||||
};
|
||||
|
||||
struct dm_verity_io {
|
||||
@@ -84,6 +88,8 @@ struct dm_verity_io {
|
||||
|
||||
struct work_struct work;
|
||||
|
||||
char *recheck_buffer;
|
||||
|
||||
/*
|
||||
* Three variably-size fields follow this struct:
|
||||
*
|
||||
|
||||
@@ -564,8 +564,12 @@ static void submit_flushes(struct work_struct *ws)
|
||||
rcu_read_lock();
|
||||
}
|
||||
rcu_read_unlock();
|
||||
if (atomic_dec_and_test(&mddev->flush_pending))
|
||||
if (atomic_dec_and_test(&mddev->flush_pending)) {
|
||||
/* The pair is percpu_ref_get() from md_flush_request() */
|
||||
percpu_ref_put(&mddev->active_io);
|
||||
|
||||
queue_work(md_wq, &mddev->flush_work);
|
||||
}
|
||||
}
|
||||
|
||||
static void md_submit_flush_data(struct work_struct *ws)
|
||||
|
||||
@@ -142,7 +142,6 @@ static int __init open_dice_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
*drvdata = (struct open_dice_drvdata){
|
||||
.lock = __MUTEX_INITIALIZER(drvdata->lock),
|
||||
.rmem = rmem,
|
||||
.misc = (struct miscdevice){
|
||||
.parent = dev,
|
||||
@@ -152,6 +151,7 @@ static int __init open_dice_probe(struct platform_device *pdev)
|
||||
.mode = 0600,
|
||||
},
|
||||
};
|
||||
mutex_init(&drvdata->lock);
|
||||
|
||||
/* Index overflow check not needed, misc_register() will fail. */
|
||||
snprintf(drvdata->name, sizeof(drvdata->name), DRIVER_NAME"%u", dev_idx++);
|
||||
|
||||
@@ -437,6 +437,10 @@ static void npc_fixup_vf_rule(struct rvu *rvu, struct npc_mcam *mcam,
|
||||
return;
|
||||
}
|
||||
|
||||
/* AF modifies given action iff PF/VF has requested for it */
|
||||
if ((entry->action & 0xFULL) != NIX_RX_ACTION_DEFAULT)
|
||||
return;
|
||||
|
||||
/* copy VF default entry action to the VF mcam entry */
|
||||
rx_action = npc_get_default_entry_action(rvu, mcam, blkaddr,
|
||||
target_func);
|
||||
|
||||
@@ -744,6 +744,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, sparx5);
|
||||
sparx5->pdev = pdev;
|
||||
sparx5->dev = &pdev->dev;
|
||||
spin_lock_init(&sparx5->tx_lock);
|
||||
|
||||
/* Do switch core reset if available */
|
||||
reset = devm_reset_control_get_optional_shared(&pdev->dev, "switch");
|
||||
|
||||
@@ -278,6 +278,7 @@ struct sparx5 {
|
||||
int xtr_irq;
|
||||
/* Frame DMA */
|
||||
int fdma_irq;
|
||||
spinlock_t tx_lock; /* lock for frame transmission */
|
||||
struct sparx5_rx rx;
|
||||
struct sparx5_tx tx;
|
||||
/* PTP */
|
||||
|
||||
@@ -244,10 +244,12 @@ netdev_tx_t sparx5_port_xmit_impl(struct sk_buff *skb, struct net_device *dev)
|
||||
}
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
spin_lock(&sparx5->tx_lock);
|
||||
if (sparx5->fdma_irq > 0)
|
||||
ret = sparx5_fdma_xmit(sparx5, ifh, skb);
|
||||
else
|
||||
ret = sparx5_inject(sparx5, ifh, skb, dev);
|
||||
spin_unlock(&sparx5->tx_lock);
|
||||
|
||||
if (ret == -EBUSY)
|
||||
goto busy;
|
||||
|
||||
@@ -5823,11 +5823,6 @@ static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id)
|
||||
struct net_device *dev = (struct net_device *)dev_id;
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
|
||||
if (unlikely(!dev)) {
|
||||
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
/* Check if adapter is up */
|
||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||
return IRQ_HANDLED;
|
||||
@@ -5843,11 +5838,6 @@ static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id)
|
||||
struct net_device *dev = (struct net_device *)dev_id;
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
|
||||
if (unlikely(!dev)) {
|
||||
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
/* Check if adapter is up */
|
||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||
return IRQ_HANDLED;
|
||||
@@ -5869,11 +5859,6 @@ static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
|
||||
dma_conf = container_of(tx_q, struct stmmac_dma_conf, tx_queue[chan]);
|
||||
priv = container_of(dma_conf, struct stmmac_priv, dma_conf);
|
||||
|
||||
if (unlikely(!data)) {
|
||||
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
/* Check if adapter is up */
|
||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||
return IRQ_HANDLED;
|
||||
@@ -5900,11 +5885,6 @@ static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
|
||||
dma_conf = container_of(rx_q, struct stmmac_dma_conf, rx_queue[chan]);
|
||||
priv = container_of(dma_conf, struct stmmac_priv, dma_conf);
|
||||
|
||||
if (unlikely(!data)) {
|
||||
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
/* Check if adapter is up */
|
||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||
return IRQ_HANDLED;
|
||||
|
||||
@@ -1906,20 +1906,20 @@ static int __init gtp_init(void)
|
||||
if (err < 0)
|
||||
goto error_out;
|
||||
|
||||
err = genl_register_family(>p_genl_family);
|
||||
err = register_pernet_subsys(>p_net_ops);
|
||||
if (err < 0)
|
||||
goto unreg_rtnl_link;
|
||||
|
||||
err = register_pernet_subsys(>p_net_ops);
|
||||
err = genl_register_family(>p_genl_family);
|
||||
if (err < 0)
|
||||
goto unreg_genl_family;
|
||||
goto unreg_pernet_subsys;
|
||||
|
||||
pr_info("GTP module loaded (pdp ctx size %zd bytes)\n",
|
||||
sizeof(struct pdp_ctx));
|
||||
return 0;
|
||||
|
||||
unreg_genl_family:
|
||||
genl_unregister_family(>p_genl_family);
|
||||
unreg_pernet_subsys:
|
||||
unregister_pernet_subsys(>p_net_ops);
|
||||
unreg_rtnl_link:
|
||||
rtnl_link_unregister(>p_link_ops);
|
||||
error_out:
|
||||
|
||||
@@ -414,9 +414,11 @@ static int rtl8211f_config_init(struct phy_device *phydev)
|
||||
ERR_PTR(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
return genphy_soft_reset(phydev);
|
||||
}
|
||||
|
||||
return genphy_soft_reset(phydev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl821x_resume(struct phy_device *phydev)
|
||||
|
||||
@@ -221,11 +221,6 @@ static LIST_HEAD(nvme_fc_lport_list);
|
||||
static DEFINE_IDA(nvme_fc_local_port_cnt);
|
||||
static DEFINE_IDA(nvme_fc_ctrl_cnt);
|
||||
|
||||
static struct workqueue_struct *nvme_fc_wq;
|
||||
|
||||
static bool nvme_fc_waiting_to_unload;
|
||||
static DECLARE_COMPLETION(nvme_fc_unload_proceed);
|
||||
|
||||
/*
|
||||
* These items are short-term. They will eventually be moved into
|
||||
* a generic FC class. See comments in module init.
|
||||
@@ -255,8 +250,6 @@ nvme_fc_free_lport(struct kref *ref)
|
||||
/* remove from transport list */
|
||||
spin_lock_irqsave(&nvme_fc_lock, flags);
|
||||
list_del(&lport->port_list);
|
||||
if (nvme_fc_waiting_to_unload && list_empty(&nvme_fc_lport_list))
|
||||
complete(&nvme_fc_unload_proceed);
|
||||
spin_unlock_irqrestore(&nvme_fc_lock, flags);
|
||||
|
||||
ida_free(&nvme_fc_local_port_cnt, lport->localport.port_num);
|
||||
@@ -3869,10 +3862,6 @@ static int __init nvme_fc_init_module(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
nvme_fc_wq = alloc_workqueue("nvme_fc_wq", WQ_MEM_RECLAIM, 0);
|
||||
if (!nvme_fc_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* It is expected that in the future the kernel will combine
|
||||
@@ -3890,7 +3879,7 @@ static int __init nvme_fc_init_module(void)
|
||||
ret = class_register(&fc_class);
|
||||
if (ret) {
|
||||
pr_err("couldn't register class fc\n");
|
||||
goto out_destroy_wq;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3914,8 +3903,6 @@ out_destroy_device:
|
||||
device_destroy(&fc_class, MKDEV(0, 0));
|
||||
out_destroy_class:
|
||||
class_unregister(&fc_class);
|
||||
out_destroy_wq:
|
||||
destroy_workqueue(nvme_fc_wq);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3935,45 +3922,23 @@ nvme_fc_delete_controllers(struct nvme_fc_rport *rport)
|
||||
spin_unlock(&rport->lock);
|
||||
}
|
||||
|
||||
static void
|
||||
nvme_fc_cleanup_for_unload(void)
|
||||
static void __exit nvme_fc_exit_module(void)
|
||||
{
|
||||
struct nvme_fc_lport *lport;
|
||||
struct nvme_fc_rport *rport;
|
||||
|
||||
list_for_each_entry(lport, &nvme_fc_lport_list, port_list) {
|
||||
list_for_each_entry(rport, &lport->endp_list, endp_list) {
|
||||
nvme_fc_delete_controllers(rport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void __exit nvme_fc_exit_module(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool need_cleanup = false;
|
||||
|
||||
spin_lock_irqsave(&nvme_fc_lock, flags);
|
||||
nvme_fc_waiting_to_unload = true;
|
||||
if (!list_empty(&nvme_fc_lport_list)) {
|
||||
need_cleanup = true;
|
||||
nvme_fc_cleanup_for_unload();
|
||||
}
|
||||
list_for_each_entry(lport, &nvme_fc_lport_list, port_list)
|
||||
list_for_each_entry(rport, &lport->endp_list, endp_list)
|
||||
nvme_fc_delete_controllers(rport);
|
||||
spin_unlock_irqrestore(&nvme_fc_lock, flags);
|
||||
if (need_cleanup) {
|
||||
pr_info("%s: waiting for ctlr deletes\n", __func__);
|
||||
wait_for_completion(&nvme_fc_unload_proceed);
|
||||
pr_info("%s: ctrl deletes complete\n", __func__);
|
||||
}
|
||||
flush_workqueue(nvme_delete_wq);
|
||||
|
||||
nvmf_unregister_transport(&nvme_fc_transport);
|
||||
|
||||
ida_destroy(&nvme_fc_local_port_cnt);
|
||||
ida_destroy(&nvme_fc_ctrl_cnt);
|
||||
|
||||
device_destroy(&fc_class, MKDEV(0, 0));
|
||||
class_unregister(&fc_class);
|
||||
destroy_workqueue(nvme_fc_wq);
|
||||
}
|
||||
|
||||
module_init(nvme_fc_init_module);
|
||||
|
||||
@@ -111,6 +111,8 @@ struct nvmet_fc_tgtport {
|
||||
struct nvmet_fc_port_entry *pe;
|
||||
struct kref ref;
|
||||
u32 max_sg_cnt;
|
||||
|
||||
struct work_struct put_work;
|
||||
};
|
||||
|
||||
struct nvmet_fc_port_entry {
|
||||
@@ -165,7 +167,7 @@ struct nvmet_fc_tgt_assoc {
|
||||
struct nvmet_fc_hostport *hostport;
|
||||
struct nvmet_fc_ls_iod *rcv_disconn;
|
||||
struct list_head a_list;
|
||||
struct nvmet_fc_tgt_queue __rcu *queues[NVMET_NR_QUEUES + 1];
|
||||
struct nvmet_fc_tgt_queue *queues[NVMET_NR_QUEUES + 1];
|
||||
struct kref ref;
|
||||
struct work_struct del_work;
|
||||
struct rcu_head rcu;
|
||||
@@ -248,6 +250,13 @@ static int nvmet_fc_tgt_a_get(struct nvmet_fc_tgt_assoc *assoc);
|
||||
static void nvmet_fc_tgt_q_put(struct nvmet_fc_tgt_queue *queue);
|
||||
static int nvmet_fc_tgt_q_get(struct nvmet_fc_tgt_queue *queue);
|
||||
static void nvmet_fc_tgtport_put(struct nvmet_fc_tgtport *tgtport);
|
||||
static void nvmet_fc_put_tgtport_work(struct work_struct *work)
|
||||
{
|
||||
struct nvmet_fc_tgtport *tgtport =
|
||||
container_of(work, struct nvmet_fc_tgtport, put_work);
|
||||
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
}
|
||||
static int nvmet_fc_tgtport_get(struct nvmet_fc_tgtport *tgtport);
|
||||
static void nvmet_fc_handle_fcp_rqst(struct nvmet_fc_tgtport *tgtport,
|
||||
struct nvmet_fc_fcp_iod *fod);
|
||||
@@ -359,7 +368,7 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop)
|
||||
|
||||
if (!lsop->req_queued) {
|
||||
spin_unlock_irqrestore(&tgtport->lock, flags);
|
||||
return;
|
||||
goto out_putwork;
|
||||
}
|
||||
|
||||
list_del(&lsop->lsreq_list);
|
||||
@@ -372,7 +381,8 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop)
|
||||
(lsreq->rqstlen + lsreq->rsplen),
|
||||
DMA_BIDIRECTIONAL);
|
||||
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
out_putwork:
|
||||
queue_work(nvmet_wq, &tgtport->put_work);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -801,14 +811,11 @@ nvmet_fc_alloc_target_queue(struct nvmet_fc_tgt_assoc *assoc,
|
||||
if (!queue)
|
||||
return NULL;
|
||||
|
||||
if (!nvmet_fc_tgt_a_get(assoc))
|
||||
goto out_free_queue;
|
||||
|
||||
queue->work_q = alloc_workqueue("ntfc%d.%d.%d", 0, 0,
|
||||
assoc->tgtport->fc_target_port.port_num,
|
||||
assoc->a_id, qid);
|
||||
if (!queue->work_q)
|
||||
goto out_a_put;
|
||||
goto out_free_queue;
|
||||
|
||||
queue->qid = qid;
|
||||
queue->sqsize = sqsize;
|
||||
@@ -830,15 +837,13 @@ nvmet_fc_alloc_target_queue(struct nvmet_fc_tgt_assoc *assoc,
|
||||
goto out_fail_iodlist;
|
||||
|
||||
WARN_ON(assoc->queues[qid]);
|
||||
rcu_assign_pointer(assoc->queues[qid], queue);
|
||||
assoc->queues[qid] = queue;
|
||||
|
||||
return queue;
|
||||
|
||||
out_fail_iodlist:
|
||||
nvmet_fc_destroy_fcp_iodlist(assoc->tgtport, queue);
|
||||
destroy_workqueue(queue->work_q);
|
||||
out_a_put:
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
out_free_queue:
|
||||
kfree(queue);
|
||||
return NULL;
|
||||
@@ -851,12 +856,8 @@ nvmet_fc_tgt_queue_free(struct kref *ref)
|
||||
struct nvmet_fc_tgt_queue *queue =
|
||||
container_of(ref, struct nvmet_fc_tgt_queue, ref);
|
||||
|
||||
rcu_assign_pointer(queue->assoc->queues[queue->qid], NULL);
|
||||
|
||||
nvmet_fc_destroy_fcp_iodlist(queue->assoc->tgtport, queue);
|
||||
|
||||
nvmet_fc_tgt_a_put(queue->assoc);
|
||||
|
||||
destroy_workqueue(queue->work_q);
|
||||
|
||||
kfree_rcu(queue, rcu);
|
||||
@@ -968,7 +969,7 @@ nvmet_fc_find_target_queue(struct nvmet_fc_tgtport *tgtport,
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(assoc, &tgtport->assoc_list, a_list) {
|
||||
if (association_id == assoc->association_id) {
|
||||
queue = rcu_dereference(assoc->queues[qid]);
|
||||
queue = assoc->queues[qid];
|
||||
if (queue &&
|
||||
(!atomic_read(&queue->connected) ||
|
||||
!nvmet_fc_tgt_q_get(queue)))
|
||||
@@ -1077,8 +1078,6 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)
|
||||
/* new allocation not needed */
|
||||
kfree(newhost);
|
||||
newhost = match;
|
||||
/* no new allocation - release reference */
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
} else {
|
||||
newhost->tgtport = tgtport;
|
||||
newhost->hosthandle = hosthandle;
|
||||
@@ -1093,13 +1092,28 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)
|
||||
}
|
||||
|
||||
static void
|
||||
nvmet_fc_delete_assoc(struct work_struct *work)
|
||||
nvmet_fc_delete_assoc(struct nvmet_fc_tgt_assoc *assoc)
|
||||
{
|
||||
nvmet_fc_delete_target_assoc(assoc);
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
}
|
||||
|
||||
static void
|
||||
nvmet_fc_delete_assoc_work(struct work_struct *work)
|
||||
{
|
||||
struct nvmet_fc_tgt_assoc *assoc =
|
||||
container_of(work, struct nvmet_fc_tgt_assoc, del_work);
|
||||
struct nvmet_fc_tgtport *tgtport = assoc->tgtport;
|
||||
|
||||
nvmet_fc_delete_target_assoc(assoc);
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
nvmet_fc_delete_assoc(assoc);
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
}
|
||||
|
||||
static void
|
||||
nvmet_fc_schedule_delete_assoc(struct nvmet_fc_tgt_assoc *assoc)
|
||||
{
|
||||
nvmet_fc_tgtport_get(assoc->tgtport);
|
||||
queue_work(nvmet_wq, &assoc->del_work);
|
||||
}
|
||||
|
||||
static struct nvmet_fc_tgt_assoc *
|
||||
@@ -1111,6 +1125,9 @@ nvmet_fc_alloc_target_assoc(struct nvmet_fc_tgtport *tgtport, void *hosthandle)
|
||||
int idx;
|
||||
bool needrandom = true;
|
||||
|
||||
if (!tgtport->pe)
|
||||
return NULL;
|
||||
|
||||
assoc = kzalloc(sizeof(*assoc), GFP_KERNEL);
|
||||
if (!assoc)
|
||||
return NULL;
|
||||
@@ -1130,7 +1147,7 @@ nvmet_fc_alloc_target_assoc(struct nvmet_fc_tgtport *tgtport, void *hosthandle)
|
||||
assoc->a_id = idx;
|
||||
INIT_LIST_HEAD(&assoc->a_list);
|
||||
kref_init(&assoc->ref);
|
||||
INIT_WORK(&assoc->del_work, nvmet_fc_delete_assoc);
|
||||
INIT_WORK(&assoc->del_work, nvmet_fc_delete_assoc_work);
|
||||
atomic_set(&assoc->terminating, 0);
|
||||
|
||||
while (needrandom) {
|
||||
@@ -1171,13 +1188,18 @@ nvmet_fc_target_assoc_free(struct kref *ref)
|
||||
struct nvmet_fc_tgtport *tgtport = assoc->tgtport;
|
||||
struct nvmet_fc_ls_iod *oldls;
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
for (i = NVMET_NR_QUEUES; i >= 0; i--) {
|
||||
if (assoc->queues[i])
|
||||
nvmet_fc_delete_target_queue(assoc->queues[i]);
|
||||
}
|
||||
|
||||
/* Send Disconnect now that all i/o has completed */
|
||||
nvmet_fc_xmt_disconnect_assoc(assoc);
|
||||
|
||||
nvmet_fc_free_hostport(assoc->hostport);
|
||||
spin_lock_irqsave(&tgtport->lock, flags);
|
||||
list_del_rcu(&assoc->a_list);
|
||||
oldls = assoc->rcv_disconn;
|
||||
spin_unlock_irqrestore(&tgtport->lock, flags);
|
||||
/* if pending Rcv Disconnect Association LS, send rsp now */
|
||||
@@ -1207,7 +1229,7 @@ static void
|
||||
nvmet_fc_delete_target_assoc(struct nvmet_fc_tgt_assoc *assoc)
|
||||
{
|
||||
struct nvmet_fc_tgtport *tgtport = assoc->tgtport;
|
||||
struct nvmet_fc_tgt_queue *queue;
|
||||
unsigned long flags;
|
||||
int i, terminating;
|
||||
|
||||
terminating = atomic_xchg(&assoc->terminating, 1);
|
||||
@@ -1216,29 +1238,21 @@ nvmet_fc_delete_target_assoc(struct nvmet_fc_tgt_assoc *assoc)
|
||||
if (terminating)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&tgtport->lock, flags);
|
||||
list_del_rcu(&assoc->a_list);
|
||||
spin_unlock_irqrestore(&tgtport->lock, flags);
|
||||
|
||||
synchronize_rcu();
|
||||
|
||||
/* ensure all in-flight I/Os have been processed */
|
||||
for (i = NVMET_NR_QUEUES; i >= 0; i--) {
|
||||
rcu_read_lock();
|
||||
queue = rcu_dereference(assoc->queues[i]);
|
||||
if (!queue) {
|
||||
rcu_read_unlock();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!nvmet_fc_tgt_q_get(queue)) {
|
||||
rcu_read_unlock();
|
||||
continue;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
nvmet_fc_delete_target_queue(queue);
|
||||
nvmet_fc_tgt_q_put(queue);
|
||||
if (assoc->queues[i])
|
||||
flush_workqueue(assoc->queues[i]->work_q);
|
||||
}
|
||||
|
||||
dev_info(tgtport->dev,
|
||||
"{%d:%d} Association deleted\n",
|
||||
tgtport->fc_target_port.port_num, assoc->a_id);
|
||||
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
}
|
||||
|
||||
static struct nvmet_fc_tgt_assoc *
|
||||
@@ -1414,6 +1428,7 @@ nvmet_fc_register_targetport(struct nvmet_fc_port_info *pinfo,
|
||||
kref_init(&newrec->ref);
|
||||
ida_init(&newrec->assoc_cnt);
|
||||
newrec->max_sg_cnt = template->max_sgl_segments;
|
||||
INIT_WORK(&newrec->put_work, nvmet_fc_put_tgtport_work);
|
||||
|
||||
ret = nvmet_fc_alloc_ls_iodlist(newrec);
|
||||
if (ret) {
|
||||
@@ -1491,9 +1506,8 @@ __nvmet_fc_free_assocs(struct nvmet_fc_tgtport *tgtport)
|
||||
list_for_each_entry_rcu(assoc, &tgtport->assoc_list, a_list) {
|
||||
if (!nvmet_fc_tgt_a_get(assoc))
|
||||
continue;
|
||||
if (!queue_work(nvmet_wq, &assoc->del_work))
|
||||
/* already deleting - release local reference */
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
nvmet_fc_schedule_delete_assoc(assoc);
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
@@ -1546,9 +1560,8 @@ nvmet_fc_invalidate_host(struct nvmet_fc_target_port *target_port,
|
||||
continue;
|
||||
assoc->hostport->invalid = 1;
|
||||
noassoc = false;
|
||||
if (!queue_work(nvmet_wq, &assoc->del_work))
|
||||
/* already deleting - release local reference */
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
nvmet_fc_schedule_delete_assoc(assoc);
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
}
|
||||
spin_unlock_irqrestore(&tgtport->lock, flags);
|
||||
|
||||
@@ -1580,7 +1593,7 @@ nvmet_fc_delete_ctrl(struct nvmet_ctrl *ctrl)
|
||||
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(assoc, &tgtport->assoc_list, a_list) {
|
||||
queue = rcu_dereference(assoc->queues[0]);
|
||||
queue = assoc->queues[0];
|
||||
if (queue && queue->nvme_sq.ctrl == ctrl) {
|
||||
if (nvmet_fc_tgt_a_get(assoc))
|
||||
found_ctrl = true;
|
||||
@@ -1592,9 +1605,8 @@ nvmet_fc_delete_ctrl(struct nvmet_ctrl *ctrl)
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
|
||||
if (found_ctrl) {
|
||||
if (!queue_work(nvmet_wq, &assoc->del_work))
|
||||
/* already deleting - release local reference */
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
nvmet_fc_schedule_delete_assoc(assoc);
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1624,6 +1636,8 @@ nvmet_fc_unregister_targetport(struct nvmet_fc_target_port *target_port)
|
||||
/* terminate any outstanding associations */
|
||||
__nvmet_fc_free_assocs(tgtport);
|
||||
|
||||
flush_workqueue(nvmet_wq);
|
||||
|
||||
/*
|
||||
* should terminate LS's as well. However, LS's will be generated
|
||||
* at the tail end of association termination, so they likely don't
|
||||
@@ -1869,9 +1883,6 @@ nvmet_fc_ls_disconnect(struct nvmet_fc_tgtport *tgtport,
|
||||
sizeof(struct fcnvme_ls_disconnect_assoc_acc)),
|
||||
FCNVME_LS_DISCONNECT_ASSOC);
|
||||
|
||||
/* release get taken in nvmet_fc_find_target_assoc */
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
|
||||
/*
|
||||
* The rules for LS response says the response cannot
|
||||
* go back until ABTS's have been sent for all outstanding
|
||||
@@ -1886,8 +1897,6 @@ nvmet_fc_ls_disconnect(struct nvmet_fc_tgtport *tgtport,
|
||||
assoc->rcv_disconn = iod;
|
||||
spin_unlock_irqrestore(&tgtport->lock, flags);
|
||||
|
||||
nvmet_fc_delete_target_assoc(assoc);
|
||||
|
||||
if (oldls) {
|
||||
dev_info(tgtport->dev,
|
||||
"{%d:%d} Multiple Disconnect Association LS's "
|
||||
@@ -1903,6 +1912,9 @@ nvmet_fc_ls_disconnect(struct nvmet_fc_tgtport *tgtport,
|
||||
nvmet_fc_xmt_ls_rsp(tgtport, oldls);
|
||||
}
|
||||
|
||||
nvmet_fc_schedule_delete_assoc(assoc);
|
||||
nvmet_fc_tgt_a_put(assoc);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2539,8 +2551,9 @@ nvmet_fc_handle_fcp_rqst(struct nvmet_fc_tgtport *tgtport,
|
||||
|
||||
fod->req.cmd = &fod->cmdiubuf.sqe;
|
||||
fod->req.cqe = &fod->rspiubuf.cqe;
|
||||
if (tgtport->pe)
|
||||
fod->req.port = tgtport->pe->port;
|
||||
if (!tgtport->pe)
|
||||
goto transport_error;
|
||||
fod->req.port = tgtport->pe->port;
|
||||
|
||||
/* clear any response payload */
|
||||
memset(&fod->rspiubuf, 0, sizeof(fod->rspiubuf));
|
||||
@@ -2901,6 +2914,9 @@ nvmet_fc_remove_port(struct nvmet_port *port)
|
||||
|
||||
nvmet_fc_portentry_unbind(pe);
|
||||
|
||||
/* terminate any outstanding associations */
|
||||
__nvmet_fc_free_assocs(pe->tgtport);
|
||||
|
||||
kfree(pe);
|
||||
}
|
||||
|
||||
@@ -2932,6 +2948,9 @@ static int __init nvmet_fc_init_module(void)
|
||||
|
||||
static void __exit nvmet_fc_exit_module(void)
|
||||
{
|
||||
/* ensure any shutdown operation, e.g. delete ctrls have finished */
|
||||
flush_workqueue(nvmet_wq);
|
||||
|
||||
/* sanity check - all lports should be removed */
|
||||
if (!list_empty(&nvmet_fc_target_list))
|
||||
pr_warn("%s: targetport list not empty\n", __func__);
|
||||
|
||||
@@ -358,7 +358,7 @@ fcloop_h2t_ls_req(struct nvme_fc_local_port *localport,
|
||||
if (!rport->targetport) {
|
||||
tls_req->status = -ECONNREFUSED;
|
||||
spin_lock(&rport->lock);
|
||||
list_add_tail(&rport->ls_list, &tls_req->ls_list);
|
||||
list_add_tail(&tls_req->ls_list, &rport->ls_list);
|
||||
spin_unlock(&rport->lock);
|
||||
queue_work(nvmet_wq, &rport->ls_work);
|
||||
return ret;
|
||||
@@ -391,7 +391,7 @@ fcloop_h2t_xmt_ls_rsp(struct nvmet_fc_target_port *targetport,
|
||||
if (remoteport) {
|
||||
rport = remoteport->private;
|
||||
spin_lock(&rport->lock);
|
||||
list_add_tail(&rport->ls_list, &tls_req->ls_list);
|
||||
list_add_tail(&tls_req->ls_list, &rport->ls_list);
|
||||
spin_unlock(&rport->lock);
|
||||
queue_work(nvmet_wq, &rport->ls_work);
|
||||
}
|
||||
@@ -446,7 +446,7 @@ fcloop_t2h_ls_req(struct nvmet_fc_target_port *targetport, void *hosthandle,
|
||||
if (!tport->remoteport) {
|
||||
tls_req->status = -ECONNREFUSED;
|
||||
spin_lock(&tport->lock);
|
||||
list_add_tail(&tport->ls_list, &tls_req->ls_list);
|
||||
list_add_tail(&tls_req->ls_list, &tport->ls_list);
|
||||
spin_unlock(&tport->lock);
|
||||
queue_work(nvmet_wq, &tport->ls_work);
|
||||
return ret;
|
||||
|
||||
@@ -1884,6 +1884,7 @@ static void __exit nvmet_tcp_exit(void)
|
||||
flush_workqueue(nvmet_wq);
|
||||
|
||||
destroy_workqueue(nvmet_tcp_wq);
|
||||
ida_destroy(&nvmet_tcp_queue_ida);
|
||||
}
|
||||
|
||||
module_init(nvmet_tcp_init);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Author: Kishon Vijay Abraham I <kishon@ti.com>
|
||||
*/
|
||||
|
||||
#include <linux/align.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
@@ -600,7 +601,7 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
|
||||
}
|
||||
|
||||
aligned_offset = msg_addr & (epc->mem->window.page_size - 1);
|
||||
msg_addr &= ~aligned_offset;
|
||||
msg_addr = ALIGN_DOWN(msg_addr, epc->mem->window.page_size);
|
||||
ret = dw_pcie_ep_map_addr(epc, func_no, 0, ep->msi_mem_phys, msg_addr,
|
||||
epc->mem->window.page_size);
|
||||
if (ret)
|
||||
|
||||
@@ -60,7 +60,7 @@ static irq_hw_number_t pci_msi_domain_calc_hwirq(struct msi_desc *desc)
|
||||
|
||||
return (irq_hw_number_t)desc->msi_index |
|
||||
pci_dev_id(dev) << 11 |
|
||||
(pci_domain_nr(dev->bus) & 0xFFFFFFFF) << 27;
|
||||
((irq_hw_number_t)(pci_domain_nr(dev->bus) & 0xFFFFFFFF)) << 27;
|
||||
}
|
||||
|
||||
static inline bool pci_msi_desc_is_multi_msi(struct msi_desc *desc)
|
||||
|
||||
@@ -200,9 +200,6 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
|
||||
autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
|
||||
|
||||
sparse_keymap_report_event(input_dev, event, val, autorelease);
|
||||
|
||||
/* Some devices need this to report further events */
|
||||
acpi_evaluate_object(handle, "VBDL", NULL, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10511,6 +10511,7 @@ static int convert_dytc_to_profile(int funcmode, int dytcmode,
|
||||
return 0;
|
||||
default:
|
||||
/* Unknown function */
|
||||
pr_debug("unknown function 0x%x\n", funcmode);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
return 0;
|
||||
@@ -10696,8 +10697,8 @@ static void dytc_profile_refresh(void)
|
||||
return;
|
||||
|
||||
perfmode = (output >> DYTC_GET_MODE_BIT) & 0xF;
|
||||
convert_dytc_to_profile(funcmode, perfmode, &profile);
|
||||
if (profile != dytc_current_profile) {
|
||||
err = convert_dytc_to_profile(funcmode, perfmode, &profile);
|
||||
if (!err && profile != dytc_current_profile) {
|
||||
dytc_current_profile = profile;
|
||||
platform_profile_notify();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ static const struct property_entry chuwi_hi8_air_props[] = {
|
||||
};
|
||||
|
||||
static const struct ts_dmi_data chuwi_hi8_air_data = {
|
||||
.acpi_name = "MSSL1680:00",
|
||||
.acpi_name = "MSSL1680",
|
||||
.properties = chuwi_hi8_air_props,
|
||||
};
|
||||
|
||||
@@ -913,6 +913,32 @@ static const struct ts_dmi_data teclast_tbook11_data = {
|
||||
.properties = teclast_tbook11_props,
|
||||
};
|
||||
|
||||
static const struct property_entry teclast_x16_plus_props[] = {
|
||||
PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
|
||||
PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
|
||||
PROPERTY_ENTRY_U32("touchscreen-size-x", 1916),
|
||||
PROPERTY_ENTRY_U32("touchscreen-size-y", 1264),
|
||||
PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
|
||||
PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-teclast-x16-plus.fw"),
|
||||
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
|
||||
PROPERTY_ENTRY_BOOL("silead,home-button"),
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct ts_dmi_data teclast_x16_plus_data = {
|
||||
.embedded_fw = {
|
||||
.name = "silead/gsl3692-teclast-x16-plus.fw",
|
||||
.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
|
||||
.length = 43560,
|
||||
.sha256 = { 0x9d, 0xb0, 0x3d, 0xf1, 0x00, 0x3c, 0xb5, 0x25,
|
||||
0x62, 0x8a, 0xa0, 0x93, 0x4b, 0xe0, 0x4e, 0x75,
|
||||
0xd1, 0x27, 0xb1, 0x65, 0x3c, 0xba, 0xa5, 0x0f,
|
||||
0xcd, 0xb4, 0xbe, 0x00, 0xbb, 0xf6, 0x43, 0x29 },
|
||||
},
|
||||
.acpi_name = "MSSL1680:00",
|
||||
.properties = teclast_x16_plus_props,
|
||||
};
|
||||
|
||||
static const struct property_entry teclast_x3_plus_props[] = {
|
||||
PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
|
||||
PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
|
||||
@@ -1567,6 +1593,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_SKU, "E5A6_A1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Teclast X16 Plus */
|
||||
.driver_data = (void *)&teclast_x16_plus_data,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
||||
DMI_MATCH(DMI_PRODUCT_SKU, "D3A5_A1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Teclast X3 Plus */
|
||||
.driver_data = (void *)&teclast_x3_plus_data,
|
||||
@@ -1741,7 +1776,7 @@ static void ts_dmi_add_props(struct i2c_client *client)
|
||||
int error;
|
||||
|
||||
if (has_acpi_companion(dev) &&
|
||||
!strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
|
||||
strstarts(client->name, ts_data->acpi_name)) {
|
||||
error = device_create_managed_software_node(dev, ts_data->properties, NULL);
|
||||
if (error)
|
||||
dev_err(dev, "failed to add properties: %d\n", error);
|
||||
|
||||
@@ -158,6 +158,9 @@ static int pwm_regulator_get_voltage(struct regulator_dev *rdev)
|
||||
pwm_get_state(drvdata->pwm, &pstate);
|
||||
|
||||
voltage = pwm_get_relative_duty_cycle(&pstate, duty_unit);
|
||||
if (voltage < min(max_uV_duty, min_uV_duty) ||
|
||||
voltage > max(max_uV_duty, min_uV_duty))
|
||||
return -ENOTRECOVERABLE;
|
||||
|
||||
/*
|
||||
* The dutycycle for min_uV might be greater than the one for max_uV.
|
||||
|
||||
@@ -202,7 +202,8 @@ int ccw_device_start_timeout_key(struct ccw_device *cdev, struct ccw1 *cpa,
|
||||
return -EINVAL;
|
||||
if (cdev->private->state == DEV_STATE_NOT_OPER)
|
||||
return -ENODEV;
|
||||
if (cdev->private->state == DEV_STATE_VERIFY) {
|
||||
if (cdev->private->state == DEV_STATE_VERIFY ||
|
||||
cdev->private->flags.doverify) {
|
||||
/* Remember to fake irb when finished. */
|
||||
if (!cdev->private->flags.fake_irb) {
|
||||
cdev->private->flags.fake_irb = FAKE_CMD_IRB;
|
||||
@@ -214,8 +215,7 @@ int ccw_device_start_timeout_key(struct ccw_device *cdev, struct ccw1 *cpa,
|
||||
}
|
||||
if (cdev->private->state != DEV_STATE_ONLINE ||
|
||||
((sch->schib.scsw.cmd.stctl & SCSW_STCTL_PRIM_STATUS) &&
|
||||
!(sch->schib.scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS)) ||
|
||||
cdev->private->flags.doverify)
|
||||
!(sch->schib.scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS)))
|
||||
return -EBUSY;
|
||||
ret = cio_set_options (sch, flags);
|
||||
if (ret)
|
||||
|
||||
@@ -1285,7 +1285,7 @@ source "drivers/scsi/arm/Kconfig"
|
||||
|
||||
config JAZZ_ESP
|
||||
bool "MIPS JAZZ FAS216 SCSI support"
|
||||
depends on MACH_JAZZ && SCSI
|
||||
depends on MACH_JAZZ && SCSI=y
|
||||
select SCSI_SPI_ATTRS
|
||||
help
|
||||
This is the driver for the onboard SCSI host adapter of MIPS Magnum
|
||||
|
||||
@@ -1919,7 +1919,7 @@ out:
|
||||
*
|
||||
* Returns the number of SGEs added to the SGL.
|
||||
**/
|
||||
static int
|
||||
static uint32_t
|
||||
lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
struct sli4_sge *sgl, int datasegcnt,
|
||||
struct lpfc_io_buf *lpfc_cmd)
|
||||
@@ -1927,8 +1927,8 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
struct scatterlist *sgde = NULL; /* s/g data entry */
|
||||
struct sli4_sge_diseed *diseed = NULL;
|
||||
dma_addr_t physaddr;
|
||||
int i = 0, num_sge = 0, status;
|
||||
uint32_t reftag;
|
||||
int i = 0, status;
|
||||
uint32_t reftag, num_sge = 0;
|
||||
uint8_t txop, rxop;
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
uint32_t rc;
|
||||
@@ -2100,7 +2100,7 @@ out:
|
||||
*
|
||||
* Returns the number of SGEs added to the SGL.
|
||||
**/
|
||||
static int
|
||||
static uint32_t
|
||||
lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
struct sli4_sge *sgl, int datacnt, int protcnt,
|
||||
struct lpfc_io_buf *lpfc_cmd)
|
||||
@@ -2124,8 +2124,8 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
uint32_t rc;
|
||||
#endif
|
||||
uint32_t checking = 1;
|
||||
uint32_t dma_offset = 0;
|
||||
int num_sge = 0, j = 2;
|
||||
uint32_t dma_offset = 0, num_sge = 0;
|
||||
int j = 2;
|
||||
struct sli4_hybrid_sgl *sgl_xtra = NULL;
|
||||
|
||||
sgpe = scsi_prot_sglist(sc);
|
||||
|
||||
@@ -328,21 +328,39 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer,
|
||||
return result + 4;
|
||||
}
|
||||
|
||||
enum scsi_vpd_parameters {
|
||||
SCSI_VPD_HEADER_SIZE = 4,
|
||||
SCSI_VPD_LIST_SIZE = 36,
|
||||
};
|
||||
|
||||
static int scsi_get_vpd_size(struct scsi_device *sdev, u8 page)
|
||||
{
|
||||
unsigned char vpd_header[SCSI_VPD_HEADER_SIZE] __aligned(4);
|
||||
unsigned char vpd[SCSI_VPD_LIST_SIZE] __aligned(4);
|
||||
int result;
|
||||
|
||||
if (sdev->no_vpd_size)
|
||||
return SCSI_DEFAULT_VPD_LEN;
|
||||
|
||||
/*
|
||||
* Fetch the supported pages VPD and validate that the requested page
|
||||
* number is present.
|
||||
*/
|
||||
if (page != 0) {
|
||||
result = scsi_vpd_inquiry(sdev, vpd, 0, sizeof(vpd));
|
||||
if (result < SCSI_VPD_HEADER_SIZE)
|
||||
return 0;
|
||||
|
||||
result -= SCSI_VPD_HEADER_SIZE;
|
||||
if (!memchr(&vpd[SCSI_VPD_HEADER_SIZE], page, result))
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Fetch the VPD page header to find out how big the page
|
||||
* is. This is done to prevent problems on legacy devices
|
||||
* which can not handle allocation lengths as large as
|
||||
* potentially requested by the caller.
|
||||
*/
|
||||
result = scsi_vpd_inquiry(sdev, vpd_header, page, sizeof(vpd_header));
|
||||
result = scsi_vpd_inquiry(sdev, vpd, page, SCSI_VPD_HEADER_SIZE);
|
||||
if (result < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -6449,8 +6449,11 @@ static void pqi_map_queues(struct Scsi_Host *shost)
|
||||
{
|
||||
struct pqi_ctrl_info *ctrl_info = shost_to_hba(shost);
|
||||
|
||||
blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT],
|
||||
if (!ctrl_info->disable_managed_interrupts)
|
||||
return blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT],
|
||||
ctrl_info->pci_dev, 0);
|
||||
else
|
||||
return blk_mq_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT]);
|
||||
}
|
||||
|
||||
static inline bool pqi_is_tape_changer_device(struct pqi_scsi_dev *device)
|
||||
|
||||
@@ -499,6 +499,11 @@ static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *paren
|
||||
goto err_put_node;
|
||||
}
|
||||
|
||||
/* recursive call to add all subdomains */
|
||||
ret = scpsys_add_subdomain(scpsys, child);
|
||||
if (ret)
|
||||
goto err_put_node;
|
||||
|
||||
ret = pm_genpd_add_subdomain(parent_pd, child_pd);
|
||||
if (ret) {
|
||||
dev_err(scpsys->dev, "failed to add %s subdomain to parent %s\n",
|
||||
@@ -508,11 +513,6 @@ static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *paren
|
||||
dev_dbg(scpsys->dev, "%s add subdomain: %s\n", parent_pd->name,
|
||||
child_pd->name);
|
||||
}
|
||||
|
||||
/* recursive call to add all subdomains */
|
||||
ret = scpsys_add_subdomain(scpsys, child);
|
||||
if (ret)
|
||||
goto err_put_node;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -526,9 +526,6 @@ static void scpsys_remove_one_domain(struct scpsys_domain *pd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (scpsys_domain_is_on(pd))
|
||||
scpsys_power_off(&pd->genpd);
|
||||
|
||||
/*
|
||||
* We're in the error cleanup already, so we only complain,
|
||||
* but won't emit another error on top of the original one.
|
||||
@@ -538,6 +535,8 @@ static void scpsys_remove_one_domain(struct scpsys_domain *pd)
|
||||
dev_err(pd->scpsys->dev,
|
||||
"failed to remove domain '%s' : %d - state may be inconsistent\n",
|
||||
pd->genpd.name, ret);
|
||||
if (scpsys_domain_is_on(pd))
|
||||
scpsys_power_off(&pd->genpd);
|
||||
|
||||
clk_bulk_put(pd->num_clks, pd->clks);
|
||||
clk_bulk_put(pd->num_subsys_clks, pd->subsys_clks);
|
||||
|
||||
@@ -25,7 +25,8 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = {
|
||||
PD_CPU_NOCR },
|
||||
{ "ca53-cpu3", 0x200, 3, R8A77980_PD_CA53_CPU3, R8A77980_PD_CA53_SCU,
|
||||
PD_CPU_NOCR },
|
||||
{ "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON },
|
||||
{ "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON,
|
||||
PD_CPU_NOCR },
|
||||
{ "a3ir", 0x180, 0, R8A77980_PD_A3IR, R8A77980_PD_ALWAYS_ON },
|
||||
{ "a2ir0", 0x400, 0, R8A77980_PD_A2IR0, R8A77980_PD_A3IR },
|
||||
{ "a2ir1", 0x400, 1, R8A77980_PD_A2IR1, R8A77980_PD_A3IR },
|
||||
|
||||
@@ -377,6 +377,11 @@ static const struct spi_controller_mem_ops hisi_sfc_v3xx_mem_ops = {
|
||||
static irqreturn_t hisi_sfc_v3xx_isr(int irq, void *data)
|
||||
{
|
||||
struct hisi_sfc_v3xx_host *host = data;
|
||||
u32 reg;
|
||||
|
||||
reg = readl(host->regbase + HISI_SFC_V3XX_INT_STAT);
|
||||
if (!reg)
|
||||
return IRQ_NONE;
|
||||
|
||||
hisi_sfc_v3xx_disable_int(host);
|
||||
|
||||
|
||||
@@ -137,14 +137,14 @@ struct sh_msiof_spi_priv {
|
||||
|
||||
/* SIFCTR */
|
||||
#define SIFCTR_TFWM_MASK GENMASK(31, 29) /* Transmit FIFO Watermark */
|
||||
#define SIFCTR_TFWM_64 (0 << 29) /* Transfer Request when 64 empty stages */
|
||||
#define SIFCTR_TFWM_32 (1 << 29) /* Transfer Request when 32 empty stages */
|
||||
#define SIFCTR_TFWM_24 (2 << 29) /* Transfer Request when 24 empty stages */
|
||||
#define SIFCTR_TFWM_16 (3 << 29) /* Transfer Request when 16 empty stages */
|
||||
#define SIFCTR_TFWM_12 (4 << 29) /* Transfer Request when 12 empty stages */
|
||||
#define SIFCTR_TFWM_8 (5 << 29) /* Transfer Request when 8 empty stages */
|
||||
#define SIFCTR_TFWM_4 (6 << 29) /* Transfer Request when 4 empty stages */
|
||||
#define SIFCTR_TFWM_1 (7 << 29) /* Transfer Request when 1 empty stage */
|
||||
#define SIFCTR_TFWM_64 (0UL << 29) /* Transfer Request when 64 empty stages */
|
||||
#define SIFCTR_TFWM_32 (1UL << 29) /* Transfer Request when 32 empty stages */
|
||||
#define SIFCTR_TFWM_24 (2UL << 29) /* Transfer Request when 24 empty stages */
|
||||
#define SIFCTR_TFWM_16 (3UL << 29) /* Transfer Request when 16 empty stages */
|
||||
#define SIFCTR_TFWM_12 (4UL << 29) /* Transfer Request when 12 empty stages */
|
||||
#define SIFCTR_TFWM_8 (5UL << 29) /* Transfer Request when 8 empty stages */
|
||||
#define SIFCTR_TFWM_4 (6UL << 29) /* Transfer Request when 4 empty stages */
|
||||
#define SIFCTR_TFWM_1 (7UL << 29) /* Transfer Request when 1 empty stage */
|
||||
#define SIFCTR_TFUA_MASK GENMASK(26, 20) /* Transmit FIFO Usable Area */
|
||||
#define SIFCTR_TFUA_SHIFT 20
|
||||
#define SIFCTR_TFUA(i) ((i) << SIFCTR_TFUA_SHIFT)
|
||||
|
||||
@@ -147,7 +147,6 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd)
|
||||
struct se_session *se_sess = se_cmd->se_sess;
|
||||
struct se_node_acl *nacl = se_sess->se_node_acl;
|
||||
struct se_tmr_req *se_tmr = se_cmd->se_tmr_req;
|
||||
unsigned long flags;
|
||||
|
||||
rcu_read_lock();
|
||||
deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun);
|
||||
@@ -178,10 +177,6 @@ out_unlock:
|
||||
se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev);
|
||||
se_tmr->tmr_dev = rcu_dereference_raw(se_lun->lun_se_dev);
|
||||
|
||||
spin_lock_irqsave(&se_tmr->tmr_dev->se_tmr_lock, flags);
|
||||
list_add_tail(&se_tmr->tmr_list, &se_tmr->tmr_dev->dev_tmr_list);
|
||||
spin_unlock_irqrestore(&se_tmr->tmr_dev->se_tmr_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(transport_lookup_tmr_lun);
|
||||
|
||||
@@ -908,12 +908,15 @@ new_bio:
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
if (bio)
|
||||
bio_put(bio);
|
||||
if (bio) {
|
||||
bio_uninit(bio);
|
||||
kfree(bio);
|
||||
}
|
||||
while (req->bio) {
|
||||
bio = req->bio;
|
||||
req->bio = bio->bi_next;
|
||||
bio_put(bio);
|
||||
bio_uninit(bio);
|
||||
kfree(bio);
|
||||
}
|
||||
req->biotail = NULL;
|
||||
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
|
||||
|
||||
@@ -3627,6 +3627,10 @@ int transport_generic_handle_tmr(
|
||||
unsigned long flags;
|
||||
bool aborted = false;
|
||||
|
||||
spin_lock_irqsave(&cmd->se_dev->se_tmr_lock, flags);
|
||||
list_add_tail(&cmd->se_tmr_req->tmr_list, &cmd->se_dev->dev_tmr_list);
|
||||
spin_unlock_irqrestore(&cmd->se_dev->se_tmr_lock, flags);
|
||||
|
||||
spin_lock_irqsave(&cmd->t_state_lock, flags);
|
||||
if (cmd->transport_state & CMD_T_ABORTED) {
|
||||
aborted = true;
|
||||
|
||||
@@ -1345,11 +1345,41 @@ static void pl011_start_tx_pio(struct uart_amba_port *uap)
|
||||
}
|
||||
}
|
||||
|
||||
static void pl011_rs485_tx_start(struct uart_amba_port *uap)
|
||||
{
|
||||
struct uart_port *port = &uap->port;
|
||||
u32 cr;
|
||||
|
||||
/* Enable transmitter */
|
||||
cr = pl011_read(uap, REG_CR);
|
||||
cr |= UART011_CR_TXE;
|
||||
|
||||
/* Disable receiver if half-duplex */
|
||||
if (!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
||||
cr &= ~UART011_CR_RXE;
|
||||
|
||||
if (port->rs485.flags & SER_RS485_RTS_ON_SEND)
|
||||
cr &= ~UART011_CR_RTS;
|
||||
else
|
||||
cr |= UART011_CR_RTS;
|
||||
|
||||
pl011_write(cr, uap, REG_CR);
|
||||
|
||||
if (port->rs485.delay_rts_before_send)
|
||||
mdelay(port->rs485.delay_rts_before_send);
|
||||
|
||||
uap->rs485_tx_started = true;
|
||||
}
|
||||
|
||||
static void pl011_start_tx(struct uart_port *port)
|
||||
{
|
||||
struct uart_amba_port *uap =
|
||||
container_of(port, struct uart_amba_port, port);
|
||||
|
||||
if ((uap->port.rs485.flags & SER_RS485_ENABLED) &&
|
||||
!uap->rs485_tx_started)
|
||||
pl011_rs485_tx_start(uap);
|
||||
|
||||
if (!pl011_dma_tx_start(uap))
|
||||
pl011_start_tx_pio(uap);
|
||||
}
|
||||
@@ -1431,42 +1461,12 @@ static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void pl011_rs485_tx_start(struct uart_amba_port *uap)
|
||||
{
|
||||
struct uart_port *port = &uap->port;
|
||||
u32 cr;
|
||||
|
||||
/* Enable transmitter */
|
||||
cr = pl011_read(uap, REG_CR);
|
||||
cr |= UART011_CR_TXE;
|
||||
|
||||
/* Disable receiver if half-duplex */
|
||||
if (!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
||||
cr &= ~UART011_CR_RXE;
|
||||
|
||||
if (port->rs485.flags & SER_RS485_RTS_ON_SEND)
|
||||
cr &= ~UART011_CR_RTS;
|
||||
else
|
||||
cr |= UART011_CR_RTS;
|
||||
|
||||
pl011_write(cr, uap, REG_CR);
|
||||
|
||||
if (port->rs485.delay_rts_before_send)
|
||||
mdelay(port->rs485.delay_rts_before_send);
|
||||
|
||||
uap->rs485_tx_started = true;
|
||||
}
|
||||
|
||||
/* Returns true if tx interrupts have to be (kept) enabled */
|
||||
static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq)
|
||||
{
|
||||
struct circ_buf *xmit = &uap->port.state->xmit;
|
||||
int count = uap->fifosize >> 1;
|
||||
|
||||
if ((uap->port.rs485.flags & SER_RS485_ENABLED) &&
|
||||
!uap->rs485_tx_started)
|
||||
pl011_rs485_tx_start(uap);
|
||||
|
||||
if (uap->port.x_char) {
|
||||
if (!pl011_tx_char(uap, uap->port.x_char, from_irq))
|
||||
return true;
|
||||
|
||||
@@ -6388,7 +6388,6 @@ static void ufshcd_err_handling_prepare(struct ufs_hba *hba)
|
||||
ufshcd_hold(hba, false);
|
||||
if (!ufshcd_is_clkgating_allowed(hba))
|
||||
ufshcd_setup_clocks(hba, true);
|
||||
ufshcd_release(hba);
|
||||
pm_op = hba->is_sys_suspended ? UFS_SYSTEM_PM : UFS_RUNTIME_PM;
|
||||
ufshcd_vops_resume(hba, pm_op);
|
||||
} else {
|
||||
|
||||
@@ -826,7 +826,11 @@ void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep,
|
||||
return;
|
||||
}
|
||||
|
||||
if (request->complete) {
|
||||
/*
|
||||
* zlp request is appended by driver, needn't call usb_gadget_giveback_request() to notify
|
||||
* gadget composite driver.
|
||||
*/
|
||||
if (request->complete && request->buf != priv_dev->zlp_buf) {
|
||||
spin_unlock(&priv_dev->lock);
|
||||
usb_gadget_giveback_request(&priv_ep->endpoint,
|
||||
request);
|
||||
@@ -2537,11 +2541,11 @@ static int cdns3_gadget_ep_disable(struct usb_ep *ep)
|
||||
|
||||
while (!list_empty(&priv_ep->wa2_descmiss_req_list)) {
|
||||
priv_req = cdns3_next_priv_request(&priv_ep->wa2_descmiss_req_list);
|
||||
list_del_init(&priv_req->list);
|
||||
|
||||
kfree(priv_req->request.buf);
|
||||
cdns3_gadget_ep_free_request(&priv_ep->endpoint,
|
||||
&priv_req->request);
|
||||
list_del_init(&priv_req->list);
|
||||
--priv_ep->wa2_counter;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +394,6 @@ pm_put:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* cdns_wakeup_irq - interrupt handler for wakeup events
|
||||
* @irq: irq number for cdns3/cdnsp core device
|
||||
|
||||
@@ -156,7 +156,8 @@ bool cdns_is_device(struct cdns *cdns)
|
||||
*/
|
||||
static void cdns_otg_disable_irq(struct cdns *cdns)
|
||||
{
|
||||
writel(0, &cdns->otg_irq_regs->ien);
|
||||
if (cdns->version)
|
||||
writel(0, &cdns->otg_irq_regs->ien);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -418,15 +419,20 @@ int cdns_drd_init(struct cdns *cdns)
|
||||
|
||||
cdns->otg_regs = (void __iomem *)&cdns->otg_v1_regs->cmd;
|
||||
|
||||
if (readl(&cdns->otg_cdnsp_regs->did) == OTG_CDNSP_DID) {
|
||||
state = readl(&cdns->otg_cdnsp_regs->did);
|
||||
|
||||
if (OTG_CDNSP_CHECK_DID(state)) {
|
||||
cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *)
|
||||
&cdns->otg_cdnsp_regs->ien;
|
||||
cdns->version = CDNSP_CONTROLLER_V2;
|
||||
} else {
|
||||
} else if (OTG_CDNS3_CHECK_DID(state)) {
|
||||
cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *)
|
||||
&cdns->otg_v1_regs->ien;
|
||||
writel(1, &cdns->otg_v1_regs->simulate);
|
||||
cdns->version = CDNS3_CONTROLLER_V1;
|
||||
} else {
|
||||
dev_err(cdns->dev, "not supporte DID=0x%08x\n", state);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev_dbg(cdns->dev, "DRD version v1 (ID: %08x, rev: %08x)\n",
|
||||
@@ -479,7 +485,6 @@ int cdns_drd_exit(struct cdns *cdns)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Indicate the cdns3 core was power lost before */
|
||||
bool cdns_power_is_lost(struct cdns *cdns)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,11 @@ struct cdnsp_otg_regs {
|
||||
__le32 susp_timing_ctrl;
|
||||
};
|
||||
|
||||
#define OTG_CDNSP_DID 0x0004034E
|
||||
/* CDNSP driver supports 0x000403xx Cadence USB controller family. */
|
||||
#define OTG_CDNSP_CHECK_DID(did) (((did) & GENMASK(31, 8)) == 0x00040300)
|
||||
|
||||
/* CDNS3 driver supports 0x000402xx Cadence USB controller family. */
|
||||
#define OTG_CDNS3_CHECK_DID(did) (((did) & GENMASK(31, 8)) == 0x00040200)
|
||||
|
||||
/*
|
||||
* Common registers interface for both CDNS3 and CDNSP version of DRD.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user