Commit graph

74 commits

Author SHA1 Message Date
Arvind Yadav
27acb55764 staging: most: usb: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Andrey Shvetsov
d35bbfaa4a staging: most: remove dependency on networking-aim
The modules hdm-usb and hdm-dim2 depend on the module aim-network, because
they use the function most_deliver_netinfo that it exports.

To remove this dependency, this patch replaces the call of the function
most_deliver_netinfo with the call of the function that is the parameter
'on_netinfo' of the function request_netinfo.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 11:59:09 +02:00
Linus Torvalds
c6a677c6f3 Staging/IIO patches for 4.12-rc1
Here is the big staging tree update for 4.12-rc1.  And it's a big one,
 adding about 350k new lines of crap^Wcode, mostly all in a big dump of
 media drivers from Intel.  But there's other new drivers in here as
 well, yet-another-wifi driver, new IIO drivers, and a new crypto
 accelerator.  We also deleted a bunch of stuff, mostly in patch
 cleanups, but also the Android ION code has shrunk a lot, and the
 Android low memory killer driver was finally deleted, much to the
 celebration of the -mm developers.
 
 All of these have been in linux-next with a few build issues that will
 show up when you merge to your tree, I'll follow up with fixes for those
 after this gets merged.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWQzzlQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ylNMgCcD+GoaF/Ml7YnULRl2GG/526II78AnitZ8qjd
 rPqeowMIewYu9fgckLUc
 =7rzO
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO updates from Greg KH:
 "Here is the big staging tree update for 4.12-rc1.

  It's a big one, adding about 350k new lines of crap^Wcode, mostly all
  in a big dump of media drivers from Intel. But there's other new
  drivers in here as well, yet-another-wifi driver, new IIO drivers, and
  a new crypto accelerator.

  We also deleted a bunch of stuff, mostly in patch cleanups, but also
  the Android ION code has shrunk a lot, and the Android low memory
  killer driver was finally deleted, much to the celebration of the -mm
  developers.

  All of these have been in linux-next with a few build issues that will
  show up when you merge to your tree"

Merge conflicts in the new rtl8723bs driver (due to the wifi changes
this merge window) handled as per linux-next, courtesy of Stephen
Rothwell.

* tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1182 commits)
  staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd
  staging: ks7010: remove line continuations in quoted strings
  staging: vt6656: use tabs instead of spaces
  staging: android: ion: Fix unnecessary initialization of static variable
  staging: media: atomisp: fix range checking on clk_num
  staging: media: atomisp: fix misspelled word in comment
  staging: media: atomisp: kmap() can't fail
  staging: atomisp: remove #ifdef for runtime PM functions
  staging: atomisp: satm include directory is gone
  atomisp: remove some more unused files
  atomisp: remove hmm_load/store/clear indirections
  atomisp: kill off mmgr_free
  atomisp: clean up the hmm init/cleanup indirections
  atomisp: handle allocation calls before init in the hmm layer
  staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver
  staging: fsl-dpaa2/eth: Add TODO file
  staging: fsl-dpaa2/eth: Add trace points
  staging: fsl-dpaa2/eth: Add driver specific stats
  staging: fsl-dpaa2/eth: Add ethtool support
  staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver
  ...
2017-05-05 18:16:23 -07:00
Mauro Carvalho Chehab
e1c3e6e1ca docs-rst: fix usb cross-references
As some USB documentation files got moved, adjust their
cross-references to their new place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-04-11 14:41:29 -06:00
Christian Gromm
b2e8aa52e2 staging: most: usb: pass correct register table
Inside the function store_value() the table of writable registers need to
be passed to function get_static_reg_addr() or else the correct register
address is never going to be found.

Reported-by: Alex Riesen <alexander.riesen@cetitec.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:40 +02:00
Andrey Shvetsov
5c13155d19 staging: most: usb: fix size overflow
Despite the user payload may not be bigger than (2**16 - 1) bytes, the
final packet size may be bigger because of the gap space needed for the
controller.

