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 | 17 | #include <linux/kref.h> |
| 18 | 18 | #include <linux/mutex.h> |
| 19 | 19 | #include <linux/serial.h> |
| 20 | −#include <linux/sysrq.h> | |
| 21 | 20 | #include <linux/kfifo.h> |
| 22 | 21 | |
| 23 | 22 | /* The maximum number of ports one device can grab at once */ |
| @@ -316,19 +315,19 @@ struct usb_serial_driver { · 292 unmodified lines | ||
| 316 | 315 | #define to_usb_serial_driver(d) \ |
| 317 | 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 | 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[]); | |
| 322 | −extern void usb_serial_port_softint(struct usb_serial_port *port); | |
| 320 | +void usb_serial_deregister_drivers(struct usb_serial_driver *const serial_drivers[]); | |
| 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); | |
| 325 | −extern int usb_serial_resume(struct usb_interface *intf); | |
| 323 | +int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); | |
| 324 | +int usb_serial_resume(struct usb_interface *intf); | |
| 326 | 325 | |
| 327 | 326 | /* USB Serial console functions */ |
| 328 | 327 | #ifdef CONFIG_USB_SERIAL_CONSOLE |
| 329 | −extern void usb_serial_console_init(int minor); | |
| 330 | −extern void usb_serial_console_exit(void); | |
| 331 | −extern void usb_serial_console_disconnect(struct usb_serial *serial); | |
| 328 | +void usb_serial_console_init(int minor); | |
| 329 | +void usb_serial_console_exit(void); | |
| 330 | +void usb_serial_console_disconnect(struct usb_serial *serial); | |
| 332 | 331 | #else |
| 333 | 332 | static inline void usb_serial_console_init(int minor) { } |
| 334 | 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 | 335 | #endif |
| 337 | 336 | |
| 338 | 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); | |
| 340 | −extern void usb_serial_put(struct usb_serial *serial); | |
| 341 | −extern int usb_serial_generic_open(struct tty_struct *tty, | |
| 342 | − struct usb_serial_port *port); | |
| 343 | −extern int usb_serial_generic_write_start(struct usb_serial_port *port, | |
| 344 | − gfp_t mem_flags); | |
| 345 | −extern int usb_serial_generic_write(struct tty_struct *tty, | |
| 346 | − struct usb_serial_port *port, const unsigned char *buf, int count); | |
| 347 | −extern void usb_serial_generic_close(struct usb_serial_port *port); | |
| 348 | −extern int usb_serial_generic_resume(struct usb_serial *serial); | |
| 349 | −extern int usb_serial_generic_write_room(struct tty_struct *tty); | |
| 350 | −extern int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); | |
| 351 | −extern void usb_serial_generic_wait_until_sent(struct tty_struct *tty, | |
| 352 | − long timeout); | |
| 353 | −extern void usb_serial_generic_read_bulk_callback(struct urb *urb); | |
| 354 | −extern void usb_serial_generic_write_bulk_callback(struct urb *urb); | |
| 355 | −extern void usb_serial_generic_throttle(struct tty_struct *tty); | |
| 356 | −extern void usb_serial_generic_unthrottle(struct tty_struct *tty); | |
| 357 | −extern int usb_serial_generic_tiocmiwait(struct tty_struct *tty, | |
| 358 | − unsigned long arg); | |
| 359 | −extern int usb_serial_generic_get_icount(struct tty_struct *tty, | |
| 360 | − struct serial_icounter_struct *icount); | |
| 361 | −extern int usb_serial_generic_register(void); | |
| 362 | −extern void usb_serial_generic_deregister(void); | |
| 363 | −extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, | |
| 364 | − gfp_t mem_flags); | |
| 365 | −extern void usb_serial_generic_process_read_urb(struct urb *urb); | |
| 366 | −extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | |
| 367 | − void *dest, size_t size); | |
| 368 | −extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | |
| 369 | − unsigned int ch); | |
| 370 | −extern int usb_serial_handle_break(struct usb_serial_port *port); | |
| 371 | −extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | |
| 372 | − struct tty_struct *tty, | |
| 373 | − unsigned int status); | |
| 338 | +struct usb_serial_port *usb_serial_port_get_by_minor(unsigned int minor); | |
| 339 | +void usb_serial_put(struct usb_serial *serial); | |
| 340 | +int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port); | |
| 341 | +int usb_serial_generic_write_start(struct usb_serial_port *port, gfp_t mem_flags); | |
| 342 | +int usb_serial_generic_write(struct tty_struct *tty, struct usb_serial_port *port, | |
| 343 | + const unsigned char *buf, int count); | |
| 344 | +void usb_serial_generic_close(struct usb_serial_port *port); | |
| 345 | +int usb_serial_generic_resume(struct usb_serial *serial); | |
| 346 | +int usb_serial_generic_write_room(struct tty_struct *tty); | |
| 347 | +int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); | |
| 348 | +void usb_serial_generic_wait_until_sent(struct tty_struct *tty, long timeout); | |
| 349 | +void usb_serial_generic_read_bulk_callback(struct urb *urb); | |
| 350 | +void usb_serial_generic_write_bulk_callback(struct urb *urb); | |
| 351 | +void usb_serial_generic_throttle(struct tty_struct *tty); | |
| 352 | +void usb_serial_generic_unthrottle(struct tty_struct *tty); | |
| 353 | +int usb_serial_generic_tiocmiwait(struct tty_struct *tty, unsigned long arg); | |
| 354 | +int usb_serial_generic_get_icount(struct tty_struct *tty, struct serial_icounter_struct *icount); | |
| 355 | +int usb_serial_generic_register(void); | |
| 356 | +void usb_serial_generic_deregister(void); | |
| 357 | +int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, gfp_t mem_flags); | |
| 358 | +void usb_serial_generic_process_read_urb(struct urb *urb); | |
| 359 | +int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, void *dest, size_t size); | |
| 360 | + | |
| 361 | +#if defined(CONFIG_USB_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | |
| 362 | +int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch); | |
| 363 | +int usb_serial_handle_break(struct usb_serial_port *port); | |
| 364 | +#else | |
| 365 | +static inline int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) | |
| 366 | +{ | |
| 367 | + return 0; | |
| 368 | +} | |
| 369 | +static inline int usb_serial_handle_break(struct usb_serial_port *port) | |
| 370 | +{ | |
| 371 | + return 0; | |
| 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); | |
| 377 | −extern void usb_serial_bus_deregister(struct usb_serial_driver *device); | |
| 379 | +int usb_serial_bus_register(struct usb_serial_driver *device); | |
| 380 | +void usb_serial_bus_deregister(struct usb_serial_driver *device); | |
| 378 | 381 | |
| 379 | 382 | extern struct bus_type usb_serial_bus_type; |
| 380 | 383 | extern struct tty_driver *usb_serial_tty_driver; |