* Re: [PATCH 0/5] [IrDA] IrDA updates for net-2.6
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
@ 2007-12-03 6:57 ` Herbert Xu
2007-12-03 9:28 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Herbert Xu @ 2007-12-03 6:57 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: netdev, irda-users, David S. Miller
On Mon, Dec 03, 2007 at 10:28:31AM +0100, Samuel Ortiz wrote:
> Hi Herbert,
>
> Here goes a series of 5 IrDA patches against your latest net-2.6 tree.
I seem to be missing 3/5. Could you please resend?
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 0/5] [IrDA] IrDA updates for net-2.6
@ 2007-12-03 9:28 Samuel Ortiz
2007-12-03 6:57 ` Herbert Xu
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Samuel Ortiz @ 2007-12-03 9:28 UTC (permalink / raw)
To: Herbert Xu, netdev-u79uwXL29TY76Z2rM5mHXA,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: David S. Miller
Hi Herbert,
Here goes a series of 5 IrDA patches against your latest net-2.6 tree.
Cheers,
Samuel.
--
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
2007-12-03 6:57 ` Herbert Xu
@ 2007-12-03 9:28 ` Samuel Ortiz
2007-12-03 9:28 ` [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Samuel Ortiz
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2007-12-03 9:28 UTC (permalink / raw)
To: Herbert Xu, netdev-u79uwXL29TY76Z2rM5mHXA,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: Oliver Neukum, David S. Miller
[-- Attachment #1: irda-usb.patch --]
[-- Type: text/plain, Size: 1886 bytes --]
It seems to me that irda_usb_net_open() must set self->netopen
under spinlock or disconnect() may fail to kill all URBs, if it is called
while an interface is opened.
Signed-off-by: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
---
drivers/net/irda/irda-usb.c | 5 +++++
1 file changed, 5 insertions(+)
Index: net-2.6/drivers/net/irda/irda-usb.c
===================================================================
--- net-2.6.orig/drivers/net/irda/irda-usb.c 2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/irda-usb.c 2007-11-25 07:12:09.000000000 +0100
@@ -1168,6 +1168,7 @@
static int irda_usb_net_open(struct net_device *netdev)
{
struct irda_usb_cb *self;
+ unsigned long flags;
char hwname[16];
int i;
@@ -1177,13 +1178,16 @@
self = (struct irda_usb_cb *) netdev->priv;
IRDA_ASSERT(self != NULL, return -1;);
+ spin_lock_irqsave(&self->lock, flags);
/* Can only open the device if it's there */
if(!self->present) {
+ spin_unlock_irqrestore(&self->lock, flags);
IRDA_WARNING("%s(), device not present!\n", __FUNCTION__);
return -1;
}
if(self->needspatch) {
+ spin_unlock_irqrestore(&self->lock, flags);
IRDA_WARNING("%s(), device needs patch\n", __FUNCTION__) ;
return -EIO ;
}
@@ -1198,6 +1202,7 @@
/* To do *before* submitting Rx urbs and starting net Tx queue
* Jean II */
self->netopen = 1;
+ spin_unlock_irqrestore(&self->lock, flags);
/*
* Now that everything should be initialized properly,
--
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
2007-12-03 6:57 ` Herbert Xu
2007-12-03 9:28 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
@ 2007-12-03 9:28 ` Samuel Ortiz
2007-12-03 9:28 ` [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps Samuel Ortiz
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2007-12-03 9:28 UTC (permalink / raw)
To: Herbert Xu, netdev, irda-users; +Cc: David S. Miller, Hinko Kocevar
[-- Attachment #1: mcs7780-free-rx_buff.diff --]
[-- Type: text/plain, Size: 802 bytes --]
While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in mcs_net_close(). Patch below fixes it.
Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
---
drivers/net/irda/mcs7780.c | 2 ++
1 file changed, 2 insertions(+)
Index: net-2.6/drivers/net/irda/mcs7780.c
===================================================================
--- net-2.6.orig/drivers/net/irda/mcs7780.c 2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/mcs7780.c 2007-11-25 07:12:11.000000000 +0100
@@ -677,6 +677,8 @@
/* Stop transmit processing */
netif_stop_queue(netdev);
+ kfree_skb(mcs->rx_buff.skb);
+
/* kill and free the receive and transmit URBs */
usb_kill_urb(mcs->rx_urb);
usb_free_urb(mcs->rx_urb);
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
` (2 preceding siblings ...)
2007-12-03 9:28 ` [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Samuel Ortiz
@ 2007-12-03 9:28 ` Samuel Ortiz
2007-12-03 9:28 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz
2007-12-03 9:28 ` [PATCH 5/5] [IrDA] irda parameters warning fixes Samuel Ortiz
5 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2007-12-03 9:28 UTC (permalink / raw)
To: Herbert Xu, netdev-u79uwXL29TY76Z2rM5mHXA,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: David S. Miller
[-- Attachment #1: irlmp-delete-lsaps-hashbin.diff --]
[-- Type: text/plain, Size: 1179 bytes --]
While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in irlmp_unregister_link(). Hashbin for lsaps is created in
irlmp_register_link and should probably be freed in irlmp_unregister_link().
Signed-off-by: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
---
net/irda/irlmp.c | 1 +
1 file changed, 1 insertion(+)
Index: net-2.6/net/irda/irlmp.c
===================================================================
--- net-2.6.orig/net/irda/irlmp.c 2007-11-25 05:54:02.000000000 +0100
+++ net-2.6/net/irda/irlmp.c 2007-11-25 07:12:13.000000000 +0100
@@ -353,6 +353,7 @@
/* Final cleanup */
del_timer(&link->idle_timer);
link->magic = 0;
+ hashbin_delete(link->lsaps, (FREE_FUNC) __irlmp_close_lsap);
kfree(link);
}
}
--
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/5] [IrDA] stir4200 fixes
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
` (3 preceding siblings ...)
2007-12-03 9:28 ` [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps Samuel Ortiz
@ 2007-12-03 9:28 ` Samuel Ortiz
2007-12-03 9:28 ` [PATCH 5/5] [IrDA] irda parameters warning fixes Samuel Ortiz
5 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2007-12-03 9:28 UTC (permalink / raw)
To: Herbert Xu, netdev-u79uwXL29TY76Z2rM5mHXA,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: David S. Miller
[-- Attachment #1: stir4200.patch --]
[-- Type: text/plain, Size: 1742 bytes --]
The attached patch observes the stir4200 fifo size and will clear the fifo, if
the size is increasing, while it should be transmitting bytes
From: Olaf Hartmann <olaf.hartmann-kAcfE3m5wwkaBlGTGt4zH4SGEyLTKazZ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
---
drivers/net/irda/stir4200.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: net-2.6/drivers/net/irda/stir4200.c
===================================================================
--- net-2.6.orig/drivers/net/irda/stir4200.c 2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/stir4200.c 2007-11-26 02:16:12.000000000 +0100
@@ -142,9 +142,6 @@
};
enum StirFifoCtlMask {
- FIFOCTL_EOF = 0x80,
- FIFOCTL_UNDER = 0x40,
- FIFOCTL_OVER = 0x20,
FIFOCTL_DIR = 0x10,
FIFOCTL_CLR = 0x08,
FIFOCTL_EMPTY = 0x04,
@@ -594,9 +591,10 @@
{
int err;
unsigned long count, status;
+ unsigned long prev_count = 0x1fff;
/* Read FIFO status and count */
- for(;;) {
+ for (;; prev_count = count) {
err = read_reg(stir, REG_FIFOCTL, stir->fifo_status,
FIFO_REGS_SIZE);
if (unlikely(err != FIFO_REGS_SIZE)) {
@@ -629,6 +627,10 @@
if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count)
return 0;
+ /* queue confused */
+ if (prev_count < count)
+ break;
+
/* estimate transfer time for remaining chars */
msleep((count * 8000) / stir->speed);
}
--
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/5] [IrDA] irda parameters warning fixes.
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
` (4 preceding siblings ...)
2007-12-03 9:28 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz
@ 2007-12-03 9:28 ` Samuel Ortiz
5 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2007-12-03 9:28 UTC (permalink / raw)
To: Herbert Xu, netdev, irda-users
Cc: David S. Miller, Richard Knutsson, Andrew Morton
[-- Attachment #1: irda_parameters.patch --]
[-- Type: text/plain, Size: 1549 bytes --]
This patch fixes:
CHECK /home/kernel/src/net/irda/parameters.c
/home/kernel/src/net/irda/parameters.c:466:2: warning: Using plain integer as NULL pointer
/home/kernel/src/net/irda/parameters.c:520:2: warning: Using plain integer as NULL pointer
/home/kernel/src/net/irda/parameters.c:573:2: warning: Using plain integer as NULL pointer
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
net/irda/parameters.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: net-2.6/net/irda/parameters.c
===================================================================
--- net-2.6.orig/net/irda/parameters.c 2007-11-25 05:54:02.000000000 +0100
+++ net-2.6/net/irda/parameters.c 2007-11-26 10:20:38.000000000 +0100
@@ -463,7 +463,7 @@
int n = 0;
IRDA_ASSERT(buf != NULL, return ret;);
- IRDA_ASSERT(info != 0, return ret;);
+ IRDA_ASSERT(info != NULL, return ret;);
pi_minor = pi & info->pi_mask;
pi_major = pi >> info->pi_major_offset;
@@ -517,7 +517,7 @@
int n = 0;
IRDA_ASSERT(buf != NULL, return ret;);
- IRDA_ASSERT(info != 0, return ret;);
+ IRDA_ASSERT(info != NULL, return ret;);
pi_minor = buf[n] & info->pi_mask;
pi_major = buf[n] >> info->pi_major_offset;
@@ -570,7 +570,7 @@
int n = 0;
IRDA_ASSERT(buf != NULL, return ret;);
- IRDA_ASSERT(info != 0, return ret;);
+ IRDA_ASSERT(info != NULL, return ret;);
/*
* Parse all parameters. Each parameter must be at least two bytes
--
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-12-03 9:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
2007-12-03 6:57 ` Herbert Xu
2007-12-03 9:28 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
2007-12-03 9:28 ` [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Samuel Ortiz
2007-12-03 9:28 ` [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps Samuel Ortiz
2007-12-03 9:28 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz
2007-12-03 9:28 ` [PATCH 5/5] [IrDA] irda parameters warning fixes Samuel Ortiz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.