Date: Wed, 30 May 2001 16:32:30 -0500 (CDT) From: Chris Dillon <cdillon@wolves.k12.mo.us> To: Mike Smith <msmith@FreeBSD.ORG> Cc: Tom Samplonius <tom@sdf.com>, Clemens Hermann <haribeau@gmx.de>, Michael Aronsen <mar@netcentralen.dk>, "'freebsd-scsi@freebsd.org'" <freebsd-scsi@FreeBSD.ORG> Subject: Re: Mylex controllers? Message-ID: <Pine.BSF.4.32.0105301610490.7611-100000@mail.wolves.k12.mo.us> In-Reply-To: <200105301948.f4UJm9R01172@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 May 2001, Mike Smith wrote: > The controller isn't the problem, it's CAM. You could try this patch: [...SNIP...] > which will hide the physical channels from CAM. This means that non-disk > peripherals on the controller SCSI busses won't work, which will get me > another set of whining complaints from different people. 8( As a followup to my last message, and in the spirit of "less talk, more patches", here is a patch to turn Mike's original fix into a sysctl tunable, I think. I made sure GENERIC would compile after this, but I have _not_ actually tested it. I ripped how to do the sysctl tunable thing straight out of sys/dev/ata/ata-all.c and ata-disk.c without really knowing what I'm doing, but it looks OK to someone who has never done anything with sysctls before (it compiles, did I mention that?). :-) --- mly.c.orig Wed May 30 16:21:00 2001 +++ mly.c Wed May 30 16:25:31 2001 @@ -36,6 +36,7 @@ #include <sys/ctype.h> #include <sys/ioccom.h> #include <sys/stat.h> +#include <sys/sysctl.h> #include <machine/bus_memio.h> #include <machine/bus.h> @@ -89,6 +90,8 @@ static d_ioctl_t mly_user_ioctl; static int mly_user_command(struct mly_softc *sc, struct mly_user_command *uc); static int mly_user_health(struct mly_softc *sc, struct mly_user_health *uh); + +SYSCTL_NODE(_hw, OID_AUTO, mly, CTLFLAG_RD, 0, "mly driver parameters"); #define MLY_CDEV_MAJOR 158 --- mly_cam.c.orig Wed May 30 15:30:49 2001 +++ mly_cam.c Wed May 30 16:08:50 2001 @@ -32,8 +32,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/bus.h> #include <sys/devicestat.h> +#include <sys/sysctl.h> #include <cam/cam.h> #include <cam/cam_ccb.h> @@ -56,6 +58,13 @@ static void mly_cam_complete(struct mly_command *mc); static struct cam_periph *mly_find_periph(struct mly_softc *sc, int bus, int target); +static int mly_cam_nophyschans; +TUNABLE_INT_DECL("hw.mly.cam_nophyschans", 1, mly_cam_nophyschans); + +SYSCTL_DECL(_hw_mly); +SYSCTL_INT(_hw_mly, OID_AUTO, mly_cam_nophyschans, CTLFLAG_RD, &mly_cam_nophyschans, 0, + "Do not report physical channels to CAM"); + /******************************************************************************** * CAM-specific queue primitives */ @@ -131,6 +140,10 @@ /* initialise the CCB queue */ mly_initq_ccb(sc); + + if (mly_cam_nophyschans) { + sc->mly_controllerinfo->physical_channels_present = 0; + } /* * Allocate a devq for all our channels combined. -- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net FreeBSD: The fastest and most stable server OS on the planet. For IA32 and Alpha architectures. IA64, PPC, and ARM under development. http://www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.32.0105301610490.7611-100000>