From owner-freebsd-scsi Fri Nov 26 14:22:39 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from ns.skylink.it (ns.skylink.it [194.177.113.1]) by hub.freebsd.org (Postfix) with ESMTP id 04F81151F2 for ; Fri, 26 Nov 1999 14:22:34 -0800 (PST) (envelope-from hibma@skylink.it) Received: from skylink.it (va-184.skylink.it [194.185.55.184]) by ns.skylink.it (8.9.1/8.8.8) with ESMTP id XAA01069; Fri, 26 Nov 1999 23:22:53 +0100 Received: from localhost (localhost [127.0.0.1]) by skylink.it (8.9.3/8.9.3) with ESMTP id WAA00299; Fri, 26 Nov 1999 22:43:05 +0100 (CET) (envelope-from hibma@skylink.it) Date: Fri, 26 Nov 1999 22:43:05 +0100 (CET) From: Nick Hibma X-Sender: n_hibma@henny.jrc.it Reply-To: Nick Hibma To: "Justin T. Gibbs" Cc: scsi@FreeBSD.org Subject: Re: found device. In-Reply-To: <199911251503.IAA99696@narnia.plutotech.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > 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