All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Mark Brown <broonie@kernel.org>
Cc: "ltsi-dev@lists.linuxfoundation.org"
	<ltsi-dev@lists.linuxfoundation.org>,
	"ksummit-discuss@lists.linuxfoundation.org"
	<ksummit-discuss@lists.linuxfoundation.org>,
	Baolin.Wang@linaro.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [Ksummit-discuss] [LTSI-dev] [Stable kernel] feature backporting collaboration
Date: Tue, 13 Sep 2016 09:46:48 +0200	[thread overview]
Message-ID: <87a8fc1btj.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20160912173702.GE27946@sirena.org.uk>

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

On Mon, Sep 12 2016, Mark Brown wrote:

> [ Unknown signature status ]
> On Sat, Sep 10, 2016 at 08:17:49AM +1000, NeilBrown wrote:
>> On Fri, Sep 09 2016, Mark Brown wrote:
>
> Baolin, I may be misremembering some of our discussions here - please
> jump in!
>
>> > It wasn't clear that the messiness wasn't just because nothing is taking
>> > a top level view of what's going on.
>
>> That is no excuse for leaving it there.  If you want to fix something,
>> take the top level view, tidy up the mess, and fix it.
>
>> The first step should be to do an audit of the current code.  See how
>> things are used, ask how they could be used more consistently and maybe
>> could be modified to meet your needs.  Part of this is making sure you
>
> We did that, bear in mind that this was started quite a while ago.  The
> main thing I was discussing with Baolin at the time was handling of the
> USB level negotiations rather than actual chargers.  

It would have been so helpful if the introduction to the patch series
had provided the results of that review:
  "Notification of negotiated USB current allowance is currently
  handled in a very ad hoc way.  Some drivers (listed here) use the usb
  notifier mechanism, others just ignore the information.  The usb
  notification mechanism is also used to notify the USB controller when
  the phy detects a cable being plugged in, though some phys send the
  notification with extcon.
  This is rather a mess, but instead of fixing this up, we have chosen
  to create a third, incompatible, notification mechanism because ....

The background thinking behind a patch can be just as useful as the code
in the patch.

>
>> have a clear understanding of the need.  The current patchset doesn't show
>> that clear understand at all.  This is particularly obvious in the way it
>> has incorrect defaults for the various charger types.
>
> Right.
>
>> With a little bit of fixing, extcon is perfectly placed to report
>> charger types to the power supply.  I think that should be fixed up and
>> used.  No extra framework needed, just fix what we have.
>
> But chargers aren't the world...

True, but they are the most problematic part of the proposed patch
series.

>
>> For communicating the current negotiated in the USB config I see two
>> options.  One is to fix up the current usb_register_notifier() framework
>> so that it is used consistently, and have it communicate the allowed
>> current level.
>> The other is to remove usb_register_notifier() completely and replace it
>> with something like the uchgr_nh in the current patchset.
>
> ...and then the power supply drivers need to also do this.  Since we
> know we're likely to have a PHY and a gadget working together it seems
> sensible to have a single bit of code that does the joining up here.

Sorry, I cannot make out what it is that power supply drivers will also
need to do.

>
>> I think usb_register_notifier() is used for two different things.
>> One is to report a USB or a USB-OTG connection to the usb driver, so it
>> can configure as 'host' or 'gadget'.
>> The other is to report the current limit.
>> Some drivers use extcon for the USB-OTG notification.
>> Deciding on, and standardizing, a single way to notify which sort of USB
>> data cable has been plugged, would be very valuable.
>> The charger-type and negotiated-current notification could use the same
>> mechanism, or could use a separate mechanism, or could use two different
>> mechanisms.
>> I have no strong opinion on what mechanism should be used for each
>> (well ... I do, but I'll probably have a different opinion tomorrow).
>> But I *do* strongly believe that each particular type of communication
>> should be done just one way, and part of creating a new "framework" is
>> to make sure that all current use-cases fit neatly into the framework.
>
> Right, so a certain part of the thinking here was to hide these
> decisions from the power supply drivers so they just see the combined
> result of charger type and negotiated current and we could just start
> off by reporting the negotiated current.
>
> Going back to the more general point that spawned this subthread this is
> all really useful feedback which could've been provided much earlier on
> - we've not done a great job of ensuring that this review happened.

This sounds like the topic that seems to come up every kernel-summit and
never really makes any progress:  How do we motivate people to provide
good quality independent reviews of code?
My perspective has always been that someone has to pay for it.  Good
review takes a serious amount of time, and unless they are being paid,
people are going to scratch their own itch, not someone else's.

To an extent, lwn.net does pay me to review kernel patches, and they
publish my reviews.  Nearly every comment I've made about the patches in
recent emails were in those published reviews.  Yet it seems I had to
make them all over again, then argue my case when it seemed that I
wasn't being heard.  So in this case at least, it could also be said
that we've not done a great job of listening to the reviews that did
happen.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-09-13  7:46 UTC|newest]

