linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Felipe Balbi <balbi@kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jayshri Pawar <jpawar@cadence.com>,
	Pawel Laszczak <pawell@cadence.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: linux-next: manual merge of the usb-gadget tree with Linus' tree
Date: Tue, 14 Jan 2020 09:41:57 +0100	[thread overview]
Message-ID: <CAMuHMdVY2W1=9paE+WpJUHprocOdutRMcNUJenn+jz9A-iv90A@mail.gmail.com> (raw)
In-Reply-To: <20200110153207.70c888cd@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

Hi Stephen,

On Fri, Jan 10, 2020 at 5:33 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Today's linux-next merge of the usb-gadget tree got a conflict in:
>
>   drivers/usb/cdns3/gadget.c
>
> between commit:
>
>   f616c3bda47e ("usb: cdns3: Fix dequeue implementation.")
>
> from Linus' tree and commit:
>
>   4f1fa63a6dc2 ("usb: cdns3: Add streams support to cadence USB3 DRD driver")
>
> from the usb-gadget tree.
>
> I have no idea how to handle this, so I just dropped the usb-gadget tree
> for today - it clearly needs to be rebased on Linus' tree anyway (it
> has a few shared patches that are different commits and there are
> further changes to this file in Linus' tree as well.  rebasing onto
> (or merging with) v5.5-rc6 may be useful.

For today's renesas-drivers, I'm using the attached conflict resolution.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[-- Attachment #2: drivers_usb_cdns3_gadget.c.diff --]
[-- Type: text/x-patch, Size: 2936 bytes --]

diff --cc drivers/usb/cdns3/gadget.c
index e4820bd4b5791381,4dadc85ad992f08a..0000000000000000
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@@ -1145,37 -1436,56 +1436,64 @@@ static void cdns3_transfer_completed(st
  		request = cdns3_next_request(&priv_ep->pending_req_list);
  		priv_req = to_cdns3_request(request);
  
 +		trb = priv_ep->trb_pool + priv_ep->dequeue;
 +
 +		/* Request was dequeued and TRB was changed to TRB_LINK. */
 +		if (TRB_FIELD_TO_TYPE(trb->control) == TRB_LINK) {
 +			trace_cdns3_complete_trb(priv_ep, trb);
 +			cdns3_move_deq_to_next_trb(priv_req);
 +		}
 +
- 		/* Re-select endpoint. It could be changed by other CPU during
- 		 * handling usb_gadget_giveback_request.
- 		 */
- 		cdns3_select_ep(priv_dev, priv_ep->endpoint.address);
+ 		if (!request->stream_id) {
+ 			/* Re-select endpoint. It could be changed by other CPU
+ 			 * during handling usb_gadget_giveback_request.
+ 			 */
+ 			cdns3_select_ep(priv_dev, priv_ep->endpoint.address);
  
- 		if (!cdns3_request_handled(priv_ep, priv_req))
- 			goto prepare_next_td;
+ 			if (!cdns3_request_handled(priv_ep, priv_req))
+ 				goto prepare_next_td;
  
- 		trb = priv_ep->trb_pool + priv_ep->dequeue;
- 		trace_cdns3_complete_trb(priv_ep, trb);
+ 			trb = priv_ep->trb_pool + priv_ep->dequeue;
+ 			trace_cdns3_complete_trb(priv_ep, trb);
+ 
+ 			if (trb != priv_req->trb)
+ 				dev_warn(priv_dev->dev,
+ 					 "request_trb=0x%p, queue_trb=0x%p\n",
+ 					 priv_req->trb, trb);
  
- 		if (trb != priv_req->trb)
- 			dev_warn(priv_dev->dev,
- 				 "request_trb=0x%p, queue_trb=0x%p\n",
- 				 priv_req->trb, trb);
+ 			request->actual = TRB_LEN(le32_to_cpu(trb->length));
+ 			cdns3_move_deq_to_next_trb(priv_req);
+ 			cdns3_gadget_giveback(priv_ep, priv_req, 0);
  
- 		request->actual = TRB_LEN(le32_to_cpu(trb->length));
- 		cdns3_move_deq_to_next_trb(priv_req);
- 		cdns3_gadget_giveback(priv_ep, priv_req, 0);
+ 			if (priv_ep->type != USB_ENDPOINT_XFER_ISOC &&
+ 			    TRBS_PER_SEGMENT == 2)
+ 				break;
+ 		} else {
+ 			/* Re-select endpoint. It could be changed by other CPU
+ 			 * during handling usb_gadget_giveback_request.
+ 			 */
+ 			cdns3_select_ep(priv_dev, priv_ep->endpoint.address);
+ 
+ 			trb = priv_ep->trb_pool;
+ 			trace_cdns3_complete_trb(priv_ep, trb);
  
- 		if (priv_ep->type != USB_ENDPOINT_XFER_ISOC &&
- 		    TRBS_PER_SEGMENT == 2)
+ 			if (trb != priv_req->trb)
+ 				dev_warn(priv_dev->dev,
+ 					 "request_trb=0x%p, queue_trb=0x%p\n",
+ 					 priv_req->trb, trb);
+ 
+ 			request->actual += TRB_LEN(le32_to_cpu(trb->length));
+ 
+ 			if (!request->num_sgs ||
+ 			    (request->num_sgs == (priv_ep->stream_sg_idx + 1))) {
+ 				priv_ep->stream_sg_idx = 0;
+ 				cdns3_gadget_giveback(priv_ep, priv_req, 0);
+ 			} else {
+ 				priv_ep->stream_sg_idx++;
+ 				cdns3_ep_run_stream_transfer(priv_ep, request);
+ 			}
  			break;
+ 		}
  	}
  	priv_ep->flags &= ~EP_PENDING_REQUEST;
  

  reply	other threads:[~2020-01-14  8:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  4:32 linux-next: manual merge of the usb-gadget tree with Linus' tree Stephen Rothwell
2020-01-14  8:41 ` Geert Uytterhoeven [this message]
2020-01-14  9:17   ` Pawel Laszczak
2020-01-15  3:40   ` Stephen Rothwell
2020-01-15  6:56 ` Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2017-06-13  6:11 Stephen Rothwell
2014-09-08  7:13 Stephen Rothwell
2014-09-08 13:28 ` Felipe Balbi
2014-09-08  7:06 Stephen Rothwell
2014-07-17  6:52 Stephen Rothwell
2014-07-17 15:05 ` Felipe Balbi
2013-08-01  5:32 Stephen Rothwell

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='CAMuHMdVY2W1=9paE+WpJUHprocOdutRMcNUJenn+jz9A-iv90A@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jpawar@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=sfr@canb.auug.org.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).