From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH 5 of 8] sd: Detect non-rotational devices Date: Thu, 23 Apr 2009 09:33:47 -0400 Message-ID: <49F06E3B.104@garzik.org> References: <20090423105245.GX4593@kernel.dk> <49F04C71.6050304@garzik.org> <20090423113841.GK1926@parisc-linux.org> 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]:49499 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752538AbZDWN6E (ORCPT ); Thu, 23 Apr 2009 09:58:04 -0400 In-Reply-To: Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: "Martin K. Petersen" Cc: Matthew Wilcox , Jens Axboe , rwheeler@redhat.com, snitzer@redhat.com, neilb@suse.de, James.Bottomley@hansenpartnership.com, dgilbert@interlog.com, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org Martin K. Petersen wrote: >>>>>> "Matthew" == Matthew Wilcox writes: > > Matthew> I already did that. The only problem is that you made me > Matthew> include the stupid: > > Matthew> if (ata_id_major_version(args->id) > 7) { > > Matthew> so of course it doesn't work on any existing hardware. How > Matthew> about applying this patch: > > Maybe we could incubate your patch in the next tree for a bit and see > what breaks without the version check? > > We could even be somewhat conservative like we were with RC16 in SCSI. > The SATA devices I have here with valid rotational flags all report > version 7. I wonder if > 6 do the trick? linux/ata.h illustrates the standard ATA rules for validating bits of IDENTIFY DEVICE. Just checking the version was always just a simplistic hack... we are talking specifically about trusting values listed as undefined in the relevant specs. That requires more, not less, gymnastics :) Jeff