aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-09-11Staging: octeon-hcd: removed dummy labelNitin Kuppelur1-3/+1
This is a patch to the octeon-hcd.c file that fixes removes dummy label i.e. label followed by return of void function Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08Staging: octeon-hcd: removed unwanted return from voidNitin Kuppelur1-9/+0
This is a patch to the octeon-hcd.c file that fixes checkpatch.pl warning by removing return statement from void functions. Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-02staging: octeon-usb: use USB_DIR_INAaro Koskinen1-7/+7
Replace a magic value with #defined macro. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-02staging: octeon-usb: use generic control packet headerAaro Koskinen1-36/+14
Use generic control packet header structure definition. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: fix endianness bugAaro Koskinen1-1/+1
wHubCharacteristics gets wrong value on big-endian CPUs. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: return transferred bytes only on successAaro Koskinen1-1/+5
Return transferred bytes only when transfer was successful. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: don't retry on data toggle errorAaro Koskinen1-2/+3
On data toggle error, we don't know if and how many bytes were successfully transferred by DMA. We should just fail the transaction instead of trying a retry. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: use usb_hcd_link_urb_to_ep()Aaro Koskinen1-1/+17
The driver did not use link_urb_to_ep() / unlink_urb_from_ep(). This caused odd behaviour in some error recovery situations, all requests would start to fail after the first failure. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: drop dequeue taskletAaro Koskinen1-37/+1
Cancel requests synchronously instead of using the dequeue tasklet. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: Convert __FUNCTION__ to __func__Joe Perches1-1/+1
Use the normal mechanism for emitting a function name. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: Fix lines with more than 80 chars in octeon-hcd.cPaul Davies C1-23/+66
Some lines with more than 80 characters are converted in to multiple lines. Signed-off-by: Paul Davies C <pauldaviesc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: Add blank line after all declarations in octeon-hcd.cPaul Davies C1-2/+17
Add blank lines after each declarations in drivers/staging/octeon-usb/octeon-hcd.c. Signed-off-by: Paul Davies C <pauldaviesc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: use generic prefetchAaro Koskinen1-11/+5
Use generic prefetch. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: delete redudant prefetchesAaro Koskinen1-2/+0
cvmx_usb_pipe fits into a cache-line so additional prefetches are not really helping anything. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23Staging:Octeon-usb:octeon-hcd.c return valuePaul McQuade1-1/+1
return value instead of function. Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-20staging: octeon-usb: prevent memory corruptionAaro Koskinen1-0/+108
octeon-hcd will crash the kernel when SLOB is used. This usually happens after the 18-byte control transfer when a device descriptor is read. The DMA engine is always transfering full 32-bit words and if the transfer is shorter, some random garbage appears after the buffer. The problem is not visible with SLUB since it rounds up the allocations to word boundary, and the extra bytes will go undetected. Fix by providing quirk functions for DMA map/unmap that allocate a bigger temporary buffer when necessary. Tested by booting EdgeRouter Lite to USB stick root file system with SLAB, SLOB and SLUB kernels. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=72121 Reported-by: Sergey Popov <pinkbyte@gentoo.org> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07Staging: octeon-usb: Remove unnecessary bracketsRaluca Oncioiu1-3/+3
Remove brackets from single line branches of if statements. Break long lines. Signed-off-by: Raluca Oncioiu <raluca.oncioiu91@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07Staging: octeon-usb: Break up long linesRaluca Oncioiu1-202/+436
Break up long lines. Signed-off-by: Raluca Oncioiu <raluca.oncioiu91@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging: octeon-usb: Probe via device tree populated platform device.David Daney1-157/+116
Extract clocking parameters from the device tree, and remove now dead code and types. Signed-off-by: David Daney <david.daney@cavium.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08usb: hcd: move controller wakeup setting initialization to individual driverPeter Chen1-0/+1
Individual controller driver has different requirement for wakeup setting, so move it from core to itself. In order to align with current etting the default wakeup setting is enabled (except for chipidea host). Pass compile test with below commands: make O=outout/all allmodconfig make -j$CPU_NUM O=outout/all drivers/usb Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use list.h for transactionsAaro Koskinen1-41/+36
Use list.h helpers for transactions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use list.h for pipesAaro Koskinen1-81/+24
Use list.h helpers for pipes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use list_for_each_entry_safe()Aaro Koskinen1-2/+3
Use list_for_each_entry_safe() when deleting all list items. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use list_del_init()Aaro Koskinen1-8/+3
Replace list_del() + INIT_LIST_HEAD() with list_del_init(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use dynamic allocation for pipesAaro Koskinen1-37/+3
Use dynamic memory allocation for pipes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use dynamic allocation for transactionsAaro Koskinen1-73/+2
Use dynamic memory allocation for transactions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: use a single .h fileAaro Koskinen3-365/+312
Merge USBC and USBN register definitions into a single header file. Although all HW definitions are purely internal to the driver, it's better to keep them separate due to the large size of the file. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: CN3xxx: program p_xenbn and p_rclk through p_rtypeAaro Koskinen2-108/+25
Do the clock setup through p_rtype on all OCTEONs. This enables to get rid of duplicated register definitions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: delete cvmx_usbnx_clk_ctl_cn50xxAaro Koskinen2-98/+15
Add the missing bits to common clk ctl definition, and we can delete duplicated definitions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: octeon-usb: delete unused cvmx_usbnx_usbp_ctl_status definitionsAaro Koskinen1-382/+0
cvmx_usbnx_usbp_ctl_status was multiplied for different OCTEONS and all those definitions are unused. Delete them. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: refactor __cvmx_usb_pipe_needs_splitAaro Koskinen1-1/+2
Split a long line and remove redundant parenthesis. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: eliminate submit_handleAaro Koskinen1-142/+90
Eliminate submit_handle, use a direct reference instead. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: eliminate pipe_handleAaro Koskinen1-129/+92
Eliminate pipe_handle, use a direct reference instead. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: clean up hcpriv usageAaro Koskinen1-6/+6
Use ep->hcpriv for pipe handle and urb->hcpriv for submit handle, instead of packing both into the same field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: cvmx_usb_submit_control: get params from urbAaro Koskinen1-46/+10
Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: cvmx_usb_submit_interrupt: get params from urbAaro Koskinen1-21/+5
Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: cvmx_usb_submit_control: get params from urbAaro Koskinen1-27/+6
Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: cvmx_usb_submit_bulk: get params from urbAaro Koskinen1-20/+4
Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: replace generic transfer callback data with urbAaro Koskinen1-24/+19
URB is always passed, so we can use strong typing here. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: call transfer completion callback directlyAaro Koskinen1-243/+111
The callback is always the same, we can just call it directly. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: call port change callback directlyAaro Koskinen1-101/+31
Call port change callback directly. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: inline cvmx_usb_set_statusAaro Koskinen1-27/+5
Inline a trivial function. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: eliminate cvmx_usb_internal_stateAaro Koskinen1-133/+77
Eliminate cvmx_usb_internal_state, just use cvmx_usb_state everywhere. This also enables to allocate only the needed amount of data for the USB internal state, instead of always allocating 64 KB. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06staging: octeon-usb: merge cvmx-usb into octeon-hcdAaro Koskinen4-3711/+3417
cvmx-usb module provided Cavium "OS abstraction layer" for USB functionality. To make this driver a proper Linux driver, we need to refactor this layer out. By making all the code internal to the HCD driver makes this task easier. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: octeon-usb: cvmx-usb.h: make comments to fit into 80 columnsAaro Koskinen1-7/+7
Make comments to fit into 80 columns. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: octeon-usb: cvmx-usb.c: make comments to fit into 80 columnsAaro Koskinen1-41/+108
Make comments to fit into 80 columns. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: octeon-usb: cvmx-usb: delete unused macrosAaro Koskinen1-8/+0
Delete unused cvmx_read_csr / cvmx_write_csr macros. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: octeon-usb: eliminate CVMX_PREFETCH_PREFXAaro Koskinen1-3/+2
Eliminate CVMX_PREFETCH_PREFX. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: octeon-usb: eliminate CVMX_PREFETCH_PREF0Aaro Koskinen1-3/+1
Eliminate CVMX_PREFETCH_PREF0. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: octeon-usb: delete CVMX_PREFETCH128Aaro Koskinen1-1/+0
Delete unused macro. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>