[U-Boot] [PATCH 5/6] usb: dwc2: add support for SPLIT transactions

Marek Vasut marex at denx.de
Sun Dec 20 01:41:44 CET 2015


On Sunday, December 20, 2015 at 01:17:05 AM, Stefan Bruens wrote:
> On Tuesday 15 December 2015 20:36:02 Stephen Warren wrote:
> > On 12/12/2015 09:17 PM, Stefan Brüns wrote:
> > > In contrast to non-SPLIT transfers each transaction has to be submitted
> > > as an individual chunk. Handling of ACK/NAk/NYET handshakes depends on
> > > transaction (non-SPLIT/SSPLIT/CSPLIT), thus inline the HCINT flag
> > > handling.
> > > 
> > > diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
> > > 
> > >  int chunk_msg(struct dwc2_priv *priv, struct usb_device *dev,
> > > 
> > > -	      unsigned long pipe, int *pid, int in, void *buffer, int len,
> > > -	      bool ignore_ack)
> > > +	      unsigned long pipe, int *pid, int in, void *buffer, int len)
> > 
> > ...
> > 
> > > +	uint32_t hctsiz;
> > > +	uint32_t hcint;
> > > +	uint32_t hcint_rem;
> > > +	uint8_t do_split = 0;
> > > +	uint8_t complete_split = 0;
> > > +	uint8_t start_again = 0;
> > > +	uint8_t hub_addr = 0;
> > > +	uint8_t hub_port = 0;
> > 
> > Rather than inlining all this stuff into chunk_msg, I had always
> > intended to move the body of chunk_msg() into a new function e.g.
> > split_msg() that chunk_msg() called repeatedly for each chunk, with
> > split_msg() either performing just a single transaction, or performing
> > both a start/complete-split. That would keep the functions a bit simpler
> > and more focused.
> 
> I will try to restructure the code a little bit to move the body of the
> loop to a seperate function ...

Please send it as a whole series, this constant in-reply-to stuff is a complete
mess and it is impossible to track the patches.

Thanks

Best regards,
Marek Vasut


More information about the U-Boot mailing list