linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: bdc: change state when port disconnected
@ 2022-10-05 19:13 justinpopo6
  2022-10-05 20:35 ` Florian Fainelli
  2022-10-08 15:44 ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: justinpopo6 @ 2022-10-05 19:13 UTC (permalink / raw)
  To: alcooperx, balbi, gregkh, linux-usb, linux-kernel
  Cc: bcm-kernel-feedback-list, justin.chen, f.fainelli, Justin Chen

From: Justin Chen <justinpopo6@gmail.com>

When port is connected and then disconnected, the state stays as
configured. Which is incorrect as the port is no longer configured,
but in a not attached state.

Signed-off-by: Justin Chen <justinpopo6@gmail.com>
---
 drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/udc/bdc/bdc_udc.c b/drivers/usb/gadget/udc/bdc/bdc_udc.c
index 5ac0ef8..53ffaf4 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_udc.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_udc.c
@@ -151,6 +151,7 @@ static void bdc_uspc_disconnected(struct bdc *bdc, bool reinit)
 	bdc->delayed_status = false;
 	bdc->reinit = reinit;
 	bdc->test_mode = false;
+	usb_gadget_set_state(&bdc->gadget, USB_STATE_NOTATTACHED);
 }
 
 /* TNotify wkaeup timer */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: bdc: change state when port disconnected
  2022-10-05 19:13 [PATCH] usb: bdc: change state when port disconnected justinpopo6
@ 2022-10-05 20:35 ` Florian Fainelli
  2022-10-08 15:44 ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2022-10-05 20:35 UTC (permalink / raw)
  To: justinpopo6, alcooperx, balbi, gregkh, linux-usb, linux-kernel
  Cc: bcm-kernel-feedback-list, justin.chen

On 10/5/22 12:13, justinpopo6@gmail.com wrote:
> From: Justin Chen <justinpopo6@gmail.com>
> 
> When port is connected and then disconnected, the state stays as
> configured. Which is incorrect as the port is no longer configured,
> but in a not attached state.
> 
> Signed-off-by: Justin Chen <justinpopo6@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: bdc: change state when port disconnected
  2022-10-05 19:13 [PATCH] usb: bdc: change state when port disconnected justinpopo6
  2022-10-05 20:35 ` Florian Fainelli
@ 2022-10-08 15:44 ` Greg KH
  2022-10-10 14:58   ` Florian Fainelli
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2022-10-08 15:44 UTC (permalink / raw)
  To: justinpopo6
  Cc: alcooperx, balbi, linux-usb, linux-kernel,
	bcm-kernel-feedback-list, justin.chen, f.fainelli

On Wed, Oct 05, 2022 at 12:13:55PM -0700, justinpopo6@gmail.com wrote:
> From: Justin Chen <justinpopo6@gmail.com>
> 
> When port is connected and then disconnected, the state stays as
> configured. Which is incorrect as the port is no longer configured,
> but in a not attached state.
> 
> Signed-off-by: Justin Chen <justinpopo6@gmail.com>
> ---
>  drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 +
>  1 file changed, 1 insertion(+)

What commit id does this fix?  Should it go to older kernels?  If so,
how far back?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: bdc: change state when port disconnected
  2022-10-08 15:44 ` Greg KH
@ 2022-10-10 14:58   ` Florian Fainelli
  2022-10-17 21:05     ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2022-10-10 14:58 UTC (permalink / raw)
  To: Greg KH, justinpopo6
  Cc: alcooperx, balbi, linux-usb, linux-kernel,
	bcm-kernel-feedback-list, justin.chen, f.fainelli



On 10/8/2022 8:44 AM, Greg KH wrote:
> On Wed, Oct 05, 2022 at 12:13:55PM -0700, justinpopo6@gmail.com wrote:
>> From: Justin Chen <justinpopo6@gmail.com>
>>
>> When port is connected and then disconnected, the state stays as
>> configured. Which is incorrect as the port is no longer configured,
>> but in a not attached state.
>>
>> Signed-off-by: Justin Chen <justinpopo6@gmail.com>
>> ---
>>   drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 +
>>   1 file changed, 1 insertion(+)
> 
> What commit id does this fix?  Should it go to older kernels?  If so,
> how far back?

This would be:

Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 
device controller IP BDC")

that issue was present since the driver was included in Linux with the 
commit above, we did not really consider it to be a serious enough bug, 
but I suppose it would not hurt to affix the said Fixes tag.
-- 
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: bdc: change state when port disconnected
  2022-10-10 14:58   ` Florian Fainelli
