All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
To: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Fwd: [PATCH] usb: gadget: atmel: Revert regression in USB Gadget (atmel_usba_udc)
Date: Mon, 13 Dec 2021 11:37:47 -0300	[thread overview]
Message-ID: <CACjc_5oDMJYphYMcj8YukTrQLuQmAow9CBMGD=u_21va2d4+eA@mail.gmail.com> (raw)
In-Reply-To: <CACjc_5pHbLStniQnOVLDW5iLbKn8ovePuQsFFqeEnQPSSYxJoQ@mail.gmail.com>

Resending to the list, due to gmail html rejection, sorry for that.

---------- Forwarded message ---------
From: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Date: Mon, Dec 13, 2021 at 11:31 AM
Subject: Re: [PATCH] usb: gadget: atmel: Revert regression in USB
Gadget (atmel_usba_udc)
To: Jonas Bonn <jonas@norrbonn.se>
Cc: <regressions@lists.linux.dev>, Nicolas Ferre
<nicolas.ferre@microchip.com>, Alexandre Belloni
<alexandre.belloni@bootlin.com>, Ludovic Desroches
<ludovic.desroches@microchip.com>,
<linux-arm-kernel@lists.infradead.org>, Cristian Birsan
<cristian.birsan@microchip.com>, <linux-usb@vger.kernel.org>, Greg
Kroah-Hartman <gregkh@linuxfoundation.org>, Felipe Balbi
<balbi@kernel.org>, Sergio Tanzilli <tanzilli@acmesystems.it>


Hi Jonas,

Thank you for the quick response, I really appreciate it.

On Mon, Dec 13, 2021 at 7:02 AM Jonas Bonn <jonas@norrbonn.se> wrote:
>
>
> Given that the patch that you want to revert is almost 3 years old, it's
> a bit of a stretch to call this a regression.  I suspect that a cleaner
> way forward is to introduce some kind of quirk for your board.


Well, the board is basically the MPU, so if there is a hardware
problem it would mean that it is a problem with the on chip
peripheral.

>
> I have a self-powered board where the USB suspend sequence works and
> device add/remove works fine.  So fundamentally, I suspect that the
> driver is ok.


Maybe you have VBUS sensing enabled in your board. As I reported
before, the VBUS sensing is not an option in this board. Nonetheless,
the code in the kernel suggests that VBUS sensing is optional, since
the presence of a VBUS sensing pin is explicitly tested in it.

I have not read the full USB spec, but if this is a fundamentally not
resolvable problem, maybe we could have a configuration option,
runtime or compile time, to enable or disable SUSPEND state, assuming
that there is no problem with the original patch.

In my particular application, it is more important to detect the
disconnection, so that we can reconnect, than to enter SUSPEND.
Whenever USB is not necessary, it will not be connected, so the energy
saved will be very little in my case.

My intention with this patch is also to provide a quick fix for anyone
facing this problem, reverting is not necessarily the best long term
solution, especially if the code is found to be correct. But assuming
the chip USB controller has no design flaws, and assuming it should be
possible to do without VBUS sensing, then the present code should be
missing some detail.

>
> With all that said, I'm not immediately in a position to run tests on my
> SAMA5D2 board right now and the kernel on that board is 5.2.  I'm not
> sure when we we would notice that USB suspend stopped working because
> there is no kernel maintenance planned for that board, as far as I know;
> someday, however, that work might happen and the lack of working USB
> suspend will be a regression in and of itself.


I can test it with the AT91SAM9G25 processor and I can also get a
SAMA5D27 board to test with.

>
> Thanks,
> Jonas


Best regards,
Marcelo.

WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
To: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Fwd: [PATCH] usb: gadget: atmel: Revert regression in USB Gadget (atmel_usba_udc)
Date: Mon, 13 Dec 2021 11:37:47 -0300	[thread overview]
Message-ID: <CACjc_5oDMJYphYMcj8YukTrQLuQmAow9CBMGD=u_21va2d4+eA@mail.gmail.com> (raw)
In-Reply-To: <CACjc_5pHbLStniQnOVLDW5iLbKn8ovePuQsFFqeEnQPSSYxJoQ@mail.gmail.com>

Resending to the list, due to gmail html rejection, sorry for that.

