Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1228f4f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-4.8-rc4' of...

Merge tag 'usb-serial-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial

 into usb-linus

Johan writes:

USB-serial fixes for v4.8-rc4

Here are a couple of fixes for non-atomic allocations in write paths,
and some new option device ids.

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parents 368907dd 40d9c325
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1252,7 +1252,7 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,


	if (urb->transfer_buffer == NULL) {
	if (urb->transfer_buffer == NULL) {
		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
					       GFP_KERNEL);
					       GFP_ATOMIC);
		if (!urb->transfer_buffer)
		if (!urb->transfer_buffer)
			goto exit;
			goto exit;
	}
	}
+2 −2
Original line number Original line Diff line number Diff line
@@ -1340,8 +1340,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
	}
	}


	if (urb->transfer_buffer == NULL) {
	if (urb->transfer_buffer == NULL) {
		urb->transfer_buffer =
		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
		    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
					       GFP_ATOMIC);
		if (!urb->transfer_buffer)
		if (!urb->transfer_buffer)
			goto exit;
			goto exit;
	}
	}
+9 −0
Original line number Original line Diff line number Diff line
@@ -525,6 +525,12 @@ static void option_instat_callback(struct urb *urb);
#define VIATELECOM_VENDOR_ID			0x15eb
#define VIATELECOM_VENDOR_ID			0x15eb
#define VIATELECOM_PRODUCT_CDS7			0x0001
#define VIATELECOM_PRODUCT_CDS7			0x0001


/* WeTelecom products */
#define WETELECOM_VENDOR_ID			0x22de
#define WETELECOM_PRODUCT_WMD200		0x6801
#define WETELECOM_PRODUCT_6802			0x6802
#define WETELECOM_PRODUCT_WMD300		0x6803

struct option_blacklist_info {
struct option_blacklist_info {
	/* bitmask of interface numbers blacklisted for send_setup */
	/* bitmask of interface numbers blacklisted for send_setup */
	const unsigned long sendsetup;
	const unsigned long sendsetup;
@@ -1991,6 +1997,9 @@ static const struct usb_device_id option_ids[] = {
	{ USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) },                /* OLICARD300 - MT6225 */
	{ USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) },                /* OLICARD300 - MT6225 */
	{ USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
	{ USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
	{ USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
	{ USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
	{ } /* Terminating entry */
	{ } /* Terminating entry */
};
};
MODULE_DEVICE_TABLE(usb, option_ids);
MODULE_DEVICE_TABLE(usb, option_ids);