Thread overview: 122+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01  2:01 [Ksummit-discuss] [Stable kernel] feature backporting collaboration Alex Shi
2016-09-02  1:25 ` Levin, Alexander
2016-09-02  2:43   ` Stephen Hemminger
2016-09-02  9:59     ` Mark Brown
2016-09-02  9:54   ` Mark Brown
2016-09-02 10:16     ` [Ksummit-discuss] [LTSI-dev] " Geert Uytterhoeven
2016-09-02 14:42     ` [Ksummit-discuss] " James Bottomley
2016-09-02 14:55       ` Rik van Riel
2016-09-02 15:04         ` James Bottomley
2016-09-02 15:39           ` Rik van Riel
2016-09-02 17:06       ` Bird, Timothy
2016-09-05  1:45         ` NeilBrown
2016-09-05 11:04           ` Mark Brown
2016-09-05 22:44             ` NeilBrown
2016-09-06  0:57               ` Mark Brown
2016-09-06  5:41                 ` NeilBrown
2016-09-08 18:33               ` [Ksummit-discuss] [LTSI-dev] " Bird, Timothy
2016-09-08 22:38                 ` NeilBrown
2016-09-09 11:01                   ` Mark Brown
2016-09-09 22:17                     ` NeilBrown
2016-09-12 17:37                       ` Mark Brown
2016-09-13  7:46                         ` NeilBrown [this message]
2016-09-13 17:53                           ` Mark Brown
2016-09-02 18:21       ` [Ksummit-discuss] " Olof Johansson
2016-09-02 23:35         ` Mark Brown
2016-09-03  5:29         ` Guenter Roeck
2016-09-03 10:40           ` Mark Brown
2016-09-04  0:10         ` Theodore Ts'o
2016-09-04  8:34           ` gregkh
2016-09-04 22:58           ` Amit Kucheria
2016-09-04 23:51             ` Theodore Ts'o
2016-09-05 12:58               ` Mark Brown
2016-09-05 11:11             ` Mark Brown
2016-09-05 14:03               ` Theodore Ts'o
2016-09-05 14:22                 ` Laurent Pinchart
2016-09-06  0:35                   ` Mark Brown
2016-09-06 15:30                     ` James Bottomley
2016-09-06 19:44                       ` gregkh
2016-09-06 22:20                         ` Mark Brown
2016-09-06 22:34                           ` James Bottomley
2016-09-08 18:55                             ` Bird, Timothy
2016-09-08 19:19                               ` gregkh
2016-09-09 10:45                                 ` Mark Brown
2016-09-09 11:03                                   ` gregkh
2016-09-09 11:48                                     ` Mark Brown
2016-09-06 23:23                       ` Mark Brown
2016-09-06 13:34                   ` Catalin Marinas
2016-09-06 16:24                     ` Bartlomiej Zolnierkiewicz
2016-09-06 16:25                     ` Guenter Roeck
2016-09-06 22:39                       ` Mark Brown
2016-09-07  8:33                       ` Jan Kara
2016-09-07  8:41                         ` Jiri Kosina
2016-09-07 18:44                           ` Mark Brown
2016-09-08 17:06                             ` Frank Rowand
2016-09-09 10:32                               ` Mark Brown
2016-09-09 15:21                         ` Alex Shi
2016-09-12 15:34                         ` Christoph Hellwig
2016-09-06 16:46                     ` Olof Johansson
2016-09-08  8:34                       ` Linus Walleij
2016-09-08  8:55                         ` Vinod Koul
2016-09-09 14:32                           ` Rob Herring
2016-09-09 14:23                         ` Rob Herring
     [not found]                     ` <2181684.5VzIQ6DWv4@amdc1976>
