Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
61459ea
drm/msm: make sure to not queue up recovery more than once
pac85 Aug 21, 2025
6c44ef9
char: Use list_del_init() in misc_deregister() to reinitialize list p…
Sep 4, 2025
34bea3b
media: ov08x40: Fix the horizontal flip control
hao-yao Apr 25, 2025
4c6b069
media: i2c: og01a1b: Specify monochrome media bus format instead of B…
Aug 23, 2025
5e30f01
scsi: ufs: host: mediatek: Enhance recovery on resume failure
ptr324 Sep 3, 2025
b82b66f
scsi: ufs: host: mediatek: Enhance recovery on hibernation exit failure
ptr324 Sep 3, 2025
adbe527
net: phy: marvell: Fix 88e1510 downshift counter errata
rohangt07 Sep 6, 2025
e81bc1c
scsi: ufs: host: mediatek: Disable auto-hibern8 during power mode cha…
ptr324 Sep 3, 2025
b3bd6e1
ntfs3: pretend $Extend records as regular files
Sep 2, 2025
a9a0bb3
wifi: mac80211: Fix HE capabilities element check
ilanpeer2 Sep 7, 2025
f164821
phy: cadence: cdns-dphy: Enable lower resolutions in dphy
h-shenoy Aug 7, 2025
d41e8ed
phy: renesas: r8a779f0-ether-serdes: add new step added to latest dat…
mdege Jul 3, 2025
c5d8d82
phy: rockchip: phy-rockchip-inno-csidphy: allow writes to grf register 0
Sep 3, 2025
c824f08
net: sh_eth: Disable WoL if system can not suspend
Sep 9, 2025
0bdc97a
selftests: net: replace sleeps in fcnal-test with waits
kuba-moo Sep 9, 2025
3983f04
media: redrat3: use int type to store negative error codes
qianfengrong Aug 27, 2025
257c915
selftests: traceroute: Use require_command()
idosch Sep 8, 2025
2cbf1f3
netfilter: nf_reject: don't reply to icmp error messages
Aug 29, 2025
c534d66
x86/kvm: Prefer native qspinlock for dedicated vCPUs irrespective of …
lrq-max Jul 22, 2025
542dc9e
selftests: Disable dad for ipv6 in fcnal-test.sh
dsahern Sep 10, 2025
5b65595
eth: 8139too: Make 8139TOO_PIO depend on !NO_IOPORT_MAP
fifteenhex Sep 7, 2025
269d582
selftests: Replace sleep with slowwait
dsahern Sep 10, 2025
bbec22a
udp_tunnel: use netdev_warn() instead of netdev_WARN()
aloktiwa Sep 10, 2025
203bcb8
HID: asus: add Z13 folio to generic group for multitouch to work
antheas Aug 14, 2025
bb2c44c
watchdog: s3c2410_wdt: Fix max_timeout being calculated larger
Aug 18, 2025
1881cdb
crypto: sun8i-ce - remove channel timeout field
ovpanait Sep 2, 2025
5d48728
PCI: dwc: Verify the single eDMA IRQ in dw_pcie_edma_irq_verify()
floatious Sep 8, 2025
d1e683d
crypto: caam - double the entropy delay interval for retry
jaingaurav2712 Sep 5, 2025
80bcf8e
net/cls_cgroup: Fix task_get_classid() during qdisc run
laoar Sep 2, 2025
7f9a321
wifi: mt76: mt7921: Add 160MHz beamformee capability for mt7922 device
Quanzhoucen Aug 28, 2025
3cf18f6
wifi: mt76: mt7996: Temporarily disable EPCS
Sep 4, 2025
1455fc2
ALSA: serial-generic: remove shared static buffer
johnkeeping Sep 15, 2025
141d7f4
drm/amdgpu: Use memdup_array_user in amdgpu_cs_wait_fences_ioctl
Jun 12, 2025
538c204
drm/amd: Avoid evicting resources at S5
superm1 Aug 11, 2025
26678e1
drm/amd/display: Fix DVI-D/HDMI adapters
Aug 25, 2025
266d2b6
drm/amd/display: Disable VRR on DCE 6
Aug 25, 2025
d441db4
page_pool: always add GFP_NOWARN for ATOMIC allocations
kuba-moo Sep 12, 2025
844e776
ethernet: Extend device_get_mac_address() to use NVMEM
lategoodbye Sep 12, 2025
f806386
HID: i2c-hid: Resolve touchpad issues on Dell systems during S4
superm1 Sep 9, 2025
5bebf50
drm/amdgpu: reject gang submissions under SRIOV
ChristianKoenigAMD Aug 27, 2025
00dbabb
selftests/Makefile: include $(INSTALL_DEP_TARGETS) in clean target to…
SimoneCheng Sep 10, 2025
e1a4ed2
scsi: ufs: core: Disable timestamp functionality if not supported
bvanassche Sep 9, 2025
ba45b42
scsi: lpfc: Check return status of lpfc_reset_flush_io_context during…
Sep 15, 2025
cb0018f
scsi: lpfc: Remove ndlp kref decrement clause for F_Port_Ctrl in lpfc…
Sep 15, 2025
6b2dc7b
scsi: lpfc: Define size of debugfs entry for xri rebalancing
Sep 15, 2025
e372bc3
allow finish_no_open(file, ERR_PTR(-E...))
Sep 12, 2025
ee3ed77
usb: mon: Increase BUFF_MAX to 64 MiB to support multi-MB URBs
cyrozap Sep 15, 2025
ee41326
usb: xhci: plat: Facilitate using autosuspend for xhci plat devices
Kriskura176767 Sep 16, 2025
b5ac3ff
f2fs: fix infinite loop in __insert_extent_tree()
Sep 17, 2025
b1c58b3
ipv6: np->rxpmtu race annotation
edumazet Sep 16, 2025
06b9a0a
jfs: Verify inode mode when loading from disk
Sep 12, 2025
ab98d60
jfs: fix uninitialized waitqueue in transaction manager
shauryarane05 Aug 24, 2025
a99c8d2
ASoC: qcom: sc8280xp: explicitly set S16LE format in sc8280xp_be_hw_p…
laklimov Sep 11, 2025
59e528e
net: phy: clear link parameters on admin link down
olerem Sep 17, 2025
323949d
net: ethernet: microchip: sparx5: make it selectable for ARCH_LAN969X
robimarko Sep 17, 2025
00f2013
iommu/vt-d: Replace snprintf with scnprintf in dmar_latency_snapshot()
ImanSeyed Sep 18, 2025
0317423
wifi: ath10k: Fix connection after GTK rekeying
Sep 2, 2025
0e09314
net: intel: fm10k: Fix parameter idx set but not used
listout Sep 2, 2025
2209d27
r8169: set EEE speed down ratio to 1
RealtekNIC Sep 18, 2025
20c9c0f
PCI: cadence: Check for the existence of cdns_pcie::ops before using it
unicornx Sep 12, 2025
fd311f4
sparc/module: Add R_SPARC_UA64 relocation handling
koachan Jun 9, 2025
e9e566e
sparc64: fix prototypes of reads[bwl]()
Aug 10, 2025
26727e8
vfio: return -ENOTTY for unsupported device feature
Sep 8, 2025
90c61e2
PCI/PM: Skip resuming to D0 if device is disconnected
superm1 Sep 9, 2025
ce570ee
remoteproc: qcom: q6v5: Avoid handling handover twice
stephan-gh Aug 20, 2025
8fdfc0c
wifi: ath12k: Increase DP_REO_CMD_RING_SIZE to 256
Aug 6, 2025
dfd906e
drm/amd/display: Add AVI infoframe copy in copy_stream_update_to_stream
Sep 3, 2025
1ab6444
NFSv4: handle ERR_GRACE on delegation recalls
Aug 11, 2025
dcbbf13
NFSv4.1: fix mount hang after CREATE_SESSION failure
Aug 13, 2025
880454a
nfs4_setup_readdir(): insufficient locking for ->d_parent->d_inode de…
Sep 16, 2025
0fde8fb
net: bridge: Install FDB for bridge MAC on VLAN 0
pmachata Sep 22, 2025
fbe39b9
scsi: libfc: Fix potential buffer overflow in fc_ct_ms_fill()
aloktiwa Sep 15, 2025
4aa5ac0
accel/habanalabs/gaudi2: fix BMON disable configuration
vyavniely Jun 18, 2024
6706b0c
scsi: mpt3sas: Add support for 22.5 Gbps SAS link rate
Sep 22, 2025
e4d8886
accel/habanalabs: return ENOMEM if less than requested pages were pinned
May 26, 2024
ba52d22
accel/habanalabs/gaudi2: read preboot status after recovering from di…
ksinyuk Oct 1, 2024
2ce5cdf
accel/habanalabs: support mapping cb with vmalloc-backed coherent memory
mhaimovski Sep 8, 2024
4135259
fs: ext4: change GFP_KERNEL to GFP_NOFS to avoid deadlock
Aug 6, 2025
edecb5a
ext4: increase IO priority of fastcommit
Aug 27, 2025
82693f5
amd/amdkfd: resolve a race in amdgpu_amdkfd_device_fini_sw
yifancom Sep 16, 2025
35cb5eb
ASoC: stm32: sai: manage context in set_sysclk callback
Sep 16, 2025
406601b
ASoC: tlv320aic3x: Fix class-D initialization for tlv320aic3007
pfiser Sep 25, 2025
517c63c
net/mlx5e: Don't query FEC statistics when FEC is disabled
cjubran Sep 24, 2025
9bb0f86
net: macb: avoid dealing with endianness in macb_set_hwaddr()
tleb Sep 23, 2025
6468657
Bluetooth: btusb: Check for unexpected bytes when defragmenting HCI f…
arkq Aug 27, 2025
26b4662
Bluetooth: SCO: Fix UAF on sco_conn_free
Vudentz Sep 22, 2025
8be25c2
Bluetooth: bcsp: receive data only if registered
ivpravdin Aug 30, 2025
1c60172
ALSA: usb-audio: add mono main switch to Presonus S1824c
royvegard Sep 27, 2025
c314149
exfat: limit log print for IO error
Aug 15, 2025
3eded6e
6pack: drop redundant locking and refcounting
LGA1150 Sep 25, 2025
9279055
page_pool: Clamp pool size to max 16K pages
dtatulea Sep 26, 2025
6548408
orangefs: fix xattr related buffer overflow...
hubcapsc Sep 15, 2025
5cef345
ftrace: Fix softlockup in ftrace_module_enable
Frankenween Sep 12, 2025
39d6e4e
ksmbd: use sock_create_kern interface to create kernel socket
namjaejeon Sep 25, 2025
063469d
smb: client: transport: avoid reconnects triggered by pending task work
foxmox Sep 15, 2025
693589a
ima: don't clear IMA_DIGSIG flag when setting or removing non-IMA xattr
coiby Sep 15, 2025
e38f119
char: misc: restrict the dynamic range to exclude reserved minors
Apr 23, 2025
a4ace3f
RDMA/irdma: Fix SD index calculation
jakemoroni Sep 23, 2025
06bf514
RDMA/irdma: Remove unused struct irdma_cq fields
jakemoroni Sep 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/sparc/include/asm/elf_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#define R_SPARC_7 43
#define R_SPARC_5 44
#define R_SPARC_6 45
#define R_SPARC_UA64 54