This patch removes the temporary variables of the type u16 that are used
to hold the offsets that may be bigger than 2**16 bytes.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:40 +02:00
Andrey Shvetsov
f500192890 staging: most: usb: fix calculation of the extra_len
The final size of the buffer used for the streaming transfer consists of
the size for the user payload (buffer_size) and the size for the gaps
needed by the controller (extra_len).

The current implementation of the hdm_configure_channel() corrects the
buffer size down to the next appropriate for the hardware value, that is
the whole number of frames, but uses the old unaligned value to
calculate the extra_len.

Current patch fixes the described problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:41:40 +02:00
Sebastian Haas
f3147b66a8 staging: most: hdm-usb: fix symbolic permissions warning
Replace symbolic permissions with their octect representation to fix
checkpatch warnings.

Signed-off-by: Sebastian Haas <sehaas@deebas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-27 09:40:56 +01:00
Eric Salem
5a10380bfb staging: most: hdm-usb: Fix mismatch between types used in sizeof operator
Fixed mismatch between types used in sizeof operator.

Signed-off-by: Eric Salem <ericsalem@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-16 18:08:56 +01:00
Ramiro Oliveira
cbe50fc432 staging: most: change dma_buf variable to __le16
dma_buf is being cast to __le16 *, but it was defined as u16 *.
sparse reported this error as:
drivers/staging/most/hdm-usb/hdm_usb.c:158:16: warning: cast to restricted
__le16

This patch changes dma_buf from u16 to __le16.

Signed-off-by: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-05 18:48:03 +01:00
Christian Gromm
25e3854c83 staging: most: hdm-usb: add comment
This patch adds a comment to function hdm_configure_channel() to clarify
its execution paths.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30 11:09:02 -04:00
Andrey Shvetsov
e33269f60a staging: most: hdm-usb: introduce synchronization function
This patch introduces the function start_sync_ep() and relocates the
triggers for synchronization to this function.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:12:09 +02:00
Andrey Shvetsov
7c23baa90d staging: most: hdm-usb: do h/w specific synchronization at configuration time
This patch puts the synchronization procedure trigger for asynchronous
channels into the function hdm_configure_channel. Likewise, it removes
triggering of hardware specific synchronization for other channel types
from the probe function as it is not required.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:12:08 +02:00
Andrey Shvetsov
3a542007fd staging: most: hdm-usb: fix mbo buffer leak
This patch fixes an MBO leak by replacing the proprietary
free_anchored_buffers() function with the usb_kill_anchored_urbs() function
of the USB subsystem and guarantees that the mbo->complete() completion
function is being called for each URB.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:14 +02:00
Andrey Shvetsov
f28e6cd3ac staging: most: hdm-usb: remove filtering of networking state
In case the networking interface goes down and up again, the USB HDM does
not report the state the MOST networking interface controller is in. This
might lead to nonfunctional network.

Since the networking AIM already takes care of hardware address checking
and tracing it can be removed from the HDM USB, which is what this patch is
doing.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:13 +02:00
Andrey Shvetsov
0540609fe2 staging: most: replace MOST_CH_ISOC_AVP with MOST_CH_ISOC
This patch replaces the enum value MOST_CH_ISOC_AVP with the more
appropriate MOST_CH_ISOC.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Eva Rachel Retuya
520a28443f staging: most: hdm-usb: convert pr_warn() to dev_warn()
Replace pr_warn() call with its respective dev_warn() counterpart.
Semantic patch used to detect and apply the transformation:

@a@
identifier dev;
expression E;
@@

	struct device *dev = E;
	<+... when != dev == NULL
