Merge 6.1.52 into android14-6.1-lts

Changes in 6.1.52
	erofs: ensure that the post-EOF tails are all zeroed
	ksmbd: fix wrong DataOffset validation of create context
	ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
	ksmbd: replace one-element array with flex-array member in struct smb2_ea_info
	ksmbd: reduce descriptor size if remaining bytes is less than request size
	ARM: pxa: remove use of symbol_get()
	mmc: au1xmmc: force non-modular build and remove symbol_get usage
	net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
	rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
	modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
	USB: serial: option: add Quectel EM05G variant (0x030e)
	USB: serial: option: add FOXCONN T99W368/T99W373 product
	ALSA: usb-audio: Fix init call orders for UAC1
	usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
	usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0
	HID: wacom: remove the battery when the EKR is off
	staging: rtl8712: fix race condition
	Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
	wifi: mt76: mt7921: do not support one stream on secondary antenna only
	wifi: mt76: mt7921: fix skb leak by txs missing in AMSDU
	serial: qcom-geni: fix opp vote on shutdown
	serial: sc16is7xx: fix broken port 0 uart init
	serial: sc16is7xx: fix bug when first setting GPIO direction
	firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
	fsi: master-ast-cf: Add MODULE_FIRMWARE macro
	tcpm: Avoid soft reset when partner does not support get_status
	dt-bindings: sc16is7xx: Add property to change GPIO function
	nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
	nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
	usb: typec: tcpci: clear the fault status bit
	pinctrl: amd: Don't show `Invalid config param` errors
	Linux 6.1.52

Change-Id: Ib4c22b576e21092107915e5212b713174028c68d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-09-07 10:55:28 +00:00
commit 7454138ade
42 changed files with 208 additions and 88 deletions

View File

@ -23,6 +23,9 @@ Optional properties:
1 = active low. 1 = active low.
- irda-mode-ports: An array that lists the indices of the port that - irda-mode-ports: An array that lists the indices of the port that
should operate in IrDA mode. should operate in IrDA mode.
- nxp,modem-control-line-ports: An array that lists the indices of the port that
should have shared GPIO lines configured as
modem control lines.
Example: Example:
sc16is750: sc16is750@51 { sc16is750: sc16is750@51 {
@ -35,6 +38,26 @@ Example:
#gpio-cells = <2>; #gpio-cells = <2>;
}; };
sc16is752: sc16is752@53 {
compatible = "nxp,sc16is752";
reg = <0x53>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
gpio-controller; /* Port 0 as GPIOs */
#gpio-cells = <2>;
};
sc16is752: sc16is752@54 {
compatible = "nxp,sc16is752";
reg = <0x54>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
};
* spi as bus * spi as bus
Required properties: Required properties:
@ -59,6 +82,9 @@ Optional properties:
1 = active low. 1 = active low.
- irda-mode-ports: An array that lists the indices of the port that - irda-mode-ports: An array that lists the indices of the port that
should operate in IrDA mode. should operate in IrDA mode.
- nxp,modem-control-line-ports: An array that lists the indices of the port that
should have shared GPIO lines configured as
modem control lines.
Example: Example:
sc16is750: sc16is750@0 { sc16is750: sc16is750@0 {
@ -70,3 +96,23 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
}; };
sc16is752: sc16is752@1 {
compatible = "nxp,sc16is752";
reg = <1>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
gpio-controller; /* Port 0 as GPIOs */
#gpio-cells = <2>;
};
sc16is752: sc16is752@2 {
compatible = "nxp,sc16is752";
reg = <2>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
};

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 6 VERSION = 6
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 51 SUBLEVEL = 52
EXTRAVERSION = EXTRAVERSION =
NAME = Curry Ramen NAME = Curry Ramen

View File

