Date: Wed, 20 Nov 2002 16:45:24 -0500 From: "Long, Scott" <Scott_Long@adaptec.com> To: "'Nate Lawson'" <nate@root.org>, Chuck Tuffli <chuck_tuffli@agilent.com> Cc: freebsd-scsi@FreeBSD.ORG Subject: RE: SIM as loadable module? Message-ID: <6100BCEB85F8E244959C756C04E0EDD161CB94@otcexc01.otc.adaptec.com>
next in thread | raw e-mail | index | archive | help
Ok, I'm getting really confused. Chuck, is the problem that the bus doesn't get scanned at all, ever, or that it doesn't get scanned when loaded as a module? Have you tried doing a 'camcontrol rescan' on the bus after loading the module? See below... > > On Wed, 20 Nov 2002, Chuck Tuffli wrote: > > On Mon, Nov 18, 2002 at 10:16:06PM -0700, Kenneth D. Merry wrote: > > > On Mon, Nov 18, 2002 at 23:47:13 -0500, Long, Scott wrote: > > > > > > One question is whether the card gets probed when you > statically compile > > > the driver into the kernel. > > > > I haven't tried this yet. Maybe the question I'm asking is does the > > CAM automatically scan new buses or is a scan initiated by > camcontrol > > for loadable modules. > > It gets scanned on boot. If you load a module, it does not start a > rescan automatically although the periph drivers are notified > by an async > callback. > > > > Another is, what happens when you rescan that bus? > (camcontrol devlist -v > > > should show which SCSI bus is allocated to your driver.) > > > > smallrocks# camcontrol devlist -v > > scbus0 on tach0 bus 0: > > < > at scbus0 target -1 lun -1 () > > scbus1 on tach1 bus 0: > > < > at scbus1 target -1 lun -1 () > > scbus-1 on xpt0 bus 0: > > < > at scbus-1 target -1 lun > -1 (xpt0) > > This looks like it's attaching but the target id is invalid. > Can you show > your tach_attach routine where you set up the SIM and then register? This devlist output is correct. The target id for each bus is displayed as -1 on SCSI also. Now, this output only verifies that the SIM is being registered, not that your SIM action method is actually working. You can write a trivial bit of code to send a PATH_INQ to one of these busses and see if that is working. As for how to handle the target id assignment of the SIM's bus, I think that you're making it more complicated that it needs to be. CAM's bus scan algorithm is smart enough to not attempt to probe the target number that you've specified as belonging to the host. I'm not sure if setting it to cpi->max_target + 1 will confuse CAM or not, but I highly doubt it. The bus_id number is another thing that CAM doesn't really care about, so as long as you provide a number that the user/applications agree is logical, everything is fine. Scott 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?6100BCEB85F8E244959C756C04E0EDD161CB94>