From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Date: Tue, 18 May 2010 18:14:00 +0000 Subject: Re: udev cdrom_id rules prevent unmounted CD from spinning down Message-Id: <4BF2D8E8.1040602@kernel.org> List-Id: References: <20100513153043.GA3966@elliptictech.com> In-Reply-To: <20100513153043.GA3966@elliptictech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hello, On 05/18/2010 07:53 PM, Kay Sievers wrote: > Tejun, > an AN capable SATA optical drive seems to send AN events with every > open(). For userspace these look the same as the media changed events, > and cause a loop when udev checks if there is a new media. Any ideas > if these AN events are expected, or useful for anything? The open() path issues several commands and it could be that the drive is raising AN when certain conditions are met just in case. After all windows only uses single command for media presence polling, so there's nothing stopping vendors from using TUR, for example, as the level triggered check point to see whether media is available and raise AN if so. After all, that wouldn't lose any event and in case the internal state went out of sync, it would work as an easy resync point. Long term, I think the only solution is to do what windows does for media presence polling; otherwise, we'll keep running into various obscure issues. For short term, I dunno. Don't use AN for the time being? :-) Thanks. -- tejun