linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] avoid releasing twice the same region on ide_release_iomio_dma()
@ 2006-07-24 19:30 Aristeu Sergio Rozanski Filho
  2006-07-24 19:58 ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2006-07-24 19:30 UTC (permalink / raw)
  To: linux-ide

In ide_release_iomio_dma() it's possible to release twice
hwif->dma_base if hwif->dma_base2 is not null and never releasing
hwif->dma_base2:
int ide_release_iomio_dma (ide_hwif_t *hwif)
{
        if ((hwif->dma_extra) && (hwif->channel == 0))
                release_region((hwif->dma_base + 16), hwif->dma_extra);
        release_region(hwif->dma_base, 8);
        if (hwif->dma_base2)
                release_region(hwif->dma_base, 8);
                                     ^^^^^^^^^
        return 1;
}
This patch fixes this typo.

Signed-off-by: Aristeu S. Rozanski F. <aris@cathedrallabs.org>

Index: ppc-2.6/drivers/ide/ide-dma.c
===================================================================
--- ppc-2.6.orig/drivers/ide/ide-dma.c	2006-07-24 12:25:20.000000000 -0300
+++ ppc-2.6/drivers/ide/ide-dma.c	2006-07-24 12:26:26.000000000 -0300
@@ -802,7 +802,7 @@
 		release_region((hwif->dma_base + 16), hwif->dma_extra);
 	release_region(hwif->dma_base, 8);
 	if (hwif->dma_base2)
-		release_region(hwif->dma_base, 8);
+		release_region(hwif->dma_base2, 8);
 	return 1;
 }
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] avoid releasing twice the same region on ide_release_iomio_dma()
  2006-07-24 19:30 [PATCH] avoid releasing twice the same region on ide_release_iomio_dma() Aristeu Sergio Rozanski Filho
@ 2006-07-24 19:58 ` Sergei Shtylyov
  2006-07-24 20:14   ` Aristeu Sergio Rozanski Filho
  2006-07-24 21:23   ` Greg Freemyer
  0 siblings, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2006-07-24 19:58 UTC (permalink / raw)
  To: Aristeu Sergio Rozanski Filho; +Cc: linux-ide

Hello.

Aristeu Sergio Rozanski Filho wrote:

> In ide_release_iomio_dma() it's possible to release twice
> hwif->dma_base if hwif->dma_base2 is not null and never releasing
> hwif->dma_base2:
> int ide_release_iomio_dma (ide_hwif_t *hwif)
> {
>         if ((hwif->dma_extra) && (hwif->channel == 0))
>                 release_region((hwif->dma_base + 16), hwif->dma_extra);
>         release_region(hwif->dma_base, 8);
>         if (hwif->dma_base2)
>                 release_region(hwif->dma_base, 8);
>                                      ^^^^^^^^^
>         return 1;
> }
> This patch fixes this typo.

> Signed-off-by: Aristeu S. Rozanski F. <aris@cathedrallabs.org>
> 
> Index: ppc-2.6/drivers/ide/ide-dma.c
> ===================================================================
> --- ppc-2.6.orig/drivers/ide/ide-dma.c	2006-07-24 12:25:20.000000000 -0300
> +++ ppc-2.6/drivers/ide/ide-dma.c	2006-07-24 12:26:26.000000000 -0300
> @@ -802,7 +802,7 @@
>  		release_region((hwif->dma_base + 16), hwif->dma_extra);
>  	release_region(hwif->dma_base, 8);
>  	if (hwif->dma_base2)
> -		release_region(hwif->dma_base, 8);
> +		release_region(hwif->dma_base2, 8);
>  	return 1;
>  }

    dma_base2 should go away altogether -- this is the IDE maintainer's opinion:

http://marc.theaimsgroup.com/?l=linux-ide&m=114345699807546&w=2

    I have posted this patch doing this back in March:

http://marc.theaimsgroup.com/?l=linux-ide&m=114357441529834&w=2

and it was in the -mm tree for some months but has been removed recently -- I 
still need to coordinate it with SGI.

WBR, Sergei

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] avoid releasing twice the same region on ide_release_iomio_dma()
  2006-07-24 19:58 ` Sergei Shtylyov
@ 2006-07-24 20:14   ` Aristeu Sergio Rozanski Filho
  2006-07-24 21:23   ` Greg Freemyer
  1 sibling, 0 replies; 5+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2006-07-24 20:14 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide

Hi Sergei,
>    dma_base2 should go away altogether -- this is the IDE maintainer's 
>    opinion:
> 
> http://marc.theaimsgroup.com/?l=linux-ide&m=114345699807546&w=2
> 
>    I have posted this patch doing this back in March:
> 
> http://marc.theaimsgroup.com/?l=linux-ide&m=114357441529834&w=2
> 
> and it was in the -mm tree for some months but has been removed recently -- 
> I still need to coordinate it with SGI.
no problem, thanks for pointing this out.

