projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: usb_debug: set bulk out size at probe
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
usb
/
serial
/
usb_debug.c
diff --git
a/drivers/usb/serial/usb_debug.c
b/drivers/usb/serial/usb_debug.c
index 252cc2d993b2992b7bbb7480f76c3760800322f3..f2ed6a31be77288733235eec2f60437d01d7ea91 100644
(file)
--- a/
drivers/usb/serial/usb_debug.c
+++ b/
drivers/usb/serial/usb_debug.c
@@
-8,6
+8,7
@@
* 2 as published by the Free Software Foundation.
*/
* 2 as published by the Free Software Foundation.
*/
+#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/tty.h>
@@
-15,7
+16,6
@@
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
-#define URB_DEBUG_MAX_IN_FLIGHT_URBS 4000
#define USB_DEBUG_MAX_PACKET_SIZE 8
#define USB_DEBUG_BRK_SIZE 8
static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = {
#define USB_DEBUG_MAX_PACKET_SIZE 8
#define USB_DEBUG_BRK_SIZE 8
static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = {
@@
-43,12
+43,6
@@
static struct usb_driver debug_driver = {
.no_dynamic_id = 1,
};
.no_dynamic_id = 1,
};
-static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port)
-{
- port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
- return usb_serial_generic_open(tty, port);
-}
-
/* This HW really does not support a serial break, so one will be
* emulated when ever the break state is set to true.
*/
/* This HW really does not support a serial break, so one will be
* emulated when ever the break state is set to true.
*/
@@
-68,7
+62,7
@@
static void usb_debug_read_bulk_callback(struct urb *urb)
memcmp(urb->transfer_buffer, USB_DEBUG_BRK,
USB_DEBUG_BRK_SIZE) == 0) {
usb_serial_handle_break(port);
memcmp(urb->transfer_buffer, USB_DEBUG_BRK,
USB_DEBUG_BRK_SIZE) == 0) {
usb_serial_handle_break(port);
- usb_serial_generic_
re
submit_read_urb(port, GFP_ATOMIC);
+ usb_serial_generic_submit_read_urb(port, GFP_ATOMIC);
return;
}
return;
}
@@
-82,8
+76,7
@@
static struct usb_serial_driver debug_device = {
},
.id_table = id_table,
.num_ports = 1,
},
.id_table = id_table,
.num_ports = 1,
- .open = usb_debug_open,
- .max_in_flight_urbs = URB_DEBUG_MAX_IN_FLIGHT_URBS,
+ .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE,
.break_ctl = usb_debug_break_ctl,
.read_bulk_callback = usb_debug_read_bulk_callback,
};
.break_ctl = usb_debug_break_ctl,
.read_bulk_callback = usb_debug_read_bulk_callback,
};