public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <penguin@muskoka.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.6.9 ide-probe and indentical old disks.
Date: Thu, 16 Dec 2004 17:47:34 -0500	[thread overview]
Message-ID: <41C21086.7030703@muskoka.com> (raw)


It seems that some old disks don't have a serial number, but ide-probe
now compares serial numbers to determine if a slave disk is just a
ghost image of the primary.  This breaks old hardware that has two
identical model disks which don't report serial numbers.  The fix seems
as simple as checking for zero length serial numbers before comparing.

Signed-off-by: Paul Gortmaker <p_gortmaker@yahoo.com>



--- linux-386/drivers/ide/ide-probe.c~	Mon Oct 18 17:56:33 2004
+++ linux-386/drivers/ide/ide-probe.c	Thu Dec  9 14:15:56 2004
@@ -740,6 +740,8 @@ static void probe_hwif(ide_hwif_t *hwif)
 			if (strcmp(hwif->drives[0].id->model, drive->id->model) == 0 &&
 			    /* Don't do this for noprobe or non ATA */
 			    strcmp(drive->id->model, "UNKNOWN") &&
+			    /* Or for old drives without a serial # */
+			    strlen(drive->id->serial_no) &&
 			    /* And beware of confused Maxtor drives that go "M0000000000"
 			      "The SN# is garbage in the ID block..." [Eric] */
 			    strncmp(drive->id->serial_no, "M0000000000000000000", 20) &&




             reply	other threads:[~2004-12-16 23:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16 22:47 Paul Gortmaker [this message]
2004-12-16 23:31 ` [PATCH] 2.6.9 ide-probe and indentical old disks Alan Cox

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=41C21086.7030703@muskoka.com \
    --to=penguin@muskoka.com \
    --cc=akpm@osdl.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