Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932193AbVIXQsm (ORCPT ); Sat, 24 Sep 2005 12:48:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750757AbVIXQsm (ORCPT ); Sat, 24 Sep 2005 12:48:42 -0400 Received: from cavan.codon.org.uk ([217.147.92.49]:28908 "EHLO vavatch.codon.org.uk") by vger.kernel.org with ESMTP id S1750755AbVIXQsl (ORCPT ); Sat, 24 Sep 2005 12:48:41 -0400 Date: Sat, 24 Sep 2005 17:48:23 +0100 From: Matthew Garrett To: acpi-support@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Supporting ACPI drive hotswap Message-ID: <20050924164823.GA24351@srcf.ucam.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@vavatch.codon.org.uk X-SA-Exim-Scanned: No (on vavatch.codon.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1539 Lines: 33 ACPI provides a mechanism for noting which devices can be hotswapped and notifying the system that this has happened. Hotswappable devices are tagged with a _RMV token. What effectively needs to be done is this: 1) Find every device with an _RMV token, and install a notify handler for it. This is fairly easy. 2) On notification, check whether the device is present or absent. This can be done by calling the _STA method - alternatively it could presumably be done through the appropriate IDE or SCSI layer. I believe that we now have code that allows binding of ACPI devices to appropriate busses. 3) If a device has been added, enumerate it and do appropriate messaging to userspace (for device node creation and so forth). This ought to be relatively easy? 4) If a device has been removed, we currently have problems. SATA hotplugging is only supported on a subset of devices. The SATA laptop I have here is an Intel ICH part, but uses the ata_piix driver (ahci won't load) which isn't supposed to support hotswap. Unregistering devices in the IDE layer has been broken for ages. Is there any point in working on the first three of these points until point four is more reasonable? What actually needs to be done to improve this? -- Matthew Garrett | mjg59@srcf.ucam.org - 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/