From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: libata: set queue SSD flag for SSD devices Date: Fri, 10 Oct 2008 22:05:28 +0200 Message-ID: <20081010200528.GJ19428@kernel.dk> References: <200810101904.m9AJ42Gq018897@hera.kernel.org> <20081010202515.446857cc@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from pasmtpb.tele.dk ([80.160.77.98]:41662 "EHLO pasmtpB.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760421AbYJJUGV (ORCPT ); Fri, 10 Oct 2008 16:06:21 -0400 Content-Disposition: inline In-Reply-To: <20081010202515.446857cc@lxorguk.ukuu.org.uk> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Alan Cox Cc: Linux Kernel Mailing List , linux-ide@vger.kernel.org, torvalds@osdl.org On Fri, Oct 10 2008, Alan Cox wrote: > > + ATA_ID_ROT_SPEED = 217, > > ATA_ID_PIO4 = (1 << 1), > > > > ATA_ID_SERNO_LEN = 20, > > @@ -691,6 +692,11 @@ static inline int ata_id_is_cfa(const u16 *id) > > return 0; > > } > > > > +static inline int ata_id_is_ssd(const u16 *id) > > +{ > > + return id[ATA_ID_ROT_SPEED] == 0x01; > > +} > > This patch is buggy. > > Word 217 only has a defined meaning in late revision ATA standards so a > version check is needed. Please copy ATA patch copies to linux-ide. Good point, I'll be sure to submit an updated patch. I did mean to copy linux-ide, the intention was actually to pass this libata enable patch through Jeff after testing, but it slipped through. In this specific patch, it'll do no harm at least since I very much doubt we'll see a false positive. And even if, the consequences wont be dire. But it does want the version check, of course. -- Jens Axboe