RE: [PATCH v3 RFC/RFT] MUSB: Do not enable TX and RX DMA at the same time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe Balbi wrote:
> Hi,
> 
> On Mon, Nov 30, 2009 at 11:53:26AM +0100, ext Sergei Shtylyov wrote:
> >>> @@ -175,6 +182,19 @@ static int dma_channel_program(struct dm
> >>>     BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN ||
> >>>         channel->status == MUSB_DMA_STATUS_BUSY);
> >>>
> >>> +    /* In version 1.4, if two DMA channels are simultaneously
> >>> +     * enabled in opposite directions, there is a chance that
> >>> +     * the DMA controller will hang. However, it is safe to
> >>> +     * have multiple DMA channels enabled in the same direction
> >>> +     * at the same time.
> >>> +     */
> >>> +    if (musb->hwvers == MUSB_HWVERS_1400) {
> >>> +        if (musb_channel->transmit && controller->rx_active)
> >>> +            return false;
> >>> +        else if    (!musb_channel->transmit && controller->tx_active)
> >>> +            return false;
> >>
> >> how about returning error code here ?
> >
> >   How? The channel_program() method returns zero on error, and non-zero
> >on sucess.
> 
> if this is on top of the mode1 support then you're wrong:
> 

No, this was on current mainline tree so people can test it
straight away.

- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux