Patchwork [25/64] ide: use standard timing for XFER_PIO_SLOW mode in ide_timing_compute()

login
register
mail settings
Submitter Bartlomiej Zolnierkiewicz
Date Jan. 19, 2010, 3:09 p.m.
Message ID <201001191609.42582.bzolnier@gmail.com>
Download mbox | patch
Permalink /patch/43191/
State Accepted
Headers show

Comments

Bartlomiej Zolnierkiewicz - Jan. 19, 2010, 3:09 p.m.
On Tuesday 19 January 2010 10:25:26 am David Miller wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Date: Mon, 18 Jan 2010 18:17:29 +0100
> 
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] ide: use standard timing for XFER_PIO_SLOW mode in ide_timing_compute()
> > 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> Applied.

Thanks.

Here is a bonus fixup for a small issue noticed by Sergei yesterday.

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: ide_timing_compute() fixup

XFER_SW_DMA_0 mode should be excluded from the extended cycle
timing computations.

[ This is just a documentation fix -- code inside the affected
  'if' block already makes sure to accept only PIO modes. ]

Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-timings.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Jan. 19, 2010, 7:30 p.m.
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Tue, 19 Jan 2010 16:09:42 +0100

> Here is a bonus fixup for a small issue noticed by Sergei yesterday.
> 
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: ide_timing_compute() fixup
> 
> XFER_SW_DMA_0 mode should be excluded from the extended cycle
> timing computations.
> 
> [ This is just a documentation fix -- code inside the affected
>   'if' block already makes sure to accept only PIO modes. ]
> 
> Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Applied, thanks Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov - Jan. 19, 2010, 7:42 p.m.
Hello.

Bartlomiej Zolnierkiewicz wrote:

>>> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>>> Subject: [PATCH] ide: use standard timing for XFER_PIO_SLOW mode in ide_timing_compute()
>>>
>>> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>>>       
>> Applied.
>>     
>
> Thanks.
>
> Here is a bonus fixup for a small issue noticed by Sergei yesterday.
>
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: ide_timing_compute() fixup
>
> XFER_SW_DMA_0 mode should be excluded from the extended cycle
> timing computations.
>
> [ This is just a documentation fix -- code inside the affected
>   'if' block already makes sure to accept only PIO modes. ]
>
> Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/ide-timings.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/drivers/ide/ide-timings.c
> ===================================================================
> --- a/drivers/ide/ide-timings.c
> +++ b/drivers/ide/ide-timings.c
> @@ -166,7 +166,7 @@ int ide_timing_compute(ide_drive_t *driv
>  	if (id[ATA_ID_FIELD_VALID] & 2) {	/* EIDE drive */
>  		memset(&p, 0, sizeof(p));
>  
> -		if (speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) {
> +		if (speed >= XFER_PIO_0 && speed < XFER_SW_DMA_0) {
>  			if (speed <= XFER_PIO_2)
>  				p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
>  			else if ((speed <= XFER_PIO_4) ||
>   

   But shouldn't this just be merged to "ide: use standard timing for 
XFER_PIO_SLOW mode in ide_timing_compute()" since it's the patch that 
introduced that check?

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Jan. 19, 2010, 7:48 p.m.
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Tue, 19 Jan 2010 22:42:57 +0300

>   But shouldn't this just be merged to "ide: use standard timing for
>   XFER_PIO_SLOW mode in ide_timing_compute()" since it's the patch that
>   introduced that check?

It's fine either way.

I can break the ide-next-2.6 tree for everyone by rebasing it to
unwind the 50 or so patches I applied from Bart yesterday to do this,
but really is that pain worth it since right thing is there in the
end?
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bartlomiej Zolnierkiewicz - Jan. 19, 2010, 8:25 p.m.
On Tuesday 19 January 2010 08:48:16 pm David Miller wrote:
> From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Date: Tue, 19 Jan 2010 22:42:57 +0300
> 
> >   But shouldn't this just be merged to "ide: use standard timing for
> >   XFER_PIO_SLOW mode in ide_timing_compute()" since it's the patch that
> >   introduced that check?
> 
> It's fine either way.
> 
> I can break the ide-next-2.6 tree for everyone by rebasing it to
> unwind the 50 or so patches I applied from Bart yesterday to do this,
> but really is that pain worth it since right thing is there in the
> end?

Especially since the new patch is a pure documentation fix
in the practice (the old code happens to work fine anyway)..

--
Bartlomiej Zolnierkiewicz
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: b/drivers/ide/ide-timings.c
===================================================================
--- a/drivers/ide/ide-timings.c
+++ b/drivers/ide/ide-timings.c
@@ -166,7 +166,7 @@  int ide_timing_compute(ide_drive_t *driv
 	if (id[ATA_ID_FIELD_VALID] & 2) {	/* EIDE drive */
 		memset(&p, 0, sizeof(p));
 
-		if (speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) {
+		if (speed >= XFER_PIO_0 && speed < XFER_SW_DMA_0) {
 			if (speed <= XFER_PIO_2)
 				p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
 			else if ((speed <= XFER_PIO_4) ||