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: <20220323051732.GE19041@ubuntu>
Date:   Wed, 23 Mar 2022 14:17:32 +0900
From:   Jung Daehwan <dh10.jung@...sung.com>
To:     Krzysztof Kozlowski <krzk@...nel.org>
Cc:     Mathias Nyman <mathias.nyman@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "open list:USB XHCI DRIVER" <linux-usb@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Howard Yen <howardyen@...gle.com>,
        Jack Pham <jackp@...eaurora.org>,
        Puma Hsu <pumahsu@...gle.com>,
        "J . Avila" <elavila@...gle.com>, sc.suh@...sung.com
Subject: Re: [PATCH v3 4/4] usb: host: add xhci-exynos driver

On Tue, Mar 22, 2022 at 06:16:58PM +0100, Krzysztof Kozlowski wrote:
> On 21/03/2022 09:59, Daehwan Jung wrote:
> > This driver supports USB Audio offload with Co-processor.
> > It only cares DCBAA, Device Context, Transfer Ring, Event Ring, and ERST.
> > They are allocated on specific address with xhci hooks.
> > Co-processor could use them directly without xhci driver after then.
> > 
> > Signed-off-by: Daehwan Jung <dh10.jung@...sung.com>
> > ---
> >  drivers/usb/host/Kconfig       |   9 +
> >  drivers/usb/host/Makefile      |   1 +
> >  drivers/usb/host/xhci-exynos.c | 982 +++++++++++++++++++++++++++++++++
> >  drivers/usb/host/xhci-exynos.h |  63 +++
> >  4 files changed, 1055 insertions(+)
> >  create mode 100644 drivers/usb/host/xhci-exynos.c
> >  create mode 100644 drivers/usb/host/xhci-exynos.h
> > 
> > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> > index 57ca5f97a3dc..850e6b71fac5 100644
> > --- a/drivers/usb/host/Kconfig
> > +++ b/drivers/usb/host/Kconfig
> > @@ -783,3 +783,12 @@ config USB_XEN_HCD
> >  	  by the Xen host (usually Dom0).
> >  	  Only needed if the kernel is running in a Xen guest and generic
> >  	  access to a USB device is needed.
> > +
> > +config USB_XHCI_EXYNOS
> > +	tristate "XHCI support for Samsung Exynos SoC Series"
> > +	depends on ARCH_EXYNOS || COMPILE_TEST
> > +	help
> > +	  Enable support for the Samsung Exynos SOC's on-chip XHCI
> > +	  controller.
> > +
> > +	  If unsure, say N.
> > diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
> > index 2948983618fb..300f22b6eb1b 100644
> > --- a/drivers/usb/host/Makefile
> > +++ b/drivers/usb/host/Makefile
> > @@ -86,3 +86,4 @@ obj-$(CONFIG_USB_HCD_SSB)	+= ssb-hcd.o
> >  obj-$(CONFIG_USB_FOTG210_HCD)	+= fotg210-hcd.o
> >  obj-$(CONFIG_USB_MAX3421_HCD)	+= max3421-hcd.o
> >  obj-$(CONFIG_USB_XEN_HCD)	+= xen-hcd.o
> > +obj-$(CONFIG_USB_XHCI_EXYNOS)	+= xhci-exynos.o
> > diff --git a/drivers/usb/host/xhci-exynos.c b/drivers/usb/host/xhci-exynos.c
> > new file mode 100644
> > index 000000000000..19ee21f1d024
> > --- /dev/null
> > +++ b/drivers/usb/host/xhci-exynos.c
> > @@ -0,0 +1,982 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * xhci-exynos.c - xHCI host controller driver platform Bus Glue for Exynos.
> > + *
> > + * Copyright (C) 2022 Samsung Electronics Incorporated - http://www.samsung.com
> > + * Author: Daehwan Jung <dh10.jung@...sung.com>
> > + *
> > + * A lot of code borrowed from the Linux xHCI driver.
> > + */
> > +#include <linux/clk.h>
> > +#include <linux/dma-mapping.h>
> > +#include <linux/module.h>
> > +#include <linux/pci.h>
> > +#include <linux/of.h>
> > +#include <linux/of_device.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/usb/phy.h>
> > +#include <linux/slab.h>
> > +#include <linux/acpi.h>
> > +#include <linux/usb/of.h>
> > +
> > +#include "xhci.h"
> > +#include "xhci-plat.h"
> > +#include "xhci-mvebu.h"
> > +#include "xhci-rcar.h"
> 
> Could you explain why do you need RCAR and Marvell code in Exynos? Is it
> even a real driver here? On what platforms this can be tested? Where are
> the bindings?

2 headers you said are not needed. I'm going to remove it on next
submission. I tested on Exynos platform and it's real driver. I haven't
made bindings.

> 
> 
> (...)
> 
> 
> > +static const struct of_device_id usb_xhci_of_match[] = {
> > +	{
> > +		.compatible = "generic-xhci",
> > +	}, {
> > +		.compatible = "xhci-platform",
> > +	},
> > +	{},
> > +};
> > +MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
> > +#endif
> 
> No, this not generic-xhci but Exynos driver. This does not make any sense.
> 

I agree with you and I'm going to remove it.

> 
> Best regards,
> Krzysztof
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