@ -220,8 +220,6 @@ void sharpsl_battery_kick(void)
{ {
schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125)); schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125));
} }
EXPORT_SYMBOL(sharpsl_battery_kick);
static void sharpsl_battery_thread(struct work_struct *private_) static void sharpsl_battery_thread(struct work_struct *private_)
{ {

View File

@ -9,7 +9,6 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> /* symbol_get ; symbol_put */
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
@ -510,17 +509,6 @@ static struct ads7846_platform_data spitz_ads7846_info = {
.wait_for_sync = spitz_ads7846_wait_for_hsync, .wait_for_sync = spitz_ads7846_wait_for_hsync,
}; };
static void spitz_bl_kick_battery(void)
{
void (*kick_batt)(void);
kick_batt = symbol_get(sharpsl_battery_kick);
if (kick_batt) {
kick_batt();
symbol_put(sharpsl_battery_kick);
}
}
static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {
.dev_id = "spi2.1", .dev_id = "spi2.1",
.table = { .table = {
@ -548,7 +536,7 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
.max_intensity = 0x2f, .max_intensity = 0x2f,
.default_intensity = 0x1f, .default_intensity = 0x1f,
.limit_mask = 0x0b, .limit_mask = 0x0b,
.kick_battery = spitz_bl_kick_battery, .kick_battery = sharpsl_battery_kick,
}; };
static struct spi_board_info spitz_spi_devices[] = { static struct spi_board_info spitz_spi_devices[] = {

View File

@ -14,7 +14,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
@ -167,12 +166,7 @@ static struct platform_device db1x00_audio_dev = {
static irqreturn_t db1100_mmc_cd(int irq, void *ptr) static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
{ {
void (*mmc_cd)(struct mmc_host *, unsigned long); mmc_detect_change(ptr, msecs_to_jiffies(500));
/* link against CONFIG_MMC=m */
mmc_cd = symbol_get(mmc_detect_change);
mmc_cd(ptr, msecs_to_jiffies(500));
symbol_put(mmc_detect_change);
return IRQ_HANDLED; return IRQ_HANDLED;
} }

View File

@ -10,7 +10,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/leds.h> #include <linux/leds.h>
@ -340,14 +339,7 @@ static irqreturn_t db1200_mmc_cd(int irq, void *ptr)
static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr) static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr)
{ {
void (*mmc_cd)(struct mmc_host *, unsigned long); mmc_detect_change(ptr, msecs_to_jiffies(200));
/* link against CONFIG_MMC=m */
mmc_cd = symbol_get(mmc_detect_change);
if (mmc_cd) {
mmc_cd(ptr, msecs_to_jiffies(200));
symbol_put(mmc_detect_change);
}
msleep(100); /* debounce */ msleep(100); /* debounce */
if (irq == DB1200_SD0_INSERT_INT) if (irq == DB1200_SD0_INSERT_INT)
@ -431,14 +423,7 @@ static irqreturn_t pb1200_mmc1_cd(int irq, void *ptr)
static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr) static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr)
{ {
void (*mmc_cd)(struct mmc_host *, unsigned long); mmc_detect_change(ptr, msecs_to_jiffies(200));
/* link against CONFIG_MMC=m */
mmc_cd = symbol_get(mmc_detect_change);
if (mmc_cd) {
mmc_cd(ptr, msecs_to_jiffies(200));
symbol_put(mmc_detect_change);
}
msleep(100); /* debounce */ msleep(100); /* debounce */
if (irq == PB1200_SD1_INSERT_INT) if (irq == PB1200_SD1_INSERT_INT)

View File

@ -17,7 +17,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/module.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/platnand.h> #include <linux/mtd/platnand.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
@ -459,14 +458,7 @@ static irqreturn_t db1300_mmc_cd(int irq, void *ptr)
static irqreturn_t db1300_mmc_cdfn(int irq, void *ptr) static irqreturn_t db1300_mmc_cdfn(int irq, void *ptr)
{ {
void (*mmc_cd)(struct mmc_host *, unsigned long); mmc_detect_change(ptr, msecs_to_jiffies(200));
/* link against CONFIG_MMC=m. We can only be called once MMC core has
* initialized the controller, so symbol_get() should always succeed.
*/
mmc_cd = symbol_get(mmc_detect_change);
mmc_cd(ptr, msecs_to_jiffies(200));
symbol_put(mmc_detect_change);
msleep(100); /* debounce */ msleep(100); /* debounce */
if (irq == DB1300_SD1_INSERT_INT) if (irq == DB1300_SD1_INSERT_INT)

View File

@ -357,6 +357,7 @@ static void btsdio_remove(struct sdio_func *func)
if (!data) if (!data)
return; return;
cancel_work_sync(&data->work);
hdev = data->hdev; hdev = data->hdev;
sdio_set_drvdata(func, NULL); sdio_set_drvdata(func, NULL);

View File

@ -756,7 +756,7 @@ svc_create_memory_pool(struct platform_device *pdev,
paddr = begin; paddr = begin;
size = end - begin; size = end - begin;
va = devm_memremap(dev, paddr, size, MEMREMAP_WC); va = devm_memremap(dev, paddr, size, MEMREMAP_WC);
if (!va) { if (IS_ERR(va)) {
dev_err(dev, "fail to remap shared memory\n"); dev_err(dev, "fail to remap shared memory\n");
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }

View File

@ -1441,3 +1441,4 @@ static struct platform_driver fsi_master_acf = {
module_platform_driver(fsi_master_acf); module_platform_driver(fsi_master_acf);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_FIRMWARE(FW_FILE_NAME);

View File

@ -150,6 +150,7 @@ struct wacom_remote {
struct input_dev *input; struct input_dev *input;
bool registered; bool registered;
struct wacom_battery battery; struct wacom_battery battery;
ktime_t active_time;
} remotes[WACOM_MAX_REMOTES]; } remotes[WACOM_MAX_REMOTES];
}; };

View File

@ -2527,6 +2527,18 @@ static void wacom_wireless_work(struct work_struct *work)
return; return;
} }
static void wacom_remote_destroy_battery(struct wacom *wacom, int index)
{
struct wacom_remote *remote = wacom->remote;
if (remote->remotes[index].battery.battery) {
devres_release_group(&wacom->hdev->dev,
&remote->remotes[index].battery.bat_desc);
remote->remotes[index].battery.battery = NULL;
remote->remotes[index].active_time = 0;
}
}
static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index) static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
{ {
struct wacom_remote *remote = wacom->remote; struct wacom_remote *remote = wacom->remote;
@ -2541,9 +2553,7 @@ static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
remote->remotes[i].registered = false; remote->remotes[i].registered = false;
spin_unlock_irqrestore(&remote->remote_lock, flags); spin_unlock_irqrestore(&remote->remote_lock, flags);
if (remote->remotes[i].battery.battery) wacom_remote_destroy_battery(wacom, i);
devres_release_group(&wacom->hdev->dev,
&remote->remotes[i].battery.bat_desc);
if (remote->remotes[i].group.name) if (remote->remotes[i].group.name)
devres_release_group(&wacom->hdev->dev, devres_release_group(&wacom->hdev->dev,
@ -2551,7 +2561,6 @@ static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
remote->remotes[i].serial = 0; remote->remotes[i].serial = 0;
remote->remotes[i].group.name = NULL; remote->remotes[i].group.name = NULL;
remote->remotes[i].battery.battery = NULL;
wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN; wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN;
} }
} }
@ -2636,6 +2645,9 @@ static int wacom_remote_attach_battery(struct wacom *wacom, int index)
if (remote->remotes[index].battery.battery) if (remote->remotes[index].battery.battery)
return 0; return 0;
if (!remote->remotes[index].active_time)
return 0;
if (wacom->led.groups[index].select == WACOM_STATUS_UNKNOWN) if (wacom->led.groups[index].select == WACOM_STATUS_UNKNOWN)
return 0; return 0;
@ -2651,6 +2663,7 @@ static void wacom_remote_work(struct work_struct *work)
{ {
struct wacom *wacom = container_of(work, struct wacom, remote_work); struct wacom *wacom = container_of(work, struct wacom, remote_work);
struct wacom_remote *remote = wacom->remote; struct wacom_remote *remote = wacom->remote;
ktime_t kt = ktime_get();
struct wacom_remote_data data; struct wacom_remote_data data;
unsigned long flags; unsigned long flags;
unsigned int count; unsigned int count;
@ -2677,6 +2690,10 @@ static void wacom_remote_work(struct work_struct *work)
serial = data.remote[i].serial; serial = data.remote[i].serial;
if (data.remote[i].connected) { if (data.remote[i].connected) {
if (kt - remote->remotes[i].active_time > WACOM_REMOTE_BATTERY_TIMEOUT
&& remote->remotes[i].active_time != 0)
wacom_remote_destroy_battery(wacom, i);
if (remote->remotes[i].serial == serial) { if (remote->remotes[i].serial == serial) {
wacom_remote_attach_battery(wacom, i); wacom_remote_attach_battery(wacom, i);
continue; continue;

View File

@ -1129,6 +1129,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len)
if (index < 0 || !remote->remotes[index].registered) if (index < 0 || !remote->remotes[index].registered)
goto out; goto out;
remote->remotes[i].active_time = ktime_get();
input = remote->remotes[index].input; input = remote->remotes[index].input;
input_report_key(input, BTN_0, (data[9] & 0x01)); input_report_key(input, BTN_0, (data[9] & 0x01));

View File

@ -13,6 +13,7 @@
#define WACOM_NAME_MAX 64 #define WACOM_NAME_MAX 64
#define WACOM_MAX_REMOTES 5 #define WACOM_MAX_REMOTES 5
#define WACOM_STATUS_UNKNOWN 255 #define WACOM_STATUS_UNKNOWN 255
#define WACOM_REMOTE_BATTERY_TIMEOUT 21000000000ll
/* packet length for individual models */ /* packet length for individual models */
#define WACOM_PKGLEN_BBFUN 9 #define WACOM_PKGLEN_BBFUN 9

View File

@ -528,11 +528,12 @@ config MMC_ALCOR
of Alcor Micro PCI-E card reader of Alcor Micro PCI-E card reader
config MMC_AU1X config MMC_AU1X
tristate "Alchemy AU1XX0 MMC Card Interface support" bool "Alchemy AU1XX0 MMC Card Interface support"
depends on MIPS_ALCHEMY depends on MIPS_ALCHEMY
depends on MMC=y
help help
This selects the AMD Alchemy(R) Multimedia card interface. This selects the AMD Alchemy(R) Multimedia card interface.
If you have a Alchemy platform with a MMC slot, say Y or M here. If you have a Alchemy platform with a MMC slot, say Y here.
If unsure, say N. If unsure, say N.

View File

@ -8,7 +8,7 @@
#include "enetc.h" #include "enetc.h"
int enetc_phc_index = -1; int enetc_phc_index = -1;
EXPORT_SYMBOL(enetc_phc_index); EXPORT_SYMBOL_GPL(enetc_phc_index);
static struct ptp_clock_info enetc_ptp_caps = { static struct ptp_clock_info enetc_ptp_caps = {
.owner = THIS_MODULE, .owner = THIS_MODULE,

View File

@ -465,6 +465,7 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
BSS_CHANGED_BEACON_ENABLED)); BSS_CHANGED_BEACON_ENABLED));
bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP | bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |
BSS_CHANGED_FILS_DISCOVERY)); BSS_CHANGED_FILS_DISCOVERY));
bool amsdu_en = wcid->amsdu;
if (vif) { if (vif) {
struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv; struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
@ -524,12 +525,14 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
txwi[4] = 0; txwi[4] = 0;
val = FIELD_PREP(MT_TXD5_PID, pid); val = FIELD_PREP(MT_TXD5_PID, pid);
if (pid >= MT_PACKET_ID_FIRST) if (pid >= MT_PACKET_ID_FIRST) {
val |= MT_TXD5_TX_STATUS_HOST; val |= MT_TXD5_TX_STATUS_HOST;
amsdu_en = amsdu_en && !is_mt7921(dev);
}
txwi[5] = cpu_to_le32(val); txwi[5] = cpu_to_le32(val);
txwi[6] = 0; txwi[6] = 0;
txwi[7] = wcid->amsdu ? cpu_to_le32(MT_TXD7_HW_AMSDU) : 0; txwi[7] = amsdu_en ? cpu_to_le32(MT_TXD7_HW_AMSDU) : 0;
if (is_8023) if (is_8023)
mt76_connac2_mac_write_txwi_8023(txwi, skb, wcid); mt76_connac2_mac_write_txwi_8023(txwi, skb, wcid);

View File

@ -1280,7 +1280,7 @@ mt7921_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
return -EINVAL; return -EINVAL;
if ((BIT(hweight8(tx_ant)) - 1) != tx_ant) if ((BIT(hweight8(tx_ant)) - 1) != tx_ant)
tx_ant = BIT(ffs(tx_ant) - 1) - 1; return -EINVAL;
mt7921_mutex_acquire(dev); mt7921_mutex_acquire(dev);

View File

@ -748,7 +748,7 @@ static int amd_pinconf_get(struct pinctrl_dev *pctldev,
break; break;
default: default:
dev_err(&gpio_dev->pdev->dev, "Invalid config param %04x\n", dev_dbg(&gpio_dev->pdev->dev, "Invalid config param %04x\n",
param); param);
return -ENOTSUPP; return -ENOTSUPP;
} }
@ -798,7 +798,7 @@ static int amd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
break; break;
default: default:
dev_err(&gpio_dev->pdev->dev, dev_dbg(&gpio_dev->pdev->dev,
"Invalid config param %04x\n", param); "Invalid config param %04x\n", param);
ret = -ENOTSUPP; ret = -ENOTSUPP;
} }

View File

@ -1434,7 +1434,7 @@ ds1685_rtc_poweroff(struct platform_device *pdev)
unreachable(); unreachable();
} }
} }
EXPORT_SYMBOL(ds1685_rtc_poweroff); EXPORT_SYMBOL_GPL(ds1685_rtc_poweroff);
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */

View File

@ -323,6 +323,7 @@ int r8712_init_drv_sw(struct _adapter *padapter)
mp871xinit(padapter); mp871xinit(padapter);
init_default_value(padapter); init_default_value(padapter);
r8712_InitSwLeds(padapter); r8712_InitSwLeds(padapter);
mutex_init(&padapter->mutex_start);
return ret; return ret;
} }

View File

@ -567,7 +567,6 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
if (rtl871x_load_fw(padapter)) if (rtl871x_load_fw(padapter))
goto deinit_drv_sw; goto deinit_drv_sw;
init_completion(&padapter->rx_filter_ready); init_completion(&padapter->rx_filter_ready);
mutex_init(&padapter->mutex_start);
return 0; return 0;
deinit_drv_sw: deinit_drv_sw:

View File

@ -129,6 +129,7 @@ struct qcom_geni_serial_port {
u32 tx_fifo_width; u32 tx_fifo_width;
u32 rx_fifo_depth; u32 rx_fifo_depth;
bool setup; bool setup;
unsigned long clk_rate;
int (*handle_rx)(struct uart_port *uport, u32 bytes, bool drop); int (*handle_rx)(struct uart_port *uport, u32 bytes, bool drop);
unsigned int baud; unsigned int baud;
void *rx_fifo; void *rx_fifo;
@ -1062,6 +1063,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
baud * sampling_rate, clk_rate, clk_div); baud * sampling_rate, clk_rate, clk_div);
uport->uartclk = clk_rate; uport->uartclk = clk_rate;
port->clk_rate = clk_rate;
dev_pm_opp_set_rate(uport->dev, clk_rate); dev_pm_opp_set_rate(uport->dev, clk_rate);
ser_clk_cfg = SER_CLK_EN; ser_clk_cfg = SER_CLK_EN;
ser_clk_cfg |= clk_div << CLK_DIV_SHFT; ser_clk_cfg |= clk_div << CLK_DIV_SHFT;
@ -1331,10 +1333,13 @@ static void qcom_geni_serial_pm(struct uart_port *uport,
if (new_state == UART_PM_STATE_ON && old_state == UART_PM_STATE_OFF) { if (new_state == UART_PM_STATE_ON && old_state == UART_PM_STATE_OFF) {
geni_icc_enable(&port->se); geni_icc_enable(&port->se);
if (port->clk_rate)
dev_pm_opp_set_rate(uport->dev, port->clk_rate);
geni_se_resources_on(&port->se); geni_se_resources_on(&port->se);
} else if (new_state == UART_PM_STATE_OFF && } else if (new_state == UART_PM_STATE_OFF &&
old_state == UART_PM_STATE_ON) { old_state == UART_PM_STATE_ON) {
geni_se_resources_off(&port->se); geni_se_resources_off(&port->se);
dev_pm_opp_set_rate(uport->dev, 0);
geni_icc_disable(&port->se); geni_icc_disable(&port->se);
} }
} }