/* Bits present in AT_HWCAP, primarily for Sparc32. */
#define HWCAP_SPARC_FLUSH 0x00000001
Expand Down
6 changes: 3 additions & 3 deletions arch/sparc/include/asm/io_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,19 @@ void insl(unsigned long, void *, unsigned long);
#define insw insw
#define insl insl

static inline void readsb(void __iomem *port, void *buf, unsigned long count)
static inline void readsb(const volatile void __iomem *port, void *buf, unsigned long count)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

{
insb((unsigned long __force)port, buf, count);
}
#define readsb readsb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Possible repeated word: 'readsb'


static inline void readsw(void __iomem *port, void *buf, unsigned long count)
static inline void readsw(const volatile void __iomem *port, void *buf, unsigned long count)
{
insw((unsigned long __force)port, buf, count);
}
#define readsw readsw
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Possible repeated word: 'readsw'


static inline void readsl(void __iomem *port, void *buf, unsigned long count)
static inline void readsl(const volatile void __iomem *port, void *buf, unsigned long count)
{
insl((unsigned long __force)port, buf, count);
}
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
break;
#ifdef CONFIG_SPARC64
case R_SPARC_64:
case R_SPARC_UA64:
location[0] = v >> 56;
location[1] = v >> 48;
location[2] = v >> 40;
Expand Down
20 changes: 10 additions & 10 deletions arch/x86/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,16 +1074,6 @@ static void kvm_wait(u8 *ptr, u8 val)
*/
void __init kvm_spinlock_init(void)
{
/*
* In case host doesn't support KVM_FEATURE_PV_UNHALT there is still an
* advantage of keeping virt_spin_lock_key enabled: virt_spin_lock() is
* preferred over native qspinlock when vCPU is preempted.
*/
if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) {
pr_info("PV spinlocks disabled, no host support\n");
return;
}

