Samuel Ortiz | 3 Dec 10:28 2007

[PATCH 0/5] [IrDA] IrDA updates for net-2.6

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
Samuel Ortiz | 3 Dec 10:28 2007

[PATCH 4/5] [IrDA] stir4200 fixes

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@...>
Signed-off-by: Samuel Ortiz <samuel@...>

---
 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
 <at>  <at>  -142,9 +142,6  <at>  <at> 
 };

 enum StirFifoCtlMask {
-	FIFOCTL_EOF = 0x80,
-	FIFOCTL_UNDER = 0x40,
-	FIFOCTL_OVER = 0x20,
 	FIFOCTL_DIR = 0x10,
 	FIFOCTL_CLR = 0x08,
 	FIFOCTL_EMPTY = 0x04,
 <at>  <at>  -594,9 +591,10  <at>  <at> 
 {
 	int err;
 	unsigned long count, status;
+	unsigned long prev_count = 0x1fff;

(Continue reading)

Samuel Ortiz | 3 Dec 10:28 2007

[PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer

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 <at> cetrtapot.si>
Signed-off-by: Samuel Ortiz <samuel <at> 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
 <at>  <at>  -677,6 +677,8  <at>  <at> 
 	/* 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);

--

-- 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Samuel Ortiz | 3 Dec 10:28 2007

[PATCH 5/5] [IrDA] irda parameters warning fixes.

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 <at> student.ltu.se>
Signed-off-by: Samuel Ortiz <samuel <at> sortiz.org>
Cc: Andrew Morton <akpm <at> 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
 <at>  <at>  -463,7 +463,7  <at>  <at> 
 	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;
 <at>  <at>  -517,7 +517,7  <at>  <at> 
 	int n = 0;

 	IRDA_ASSERT(buf != NULL, return ret;);
(Continue reading)

Samuel Ortiz | 3 Dec 10:28 2007

[PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb

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@...>
Signed-off-by: Samuel Ortiz <samuel@...>

---
 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
 <at>  <at>  -1168,6 +1168,7  <at>  <at> 
 static int irda_usb_net_open(struct net_device *netdev)
 {
 	struct irda_usb_cb *self;
+	unsigned long flags;
 	char	hwname[16];
 	int i;
 	
 <at>  <at>  -1177,13 +1178,16  <at>  <at> 
 	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) {
(Continue reading)

Samuel Ortiz | 3 Dec 10:28 2007

[PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps

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@...>
Signed-off-by: Samuel Ortiz <samuel@...>

---
 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
 <at>  <at>  -353,6 +353,7  <at>  <at> 
 		/* 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.
(Continue reading)

Herbert Xu | 3 Dec 07:57 2007
Picon
Picon

Re: [PATCH 0/5] [IrDA] IrDA updates for net-2.6

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 <at> gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Pavel Emelyanov | 4 Dec 16:14 2007

[PATCH][IRDA] Move ircomm_tty_line_info() under #ifdef CONFIG_PROC_FS

The function in question is called only from ircomm_tty_read_proc,
which is under this option. Move this helper to the same place.

Fits both net-2.6 and net-2.6.25

Signed-off-by: Pavel Emelyanov <xemul <at> openvz.org>

---

diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 1120b15..be627e1 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
 <at>  <at>  -1245,6 +1245,7  <at>  <at>  static void ircomm_tty_flow_indication(void *instance, void *sap,
 	self->flow = cmd;
 }

+#ifdef CONFIG_PROC_FS
 static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
 {
 	int  ret=0;
 <at>  <at>  -1354,7 +1355,6  <at>  <at>  static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
  *
  *
  */
-#ifdef CONFIG_PROC_FS
 static int ircomm_tty_read_proc(char *buf, char **start, off_t offset, int len,
 				int *eof, void *unused)
 {
--

-- 
(Continue reading)

David Miller | 5 Dec 11:19 2007
Picon

Re: [PATCH][IRDA] Move ircomm_tty_line_info() under #ifdef CONFIG_PROC_FS

From: Pavel Emelyanov <xemul@...>
Date: Tue, 04 Dec 2007 18:14:48 +0300

> The function in question is called only from ircomm_tty_read_proc,
> which is under this option. Move this helper to the same place.
> 
> Fits both net-2.6 and net-2.6.25
> 
> Signed-off-by: Pavel Emelyanov <xemul@...>

Also applied to net-2.6, thanks!

-------------------------------------------------------------------------
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
Samuel Ortiz | 17 Dec 00:46 2007

[PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps

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@...>
Signed-off-by: Samuel Ortiz <samuel@...>

---
 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
 <at>  <at>  -353,6 +353,7  <at>  <at> 
 		/* 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:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
(Continue reading)


Gmane