From owner-freebsd-scsi Wed May 30 14:32:42 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from mail.wolves.k12.mo.us (mail.wolves.k12.mo.us [207.160.214.1]) by hub.freebsd.org (Postfix) with ESMTP id BC73937B424; Wed, 30 May 2001 14:32:33 -0700 (PDT) (envelope-from cdillon@wolves.k12.mo.us) Received: from mail.wolves.k12.mo.us (cdillon@mail.wolves.k12.mo.us [207.160.214.1]) by mail.wolves.k12.mo.us (8.9.3/8.9.3) with ESMTP id QAA07826; Wed, 30 May 2001 16:32:30 -0500 (CDT) (envelope-from cdillon@wolves.k12.mo.us) Date: Wed, 30 May 2001 16:32:30 -0500 (CDT) From: Chris Dillon To: Mike Smith Cc: Tom Samplonius , Clemens Hermann , Michael Aronsen , "'freebsd-scsi@freebsd.org'" Subject: Re: Mylex controllers? In-Reply-To: <200105301948.f4UJm9R01172@mass.dis.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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 #include #include +#include #include #include @@ -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 #include +#include #include #include +#include #include #include @@ -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