hi, On Mon, Nov 30, 2009 at 10:29:12AM +0100, ext Anand Gadiyar 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 ? -- balbi -- 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