View File

@ -1345,9 +1345,18 @@ static int sc16is7xx_gpio_direction_output(struct gpio_chip *chip,
state |= BIT(offset); state |= BIT(offset);
else else
state &= ~BIT(offset); state &= ~BIT(offset);
sc16is7xx_port_write(port, SC16IS7XX_IOSTATE_REG, state);
/*
* If we write IOSTATE first, and then IODIR, the output value is not
* transferred to the corresponding I/O pin.
* The datasheet states that each register bit will be transferred to
* the corresponding I/O pin programmed as output when writing to
* IOSTATE. Therefore, configure direction first with IODIR, and then
* set value after with IOSTATE.
*/
sc16is7xx_port_update(port, SC16IS7XX_IODIR_REG, BIT(offset), sc16is7xx_port_update(port, SC16IS7XX_IODIR_REG, BIT(offset),
BIT(offset)); BIT(offset));
sc16is7xx_port_write(port, SC16IS7XX_IOSTATE_REG, state);
return 0; return 0;
} }
@ -1439,6 +1448,12 @@ static int sc16is7xx_probe(struct device *dev,
s->p[i].port.fifosize = SC16IS7XX_FIFO_SIZE; s->p[i].port.fifosize = SC16IS7XX_FIFO_SIZE;
s->p[i].port.flags = UPF_FIXED_TYPE | UPF_LOW_LATENCY; s->p[i].port.flags = UPF_FIXED_TYPE | UPF_LOW_LATENCY;
s->p[i].port.iobase = i; s->p[i].port.iobase = i;
/*
* Use all ones as membase to make sure uart_configure_port() in
* serial_core.c does not abort for SPI/I2C devices where the
* membase address is not applicable.
*/
s->p[i].port.membase = (void __iomem *)~0;
s->p[i].port.iotype = UPIO_PORT; s->p[i].port.iotype = UPIO_PORT;
s->p[i].port.uartclk = freq; s->p[i].port.uartclk = freq;
s->p[i].port.rs485_config = sc16is7xx_config_rs485; s->p[i].port.rs485_config = sc16is7xx_config_rs485;

View File

@ -175,10 +175,12 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev)
if (of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI) if (of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI)
data->ulpi = 1; data->ulpi = 1;
of_property_read_u32(np, "samsung,picophy-pre-emp-curr-control", if (of_property_read_u32(np, "samsung,picophy-pre-emp-curr-control",
&data->emp_curr_control); &data->emp_curr_control))
of_property_read_u32(np, "samsung,picophy-dc-vol-level-adjust", data->emp_curr_control = -1;
&data->dc_vol_level_adjust); if (of_property_read_u32(np, "samsung,picophy-dc-vol-level-adjust",
&data->dc_vol_level_adjust))
data->dc_vol_level_adjust = -1;
return data; return data;
} }

