/* * u_serial.h - interface to USB gadget "serial port"/TTY utilities * * Copyright (C) 2008 David Brownell * Copyright (C) 2008 by Nokia Corporation * * This software is distributed under the terms of the GNU General * Public License ("GPL") as published by the Free Software Foundation, * either version 2 of that License or (at your option) any later version. */ #ifndef __U_SERIAL_H #define __U_SERIAL_H #include #include #define MAX_U_SERIAL_PORTS 4 struct f_serial_opts { struct usb_function_instance func_inst; u8 port_num; }; /* * One non-multiplexed "serial" I/O port ... there can be several of these * on any given USB peripheral device, if it provides enough endpoints. * * The "u_serial" utility component exists to do one thing: manage TTY * style I/O using the USB peripheral endpoints listed here, including * hookups to sysfs and /dev for each logical "tty" device. * * REVISIT at least ACM could support tiocmget() if needed. * * REVISIT someday, allow multiplexing several TTYs over these endpoints. */ struct gserial { struct usb_function func; /* port is managed by gserial_{connect,disconnect} */ struct gs_port *ioport; struct usb_ep *in; struct usb_ep *out; /* REVISIT avoid this CDC-ACM support harder ... */ struct usb_cdc_line_coding port_line_coding; /* 9600-8-N-1 etc */ /* notification callbacks */ void (*connect)(struct gserial *p); void (*disconnect)(struct gserial *p); int (*send_break)(struct gserial *p, int duration); }; /* utilities to allocate/free request and buffer */ struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned len, gfp_t flags); void gs_free_req(struct usb_ep *, struct usb_request *req); /* management of individual TTY ports */ int gserial_alloc_line(unsigned char *port_line); void gserial_free_line(unsigned char port_line); /* connect/disconnect is handled by individual functions */ int gserial_connect(struct gserial *, u8 port_num); void gserial_disconnect(struct gserial *); /* functions are bound to configurations by a config or gadget driver */ int gser_bind_config(struct usb_configuration *c, u8 port_num); int obex_bind_config(struct usb_configuration *c, u8 port_num); #endif /* __U_SERIAL_H */ f60e2a68af88411f12318675a2424a0e14'/>
4a5e2d3f85365cb717d60e363171b39e6'/>
AgeCommit message (Expand)AuthorFilesLines
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@collabora.co.uk>2017-01-16 12:23:42 -0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-01-31 11:26:49 +0100
commit161e6d44a5e2d3f85365cb717d60e363171b39e6 (patch)
tree5c8b730a137696ef979f05ceae869b6e0348794c /drivers/usb/host/ehci-xilinx-of.c
parent566cf877a1fcb6d6dc0126b076aad062054c2637 (diff)
mmc: sdhci: Ignore unexpected CARD_INT interrupts
One of our kernelCI boxes hanged at boot because a faulty eSDHC device was triggering spurious CARD_INT interrupts for SD cards, causing CMD52 reads, which are not allowed for SD devices. This adds a sanity check to the interruption path, preventing that illegal command from getting sent if the CARD_INT interruption should be disabled. This quirk allows that particular machine to resume boot despite the faulty hardware, instead of getting hung dealing with thousands of mishandled interrupts. Suggested-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'drivers/usb/host/ehci-xilinx-of.c')