/*
* Disable PV spinlocks and use native qspinlock when dedicated pCPUs
* are available.
Expand All @@ -1103,6 +1093,16 @@ void __init kvm_spinlock_init(void)
goto out;
}

/*
* In case host doesn't support KVM_FEATURE_PV_UNHALT there is still an
* advantage of keeping virt_spin_lock_key enabled: virt_spin_lock() is
* preferred over native qspinlock when vCPU is preempted.
*/
if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) {
pr_info("PV spinlocks disabled, no host support\n");
return;
}

pr_info("PV spinlocks enabled\n");

__pv_init_lock_hash();
Expand Down
2 changes: 1 addition & 1 deletion drivers/accel/habanalabs/common/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,7 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size,
if (rc < 0)
goto destroy_pages;
npages = rc;
rc = -EFAULT;
rc = -ENOMEM;
goto put_pages;
}
userptr->npages = npages;
Expand Down
19 changes: 19 additions & 0 deletions drivers/accel/habanalabs/gaudi/gaudi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4173,10 +4173,29 @@ static int gaudi_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP |
VM_DONTCOPY | VM_NORESERVE);

#ifdef _HAS_DMA_MMAP_COHERENT
/*
* If dma_alloc_coherent() returns a vmalloc address, set VM_MIXEDMAP
* so vm_insert_page() can handle it safely. Without this, the kernel
* may BUG_ON due to VM_PFNMAP.
*/
if (is_vmalloc_addr(cpu_addr))
vm_flags_set(vma, VM_MIXEDMAP);

