lkml.org 
[lkml]   [2018]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/3] Staging: octeon-usb: Breaks down cvmx_usb_poll_channel().
From
Date
On Thu, 2018-07-26 at 18:41 +0300, Georgios Tsotsos wrote:
> In order to make this function more clear a new function created that controls
> channels halt on no DMA mode.
[]
> diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
[]
> @@ -2585,6 +2585,52 @@ static void cvmx_usb_transfer_isoc(struct octeon_hcd *usb,
> }
> }
>
> +/**
> + * Handles channels halt in non DMA mode
> + * @usbc_hcchar: Host Channel-n Characteristics Register (HCCHAR)
> + * @usbc_hcint: Host Channel-n Interrupt Register
> + * @usb: USB device
> + * @channel: Channel to poll
> + *
> + * In non DMA mode the channels don't halt themselves. We need
> + * to manually disable channels that are left running
> + *
> + * Returns: -1 on halt
> + */
> +static int cvmx_usb_dma_halt(union cvmx_usbcx_hccharx usbc_hcchar,
> + union cvmx_usbcx_hcintx usbc_hcint,

It looks very suspect to pass unions on the stack.

Are you sure these aren't used after this function
is called?

Likely these should be pointers to unions.

\
 
 \ /
  Last update: 2018-07-26 18:31    [W:0.136 / U:1.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site