From owner-freebsd-scsi@FreeBSD.ORG Wed Jun 2 05:17:25 2004 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACD5C16A4D8 for ; Wed, 2 Jun 2004 05:17:25 -0700 (PDT) Received: from dragon.rutgers.edu (dragon.rutgers.edu [128.6.25.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5724A43D1D for ; Wed, 2 Jun 2004 05:17:25 -0700 (PDT) (envelope-from bohra@cs.rutgers.edu) X-Virus-Scanned: by dragon-cgpav-clamav-v1.3b Received: from [165.230.44.70] (account bohra HELO cs.rutgers.edu) by dragon.rutgers.edu (CommuniGate Pro SMTP 4.1.8) with ESMTP id 15568525; Wed, 02 Jun 2004 08:17:11 -0400 Message-ID: <40BDC483.9040502@cs.rutgers.edu> Date: Wed, 02 Jun 2004 08:13:55 -0400 From: Aniruddha Bohra User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040409 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Kenneth D. Merry" References: <40BD0982.9000708@cs.rutgers.edu> <20040602005306.GA73243@panzer.kdm.org> In-Reply-To: <20040602005306.GA73243@panzer.kdm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-scsi@freebsd.org Subject: Re: SCSI device question X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2004 12:17:25 -0000 Kenneth D. Merry wrote: > On Tue, Jun 01, 2004 at 18:56:02 -0400, Aniruddha Bohra wrote: > >>Hello, >> All SCSI devices cam/scsi/scsi_xx.c >>do the following : >> /* >> * Install a global async callback. This callback will >> * receive async callbacks like "new device found". >> */ >> csa.event_enable = AC_FOUND_DEVICE; >> csa.callback = passasync; >> >> However, I did not find the code where the event is >>triggered. Is it automatically done by the rescan code? >>Is there a standard way to indicate to the peripheral drivers >>that there is a new device on the bus? > > > See sys/cam/cam_xpt.c, the function probedone() in the > PROBE_TUR_FOR_NEGOTIATION case. (xpt_async(AC_FOUND_DEVICE, path, ccb)) > > It's triggered by a rescan or initial probe at boot. Thanks a lot. > > What are you trying to do? I am just trying to understand the code. Thanks Aniruddha