mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
Merge b357fd1c2a ("Merge tag 'usb-6.0-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") into android-mainline
Steps on the way to 6.0-final Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I42334b740268d416e3710455b4ed88fe490eb51a
This commit is contained in:
commit
0bdc4b5005
|
|
@ -2670,7 +2670,6 @@ M: Russell King <linux@armlinux.org.uk>
|
|||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
W: http://www.armlinux.org.uk/
|
||||
F: arch/arm/include/asm/hardware/entry-macro-iomd.S
|
||||
F: arch/arm/include/asm/hardware/ioc.h
|
||||
F: arch/arm/include/asm/hardware/iomd.h
|
||||
F: arch/arm/include/asm/hardware/memc.h
|
||||
|
|
|
|||
|
|
@ -354,6 +354,12 @@ int dvb_vb2_reqbufs(struct dvb_vb2_ctx *ctx, struct dmx_requestbuffers *req)
|
|||
|
||||
int dvb_vb2_querybuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b)
|
||||
{
|
||||
struct vb2_queue *q = &ctx->vb_q;
|
||||
|
||||
if (b->index >= q->num_buffers) {
|
||||
dprintk(1, "[%s] buffer index out of range\n", ctx->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
vb2_core_querybuf(&ctx->vb_q, b->index, b);
|
||||
dprintk(3, "[%s] index=%d\n", ctx->name, b->index);
|
||||
return 0;
|
||||
|
|
@ -378,8 +384,13 @@ int dvb_vb2_expbuf(struct dvb_vb2_ctx *ctx, struct dmx_exportbuffer *exp)
|
|||
|
||||
int dvb_vb2_qbuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b)
|
||||
{
|
||||
struct vb2_queue *q = &ctx->vb_q;
|
||||
int ret;
|
||||
|
||||
if (b->index >= q->num_buffers) {
|
||||
dprintk(1, "[%s] buffer index out of range\n", ctx->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = vb2_core_qbuf(&ctx->vb_q, b->index, b, NULL);
|
||||
if (ret) {
|
||||
dprintk(1, "[%s] index=%d errno=%d\n", ctx->name,
|
||||
|
|
|
|||
|
|
@ -228,7 +228,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct mtk_vcodec_dev *dev;
|
||||
struct video_device *vfd_enc;
|
||||
struct resource *res;
|
||||
phandle rproc_phandle;
|
||||
enum mtk_vcodec_fw_type fw_type;
|
||||
int ret;
|
||||
|
|
@ -272,14 +271,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
|
|||
goto err_res;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (res == NULL) {
|
||||
dev_err(&pdev->dev, "failed to get irq resource");
|
||||
ret = -ENOENT;
|
||||
dev->enc_irq = platform_get_irq(pdev, 0);
|
||||
if (dev->enc_irq < 0) {
|
||||
ret = dev->enc_irq;
|
||||
goto err_res;
|
||||
}
|
||||
|
||||
dev->enc_irq = platform_get_irq(pdev, 0);
|
||||
irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
|
||||
ret = devm_request_irq(&pdev->dev, dev->enc_irq,
|
||||
mtk_vcodec_enc_irq_handler,
|
||||
|
|
|
|||
|
|
@ -2740,7 +2740,7 @@ static const struct usb_device_id uvc_ids[] = {
|
|||
.idProduct = 0x4034,
|
||||
.bInterfaceClass = USB_CLASS_VIDEO,
|
||||
.bInterfaceSubClass = 1,
|
||||
.bInterfaceProtocol = 0,
|
||||
.bInterfaceProtocol = UVC_PC_PROTOCOL_15,
|
||||
.driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited },
|
||||
/* LogiLink Wireless Webcam */
|
||||
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
|
||||
|
|
|
|||
|
|
@ -1040,6 +1040,8 @@ int v4l2_compat_get_array_args(struct file *file, void *mbuf,
|
|||
{
|
||||
int err = 0;
|
||||
|
||||
memset(mbuf, 0, array_size);
|
||||
|
||||
switch (cmd) {
|
||||
case VIDIOC_G_FMT32:
|
||||
case VIDIOC_S_FMT32:
|
||||
|
|
|
|||
|
|
@ -2872,9 +2872,9 @@ static const struct v4l2_ioctl_info v4l2_ioctls[] = {
|
|||
IOCTL_INFO(VIDIOC_S_PRIORITY, v4l_s_priority, v4l_print_u32, INFO_FL_PRIO),
|
||||
IOCTL_INFO(VIDIOC_G_SLICED_VBI_CAP, v4l_g_sliced_vbi_cap, v4l_print_sliced_vbi_cap, INFO_FL_CLEAR(v4l2_sliced_vbi_cap, type)),
|
||||
IOCTL_INFO(VIDIOC_LOG_STATUS, v4l_log_status, v4l_print_newline, 0),
|
||||
IOCTL_INFO(VIDIOC_G_EXT_CTRLS, v4l_g_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL),
|
||||
IOCTL_INFO(VIDIOC_S_EXT_CTRLS, v4l_s_ext_ctrls, v4l_print_ext_controls, INFO_FL_PRIO | INFO_FL_CTRL),
|
||||
IOCTL_INFO(VIDIOC_TRY_EXT_CTRLS, v4l_try_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL),
|
||||
IOCTL_INFO(VIDIOC_G_EXT_CTRLS, v4l_g_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL | INFO_FL_ALWAYS_COPY),
|
||||
IOCTL_INFO(VIDIOC_S_EXT_CTRLS, v4l_s_ext_ctrls, v4l_print_ext_controls, INFO_FL_PRIO | INFO_FL_CTRL | INFO_FL_ALWAYS_COPY),
|
||||
IOCTL_INFO(VIDIOC_TRY_EXT_CTRLS, v4l_try_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL | INFO_FL_ALWAYS_COPY),
|
||||
IOCTL_INFO(VIDIOC_ENUM_FRAMESIZES, v4l_stub_enum_framesizes, v4l_print_frmsizeenum, INFO_FL_CLEAR(v4l2_frmsizeenum, pixel_format)),
|
||||
IOCTL_INFO(VIDIOC_ENUM_FRAMEINTERVALS, v4l_stub_enum_frameintervals, v4l_print_frmivalenum, INFO_FL_CLEAR(v4l2_frmivalenum, height)),
|
||||
IOCTL_INFO(VIDIOC_G_ENC_INDEX, v4l_stub_g_enc_index, v4l_print_enc_idx, 0),
|
||||
|
|
@ -3367,8 +3367,7 @@ video_usercopy(struct file *file, unsigned int orig_cmd, unsigned long arg,
|
|||
array_buf = kvmalloc(array_size, GFP_KERNEL);
|
||||
err = -ENOMEM;
|
||||
if (array_buf == NULL)
|
||||
goto out_array_args;
|
||||
err = -EFAULT;
|
||||
goto out;
|
||||
if (in_compat_syscall())
|
||||
err = v4l2_compat_get_array_args(file, array_buf,
|
||||
user_ptr, array_size,
|
||||
|
|
@ -3377,7 +3376,7 @@ video_usercopy(struct file *file, unsigned int orig_cmd, unsigned long arg,
|
|||
err = copy_from_user(array_buf, user_ptr, array_size) ?
|
||||
-EFAULT : 0;
|
||||
if (err)
|
||||
goto out_array_args;
|
||||
goto out;
|
||||
*kernel_ptr = array_buf;
|
||||
}
|
||||
|
||||
|
|
@ -3395,6 +3394,13 @@ video_usercopy(struct file *file, unsigned int orig_cmd, unsigned long arg,
|
|||
trace_v4l2_qbuf(video_devdata(file)->minor, parg);
|
||||
}
|
||||
|
||||
/*
|
||||
* Some ioctls can return an error, but still have valid
|
||||
* results that must be returned.
|
||||
*/
|
||||
if (err < 0 && !always_copy)
|
||||
goto out;
|
||||
|
||||
if (has_array_args) {
|
||||
*kernel_ptr = (void __force *)user_ptr;
|
||||
if (in_compat_syscall()) {
|
||||
|
|
@ -3409,16 +3415,8 @@ video_usercopy(struct file *file, unsigned int orig_cmd, unsigned long arg,
|
|||
} else if (copy_to_user(user_ptr, array_buf, array_size)) {
|
||||
err = -EFAULT;
|
||||
}
|
||||
goto out_array_args;
|
||||
}
|
||||
/*
|
||||
* Some ioctls can return an error, but still have valid
|
||||
* results that must be returned.
|
||||
*/
|
||||
if (err < 0 && !always_copy)
|
||||
goto out;
|
||||
|
||||
out_array_args:
|
||||
if (video_put_user((void __user *)arg, parg, cmd, orig_cmd))
|
||||
err = -EFAULT;
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -1162,8 +1162,8 @@ static int rkvdec_h264_run(struct rkvdec_ctx *ctx)
|
|||
|
||||
schedule_delayed_work(&rkvdec->watchdog_work, msecs_to_jiffies(2000));
|
||||
|
||||
writel(0xffffffff, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
|
||||
writel(0xffffffff, rkvdec->regs + RKVDEC_REG_H264_ERR_E);
|
||||
writel(0, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
|
||||
writel(0, rkvdec->regs + RKVDEC_REG_H264_ERR_E);
|
||||
writel(1, rkvdec->regs + RKVDEC_REG_PREF_LUMA_CACHE_COMMAND);
|
||||
writel(1, rkvdec->regs + RKVDEC_REG_PREF_CHR_CACHE_COMMAND);
|
||||
|
||||
|
|
|
|||
|
|
@ -2413,6 +2413,7 @@ int tb_switch_configure(struct tb_switch *sw)
|
|||
* additional capabilities.
|
||||
*/
|
||||
sw->config.cmuv = USB4_VERSION_1_0;
|
||||
sw->config.plug_events_delay = 0xa;
|
||||
|
||||
/* Enumerate the switch */
|
||||
ret = tb_sw_write(sw, (u32 *)&sw->config + 1, TB_CFG_SWITCH,
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
|
|||
/* Manage SoftReset */
|
||||
reset_control_deassert(dwc3_data->rstc_rst);
|
||||
|
||||
child = of_get_child_by_name(node, "dwc3");
|
||||
child = of_get_child_by_name(node, "usb");
|
||||
if (!child) {
|
||||
dev_err(&pdev->dev, "failed to find dwc3 core node\n");
|
||||
ret = -ENODEV;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,13 @@ UNUSUAL_DEV(0x059f, 0x1061, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_REPORT_OPCODES | US_FL_NO_SAME),
|
||||
|
||||
/* Reported-by: Hongling Zeng <zenghongling@kylinos.cn> */
|
||||
UNUSUAL_DEV(0x090c, 0x2000, 0x0000, 0x9999,
|
||||
"Hiksemi",
|
||||
"External HDD",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_UAS),
|
||||
|
||||
/*
|
||||
* Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI
|
||||
* commands in UAS mode. Observed with the 1.28 firmware; are there others?
|
||||
|
|
@ -76,6 +83,13 @@ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_REPORT_LUNS),
|
||||
|
||||
/* Reported-by: Hongling Zeng <zenghongling@kylinos.cn> */
|
||||
UNUSUAL_DEV(0x0bda, 0x9210, 0x0000, 0x9999,
|
||||
"Hiksemi",
|
||||
"External HDD",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_UAS),
|
||||
|
||||
/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
|
||||
UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
|
||||
"Initio Corporation",
|
||||
|
|
@ -118,6 +132,13 @@ UNUSUAL_DEV(0x154b, 0xf00d, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_ATA_1X),
|
||||
|
||||
/* Reported-by: Hongling Zeng <zenghongling@kylinos.cn> */
|
||||
UNUSUAL_DEV(0x17ef, 0x3899, 0x0000, 0x9999,
|
||||
"Thinkplus",
|
||||
"External HDD",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_UAS),
|
||||
|
||||
/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
|
||||
UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
|
||||
"VIA",
|
||||
|
|
|
|||
|
|
@ -588,8 +588,6 @@ static int ucsi_get_pdos(struct ucsi_connector *con, int is_partner,
|
|||
num_pdos * sizeof(u32));
|
||||
if (ret < 0 && ret != -ETIMEDOUT)
|
||||
dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret);
|
||||
if (ret == 0 && offset == 0)
|
||||
dev_warn(ucsi->dev, "UCSI_GET_PDOS returned 0 bytes\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2182,12 +2182,12 @@ static int damon_sysfs_add_target(struct damon_sysfs_target *sys_target,
|
|||
|
||||
if (!t)
|
||||
return -ENOMEM;
|
||||
damon_add_target(ctx, t);
|
||||
if (damon_target_has_pid(ctx)) {
|
||||
t->pid = find_get_pid(sys_target->pid);
|
||||
if (!t->pid)
|
||||
goto destroy_targets_out;
|
||||
}
|
||||
damon_add_target(ctx, t);
|
||||
err = damon_sysfs_set_regions(t, sys_target->regions);
|
||||
if (err)
|
||||
goto destroy_targets_out;
|
||||
|
|
|
|||
|
|
@ -624,6 +624,10 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node)
|
|||
if (ret || size <= PAGE_SIZE)
|
||||
return ret;
|
||||
|
||||
/* non-sleeping allocations are not supported by vmalloc */
|
||||
if (!gfpflags_allow_blocking(flags))
|
||||
return NULL;
|
||||
|
||||
/* Don't even allow crazy sizes */
|
||||
if (unlikely(size > INT_MAX)) {
|
||||
WARN_ON_ONCE(!(flags & __GFP_NOWARN));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user