Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Apr 2011 11:45:41 -0700
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Andrew Duane <aduane@juniper.net>
Cc:        "mips@freebsd.org" <mips@freebsd.org>
Subject:   Re: Blatant simple bug in Cavium SDK USB code?
Message-ID:  <BANLkTinsxZdGQfaNgav-acpP6hDQ9Ss%2BgQ@mail.gmail.com>
In-Reply-To: <AC6674AB7BC78549BB231821ABF7A9AEB52F1950C7@EMBX01-WF.jnpr.net>
References:  <AC6674AB7BC78549BB231821ABF7A9AEB52F1950C5@EMBX01-WF.jnpr.net> <AC6674AB7BC78549BB231821ABF7A9AEB52F1950C7@EMBX01-WF.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hey Andrew,

On Fri, Apr 1, 2011 at 11:08, Andrew Duane <aduane@juniper.net> wrote:
>
> In the routine cvmx_usb_initialize in sys/contrib/octeon-sdk/cvmx-usb.c, =
I'm pretty sure there's a silly little bug that really BADLY breaks the USB=
 driver for some of us.
>
> Near the top, after it finds board type and sets the clock type, as part =
of the structure initialization, there is:
>
> =A0 =A0memset(usb, 0, sizeof(usb));
>
> Tell me that is not supposed to be:
>
> =A0 =A0memset(usb, 0, sizeof(*usb));
>
> The existing code only zeros 4/8 bytes, instead of the 23KB of the struct=
ure.

Ouch, nice catch.  Is that the only thing keeping the USB driver from
working for you?  I thought it had rotted some behind other controller
changes and also had some problems with stalls, but perhaps the
culprit was initialization all along.  I'll check in that fix soon,
but would like to hear from you as to whether you have any additional
fixes for USB (or even bugs to report.)

I've BCC'd some Cavium people who will no doubt appreciate the bug report!

Thanks,
Juli.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTinsxZdGQfaNgav-acpP6hDQ9Ss%2BgQ>