Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 1999 22:43:05 +0100 (CET)
From:      Nick Hibma <hibma@skylink.it>
To:        "Justin T. Gibbs" <gibbs@narnia.plutotech.com>
Cc:        scsi@FreeBSD.org
Subject:   Re: found device.
Message-ID:  <Pine.BSF.4.20.9911262204420.254-100000@henny.jrc.it>
In-Reply-To: <199911251503.IAA99696@narnia.plutotech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> >         if (xpt_create_path(&sc->path, NULL, cam_sim_path(umass_sim),

            if (xpt_create_path(&sc->path, xpt_periph, cam_sim_path(umass_sim),

> >                     device_get_unit(sc->sc_dev), CAM_LUN_WILDCARD)

                        device_get_unit(sc->sc_dev), 0)

> >             != CAM_REQ_CMP)
> >                 return(ENOMEM);
> > 
> >         ccb = malloc(sizeof(union ccb), M_DEVBUF, M_WAITOK);

            memset(ccb, 0, sizeof(union ccb));

> >         xpt_setup_ccb(&ccb->ccb_h, sc->path, 5/*priority (low)*/);
> >         ccb->ccb_h.func_code = XPT_SCAN_LUN; 

            ccb->ccb_h.func_code = XPT_SCAN_BUS; 

> >         ccb->ccb_h.cbfcnp = umass_cam_attach_callback;
> >         ccb->crcn.flags = CAM_FLAG_NONE;
> >         xpt_action(ccb);
> >  
> >         return(0);
> > }
> 
> If you simply want to rescan the bus, try XPT_SCAN_BUS.

It still requires periph to be set in xpt_done to decide in which queue
to queue the ccb (BIO or NET).

After the changes made above the code works (and makes sense).


I suggest the following:

When using camcontrol to scan the bus, the peripheral that is used is
xpt_periph. If xpt_periph is exported in cam_periph.h that peripheral
can be used as a place holder.

Nick
--
hibma@skylink.it
n_hibma@freebsd.org                                          USB project
http://www.etla.net/~n_hibma/



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?Pine.BSF.4.20.9911262204420.254-100000>