/* * Driver for the NXP ISP1761 device controller * * Copyright 2014 Ideas on Board Oy * * Contacts: * Laurent Pinchart * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. */ #ifndef _ISP1760_UDC_H_ #define _ISP1760_UDC_H_ #include #include #include #include #include struct isp1760_device; struct isp1760_udc; enum isp1760_ctrl_state { ISP1760_CTRL_SETUP, /* Waiting for a SETUP transaction */ ISP1760_CTRL_DATA_IN, /* Setup received, data IN stage */ ISP1760_CTRL_DATA_OUT, /* Setup received, data OUT stage */ ISP1760_CTRL_STATUS, /* 0-length request in status stage */ }; struct isp1760_ep { struct isp1760_udc *udc; struct usb_ep ep; struct list_head queue; unsigned int addr; unsigned int maxpacket; char name[7]; const struct usb_endpoint_descriptor *desc; bool rx_pending; bool halted; bool wedged; }; /** * struct isp1760_udc - UDC state information * irq: IRQ number * irqname: IRQ name (as passed to request_irq) * regs: Base address of the UDC registers * driver: Gadget driver * gadget: Gadget device * lock: Protects driver, vbus_timer, ep, ep0_*, DC_EPINDEX register * ep: Array of endpoints * ep0_state: Control request state for endpoint 0 * ep0_dir: Direction of the current control request * ep0_length: Length of the current control request * connected: Tracks gadget driver bus connection state */ struct isp1760_udc { #ifdef CONFIG_USB_ISP1761_UDC struct isp1760_device *isp; int irq; char *irqname; void __iomem *regs; struct usb_gadget_driver *driver; struct usb_gadget gadget; spinlock_t lock; struct timer_list vbus_timer; struct isp1760_ep ep[15]; enum isp1760_ctrl_state ep0_state; u8 ep0_dir; u16 ep0_length; bool connected; unsigned int devstatus; #endif }; #ifdef CONFIG_USB_ISP1761_UDC int isp1760_udc_register(struct isp1760_device *isp, int irq, unsigned long irqflags); void isp1760_udc_unregister(struct isp1760_device *isp); #else static inline int isp1760_udc_register(struct isp1760_device *isp, int irq, unsigned long irqflags) { return 0; } static inline void isp1760_udc_unregister(struct isp1760_device *isp) { } #endif #endif t type='hidden' name='h' value='nds-private-remove'/>
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-05 18:10:35 +0100
committerJens Axboe <axboe@fb.com>2017-02-06 09:34:46 -0700
commiteeeefd41843218c55a8782a6920f044d9bf6207a (patch)
treec342eac46626e62745aa8e1a982626efca8b121d /drivers/usb/host/ohci.h
parentc14024dbb156c8392908aaa822097d27c6af8ec8 (diff)
block: don't try Write Same from __blkdev_issue_zeroout
Write Same can return an error asynchronously if it turns out the underlying SCSI device does not support Write Same, which makes a proper fallback to other methods in __blkdev_issue_zeroout impossible. Thus only issue a Write Same from blkdev_issue_zeroout an don't try it at all from __blkdev_issue_zeroout as a non-invasive workaround. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Junichi Nomura <j-nomura@ce.jp.nec.com> Fixes: e73c23ff ("block: add async variant of blkdev_issue_zeroout") Tested-by: Junichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/usb/host/ohci.h')