usb/122287: Removal of usb serial Device with session (eg tip)
attached panics system
Vince Hoffman
jhary at unsane.co.uk
Wed Apr 2 02:50:02 PDT 2008
The following reply was made to PR usb/122287; it has been noted by GNATS.
From: Vince Hoffman <jhary at unsane.co.uk>
To: bug-followup at FreeBSD.org, jhary at unsane.co.uk
Cc:
Subject: Re: usb/122287: Removal of usb serial Device with session (eg tip)
attached panics system
Date: Wed, 02 Apr 2008 10:49:49 +0100
A Patch that fixes this was supplied by Kostik Belousov <kostikbel AT
gmail DOt com>
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);
Its a little spammy on the console but stops the panic
Apr 2 10:36:30 prawn kernel: ucom0: <FTDI usb serial converter, class
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
More information about the freebsd-usb
mailing list