Commit 49b4ce81 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior
Browse files

Merge tag 'v5.14.2' into linux-5.14.y-rt



This is the 5.14.2 stable release
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
parents c3a5c0c4 bbdd3de1
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 5 VERSION = 5
PATCHLEVEL = 14 PATCHLEVEL = 14
SUBLEVEL = 1 SUBLEVEL = 2
EXTRAVERSION = EXTRAVERSION =
NAME = Opossums on Parade NAME = Opossums on Parade
......
...@@ -30,7 +30,7 @@ config XTENSA ...@@ -30,7 +30,7 @@ config XTENSA
select HAVE_DMA_CONTIGUOUS select HAVE_DMA_CONTIGUOUS
select HAVE_EXIT_THREAD select HAVE_EXIT_THREAD
select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_TRACER
select HAVE_FUTEX_CMPXCHG if !MMU select HAVE_FUTEX_CMPXCHG if !MMU && FUTEX
select HAVE_HW_BREAKPOINT if PERF_EVENTS select HAVE_HW_BREAKPOINT if PERF_EVENTS
select HAVE_IRQ_TIME_ACCOUNTING select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_PCI select HAVE_PCI
......
...@@ -377,27 +377,27 @@ static int hid_submit_ctrl(struct hid_device *hid) ...@@ -377,27 +377,27 @@ static int hid_submit_ctrl(struct hid_device *hid)
len = hid_report_len(report); len = hid_report_len(report);
if (dir == USB_DIR_OUT) { if (dir == USB_DIR_OUT) {
usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0); usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0);
usbhid->urbctrl->transfer_buffer_length = len;
if (raw_report) { if (raw_report) {
memcpy(usbhid->ctrlbuf, raw_report, len); memcpy(usbhid->ctrlbuf, raw_report, len);
kfree(raw_report); kfree(raw_report);
usbhid->ctrl[usbhid->ctrltail].raw_report = NULL; usbhid->ctrl[usbhid->ctrltail].raw_report = NULL;
} }
} else { } else {
int maxpacket, padlen; int maxpacket;
usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0); usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0);
maxpacket = usb_maxpacket(hid_to_usb_dev(hid), maxpacket = usb_maxpacket(hid_to_usb_dev(hid),
usbhid->urbctrl->pipe, 0); usbhid->urbctrl->pipe, 0);
if (maxpacket > 0) { if (maxpacket > 0) {
padlen = DIV_ROUND_UP(len, maxpacket); len += (len == 0); /* Don't allow 0-length reports */
padlen *= maxpacket; len = DIV_ROUND_UP(len, maxpacket);
if (padlen > usbhid->bufsize) len *= maxpacket;
padlen = usbhid->bufsize; if (len > usbhid->bufsize)
len = usbhid->bufsize;
} else } else
padlen = 0; len = 0;
usbhid->urbctrl->transfer_buffer_length = padlen;
} }
usbhid->urbctrl->transfer_buffer_length = len;
usbhid->urbctrl->dev = hid_to_usb_dev(hid); usbhid->urbctrl->dev = hid_to_usb_dev(hid);
usbhid->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE | dir; usbhid->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE | dir;
......
...@@ -1346,7 +1346,7 @@ static int stk_camera_probe(struct usb_interface *interface, ...@@ -1346,7 +1346,7 @@ static int stk_camera_probe(struct usb_interface *interface,
if (!dev->isoc_ep) { if (!dev->isoc_ep) {
pr_err("Could not find isoc-in endpoint\n"); pr_err("Could not find isoc-in endpoint\n");
err = -ENODEV; err = -ENODEV;
goto error; goto error_put;
} }
dev->vsettings.palette = V4L2_PIX_FMT_RGB565; dev->vsettings.palette = V4L2_PIX_FMT_RGB565;
dev->vsettings.mode = MODE_VGA; dev->vsettings.mode = MODE_VGA;
...@@ -1359,10 +1359,12 @@ static int stk_camera_probe(struct usb_interface *interface, ...@@ -1359,10 +1359,12 @@ static int stk_camera_probe(struct usb_interface *interface,
err = stk_register_video_device(dev); err = stk_register_video_device(dev);
if (err) if (err)
goto error; goto error_put;
return 0; return 0;
error_put:
usb_put_intf(interface);
error: error:
v4l2_ctrl_handler_free(hdl); v4l2_ctrl_handler_free(hdl);
v4l2_device_unregister(&dev->v4l2_dev); v4l2_device_unregister(&dev->v4l2_dev);
......
...@@ -1164,10 +1164,8 @@ static int cp210x_set_chars(struct usb_serial_port *port, ...@@ -1164,10 +1164,8 @@ static int cp210x_set_chars(struct usb_serial_port *port,
kfree(dmabuf); kfree(dmabuf);
if (result < 0) { if (result < 0)
dev_err(&port->dev, "failed to set special chars: %d\n", result);
return result; return result;
}
return 0; return 0;
} }
...@@ -1192,6 +1190,7 @@ static void cp210x_set_flow_control(struct tty_struct *tty, ...@@ -1192,6 +1190,7 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
struct cp210x_flow_ctl flow_ctl; struct cp210x_flow_ctl flow_ctl;
u32 flow_repl; u32 flow_repl;
u32 ctl_hs; u32 ctl_hs;
bool crtscts;
int ret; int ret;
/* /*
...@@ -1219,8 +1218,10 @@ static void cp210x_set_flow_control(struct tty_struct *tty, ...@@ -1219,8 +1218,10 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
chars.bXoffChar = STOP_CHAR(tty); chars.bXoffChar = STOP_CHAR(tty);
ret = cp210x_set_chars(port, &chars); ret = cp210x_set_chars(port, &chars);
if (ret) if (ret) {
return; dev_err(&port->dev, "failed to set special chars: %d\n",
ret);
}
} }
mutex_lock(&port_priv->mutex); mutex_lock(&port_priv->mutex);
...@@ -1249,14 +1250,14 @@ static void cp210x_set_flow_control(struct tty_struct *tty, ...@@ -1249,14 +1250,14 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
flow_repl |= CP210X_SERIAL_RTS_FLOW_CTL; flow_repl |= CP210X_SERIAL_RTS_FLOW_CTL;
else else
flow_repl |= CP210X_SERIAL_RTS_INACTIVE; flow_repl |= CP210X_SERIAL_RTS_INACTIVE;
port_priv->crtscts = true; crtscts = true;
} else { } else {
ctl_hs &= ~CP210X_SERIAL_CTS_HANDSHAKE; ctl_hs &= ~CP210X_SERIAL_CTS_HANDSHAKE;
if (port_priv->rts) if (port_priv->rts)
flow_repl |= CP210X_SERIAL_RTS_ACTIVE; flow_repl |= CP210X_SERIAL_RTS_ACTIVE;
else else
flow_repl |= CP210X_SERIAL_RTS_INACTIVE; flow_repl |= CP210X_SERIAL_RTS_INACTIVE;
port_priv->crtscts = false; crtscts = false;
} }
if (I_IXOFF(tty)) { if (I_IXOFF(tty)) {
...@@ -1279,8 +1280,12 @@ static void cp210x_set_flow_control(struct tty_struct *tty, ...@@ -1279,8 +1280,12 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
flow_ctl.ulControlHandshake = cpu_to_le32(ctl_hs); flow_ctl.ulControlHandshake = cpu_to_le32(ctl_hs);
flow_ctl.ulFlowReplace = cpu_to_le32(flow_repl); flow_ctl.ulFlowReplace = cpu_to_le32(flow_repl);
cp210x_write_reg_block(port, CP210X_SET_FLOW, &flow_ctl, ret = cp210x_write_reg_block(port, CP210X_SET_FLOW, &flow_ctl,
sizeof(flow_ctl)); sizeof(flow_ctl));
if (ret)
goto out_unlock;
port_priv->crtscts = crtscts;
out_unlock: out_unlock:
mutex_unlock(&port_priv->mutex); mutex_unlock(&port_priv->mutex);
} }
......
...@@ -433,6 +433,7 @@ static int pl2303_detect_type(struct usb_serial *serial) ...@@ -433,6 +433,7 @@ static int pl2303_detect_type(struct usb_serial *serial)
switch (bcdDevice) { switch (bcdDevice) {
case 0x100: case 0x100:
case 0x305: case 0x305:
case 0x405:
/* /*
* Assume it's an HXN-type if the device doesn't * Assume it's an HXN-type if the device doesn't
* support the old read request value. * support the old read request value.
......
...@@ -750,6 +750,12 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, ...@@ -750,6 +750,12 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
ext4_write_lock_xattr(inode, &no_expand); ext4_write_lock_xattr(inode, &no_expand);
BUG_ON(!ext4_has_inline_data(inode)); BUG_ON(!ext4_has_inline_data(inode));
/*
* ei->i_inline_off may have changed since ext4_write_begin()
* called ext4_try_to_write_inline_data()
*/
(void) ext4_find_inline_data_nolock(inode);
kaddr = kmap_atomic(page); kaddr = kmap_atomic(page);
ext4_write_inline_data(inode, &iloc, kaddr, pos, len); ext4_write_inline_data(inode, &iloc, kaddr, pos, len);
kunmap_atomic(kaddr); kunmap_atomic(kaddr);
......
...@@ -5032,6 +5032,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ...@@ -5032,6 +5032,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
err = percpu_counter_init(&sbi->s_freeinodes_counter, freei, err = percpu_counter_init(&sbi->s_freeinodes_counter, freei,
GFP_KERNEL); GFP_KERNEL);
} }
/*
* Update the checksum after updating free space/inode
* counters. Otherwise the superblock can have an incorrect
* checksum in the buffer cache until it is written out and
* e2fsprogs programs trying to open a file system immediately
* after it is mounted can fail.
*/
ext4_superblock_csum_set(sb);
if (!err) if (!err)
err = percpu_counter_init(&sbi->s_dirs_counter, err = percpu_counter_init(&sbi->s_dirs_counter,
ext4_count_dirs(sb), GFP_KERNEL); ext4_count_dirs(sb), GFP_KERNEL);
......
...@@ -1746,7 +1746,7 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream, ...@@ -1746,7 +1746,7 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream,
channels = params_channels(params); channels = params_channels(params);
frame_size = snd_pcm_format_size(format, channels); frame_size = snd_pcm_format_size(format, channels);
if (frame_size > 0) if (frame_size > 0)
params->fifo_size /= (unsigned)frame_size; params->fifo_size /= frame_size;
} }
return 0; return 0;
} }
......
...@@ -8438,6 +8438,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -8438,6 +8438,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
...@@ -9521,6 +9522,16 @@ static int patch_alc269(struct hda_codec *codec) ...@@ -9521,6 +9522,16 @@ static int patch_alc269(struct hda_codec *codec)
snd_hda_pick_fixup(codec, alc269_fixup_models, snd_hda_pick_fixup(codec, alc269_fixup_models,
alc269_fixup_tbl, alc269_fixups); alc269_fixup_tbl, alc269_fixups);
/* FIXME: both TX300 and ROG Strix G17 have the same SSID, and
* the quirk breaks the latter (bko#214101).
* Clear the wrong entry.
*/
if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 &&
codec->core.vendor_id == 0x10ec0294) {
codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n");
codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
}
snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true);
snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false);
snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl,
......
...@@ -94,6 +94,7 @@ struct snd_usb_endpoint { ...@@ -94,6 +94,7 @@ struct snd_usb_endpoint {
struct list_head ready_playback_urbs; /* playback URB FIFO for implicit fb */ struct list_head ready_playback_urbs; /* playback URB FIFO for implicit fb */
unsigned int nurbs; /* # urbs */ unsigned int nurbs; /* # urbs */
unsigned int nominal_queue_size; /* total buffer sizes in URBs */
unsigned long active_mask; /* bitmask of active urbs */ unsigned long active_mask; /* bitmask of active urbs */
unsigned long unlink_mask; /* bitmask of unlinked urbs */ unsigned long unlink_mask; /* bitmask of unlinked urbs */
char *syncbuf; /* sync buffer for all sync URBs */ char *syncbuf; /* sync buffer for all sync URBs */
...@@ -187,6 +188,7 @@ struct snd_usb_substream { ...@@ -187,6 +188,7 @@ struct snd_usb_substream {
} dsd_dop; } dsd_dop;
bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */ bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */
bool early_playback_start; /* early start needed for playback? */
struct media_ctl *media_ctl; struct media_ctl *media_ctl;
}; };
......
...@@ -1126,6 +1126,10 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep) ...@@ -1126,6 +1126,10 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep)
INIT_LIST_HEAD(&u->ready_list); INIT_LIST_HEAD(&u->ready_list);
} }
/* total buffer bytes of all URBs plus the next queue;
* referred in pcm.c
*/
ep->nominal_queue_size = maxsize * urb_packs * (ep->nurbs + 1);
return 0; return 0;
out_of_memory: out_of_memory:
...@@ -1287,6 +1291,11 @@ int snd_usb_endpoint_configure(struct snd_usb_audio *chip, ...@@ -1287,6 +1291,11 @@ int snd_usb_endpoint_configure(struct snd_usb_audio *chip,
* to be set up before parameter setups * to be set up before parameter setups
*/ */
iface_first = ep->cur_audiofmt->protocol == UAC_VERSION_1; iface_first = ep->cur_audiofmt->protocol == UAC_VERSION_1;
/* Workaround for Sony WALKMAN NW-A45 DAC;
* it requires the interface setup at first like UAC1
*/
if (chip->usb_id == USB_ID(0x054c, 0x0b8c))
iface_first = true;
if (iface_first) { if (iface_first) {
err = endpoint_set_interface(chip, ep, true); err = endpoint_set_interface(chip, ep, true);
if (err < 0) if (err < 0)
......
...@@ -614,6 +614,14 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) ...@@ -614,6 +614,14 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
subs->period_elapsed_pending = 0; subs->period_elapsed_pending = 0;
runtime->delay = 0; runtime->delay = 0;
/* check whether early start is needed for playback stream */
subs->early_playback_start =
subs->direction == SNDRV_PCM_STREAM_PLAYBACK &&
subs->data_endpoint->nominal_queue_size >= subs->buffer_bytes;
if (subs->early_playback_start)
ret = start_endpoints(subs);
unlock: unlock:
snd_usb_unlock_shutdown(chip); snd_usb_unlock_shutdown(chip);
return ret; return ret;
...@@ -1394,7 +1402,7 @@ static void prepare_playback_urb(struct snd_usb_substream *subs, ...@@ -1394,7 +1402,7 @@ static void prepare_playback_urb(struct snd_usb_substream *subs,
subs->trigger_tstamp_pending_update = false; subs->trigger_tstamp_pending_update = false;
} }
if (period_elapsed && !subs->running) { if (period_elapsed && !subs->running && !subs->early_playback_start) {
subs->period_elapsed_pending = 1; subs->period_elapsed_pending = 1;
period_elapsed = 0; period_elapsed = 0;
} }
...@@ -1448,7 +1456,8 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea ...@@ -1448,7 +1456,8 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
prepare_playback_urb, prepare_playback_urb,
retire_playback_urb, retire_playback_urb,
subs); subs);
if (cmd == SNDRV_PCM_TRIGGER_START) { if (!subs->early_playback_start &&
cmd == SNDRV_PCM_TRIGGER_START) {
err = start_endpoints(subs); err = start_endpoints(subs);
if (err < 0) { if (err < 0) {
snd_usb_endpoint_set_callback(subs->data_endpoint, snd_usb_endpoint_set_callback(subs->data_endpoint,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment