mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Kirill Smelkov <kirr@mns.spb.ru>
Cc: B.Zolnierkiewicz@elka.pw.edu.pl, linux-kernel@vger.kernel.org,
	linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] ide: fix revision comparison in ide_in_drive_list
Date: Tue, 20 Jun 2006 15:19:50 -0700	[thread overview]
Message-ID: <20060620151950.21ad94d6.akpm@osdl.org> (raw)
In-Reply-To: <200606201452.33925.kirr@mns.spb.ru>

Kirill Smelkov <kirr@mns.spb.ru> wrote:
>
> NB: bart/ide-2.6.git seems to be unmaintained,  so I'm sending this directly to -mm
> 
> Fix ide_in_drive_list:  drive_table->id_firmware should be searched *in* id->fw_rev,
> not vise versa.
> 
> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
> 
> Index: linux-2.6.17/drivers/ide/ide-dma.c
> ===================================================================
> --- linux-2.6.17.orig/drivers/ide/ide-dma.c	2006-06-20 13:51:49.000000000 +0400
> +++ linux-2.6.17/drivers/ide/ide-dma.c	2006-06-20 13:52:14.000000000 +0400
> @@ -147,7 +147,7 @@
>  {
>  	for ( ; drive_table->id_model ; drive_table++)
>  		if ((!strcmp(drive_table->id_model, id->model)) &&
> -		    ((strstr(drive_table->id_firmware, id->fw_rev)) ||
> +		    ((strstr(id->fw_rev, drive_table->id_firmware)) ||
>  		     (!strcmp(drive_table->id_firmware, "ALL"))))
>  			return 1;
>  	return 0;

hm.  This seems...  rather serious.  I assume that in most cases, the
firmware rev which we have in the table (eg "24.09P07") is a full-string
match for the string which the drive returned.

If not, you've just blacklisted a whole bunch of drives which always should
have been blacklisted, but weren't.

  reply	other threads:[~2006-06-20 22:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 10:52 Kirill Smelkov
2006-06-20 22:19 ` Andrew Morton [this message]
2006-06-20 23:12   ` Alan Cox
2006-06-21  6:17     ` Kirill Smelkov
2006-06-21 11:44       ` Alan Cox
2006-06-21 13:11         ` Kirill Smelkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060620151950.21ad94d6.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=kirr@mns.spb.ru \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®