-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes, and new device ids, for 6.14-rc3. Lots of tiny stuff for reported problems, including: - new device ids and quirks - usb hub crash fix found by syzbot - dwc2 driver fix - dwc3 driver fixes - uvc gadget driver fix - cdc-acm driver fixes for a variety of different issues - other tiny bugfixes Almost all of these have been in linux-next this week, and all have passed 0-day testing" * tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits) usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY usb: roles: set switch registered flag early on usb: gadget: uvc: Fix unstarted kthread worker USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist usb: gadget: core: flush gadget workqueue after device removal USB: gadget: f_midi: f_midi_complete to call queue_work usb: core: fix pipe creation for get_bMaxPacketSize0 usb: dwc3: Fix timeout issue during controller enter/exit from halt state USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk usb: cdc-acm: Fix handling of oversized fragments usb: cdc-acm: Check control transfer buffer size before access usb: xhci: Restore xhci_pci support for Renesas HCs USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI USB: serial: option: drop MeiG Smart defines USB: serial: option: fix Telit Cinterion FN990A name USB: serial: option: add Telit Cinterion FN990B compositions USB: serial: option: add MeiG Smart SLM828 usb: gadget: f_midi: fix MIDI Streaming descriptor lengths usb: dwc2: gadget: remove of_node reference upon udc_stop ...
- Loading branch information
Showing
16 changed files
with
139 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,7 +371,7 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf) | |
static void acm_ctrl_irq(struct urb *urb) | ||
{ | ||
struct acm *acm = urb->context; | ||
struct usb_cdc_notification *dr = urb->transfer_buffer; | ||
struct usb_cdc_notification *dr; | ||
unsigned int current_size = urb->actual_length; | ||
unsigned int expected_size, copy_size, alloc_size; | ||
int retval; | ||
|
@@ -398,14 +398,25 @@ static void acm_ctrl_irq(struct urb *urb) | |
|
||
usb_mark_last_busy(acm->dev); | ||
|
||
if (acm->nb_index) | ||
if (acm->nb_index == 0) { | ||
/* | ||
* The first chunk of a message must contain at least the | ||
* notification header with the length field, otherwise we | ||
* can't get an expected_size. | ||
*/ | ||
if (current_size < sizeof(struct usb_cdc_notification)) { | ||
dev_dbg(&acm->control->dev, "urb too short\n"); | ||
goto exit; | ||
} | ||
dr = urb->transfer_buffer; | ||
} else { | ||
dr = (struct usb_cdc_notification *)acm->notification_buffer; | ||
|
||
} | ||
/* size = notification-header + (optional) data */ | ||
expected_size = sizeof(struct usb_cdc_notification) + | ||
le16_to_cpu(dr->wLength); | ||
|
||
if (current_size < expected_size) { | ||
if (acm->nb_index != 0 || current_size < expected_size) { | ||
/* notification is transmitted fragmented, reassemble */ | ||
if (acm->nb_size < expected_size) { | ||
u8 *new_buffer; | ||
|
@@ -1727,13 +1738,16 @@ static const struct usb_device_id acm_ids[] = { | |
{ USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */ | ||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */ | ||
}, | ||
{ USB_DEVICE(0x045b, 0x023c), /* Renesas USB Download mode */ | ||
{ USB_DEVICE(0x045b, 0x023c), /* Renesas R-Car H3 USB Download mode */ | ||
.driver_info = DISABLE_ECHO, /* Don't echo banner */ | ||
}, | ||
{ USB_DEVICE(0x045b, 0x0247), /* Renesas R-Car D3 USB Download mode */ | ||
.driver_info = DISABLE_ECHO, /* Don't echo banner */ | ||
}, | ||
{ USB_DEVICE(0x045b, 0x0248), /* Renesas USB Download mode */ | ||
{ USB_DEVICE(0x045b, 0x0248), /* Renesas R-Car M3-N USB Download mode */ | ||
.driver_info = DISABLE_ECHO, /* Don't echo banner */ | ||
}, | ||
{ USB_DEVICE(0x045b, 0x024D), /* Renesas USB Download mode */ | ||
{ USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */ | ||
.driver_info = DISABLE_ECHO, /* Don't echo banner */ | ||
}, | ||
{ USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; [email protected] */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.