lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Nov 2007 15:51:45 +0300
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Jonas Stare <jonas.stare@...plescout.se>
Cc:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	linux-ide@...r.kernel.org
Subject: Re: [PATCH][RESUBMIT] drivers/ide/ide-probe.c, kernel 2.6.23.1

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;
         	}
	}
>  
>         /* Exit function with master reselected (let's be sane) */
>         SELECT_DRIVE(&hwif->drives[0]);

MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