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: <CADYTM3ZijsqSUTvBEscJCP94aWCPahPJ1se+g0+ssqwcE_yAxg@mail.gmail.com>
Date:	Tue, 22 Jul 2014 16:33:54 -0500
From:	Bin Liu <binmlist@...il.com>
To:	Antoine Ténart <antoine.tenart@...e-electrons.com>
Cc:	balbi@...com, gregkh@...uxfoundation.org, Peter.Chen@...escale.com,
	kishon@...com, stern@...land.harvard.edu,
	alexandre.belloni@...e-electrons.com,
	thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
	jszhang@...vell.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] usb: move the OTG state from the USB PHY to the OTG structure

Hi,

On Wed, Jul 9, 2014 at 5:17 AM, Antoine Ténart
<antoine.tenart@...e-electrons.com> wrote:
> Before using the PHY framework instead of the USB PHY one, we need to
> move the OTG state into another place, since it won't be available when
> USB PHY isn't used. This patch moves the OTG state into the OTG
> structure, and makes all the needed modifications in the drivers
> using the OTG state.
>
> Signed-off-by: Antoine Ténart <antoine.tenart@...e-electrons.com>
> ---
>  drivers/phy/phy-omap-usb2.c         |  8 +---
>  drivers/usb/chipidea/debug.c        |  3 +-
>  drivers/usb/chipidea/otg_fsm.c      | 12 ++---
>  drivers/usb/common/usb-otg-fsm.c    |  8 ++--
>  drivers/usb/host/ohci-omap.c        |  2 +-
>  drivers/usb/musb/am35x.c            | 28 +++++------
>  drivers/usb/musb/blackfin.c         | 18 +++----
>  drivers/usb/musb/da8xx.c            | 28 +++++------
>  drivers/usb/musb/davinci.c          | 18 +++----
>  drivers/usb/musb/musb_core.c        | 94 ++++++++++++++++++-------------------
>  drivers/usb/musb/musb_dsps.c        | 26 +++++-----
>  drivers/usb/musb/musb_gadget.c      | 36 +++++++-------
>  drivers/usb/musb/musb_host.c        |  8 ++--
>  drivers/usb/musb/musb_virthub.c     | 22 ++++-----
>  drivers/usb/musb/omap2430.c         | 30 ++++++------
>  drivers/usb/musb/tusb6010.c         | 40 ++++++++--------
>  drivers/usb/musb/ux500.c            | 10 ++--
>  drivers/usb/phy/phy-ab8500-usb.c    | 10 ++--
>  drivers/usb/phy/phy-fsl-usb.c       | 10 ++--
>  drivers/usb/phy/phy-generic.c       |  4 +-
>  drivers/usb/phy/phy-gpio-vbus-usb.c | 10 ++--
>  drivers/usb/phy/phy-msm-usb.c       | 34 +++++++-------
>  drivers/usb/phy/phy-mv-usb.c        | 46 +++++++++---------
>  include/linux/usb/otg.h             |  2 +
>  include/linux/usb/phy.h             |  1 -
>  25 files changed, 252 insertions(+), 256 deletions(-)
>
> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
> index 7007c11fe07d..1f444f91ed7d 100644
> --- a/drivers/phy/phy-omap-usb2.c
> +++ b/drivers/phy/phy-omap-usb2.c
> @@ -80,11 +80,9 @@ static int omap_usb_start_srp(struct usb_otg *otg)
>
>  static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host)
>  {
> -       struct usb_phy  *phy = otg->phy;
> -
>         otg->host = host;
>         if (!host)
> -               phy->state = OTG_STATE_UNDEFINED;
> +               otg->state = OTG_STATE_UNDEFINED;
>
>         return 0;
>  }
> @@ -92,11 +90,9 @@ static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host)
>  static int omap_usb_set_peripheral(struct usb_otg *otg,
>                 struct usb_gadget *gadget)
>  {
> -       struct usb_phy  *phy = otg->phy;
> -
>         otg->gadget = gadget;
>         if (!gadget)
> -               phy->state = OTG_STATE_UNDEFINED;
> +               otg->state = OTG_STATE_UNDEFINED;
>
>         return 0;
>  }
> diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
> index 7cccab6ff308..9a9702773e43 100644
> --- a/drivers/usb/chipidea/debug.c
> +++ b/drivers/usb/chipidea/debug.c
> @@ -219,8 +219,7 @@ int ci_otg_show(struct seq_file *s, void *unused)
>         fsm = &ci->fsm;
>
>         /* ------ State ----- */
> -       seq_printf(s, "OTG state: %s\n\n",

Is this line removed by accident?

> -               usb_otg_state_string(ci->transceiver->state));
> +               usb_otg_state_string(ci->transceiver->otg.state));
>
>         /* ------ State Machine Variables ----- */

<snip>

Regards,
-Bin.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