From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 06:43:51 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A146116A4B3 for ; Wed, 1 Oct 2003 06:43:51 -0700 (PDT) Received: from webmail.tiscali.de (relay1.tiscali.de [62.26.116.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E76543FAF for ; Wed, 1 Oct 2003 06:43:50 -0700 (PDT) (envelope-from walter@pelissero.de) Received: from daemon.home.loc (62.246.17.49) by webmail.tiscali.de (6.7.019) id 3F79A3DD0006DF6A for hackers@freebsd.org; Wed, 1 Oct 2003 15:43:49 +0200 Received: from hyde.home.loc (hyde.home.loc [10.0.0.2]) by daemon.home.loc (8.12.9/8.12.8) with ESMTP id h91Df6oB001015 for ; Wed, 1 Oct 2003 15:41:06 +0200 (CEST) (envelope-from wcp@hyde.home.loc) Received: from hyde.home.loc (localhost [127.0.0.1]) by hyde.home.loc (8.12.9/8.12.8) with ESMTP id h91Df1tl018980 for ; Wed, 1 Oct 2003 15:41:01 +0200 (CEST) (envelope-from wcp@hyde.home.loc) Received: (from wcp@localhost) by hyde.home.loc (8.12.9/8.12.6/Submit) id h91Df1i3018977; Wed, 1 Oct 2003 15:41:01 +0200 (CEST) (envelope-from wcp) From: "Walter C. Pelissero" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16250.55661.682838.198052@hyde.home.loc> Date: Wed, 1 Oct 2003 15:41:01 +0200 To: hackers@freebsd.org X-Mailer: VM 7.16 under Emacs 21.3.50.1 X-Attribution: WP Subject: CAM suspend X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: walter@pelissero.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2003 13:43:51 -0000 Having noticed that there is not a big interest in it, among the fellow FreeBSDers, I was about to set off and hack up the scsi subsystem to implement spindown on suspend and spinup on resume of the da devices, when I realized that there seems to be no hook in the SCSI code for this events. I'm not a device driver expert, so I'm looking for clues. What I mean is that the ata-pci driver, for instance, specifies hooks via the device_method_t structure which is not available in the scsi_all or scsi_da modules. I understand that they are simply different kind of beasts (sitting on different layers of the kernel code), but I was wondering if there might be a similar mechanism to do what I want. So, what is the recommended way (if there is one), to hook a function of the SCSI subsystem to an event like suspend/resume? I would most appreciate if anyone could point me to a suitable document or even anything related to FreeBSD kernel hacking. Cheers, -- walter pelissero http://www.pelissero.de