lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <410670D7E743164D87FA6160E7907A560113A2C8E9@am04wembxa.internal.synopsys.com>
Date:   Thu, 12 Oct 2017 07:59:17 +0000
From:   Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To:     John Stultz <john.stultz@...aro.org>,
        Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
CC:     John Youn <John.Youn@...opsys.com>,
        lkml <linux-kernel@...r.kernel.org>,
        Wei Xu <xuwei5@...ilicon.com>,
        Guodong Xu <guodong.xu@...aro.org>,
        "Amit Pundir" <amit.pundir@...aro.org>,
        YongQin Liu <yongqin.liu@...aro.org>,
        Douglas Anderson <dianders@...omium.org>,
        Chen Yu <chenyu56@...wei.com>,
        Felipe Balbi <felipe.balbi@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

On 10/10/2017 1:50 AM, John Stultz wrote:
> On Tue, Oct 3, 2017 at 2:58 AM, Minas Harutyunyan
> <Minas.Harutyunyan@...opsys.com> wrote:
>>
>> Could you please apply patch from Vardan Mikayelyan "usb: dwc2: Fix
>> dwc2_hsotg_core_init_disconnected()" submitted at 02/25/2017
>> (https://urldefense.proofpoint.com/v2/url?u=https-3A__marc.info_-3Fl-3Dlinux-2Dusb-26m-3D148801589931039-26w-3D2&d=DwIBaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=6z9Al9FrHR_ZqbbtSAsD16pvOL2S3XHxQnSzq8kusyI&m=4y4_kSoJQIp-rJkvFNu8yXR67QxLLQrbFkjlyytMUCE&s=3Gmh7tVGk7ncQfBNUjkVdpRa1XX_jf7lWga7kR1O9bQ&e=) instead of your
>> "usb: dwc2: Improve gadget state disconnection handling" and test again
>> failing scenario.
>
> I may be misunderstanding htings, but I don't believe that patch
> addresses the same issue I'm trying to fix (I've tested with it, and
> it doesn't cause any trouble for me, but it also doesn't seem to
> address the corner-cases I'm hitting).
>
> My "Improve gadget state disconnection handling" patch handles the
> fact that when we switch from B/gadget mode to A/Host mode, we don't
> always go through a gadget disconnect path.
>
> So instead of calling the dwc2_hsotg_disconnect() path initially when
> switching to gadget mode (to avoid the state complaining that we set
> it up twice), we should instead be calling dwc2_hsotg_disconnect()
> when we are setting up the A/host mode.
>
> So for example, the follow-on fix to the UDC state won't properly work
> without my "Improve gadget state disconnection handling" patch, and
> "cat /sys/class/udc/f72c0000.usb/state" will always return configured
> (assuming gadget mode was used once) regardless of the gadget state,
> since we don't actually call dwc2_hsotg_disconnect when the otg plug
> is removed.
>
>> Other 2 patches from series "[PATCH 0/3] dwc2 fixes for edge cases on
>> hikey" are Ok.
>
> Thanks for the review/feedback!
>
> thanks
> -john
>
Hi John Stultz,

1. Vardan's patch fixing issue when dwc2 switched from host to device 
mode. It's allow to make functional device after reconnecting without 
tracking UDC state.
2. I suppose that your patch "[RESEND x2][PATCH 1/3] usb: dwc2: Improve 
gadget state disconnection handling" not a good way to set correct UDC 
state. You added calling device mode functions dwc2_hsotg_disconnect() 
and dwc2_hsotg_core_init_disconnected() while core in Host mode and as 
result additional unwanted "mode mismatch" interrupts will be asserted.
3. Function dwc2_conn_id_status_change() called when connector ID status 
changed. This interrupt asserted only when A-plug connected or 
disconnected. Connecting/disconnecting B-plug doesn't assert this interrupt.

Thanks,
Minas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