- pr_warn(
+ dev_warn(dev,
		...);
	...+>

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:59:45 +02:00
Christian Gromm
88d1878bca staging: most: hdm-usb: rename channel related spinlock
To increase comprehension this patch renames the channel related
spinlock with a more fitting name.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 08:39:42 +02:00
Christian Gromm
3fbcb92b74 staging: most: hdm-usb: remove calls to usb_unachor_urb
This patch removes the calls to usb_unanchor_urb() from the completion
routines, since disassociation of the URBs is already handles by the
USB subsystem.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 08:39:42 +02:00
Christian Gromm
d223b37c9f staging: most: hdm-usb: remove redundant spinlocks
This patch removes the spinlocks when accessing the usb_anchor list,
because the struct usb_anchor is using its own lock.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 08:39:42 +02:00
Christian Gromm
27e6245e35 staging: most: hdm-usb: remove proprietary urb anchoring
This patch removes the propietary tracking of URBs. Instead the structure
usb_anchor of the USB subsystem is used.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 08:39:42 +02:00
Christian Gromm
98a3c4d7ae staging: most: hdm-usb: remove repeated access to structure
This patch removes the repeated access to a struct member by assigning
its value to a local variable once.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Andrey Shvetsov
3e2880bee5 staging: most: hdm-usb: remove reference to read function in write only macro
This patch replaces the reference to the function show_value() with
NULL in the macro MOST_DCI_WO_ATTR used for the write only attributes.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Andrey Shvetsov
ac33fbb865 staging: most: hdm-usb: initialize variables by declaration
This patch moves initialization of the variables to the declaration
where possible.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Christian Gromm
0e9b9d0831 staging: most: hdm-usb: unify variable names
This patch is needed to have the same variable name for the same quantity
in the functions show_value() and store_value().

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Andrey Shvetsov
a27cb25b64 staging: most: hdm-usb: unify returned errors
This patch is needed to return the same error codes for the same error
cases in the functions show_value() and store_value().

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Christian Gromm
a747b42c8c staging: most: hdm-usb: replace if-else branches with lookup table
This patch removes a series of if-else-if conditions with a lookup table.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Christian Gromm
d5cfb0ff2e staging: most: hdm-usb: use defined error codes
This patch replaces return values with defined error codes to indicate
an exception.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Christian Gromm
c0554645a8 staging: most: hdm-usb: extend DCI access
This patch extends the direct communication interface ABI of the USB
network interface controller. It is needed to provide applications
arbitrary access to DCI registers and the ability to synchronize the
internal endpoint logic of the controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 09:47:15 +02:00
Christian Gromm
5bf9bd8d19 staging: most: hdm-usb: add support for new USB gadget
This patch is needed to make the driver support Microchip's OS81210 USB
MOST network interface controller. It simply adds the gadget's product
ID to the driver's ID table.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
9736fc0434 staging: most: hdm-usb: remove unnecessary status assignment
The USB completion callbacks set the status field of an MBO object before
scheduling the clear_work. This patch removes this redundant assignment as
the work_struct does the same for all MBOs.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
089612f183 staging: most: hdm-usb: init variables at declaration time
This patch initializes variables by the time they are declared.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
dd53ecbace staging: most: hdm-usb: remove redundant parenthesis
This patch removes unnecessary parenthesis in boolean expressions.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
4b1a7cf1cc staging: most: hdm-usb: remove completion object
Waiting for the urb_compl object to complete evaluates always as false.
This patch removes this unnecessary completion object.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
b24c9fe9fc staging: most: hdm-usb: synchronize release of struct buf_anchor
In case a channel that is going to be destroyed has been tagged as not
"healthy" by the function hdm_poison_channel() while the functions
hdm_write_completion() or hdm_read_completion() are being executed, they
race for destruction of buf_anchor.

This patch fixes the problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
cf6a599ef7 staging: most: hdm-usb: assign spinlock to local variable
This patch assigns the spinlock of struct mdev to local spinlock_t
variable to get rid of all the ugly dereferencing.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
bf9503f11d staging: most: hdm-usb: fix race between enqueue and most_stop_enqueue
The "broken in pipe" handler of the USB-HDM calls most_stop_enqueue() to
stop the MBO traffic before returning all MBOs back to the Mostcore.  As
the enqueue() call from the Mostcore may run in parallel with the
most_stop_enqueue(), the HDM may run into the inconsistent state and
crash the kernel.

This patch synchronizes enqueue(), most_stop_enqueue() and
most_resume_enqueue() with a mutex, hence avoiding the race condition.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
cf05918370 staging: most: hdm-usb: simplify initialization of mbo->status.
This patch simplifies the code that initializes mbo->status.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
4246501e23 staging: most: hdm-usb: remove redundant conditions
This patch removes the duplication of the expression
(urb->status == -ENOENT || urb->status == -ECONNRESET).

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
879c93fefd staging: most: hdm-usb: make use of is_channel_healthy flag
This patch makes the write completion handler use the is_channel_healthy
flag to prevent the hdm from scheduling a second clear_halt workqueue in
case an endpoint reported a STALL condition.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:57 +02:00
Christian Gromm
654f7ec4b3 staging: most: hdm-usb: rename ID_INIC for consistency
In order to have a consistent naming convention this patch renames
USB_DEV_ID_INIC to USB_DEV_ID_OS81118.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:56 +02:00
Christian Gromm
b50762eaf8 staging: most: hdm-usb: add USB product id
This patch adds support for the OS81119 MOST network interface controller
to the driver.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:56 +02:00
Christian Gromm
72df4a55e9 staging: most: hdm-usb: stop core from submitting buffers in case of broken pipe
This patch ensures that no more packets are submitted by the core in
case an USB endpoint has reported a broken pipe (-EPIPE).

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:56 +02:00
Christian Gromm
cc28983c32 staging: most: hdm-usb: fix clear halt processing
This patch is needed to ensure that submitted URBs get unlinked before
the driver calls usb_clear_halt(). Since the halt condition of an USB
endpoint is channel related, the work_struct is moved from a buffer
basis to a channel basis.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:56 +02:00
Christian Gromm
9ed745ff8e staging: most: hdm-usb: provide MBO status when freeing buffers
This patch adds the additional status parameter to function
free_anchored_buffers. This allows to dispatch further processing based
on this flag.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:56 +02:00
Christian Gromm
cce9301937 staging: most: hdm-usb: remove unused macro HW_RESYNC
This patch removes the macro HW_RESYNC that is not used anymore.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 16:53:56 +02:00
Christian Gromm
ec7e0a189b staging: most: hdm-usb: reduce context of list_del mutex
This patch reduces context of the list_del mutex for the function
hdm_enqueue().

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:36:47 +02:00
Wolfram Sang
ca47d8f3ff staging: most: hdm-usb: hdm_usb: don't print error when allocating urb fails
kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 15:56:33 +02:00
Amitoj Kaur Chawla
720f7a7850 staging: most: hdm-usb: Remove invalid reference error
commit e3479f77("staging: most: hdm-usb: Remove create_workqueue()")
cancel_work_sync(&anchor->clear_work_obj) is introduced after freeing
`anchor` causing a invalid reference error. This patch removes this
error by shifting the call to cancel_work_sync before freeing
`anchor`.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Sandhya Bankar
afd14cef01 Staging: most: Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddress & USB_DIR_IN).
Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddress & USB_DIR_IN) to check if the endpoint has IN direction.
This correction is based on following semantic patch,

@@
struct usb_endpoint_descriptor *endpoint;
expression E;
@@

(
- endpoint->bEndpointAddress & USB_DIR_IN
+ usb_endpoint_dir_in(endpoint)
|
- endpoint->bEndpointAddress == USB_DIR_IN
+ usb_endpoint_dir_in(endpoint)
|
- (endpoint->bEndpointAddress & E) == USB_DIR_IN
+ usb_endpoint_dir_in(endpoint)
)

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-10 19:26:05 -08:00