avoid releasing twice the same region on ide_release_iomio_dma()
PATCH 1/1 avoid releasing twice the same region on ide_release_iomio_dma()
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.
drivers/ide/ide-dma.c +1 -1
@@ -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 ; }
Hello.
Quoted 22 lines · Aristeu Sergio Rozanski Filho
In
ide_release_iomio_dma()it's possible to release twicehwif->dma_baseifhwif->dma_base2is not null and never releasinghwif->dma_base2:
intide_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. <[email protected]>Index:
ppc-2.6/drivers/ide/ide-dma.c
===================================================================
drivers/ide/ide-dma.c line 807
Quoted 7 lines
drivers/ide/ide-dma.c +1
-1@@ -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
Hi Sergei,
Quoted 11 lines
dma_base2should 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.
Signature · 1 line
Aristeu
Quoted 40 lines · Sergei Shtylyov
Hello.
Quoted 22 lines · Aristeu Sergio Rozanski Filho
In
ide_release_iomio_dma()it's possible to release twicehwif->dma_baseifhwif->dma_base2is not null and never releasinghwif->dma_base2:
intide_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. <[email protected]>Index:
ppc-2.6/drivers/ide/ide-dma.c
===================================================================drivers/ide/ide-dma.c 2006-07-24 12:26:26.000000000 -0300 line 807
Quoted 7 lines
drivers/ide/ide-dma.c 2006-07-24 12:26:26.000000000 -0300 renamed from drivers/ide/ide-dma.c 2006-07-24 12:25:20.000000000 -0300 +1
-1@@ -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_base2should 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:
Quoted 7 lines
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
Signature · 3 lines
Greg Freemyer The Norcross Group Forensics for the 21st Century
Hello.
Quoted 9 lines · Greg Freemyer
Quoted 8 lines
dma_base2should 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
Quoted 8 lines
Quoted 1 line
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.
Quoted 3 lines
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. :-)
Quoted 1 line
Greg
WBR, Sergei