Date: Thu, 09 Aug 2012 09:16:20 -0400 From: John Baldwin <jhb@FreeBSD.org> To: Mike Tancsa <mike@sentex.net> Cc: Garrett Cooper <yanegomi@gmail.com>, current@freebsd.org Subject: Re: [PATCH] Add locking to twe(4) so it no longer uses Giant Message-ID: <5023B824.40405@FreeBSD.org> In-Reply-To: <5023AB9D.5070608@sentex.net> References: <201208031418.57941.jhb@freebsd.org> <201208031726.03652.jhb@freebsd.org> <502121F5.4020705@sentex.net> <201208080727.45595.jhb@freebsd.org> <5022B252.30606@sentex.net> <5023AB9D.5070608@sentex.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/9/12 8:22 AM, Mike Tancsa wrote: > On 8/8/2012 2:39 PM, Mike Tancsa wrote: >> On 8/8/2012 7:27 AM, John Baldwin wrote: >>>> Looks like it breaks 3dm2 and the tw_cli. With the patch, I am not able >>>> to see the 8006 controller I added. >>> >>> Ugh, ok. A few questions: >>> >>> 1) Does the driver see any attached drives/volumes? >> >> Yes >> >>> >>> 2) If it does, does basic I/O to the drives work? >> >> yes Ok, so that's good. I didn't break anything fundamental with driver commands. >>> 3) Can you add some debugging printfs to twe_ioctl() to see what, if anything, >>> fails in that routine when tw_cli makes a request? >> >> Yes, for sure. Let me know what you would like me to add. > > One more data point, /dev/twe0 does not exist with the patch and I think > thats why the utils fail outright. Oh, hmm. That's odd. Do you get any error messages on the console when twe0 attaches? Also, you have INVARIANTS enabled, yes? (make_dev() panics when it fails if INVARIANTS is enabled). Maybe try something like this (relative to the patched driver): --- //depot/user/jhb/cleanup/sys/dev/twe/twe_freebsd.c 2012-08-03 18:10:04.000000000 0000 +++ /Users/jhb/work/p4/cleanup/sys/dev/twe/twe_freebsd.c 2012-08-03 18:10:04.000000000 0000 @@ -342,9 +342,12 @@ /* * Create the control device. */ + device_printf(sc->twe_dev, "Calling make_dev()\n"); sc->twe_dev_t = make_dev(&twe_cdevsw, device_get_unit(sc->twe_dev), UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR, "twe%d", device_get_unit(sc->twe_dev)); sc->twe_dev_t->si_drv1 = sc; + device_printf(sc->twe_dev, "make_dev() returned %p (%s)\n", sc->twe_dev_t, + sc->twe_dev_t->si_name); /* * Schedule ourselves to bring the controller up once interrupts are available. * This isn't strictly necessary, since we disable interrupts while probing the -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5023B824.40405>