All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Zhuang Jin Can <jin.can.zhuang@intel.com>,
	Felipe Balbi <balbi@ti.com>, <linux-usb@vger.kernel.org>,
	<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: gadget: fix burst size corruption
Date: Thu, 1 May 2014 10:15:00 -0500	[thread overview]
Message-ID: <20140501151500.GC6355@saruman.home> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1405010941550.1152-100000@iolanthe.rowland.org>

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

Hi,

On Thu, May 01, 2014 at 09:45:17AM -0400, Alan Stern wrote:
> On Thu, 1 May 2014, Zhuang Jin Can wrote:
> 
> > > again, you found a bug on the gadget driver. Fix that. composite.c
> > > guarantees that for those functions which don't pass bMaxBurst,
> > > gadget->maxburst will be set to *at least* 1.
> > > 
> > I agree the real fix should be in the gadget driver. The patch intents
> > to prevent hibernatition from being corrupted by a bad gadget driver.
> > If OEMs develop their own gadget driver forgetting to call
> > config_ep_by_speed(), it'll turn out to be everything works except
> > dwc3 hibernation, and they'll complain to dwc3. f_ffs is an
> > example has SuperSpeed support but doesn't call config_ep_by_speed().
> > It's just for robustness, and dwc3 is not doing anything wrong.
> > It did cause me a long time to figure out why the hibernation was broken.
> 
> You could include the check, for the sake of robustness, in dwc3 -- but
> if it fails, you should write a message to the kernel log saying that
> the gadget driver needs to be fixed.

Also, if we're adding something to dwc3, we need to add to other
USB3-capable UDCs too. Namely dummy and marvel's.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Zhuang Jin Can <jin.can.zhuang@intel.com>,
	Felipe Balbi <balbi@ti.com>,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: dwc3: gadget: fix burst size corruption
Date: Thu, 1 May 2014 10:15:00 -0500	[thread overview]
Message-ID: <20140501151500.GC6355@saruman.home> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1405010941550.1152-100000@iolanthe.rowland.org>

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

Hi,

On Thu, May 01, 2014 at 09:45:17AM -0400, Alan Stern wrote:
> On Thu, 1 May 2014, Zhuang Jin Can wrote:
> 
> > > again, you found a bug on the gadget driver. Fix that. composite.c
> > > guarantees that for those functions which don't pass bMaxBurst,
> > > gadget->maxburst will be set to *at least* 1.
> > > 
> > I agree the real fix should be in the gadget driver. The patch intents
> > to prevent hibernatition from being corrupted by a bad gadget driver.
> > If OEMs develop their own gadget driver forgetting to call
> > config_ep_by_speed(), it'll turn out to be everything works except
> > dwc3 hibernation, and they'll complain to dwc3. f_ffs is an
> > example has SuperSpeed support but doesn't call config_ep_by_speed().
> > It's just for robustness, and dwc3 is not doing anything wrong.
> > It did cause me a long time to figure out why the hibernation was broken.
> 
> You could include the check, for the sake of robustness, in dwc3 -- but
> if it fails, you should write a message to the kernel log saying that
> the gadget driver needs to be fixed.

Also, if we're adding something to dwc3, we need to add to other
USB3-capable UDCs too. Namely dummy and marvel's.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-05-01 15:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01  7:16 [PATCH] usb: dwc3: gadget: fix burst size corruption Zhuang Jin Can
2014-04-30 20:03 ` Felipe Balbi
2014-04-30 20:03   ` Felipe Balbi
2014-05-01 21:14   ` Zhuang Jin Can
2014-05-01 13:45     ` Alan Stern
2014-05-01 13:45       ` Alan Stern
2014-05-01 15:15       ` Felipe Balbi [this message]
2014-05-01 15:15         ` Felipe Balbi
2014-05-03  3:35         ` Zhuang Jin Can

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=20140501151500.GC6355@saruman.home \
    --to=balbi@ti.com \
    --cc=jin.can.zhuang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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.