From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 11:21:59 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 C26C216A4B3 for ; Thu, 2 Oct 2003 11:21:59 -0700 (PDT) Received: from mail.synology.com (dns1.synology.com [210.202.102.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56D1043FCB for ; Thu, 2 Oct 2003 11:21:58 -0700 (PDT) (envelope-from jsli@mail2000.com.tw) Received: from mail2000.com.tw (61-230-111-172.HINET-IP.hinet.net [61.230.111.172]) (authenticated bits=0) by mail.synology.com (8.12.10/8.12.10) with ESMTP id h92ILFDb088619; Fri, 3 Oct 2003 02:21:27 +0800 (CST) Message-ID: <3F7C6C9F.5060401@mail2000.com.tw> Date: Fri, 03 Oct 2003 02:21:19 +0800 From: Jia-Shiun Li User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: walter@pelissero.de References: <16250.55661.682838.198052@hyde.home.loc> In-Reply-To: <16250.55661.682838.198052@hyde.home.loc> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: CAM suspend X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 18:21:59 -0000 Since the memory content will be kept across suspension, I guess there is no need for da to take special care. Just like what ad does. The actual suspend/resume method is for ata-pci. For hardware devices to come back to previous state, the correct place may be in SCSI HBA driver like ahc, sym, etc.? Jia-Shiun. Walter C. Pelissero wrote: > 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, >