rc = dma_mmap_coherent(hdev->dev, vma, cpu_addr,
(dma_addr - HOST_PHYS_BASE), size);
if (rc)
dev_err(hdev->dev, "dma_mmap_coherent error %d", rc);
#else

rc = remap_pfn_range(vma, vma->vm_start,
virt_to_phys(cpu_addr) >> PAGE_SHIFT,
size, vma->vm_page_prot);
if (rc)
dev_err(hdev->dev, "remap_pfn_range error %d", rc);

#endif


return rc;
}
Expand Down
15 changes: 14 additions & 1 deletion drivers/accel/habanalabs/gaudi2/gaudi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2985,7 +2985,6 @@ static int gaudi2_early_init(struct hl_device *hdev)
rc = hl_fw_read_preboot_status(hdev);
if (rc) {
if (hdev->reset_on_preboot_fail)
/* we are already on failure flow, so don't check if hw_fini fails. */
hdev->asic_funcs->hw_fini(hdev, true, false);
goto pci_fini;
}
Expand All @@ -2997,6 +2996,13 @@ static int gaudi2_early_init(struct hl_device *hdev)
dev_err(hdev->dev, "failed to reset HW in dirty state (%d)\n", rc);
goto pci_fini;
}

rc = hl_fw_read_preboot_status(hdev);
if (rc) {
if (hdev->reset_on_preboot_fail)
hdev->asic_funcs->hw_fini(hdev, true, false);
goto pci_fini;
}
}

