From owner-freebsd-scsi Tue Jul 6 10:35:12 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by hub.freebsd.org (Postfix) with ESMTP id 3216414D33 for ; Tue, 6 Jul 1999 10:35:05 -0700 (PDT) (envelope-from gibbs@narnia.plutotech.com) Received: (from gibbs@localhost) by narnia.plutotech.com (8.9.3/8.7.3) id LAA68469; Tue, 6 Jul 1999 11:24:32 -0600 (MDT) Date: Tue, 6 Jul 1999 11:24:32 -0600 (MDT) From: "Justin T. Gibbs" Message-Id: <199907061724.LAA68469@narnia.plutotech.com> To: Nick Hibma Cc: scsi@FreeBSD.org Subject: Re: CAM panic in camq_fini X-Newsgroups: pluto.freebsd.hackers In-Reply-To: User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/4.0-CURRENT (i386)) Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Redirected to the SCSI list > When, after attaching to the CAM later with > > cam_simq_alloc(1) > cam_sim_alloc(action, poll, "umass", sc, unit, 1, 0, devq) > xpt_bus_register(sc->sim, 0) > xpt_create_path(&sc->path, NULL, cam_sim_path(sc->sim), > CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) > > doing an immediate detach from it again, like so: > > xpt_async(AC_LOST_DEVICE, sc->path, NULL) > xpt_free_path(sc->path) > xpt_bus_deregister(cam_sim_path(sc->sim)) > cam_sim_free(sc->sim, /*free_devq*/TRUE) Here's a fix for one of the detach bugs. There really is no guarantee that the detach of SIMs will work right now and since the new-bus stuff for detach hasn't settled, I don't know how much effort towards this is worth while right now... -- Justin ==== //depot/FreeBSD-current/src/sys/cam/cam_queue.c#5 - /usr/src/sys/cam/cam_queue.c ==== *** /tmp/tmp.415.0 Tue Jul 6 11:32:44 1999 --- /usr/src/sys/cam/cam_queue.c Tue Jul 6 11:32:30 1999 *************** *** 242,249 **** void cam_devq_free(struct cam_devq *devq) { ! camq_free(&devq->alloc_queue); ! camq_free(&devq->send_queue); free(devq, M_DEVBUF); } --- 242,249 ---- void cam_devq_free(struct cam_devq *devq) { ! camq_fini(&devq->alloc_queue); ! camq_fini(&devq->send_queue); free(devq, M_DEVBUF); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message