---------- Forwarded message ---------
From: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Date: Mon, Dec 13, 2021 at 11:31 AM
Subject: Re: [PATCH] usb: gadget: atmel: Revert regression in USB
Gadget (atmel_usba_udc)
To: Jonas Bonn <jonas@norrbonn.se>
Cc: <regressions@lists.linux.dev>, Nicolas Ferre
<nicolas.ferre@microchip.com>, Alexandre Belloni
<alexandre.belloni@bootlin.com>, Ludovic Desroches
<ludovic.desroches@microchip.com>,
<linux-arm-kernel@lists.infradead.org>, Cristian Birsan
<cristian.birsan@microchip.com>, <linux-usb@vger.kernel.org>, Greg
Kroah-Hartman <gregkh@linuxfoundation.org>, Felipe Balbi
<balbi@kernel.org>, Sergio Tanzilli <tanzilli@acmesystems.it>


Hi Jonas,

Thank you for the quick response, I really appreciate it.

On Mon, Dec 13, 2021 at 7:02 AM Jonas Bonn <jonas@norrbonn.se> wrote:
>
>
> Given that the patch that you want to revert is almost 3 years old, it's
> a bit of a stretch to call this a regression.  I suspect that a cleaner
> way forward is to introduce some kind of quirk for your board.


Well, the board is basically the MPU, so if there is a hardware
problem it would mean that it is a problem with the on chip
peripheral.

>
> I have a self-powered board where the USB suspend sequence works and
> device add/remove works fine.  So fundamentally, I suspect that the
> driver is ok.


Maybe you have VBUS sensing enabled in your board. As I reported
before, the VBUS sensing is not an option in this board. Nonetheless,
the code in the kernel suggests that VBUS sensing is optional, since
the presence of a VBUS sensing pin is explicitly tested in it.

I have not read the full USB spec, but if this is a fundamentally not
resolvable problem, maybe we could have a configuration option,
runtime or compile time, to enable or disable SUSPEND state, assuming
that there is no problem with the original patch.

In my particular application, it is more important to detect the
disconnection, so that we can reconnect, than to enter SUSPEND.
Whenever USB is not necessary, it will not be connected, so the energy
saved will be very little in my case.

My intention with this patch is also to provide a quick fix for anyone
facing this problem, reverting is not necessarily the best long term
solution, especially if the code is found to be correct. But assuming
the chip USB controller has no design flaws, and assuming it should be
possible to do without VBUS sensing, then the present code should be
missing some detail.

>
> With all that said, I'm not immediately in a position to run tests on my
> SAMA5D2 board right now and the kernel on that board is 5.2.  I'm not
> sure when we we would notice that USB suspend stopped working because
> there is no kernel maintenance planned for that board, as far as I know;
> someday, however, that work might happen and the lack of working USB
> suspend will be a regression in and of itself.


I can test it with the AT91SAM9G25 processor and I can also get a
SAMA5D27 board to test with.

>
> Thanks,
> Jonas


Best regards,
Marcelo.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-12-13 14:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 18:36 [PATCH] usb: gadget: atmel: Revert regression in USB Gadget (atmel_usba_udc) Marcelo Roberto Jimenez
2021-12-11 18:36 ` Marcelo Roberto Jimenez
2021-12-12  9:48 ` Thorsten Leemhuis
2021-12-12  9:48   ` Thorsten Leemhuis
2022-01-26 12:20   ` Greg Kroah-Hartman
2022-01-26 12:20     ` Greg Kroah-Hartman
2022-01-26 12:54     ` Thorsten Leemhuis
2022-01-26 12:54       ` Thorsten Leemhuis
     [not found]     ` <CACjc_5o9eO5YTVt4jE7v1E9nirCwFMc1=Ub-jXSFCg1_8A2M-A@mail.gmail.com>
2022-01-26 13:43       ` Marcelo Roberto Jimenez
2022-01-26 13:43         ` Marcelo Roberto Jimenez
2021-12-13 10:02 ` Jonas Bonn
2021-12-13 10:02   ` Jonas Bonn
     [not found]   ` <CACjc_5pHbLStniQnOVLDW5iLbKn8ovePuQsFFqeEnQPSSYxJoQ@mail.gmail.com>
2021-12-13 14:37     ` Marcelo Roberto Jimenez [this message]
2021-12-13 14:37       ` Fwd: " Marcelo Roberto Jimenez
2021-12-15 13:04     ` Cristian.Birsan
2021-12-15 13:04       ` Cristian.Birsan
2021-12-15 15:54       ` Marcelo Roberto Jimenez
2021-12-15 15:54         ` Marcelo Roberto Jimenez
2021-12-20 14:50         ` Greg Kroah-Hartman
2021-12-20 14:50           ` Greg Kroah-Hartman
2021-12-22 18:33           ` Cristian.Birsan
2021-12-22 18:33             ` Cristian.Birsan

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='CACjc_5oDMJYphYMcj8YukTrQLuQmAow9CBMGD=u_21va2d4+eA@mail.gmail.com' \
    --to=marcelo.jimenez@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    /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.