Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1271371

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

From Doug Anderson <dianders@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions
Date 2015-11-17 17:20 +0100
Message-ID <qvR97-7kN-9@gated-at.bofh.it> (permalink)
References <qvBe1-5kg-11@gated-at.bofh.it> <qvQG6-6Vs-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Alan,

On Tue, Nov 17, 2015 at 7:40 AM, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Mon, 16 Nov 2015, Doug Anderson wrote:
>
>> > Fundamentally there's no difference between a "connect" interrupt and a
>> > "disconnect" interrupt.  They should both do exactly the same things:
>> > clear the interrupt source, post a "connection change" event, and set
>> > the driver's connect status based on the hardware's current state.
>> > The second and third parts can be handled by a shared subroutine.
>>
>> Ah, sorry I misunderstood.  OK, fair enough.  So you're saying that
>> the problem is that dwc2_hcd_disconnect() has a line that looks like
>> this:
>>
>>   hsotg->flags.b.port_connect_status = 0;
>>
>> ...and the dwc2_port_intr() has a line that looks like this:
>>
>>   hsotg->flags.b.port_connect_status = 1;
>>
>> ...and both should just query the status.
>
> Well, I don't know how the driver uses flags.b.port_connect_status.  In
> principle it could do away with that flag completely and always query
> the hardware status.
>
>> Do you think we should to block landing this patch on cleaning up how
>> dwc2 handles port_connect_status?  I'm not sure what side effects
>> changing port_connect_status will have, so I'll need to test and dig a
>> bit...
>>
>> I'm currently working on trying to fix the microframe scheduler and
>> was planning to post the next series of patches there pretty soon.
>> I'm also planning to keep digging to figure out how to overall
>> increase compatibility with devices (and compatibility with many
>> devices plugged in).
>>
>> If it were up to me, I'd prefer to land this patch in either 4.4 or
>> 4.5 since it does seem to work.  ...then put seeing what we can do to
>> cleanup all of the port_connect_status on the todo list.
>
> It's up to you guys.  All I've been doing here is pointing out that
> your proposed approach didn't seem like the best.

Thanks!  Just wanted to make sure you know that I'm very very
appreciative of your reviews and suggestions here.  Having someone
intimately familiar with how other USB host drivers work that's
willing to point out how dwc2 can do things better will be very
helpful in helping dwc2 grow.

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Felipe Balbi <balbi@ti.com> - 2015-11-16 18:50 +0100
  Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Doug Anderson <dianders@chromium.org> - 2015-11-16 19:20 +0100
    Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Felipe Balbi <balbi@ti.com> - 2015-11-16 19:30 +0100
      Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Doug Anderson <dianders@chromium.org> - 2015-11-16 19:50 +0100
        Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Felipe Balbi <balbi@ti.com> - 2015-11-16 20:20 +0100
        Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Alan Stern <stern@rowland.harvard.edu> - 2015-11-16 20:40 +0100
          Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Doug Anderson <dianders@chromium.org> - 2015-11-16 20:50 +0100
            Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Julius Werner <jwerner@chromium.org> - 2015-11-16 21:30 +0100
              Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Alan Stern <stern@rowland.harvard.edu> - 2015-11-16 21:40 +0100
            Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Alan Stern <stern@rowland.harvard.edu> - 2015-11-16 21:40 +0100
              Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Doug Anderson <dianders@chromium.org> - 2015-11-17 00:20 +0100
                Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions John Youn <John.Youn@synopsys.com> - 2015-11-17 03:00 +0100
                Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Doug Anderson <dianders@chromium.org> - 2015-11-17 03:40 +0100
                Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Alan Stern <stern@rowland.harvard.edu> - 2015-11-17 16:50 +0100
                Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions Doug Anderson <dianders@chromium.org> - 2015-11-17 17:20 +0100

csiph-web