/* * linux/drivers/usb/gadget/s3c2410_udc.h * Samsung on-chip full speed USB device controllers * * Copyright (C) 2004-2007 Herbert Pƶtzl - Arnaud Patard * Additional cleanups by Ben Dooks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef _S3C2410_UDC_H #define _S3C2410_UDC_H struct s3c2410_ep { struct list_head queue; unsigned long last_io; /* jiffies timestamp */ struct usb_gadget *gadget; struct s3c2410_udc *dev; struct usb_ep ep; u8 num; unsigned short fifo_size; u8 bEndpointAddress; u8 bmAttributes; unsigned halted : 1; unsigned already_seen : 1; unsigned setup_stage : 1; }; /* Warning : ep0 has a fifo of 16 bytes */ /* Don't try to set 32 or 64 */ /* also testusb 14 fails wit 16 but is */ /* fine with 8 */ #define EP0_FIFO_SIZE 8 #define EP_FIFO_SIZE 64 #define DEFAULT_POWER_STATE 0x00 #define S3C2440_EP_FIFO_SIZE 128 static const char ep0name [] = "ep0"; static const char *const ep_name[] = { ep0name, /* everyone has ep0 */ /* s3c2410 four bidirectional bulk endpoints */ "ep1-bulk", "ep2-bulk", "ep3-bulk", "ep4-bulk", }; #define S3C2410_ENDPOINTS ARRAY_SIZE(ep_name) struct s3c2410_request { struct list_head queue; /* ep's requests */ struct usb_request req; }; enum ep0_state { EP0_IDLE, EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_END_XFER, EP0_STALL, }; static const char *ep0states[]= { "EP0_IDLE", "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE", "EP0_END_XFER", "EP0_STALL", }; struct s3c2410_udc { spinlock_t lock; struct s3c2410_ep ep[S3C2410_ENDPOINTS]; int address; struct usb_gadget gadget; struct usb_gadget_driver *driver; struct s3c2410_request fifo_req; u8 fifo_buf[EP_FIFO_SIZE]; u16 devstatus; u32 port_status; int ep0state; unsigned got_irq : 1; unsigned req_std : 1; unsigned req_config : 1; unsigned req_pending : 1; u8 vbus; struct dentry *regs_info; }; #define to_s3c2410(g) (container_of((g), struct s3c2410_udc, gadget)) #endif 4759d386d55fef452d692bf101167914437e848e'/>
path: root/drivers/usb/wusbcore/wa-xfer.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-01 12:27:05 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-01 12:27:05 -0800
commit4759d386d55fef452d692bf101167914437e848e (patch)
treee7109c192ec589fcea2a98f9702aa3c0e4009581 /drivers/usb/wusbcore/wa-xfer.c
parent238d1d0f79f619d75c2cc741d6770fb0986aef24 (diff)
parent1db175428ee374489448361213e9c3b749d14900 (diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull DAX updates from Dan Williams: "The completion of Jan's DAX work for 4.10. As I mentioned in the libnvdimm-for-4.10 pull request, these are some final fixes for the DAX dirty-cacheline-tracking invalidation work that was merged through the -mm, ext4, and xfs trees in -rc1. These patches were prepared prior to the merge window, but we waited for 4.10-rc1 to have a stable merge base after all the prerequisites were merged. Quoting Jan on the overall changes in these patches: "So I'd like all these 6 patches to go for rc2. The first three patches fix invalidation of exceptional DAX entries (a bug which is there for a long time) - without these patches data loss can occur on power failure even though user called fsync(2). The other three patches change locking of DAX faults so that ->iomap_begin() is called in a more relaxed locking context and we are safe to start a transaction there for ext4" These have received a build success notification from the kbuild robot, and pass the latest libnvdimm unit tests. There have not been any -next releases since -rc1, so they have not appeared there" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: ext4: Simplify DAX fault path dax: Call ->iomap_begin without entry lock during dax fault dax: Finish fault completely when loading holes dax: Avoid page invalidation races and unnecessary radix tree traversals mm: Invalidate DAX radix tree entries only if appropriate ext2: Return BH_New buffers for zeroed blocks
Diffstat (limited to 'drivers/usb/wusbcore/wa-xfer.c')