[tip: perf/urgent] USB: serial: option: Add Telit FT980-KS composition
The following commit has been merged into the perf/urgent branch of tip: Commit-ID: da6f40842515774026d5bfad297491eb513c40cc Gitweb: https://git.kernel.org/tip/da6f40842515774026d5bfad297491eb513c40cc Author:Leonid Bloch AuthorDate:Sun, 04 Oct 2020 18:58:13 +03:00 Committer: Greg Kroah-Hartman CommitterDate: Sat, 17 Oct 2020 08:31:21 +02:00 USB: serial: option: Add Telit FT980-KS composition commit 924a9213358fb92fa3c3225d6d042aa058167405 upstream. This commit adds the following Telit FT980-KS composition: 0x1054: rndis, diag, adb, nmea, modem, modem, aux AT commands can be sent to /dev/ttyUSB2. Signed-off-by: Leonid Bloch Cc: sta...@vger.kernel.org Link: https://lore.kernel.org/r/ce86bc05-f4e2-b199-0cdc-792715e3f...@asocscloud.com Link: https://lore.kernel.org/r/20201004155813.2342-1-lb.work...@gmail.com Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index a65e620..2a3bfd6 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1187,6 +1187,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1053, 0xff),/* Telit FN980 (ECM) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1054, 0xff),/* Telit FT980-KS */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
Re: [PATCH] USB: serial: option: Add Telit FT980-KS composition
Lars, Thank you for your review! The changes which you have suggested also made ModemManager to recognize the device (which it didn't do before). Please check out the v2. Cheers, Leonid. ___ On 10/4/20 5:32 PM, Lars Melin wrote: On 10/4/2020 21:16, Lars Melin wrote: On 10/4/2020 20:29, Leonid Bloch wrote: On 10/4/20 1:58 PM, Lars Melin wrote: On 10/4/2020 16:57, Leonid Bloch wrote: This commit adds the following Telit FT980-KS composition: 0x1054: rndis, diag, adb, nmea, modem, modem, aux AT commands can be sent to /dev/ttyUSB5. Please submit a verbose lsusb listing for the device, I can't imagine that the adb interface should be handled by the option serial driver so there will never be a ttyUSB5. Please see below. Thanks, Leonid. ``` Bus 001 Device 005: ID 1bc7:1054 Telit Wireless Solutions Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.10 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1bc7 Telit Wireless Solutions idProduct 0x1054 bcdDevice 4.14 iManufacturer 1 Telit Wireless Solutions iProduct 2 FT980-KS iSerial 3 cb42f61 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x013d bNumInterfaces 8 bConfigurationValue 1 iConfiguration 4 RNDIS_DIAG_ADB_NMEA_DUN_DUN_SER bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 239 Miscellaneous Device bFunctionSubClass 4 bFunctionProtocol 1 iFunction 7 RNDIS Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 239 Miscellaneous Device bInterfaceSubClass 4 bInterfaceProtocol 1 iInterface 5 RNDIS Communications Control ** UNRECOGNIZED: 05 24 00 10 01 ** UNRECOGNIZED: 05 24 01 00 01 ** UNRECOGNIZED: 04 24 02 00 ** UNRECOGNIZED: 05 24 06 00 01 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 9 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 6 RNDIS Ethernet Data Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8e EP 14 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0f EP 15 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 48 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5
[PATCH v2] USB: serial: option: Add Telit FT980-KS composition
This commit adds the following Telit FT980-KS composition: 0x1054: rndis, diag, adb, nmea, modem, modem, aux AT commands can be sent to /dev/ttyUSB2. Signed-off-by: Leonid Bloch --- The full composition is not tested, and it is the default one according to Telit support. What is tested, is that this commit makes /dev/ttyUSB{0..4} appear upon connecting the FT980-KS, and allows sending AT commands to /dev/ttyUSB2. Changes since v1: * Interface #3 (ADB) is blacklisted. * NCTRL flag is set to the diag interface. These changes (relative to v1) also allow ModemManager to recognize the device. drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 0c6f160a214a..fe76710167f8 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1186,6 +1186,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1053, 0xff),/* Telit FN980 (ECM) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1054, 0xff),/* Telit FT980-KS */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), -- 2.28.0
Re: [PATCH] USB: serial: option: Add Telit FT980-KS composition
On 10/4/20 1:58 PM, Lars Melin wrote: On 10/4/2020 16:57, Leonid Bloch wrote: This commit adds the following Telit FT980-KS composition: 0x1054: rndis, diag, adb, nmea, modem, modem, aux AT commands can be sent to /dev/ttyUSB5. Please submit a verbose lsusb listing for the device, I can't imagine that the adb interface should be handled by the option serial driver so there will never be a ttyUSB5. Please see below. Thanks, Leonid. ``` Bus 001 Device 005: ID 1bc7:1054 Telit Wireless Solutions Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.10 bDeviceClass0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x1bc7 Telit Wireless Solutions idProduct 0x1054 bcdDevice4.14 iManufacturer 1 Telit Wireless Solutions iProduct2 FT980-KS iSerial 3 cb42f61 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x013d bNumInterfaces 8 bConfigurationValue 1 iConfiguration 4 RNDIS_DIAG_ADB_NMEA_DUN_DUN_SER bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Association: bLength 8 bDescriptorType11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass239 Miscellaneous Device bFunctionSubClass 4 bFunctionProtocol 1 iFunction 7 RNDIS Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 239 Miscellaneous Device bInterfaceSubClass 4 bInterfaceProtocol 1 iInterface 5 RNDIS Communications Control ** UNRECOGNIZED: 05 24 00 10 01 ** UNRECOGNIZED: 05 24 01 00 01 ** UNRECOGNIZED: 04 24 02 00 ** UNRECOGNIZED: 05 24 06 00 01 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 9 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 6 RNDIS Ethernet Data Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8e EP 14 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0f EP 15 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol 48 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class
[PATCH] USB: serial: option: Add Telit FT980-KS composition
This commit adds the following Telit FT980-KS composition: 0x1054: rndis, diag, adb, nmea, modem, modem, aux AT commands can be sent to /dev/ttyUSB5. Signed-off-by: Leonid Bloch --- The full composition is not tested, and it is the default one according to Telit support. What is tested, is that this commit makes /dev/ttyUSB{1..7} appear upon connection of the FT980-KS, and allows sending AT commands to /dev/ttyUSB5. drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 0c6f160a214a..e7a98435ac29 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -301,6 +301,7 @@ static void option_instat_callback(struct urb *urb); #define TELIT_PRODUCT_LE920A4_1212 0x1212 #define TELIT_PRODUCT_LE920A4_1213 0x1213 #define TELIT_PRODUCT_LE920A4_1214 0x1214 +#define TELIT_PRODUCT_FT980_KS 0x1054 /* ZTE PRODUCTS */ #define ZTE_VENDOR_ID 0x19d2 @@ -1164,6 +1165,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_FT980_KS) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1031, 0xff),/* Telit LE910C1-EUX */ .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff),/* Telit LE910C1-EUX (ECM) */ -- 2.28.0
Adding initramfs as an ELF section to bzImage
Hello, I am wondering if it is possible to add initramfs as an ELF section to the bzImage, and if so - how? I am aware that it is possible to compile-in an initramfs or to supply it as an external file. Both of these options don't fit my needs. The first one doesn't fit because it is very difficult to manipulate after compilation, and the second - because I need a single file. It looks like there should be no problem to append a section to the bzImage for loading into memory as initramfs, but I didn't find a way to do it yet. Regards, Leonid.
Adding initramfs as an ELF section to bzImage
Hello, I am wondering if it is possible to add initramfs as an ELF section to the bzImage, and if so - how? I am aware that it is possible to compile-in an initramfs or to supply it as an external file. Both of these options don't fit my needs. The first one doesn't fit because it is very difficult to manipulate after compilation, and the second - because I need a single file. It looks like there should be no problem to append a section to the bzImage for loading into memory as initramfs, but I didn't find a way to do it yet. Regards, Leonid.
[PATCH] gpio: it87: Add support for IT8613
This was tested on actual hardware and found to work fine, but currently the official specifications of this chip could not be obtained to confirm the numbers. Signed-off-by: Leonid Bloch --- drivers/gpio/Kconfig | 3 ++- drivers/gpio/gpio-it87.c | 9 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 71c0ab46f216..f1179599aa7e 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -684,7 +684,8 @@ config GPIO_IT87 Say yes here to support GPIO functionality of IT87xx Super I/O chips. This driver is tested with ITE IT8728 and IT8732 Super I/O chips, and - supports the IT8761E, IT8620E and IT8628E Super I/O chip as well. + supports the IT8761E, IT8613, IT8620E, and IT8628E Super I/O chips as + well. To compile this driver as a module, choose M here: the module will be called gpio_it87 diff --git a/drivers/gpio/gpio-it87.c b/drivers/gpio/gpio-it87.c index 7cad14d3f127..b1fe26927e44 100644 --- a/drivers/gpio/gpio-it87.c +++ b/drivers/gpio/gpio-it87.c @@ -35,6 +35,7 @@ /* Chip Id numbers */ #define NO_DEV_ID 0x +#define IT8613_ID 0x8613 #define IT8620_ID 0x8620 #define IT8628_ID 0x8628 #define IT8728_ID 0x8728 @@ -306,6 +307,14 @@ static int __init it87_gpio_init(void) it87_gpio->chip = it87_template_chip; switch (chip_type) { + case IT8613_ID: + gpio_ba_reg = 0x62; + it87_gpio->io_size = 8; /* it8613 only needs 6, use 8 for alignment */ + it87_gpio->output_base = 0xc8; + it87_gpio->simple_base = 0xc0; + it87_gpio->simple_size = 6; + it87_gpio->chip.ngpio = 64; /* has 48, use 64 for convenient calc */ + break; case IT8620_ID: case IT8628_ID: gpio_ba_reg = 0x62; -- 2.17.1
[PATCH] gpio: it87: Add support for IT8613
This was tested on actual hardware and found to work fine, but currently the official specifications of this chip could not be obtained to confirm the numbers. Signed-off-by: Leonid Bloch --- drivers/gpio/Kconfig | 3 ++- drivers/gpio/gpio-it87.c | 9 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 71c0ab46f216..f1179599aa7e 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -684,7 +684,8 @@ config GPIO_IT87 Say yes here to support GPIO functionality of IT87xx Super I/O chips. This driver is tested with ITE IT8728 and IT8732 Super I/O chips, and - supports the IT8761E, IT8620E and IT8628E Super I/O chip as well. + supports the IT8761E, IT8613, IT8620E, and IT8628E Super I/O chips as + well. To compile this driver as a module, choose M here: the module will be called gpio_it87 diff --git a/drivers/gpio/gpio-it87.c b/drivers/gpio/gpio-it87.c index 7cad14d3f127..b1fe26927e44 100644 --- a/drivers/gpio/gpio-it87.c +++ b/drivers/gpio/gpio-it87.c @@ -35,6 +35,7 @@ /* Chip Id numbers */ #define NO_DEV_ID 0x +#define IT8613_ID 0x8613 #define IT8620_ID 0x8620 #define IT8628_ID 0x8628 #define IT8728_ID 0x8728 @@ -306,6 +307,14 @@ static int __init it87_gpio_init(void) it87_gpio->chip = it87_template_chip; switch (chip_type) { + case IT8613_ID: + gpio_ba_reg = 0x62; + it87_gpio->io_size = 8; /* it8613 only needs 6, use 8 for alignment */ + it87_gpio->output_base = 0xc8; + it87_gpio->simple_base = 0xc0; + it87_gpio->simple_size = 6; + it87_gpio->chip.ngpio = 64; /* has 48, use 64 for convenient calc */ + break; case IT8620_ID: case IT8628_ID: gpio_ba_reg = 0x62; -- 2.17.1
[PATCH] e1000e: fix division by zero on jumbo MTUs
From: Dmitry Fleytman This patch fixes possible division by zero in receive interrupt handler when working without adaptive interrupt moderation. The adaptive interrupt moderation mechanism is typically disabled on jumbo MTUs. Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- drivers/net/ethernet/intel/e1000e/netdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index faf4b3f..a60dce1 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -1959,8 +1959,10 @@ static irqreturn_t e1000_intr_msix_rx(int __always_unused irq, void *data) * previous interrupt. */ if (rx_ring->set_itr) { - writel(10 / (rx_ring->itr_val * 256), - rx_ring->itr_register); + u32 itr = rx_ring->itr_val ? + 10 / (rx_ring->itr_val * 256) : 0; + + writel(itr, rx_ring->itr_register); rx_ring->set_itr = 0; } -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] e1000e: fix division by zero on jumbo MTUs
From: Dmitry Fleytman <dmi...@daynix.com> This patch fixes possible division by zero in receive interrupt handler when working without adaptive interrupt moderation. The adaptive interrupt moderation mechanism is typically disabled on jumbo MTUs. Signed-off-by: Dmitry Fleytman <dmi...@daynix.com> Signed-off-by: Leonid Bloch <leo...@daynix.com> --- drivers/net/ethernet/intel/e1000e/netdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index faf4b3f..a60dce1 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -1959,8 +1959,10 @@ static irqreturn_t e1000_intr_msix_rx(int __always_unused irq, void *data) * previous interrupt. */ if (rx_ring->set_itr) { - writel(10 / (rx_ring->itr_val * 256), - rx_ring->itr_register); + u32 itr = rx_ring->itr_val ? + 10 / (rx_ring->itr_val * 256) : 0; + + writel(itr, rx_ring->itr_register); rx_ring->set_itr = 0; } -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/