-- 
Aristeu


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] avoid releasing twice the same region on ide_release_iomio_dma()
  2006-07-24 19:58 ` Sergei Shtylyov
  2006-07-24 20:14   ` Aristeu Sergio Rozanski Filho
@ 2006-07-24 21:23   ` Greg Freemyer
  2006-07-25 12:22     ` Sergei Shtylyov
  1 sibling, 1 reply; 5+ messages in thread
From: Greg Freemyer @ 2006-07-24 21:23 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Aristeu Sergio Rozanski Filho, linux-ide

On 7/24/06, Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> Hello.
>
> Aristeu Sergio Rozanski Filho wrote:
>
> > In ide_release_iomio_dma() it's possible to release twice
> > hwif->dma_base if hwif->dma_base2 is not null and never releasing
> > hwif->dma_base2:
> > int ide_release_iomio_dma (ide_hwif_t *hwif)
> > {
> >         if ((hwif->dma_extra) && (hwif->channel == 0))
> >                 release_region((hwif->dma_base + 16), hwif->dma_extra);
> >         release_region(hwif->dma_base, 8);
> >         if (hwif->dma_base2)
> >                 release_region(hwif->dma_base, 8);
> >                                      ^^^^^^^^^
> >         return 1;
> > }
> > This patch fixes this typo.
>
> > Signed-off-by: Aristeu S. Rozanski F. <aris@cathedrallabs.org>
> >
> > Index: ppc-2.6/drivers/ide/ide-dma.c
> > ===================================================================
> > --- ppc-2.6.orig/drivers/ide/ide-dma.c        2006-07-24 12:25:20.000000000 -0300
> > +++ ppc-2.6/drivers/ide/ide-dma.c     2006-07-24 12:26:26.000000000 -0300
> > @@ -802,7 +802,7 @@
> >               release_region((hwif->dma_base + 16), hwif->dma_extra);
> >       release_region(hwif->dma_base, 8);
> >       if (hwif->dma_base2)
> > -             release_region(hwif->dma_base, 8);
> > +             release_region(hwif->dma_base2, 8);
> >       return 1;
> >  }
>
>     dma_base2 should go away altogether -- this is the IDE maintainer's opinion:
>
> http://marc.theaimsgroup.com/?l=linux-ide&m=114345699807546&w=2
>
>     I have posted this patch doing this back in March:
>
> http://marc.theaimsgroup.com/?l=linux-ide&m=114357441529834&w=2
>
> and it was in the -mm tree for some months but has been removed recently -- I
> still need to coordinate it with SGI.
>
> WBR, Sergei
> -

IDE is officially un-maintained as of a couple weeks ago.  (And since
April in reality).

http://marc.theaimsgroup.com/?l=linux-ide&m=115201353310421&w=2

That is likely why your patch disappeared.  Further Alan Cox and Jeff
Garzik are trying to replace the whole IDE subsystem with a libata-ide
subsystem, so IIRC major patches to IDE are being bit-bucketed.

Greg
-- 
Greg Freemyer
The Norcross Group
Forensics for the 21st Century

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] avoid releasing twice the same region on ide_release_iomio_dma()
  2006-07-24 21:23   ` Greg Freemyer
@ 2006-07-25 12:22     ` Sergei Shtylyov
  0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2006-07-25 12:22 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: Aristeu Sergio Rozanski Filho, linux-ide

Hello.

Greg Freemyer wrote:

>>     dma_base2 should go away altogether -- this is the IDE 
>> maintainer's opinion:

>> http://marc.theaimsgroup.com/?l=linux-ide&m=114345699807546&w=2

>>     I have posted this patch doing this back in March:

>> http://marc.theaimsgroup.com/?l=linux-ide&m=114357441529834&w=2

>> and it was in the -mm tree for some months but has been removed 
>> recently -- I still need to coordinate it with SGI.

> IDE is officially un-maintained as of a couple weeks ago.  (And since
> April in reality).

> http://marc.theaimsgroup.com/?l=linux-ide&m=115201353310421&w=2

> That is likely why your patch disappeared.

    It didn't disappear. It was conflicting with one of Alan's patches and 
needed consent from SGI folks.

> Further Alan Cox and Jeff
> Garzik are trying to replace the whole IDE subsystem with a libata-ide
> subsystem, so IIRC major patches to IDE are being bit-bucketed.

    Not if you send them to Andrew Morton. :-)

> Greg

WBR, Sergei


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-25 12:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-24 19:30 [PATCH] avoid releasing twice the same region on ide_release_iomio_dma() Aristeu Sergio Rozanski Filho
2006-07-24 19:58 ` Sergei Shtylyov
2006-07-24 20:14   ` Aristeu Sergio Rozanski Filho
2006-07-24 21:23   ` Greg Freemyer
2006-07-25 12:22     ` Sergei Shtylyov

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