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  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]
Date:	Fri, 19 Sep 2014 19:02:49 +0000
From:	Paul Zimmerman <Paul.Zimmerman@...opsys.com>
To:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>
CC:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"balbi@...com" <balbi@...com>,
	"dinh.linux@...il.com" <dinh.linux@...il.com>,
	"swarren@...dotorg.org" <swarren@...dotorg.org>,
	"matthijs@...in.nl" <matthijs@...in.nl>,
	"r.baldyga@...sung.com" <r.baldyga@...sung.com>,
	"jg1.han@...sung.com" <jg1.han@...sung.com>,
	"sachin.kamat@...aro.org" <sachin.kamat@...aro.org>,
	"ben-linux@...ff.org" <ben-linux@...ff.org>,
	"dianders@...omium.org" <dianders@...omium.org>,
	"kever.yang@...k-chips.com" <kever.yang@...k-chips.com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCHv4 01/12] usb: dwc2: Update Kconfig to support dual-role

> From: Bartlomiej Zolnierkiewicz [mailto:b.zolnierkie@...sung.com]
> Sent: Friday, September 19, 2014 7:50 AM
> 
> Unfortunately after second look there are even more problems with Kconfig
> changes, please see below.
> 
> > >
> > >>  if USB_DWC2
> > >>
> > >> +choice
> > >> +	bool "DWC2 Mode Selection"
> > >> +	default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
> > >> +	default USB_DWC2_HOST if (USB && !USB_GADGET)
> > >> +	default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
> 
> Previously it was possible to have following functionalities in
> one kernel (for multiplatform kernels):
> 
> - host PCI support
> - host platform support
> - gadget platform support
> 
> Now mode selection will determine the used mode for combined
> host+gadget platform driver.  It is no longer possible to have
> host platform and gadget platform support in one kernel.

Why not? Why wouldn't it work if you enable USB_DWC2_DUAL_ROLE? The
dwc3 driver uses the same scheme as this, and I have not heard any
complaints about that not working.
 
> Also there is only one mode selection for both PCI and platform
> drivers so it is no longer possible to have both gadget platform
> support and host PCI support in one kernel.

There will be, once I update the dwc2 PCI support to include the gadget
functionality. Then, if you enable USB_DWC2_DUAL_ROLE and DWC2_PCI, you
should be set.

In the meantime, I believe the only platform today that needs PCI support
for dwc2 is our internal Synopsys development board, which is not an ARM
platform. So I don't think there is a real issue here.

> I think it would be the best to replace global mode selection
> choice option with just two independent suboptions for combined
> host+gadget platform driver which will enable host and gadget
> support to be compiled into the driver (you would need to enable
> both for dual role support).  The actual selection of the mode
> used should be done at runtime using device tree.

See above. The dwc3 driver uses the same scheme as Dinh has implemented,
and I don't think there have been any problems with it.

-- 
Paul

--
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