return 0;
Expand Down Expand Up @@ -6339,6 +6345,13 @@ static int gaudi2_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
VM_DONTCOPY | VM_NORESERVE);

#ifdef _HAS_DMA_MMAP_COHERENT
/*
* If dma_alloc_coherent() returns a vmalloc address, set VM_MIXEDMAP
* so vm_insert_page() can handle it safely. Without this, the kernel
* may BUG_ON due to VM_PFNMAP.
*/
if (is_vmalloc_addr(cpu_addr))
vm_flags_set(vma, VM_MIXEDMAP);

rc = dma_mmap_coherent(hdev->dev, vma, cpu_addr, dma_addr, size);
if (rc)
Expand Down
2 changes: 1 addition & 1 deletion drivers/accel/habanalabs/gaudi2/gaudi2_coresight.c
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,7 @@ static int gaudi2_config_bmon(struct hl_device *hdev, struct hl_debug_params *pa
WREG32(base_reg + mmBMON_ADDRH_E3_OFFSET, 0);
WREG32(base_reg + mmBMON_REDUCTION_OFFSET, 0);
WREG32(base_reg + mmBMON_STM_TRC_OFFSET, 0x7 | (0xA << 8));
WREG32(base_reg + mmBMON_CR_OFFSET, 0x77 | 0xf << 24);
WREG32(base_reg + mmBMON_CR_OFFSET, 0x41);
}

return 0;
Expand Down
17 changes: 17 additions & 0 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ static struct usb_driver btusb_driver;
#define BTUSB_INTEL_BROKEN_INITIAL_NCMD BIT(25)
#define BTUSB_INTEL_NO_WBS_SUPPORT BIT(26)
#define BTUSB_ACTIONS_SEMI BIT(27)
#define BTUSB_BARROT BIT(28)

static const struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
Expand Down Expand Up @@ -769,6 +770,10 @@ static const struct usb_device_id quirks_table[] = {
{ USB_DEVICE(0x0cb5, 0xc547), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },

/* Barrot Technology Bluetooth devices */
{ USB_DEVICE(0x33fa, 0x0010), .driver_info = BTUSB_BARROT },
{ USB_DEVICE(0x33fa, 0x0012), .driver_info = BTUSB_BARROT },

/* Actions Semiconductor ATS2851 based devices */
{ USB_DEVICE(0x10d7, 0xb012), .driver_info = BTUSB_ACTIONS_SEMI },

Expand Down Expand Up @@ -1166,6 +1171,18 @@ static int btusb_recv_intr(struct btusb_data *data, void *buffer, int count)
}

