From 352b09edd7fa8145bfc9e5db0cc0fed971b69440 Mon Sep 17 00:00:00 2001
From: Roland Dreier <rolandd@cisco.com>
Date: Tue, 31 Mar 2009 09:54:15 -0700
Subject: mlx4_core: Don't leak mailbox for SET_PORT on Ethernet ports

Commit 793730bf ("mlx4_core: Don't perform SET_PORT command for
Ethernet ports") introduced a leak of mailbox buffers when SET_PORT
was called for Ethernet ports, since it added a return after the
mailbox was allocated.  Fix this by checking the port type and
returning *before* allocating the mailbox.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
 drivers/net/mlx4/port.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'drivers/net')

diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c
index 7cce3342ef8..606aa58afde 100644
--- a/drivers/net/mlx4/port.c
+++ b/drivers/net/mlx4/port.c
@@ -299,13 +299,14 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
 	struct mlx4_cmd_mailbox *mailbox;
 	int err;
 
+	if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
+		return 0;
+
 	mailbox = mlx4_alloc_cmd_mailbox(dev);
 	if (IS_ERR(mailbox))
 		return PTR_ERR(mailbox);
 
 	memset(mailbox->buf, 0, 256);
-	if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
-		return 0;
 
 	((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
 	err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT,
-- 
cgit 


From 2f2a2132ff056bb45697dc855eb4fd95b70b38cb Mon Sep 17 00:00:00 2001
From: David Howells <dhowells@redhat.com>
Date: Fri, 10 Apr 2009 14:33:48 +0100
Subject: Separate out the proc- and unit-specific header directories from the
 general MN10300 arch headers and place them instead in the same directories
 as contain the .c files for the processor and unit implementations.

This permits the symlinks include/asm/proc and include/asm/unit to be
dispensed with.  This does, however, require that #include <asm/proc/xxx.h> be
converted to #include <proc/xxx.h> and similarly for asm/unit -> unit.

Signed-off-by: David Howells <dhowells@redhat.com>
---
 drivers/net/smc91x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'drivers/net')

diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 912308eec86..329f890e290 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -369,7 +369,7 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
  * MN10300/AM33 configuration
  */
 
-#include <asm/unit/smc91111.h>
+#include <unit/smc91111.h>
 
 #else
 
-- 
cgit