From owner-freebsd-stable@FreeBSD.ORG Wed Apr 2 11:34:59 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA0021065670; Wed, 2 Apr 2008 11:34:58 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (unknown [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 56EA08FC22; Wed, 2 Apr 2008 11:34:58 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from prawn.unsane.co.uk (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.14.0/8.14.0) with ESMTP id m32BYjf5007935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Apr 2008 12:34:46 +0100 (BST) (envelope-from jhary@unsane.co.uk) Message-ID: <47F36F5F.90301@unsane.co.uk> Date: Wed, 02 Apr 2008 12:34:55 +0100 From: Vince Hoffman User-Agent: Thunderbird 2.0.0.12 (X11/20080327) MIME-Version: 1.0 To: Kostik Belousov References: <20080329222049.GA80263@eos.sc1.parodius.com> <47EED34E.2080400@unsane.co.uk> <47EFCF67.9040601@system.pl> <47F0A577.90800@unsane.co.uk> <20080331092035.GH21209@deviant.kiev.zoral.com.ua> <47F0C75B.9040000@unsane.co.uk> <20080331111714.GI21209@deviant.kiev.zoral.com.ua> <47F1F877.4010008@unsane.co.uk> <20080401094935.GQ21209@deviant.kiev.zoral.com.ua> <47F356EF.8040607@unsane.co.uk> <20080402111644.GX21209@deviant.kiev.zoral.com.ua> In-Reply-To: <20080402111644.GX21209@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcin Cieslak , freebsd-stable@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Panic with usb serial X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2008 11:34:59 -0000 Kostik Belousov wrote: > On Wed, Apr 02, 2008 at 10:50:39AM +0100, Vince Hoffman wrote: >> Kostik Belousov wrote: >>> On Tue, Apr 01, 2008 at 09:55:19AM +0100, Vince Hoffman wrote: >>>> Kostik Belousov wrote: >>>>> On Mon, Mar 31, 2008 at 12:13:31PM +0100, Vince Hoffman wrote: >>>>>> Kostik Belousov wrote: >>>>> Compile the ddb into the kernel (instructions are provided at the same >>>>> web page) and post the output of the console on the panic >>>> I tried this but other than the fact I can drop into ddb and step though >>>> stuff I'm not sure what I can do with it. Since I cant (obviously) get a >>>> serial console on my laptop I have done it the other way and taken a >>>> picture of the console on panic. When I have more time I'll carry on >>>> reading up on ddb but I think I have a steep learning curve since my >>>> previous looks at programing stopped at 'hello world':) >>>> Panic console at: >>>> http://unsane.co.uk/~jhary/freebsd/IMAGE_119.jpg >>> Thanks, this is enough. Two chunks were missed from the rev. 1.210. >>> Please, try the patch below. >>> >>> diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c >>> index 843498e..7e6e048 100644 >>> --- a/sys/kern/kern_conf.c >>> +++ b/sys/kern/kern_conf.c >>> @@ -402,8 +402,7 @@ giant_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread >>> if (dsw == NULL) >>> return (ENXIO); >>> mtx_lock(&Giant); >>> - retval = dev->si_devsw->d_gianttrick-> >>> - d_ioctl(dev, cmd, data, fflag, td); >>> + retval = dsw->d_gianttrick->d_ioctl(dev, cmd, data, fflag, td); >>> mtx_unlock(&Giant); >>> dev_relthread(dev); >>> return (retval); >>> @@ -419,8 +418,7 @@ giant_read(struct cdev *dev, struct uio *uio, int ioflag) >>> if (dsw == NULL) >>> return (ENXIO); >>> mtx_lock(&Giant); >>> - retval = dev->si_devsw->d_gianttrick-> >>> - d_read(dev, uio, ioflag); >>> + retval = dsw->d_gianttrick->d_read(dev, uio, ioflag); >>> mtx_unlock(&Giant); >>> dev_relthread(dev); >>> return (retval); >> Hi Kostik, >> Yes this stops the panic. I do still get the console spammed with >> informational messages >> >> Apr 2 10:36:30 prawn kernel: ucom0: > 0/0, rev 1.10/4.00, addr 3> on uhub2 >> Apr 2 10:36:33 prawn login: ROOT LOGIN (toor) ON ttyv0 >> Apr 2 10:36:56 prawn kernel: ucom0: ucomreadcb: IOERROR >> Apr 2 10:36:56 prawn kernel: ucom0: at uhub2 port 1 (addr 3) disconnected >> Apr 2 10:36:57 prawn kernel: Still 4294967295 threads in ttyU0 >> Apr 2 10:37:16 prawn last message repeated 188 times >> Apr 2 10:37:16 prawn login: ROOT LOGIN (toor) ON ttyv1 >> Apr 2 10:37:16 prawn kernel: Still 4294967295 threads in ttyU0 >> Apr 2 10:37:47 prawn last message repeated 303 times >> Apr 2 10:37:55 prawn last message repeated 85 times >> >> >> but I can live with that. >> >> I had opened PR usb/122287 for this, and I have updated this with the >> relevent information from this thread. > > I committed the fix to the HEAD. I tested the patch with the uark(4) > cable, and simply running the tip over the ttyU0 did not produced the > "Still -1 threads in ttyU0" message. Are you running tip, or something > else over the port ? > Just tip. [~](12:30:32) {root@prawn}#grep usb0 /etc/remote usb0:dv=/dev/ttyU0:br#9600:pa=none: then [~](12:31:20) {root@prawn}#tip usb0 connected Router> then unplugged the usb adapter Vince