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: <20180302152712.GA22262@uda0271908>
Date:   Fri, 2 Mar 2018 09:27:12 -0600
From:   Bin Liu <b-liu@...com>
To:     Merlijn Wajer <merlijn@...zup.org>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Pali Rohár <pali.rohar@...il.com>,
        Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
        <linux-omap@...r.kernel.org>
Subject: Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget
 (and at other times, system hangs)

Hi,

On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote:
> Hi,
> 
> I found that the "mode" file in musb sys node will return "(null)" when
> one would expect it show b_idle.
> 
> Wrong /mode file:
> 
> [Fresh boot, cable not connected yet]
> root@...0devuan:~# modprobe g_nokia
> [Insert cable connected to PC]
> root@...0devuan:~# cat
> /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/mode
> b_peripheral
> [Remove cable connected to PC]
> root@...0devuan:~# cat
> /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/mode
> b_idle
> root@...0devuan:~# rmmod g_nokia
> root@...0devuan:~# cat
> /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/mode
> (null)

I can reproduce this on AM335x EVM,

> [Insert cable connected to PC]
> root@...0devuan:~# cat
> /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/mode
> b_idle

but not this, I still get (null). g_nokia is not loaded here, right?

> 
> I would expect it to state "b_idle" instead of "(null)".

Actually, I'd like to see (null) whenever a gadget driver is not loaded,
which indicates a gadget is not bound to the udc.

Regards,
-Bin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