if (!hci_skb_expect(skb)) {
/* Each chunk should correspond to at least 1 or more
* events so if there are still bytes left that doesn't
* constitute a new event this is likely a bug in the
* controller.
*/
if (count && count < HCI_EVENT_HDR_SIZE) {
bt_dev_warn(data->hdev,
"Unexpected continuation: %d bytes",
count);
count = 0;
}

/* Complete frame */
btusb_recv_event(data, skb);
skb = NULL;
Expand Down
3 changes: 3 additions & 0 deletions drivers/bluetooth/hci_bcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ static int bcsp_recv(struct hci_uart *hu, const void *data, int count)
struct bcsp_struct *bcsp = hu->priv;
const unsigned char *ptr;

if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
return -EUNATCH;

BT_DBG("hu %p count %d rx_state %d rx_count %ld",
hu, count, bcsp->rx_state, bcsp->rx_count);

Expand Down
30 changes: 6 additions & 24 deletions drivers/char/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ static LIST_HEAD(misc_list);
static DEFINE_MUTEX(misc_mtx);

/*
* Assigned numbers, used for dynamic minors
* Assigned numbers.
*/
#define DYNAMIC_MINORS 128 /* like dynamic majors */
static DEFINE_IDA(misc_minors_ida);

static int misc_minor_alloc(int minor)
Expand All @@ -69,34 +68,17 @@ static int misc_minor_alloc(int minor)

if (minor == MISC_DYNAMIC_MINOR) {
/* allocate free id */
ret = ida_alloc_max(&misc_minors_ida, DYNAMIC_MINORS - 1, GFP_KERNEL);
if (ret >= 0) {
ret = DYNAMIC_MINORS - ret - 1;
} else {
ret = ida_alloc_range(&misc_minors_ida, MISC_DYNAMIC_MINOR + 1,
MINORMASK, GFP_KERNEL);
}
ret = ida_alloc_range(&misc_minors_ida, MISC_DYNAMIC_MINOR + 1,
MINORMASK, GFP_KERNEL);
} else {
/* specific minor, check if it is in dynamic or misc dynamic range */
if (minor < DYNAMIC_MINORS) {
minor = DYNAMIC_MINORS - minor - 1;
ret = ida_alloc_range(&misc_minors_ida, minor, minor, GFP_KERNEL);
} else if (minor > MISC_DYNAMIC_MINOR) {
ret = ida_alloc_range(&misc_minors_ida, minor, minor, GFP_KERNEL);
} else {
/* case of non-dynamic minors, no need to allocate id */
ret = 0;
}
ret = ida_alloc_range(&misc_minors_ida, minor, minor, GFP_KERNEL);
}
return ret;
}

static void misc_minor_free(int minor)
{
if (minor < DYNAMIC_MINORS)
ida_free(&misc_minors_ida, DYNAMIC_MINORS - minor - 1);
else if (minor > MISC_DYNAMIC_MINOR)
ida_free(&misc_minors_ida, minor);
ida_free(&misc_minors_ida, minor);
}

#ifdef CONFIG_PROC_FS
Expand Down Expand Up @@ -297,7 +279,7 @@ void misc_deregister(struct miscdevice *misc)
return;

mutex_lock(&misc_mtx);
list_del(&misc->list);
list_del_init(&misc->list);
device_destroy(&misc_class, MKDEV(MISC_MAJOR, misc->minor));
misc_minor_free(misc->minor);
mutex_unlock(&misc_mtx);
Expand Down
1 change: 0 additions & 1 deletion drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
goto theend_sgs;
}

chan->timeout = areq->cryptlen;
rctx->nr_sgs = ns;
rctx->nr_sgd = nd;
return 0;
Expand Down
5 changes: 2 additions & 3 deletions drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ int sun8i_ce_run_task(struct sun8i_ce_dev *ce, int flow, const char *name)
mutex_unlock(&ce->mlock);

wait_for_completion_interruptible_timeout(&ce->chanlist[flow].complete,
msecs_to_jiffies(ce->chanlist[flow].timeout));
msecs_to_jiffies(CE_DMA_TIMEOUT_MS));

