LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonas Stare <jonas.stare@purplescout.se>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH][RESUBMIT] drivers/ide/ide-probe.c, kernel 2.6.23.1
Date: Fri, 16 Nov 2007 18:46:32 +0100	[thread overview]
Message-ID: <473DD778.30607@purplescout.se> (raw)
In-Reply-To: <473D9261.6080209@ru.mvista.com>

Sergei Shtylyov wrote:
> Jonas Stare wrote:
> 
>> diff -u linux-2.6.23.1-orig/drivers/ide/ide-probe.c
>> linux-2.6.23.1/drivers/ide/ide-probe.c ---
>> linux-2.6.23.1-orig/drivers/ide/ide-probe.c 2007-10-12
>> 18:43:44.000000000 +0200
>> +++ linux-2.6.23.1/drivers/ide/ide-probe.c      2007-11-16
>> 10:26:23.000000000 +0100
>> @@ -643,6 +643,7 @@
>>  static int wait_hwif_ready(ide_hwif_t *hwif)
>>  {
>>         int rc;
>> +       int unit;
>>  
>>         printk(KERN_DEBUG "Probing IDE interface %s...\n", hwif->name);
>>  
>> @@ -659,16 +660,25 @@
>>                 return rc;
>>  
>>         /* Now make sure both master & slave are ready */
>> -       SELECT_DRIVE(&hwif->drives[0]);
>> -       hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
>> -       mdelay(2);
>> -       rc = ide_wait_not_busy(hwif, 35000);
>> -       if (rc)
>> -               return rc;
>> -       SELECT_DRIVE(&hwif->drives[1]);
>> -       hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
>> -       mdelay(2);
>> -       rc = ide_wait_not_busy(hwif, 35000);
>> +       for (unit = 0; unit < MAX_DRIVES; ++unit) {
>> +               /* Ignore disks that we will not probe for later. */
>> +               if (!hwif->drives[unit].noprobe ||
>> +                   hwif->drives[unit].present) {
> 
>    Why not:
> 
>         if (hwif->drives[unit].noprobe || !hwif->drives[unit].present) {
>                     printk(KERN_DEBUG "Skip ide_wait_not_busy for %s:%d\n",
>                                hwif->name, unit);
>             continue;
>         }
>                 SELECT_DRIVE(&hwif->drives[unit]);
>                 hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
>                 mdelay(2);
>                 rc = ide_wait_not_busy(hwif, 35000);
>                 if (rc) {
>             /* Exit function with master reselected */
>                         if (unit != 0)
>                             SELECT_DRIVE(&hwif->drives[0]);
>                         return rc;
>             }
>     }

Hmmm, I was rather fond of my "wait for the disk unless we are specifically told not to"
rather than "don't check unless there might be a disk there". ...on the other hand
thats not what my comment said. :)

>>  
>>         /* Exit function with master reselected (let's be sane) */
>>         SELECT_DRIVE(&hwif->drives[0]);
> 
> MBR, Sergei

  reply	other threads:[~2007-11-16 17:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 10:22 [PATCH] " Jonas Stare
2007-11-12 21:24 ` Andrew Morton
2007-11-13  2:29   ` Alan Cox
2007-11-13 22:03   ` Bartlomiej Zolnierkiewicz
2007-11-15  8:52     ` Jonas Stare
2007-11-15 20:59       ` Bartlomiej Zolnierkiewicz
2007-11-16 12:10         ` [PATCH][RESUBMIT] " Jonas Stare
2007-11-16 12:51           ` Sergei Shtylyov
2007-11-16 17:46             ` Jonas Stare [this message]
2007-11-16 21:22           ` Bartlomiej Zolnierkiewicz
2007-11-16 22:57             ` [PATCH] drivers/ide/ide-probe.c Skip ide_wait_not_busy on noprobe-disks. was: " Jonas Stare
2007-11-18 21:39               ` 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=473DD778.30607@purplescout.se \
    --to=jonas.stare@purplescout.se \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH][RESUBMIT] drivers/ide/ide-probe.c, kernel 2.6.23.1' \
    /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

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).