2016-09-07  9:32                       ` Catalin Marinas
2016-09-07 13:07                         ` Bartlomiej Zolnierkiewicz
2016-09-07 18:49                         ` Mark Brown
2016-09-09 15:06                         ` Alex Shi
2016-09-02 23:29       ` Mark Brown
2016-09-02 19:16     ` Levin, Alexander
2016-09-03  0:05       ` Mark Brown
2016-09-05  9:28         ` Laurent Pinchart
2016-09-21  6:58           ` Alex Shi
2016-09-21  9:23             ` gregkh
2016-09-21 14:52               ` Alex Shi
2016-09-21 15:28                 ` gregkh
2016-09-21 18:50                   ` Mark Brown
2016-09-22  3:15                   ` Alex Shi
2016-09-21 18:22               ` Mark Brown
2016-09-21 18:54                 ` Linus Walleij
2016-09-21 19:52                 ` Theodore Ts'o
2016-09-22  0:43                   ` Mark Brown
2016-09-22  5:20                 ` gregkh
2016-09-22 12:56                 ` Laurent Pinchart
2016-09-22 16:22                   ` Mark Brown
2016-09-22 22:14                     ` Theodore Ts'o
2016-09-23 12:28                       ` Laurent Pinchart
2016-09-23 13:27                         ` [Ksummit-discuss] [LTSI-dev] " Alex Shi
2016-09-23 13:40                           ` Laurent Pinchart
2016-09-23 14:40                       ` [Ksummit-discuss] " Mark Brown
2016-09-21 13:56             ` Theodore Ts'o
2016-09-21 15:23               ` Alex Shi
2016-09-21 15:33                 ` gregkh
2016-09-21 19:16                   ` Mark Brown
2016-09-02 13:47 ` Theodore Ts'o
2016-09-02 19:31   ` Levin, Alexander
2016-09-02 19:42     ` gregkh
2016-09-02 20:06       ` Levin, Alexander
2016-09-03  2:04   ` Mark Brown
2016-09-06  7:20   ` [Ksummit-discuss] [LTSI-dev] " Tsugikazu Shibata
2016-09-10 12:00     ` Theodore Ts'o
2016-09-12 16:27       ` Mark Brown
2016-09-12 17:14         ` Greg KH
2016-09-12 23:45           ` Mark Brown
2016-09-13  3:14             ` Theodore Ts'o
2016-09-13 10:14               ` Mark Brown
2016-09-13 13:19               ` Levin, Alexander
2016-09-13  6:19             ` Greg KH
2016-09-13 10:38               ` Mark Brown
2016-09-13 12:09                 ` Greg KH
2016-09-13 12:20                   ` Josh Boyer
2016-09-13 13:12                     ` Greg KH
2016-09-13 16:23                       ` Bird, Timothy
2016-09-13 19:02                       ` Mark Brown
2016-09-14 14:47                       ` Alex Shi
2016-09-20  5:15                       ` Tsugikazu Shibata
2016-09-21  8:46                         ` Alex Shi
2016-09-13 12:25                 ` Geert Uytterhoeven
2016-09-13 19:21                   ` Mark Brown
2016-09-14  1:49                     ` Greg KH
2016-09-14  3:00                       ` Guenter Roeck
2016-09-12  4:12     ` Alex Shi
2016-09-12 16:09       ` Masami Hiramatsu
2016-09-13  2:39         ` Alex Shi

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=87a8fc1btj.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=Baolin.Wang@linaro.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=broonie@kernel.org \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=ltsi-dev@lists.linuxfoundation.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.