Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932434AbVKLRqW (ORCPT ); Sat, 12 Nov 2005 12:46:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932433AbVKLRqW (ORCPT ); Sat, 12 Nov 2005 12:46:22 -0500 Received: from cse-mail.unl.edu ([129.93.165.11]:35019 "EHLO cse-mail.unl.edu") by vger.kernel.org with ESMTP id S932434AbVKLRqV (ORCPT ); Sat, 12 Nov 2005 12:46:21 -0500 Date: Sat, 12 Nov 2005 11:45:54 -0600 (CST) From: Hui Cheng To: kernelnewbies@nl.linux.org cc: linux-kernel@vger.kernel.org Subject: How to quickly detect the mode change of a hard disk? In-Reply-To: <200511102334.10926.cloud.of.andor@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (cse-mail.unl.edu [129.93.165.11]); Sat, 12 Nov 2005 11:46:00 -0600 (CST) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 839 Lines: 20 Hi, I am currently doing a kernel module involves detecting/changing disk mode among STANDBY and ACTIVE/IDLE. I used ide_cmd_wait() to issue commands like WIN_IDLEIMMEDIATELY and WIN_STANDBYNOW1. The problem is, a drive in standby mode will automatically awake whenever a disk operation is requested and I need to know the mode change as soon as possible. (So I donot want to periodically use the WIN_CHECKPOWERMODE to detect it). I was wondering if the standby disk is waken by the kernel or by the disk firmware? If it is not in the kernel, is there any good way to detect it? Thanks, Hui - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/