All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Sanket Parmar <sparmar@cadence.com>
Cc: peter.chen@kernel.org, pawell@cadence.com, a-govindraju@ti.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kurahul@cadence.com, gregkh@linuxfoundation.org, kishon@ti.com
Subject: Re: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation
Date: Tue, 9 Mar 2021 09:28:04 +0000	[thread overview]
Message-ID: <20210309092804.GA76839@infradead.org> (raw)
In-Reply-To: <1615267180-9289-2-git-send-email-sparmar@cadence.com>

On Tue, Mar 09, 2021 at 06:19:40AM +0100, Sanket Parmar wrote:
> dma_alloc_coherent() might fail on the platform with a small DMA region.
> 
> To avoid such failure in cdns3_prepare_aligned_request_buf(),
> dma_alloc_coherent() is replaced with kmalloc and dma_map API to
> allocate aligned request buffer of dynamic length.

dma_alloc_noncoherent is the proper API instead of using kmalloc, which
can lead to unaddressable memory that might require bounce buffering.

  reply	other threads:[~2021-03-09  9:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09  5:19 [PATCH 1/2] usb: cdns3: Use dma_pool_* api to alloc trb pool Sanket Parmar
2021-03-09  5:19 ` [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation Sanket Parmar
2021-03-09  9:28   ` Christoph Hellwig [this message]
2021-03-09 10:18     ` Sanket Parmar
2021-03-09 10:31       ` Christoph Hellwig
2021-03-09 10:49         ` Sanket Parmar
2021-03-14  5:10   ` Peter Chen
2021-03-15 15:51     ` Sanket Parmar
2021-03-16  0:33       ` Peter Chen
2021-03-14  2:49 ` [PATCH 1/2] usb: cdns3: Use dma_pool_* api to alloc trb pool Peter Chen
2021-03-15  6:11   ` Sanket Parmar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210309092804.GA76839@infradead.org \
    --to=hch@infradead.org \
    --cc=a-govindraju@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=peter.chen@kernel.org \
    --cc=sparmar@cadence.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.