All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Tejas Joglekar <Tejas.Joglekar@synopsys.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	USB <linux-usb@vger.kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	John Youn <John.Youn@synopsys.com>
Subject: Re: [RFC PATCH v2 4/4] usb: xhci: Use temporary buffer to consolidate SG
Date: Wed, 20 May 2020 12:50:01 -0400	[thread overview]
Message-ID: <20200520165001.GD11084@rowland.harvard.edu> (raw)
In-Reply-To: <6551a485-5478-ccac-ca1f-d3e2ec4c9053@synopsys.com>

On Wed, May 20, 2020 at 06:41:16AM +0000, Tejas Joglekar wrote:
> >> +	urb->transfer_buffer = temp;
> >> +	urb->transfer_dma = dma_map_single(hcd->self.sysdev,
> >> +					   urb->transfer_buffer,
> >> +					   urb->transfer_buffer_length,
> >> +					   dir);
> >> +
> >> +	if (dma_mapping_error(hcd->self.sysdev,
> >> +			      urb->transfer_dma)) {
> >> +		ret = -EAGAIN;
> >> +		kfree(temp);
> >> +	} else {
> >> +		urb->transfer_flags |= URB_DMA_MAP_SINGLE;
> > 
> > Not sure if using URB_DMA_MAP_SINGLE to flag that this urb is boucebuffered is
> > appropriate.
> > 
> > If Greg or Alan don't object then it's fine for me as well.
> > 
> > 
> > 
> @Greg/Alan do you suggest any change for the flag here?

This requires care, because the core will already have set other flags 
for this URB.  I don't remember the details and I don't have time to 
check them now.  But it wouldn't be at all surprising if the core 
doesn't expect an URB both to use SG and to use DMA_MAP_SINGLE.

Alan Stern

  reply	other threads:[~2020-05-20 16:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21  9:47 [RFC PATCH v2 0/4] Add logic to consolidate TRBs for Synopsys xHC Tejas Joglekar
2020-04-21  9:48 ` [RFC PATCH v2 1/4] dt-bindings: usb: Add documentation for SG trb cache size quirk Tejas Joglekar
2020-05-06 20:15   ` Rob Herring
2020-05-07 16:03     ` Tejas Joglekar
2020-05-06 20:16   ` Rob Herring
2020-05-07 16:07     ` Tejas Joglekar
2020-04-21  9:48 ` [RFC PATCH v2 2/4] usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK Tejas Joglekar
2020-04-21  9:48 ` [RFC PATCH v2 3/4] usb: dwc3: Add device property sgl-trb-cache-size-quirk Tejas Joglekar
2020-04-21  9:49 ` [RFC PATCH v2 4/4] usb: xhci: Use temporary buffer to consolidate SG Tejas Joglekar
2020-05-18  8:38   ` Tejas Joglekar
2020-05-18 16:21   ` Mathias Nyman
2020-05-20  6:41     ` Tejas Joglekar
2020-05-20 16:50       ` Alan Stern [this message]
2020-05-20 17:00         ` Tejas Joglekar
2020-05-20 17:44           ` Alan Stern
2020-05-22  1:58             ` Tejas Joglekar
2020-05-22 14:21               ` Alan Stern
2020-05-22 17:22                 ` Tejas Joglekar

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=20200520165001.GD11084@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=John.Youn@synopsys.com \
    --cc=Tejas.Joglekar@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.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.