Re: FW: [PATCH v3] usb: musb: do not use dma for control transfers

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

 



Does your solution supports mixing of DMA and PIO?

The MUSB DMA doesn't support odd number of bytes or mixing 1/2/4 byte
access. So, we will need mixing of DMA and PIO mode for transfer.
There is a need to add the cache flush/invalidate code by default when
switching between PIO and DMA mode. The cache flush/invalidate code
needs to be added in the generic code as it already knows if a chain
is setup using DMA or not.

> -----Original Message-----
> From: Pandita, Vikram [mailto:vikram.pandita@xxxxxx]
> Sent: Wednesday, August 04, 2010 10:28 PM
> To: Gadiyar, Anand; linux-usb@xxxxxxxxxxxxxxx
> Cc: Mankad, Maulik Ojas; Shilimkar, Santosh; Oliver Neukum; Alan Stern; Praveena NADAHALLY; Felipe Balbi; Gupta, Ajay Kumar
> Subject: RE: [PATCH v3] usb: musb: do not use dma for control transfers
>
>
>
>>-----Original Message-----
>>From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-
>>owner@xxxxxxxxxxxxxxx] On Behalf Of Gadiyar, Anand
> <snip>
>>Index: kernel-omap4-base/include/linux/usb.h
>>===================================================================
>>--- kernel-omap4-base.orig/include/linux/usb.h 2010-08-04
>>14:57:04.109948812 +0530
>>+++ kernel-omap4-base/include/linux/usb.h      2010-08-04 14:58:20.817938610
>>+0530
>>@@ -311,6 +311,10 @@
>>       int busnum;                     /* Bus number (in order of reg) */
>>       const char *bus_name;           /* stable id (PCI slot_name etc) */
>>       u8 uses_dma;                    /* Does the host controller use DMA? */
>>+      u8 uses_pio_for_control;        /*
>>+                                       * Does the host controller use PIO
>>+                                       * for control transfers?
>>+                                       */
>
> Wondering we already have uses_dma an 8-bit flag available.
> Is it wise to use the uses_dma flag as a bit mask to show DMA properties
> and avoid adding additional u8?
>
> Something like:
> DMA_NONE                        (0)
> DMA_ENABLE_BULK         (1<0)
> DMA_ENABLE_CONTROL      (1<1)
>
> So that if (uses_dma) still continues to work
> And anyone having a need or CONTROL DMA can check explicitly...
>
>>       u8 otg_port;                    /* 0, or number of OTG/HNP port */
>>       unsigned is_b_host:1;           /* true during some HNP roleswitches */
>>       unsigned b_hnp_enable:1;        /* OTG: did A-Host enable HNP? */
> <snip>
>
--
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