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:	Mon, 28 May 2007 21:31:35 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Tejun Heo <htejun@...il.com>
CC:	Paul Mundt <lethal@...ux-sh.org>, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org, garyhade@...ibm.com
Subject: Re: [PATCH] libata: implement ata_wait_after_reset()

Tejun Heo wrote:
> -	msleep(150);
> +	/* wait a while before checking status */
> +	ata_wait_after_reset(ap, deadline);
[...]
> -	msleep(150);
> +	/* wait a while before checking status */
> +	ata_wait_after_reset(ap, deadline);
>  
>  	/* Before we perform post reset processing we want to see if
>  	 * the bus shows 0xFF because the odd clown forgets the D7
> @@ -3543,8 +3583,8 @@ int sata_std_hardreset(struct ata_port *
>  		return 0;
>  	}
>  
> -	/* wait a while before checking status, see SRST for more info */
> -	msleep(150);
> +	/* wait a while before checking status */
> +	ata_wait_after_reset(ap, deadline);
>  
>  	rc = ata_wait_ready(ap, deadline);
[...]
> -	msleep(150);
> +	/* wait a while before checking status */
> +	ata_wait_after_reset(ap, deadline);
>  
>  	/* Before we perform post reset processing we want to see if
>  	 * the bus shows 0xFF because the odd clown forgets the D7
> Index: work/drivers/ata/sata_inic162x.c
> ===================================================================
> --- work.orig/drivers/ata/sata_inic162x.c
> +++ work/drivers/ata/sata_inic162x.c
> @@ -446,7 +446,7 @@ static int inic_hardreset(struct ata_por
>  		struct ata_taskfile tf;
>  
>  		/* wait a while before checking status */
> -		msleep(150);
> +		ata_wait_after_reset(ap, deadline);
>  
>  		rc = ata_wait_ready(ap, deadline);
[...]

The main thing that bothers me is not the increase in delay, but the 
fact that this create converts a delay/Status-poll sequence into a 
delay/Status-poll/Status-poll sequence.

ata_wait_after_reset() immediately before ata_wait_ready() seems highly 
redundant.  Why not just poll Status once?

	Jeff



-
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