From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 25 Jun 2013 06:20:53 +0200 Subject: [U-Boot] [PATCH 2/4] usb:composite: use memcpy to avoid unaligned access In-Reply-To: <1365595673-23272-3-git-send-email-p.wilczek@samsung.com> References: <1365595673-23272-1-git-send-email-p.wilczek@samsung.com> <1365595673-23272-3-git-send-email-p.wilczek@samsung.com> Message-ID: <51C91AA5.3010008@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Prafulla, just saw, that the below patch is delegated to you: (added also Marek Vasut to cc, as he is the usb maintainer) Am 10.04.2013 14:07, schrieb Piotr Wilczek: > This patch memcpy is used instead of an assignment to > avoid unaligned access execption on some ARM platforms. > > Signed-off-by: Piotr Wilczek > Signed-off-by: Kyungmin Park > CC: Lukasz Majewski > --- > drivers/usb/gadget/composite.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c > index 2c5600e..0716e52 100644 > --- a/drivers/usb/gadget/composite.c > +++ b/drivers/usb/gadget/composite.c > @@ -997,7 +997,8 @@ static int composite_bind(struct usb_gadget *gadget) > if (status < 0) > goto fail; > > - cdev->desc = *composite->dev; > + memcpy(&cdev->desc, composite->dev, > + sizeof(struct usb_device_descriptor)); > cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; > > debug("%s: ready\n", composite->name); > This fixes a bug... do you plan to work it in for this release? Or are there some issues with this patch? bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany