From owner-freebsd-scsi Fri May 2 10:46:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA12601 for freebsd-scsi-outgoing; Fri, 2 May 1997 10:46:45 -0700 (PDT) Received: from sendero.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id KAA12590 for ; Fri, 2 May 1997 10:46:26 -0700 (PDT) Received: (qmail 6822 invoked by uid 1000); 2 May 1997 17:20:56 -0000 Message-ID: X-Mailer: XFMail 1.1-alpha [p0] on FreeBSD X-PRIORITY: 2 (High) Priority: urgent Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Fri, 02 May 1997 10:08:18 -0700 (PDT) Organization: iConnect Corp. From: Simon Shapiro To: freebsd-scsi@freebsd.org Subject: Multiple Busses, HowTo Question Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi Yall, I am getting to the point where I really need an answer to the question. Here is the situation: The DPT SCSi HBA has up to three busses per HBA. It is a bit unlike the Adaptec or the Mylex solution in that there is really only one HBA (one set of registers, etc.), but the HBA has 1,2, or 3 busses. We know how to detect it at initialization time and how to address them. What we do not know, is how to tell FreeBSD about it. Here is what we did: 1. We have one softc structure for each HBA. 2. In the softc, we maintain a count of how many busses we found. 3. In the softc, we have an array of scsi_link structures. One per bus. 4. In the config file we have 3 scsi busses: controller dpt0 controller scbus0 at dpt0 controller scbus1 at dpt0 controller scbus2 at dpt0 disk sd0 at scbus0 target 0 unit 0 disk sd1 at scbus0 target 1 unit 0 disk sd2 at scbus0 target 2 unit 0 disk sd3 at scbus0 target 3 unit 0 disk sd4 at scbus0 target 4 unit 0 ... disk sd16 at scbus1 target 0 unit 0 disk sd17 at scbus1 target 1 unit 0 disk sd18 at scbus1 target 2 unit 0 disk sd19 at scbus1 target 3 unit 0 disk sd20 at scbus1 target 4 unit 0 ... disk sd128 at scbus0 target 0 unit 1 disk sd129 at scbus0 target 1 unit 1 disk sd130 at scbus0 target 2 unit 1 disk sd131 at scbus0 target 3 unit 1 disk sd132 at scbus0 target 4 unit 1 ... What we see is that scsi_attachdevs() calls dpt0 with ALL the three busses, without any visible (to us) indication which bus should the request go to. The QUESTION: Should we create a separate softc for each bus, or is there a way to differentiate the busses? Thanx a million! Simon solution in that there is really only one HBA (one set of registers, etc.), but the HBA has 1,2, or 3 busses. We know how to detect it at initialization time and how to address them. What we do not know, is how to tell FreeB