From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 29 Feb 2012 22:38:58 +0100 Subject: [U-Boot] [PATCH v2 1/2] usb: align buffers at cacheline In-Reply-To: <4F4C9FBF.9040103@nvidia.com> References: <201202271749.21872.marex@denx.de> <4F4C9FBF.9040103@nvidia.com> Message-ID: <201202292238.59097.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > Hi Marek, > IMO, Simon has already mentioned the reason of using > ALLOC_CACHE_ALIGN_BUFFER, > Please find below my explanation about other doubts. > > On Monday 27 February 2012 10:19 PM, Marek Vasut wrote: > >> As DMA expects the buffers to be equal and larger then > >> cache lines, This aligns buffers at cacheline. > >> > >> Signed-off-by: Puneet Saxena > >> Signed-off-by: Jim Lin > >> --- > > > > First of all, thanks for this patch, it really helps. But, there are a > > few things that concern me. > > > >> Changes for V2: > >> - Use "ARCH_DMA_MINALIGN" directly > >> - Use "ALIGN" to align size as cacheline > >> - Removed headers from usb.h > >> - Send 8 bytes of device descriptor size to read > >> > >> Max packet size > >> > >> scsi.h header is needed to avoid extra memcpy from local buffer > >> to global buffer. > >> > >> common/cmd_usb.c | 3 +- > >> common/usb.c | 61 > >> > >> ++++++++++++++++++++++++------------------ common/usb_storage.c | > >> 59 +++++++++++++++++++---------------------- disk/part_dos.c > >> | > >> > >> 2 +- > >> > >> drivers/usb/host/ehci-hcd.c | 8 +++++ > >> include/scsi.h | 4 ++- > >> 6 files changed, 77 insertions(+), 60 deletions(-) > >> > >> diff --git a/common/cmd_usb.c b/common/cmd_usb.c I see, thanks for explaining! M