Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Sep 2000 13:45:20 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Wilko Bulte <wkb@freebie.demon.nl>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: suggestion for camcontrol
Message-ID:  <20000908134520.A20744@panzer.kdm.org>
In-Reply-To: <20000908211921.A49085@freebie.demon.nl>; from wkb@freebie.demon.nl on Fri, Sep 08, 2000 at 09:19:21PM %2B0200
References:  <20000908211921.A49085@freebie.demon.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Sep 08, 2000 at 21:19:21 +0200, Wilko Bulte wrote:
> Would it be difficult for camcontrol to display the initiator ID of the
> hostadapter in addition to the devices in the output of devlist?
> 
> Today:
> 
> miata#camcontrol devlist
> <SEAGATE ST34371W 0702>            at scbus0 target 0 lun 0 (pass0,da0)
> <IBM DDRS-34560W S97B>             at scbus0 target 1 lun 0 (pass1,da1)
> <IBM DDRS-39130D DC1B>             at scbus0 target 2 lun 0 (pass2,da2)
> 
> Suggested example:
> 
> miata#camcontrol devlist
> <SEAGATE ST34371W 0702>            at scbus0 target 0 lun 0 (pass0,da0)
> <IBM DDRS-34560W S97B>             at scbus0 target 1 lun 0 (pass1,da1)
> <IBM DDRS-39130D DC1B>             at scbus0 target 2 lun 0 (pass2,da2)
> <Qlogic 1040 isp0>		   at scbus0 target 7
> 
> I'm currently playing with shared SCSI buses and in situations like that it
> is really practical if you can get a display of the complete SCSI bus.

Well, the initiator isn't currently included in the CAM EDT, and I'm not
sure that it would be the right thing to do that.  You'd need the initiator
to be in the EDT in order for printing it with 'camcontrol devlist' to just
work.  (Well, it wouldn't quite "just work", you might need some additional
printing logic.)

The most likely place for that information to go would be the Path Inquiry
CCB.  In fact, the initiator ID is already in that CCB, it just isn't
displayed by 'camcontrol negotiate da0 -v'.  I've attached a patch to do
that, here's what you get:

# ./camcontrol negotiate da0 -v
Current Parameters:
(pass0:ahc0:0:0:0): sync parameter: 12
(pass0:ahc0:0:0:0): frequency: 20.000MHz
(pass0:ahc0:0:0:0): offset: 8
(pass0:ahc0:0:0:0): bus width: 16 bits
(pass0:ahc0:0:0:0): disconnection is enabled
(pass0:ahc0:0:0:0): tagged queueing is enabled
ahc0: SIM/HBA version: 1
ahc0: supports tag queue messages
ahc0: supports SDTR message
ahc0: supports 16 bit wide SCSI
ahc0: HBA engine count: 0
ahc0: maximum target: 15
ahc0: maximum LUN: 64
ahc0: highest path ID in subsystem: 0
ahc0: initiator ID: 7
ahc0: SIM vendor: FreeBSD
ahc0: HBA vendor: Adaptec
ahc0: bus ID: 0
ahc0: base transfer speed: 3.300MB/sec

As far as putting it in the devlist output, we could kludge some of the
information in there, but the adapter model number isn't currently included
in the path inquiry.

It might be possible to add a new node type into the EDT, or perhaps to
represent the initiator as a target device, but that would require adding
target matching capability.  We could add the initiator as a regular
device (lun), but it wouldn't have many of the things associated with a
lun/device node, like inquiry data.

Anyway, the bottom line is that it can be done, but doing it in a clean
manner isn't trivial.  I think it would need some discussion to figure out
whether there should be a node for the initiator in the EDT, and if so,
what sort of node it should be.

Ken
-- 
Kenneth Merry
ken@kdm.org

--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="camcontrol.c.initiator_id.20000908"

==== //depot/FreeBSD-ken/src/sbin/camcontrol/camcontrol.c#14 - /a/ken/perforce/FreeBSD-ken/src/sbin/camcontrol/camcontrol.c ====
*** /tmp/tmp.20855.0	Fri Sep  8 13:29:32 2000
--- /a/ken/perforce/FreeBSD-ken/src/sbin/camcontrol/camcontrol.c	Fri Sep  8 13:26:28 2000
***************
*** 2307,2312 ****
--- 2307,2314 ----
  		cpi->max_lun);
  	fprintf(stdout, "%s highest path ID in subsystem: %d\n",
  		adapter_str, cpi->hpath_id);
+ 	fprintf(stdout, "%s initiator ID: %d\n", adapter_str,
+ 		cpi->initiator_id);
  	fprintf(stdout, "%s SIM vendor: %s\n", adapter_str, cpi->sim_vid);
  	fprintf(stdout, "%s HBA vendor: %s\n", adapter_str, cpi->hba_vid);
  	fprintf(stdout, "%s bus ID: %d\n", adapter_str, cpi->bus_id);

--k+w/mQv8wyuph6w0--


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?20000908134520.A20744>