[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAODwPW-O=ezdEWck1n4358ErK_6O5ksCeGY=KZi==f33_i3B9Q@mail.gmail.com>
Date: Mon, 16 Nov 2015 12:26:26 -0800
From: Julius Werner <jwerner@...omium.org>
To: Doug Anderson <dianders@...omium.org>
Cc: Alan Stern <stern@...land.harvard.edu>,
Felipe Balbi <balbi@...com>,
John Youn <John.Youn@...opsys.com>,
Yunzhi Li <lyz@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Julius Werner <jwerner@...omium.org>,
"Herrero, Gregory" <gregory.herrero@...el.com>,
"Kaukab, Yousaf" <yousaf.kaukab@...el.com>,
Dinh Nguyen <dinguyen@...nsource.altera.com>,
John Youn <johnyoun@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions
Another point to note, which I think is what prevents the flow Alan
suggested from working, is this little snippet in DWC2's hub_control
GetPortStatus callback:
if (!hsotg->flags.b.port_connect_status) {
/*
* The port is disconnected, which means the core is
* either in device mode or it soon will be.
Just
* return 0's for the remainder of the port status
* since the port register can't be read if the core
* is in device mode.
*/
*(__le32 *)buf = cpu_to_le32(port_status);
break;
}
This is before it actually checks the register state of the port. So
it relies on dwc2_hcd_connect() and dwc2_hcd_disconnect() to be called
in the right order to give the correct answer for
USB_PORT_STAT_CONNECTION. This could maybe be improved but I don't
know what kind of weird interactions with device mode operation made
that snippet necessary in the first place.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists