From owner-freebsd-mips@FreeBSD.ORG Fri Apr 1 21:23:50 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E127106566B; Fri, 1 Apr 2011 21:23:50 +0000 (UTC) (envelope-from bhanuprakashbodireddy@gmail.com) Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id C19C68FC08; Fri, 1 Apr 2011 21:23:49 +0000 (UTC) Received: by pxi6 with SMTP id 6so2505057pxi.17 for ; Fri, 01 Apr 2011 14:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BQINit/xlDuNeOt9g3If5dESMml5qDAC9i8cVfZjf98=; b=cZcG6Up7yw6h6UPYPnmWDJAOp3yq3plWoUrc/3CIA9DrzyuJvczRs6FdGJH8RnFUzz apxflxN/HPr0oQtEpUqJz4ok/qLx8fdmI/iuWe06GXF1NbVREPD+f0KF6oI6QI6eHIBj 6M3+NDHY8uwPNIIDfJA5XxvoV3c5JuIe9oUDw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RoqsWcKiuGgJJiLSQBLFyqaNYW8v0bertjrwdgBuO5FgAfVtSwPqU2ywPmiaio3w2d lYKQKeDS3UtGR9k1RNisXCLdWd2QMTZzc35+vbaVSZBZao+pez3MBGac49VT7ucCT0pn /Ky4FckCwtfkV5DjYfZ3onJT5Aw8OrN8JcwqU= MIME-Version: 1.0 Received: by 10.142.76.16 with SMTP id y16mr3387165wfa.157.1301693029461; Fri, 01 Apr 2011 14:23:49 -0700 (PDT) Received: by 10.142.222.3 with HTTP; Fri, 1 Apr 2011 14:23:49 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Apr 2011 14:23:49 -0700 Message-ID: From: bhanuprakash bodireddy To: Andrew Duane Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "mips@freebsd.org" Subject: Re: Blatant simple bug in Cavium SDK USB code? X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2011 21:23:50 -0000 Hi Andrew, We are yet to add the USB support to mainline. I have sent USB support patches to Juli and she had reviewed them earlier. But some of the routines are yet to be rewritten(due to other issues) and hence the support is still missing. Thanks, Bhanu Prakash. On Fri, Apr 1, 2011 at 1:03 PM, Andrew Duane wrote: > This isn't even close to the only problem I'm having. I don't make it out > of cvmx_usb_initialize at all. One of two things happens: > > 1) The code completes and device_probe returns ENXIO so the routine bails > out and USB doesn't work. > 2) Something goes insane and I either get a load fault halfway through the > routine touching one of the USB registers (CVMX_USBCX_GAHBCFG I think), or I > get an instruction exception in some worker routine buried in the middle. > > Ouch indeed.... > > -- > Andrew Duane Juniper Networks > 978-589-0551 10 Technology Park Dr > aduane@juniper.net Westford, MA 01886-3418 > > ________________________________________ > From: juli@clockworksquid.com [juli@clockworksquid.com] On Behalf Of Juli > Mallett [jmallett@FreeBSD.org] > Sent: Friday, April 01, 2011 2:45 PM > To: Andrew Duane > Cc: mips@freebsd.org > Subject: Re: Blatant simple bug in Cavium SDK USB code? > > Hey Andrew, > > On Fri, Apr 1, 2011 at 11:08, Andrew Duane 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: > > > > 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. > > 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. > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" >