Linux 6.12.22
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.22 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 drivers/counter/microchip-tcb-capture.c | 19 ++ drivers/counter/stm32-lptimer-cnt.c | 24 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 -- drivers/hid/hid-plantronics.c | 144 ++++++++++------------ drivers/memstick/host/rtsx_usb_ms.c | 1 drivers/net/usb/qmi_wwan.c | 2 drivers/net/usb/usbnet.c | 21 ++- drivers/tty/serial/8250/8250_dma.c | 2 drivers/tty/serial/8250/8250_pci.c | 46 +++++++ drivers/tty/serial/fsl_lpuart.c | 17 ++ drivers/tty/serial/stm32-usart.c | 4 drivers/usb/host/xhci-ring.c | 4 drivers/usb/host/xhci.h | 13 + fs/bcachefs/fs-ioctl.c | 6 fs/nfsd/nfs4recover.c | 1 net/atm/mpc.c | 2 net/ipv6/netfilter/nf_socket_ipv6.c | 23 +++ sound/pci/hda/patch_realtek.c | 1 sound/usb/mixer_quirks.c | 51 +++++++ tools/perf/Documentation/intel-hybrid.txt | 12 - tools/perf/Documentation/perf-list.txt | 2 tools/perf/arch/x86/util/iostat.c | 2 tools/perf/builtin-stat.c | 2 tools/perf/util/mem-events.c | 2 tools/perf/util/pmu.c | 4 26 files changed, 297 insertions(+), 126 deletions(-)
Cameron Williams (2):
tty: serial: 8250: Add some more device IDs
tty: serial: 8250: Add Brainboxes XC devices
Cheick Traore (1):
serial: stm32: do not deassert RS485 RTS GPIO prematurely
Dhruv Deshpande (1):
ALSA: hda/realtek: Support mute LED on HP Laptop 15s-du3xxx
Dominique Martinet (1):
net: usb: usbnet: restore usb%d name exception for local mac addresses
Fabio Porcedda (2):
net: usb: qmi_wwan: add Telit Cinterion FN990B composition
net: usb: qmi_wwan: add Telit Cinterion FE990B composition
Fabrice Gasnier (1):
counter: stm32-lptimer-cnt: fix error handling when enabling
Greg Kroah-Hartman (2):
perf tools: Fix up some comments and code to properly use the event_source bus Linux 6.12.22
John Keeping (1):
serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Kent Overstreet (1):
bcachefs: bch2_ioctl_subvolume_destroy() fixes
Luo Qiu (1):
memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove
Maxim Mikityanskiy (1):
netfilter: socket: Lookup orig tuple for IPv6 SNAT
Michal Pecio (2):
usb: xhci: Don't skip on Stopped - Length Invalid
usb: xhci: Apply the link chain quirk on NEC isoc endpoints
Minjoong Kim (1):
atm: Fix NULL pointer dereference
Scott Mayhew (1):
nfsd: fix legacy client tracking initialization
Sherry Sun (1):
tty: serial: fsl_lpuart: disable transmitter before changing RS485 related registers
Terry Junge (2):
ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
HID: hid-plantronics: Add mic mute mapping and generalize quirks
Wayne Lin (1):
drm/amd/display: Don't write DP_MSTM_CTRL after LT
William Breathitt Gray (1):
counter: microchip-tcb-capture: Fix undefined counter channel state on probe
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 21 +SUBLEVEL = 22 EXTRAVERSION = NAME = Baby Opossum Posse
drivers/counter/microchip-tcb-capture.c +19 -0
@@ -368,6 +368,25 @@ static int mchp_tc_probe(struct platform_device *pdev) channel); } +/* Disable Quadrature Decoder and position measure */ + ret =regmap_update_bits (regmap,ATMEL_TC_BMR ,ATMEL_TC_QDEN |ATMEL_TC_POSEN ,0 ); +if (ret) +return ret; + +/* Setup the period capture mode */ + ret =regmap_update_bits (regmap,ATMEL_TC_REG (priv->channel[0 ],CMR ), +ATMEL_TC_WAVE |ATMEL_TC_ABETRG |ATMEL_TC_CMR_MASK | +ATMEL_TC_TCCLKS , +ATMEL_TC_CMR_MASK ); +if (ret) +return ret; + +/* Enable clock and trigger counter */ + ret =regmap_write (regmap,ATMEL_TC_REG (priv->channel[0 ],CCR ), +ATMEL_TC_CLKEN |ATMEL_TC_SWTRG ); +if (ret) +return ret; + priv->tc_cfg = tcb_config; priv->regmap = regmap; counter->name =dev_name (&pdev->dev);
drivers/counter/stm32-lptimer-cnt.c +15 -9
@@ -58,37 +58,43 @@ static int stm32_lptim_set_enable_state(struct stm32_lptim_cnt *priv,return 0 ; } + ret =clk_enable (priv->clk); +if (ret) + goto disable_cnt; +/* LP timer must be enabled before writing CMP & ARR */ ret =regmap_write (priv->regmap,STM32_LPTIM_ARR , priv->ceiling);if (ret) -return ret; + goto disable_clk; ret =regmap_write (priv->regmap,STM32_LPTIM_CMP ,0 );if (ret) -return ret; + goto disable_clk;/* ensure CMP & ARR registers are properly written */ ret =regmap_read_poll_timeout (priv->regmap,STM32_LPTIM_ISR , val, (val &STM32_LPTIM_CMPOK_ARROK ) ==STM32_LPTIM_CMPOK_ARROK ,100 ,1000 );if (ret) -return ret; + goto disable_clk; ret =regmap_write (priv->regmap,STM32_LPTIM_ICR ,STM32_LPTIM_CMPOKCF_ARROKCF );if (ret) -return ret; + goto disable_clk; - ret =clk_enable (priv->clk); -if (ret) { -regmap_write (priv->regmap,STM32_LPTIM_CR ,0 ); -return ret; - } priv->enabled = true;/* Start LP timer in continuous mode */ return regmap_update_bits (priv->regmap,STM32_LPTIM_CR ,STM32_LPTIM_CNTSTRT ,STM32_LPTIM_CNTSTRT ); + +disable_clk: +clk_disable (priv->clk); +disable_cnt: +regmap_write (priv->regmap,STM32_LPTIM_CR ,0 ); + +return ret; }static int stm32_lptim_setup (struct stm32_lptim_cnt *priv,int enable)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -12
@@ -3231,8 +3231,7 @@ static int dm_resume(void *handle)struct dm_atomic_state *dm_state =to_dm_atomic_state (dm->atomic_obj.state);enum dc_connection_type new_connection_type = dc_connection_none;struct dc_state *dc_state; -int i, r, j, ret; -bool need_hotplug = false; +int i, r, j;struct dc_commit_streams_params commit_params = {};if (dm->dc->caps.ips_support) {
@@ -3427,23 +3426,16 @@ static int dm_resume(void *handle) aconnector->mst_root)continue ; - ret =drm_dp_mst_topology_mgr_resume (&aconnector->mst_mgr, true); - -if (ret <0 ) { -dm_helpers_dp_mst_stop_top_mgr (aconnector->dc_link->ctx, - aconnector->dc_link); - need_hotplug = true; - } +drm_dp_mst_topology_queue_probe (&aconnector->mst_mgr); }drm_connector_list_iter_end (&iter); -if (need_hotplug) -drm_kms_helper_hotplug_event (ddev); -amdgpu_dm_irq_resume_late (adev);amdgpu_dm_smu_write_watermarks_table (adev); +drm_kms_helper_hotplug_event (ddev); +return 0 ; }
drivers/hid/hid-plantronics.c +67 -77
239 lines not on this page · raw message
drivers/memstick/host/rtsx_usb_ms.c +1 -0
@@ -813,6 +813,7 @@ static void rtsx_usb_ms_drv_remove(struct platform_device *pdev) host->eject = true;cancel_work_sync (&host->handle_req); +cancel_delayed_work_sync (&host->poll_card);mutex_lock (&host->host_mutex);if (host->req) {
drivers/net/usb/qmi_wwan.c +2 -0
@@ -1365,9 +1365,11 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x1bc7, 0x10a0, 0)}, /* Telit FN920C04 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10a4, 0)}, /* Telit FN920C04 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10a9, 0)}, /* Telit FN920C04 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x10b0, 0)}, /* Telit FE990B */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10c0, 0)}, /* Telit FE910C04 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10c4, 0)}, /* Telit FE910C04 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10c8, 0)}, /* Telit FE910C04 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x10d0, 0)}, /* Telit FN990B */ {QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */ {QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
drivers/net/usb/usbnet.c +15 -6
@@ -178,6 +178,17 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress) }EXPORT_SYMBOL_GPL (usbnet_get_ethernet_addr); +static bool usbnet_needs_usb_name_format (struct usbnet *dev,struct net_device *net) +{ +/* Point to point devices which don't have a real MAC address +* (or report a fake local one) have historically used the usb%d +* naming. Preserve this.. +*/ +return (dev->driver_info->flags &FLAG_POINTTOPOINT ) !=0 && + (is_zero_ether_addr (net->dev_addr) || +is_local_ether_addr (net->dev_addr)); +} +static void intr_complete (struct urb *urb) {struct usbnet *dev = urb->context;
@@ -1762,13 +1773,11 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)if (status <0 ) goto out1; -// heuristic: "usb%d" for links we know are two-host, -// else "eth%d" when there's reasonable doubt. userspace -// can rename the link if it knows better. +/* heuristic: rename to "eth%d" if we are not sure this link +* is two-host (these links keep "usb%d") +*/ if ((dev->driver_info->flags &FLAG_ETHER ) !=0 && - ((dev->driver_info->flags &FLAG_POINTTOPOINT ) ==0 || -/* somebody touched it*/ - !is_zero_ether_addr (net->dev_addr))) + !usbnet_needs_usb_name_format (dev, net))strscpy (net->name,"eth%d" ,sizeof (net->name));/* WLAN devices should always be named "wlan%d" */ if ((dev->driver_info->flags &FLAG_WLAN ) !=0 )
drivers/tty/serial/8250/8250_dma.c +1 -1
@@ -162,7 +162,7 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p)*/ dma->tx_size =0 ; -dmaengine_terminate_async (dma->rxchan); +dmaengine_terminate_async (dma->txchan); }int serial8250_rx_dma (struct uart_8250_port *p)
drivers/tty/serial/8250/8250_pci.c +46 -0
70 lines not on this page · raw message
drivers/tty/serial/fsl_lpuart.c +17 -0
@@ -1483,6 +1483,19 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termiounsigned long modem =lpuart32_read (&sport->port,UARTMODIR ) & ~(UARTMODIR_TXRTSPOL |UARTMODIR_TXRTSE ); +u32 ctrl; + +/* TXRTSE and TXRTSPOL only can be changed when transmitter is disabled. */ + ctrl =lpuart32_read (&sport->port,UARTCTRL ); +if (ctrl &UARTCTRL_TE ) { +/* wait for the transmit engine to complete */ +lpuart32_wait_bit_set (&sport->port,UARTSTAT ,UARTSTAT_TC ); +lpuart32_write (&sport->port, ctrl & ~UARTCTRL_TE ,UARTCTRL ); + +while (lpuart32_read (&sport->port,UARTCTRL ) &UARTCTRL_TE ) +cpu_relax (); + } +lpuart32_write (&sport->port, modem,UARTMODIR );if (rs485->flags &SER_RS485_ENABLED ) {
@@ -1502,6 +1515,10 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio }lpuart32_write (&sport->port, modem,UARTMODIR ); + +if (ctrl &UARTCTRL_TE ) +lpuart32_write (&sport->port, ctrl,UARTCTRL ); +return 0 ; }
drivers/tty/serial/stm32-usart.c +1 -3
@@ -965,10 +965,8 @@ static void stm32_usart_start_tx(struct uart_port *port) {struct tty_port *tport = &port->state->port; -if (kfifo_is_empty (&tport->xmit_fifo) && !port->x_char) { -stm32_usart_rs485_rts_disable (port); +if (kfifo_is_empty (&tport->xmit_fifo) && !port->x_char)return ; - }stm32_usart_rs485_rts_enable (port);
drivers/usb/host/xhci-ring.c +4 -0
@@ -2866,6 +2866,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,if (!ep_seg) {if (ep->skip &&usb_endpoint_xfer_isoc (&td->urb->ep->desc)) { +/* this event is unlikely to match any TD, don't skip them all */ +if (trb_comp_code ==COMP_STOPPED_LENGTH_INVALID ) +return 0 ; +skip_isoc_td (xhci, td, ep, status);if (!list_empty (&ep_ring->td_list))continue ;
drivers/usb/host/xhci.h +11 -2
@@ -1748,11 +1748,20 @@ static inline void xhci_write_64(struct xhci_hcd *xhci, } -/* Link TRB chain should always be set on 0.95 hosts, and AMD 0.96 ISOC rings */ +/* +* Reportedly, some chapters of v0.95 spec said that Link TRB always has its chain bit set. +* Other chapters and later specs say that it should only be set if the link is inside a TD +* which continues from the end of one segment to the next segment. +* +* Some 0.95 hardware was found to misbehave if any link TRB doesn't have the chain bit set. +* +* 0.96 hardware from AMD and NEC was found to ignore unchained isochronous link TRBs when +* "resynchronizing the pipe" after a Missed Service Error. +*/ static inline bool xhci_link_chain_quirk (struct xhci_hcd *xhci,enum xhci_ring_type type) {return (xhci->quirks &XHCI_LINK_TRB_QUIRK ) || - (type ==TYPE_ISOC && (xhci->quirks & XHCI_AMD_0x96_HOST)); + (type ==TYPE_ISOC && (xhci->quirks & (XHCI_AMD_0x96_HOST |XHCI_NEC_HOST ))); }/* xHCI debugging */
fs/bcachefs/fs-ioctl.c +4 -2
@@ -520,10 +520,12 @@ static long bch2_ioctl_subvolume_destroy(struct bch_fs *c, struct file *filp, ret = -ENOENT ; goto err; } - ret =__bch2_unlink (dir, victim, true); + + ret =inode_permission (file_mnt_idmap (filp),d_inode (victim),MAY_WRITE ) ?: +__bch2_unlink (dir, victim, true);if (!ret) {fsnotify_rmdir (dir, victim); -d_delete (victim); +d_invalidate (victim); } err:inode_unlock (dir);
fs/nfsd/nfs4recover.c +0 -1
@@ -2052,7 +2052,6 @@ static inline int check_for_legacy_methods(int status, struct net *net)path_put (&path);if (status)return -ENOTDIR ; - status = nn->client_tracking_ops->init (net); }return status; }
net/atm/mpc.c +2 -0
@@ -1314,6 +1314,8 @@ static void MPOA_cache_impos_rcvd(struct k_message *msg, holding_time = msg->content.eg_info.holding_time;dprintk ("(%s) entry = %p, holding_time = %u\n" , mpc->dev->name, entry, holding_time); +if (entry ==NULL && !holding_time) +return ;if (entry ==NULL && holding_time) { entry = mpc->eg_ops->add_entry (msg, mpc); mpc->eg_ops->put (entry);
net/ipv6/netfilter/nf_socket_ipv6.c +23 -0
@@ -103,6 +103,10 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,struct sk_buff *data_skb =NULL ;int doff =0 ;int thoff =0 , tproto; +#if IS_ENABLED (CONFIG_NF_CONNTRACK ) +enum ip_conntrack_info ctinfo; +struct nf_conn const *ct; +#endif tproto =ipv6_find_hdr (skb, &thoff,-1 ,NULL ,NULL );if (tproto <0 ) {
@@ -136,6 +140,25 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,return NULL ; } +#if IS_ENABLED (CONFIG_NF_CONNTRACK ) +/* Do the lookup with the original socket address in +* case this is a reply packet of an established +* SNAT-ted connection. +*/ + ct =nf_ct_get (skb, &ctinfo); +if (ct && + ((tproto !=IPPROTO_ICMPV6 && + ctinfo ==IP_CT_ESTABLISHED_REPLY ) || + (tproto ==IPPROTO_ICMPV6 && + ctinfo ==IP_CT_RELATED_REPLY )) && + (ct->status &IPS_SRC_NAT_DONE )) { + daddr = &ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.u3.in6; + dport = (tproto ==IPPROTO_TCP ) ? + ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.u.tcp.port : + ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.u.udp.port; + } +#endif +return nf_socket_get_sock_v6 (net, data_skb, doff, tproto, saddr, daddr, sport, dport, indev); }
sound/pci/hda/patch_realtek.c +1 -0
@@ -10441,6 +10441,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x8811 ,"HP Spectre x360 15-eb1xxx" ,ALC285_FIXUP_HP_SPECTRE_X360_EB1 ),SND_PCI_QUIRK (0x103c ,0x8812 ,"HP Spectre x360 15-eb1xxx" ,ALC285_FIXUP_HP_SPECTRE_X360_EB1 ),SND_PCI_QUIRK (0x103c ,0x881d ,"HP 250 G8 Notebook PC" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ), +SND_PCI_QUIRK (0x103c ,0x881e ,"HP Laptop 15s-du3xxx" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x8846 ,"HP EliteBook 850 G8 Notebook PC" ,ALC285_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8847 ,"HP EliteBook x360 830 G8 Notebook PC" ,ALC285_FIXUP_HP_GPIO_LED ), SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
sound/usb/mixer_quirks.c +51 -0
62 lines not on this page · raw message
tools/perf/Documentation/intel-hybrid.txt +6 -6
@@ -8,15 +8,15 @@ Part of events are available on core cpu, part of events are available on atom cpu and even part of events are available on both. Kernel exports two new cpu pmus via sysfs: -/sys/devices/cpu_core -/sys/devices/cpu_atom +/sys/bus/event_source/devices/cpu_core +/sys/bus/event_source/devices/cpu_atom The 'cpus' files are created under the directories. For example, -cat /sys/devices/cpu_core/cpus +cat /sys/bus/event_source/devices/cpu_core/cpus 0-15 -cat /sys/devices/cpu_atom/cpus +cat /sys/bus/event_source/devices/cpu_atom/cpus 16-23 It indicates cpu0-cpu15 are core cpus and cpu16-cpu23 are atom cpus.
@@ -60,8 +60,8 @@ can't carry pmu information. So now this type is extended to be PMU aware type. The PMU type ID is stored at attr.config[63:32]. PMU type ID is retrieved from sysfs. -/sys/devices/cpu_atom/type -/sys/devices/cpu_core/type +/sys/bus/event_source/devices/cpu_atom/type +/sys/bus/event_source/devices/cpu_core/type The new attr.config layout for PERF_TYPE_HARDWARE:
tools/perf/Documentation/perf-list.txt +1 -1
@@ -188,7 +188,7 @@ in the CPU vendor specific documentation. The available PMUs and their raw parameters can be listed with - ls /sys/devices/*/format + ls /sys/bus/event_source/devices/*/format For example the raw event "LSD.UOPS" core pmu event above could be specified as
tools/perf/arch/x86/util/iostat.c +1 -1
@@ -32,7 +32,7 @@#define MAX_PATH 1024#endif -#define UNCORE_IIO_PMU_PATH "devices/uncore_iio_%d" +#define UNCORE_IIO_PMU_PATH "bus/event_source/devices/uncore_iio_%d"#define SYSFS_UNCORE_PMU_PATH "%s/"UNCORE_IIO_PMU_PATH#define PLATFORM_MAPPING_PATH UNCORE_IIO_PMU_PATH"/die%d"
tools/perf/builtin-stat.c +1 -1
@@ -96,7 +96,7 @@#include <internal/threadmap.h> #define DEFAULT_SEPARATOR " " -#define FREEZE_ON_SMI_PATH "devices/cpu/freeze_on_smi" +#define FREEZE_ON_SMI_PATH "bus/event_source/devices/cpu/freeze_on_smi"static void print_counters (struct timespec *ts,int argc,const char **argv);
tools/perf/util/mem-events.c +1 -1
@@ -189,7 +189,7 @@ static bool perf_pmu__mem_events_supported(const char *mnt, struct perf_pmu *pmuif (!e->event_name)return true; -scnprintf (path,PATH_MAX ,"%s/devices/%s/events/%s" , mnt, pmu->name, e->event_name); +scnprintf (path,PATH_MAX ,"%s/bus/event_source/devices/%s/events/%s" , mnt, pmu->name, e->event_name);return !stat (path, &st); }
tools/perf/util/pmu.c +2 -2
@@ -33,12 +33,12 @@#define UNIT_MAX_LEN 31/* max length for event unit name */ enum event_source { -/* An event loaded from /sys/devices/<pmu>/events. */ +/* An event loaded from /sys/bus/event_source/devices/<pmu>/events. */ EVENT_SRC_SYSFS ,/* An event loaded from a CPUID matched json file. */ EVENT_SRC_CPU_JSON ,/* -* An event loaded from a /sys/devices/<pmu>/identifier matched json +* An event loaded from a /sys/bus/event_source/devices/<pmu>/identifier matched json * file. */ EVENT_SRC_SYS_JSON ,