@ 2022-10-17 21:05     ` Florian Fainelli
  2022-10-22 10:52       ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2022-10-17 21:05 UTC (permalink / raw)
  To: Greg KH, justinpopo6
  Cc: alcooperx, balbi, linux-usb, linux-kernel,
	bcm-kernel-feedback-list, justin.chen

On 10/10/22 07:58, Florian Fainelli wrote:
> 
> 
> On 10/8/2022 8:44 AM, Greg KH wrote:
>> On Wed, Oct 05, 2022 at 12:13:55PM -0700, justinpopo6@gmail.com wrote:
>>> From: Justin Chen <justinpopo6@gmail.com>
>>>
>>> When port is connected and then disconnected, the state stays as
>>> configured. Which is incorrect as the port is no longer configured,
>>> but in a not attached state.
>>>
>>> Signed-off-by: Justin Chen <justinpopo6@gmail.com>
>>> ---
>>>   drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>
>> What commit id does this fix?  Should it go to older kernels?  If so,
>> how far back?
> 
> This would be:
> 
> Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 
> device controller IP BDC")
> 
> that issue was present since the driver was included in Linux with the 
> commit above, we did not really consider it to be a serious enough bug, 
> but I suppose it would not hurt to affix the said Fixes tag.

Greg, are you picking up the patch as-is, or do you need Justin to 
resusbmit with the Fixes: tag added?
-- 
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: bdc: change state when port disconnected
  2022-10-17 21:05     ` Florian Fainelli
@ 2022-10-22 10:52       ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2022-10-22 10:52 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: justinpopo6, alcooperx, balbi, linux-usb, linux-kernel,
	bcm-kernel-feedback-list, justin.chen

On Mon, Oct 17, 2022 at 02:05:42PM -0700, Florian Fainelli wrote:
> On 10/10/22 07:58, Florian Fainelli wrote:
> > 
> > 
> > On 10/8/2022 8:44 AM, Greg KH wrote:
> > > On Wed, Oct 05, 2022 at 12:13:55PM -0700, justinpopo6@gmail.com wrote:
> > > > From: Justin Chen <justinpopo6@gmail.com>
> > > > 
> > > > When port is connected and then disconnected, the state stays as
> > > > configured. Which is incorrect as the port is no longer configured,
> > > > but in a not attached state.
> > > > 
> > > > Signed-off-by: Justin Chen <justinpopo6@gmail.com>
> > > > ---
> > > >   drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > 
> > > What commit id does this fix?  Should it go to older kernels?  If so,
> > > how far back?
> > 
> > This would be:
> > 
> > Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0
> > device controller IP BDC")
> > 
> > that issue was present since the driver was included in Linux with the
> > commit above, we did not really consider it to be a serious enough bug,
> > but I suppose it would not hurt to affix the said Fixes tag.
> 
> Greg, are you picking up the patch as-is, or do you need Justin to resusbmit
> with the Fixes: tag added?

Now merged, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-22 11:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 19:13 [PATCH] usb: bdc: change state when port disconnected justinpopo6
2022-10-05 20:35 ` Florian Fainelli
2022-10-08 15:44 ` Greg KH
2022-10-10 14:58   ` Florian Fainelli
2022-10-17 21:05     ` Florian Fainelli
2022-10-22 10:52       ` Greg KH

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).