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]
Date:	Thu, 31 Oct 2013 16:16:02 -0500
From:	Felipe Balbi <balbi@...com>
To:	David Cohen <david.a.cohen@...ux.intel.com>
CC:	<balbi@...com>, <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<stern@...land.harvard.edu>, <Paul.Zimmerman@...opsys.com>
Subject: Re: [PATCH v3 3/3] usb: dwc3: add quirk
 USB_GADGET_QUIRK_EP_OUT_ALIGNED_SIZE to gadget driver

On Thu, Oct 31, 2013 at 12:58:51PM -0700, David Cohen wrote:
> On 10/30/2013 10:35 AM, Felipe Balbi wrote:
> > On Wed, Oct 30, 2013 at 10:06:18AM -0700, David Cohen wrote:
> >> DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
> >> This patch adds necessary quirk for it.
> >>
> >> Signed-off-by: David Cohen <david.a.cohen@...ux.intel.com>
> >> ---
> >>  drivers/usb/dwc3/gadget.c | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>
> >> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> >> index 5452c0f..528c7d7 100644
> >> --- a/drivers/usb/dwc3/gadget.c
> >> +++ b/drivers/usb/dwc3/gadget.c
> >> @@ -2600,6 +2600,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
> >>  	dwc->gadget.name		= "dwc3-gadget";
> >>  
> >>  	/*
> >> +	 * Per databook, DWC3 needs buffer size to be aligned to MaxPacketSize
> >> +	 * on ep out.
> >> +	 */
> >> +	dwc->gadget.quirk_ep_out_aligned_size = 1;
> > 
> > just to make it look cooler and neater, could you set to 'true' instead
> > :-)
> 
> 'bool' is an alien in C :)
> But I can change to true in next patch set.

don't change the type, just assign true instead of 1. true is defined as
!0, so it'll be a 1 anywa. Still the rest of the driver uses true/false
for one-bit fields.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