View File

@ -657,13 +657,15 @@ static int usbmisc_imx7d_init(struct imx_usbmisc_data *data)
usbmisc->base + MX7D_USBNC_USB_CTRL2); usbmisc->base + MX7D_USBNC_USB_CTRL2);
/* PHY tuning for signal quality */ /* PHY tuning for signal quality */
reg = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG1); reg = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG1);
if (data->emp_curr_control && data->emp_curr_control <= if (data->emp_curr_control >= 0 &&
data->emp_curr_control <=
(TXPREEMPAMPTUNE0_MASK >> TXPREEMPAMPTUNE0_BIT)) { (TXPREEMPAMPTUNE0_MASK >> TXPREEMPAMPTUNE0_BIT)) {
reg &= ~TXPREEMPAMPTUNE0_MASK; reg &= ~TXPREEMPAMPTUNE0_MASK;
reg |= (data->emp_curr_control << TXPREEMPAMPTUNE0_BIT); reg |= (data->emp_curr_control << TXPREEMPAMPTUNE0_BIT);
} }
if (data->dc_vol_level_adjust && data->dc_vol_level_adjust <= if (data->dc_vol_level_adjust >= 0 &&
data->dc_vol_level_adjust <=
(TXVREFTUNE0_MASK >> TXVREFTUNE0_BIT)) { (TXVREFTUNE0_MASK >> TXVREFTUNE0_BIT)) {
reg &= ~TXVREFTUNE0_MASK; reg &= ~TXVREFTUNE0_MASK;
reg |= (data->dc_vol_level_adjust << TXVREFTUNE0_BIT); reg |= (data->dc_vol_level_adjust << TXVREFTUNE0_BIT);

View File

@ -938,6 +938,12 @@ static int __maybe_unused dwc3_meson_g12a_resume(struct device *dev)
return ret; return ret;
} }
if (priv->drvdata->usb_post_init) {
ret = priv->drvdata->usb_post_init(priv);
if (ret)
return ret;
}
return 0; return 0;
} }

