Skip to contentSkip to conversation

IRDA: Do cleanup for dma

PATCH In review Wang Chen 4 participants 7 messages May 23, 2008 – May 30, 2008

Subsystems (2)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 2/2 IRDA: Do cleanup for dma

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.

---
 drivers/net/irda/via-ircc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/irda/via-ircc.c +3 -0
index 58e1287..04ad357 100644
@@ -1546,6 +1546,7 @@ static int via_ircc_net_open(struct net_device *dev)
 			IRDA_WARNING("%s, unable to allocate dma2=%d\n",
 				     driver_name, self->io.dma2);
 			free_irq(self->io.irq, self);
+			free_dma(self->io.dma);
 			return -EAGAIN;
 		}
 	}
@@ -1606,6 +1607,8 @@ static int via_ircc_net_close(struct net_device *dev)
 	EnAllInt(iobase, OFF);
 	free_irq(self->io.irq, dev);
 	free_dma(self->io.dma);
+	if (self->io.dma2 != self->io.dma)
+		free_dma(self->io.dma2);
 
 	return 0;
 }
Signature · 1 line
1.5.4.rc3
maintainer
#1 lore raw

From: Wang Chen <[email protected]>
Date: Fri, 23 May 2008 13:57:19 +0800

Quoted 4 lines

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.

Jeff, did you get this or would you like me to pick it up directly?

Thanks.

#2 lore raw
Quoted 10 lines · David Miller

From: Wang Chen <[email protected]>
Date: Fri, 23 May 2008 13:57:19 +0800

Quoted 4 lines

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.

Jeff, did you get this or would you like me to pick it up directly?

I never pick up IRDA stuff.

Jeff

#4 lore raw
In reply to David Miller

Hi Dave,

On Thu, 29 May 2008 03:34:42 -0700 (PDT), David Miller

Quoted 12 lines · <[email protected]> wrote:

From: Wang Chen <[email protected]>

Date: Fri, 23 May 2008 13:57:19 +0800

Quoted 5 lines

1. dma should be freed when dma2 request fail.

2. dma2 should be freed too when device close.

Quoted 7 lines
Quoted 1 line

Jeff, did you get this or would you like me to pick

it up directly?

I'll take it and send it along with my next IrDA patch set.

Cheers,

Samuel.

Quoted 9 lines

Thanks.

--

To unsubscribe from this list: send the line "unsubscribe netdev" in

the body of a message to [email protected]

More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#5 lore raw

[email protected] said the following on 2006-1-21 14:07:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.

Jeff, did you get this or would you like me to pick it up directly?

I'll take it and send it along with my next IrDA patch set.

oops, sorry.
Seems that not all of the drivers/net/* fixes should be sent to Jeff.
I will check MAINTAINERS more carefully next time.

--WCN

maintainer
#3 lore raw
In reply to Jeff Garzik

From: Jeff Garzik <[email protected]>
Date: Thu, 29 May 2008 09:27:21 -0400

Quoted 7 lines
Quoted 6 lines · David Miller

From: Wang Chen <[email protected]>
Date: Fri, 23 May 2008 13:57:19 +0800

Quoted 3 lines

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Jeff, did you get this or would you like me to pick it up directly?

I never pick up IRDA stuff.

Great I'll apply it then.

maintainer
#6 lore raw
In reply to [email protected]

From: <[email protected]>
Date: Sat, 21 Jan 2006 07:07:16 +0100

Quoted 8 lines

Hi Dave,

Quoted 3 lines · David Miller

From: Wang Chen <[email protected]>
Date: Fri, 23 May 2008 13:57:19 +0800

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.

Jeff, did you get this or would you like me to pick it up directly?

I'll take it and send it along with my next IrDA patch set.

Oh ok, you got it :-)