From: Greg Kroah-Hartman Date: Sat, 2 Sep 2023 08:44:26 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v6.5.2~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8599dcb80317c04d0accf0eeeed82c8705023810;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: arm-pxa-remove-use-of-symbol_get.patch hid-wacom-remove-the-battery-when-the-ekr-is-off.patch mmc-au1xmmc-force-non-modular-build-and-remove-symbol_get-usage.patch modules-only-allow-symbol_get-of-export_symbol_gpl-modules.patch rtc-ds1685-use-export_symbol_gpl-for-ds1685_rtc_poweroff.patch usb-serial-option-add-foxconn-t99w368-t99w373-product.patch usb-serial-option-add-quectel-em05g-variant-0x030e.patch --- diff --git a/queue-4.19/arm-pxa-remove-use-of-symbol_get.patch b/queue-4.19/arm-pxa-remove-use-of-symbol_get.patch new file mode 100644 index 00000000000..0b67467df93 --- /dev/null +++ b/queue-4.19/arm-pxa-remove-use-of-symbol_get.patch @@ -0,0 +1,73 @@ +From 0faa29c4207e6e29cfc81b427df60e326c37083a Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Tue, 1 Aug 2023 19:35:40 +0200 +Subject: ARM: pxa: remove use of symbol_get() + +From: Arnd Bergmann + +commit 0faa29c4207e6e29cfc81b427df60e326c37083a upstream. + +The spitz board file uses the obscure symbol_get() function +to optionally call a function from sharpsl_pm.c if that is +built. However, the two files are always built together +these days, and have been for a long time, so this can +be changed to a normal function call. + +Link: https://lore.kernel.org/lkml/20230731162639.GA9441@lst.de/ +Signed-off-by: Arnd Bergmann +Signed-off-by: Christoph Hellwig +Signed-off-by: Luis Chamberlain +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/mach-pxa/sharpsl_pm.c | 2 -- + arch/arm/mach-pxa/spitz.c | 14 +------------- + 2 files changed, 1 insertion(+), 15 deletions(-) + +--- a/arch/arm/mach-pxa/sharpsl_pm.c ++++ b/arch/arm/mach-pxa/sharpsl_pm.c +@@ -224,8 +224,6 @@ void sharpsl_battery_kick(void) + { + schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125)); + } +-EXPORT_SYMBOL(sharpsl_battery_kick); +- + + static void sharpsl_battery_thread(struct work_struct *private_) + { +--- a/arch/arm/mach-pxa/spitz.c ++++ b/arch/arm/mach-pxa/spitz.c +@@ -13,7 +13,6 @@ + */ + + #include +-#include /* symbol_get ; symbol_put */ + #include + #include + #include +@@ -517,17 +516,6 @@ static struct pxa2xx_spi_chip spitz_ads7 + .gpio_cs = SPITZ_GPIO_ADS7846_CS, + }; + +-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 corgi_lcd_platform_data spitz_lcdcon_info = { + .init_mode = CORGI_LCD_MODE_VGA, + .max_intensity = 0x2f, +@@ -535,7 +523,7 @@ static struct corgi_lcd_platform_data sp + .limit_mask = 0x0b, + .gpio_backlight_cont = SPITZ_GPIO_BACKLIGHT_CONT, + .gpio_backlight_on = SPITZ_GPIO_BACKLIGHT_ON, +- .kick_battery = spitz_bl_kick_battery, ++ .kick_battery = sharpsl_battery_kick, + }; + + static struct pxa2xx_spi_chip spitz_lcdcon_chip = { diff --git a/queue-4.19/hid-wacom-remove-the-battery-when-the-ekr-is-off.patch b/queue-4.19/hid-wacom-remove-the-battery-when-the-ekr-is-off.patch new file mode 100644 index 00000000000..12c93e9dfe3 --- /dev/null +++ b/queue-4.19/hid-wacom-remove-the-battery-when-the-ekr-is-off.patch @@ -0,0 +1,130 @@ +From 9ac6678b95b0dd9458a7a6869f46e51cd55a1d84 Mon Sep 17 00:00:00 2001 +From: Aaron Armstrong Skomra +Date: Tue, 25 Jul 2023 15:20:25 -0700 +Subject: HID: wacom: remove the battery when the EKR is off + +From: Aaron Armstrong Skomra + +commit 9ac6678b95b0dd9458a7a6869f46e51cd55a1d84 upstream. + +Currently the EKR battery remains even after we stop getting information +from the device. This can lead to a stale battery persisting indefinitely +in userspace. + +The remote sends a heartbeat every 10 seconds. Delete the battery if we +miss two heartbeats (after 21 seconds). Restore the battery once we see +a heartbeat again. + +Signed-off-by: Aaron Skomra +Signed-off-by: Aaron Armstrong Skomra +Reviewed-by: Jason Gerecke +Fixes: 9f1015d45f62 ("HID: wacom: EKR: attach the power_supply on first connection") +CC: stable@vger.kernel.org +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/wacom.h | 1 + + drivers/hid/wacom_sys.c | 25 +++++++++++++++++++++---- + drivers/hid/wacom_wac.c | 1 + + drivers/hid/wacom_wac.h | 1 + + 4 files changed, 24 insertions(+), 4 deletions(-) + +--- a/drivers/hid/wacom.h ++++ b/drivers/hid/wacom.h +@@ -156,6 +156,7 @@ struct wacom_remote { + struct input_dev *input; + bool registered; + struct wacom_battery battery; ++ ktime_t active_time; + } remotes[WACOM_MAX_REMOTES]; + }; + +--- a/drivers/hid/wacom_sys.c ++++ b/drivers/hid/wacom_sys.c +@@ -2500,6 +2500,18 @@ fail: + 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) + { + struct wacom_remote *remote = wacom->remote; +@@ -2514,9 +2526,7 @@ static void wacom_remote_destroy_one(str + remote->remotes[i].registered = false; + spin_unlock_irqrestore(&remote->remote_lock, flags); + +- if (remote->remotes[i].battery.battery) +- devres_release_group(&wacom->hdev->dev, +- &remote->remotes[i].battery.bat_desc); ++ wacom_remote_destroy_battery(wacom, i); + + if (remote->remotes[i].group.name) + devres_release_group(&wacom->hdev->dev, +@@ -2524,7 +2534,6 @@ static void wacom_remote_destroy_one(str + + remote->remotes[i].serial = 0; + remote->remotes[i].group.name = NULL; +- remote->remotes[i].battery.battery = NULL; + wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN; + } + } +@@ -2609,6 +2618,9 @@ static int wacom_remote_attach_battery(s + if (remote->remotes[index].battery.battery) + return 0; + ++ if (!remote->remotes[index].active_time) ++ return 0; ++ + if (wacom->led.groups[index].select == WACOM_STATUS_UNKNOWN) + return 0; + +@@ -2624,6 +2636,7 @@ static void wacom_remote_work(struct wor + { + struct wacom *wacom = container_of(work, struct wacom, remote_work); + struct wacom_remote *remote = wacom->remote; ++ ktime_t kt = ktime_get(); + struct wacom_remote_data data; + unsigned long flags; + unsigned int count; +@@ -2650,6 +2663,10 @@ static void wacom_remote_work(struct wor + serial = data.remote[i].serial; + 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) { + wacom_remote_attach_battery(wacom, i); + continue; +--- a/drivers/hid/wacom_wac.c ++++ b/drivers/hid/wacom_wac.c +@@ -1077,6 +1077,7 @@ static int wacom_remote_irq(struct wacom + if (index < 0 || !remote->remotes[index].registered) + goto out; + ++ remote->remotes[i].active_time = ktime_get(); + input = remote->remotes[index].input; + + input_report_key(input, BTN_0, (data[9] & 0x01)); +--- a/drivers/hid/wacom_wac.h ++++ b/drivers/hid/wacom_wac.h +@@ -19,6 +19,7 @@ + #define WACOM_NAME_MAX 64 + #define WACOM_MAX_REMOTES 5 + #define WACOM_STATUS_UNKNOWN 255 ++#define WACOM_REMOTE_BATTERY_TIMEOUT 21000000000ll + + /* packet length for individual models */ + #define WACOM_PKGLEN_BBFUN 9 diff --git a/queue-4.19/mmc-au1xmmc-force-non-modular-build-and-remove-symbol_get-usage.patch b/queue-4.19/mmc-au1xmmc-force-non-modular-build-and-remove-symbol_get-usage.patch new file mode 100644 index 00000000000..dff76e88cce --- /dev/null +++ b/queue-4.19/mmc-au1xmmc-force-non-modular-build-and-remove-symbol_get-usage.patch @@ -0,0 +1,139 @@ +From d4a5c59a955bba96b273ec1a5885bada24c56979 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Tue, 1 Aug 2023 19:35:41 +0200 +Subject: mmc: au1xmmc: force non-modular build and remove symbol_get usage + +From: Christoph Hellwig + +commit d4a5c59a955bba96b273ec1a5885bada24c56979 upstream. + +au1xmmc is split somewhat awkwardly into the main mmc subsystem driver, +and callbacks in platform_data that sit under arch/mips/ and are +always built in. The latter than call mmc_detect_change through +symbol_get. Remove the use of symbol_get by requiring the driver +to be built in. In the future the interrupt handlers for card +insert/eject detection should probably be moved into the main driver, +and which point it can be built modular again. + +Signed-off-by: Christoph Hellwig +Acked-by: Manuel Lauss +Reviewed-by: Arnd Bergmann +[mcgrof: squashed in depends on MMC=y suggested by Arnd] +Signed-off-by: Luis Chamberlain +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/alchemy/devboards/db1000.c | 8 +------- + arch/mips/alchemy/devboards/db1200.c | 19 ++----------------- + arch/mips/alchemy/devboards/db1300.c | 10 +--------- + drivers/mmc/host/Kconfig | 5 +++-- + 4 files changed, 7 insertions(+), 35 deletions(-) + +--- a/arch/mips/alchemy/devboards/db1000.c ++++ b/arch/mips/alchemy/devboards/db1000.c +@@ -27,7 +27,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -176,12 +175,7 @@ static struct platform_device db1x00_aud + + static irqreturn_t db1100_mmc_cd(int irq, void *ptr) + { +- void (*mmc_cd)(struct mmc_host *, unsigned long); +- /* link against CONFIG_MMC=m */ +- mmc_cd = symbol_get(mmc_detect_change); +- mmc_cd(ptr, msecs_to_jiffies(500)); +- symbol_put(mmc_detect_change); +- ++ mmc_detect_change(ptr, msecs_to_jiffies(500)); + return IRQ_HANDLED; + } + +--- a/arch/mips/alchemy/devboards/db1200.c ++++ b/arch/mips/alchemy/devboards/db1200.c +@@ -23,7 +23,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -355,14 +354,7 @@ static irqreturn_t db1200_mmc_cd(int irq + + static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr) + { +- void (*mmc_cd)(struct mmc_host *, unsigned long); +- +- /* 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); +- } ++ mmc_detect_change(ptr, msecs_to_jiffies(200)); + + msleep(100); /* debounce */ + if (irq == DB1200_SD0_INSERT_INT) +@@ -446,14 +438,7 @@ static irqreturn_t pb1200_mmc1_cd(int ir + + static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr) + { +- void (*mmc_cd)(struct mmc_host *, unsigned long); +- +- /* 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); +- } ++ mmc_detect_change(ptr, msecs_to_jiffies(200)); + + msleep(100); /* debounce */ + if (irq == PB1200_SD1_INSERT_INT) +--- a/arch/mips/alchemy/devboards/db1300.c ++++ b/arch/mips/alchemy/devboards/db1300.c +@@ -17,7 +17,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -457,14 +456,7 @@ static irqreturn_t db1300_mmc_cd(int irq + + static irqreturn_t db1300_mmc_cdfn(int irq, void *ptr) + { +- void (*mmc_cd)(struct mmc_host *, unsigned long); +- +- /* 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); ++ mmc_detect_change(ptr, msecs_to_jiffies(200)); + + msleep(100); /* debounce */ + if (irq == DB1300_SD1_INSERT_INT) +--- a/drivers/mmc/host/Kconfig ++++ b/drivers/mmc/host/Kconfig +@@ -431,11 +431,12 @@ config MMC_WBSD + If unsure, say N. + + config MMC_AU1X +- tristate "Alchemy AU1XX0 MMC Card Interface support" ++ bool "Alchemy AU1XX0 MMC Card Interface support" + depends on MIPS_ALCHEMY ++ depends on MMC=y + help + 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. + diff --git a/queue-4.19/modules-only-allow-symbol_get-of-export_symbol_gpl-modules.patch b/queue-4.19/modules-only-allow-symbol_get-of-export_symbol_gpl-modules.patch new file mode 100644 index 00000000000..bbd88e9f324 --- /dev/null +++ b/queue-4.19/modules-only-allow-symbol_get-of-export_symbol_gpl-modules.patch @@ -0,0 +1,63 @@ +From 9011e49d54dcc7653ebb8a1e05b5badb5ecfa9f9 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Tue, 1 Aug 2023 19:35:44 +0200 +Subject: modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules + +From: Christoph Hellwig + +commit 9011e49d54dcc7653ebb8a1e05b5badb5ecfa9f9 upstream. + +It has recently come to my attention that nvidia is circumventing the +protection added in 262e6ae7081d ("modules: inherit +TAINT_PROPRIETARY_MODULE") by importing exports from their proprietary +modules into an allegedly GPL licensed module and then rexporting them. + +Given that symbol_get was only ever intended for tightly cooperating +modules using very internal symbols it is logical to restrict it to +being used on EXPORT_SYMBOL_GPL and prevent nvidia from costly DMCA +Circumvention of Access Controls law suites. + +All symbols except for four used through symbol_get were already exported +as EXPORT_SYMBOL_GPL, and the remaining four ones were switched over in +the preparation patches. + +Fixes: 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE") +Signed-off-by: Christoph Hellwig +Reviewed-by: Greg Kroah-Hartman +Signed-off-by: Luis Chamberlain +Signed-off-by: Greg Kroah-Hartman +--- + kernel/module.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +--- a/kernel/module.c ++++ b/kernel/module.c +@@ -2261,15 +2261,26 @@ static void free_module(struct module *m + void *__symbol_get(const char *symbol) + { + struct module *owner; ++ enum mod_license license; + const struct kernel_symbol *sym; + + preempt_disable(); +- sym = find_symbol(symbol, &owner, NULL, NULL, true, true); +- if (sym && strong_try_module_get(owner)) ++ sym = find_symbol(symbol, &owner, NULL, &license, true, true); ++ if (!sym) ++ goto fail; ++ if (license != GPL_ONLY) { ++ pr_warn("failing symbol_get of non-GPLONLY symbol %s.\n", ++ symbol); ++ goto fail; ++ } ++ if (strong_try_module_get(owner)) + sym = NULL; + preempt_enable(); + + return sym ? (void *)kernel_symbol_value(sym) : NULL; ++fail: ++ preempt_enable(); ++ return NULL; + } + EXPORT_SYMBOL_GPL(__symbol_get); + diff --git a/queue-4.19/rtc-ds1685-use-export_symbol_gpl-for-ds1685_rtc_poweroff.patch b/queue-4.19/rtc-ds1685-use-export_symbol_gpl-for-ds1685_rtc_poweroff.patch new file mode 100644 index 00000000000..25be04a98f6 --- /dev/null +++ b/queue-4.19/rtc-ds1685-use-export_symbol_gpl-for-ds1685_rtc_poweroff.patch @@ -0,0 +1,34 @@ +From 95e7ebc6823170256a8ce19fad87912805bfa001 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Tue, 1 Aug 2023 19:35:43 +0200 +Subject: rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff + +From: Christoph Hellwig + +commit 95e7ebc6823170256a8ce19fad87912805bfa001 upstream. + +ds1685_rtc_poweroff is only used externally via symbol_get, which was +only ever intended for very internal symbols like this one. Use +EXPORT_SYMBOL_GPL for it so that symbol_get can enforce only being used +on EXPORT_SYMBOL_GPL symbols. + +Signed-off-by: Christoph Hellwig +Acked-by: Joshua Kinard +Reviewed-by: Greg Kroah-Hartman +Signed-off-by: Luis Chamberlain +Signed-off-by: Greg Kroah-Hartman +--- + drivers/rtc/rtc-ds1685.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/rtc/rtc-ds1685.c ++++ b/drivers/rtc/rtc-ds1685.c +@@ -1630,7 +1630,7 @@ ds1685_rtc_poweroff(struct platform_devi + unreachable(); + } + } +-EXPORT_SYMBOL(ds1685_rtc_poweroff); ++EXPORT_SYMBOL_GPL(ds1685_rtc_poweroff); + /* ----------------------------------------------------------------------- */ + + diff --git a/queue-4.19/series b/queue-4.19/series index 855aaa0a040..8642bf1c2e7 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -1 +1,8 @@ erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch +arm-pxa-remove-use-of-symbol_get.patch +mmc-au1xmmc-force-non-modular-build-and-remove-symbol_get-usage.patch +rtc-ds1685-use-export_symbol_gpl-for-ds1685_rtc_poweroff.patch +modules-only-allow-symbol_get-of-export_symbol_gpl-modules.patch +usb-serial-option-add-quectel-em05g-variant-0x030e.patch +usb-serial-option-add-foxconn-t99w368-t99w373-product.patch +hid-wacom-remove-the-battery-when-the-ekr-is-off.patch diff --git a/queue-4.19/usb-serial-option-add-foxconn-t99w368-t99w373-product.patch b/queue-4.19/usb-serial-option-add-foxconn-t99w368-t99w373-product.patch new file mode 100644 index 00000000000..863a93fb15e --- /dev/null +++ b/queue-4.19/usb-serial-option-add-foxconn-t99w368-t99w373-product.patch @@ -0,0 +1,66 @@ +From 4d9488b294e1f8353bbcadc4c7172a7f7490199b Mon Sep 17 00:00:00 2001 +From: Slark Xiao +Date: Wed, 23 Aug 2023 15:57:51 +0800 +Subject: USB: serial: option: add FOXCONN T99W368/T99W373 product + +From: Slark Xiao + +commit 4d9488b294e1f8353bbcadc4c7172a7f7490199b upstream. + +The difference of T99W368 and T99W373 is the chip solution. +T99W368 is designed based on Qualcomm SDX65 and T99W373 is SDX62. + +Test evidence as below: +T: Bus=01 Lev=02 Prnt=05 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=0489 ProdID=e0f0 Rev=05.04 +S: Manufacturer=FII +S: Product=OLYMPIC USB WWAN Adapter +S: SerialNumber=78ada8c4 +C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA +I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim +I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +I: If#=0x3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) +I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option + +T: Bus=01 Lev=02 Prnt=05 Port=00 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=0489 ProdID=e0ee Rev=05.04 +S: Manufacturer=FII +S: Product=OLYMPIC USB WWAN Adapter +S: SerialNumber=78ada8d5 +C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA +I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim +I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +I: If#=0x3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) +I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option + +Both of them share the same port configuration: +0&1: MBIM, 2: Modem, 3:GNSS, 4:NMEA, 5:Diag +GNSS port don't use serial driver. + +Signed-off-by: Slark Xiao +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -2235,6 +2235,10 @@ static const struct usb_device_id option + .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ + .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) */ + .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, + { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ diff --git a/queue-4.19/usb-serial-option-add-quectel-em05g-variant-0x030e.patch b/queue-4.19/usb-serial-option-add-quectel-em05g-variant-0x030e.patch new file mode 100644 index 00000000000..f2b9dc4d121 --- /dev/null +++ b/queue-4.19/usb-serial-option-add-quectel-em05g-variant-0x030e.patch @@ -0,0 +1,65 @@ +From 873854c02364ebb991fc06f7148c14dfb5419e1b Mon Sep 17 00:00:00 2001 +From: Martin Kohn +Date: Thu, 27 Jul 2023 22:23:00 +0000 +Subject: USB: serial: option: add Quectel EM05G variant (0x030e) + +From: Martin Kohn + +commit 873854c02364ebb991fc06f7148c14dfb5419e1b upstream. + +Add Quectel EM05G with product ID 0x030e. +Interface 4 is used for qmi. + +T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=2c7c ProdID=030e Rev= 3.18 +S: Manufacturer=Quectel +S: Product=Quectel EM05-G +C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA +I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan +E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +Signed-off-by: Martin Kohn +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -259,6 +259,7 @@ static void option_instat_callback(struc + #define QUECTEL_PRODUCT_EM05G 0x030a + #define QUECTEL_PRODUCT_EM060K 0x030b + #define QUECTEL_PRODUCT_EM05G_CS 0x030c ++#define QUECTEL_PRODUCT_EM05GV2 0x030e + #define QUECTEL_PRODUCT_EM05CN_SG 0x0310 + #define QUECTEL_PRODUCT_EM05G_SG 0x0311 + #define QUECTEL_PRODUCT_EM05CN 0x0312 +@@ -1190,6 +1191,8 @@ static const struct usb_device_id option + .driver_info = RSVD(6) | ZLP }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_GR, 0xff), + .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), + .driver_info = RSVD(6) | ZLP }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_RS, 0xff),