View File

@ -259,6 +259,7 @@ static void option_instat_callback(struct urb *urb);
#define QUECTEL_PRODUCT_EM05G 0x030a #define QUECTEL_PRODUCT_EM05G 0x030a
#define QUECTEL_PRODUCT_EM060K 0x030b #define QUECTEL_PRODUCT_EM060K 0x030b
#define QUECTEL_PRODUCT_EM05G_CS 0x030c #define QUECTEL_PRODUCT_EM05G_CS 0x030c
#define QUECTEL_PRODUCT_EM05GV2 0x030e
#define QUECTEL_PRODUCT_EM05CN_SG 0x0310 #define QUECTEL_PRODUCT_EM05CN_SG 0x0310
#define QUECTEL_PRODUCT_EM05G_SG 0x0311 #define QUECTEL_PRODUCT_EM05G_SG 0x0311
#define QUECTEL_PRODUCT_EM05CN 0x0312 #define QUECTEL_PRODUCT_EM05CN 0x0312
@ -1190,6 +1191,8 @@ static const struct usb_device_id option_ids[] = {
.driver_info = RSVD(6) | ZLP }, .driver_info = RSVD(6) | ZLP },
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_GR, 0xff), { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_GR, 0xff),
.driver_info = RSVD(6) | ZLP }, .driver_info = RSVD(6) | ZLP },
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05GV2, 0xff),
.driver_info = RSVD(4) | ZLP },
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_CS, 0xff), { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_CS, 0xff),
.driver_info = RSVD(6) | ZLP }, .driver_info = RSVD(6) | ZLP },
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_RS, 0xff), { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_RS, 0xff),
@ -2232,6 +2235,10 @@ static const struct usb_device_id option_ids[] = {
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */
.driver_info = RSVD(3) }, .driver_info = RSVD(3) },
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0ee, 0xff), /* Foxconn T99W368 MBIM */
.driver_info = RSVD(3) },
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0f0, 0xff), /* Foxconn T99W373 MBIM */
.driver_info = RSVD(3) },
{ USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
.driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, .driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
{ USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */

View File

@ -609,6 +609,10 @@ static int tcpci_init(struct tcpc_dev *tcpc)
if (time_after(jiffies, timeout)) if (time_after(jiffies, timeout))
return -ETIMEDOUT; return -ETIMEDOUT;
ret = tcpci_write16(tcpci, TCPC_FAULT_STATUS, TCPC_FAULT_STATUS_ALL_REG_RST_TO_DEFAULT);
if (ret < 0)
return ret;
/* Handle vendor init */ /* Handle vendor init */
if (tcpci->data->init) { if (tcpci->data->init) {
ret = tcpci->data->init(tcpci, tcpci->data); ret = tcpci->data->init(tcpci, tcpci->data);

View File

@ -2762,6 +2762,13 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
port->sink_cap_done = true; port->sink_cap_done = true;
tcpm_set_state(port, ready_state(port), 0); tcpm_set_state(port, ready_state(port), 0);
break; break;
/*
* Some port partners do not support GET_STATUS, avoid soft reset the link to
* prevent redundant power re-negotiation
*/
case GET_STATUS_SEND:
tcpm_set_state(port, ready_state(port), 0);
break;
case SRC_READY: case SRC_READY:
case SNK_READY: case SNK_READY:
if (port->vdm_state > VDM_STATE_READY) { if (port->vdm_state > VDM_STATE_READY) {

View File

@ -996,6 +996,8 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
cur = end - min_t(erofs_off_t, offset + end - map->m_la, end); cur = end - min_t(erofs_off_t, offset + end - map->m_la, end);
if (!(map->m_flags & EROFS_MAP_MAPPED)) { if (!(map->m_flags & EROFS_MAP_MAPPED)) {
zero_user_segment(page, cur, end); zero_user_segment(page, cur, end);
++spiltted;
tight = false;
goto next_part; goto next_part;
} }
if (map->m_flags & EROFS_MAP_FRAGMENT) { if (map->m_flags & EROFS_MAP_FRAGMENT) {

View File

@ -205,7 +205,8 @@ static int nilfs_palloc_get_block(struct inode *inode, unsigned long blkoff,
int ret; int ret;
spin_lock(lock); spin_lock(lock);
if (prev->bh && blkoff == prev->blkoff) { if (prev->bh && blkoff == prev->blkoff &&
likely(buffer_uptodate(prev->bh))) {
get_bh(prev->bh); get_bh(prev->bh);
*bhp = prev->bh; *bhp = prev->bh;
spin_unlock(lock); spin_unlock(lock);

View File

@ -1025,7 +1025,7 @@ int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh)
int err; int err;
spin_lock(&nilfs->ns_inode_lock); spin_lock(&nilfs->ns_inode_lock);
if (ii->i_bh == NULL) { if (ii->i_bh == NULL || unlikely(!buffer_uptodate(ii->i_bh))) {
spin_unlock(&nilfs->ns_inode_lock); spin_unlock(&nilfs->ns_inode_lock);
err = nilfs_ifile_get_inode_block(ii->i_root->ifile, err = nilfs_ifile_get_inode_block(ii->i_root->ifile,
inode->i_ino, pbh); inode->i_ino, pbh);
@ -1034,7 +1034,10 @@ int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh)
spin_lock(&nilfs->ns_inode_lock); spin_lock(&nilfs->ns_inode_lock);
if (ii->i_bh == NULL) if (ii->i_bh == NULL)
ii->i_bh = *pbh; ii->i_bh = *pbh;
else { else if (unlikely(!buffer_uptodate(ii->i_bh))) {
__brelse(ii->i_bh);
ii->i_bh = *pbh;
} else {
brelse(*pbh); brelse(*pbh);
*pbh = ii->i_bh; *pbh = ii->i_bh;
} }

View File

@ -725,6 +725,11 @@ static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode,
struct page *page = pvec.pages[i]; struct page *page = pvec.pages[i];
lock_page(page); lock_page(page);
if (unlikely(page->mapping != mapping)) {
/* Exclude pages removed from the address space */
unlock_page(page);
continue;
}
if (!page_has_buffers(page)) if (!page_has_buffers(page))
create_empty_buffers(page, i_blocksize(inode), 0); create_empty_buffers(page, i_blocksize(inode), 0);
unlock_page(page); unlock_page(page);

View File

@ -355,6 +355,9 @@ int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob,
if (blob_len < (u64)sess_key_off + sess_key_len) if (blob_len < (u64)sess_key_off + sess_key_len)
return -EINVAL; return -EINVAL;
if (sess_key_len > CIFS_KEY_SIZE)
return -EINVAL;
ctx_arc4 = kmalloc(sizeof(*ctx_arc4), GFP_KERNEL); ctx_arc4 = kmalloc(sizeof(*ctx_arc4), GFP_KERNEL);
if (!ctx_arc4) if (!ctx_arc4)
return -ENOMEM; return -ENOMEM;

View File

@ -1492,7 +1492,7 @@ struct create_context *smb2_find_context_vals(void *open_req, const char *tag, i
name_len < 4 || name_len < 4 ||
name_off + name_len > cc_len || name_off + name_len > cc_len ||
(value_off & 0x7) != 0 || (value_off & 0x7) != 0 ||
(value_off && (value_off < name_off + name_len)) || (value_len && value_off < name_off + (name_len < 8 ? 8 : name_len)) ||
((u64)value_off + value_len > cc_len)) ((u64)value_off + value_len > cc_len))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);

View File

@ -4322,7 +4322,7 @@ static int smb2_get_ea(struct ksmbd_work *work, struct ksmbd_file *fp,
if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
name_len -= XATTR_USER_PREFIX_LEN; name_len -= XATTR_USER_PREFIX_LEN;
ptr = (char *)(&eainfo->name + name_len + 1); ptr = eainfo->name + name_len + 1;
buf_free_len -= (offsetof(struct smb2_ea_info, name) + buf_free_len -= (offsetof(struct smb2_ea_info, name) +
name_len + 1); name_len + 1);
/* bailout if xattr can't fit in buf_free_len */ /* bailout if xattr can't fit in buf_free_len */

View File

@ -410,7 +410,7 @@ struct smb2_ea_info {
__u8 Flags; __u8 Flags;
__u8 EaNameLength; __u8 EaNameLength;
__le16 EaValueLength; __le16 EaValueLength;
char name[1]; char name[];
/* optionally followed by value */ /* optionally followed by value */
} __packed; /* level 15 Query */ } __packed; /* level 15 Query */

View File

@ -1366,24 +1366,35 @@ static int smb_direct_rdma_xmit(struct smb_direct_transport *t,
LIST_HEAD(msg_list); LIST_HEAD(msg_list);
char *desc_buf; char *desc_buf;
int credits_needed; int credits_needed;
unsigned int desc_buf_len; unsigned int desc_buf_len, desc_num = 0;
size_t total_length = 0;
if (t->status != SMB_DIRECT_CS_CONNECTED) if (t->status != SMB_DIRECT_CS_CONNECTED)
return -ENOTCONN; return -ENOTCONN;
if (buf_len > t->max_rdma_rw_size)
return -EINVAL;
/* calculate needed credits */ /* calculate needed credits */
credits_needed = 0; credits_needed = 0;
desc_buf = buf; desc_buf = buf;
for (i = 0; i < desc_len / sizeof(*desc); i++) { for (i = 0; i < desc_len / sizeof(*desc); i++) {
if (!buf_len)
break;
desc_buf_len = le32_to_cpu(desc[i].length); desc_buf_len = le32_to_cpu(desc[i].length);
if (!desc_buf_len)
return -EINVAL;
if (desc_buf_len > buf_len) {
desc_buf_len = buf_len;
desc[i].length = cpu_to_le32(desc_buf_len);
buf_len = 0;
}
credits_needed += calc_rw_credits(t, desc_buf, desc_buf_len); credits_needed += calc_rw_credits(t, desc_buf, desc_buf_len);
desc_buf += desc_buf_len; desc_buf += desc_buf_len;
total_length += desc_buf_len; buf_len -= desc_buf_len;
if (desc_buf_len == 0 || total_length > buf_len || desc_num++;
total_length > t->max_rdma_rw_size)
return -EINVAL;
} }
ksmbd_debug(RDMA, "RDMA %s, len %#x, needed credits %#x\n", ksmbd_debug(RDMA, "RDMA %s, len %#x, needed credits %#x\n",
@ -1395,7 +1406,7 @@ static int smb_direct_rdma_xmit(struct smb_direct_transport *t,
/* build rdma_rw_ctx for each descriptor */ /* build rdma_rw_ctx for each descriptor */
desc_buf = buf; desc_buf = buf;
for (i = 0; i < desc_len / sizeof(*desc); i++) { for (i = 0; i < desc_num; i++) {
msg = kzalloc(offsetof(struct smb_direct_rdma_rw_msg, sg_list) + msg = kzalloc(offsetof(struct smb_direct_rdma_rw_msg, sg_list) +
sizeof(struct scatterlist) * SG_CHUNK_SIZE, GFP_KERNEL); sizeof(struct scatterlist) * SG_CHUNK_SIZE, GFP_KERNEL);
if (!msg) { if (!msg) {

View File

@ -103,6 +103,7 @@
#define TCPC_POWER_STATUS_SINKING_VBUS BIT(0) #define TCPC_POWER_STATUS_SINKING_VBUS BIT(0)
#define TCPC_FAULT_STATUS 0x1f #define TCPC_FAULT_STATUS 0x1f
#define TCPC_FAULT_STATUS_ALL_REG_RST_TO_DEFAULT BIT(7)
#define TCPC_ALERT_EXTENDED 0x21 #define TCPC_ALERT_EXTENDED 0x21

View File

@ -1236,12 +1236,20 @@ void *__symbol_get(const char *symbol)
}; };
preempt_disable(); preempt_disable();
if (!find_symbol(&fsa) || strong_try_module_get(fsa.owner)) { if (!find_symbol(&fsa))
preempt_enable(); goto fail;
return NULL; if (fsa.license != GPL_ONLY) {
pr_warn("failing symbol_get of non-GPLONLY symbol %s.\n",
symbol);
goto fail;
} }
if (strong_try_module_get(fsa.owner))
goto fail;
preempt_enable(); preempt_enable();
return (void *)kernel_symbol_value(fsa.sym); return (void *)kernel_symbol_value(fsa.sym);
fail:
preempt_enable();
return NULL;
} }
EXPORT_SYMBOL_GPL(__symbol_get); EXPORT_SYMBOL_GPL(__symbol_get);

View File

@ -1093,6 +1093,7 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
int i, altno, err, stream; int i, altno, err, stream;
struct audioformat *fp = NULL; struct audioformat *fp = NULL;
struct snd_usb_power_domain *pd = NULL; struct snd_usb_power_domain *pd = NULL;
bool set_iface_first;
int num, protocol; int num, protocol;
dev = chip->dev; dev = chip->dev;
@ -1223,11 +1224,19 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
return err; return err;
} }
set_iface_first = false;
if (protocol == UAC_VERSION_1 ||
(chip->quirk_flags & QUIRK_FLAG_SET_IFACE_FIRST))
set_iface_first = true;
/* try to set the interface... */ /* try to set the interface... */
usb_set_interface(chip->dev, iface_no, 0); usb_set_interface(chip->dev, iface_no, 0);
if (set_iface_first)
usb_set_interface(chip->dev, iface_no, altno);
snd_usb_init_pitch(chip, fp); snd_usb_init_pitch(chip, fp);
snd_usb_init_sample_rate(chip, fp, fp->rate_max); snd_usb_init_sample_rate(chip, fp, fp->rate_max);
usb_set_interface(chip->dev, iface_no, altno); if (!set_iface_first)
usb_set_interface(chip->dev, iface_no, altno);
if (protocol > UAC_VERSION_1) if (protocol > UAC_VERSION_1)
snd_vendor_set_interface(chip->dev, alts, iface_no, 0); snd_vendor_set_interface(chip->dev, alts, iface_no, 0);
} }