public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] IDE_BUS unconditionally expects 2 devices per bus
Date: Sat, 14 Aug 2010 13:45:26 +0200	[thread overview]
Message-ID: <4C6681D6.6030604@free.fr> (raw)
In-Reply-To: <4C6673F1.2010501@dawes.za.net>

Le 14/08/2010 12:46, Rogan Dawes a ?crit :
> On 2010/08/14 12:41 PM, Rogan Dawes wrote:
>> -#define        IDE_BUS(dev)    (dev>>   1)
>> +#define        IDE_BUS(dev)    (dev>>   (CONFIG_SYS_IDE_MAXDEVICE /
>> CONFIG_SYS_IDE_MAXBUS - 1))
>>
>>     #define        ATA_CURR_BASE(dev)
>> (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
>
> Ok, I'm an idiot! The reason was staring me in the face!
> ATA_CURR_BASE(dev) relies on IDE_BUS, which is why the same disk was
> being enumerated twice.
>
> It seems that the above patch is indeed correct.

Good findings, Rogan. :)

However, you should submit patches using git format-patch and git 
send-email, both properly configured -- make sure format-patch has the 
-s option and send-email has the proper e-mail address settings for 
sender and recipient(s).

And before submitting, think of checking the patch with linux's 
script/checkpatch.pl. --no-tree. At least it'll let you know about the 
long line. Mind you, ide.h itself has several long lines, that 
checkpatch won't tell you about since this is outside your patch. :)

I applied the change manually, With 2 busse and 2 devices on the ED Mini 
(which has only one disk), I don't get the duplicate drive. With 1 bus 
and 2 devices, I do see the disk twice. :(

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-08-14 11:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-14 10:41 [U-Boot] IDE_BUS unconditionally expects 2 devices per bus Rogan Dawes
2010-08-14 10:46 ` Rogan Dawes
2010-08-14 11:45   ` Albert ARIBAUD [this message]
2010-08-15 20:35     ` [U-Boot] [PATCH] IDE: Don't assume there are always two " Rogan Dawes
2010-08-15 21:30       ` Wolfgang Denk
2010-08-16  5:47         ` [U-Boot] [PATCH v2] " Rogan Dawes
2010-08-16  5:47         ` [U-Boot] [PATCH] " Rogan Dawes
2010-08-26 13:16           ` Rogan Dawes
2010-09-04  8:22             ` Albert ARIBAUD
2010-09-04  9:07               ` Albert ARIBAUD
2010-09-05 21:23                 ` Rogan Dawes
2010-09-05 22:19               ` Wolfgang Denk
2010-09-06  5:54                 ` Albert ARIBAUD
2010-09-06  6:03                   ` Rogan Dawes
2010-09-06  6:05                   ` Wolfgang Denk
2010-09-06  6:45                     ` Albert ARIBAUD
2010-09-06  8:18                       ` Wolfgang Denk
2010-09-06 11:32                         ` Albert ARIBAUD
2010-09-06 12:50                           ` Wolfgang Denk
2010-09-06 17:15                             ` Albert ARIBAUD
2010-09-06 19:35                               ` Wolfgang Denk

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=4C6681D6.6030604@free.fr \
    --to=albert.aribaud@free.fr \
    --cc=u-boot@lists.denx.de \
    /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