From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH] libata: don't whine if ->prereset() returns -ENOENT Date: Mon, 19 Mar 2007 12:03:54 -0400 Message-ID: <45FEB46A.7040602@garzik.org> References: <20070309163148.GA12848@havoc.gtf.org> <20070309234839.2070a265@lxorguk.ukuu.org.uk> <45F50E28.7010509@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from srv5.dvmed.net ([207.36.208.214]:53761 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030295AbXCSQEB (ORCPT ); Mon, 19 Mar 2007 12:04:01 -0400 In-Reply-To: <45F50E28.7010509@gmail.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Tejun Heo Cc: Alan Cox , Fabio Comolli , Andrew Morton , Linus Torvalds , linux-ide@vger.kernel.org, LKML , Greg KH Tejun Heo wrote: > ->prereset() returns -ENOENT to tell libata that the port is empty and > reset sequencing should be stopped. This is not an error condition. > Update ata_eh_reset() such that it sets device classes to ATA_DEV_NONE > and return success in on -ENOENT. This makes spurious error message > go away. > > Signed-off-by: Tejun Heo > --- > > This should do it and better fits the intention of the return value. > Two things to note. > > 1. I think these ports should be made dummy instead of returning > -ENOENT on prereset(). -ENOENT from prereset() was a hack to keep > ata_piix's behavior unchanged while converting it to new EH. If no > one objcts, I'll convert similar usages to use dummy ports after new > init model and drop -ENOENT hack in #upstream. > > 2. -ENODEV sounds more appropriate. Why have I used -ENOENT. :-) applied