Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2002 13:41:59 -0800
From:      Chuck Tuffli <chuck_tuffli@agilent.com>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: SIM as loadable module?
Message-ID:  <20021120214159.GA36070@cre85086tuf.rose.agilent.com>
In-Reply-To: <Pine.BSF.4.21.0211201231010.64851-100000@root.org>
References:  <20021120195226.GA35733@cre85086tuf.rose.agilent.com> <Pine.BSF.4.21.0211201231010.64851-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 20, 2002 at 01:16:58PM -0800, Nate Lawson wrote:
[snip]
> > 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?

    if (NULL == (devq = cam_simq_alloc(TACH_MAX_EXCHANGES))) {
        device_printf(tach->dev, "cam_simq_alloc failed\n");
        goto tach_app_attach_fail;
    }

    if (NULL == (sim = cam_sim_alloc(tach_action, tach_poll, "tach",
            ini, device_get_unit(tach->dev), 1, TACH_MAX_EXCHANGES, devq))) {
        device_printf(tach->dev, "cam_sim_alloc failed\n");
        goto tach_app_attach_fail;
    }
    ini->sim = sim;

    if (xpt_bus_register(sim, 0) != CAM_SUCCESS) {
        device_printf(tach->dev, "xpt_bus_register failed\n");
        goto tach_app_attach_fail;
    }

    if (xpt_create_path(&path, NULL, cam_sim_path(sim),
            CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
        device_printf(tach->dev, "xpt_create_path failed\n");
        goto tach_app_attach_fail;
    }
    ini->path = path;

    device_printf(tach->dev, "attached to CAM\n");

    return;

The relevant dmesg stuff

tach0: Agilent Tachyon Driver Version 3.1
tach0: <HP Tachyon XL2 PCI FC Adapter> port 0x1400-0x14ff,0x1800-0x18ff mem 0xf4140000-0xf417ffff,0xf4121400-0xf41215ff irq 10 at device 16.0 on pci0
tach0: osPortCB(osFCPortLinkDown)
(noperiph:tach0:0:-1:-1): xpt_compile_path
(noperiph:tach0:0:-1:-1): xpt_setup_ccb
(noperiph:tach0:0:-1:-1): xpt_action
(noperiph:tach0:0:-1:-1): xpt_done
(noperiph:tach0:0:-1:-1): xpt_release_path
(noperiph:tach0:0:-1:-1): xpt_compile_path
tach0: attached to CAM
tach1: <HP Tachyon TL PCI FC Adapter> port 0x2000-0x20ff,0x2400-0x24ff mem 0xf4100000-0xf411ffff,0xf4121800-0xf41219ff irq 5 at device 18.0 on pci0
tach1: osPortCB(osFCPortLinkDown)
(noperiph:tach1:0:-1:-1): xpt_compile_path
(noperiph:tach1:0:-1:-1): xpt_setup_ccb
(noperiph:tach1:0:-1:-1): xpt_action
(noperiph:tach1:0:-1:-1): xpt_done
(noperiph:tach1:0:-1:-1): xpt_release_path
(noperiph:tach1:0:-1:-1): xpt_compile_path
tach1: attached to CAM

-- 
Chuck Tuffli    <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage and Networking

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?20021120214159.GA36070>