if (ce->chanlist[flow].status == 0) {
dev_err(ce->dev, "DMA timeout for %s (tm=%d) on flow %d\n", name,
ce->chanlist[flow].timeout, flow);
dev_err(ce->dev, "DMA timeout for %s on flow %d\n", name, flow);
err = -EFAULT;
}
/* No need to lock for this read, the channel is locked so
Expand Down
2 changes: 0 additions & 2 deletions drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,6 @@ int sun8i_ce_hash_run(struct crypto_engine *engine, void *breq)
else
cet->t_dlen = cpu_to_le32(areq->nbytes / 4 + j);

chan->timeout = areq->nbytes;

err = sun8i_ce_run_task(ce, flow, crypto_ahash_alg_name(tfm));

dma_unmap_single(ce->dev, addr_pad, j * 4, DMA_TO_DEVICE);
Expand Down
1 change: 0 additions & 1 deletion drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ int sun8i_ce_prng_generate(struct crypto_rng *tfm, const u8 *src,

cet->t_dst[0].addr = cpu_to_le32(dma_dst);
cet->t_dst[0].len = cpu_to_le32(todo / 4);
ce->chanlist[flow].timeout = 2000;

err = sun8i_ce_run_task(ce, 3, "PRNG");
mutex_unlock(&ce->rnglock);
Expand Down
1 change: 0 additions & 1 deletion drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ static int sun8i_ce_trng_read(struct hwrng *rng, void *data, size_t max, bool wa

cet->t_dst[0].addr = cpu_to_le32(dma_dst);
cet->t_dst[0].len = cpu_to_le32(todo / 4);
ce->chanlist[flow].timeout = todo;

err = sun8i_ce_run_task(ce, 3, "TRNG");
mutex_unlock(&ce->rnglock);
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
#define MAX_SG 8

#define CE_MAX_CLOCKS 4
#define CE_DMA_TIMEOUT_MS 3000

#define MAXFLOW 4

Expand Down Expand Up @@ -195,7 +196,6 @@ struct sun8i_ce_flow {
struct completion complete;
int status;
dma_addr_t t_phy;
int timeout;
struct ce_task *tl;
void *backup_iv;
void *bounce_iv;
Expand Down
4 changes: 2 additions & 2 deletions drivers/crypto/caam/ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,12 +692,12 @@ static int caam_ctrl_rng_init(struct device *dev)
*/
if (needs_entropy_delay_adjustment())
ent_delay = 12000;
if (!(ctrlpriv->rng4_sh_init || inst_handles)) {
if (!inst_handles) {
dev_info(dev,
"Entropy delay = %u\n",
ent_delay);
kick_trng(dev, ent_delay);
ent_delay += 400;
ent_delay = ent_delay * 2;
}
/*
* if instantiate_rng(...) fails, the loop will rerun
Expand Down
21 changes: 6 additions & 15 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
}
}

if (!p->gang_size) {
if (!p->gang_size || (amdgpu_sriov_vf(p->adev) && p->gang_size > 1)) {
ret = -EINVAL;
goto free_all_kdata;
}
Expand Down Expand Up @@ -1737,30 +1737,21 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, void *data,
{
struct amdgpu_device *adev = drm_to_adev(dev);
union drm_amdgpu_wait_fences *wait = data;
uint32_t fence_count = wait->in.fence_count;
struct drm_amdgpu_fence *fences_user;
struct drm_amdgpu_fence *fences;
int r;

/* Get the fences from userspace */
fences = kmalloc_array(fence_count, sizeof(struct drm_amdgpu_fence),
GFP_KERNEL);
if (fences == NULL)
return -ENOMEM;

fences_user = u64_to_user_ptr(wait->in.fences);
if (copy_from_user(fences, fences_user,
sizeof(struct drm_amdgpu_fence) * fence_count)) {
r = -EFAULT;
goto err_free_fences;
}
fences = memdup_array_user(u64_to_user_ptr(wait->in.fences),
wait->in.fence_count,
sizeof(struct drm_amdgpu_fence));
if (IS_ERR(fences))
return PTR_ERR(fences);

if (wait->in.wait_all)
r = amdgpu_cs_wait_all_fences(adev, filp, wait, fences);
else
r = amdgpu_cs_wait_any_fence(adev, filp, wait, fences);

err_free_fences:
kfree(fences);

return r;
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -4109,6 +4109,10 @@ static int amdgpu_device_evict_resources(struct amdgpu_device *adev)
if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU))
return 0;

/* No need to evict when going to S5 through S4 callbacks */
if (system_state == SYSTEM_POWER_OFF)
return 0;

ret = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM);
if (ret)
DRM_WARN("evicting device resources failed\n");
Expand Down
Loading
Loading