/* * 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 <linux/usb/composite.h> #include <linux/usb/cdc.h> #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 */ ght' method='get' action='/cgit.cgi/linux/net-next.git/log/security/apparmor/include/apparmorfs.h'> <input type='hidden' name='id' value='4d191b1b63c209e37bf27938ef365244d3c41084'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=4d191b1b63c209e37bf27938ef365244d3c41084'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/security?id=4d191b1b63c209e37bf27938ef365244d3c41084'>security</a>/<a href='/cgit.cgi/linux/net-next.git/commit/security/apparmor?id=4d191b1b63c209e37bf27938ef365244d3c41084'>apparmor</a>/<a href='/cgit.cgi/linux/net-next.git/commit/security/apparmor/include?id=4d191b1b63c209e37bf27938ef365244d3c41084'>include</a>/<a href='/cgit.cgi/linux/net-next.git/commit/security/apparmor/include/apparmorfs.h?id=4d191b1b63c209e37bf27938ef365244d3c41084'>apparmorfs.h</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='4d191b1b63c209e37bf27938ef365244d3c41084'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'> <tr><th>author</th><td>Marc Zyngier <marc.zyngier@arm.com></td><td class='right'>2017-01-17 14:21:56 +0000</td></tr> <tr><th>committer</th><td>Bjorn Helgaas <bhelgaas@google.com></td><td class='right'>2017-01-17 08:41:51 -0600</td></tr> <tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/security/apparmor/include/apparmorfs.h?id=4d191b1b63c209e37bf27938ef365244d3c41084'>4d191b1b63c209e37bf27938ef365244d3c41084</a> (<a href='/cgit.cgi/linux/net-next.git/patch/security/apparmor/include/apparmorfs.h?id=4d191b1b63c209e37bf27938ef365244d3c41084'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=4d191b1b63c209e37bf27938ef365244d3c41084'>f2ab6cdb65ddacdf2e7c019cd55e353f0c16b400</a> /<a href='/cgit.cgi/linux/net-next.git/tree/security/apparmor/include/apparmorfs.h?id=4d191b1b63c209e37bf27938ef365244d3c41084'>security/apparmor/include/apparmorfs.h</a></td></tr> <tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/security/apparmor/include/apparmorfs.h?id=51ebfc92b72b4f7dac1ab45683bf56741e454b8c'>51ebfc92b72b4f7dac1ab45683bf56741e454b8c</a> (<a href='/cgit.cgi/linux/net-next.git/diff/security/apparmor/include/apparmorfs.h?id=4d191b1b63c209e37bf27938ef365244d3c41084&id2=51ebfc92b72b4f7dac1ab45683bf56741e454b8c'>diff</a>)</td></tr></table> <div class='commit-subject'>PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling</div><div class='commit-msg'>The conversion to the new hotplug state machine introduced a regression where a successful hotplug registration would be treated as an error, effectively disabling the MSI driver forever. Fix it by doing the proper check on the return value. Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine") Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Duc Dang <dhdang@apm.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: stable@vger.kernel.org</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=4d191b1b63c209e37bf27938ef365244d3c41084'>Diffstat</a> (limited to 'security/apparmor/include/apparmorfs.h')</div><table summary='diffstat' class='diffstat'>