Johan writes: USB-serial updates for 5.9-rc1 Here are the USB-serial updates for 5.9-rc1, including: - console flow-control support - simulated line-breaks on some ch341 - hardware flow-control fixes for cp210x - break-detection and sysrq fixes for ftdi_sio - sysrq optimisations - input parity checking for cp210x Included are also some new device ids and various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.9-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: (31 commits) USB: serial: qcserial: add EM7305 QDL product ID USB: serial: iuu_phoenix: fix led-activity helpers USB: serial: sierra: clean up special-interface handling USB: serial: cp210x: use in-kernel types in port data USB: serial: cp210x: drop unnecessary packed attributes USB: serial: cp210x: add support for TIOCGICOUNT USB: serial: cp210x: add support for line-status events USB: serial: cp210x: disable interface on errors in open USB: serial: drop redundant transfer-buffer casts USB: serial: drop extern keyword from function declarations USB: serial: drop unnecessary sysrq include USB: serial: add sysrq break-handler dummy USB: serial: inline sysrq dummy function USB: serial: only process sysrq when enabled USB: serial: only set sysrq timestamp for consoles USB: serial: ftdi_sio: fix break and sysrq handling USB: serial: ftdi_sio: clean up receive processing USB: serial: ftdi_sio: make process-packet buffer unsigned USB: serial: use fallthrough pseudo-keyword USB: serial: ch341: fix missing simulated-break margin ...
Showing the changes to include/linux (1 of 23 files). Show all
Unified · Split
| @@ -17,7 +17,6 @@ · 16 unmodified lines | |||
| 17 | #include <linux/kref.h> | 17 | #include <linux/kref.h> |
| 18 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
| 19 | #include <linux/serial.h> | 19 | #include <linux/serial.h> |
| 20 | #include <linux/sysrq.h> | ||
| 21 | #include <linux/kfifo.h> | 20 | #include <linux/kfifo.h> |
| 22 | 21 | ||
| 23 | /* The maximum number of ports one device can grab at once */ | 22 | /* The maximum number of ports one device can grab at once */ |
| @@ -316,19 +315,19 @@ struct usb_serial_driver { · 292 unmodified lines | |||
| 316 | #define to_usb_serial_driver(d) \ | 315 | #define to_usb_serial_driver(d) \ |
| 317 | container_of(d, struct usb_serial_driver, driver) | 316 | container_of(d, struct usb_serial_driver, driver) |
| 318 | 317 | ||
| 319 | extern int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[], | 318 | int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[], |
| 320 | const char *name, const struct usb_device_id *id_table); | 319 | const char *name, const struct usb_device_id *id_table); |
| 321 | extern void usb_serial_deregister_drivers(struct usb_serial_driver *const serial_drivers[]); | 320 | void usb_serial_deregister_drivers(struct usb_serial_driver *const serial_drivers[]); |
| 322 | extern void usb_serial_port_softint(struct usb_serial_port *port); | 321 | void usb_serial_port_softint(struct usb_serial_port *port); |
| 323 | 322 | ||
| 324 | extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); | 323 | int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); |
| 325 | extern int usb_serial_resume(struct usb_interface *intf); | 324 | int usb_serial_resume(struct usb_interface *intf); |
| 326 | 325 | ||
| 327 | /* USB Serial console functions */ | 326 | /* USB Serial console functions */ |
| 328 | #ifdef CONFIG_USB_SERIAL_CONSOLE | 327 | #ifdef CONFIG_USB_SERIAL_CONSOLE |
| 329 | extern void usb_serial_console_init(int minor); | 328 | void usb_serial_console_init(int minor); |
| 330 | extern void usb_serial_console_exit(void); | 329 | void usb_serial_console_exit(void); |
| 331 | extern void usb_serial_console_disconnect(struct usb_serial *serial); | 330 | void usb_serial_console_disconnect(struct usb_serial *serial); |
| 332 | #else | 331 | #else |
| 333 | static inline void usb_serial_console_init(int minor) { } | 332 | static inline void usb_serial_console_init(int minor) { } |
| 334 | static inline void usb_serial_console_exit(void) { } | 333 | static inline void usb_serial_console_exit(void) { } |
| @@ -336,45 +335,49 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} · 1 unmodified line | |||
| 336 | #endif | 335 | #endif |
| 337 | 336 | ||
| 338 | /* Functions needed by other parts of the usbserial core */ | 337 | /* Functions needed by other parts of the usbserial core */ |
| 339 | extern struct usb_serial_port *usb_serial_port_get_by_minor(unsigned int minor); | 338 | struct usb_serial_port *usb_serial_port_get_by_minor(unsigned int minor); |
| 340 | extern void usb_serial_put(struct usb_serial *serial); | 339 | void usb_serial_put(struct usb_serial *serial); |
| 341 | extern int usb_serial_generic_open(struct tty_struct *tty, | 340 | int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port); |
| 342 | struct usb_serial_port *port); | 341 | int usb_serial_generic_write_start(struct usb_serial_port *port, gfp_t mem_flags); |
| 343 | extern int usb_serial_generic_write_start(struct usb_serial_port *port, | 342 | int usb_serial_generic_write(struct tty_struct *tty, struct usb_serial_port *port, |
| 344 | gfp_t mem_flags); | 343 | const unsigned char *buf, int count); |
| 345 | extern int usb_serial_generic_write(struct tty_struct *tty, | 344 | void usb_serial_generic_close(struct usb_serial_port *port); |
| 346 | struct usb_serial_port *port, const unsigned char *buf, int count); | 345 | int usb_serial_generic_resume(struct usb_serial *serial); |
| 347 | extern void usb_serial_generic_close(struct usb_serial_port *port); | 346 | int usb_serial_generic_write_room(struct tty_struct *tty); |
| 348 | extern int usb_serial_generic_resume(struct usb_serial *serial); | 347 | int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); |
| 349 | extern int usb_serial_generic_write_room(struct tty_struct *tty); | 348 | void usb_serial_generic_wait_until_sent(struct tty_struct *tty, long timeout); |
| 350 | extern int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); | 349 | void usb_serial_generic_read_bulk_callback(struct urb *urb); |
| 351 | extern void usb_serial_generic_wait_until_sent(struct tty_struct *tty, | 350 | void usb_serial_generic_write_bulk_callback(struct urb *urb); |
| 352 | long timeout); | 351 | void usb_serial_generic_throttle(struct tty_struct *tty); |
| 353 | extern void usb_serial_generic_read_bulk_callback(struct urb *urb); | 352 | void usb_serial_generic_unthrottle(struct tty_struct *tty); |
| 354 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); | 353 | int usb_serial_generic_tiocmiwait(struct tty_struct *tty, unsigned long arg); |
| 355 | extern void usb_serial_generic_throttle(struct tty_struct *tty); | 354 | int usb_serial_generic_get_icount(struct tty_struct *tty, struct serial_icounter_struct *icount); |
| 356 | extern void usb_serial_generic_unthrottle(struct tty_struct *tty); | 355 | int usb_serial_generic_register(void); |
| 357 | extern int usb_serial_generic_tiocmiwait(struct tty_struct *tty, | 356 | void usb_serial_generic_deregister(void); |
| 358 | unsigned long arg); | 357 | int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, gfp_t mem_flags); |
| 359 | extern int usb_serial_generic_get_icount(struct tty_struct *tty, | 358 | void usb_serial_generic_process_read_urb(struct urb *urb); |
| 360 | struct serial_icounter_struct *icount); | 359 | int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, void *dest, size_t size); |
| 361 | extern int usb_serial_generic_register(void); | 360 | |
| 362 | extern void usb_serial_generic_deregister(void); | 361 | #if defined(CONFIG_USB_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
| 363 | extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, | 362 | int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch); |
| 364 | gfp_t mem_flags); | 363 | int usb_serial_handle_break(struct usb_serial_port *port); |
| 365 | extern void usb_serial_generic_process_read_urb(struct urb *urb); | 364 | #else |
| 366 | extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | 365 | static inline int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) |
| 367 | void *dest, size_t size); | 366 | { |
| 368 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 367 | return 0; |
| 369 | unsigned int ch); | 368 | } |
| 370 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 369 | static inline int usb_serial_handle_break(struct usb_serial_port *port) |
| 371 | extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | 370 | { |
| 372 | struct tty_struct *tty, | 371 | return 0; |
| 373 | unsigned int status); | 372 | } |
| 373 | #endif | ||
| 374 | |||
| 375 | void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | ||
| 376 | struct tty_struct *tty, unsigned int status); | ||
| 374 | 377 | ||
| 375 | 378 | ||
| 376 | extern int usb_serial_bus_register(struct usb_serial_driver *device); | 379 | int usb_serial_bus_register(struct usb_serial_driver *device); |
| 377 | extern void usb_serial_bus_deregister(struct usb_serial_driver *device); | 380 | void usb_serial_bus_deregister(struct usb_serial_driver *device); |
| 378 | 381 | ||
| 379 | extern struct bus_type usb_serial_bus_type; | 382 | extern struct bus_type usb_serial_bus_type; |
| 380 | extern struct tty_driver *usb_serial_tty_driver; | 383 | extern struct tty_driver *usb_serial_tty_driver; |