linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Linux IDE <linux-ide@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 0/3] ide: Fix use of paired device
Date: Thu, 18 Oct 2007 15:58:24 +0400	[thread overview]
Message-ID: <47174A60.7030407@ru.mvista.com> (raw)
In-Reply-To: <47174993.4010108@ru.mvista.com>

Hello, I wrote:

>> At least 2 drivers (siimage and cs5535) have a bug where they use
>> the construct:

>>     ide_drive_t *pair    = &hwif->drives[drive->dn ^ 1];

>> To access the other drive in a master/slave pair. This is bogus
>> because drive->dn is not the unit number, but the global drive
>> number, thus can be 2 & 3 for ide1, 4 & 5 for ide2 etc...

>    Huh? With drive->dn calculated as:

>         for (unit = 0; unit < MAX_DRIVES; ++unit) {
>                 ide_drive_t *drive = &hwif->drives[unit];
>                 drive->dn = (hwif->channel ? 2 : 0) + unit;

> (with MAX_DRIVES always being 2) how comes it may be 4 or 5?!

>> Please apply to 2.6.24 if no objection.

>    I object. :-)

    Well, actually no objections about the patch itself since it deals with 
the cases of drive->dn being 2 and 3. But this probably be better to be done 
all in one patch, or at least in 2 patches (please also update driver version 
in the heading comment).

MBR, Sergei

  reply	other threads:[~2007-10-18 11:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18  0:56 [PATCH 0/3] ide: Fix use of paired device Benjamin Herrenschmidt
2007-10-18  0:56 ` [PATCH 1/3] ide: Add ide_get_paired_drive() helper Benjamin Herrenschmidt
2007-10-18 12:00   ` Sergei Shtylyov
2007-10-18 21:10   ` Bartlomiej Zolnierkiewicz
2007-10-18  0:56 ` [PATCH 2/3] ide: Fix siimage driver accessing beyond array boundary Benjamin Herrenschmidt
2007-10-18 12:02   ` Sergei Shtylyov
2007-10-18 12:16     ` Benjamin Herrenschmidt
2007-10-18 21:30       ` Bartlomiej Zolnierkiewicz
2007-10-18 21:10   ` Bartlomiej Zolnierkiewicz
2007-10-18  0:56 ` [PATCH 3/3] ide: Fix cs5535 " Benjamin Herrenschmidt
2007-10-18 12:03   ` Sergei Shtylyov
2007-10-18 21:10   ` Bartlomiej Zolnierkiewicz
2007-10-18 11:54 ` [PATCH 0/3] ide: Fix use of paired device Sergei Shtylyov
2007-10-18 11:58   ` Sergei Shtylyov [this message]
2007-10-18 12:14   ` Benjamin Herrenschmidt
2007-10-18 20:29 ` Bartlomiej Zolnierkiewicz

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=47174A60.7030407@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=bzolnier@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).