All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT
@ 2016-06-01  6:44 Yoshihiro Shimoda
  2016-06-01  6:44 ` [PATCH v2 1/2] usb: host: xhci: plat: add ->quirks value for platform-specific Yoshihiro Shimoda
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Yoshihiro Shimoda @ 2016-06-01  6:44 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-renesas-soc, Yoshihiro Shimoda

I'm afraid but I found a regression of xhci-rcar in v4.7-rc1.
This regression is caused by the following commit:

commit b1c127ae990bccf0187d741c1695a61e54de1943
Author: Felipe Balbi <felipe.balbi@linux.intel.com>
Date:   Fri Apr 22 13:17:16 2016 +0300

    usb: host: xhci: plat: make use of new methods in xhci_plat_priv
    
    Now that the code has been refactored enough,
    switching over to using ->plat_start() and
    ->init_quirk() becomes a very simple patch.
    
    After this patch, there are no further uses for
    xhci_plat_type_is() which will be removed in a
    follow-up patch.
    
    Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

< Overview >
The regression is the quirks flag "XHCI_NO_64BIT_SUPPORT" will be overwritten
by xhci_gen_setup(). Then, the driver will not work correctly.

< Detail >
Since the previous code will do the following, the quirks flag can be set:

xhci_plat_setup()
 -> xhci_gen_setup(hcd, xhci_plat_quirks);
  -> xhci->quirks = quirks;
   -> get_quirks() [This is xhci_plat_quirks]
    -> xhci->quirks |= XHCI_NO_64BIT_SUPPORT

However, after we applied the patch above, the quirks will disappear:

xhci_plat_setup()
 -> xhci_priv_init_quirk();
  -> xhci_rcar_init_quirk();
   -> xhci->quirks |= XHCI_NO_64BIT_SUPPORT
  -> xhci_gen_setup(hcd, xhci_plat_quirks);
   -> xhci->quirks = quirks; <----------------- here
    -> get_quirks() [This is xhci_plat_quirks]

So, I submitted incremental patches to resolve this issue like the followings:

xhci_plat_setup()
 -> xhci_priv_init_quirk();
  -> xhci_rcar_init_quirk();
  -> xhci_gen_setup(hcd, xhci_plat_quirks);
   -> xhci->quirks = quirks;
    -> get_quirks() [This is xhci_plat_quirks]
     -> xhci->quirks |= priv->quirks (XHCI_NO_64BIT_SUPPORT)

Changes from v1:
 - Revise the commit log in patch 2 because checkpatch.pl said the patch
   has ERRROR.

Yoshihiro Shimoda (2):
  usb: host: xhci: plat: add ->quirks value for platform-specific
  usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT

 drivers/usb/host/xhci-plat.c | 12 +++++++++++-
 drivers/usb/host/xhci-plat.h |  2 ++
 drivers/usb/host/xhci-rcar.c | 21 ---------------------
 3 files changed, 13 insertions(+), 22 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-02  4:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01  6:44 [PATCH v2 0/2] usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT Yoshihiro Shimoda
2016-06-01  6:44 ` [PATCH v2 1/2] usb: host: xhci: plat: add ->quirks value for platform-specific Yoshihiro Shimoda
2016-06-01  6:44 ` [PATCH v2 2/2] usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT Yoshihiro Shimoda
2016-06-01  7:01 ` [PATCH v2 0/2] " Felipe Balbi
2016-06-01  7:47   ` Yoshihiro Shimoda
2016-06-01  7:49     ` Felipe Balbi
2016-06-01 11:41       ` Mathias Nyman
2016-06-02  4:53         ` Yoshihiro Shimoda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.