Blatant simple bug in Cavium SDK USB code?
Andrew Duane
aduane at juniper.net
Fri Apr 1 18:09:36 UTC 2011
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:
memset(usb, 0, sizeof(usb));
Tell me that is not supposed to be:
memset(usb, 0, sizeof(*usb));
The existing code only zeros 4/8 bytes, instead of the 23KB of the structure.
--
Andrew Duane Juniper Networks
978-589-0551 10 Technology Park Dr
aduane at juniper.net Westford, MA 01886-3418
More information about the freebsd-mips
mailing list