This is similar to what we already do in cdc-phonet.c in the same
situation. pskb_pull() refuses to work with HIGHMEM, even if it is
known that the socket buffer is entirely in "low" memory.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Trying to compile drivers/usb/gadget/f_mass_storage.o currently fails and
spews a ton of warnings :
CC drivers/usb/gadget/f_mass_storage.o
drivers/usb/gadget/f_mass_storage.c:436:22: error: field ‘function’ has incomplete type
drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_from_func’:
drivers/usb/gadget/f_mass_storage.c:466:9: warning: type defaults to ‘int’ in declaration of ‘__mptr’
drivers/usb/gadget/f_mass_storage.c:466:9: warning: initialization from incompatible pointer type
drivers/usb/gadget/f_mass_storage.c: At top level:
drivers/usb/gadget/f_mass_storage.c:2743:15: warning: ‘struct usb_composite_dev’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c:2743:15: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_common_init’:
drivers/usb/gadget/f_mass_storage.c:2745:34: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:2775:23: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:2779:3: error: implicit declaration of function ‘usb_string_id’
drivers/usb/gadget/f_mass_storage.c: At top level:
drivers/usb/gadget/f_mass_storage.c:2984:60: warning: ‘struct usb_configuration’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c:3003:57: warning: ‘struct usb_configuration’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_bind’:
drivers/usb/gadget/f_mass_storage.c:3006:31: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:3013:2: error: implicit declaration of function ‘usb_interface_id’
drivers/usb/gadget/f_mass_storage.c:3033:3: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:3034:6: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:3043:4: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:3044:7: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c:3045:26: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_mass_storage.c: At top level:
drivers/usb/gadget/f_mass_storage.c:3067:14: warning: ‘struct usb_configuration’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c:3067:14: warning: ‘struct usb_composite_dev’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_bind_config’:
drivers/usb/gadget/f_mass_storage.c:3093:2: error: implicit declaration of function ‘usb_add_function’
drivers/usb/gadget/f_mass_storage.c: At top level:
drivers/usb/gadget/f_mass_storage.c:3103:9: warning: ‘struct usb_configuration’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c:3103:9: warning: ‘struct usb_composite_dev’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_add’:
drivers/usb/gadget/f_mass_storage.c:3105:2: warning: passing argument 1 of ‘fsg_bind_config’ from incompatible pointer type
drivers/usb/gadget/f_mass_storage.c:3065:12: note: expected ‘struct usb_composite_dev *’ but argument is of type ‘struct usb_composite_dev *’
drivers/usb/gadget/f_mass_storage.c:3105:2: warning: passing argument 2 of ‘fsg_bind_config’ from incompatible pointer type
drivers/usb/gadget/f_mass_storage.c:3065:12: note: expected ‘struct usb_configuration *’ but argument is of type ‘struct usb_configuration *’
drivers/usb/gadget/f_mass_storage.c: At top level:
drivers/usb/gadget/f_mass_storage.c:3190:23: warning: ‘struct usb_composite_dev’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c:3195:23: warning: ‘struct usb_composite_dev’ declared inside parameter list
drivers/usb/gadget/f_mass_storage.c:3193:1: error: conflicting types for ‘fsg_common_from_params’
drivers/usb/gadget/f_mass_storage.c:3188:1: note: previous declaration of ‘fsg_common_from_params’ was here
drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_common_from_params’:
drivers/usb/gadget/f_mass_storage.c:3199:2: warning: passing argument 2 of ‘fsg_common_init’ from incompatible pointer type
drivers/usb/gadget/f_mass_storage.c:2741:27: note: expected ‘struct usb_composite_dev *’ but argument is of type ‘struct usb_composite_dev *’
make[1]: *** [drivers/usb/gadget/f_mass_storage.o] Error 1
make: *** [drivers/usb/gadget/f_mass_storage.o] Error 2
This is due to the missing include of linux/usb/composite.h - this patch
adds the missing include.
In addition there's also a problem in fsg_common_init() where we memset
'common', but we use the size of a pointer to 'struct fsg_common' as the
size argument to memset(), not the actual size of the struct. This patch
fixes the sizeof so we zero the entire struct as intended.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes the below compilation errors.
CC drivers/usb/gadget/ci13xxx_msm.o
CC net/mac80211/led.o
drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function)
drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once
drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.)
drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
make[3]: *** [drivers/usb/gadget] Error 2
MSM USB driver is not supported on boards like trout (MSM7201) which
has an external PHY.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
One of the USB CV MSC tests issues Get Max LUN request with
invalid wIndex (wIndex = 65535) parameter.
Add proper handling to prevent array index out of bounds issue.
Signed-off-by: Maulik Mankad <maulik@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix a bug where only half the number of endpoints supported by the
hardware are exposed to gadget. If DEN filed in the DCCPARAMS
register has 'N' then 'N' IN endpoints and 'N" OUT endpoints can be
supported. But only 'N' bidirectional endpoints are added to the
gadget ep_list. This patch also ensures that the data and handshake
transactions of previous setup packet are flushed upon a new setup
packet arrival on ep0.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Don't call gadget driver's unbind when bind is failed. Initialize
udc->driver only after gadget driver bind is successful. Otherwise
pull-up can be enabled upon VBUS session even when no gadget is
bounded.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When removing a serial gadget driver, the kernel warning message is outputted.
This patch fixed this issue.
The pch_udc driver did not have disconnection processing of gadget.
Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1442) fixes a bug in g_printer: Module parameters should
not be marked "__initdata" if they are accessible in sysfs (i.e., if
the mode value in the module_param() macro is nonzero). Otherwise
attempts to access the parameters will cause addressing violations.
Character-string module parameters must not be marked "__initdata"
if the module can be unloaded, because the kernel needs to access the
parameter variable at unload time in order to free the
dynamically-allocated string.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Roland Kletzing <devzero@web.de>
CC: Craig W. Nadler <craig@nadler.us>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1441) fixes a bug in g_printer. The gadget driver, char
device number, and class device should be unregistered in reverse
order of registration. As it is now, when the module is unloaded the
class device gets unregistered first, causing a crash when the unbind
method tries to access it.
This fixes Bugzilla #25882.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Roland Kletzing <devzero@web.de>
CC: Craig W. Nadler <craig@nadler.us>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Support new device OKI SEMICONDUCTOR's ML7213 IOH(Input/Output Hub) which is for
IVI(In-Vehicle Infotainment) use.
The ML7213 is companion chip for Intel Atom E6xx series.
The ML7213 is completely compatible for Intel EG20T PCH.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This PCH_UDC driver does not work normally when "Serial gadget" is used.
The receiving data of control transmission (EP0 Control OUT Transaction)
has not received correctly.
This patch fixed this issue.
The following was modified.
- The buffer size.
- The change processing of a receiving buffer
(The temporary buffer and the buffer prepared by gadget).
- The setup processing of a DMA descriptor.
Currently the PCH_UDC driver can work normally with "Serial gadget"
or "File-backed Storage Gadget".
Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
block: ensure that completion error gets properly traced
blktrace: add missing probe argument to block_bio_complete
block cfq: don't use atomic_t for cfq_group
block cfq: don't use atomic_t for cfq_queue
block: trace event block fix unassigned field
block: add internal hd part table references
block: fix accounting bug on cross partition merges
kref: add kref_test_and_get
bio-integrity: mark kintegrityd_wq highpri and CPU intensive
block: make kblockd_workqueue smarter
Revert "sd: implement sd_check_events()"
block: Clean up exit_io_context() source code.
Fix compile warnings due to missing removal of a 'ret' variable
fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p)
cfq-iosched: don't check cfqg in choose_service_tree()
fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors
cdrom: export cdrom_check_events()
sd: implement sd_check_events()
sr: implement sr_check_events()
...
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
usb: don't use flush_scheduled_work()
speedtch: don't abuse struct delayed_work
media/video: don't use flush_scheduled_work()
media/video: explicitly flush request_module work
ioc4: use static work_struct for ioc4_load_modules()
init: don't call flush_scheduled_work() from do_initcalls()
s390: don't use flush_scheduled_work()
rtc: don't use flush_scheduled_work()
mmc: update workqueue usages
mfd: update workqueue usages
dvb: don't use flush_scheduled_work()
leds-wm8350: don't use flush_scheduled_work()
mISDN: don't use flush_scheduled_work()
macintosh/ams: don't use flush_scheduled_work()
vmwgfx: don't use flush_scheduled_work()
tpm: don't use flush_scheduled_work()
sonypi: don't use flush_scheduled_work()
hvsi: don't use flush_scheduled_work()
xen: don't use flush_scheduled_work()
gdrom: don't use flush_scheduled_work()
...
Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits)
USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004)
USB: serial: ftdi_sio: add support for TIOCSERGETLSR
USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport
USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
usb: ehci-omap: fix tll channel enable mask
usb: ohci-omap3: fix trivial typo
USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096
USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's
USB: gadget: update ci13xxx to work with g_ether
USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers
Revert "USB: musb: pm: don't rely fully on clock support"
Revert "USB: musb: blackfin: pm: make it work"
USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
USB: uas: Ensure we only bind to a UAS interface
USB: uas: Rename sense pipe and sense urb to status pipe and status urb
USB: uas: Use kzalloc instead of kmalloc
USB: uas: Fix up the Sense IU
usb: musb: core: kill unneeded #include's
DA8xx: assign name to MUSB IRQ resource
usb: gadget: g_ncm added
...
Manually fix up trivial conflicts in USB Kconfig changes in:
arch/arm/mach-omap2/Kconfig
arch/sh/Kconfig
drivers/usb/Kconfig
drivers/usb/host/ehci-hcd.c
and annoying chip clock data conflicts in:
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/mach-omap2/clock44xx_data.c
The below patch fixes a typo "diable" to "disable" and also fixes another typo in a comment.
Please let me know if this is correct or not.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
flush_scheduled_work() is being deprecated. Directly flush or cancel
work items instead.
* u_ether, isp1301_omap, speedtch conversions are straight-forward.
* ochi-hcd should only flush when quirk_nec() is true as otherwise the
work wouldn't have been initialized.
* In oti6858, cancel_delayed_work() + flush_scheduled_work() ->
cancel_delayed_work_sync().
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Duncan Sands <duncan.sands@free.fr>
Cc: linux-usb@vger.kernel.org
This is to resolve the conflict in the file,
drivers/usb/gadget/composite.c that was due to a revert in Linus's tree
needed for the 2.6.37 release.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Conflicts:
MAINTAINERS
arch/arm/mach-omap2/pm24xx.c
drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
This reverts commit 1ab8323874.
Turns out this doesn't allow for the device ids to be overridden
properly, so we need to revert the thing.
Reported-by: Jef Driesen <jefdriesen@telenet.be>
Cc: Robert Lukassen <Robert.Lukassen@tomtom.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cdev struct is accessed in suspended sysfs show function. So
remove sysfs file before freeing the cdev in composite_unbind.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a free_irq() call on vbus gpio when we remove udc so that the
vbus irq is properly released.
Signed-off-by: Rob Emanuele <rje@crystalfontz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Page size for transaction descriptors for CI13XXX has nothing
common with page size from MM. Using platform and configuration
specific PAGE_SIZE is wrong.
Signed-off-by: Artem Leonenko <tikkeri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CI13xxx UDC driver doesn't call complete() callback for requests
with flag no_interrupt set. Thus gadget drivers (like g_ether) are
never notifed about successfully (or not) transmitted requests. As
a result in case of g_ether and queued request with no_interrupt=1
fields g_ether is never notifed about sent packets and TX stalls.
Solution: treat no_interrupt flag like all other UDC drivers do and
call complete() callback for all requests.
Signed-off-by: Artem Leonenko <tikkeri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There is one nasty scenario when CI13xxx driver fails:
a) two or more rx requests are queued (g_ether does that)
b) rx request completed, interrupt fires and ci13xxx dequeues rq
c) request complete() callback gets called and in turn it calls ep_queue()
c1) in ep_queue() request gets added to the TAIL of the rx queue list
d) ep gets primed with rq from (b)
e) interrupt fires
f) request gets popped from queue head for hw dequeue
G) requets from queue head wasn't enqueued
g1) isr_tr_complete_low() doesn't
enqueue more requests and it doesn't prime EP,
rx traffic stalls
Solution:
a) enque queued requests ASAP, i.e. before calling complete() callback.
b) don't HW enqueue and prime endpoint with recently added request and
use the oldest request in the queue.
Fixed issues:
a) ep_queue() may return an error code despite request was successfully
added to the queue (if _hardware_enqueue() fails)
b) Added requests are always processed in LIFO order, even if they are
added in complete() callback
c) Finally more than two and more queued requests are processed consistently,
even if they were added in complete() callback
The fix was successfully tested on MIPS based SoC with 4KEc CPU core and
CI13612 USB core. Board successfully boots with NFS root using g_ether
on ci13xxx udc.
Signed-off-by: Artem Leonenko <tikkeri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Built-in gadget drivers have NULL-ifed unbind() function. Checking
whether unbind() is NULL will never let any compiled into kernel
driver attach.
Signed-off-by: Artem Leonenko <tikkeri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb-next: (132 commits)
USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
USB: uas: Ensure we only bind to a UAS interface
USB: uas: Rename sense pipe and sense urb to status pipe and status urb
USB: uas: Use kzalloc instead of kmalloc
USB: uas: Fix up the Sense IU
usb: musb: core: kill unneeded #include's
DA8xx: assign name to MUSB IRQ resource
usb: gadget: g_ncm added
usb: gadget: f_ncm.c added
usb: gadget: u_ether: prepare for NCM
usb: pch_udc: Fix setup transfers with data out
usb: pch_udc: Fix compile error, warnings and checkpatch warnings
usb: add ab8500 usb transceiver driver
USB: gadget: Implement runtime PM for MSM bus glue driver
USB: gadget: Implement runtime PM for ci13xxx gadget
USB: gadget: Add USB controller driver for MSM SoC
USB: gadget: Introduce ci13xxx_udc_driver struct
USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask
USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc
USB: gadget: Separate out PCI bus code from ci13xxx_udc
...
This patches makes possible to use composite framework and f_ncm
NCM function driver to build a standalone NCM gadget device.
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Initial submittion of NCM link function driver.
The driver's logic is based on f_ecm driver and does not
use most of the NCM advantages like frame grouping and alignment.
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
NCM is a Network Control Model, subclass of USB CDC class,
specification is available at http://www.usb.org/developers/devclass_docs
This patch makes possible for u_ether to use multiply of wMaxPacketSize
predefined size transfers without ZLP (Zero Length Packet), required
by NCM spec.
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes an issue where the driver does not handle out data in
setup transactions.
The per endpoint cached status register is cleared in the
pch_udc_svc_control_out function. When there is out data available the
function pch_udc_svc_data_out is called which tries to pick it up the
status, which now is cleared to 0. When the status is 0, the function
doesn't start reading the data from the FIFO.
There is a second bug in all this, pch_udc_svc_data_out takes the
endpoint number (0 for EP0), while pch_udc_svc_control_out passes the
endpoint index (1 for EP0). Effectively pch_udc_svc_data_out picks up
the wrong internal ep structure.
This patch makes sure to put back the cached status and pass the
endpoint number rather than index when calling pch_udc_svc_data_out.
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Building pch_udc in linux-next fails, this patch fixes the a compile
error:
drivers/usb/gadget/pch_udc.c: In function ‘usb_gadget_register_driver’:
drivers/usb/gadget/pch_udc.c:2645: error: ‘struct usb_gadget_driver’ has no member named ‘bind’
drivers/usb/gadget/pch_udc.c:2664: error: ‘struct usb_gadget_driver’ has no member named ‘bind’
And a couple of compiler warnings and checkpatch warnings.
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OTG driver takes care of putting hardware in low power mode. Hence
not registered for any runtime PM callbacks.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The actual suspend/resume work is delegated to bus glue driver, which
is responsible for putting hardware in low power mode.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
MSM SoC has chipidea USB controller. So use ci13xxx_udc core.
This driver depends on transceiver driver for clock control,
PHY initialization, VBUS detection. Register for notify_event
callback to perform MSM specific quirks after controller is reset
and stopped.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Introduces ci13xxx_udc_driver struct for bus glue drivers to hint
ci13xxx_udc core about their special requirements. The flags include
avoiding hardware register access when controller is not in peripheral
mode, enabling pull-up upon VBUS, disabling streaming mode and dependency
on transceiver driver.
Initialize gadget_ops in udc_probe so that transceiver can notify VBUS
presence even when no gadget driver is bounded.
A notify_event callback is embedded in the same struct. This patch implements
two events called CONTROLLER_RESET_EVENT and CONTROLLER_STOPPED_EVENT to
notify the bus glue driver after resetting and stopping the controller for
performing SoC specific quirks.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dma_alloc_coherent() which is internally called by dma_pool_alloc()
flags a warning if device's coherent DMA mask. Hence initialize
gadget device's coherent DMA mask to it's parent mask.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dma_pool_alloc() require sleeping context when called with GFP_KERNEL
argument. Hence release the spin lock before calling dma_pool_alloc().
usb_ep_alloc_request can also be called with non-atomic GFP flags. Hence
get rid off spin lock while allocation request memory.
Use GFP_ATOMIC flag for allocating request for ep0 in interrupt handler.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move PCI bus code from ci13xxx_udc to a new file ci13xxx_pci. SoC's
which has MIPS USB core can include the ci13xxx_udc and keep bus glue
code in their respective gadget controller drivers.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
IS_ERR() already implies unlikely(), so it can be omitted here.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit 06c3859 (usb: gadget/imx-udc: remove usage of deprecated symbol
USBD_INT0) was a bit precipitant because the name used instead didn't
match the usual naming scheme for irqs on arm/imx. I renamed the irq to
the right name in e083000 (ARM: imx: dynamically allocate imx_udc
device) when 06c3859 didn't hit Linus' tree, so I missed to add a
compat #define.
This patch allows compiling imx_udc.c with and without e083000.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
change all ocurrences of musb_hdrc to musb-hdrc.
We will call glue layer drivers musb-<glue layer>,
so in order to keep things somewhat standard, let's
change the underscore into a dash.
Signed-off-by: Felipe Balbi <balbi@ti.com>
commits 2eb42d5c28 and
9e1dde3387 renamed some defines
but didn't fix all the places where these defines are used
leading to a compile failure for USB on i.MX31, 35 and 27.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch add USB client support Marvell PXA9xx/PXA168 chips. The USB
controller in PXA9xx/PXA168 is a High-Speed OTG controller. The available
endpoints is different between PXA9xx and PXA168.
NOTE:
It is the first version of Marvell PXA9xx/PXA168 USB controller driver.
The support for OTG mode will be added in later patch.
PXA9xx and PXA168 has integrated UTMI PHY in the chips. The initialization
for the PHY is a little different between PXA9xx and PXA168.
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds test mode support for Langwell gadget driver.
Signed-off-by: Henry Yuan <hang.yuan@intel.com>
Signed-off-by: Andy Luo <yifei.luo@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>