* [PATCH net-2.6 0/4]netxen: fix memory leak
@ 2010-01-08 8:10 Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 1/4] netxen: fix tx ring " Amit Kumar Salecha
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Amit Kumar Salecha @ 2010-01-08 8:10 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
Hi
Series of 4 patches to fix memory leak and bug fixes.
Please apply them on net-2.6 tree.
-Amit Salecha
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-2.6 1/4] netxen: fix tx ring memory leak
2010-01-08 8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
@ 2010-01-08 8:10 ` Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 2/4] netxen: fix smatch warning Amit Kumar Salecha
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Amit Kumar Salecha @ 2010-01-08 8:10 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
o While unloading driver or resetting the context, tx ring was not
getting free.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_init.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 02f8d4b..925b699 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -184,6 +184,8 @@ skip_rds:
tx_ring = adapter->tx_ring;
vfree(tx_ring->cmd_buf_arr);
+ kfree(tx_ring);
+ adapter->tx_ring = NULL;
}
int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
--
1.6.0.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-2.6 2/4] netxen: fix smatch warning
2010-01-08 8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 1/4] netxen: fix tx ring " Amit Kumar Salecha
@ 2010-01-08 8:10 ` Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 3/4] netxen: fix set mac addr Amit Kumar Salecha
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Amit Kumar Salecha @ 2010-01-08 8:10 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
o Fix pointless assignments
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_hw.c | 3 +--
drivers/net/netxen/netxen_nic_init.c | 2 +-
drivers/net/netxen/netxen_nic_main.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 2e364fe..398dfd4 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -345,8 +345,7 @@ netxen_pcie_sem_lock(struct netxen_adapter *adapter, int sem, u32 id_reg)
void
netxen_pcie_sem_unlock(struct netxen_adapter *adapter, int sem)
{
- int val;
- val = NXRD32(adapter, NETXEN_PCIE_REG(PCIE_SEM_UNLOCK(sem)));
+ NXRD32(adapter, NETXEN_PCIE_REG(PCIE_SEM_UNLOCK(sem)));
}
int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port)
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 925b699..64cff68 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -784,7 +784,7 @@ netxen_need_fw_reset(struct netxen_adapter *adapter)
if (NXRD32(adapter, CRB_CMDPEG_STATE) == PHAN_INITIALIZE_FAILED)
return 1;
- old_count = count = NXRD32(adapter, NETXEN_PEG_ALIVE_COUNTER);
+ old_count = NXRD32(adapter, NETXEN_PEG_ALIVE_COUNTER);
for (i = 0; i < 10; i++) {
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 880fcd0..9f9d608 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -340,7 +340,7 @@ netxen_check_hw_init(struct netxen_adapter *adapter, int first_boot)
if (!(first_boot & 0x4)) {
first_boot |= 0x4;
NXWR32(adapter, NETXEN_PCIE_REG(0x4), first_boot);
- first_boot = NXRD32(adapter, NETXEN_PCIE_REG(0x4));
+ NXRD32(adapter, NETXEN_PCIE_REG(0x4));
}
/* This is the first boot after power up */
--
1.6.0.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-2.6 3/4] netxen: fix set mac addr
2010-01-08 8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 1/4] netxen: fix tx ring " Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 2/4] netxen: fix smatch warning Amit Kumar Salecha
@ 2010-01-08 8:10 ` Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 4/4] netxen: update version to 4.0.72 Amit Kumar Salecha
2010-01-08 8:40 ` [PATCH net-2.6 0/4]netxen: fix memory leak David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Amit Kumar Salecha @ 2010-01-08 8:10 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
o If tx and rx resources are not available, during set mac request.
Then this request wont be passed to firmware and it will be added to
driver mac list and will never make it to firmware.
So if resources are not available, don't add it to driver mac list.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_hw.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 398dfd4..85e28e6 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -690,6 +690,9 @@ void netxen_p3_nic_set_multi(struct net_device *netdev)
struct list_head *head;
nx_mac_list_t *cur;
+ if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC)
+ return;
+
list_splice_tail_init(&adapter->mac_list, &del_list);
nx_p3_nic_add_mac(adapter, adapter->mac_addr, &del_list);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-2.6 4/4] netxen: update version to 4.0.72
2010-01-08 8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
` (2 preceding siblings ...)
2010-01-08 8:10 ` [PATCH net-2.6 3/4] netxen: fix set mac addr Amit Kumar Salecha
@ 2010-01-08 8:10 ` Amit Kumar Salecha
2010-01-08 8:40 ` [PATCH net-2.6 0/4]netxen: fix memory leak David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Amit Kumar Salecha @ 2010-01-08 8:10 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 76cd1f3..9bc5bd1 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -53,8 +53,8 @@
#define _NETXEN_NIC_LINUX_MAJOR 4
#define _NETXEN_NIC_LINUX_MINOR 0
-#define _NETXEN_NIC_LINUX_SUBVERSION 65
-#define NETXEN_NIC_LINUX_VERSIONID "4.0.65"
+#define _NETXEN_NIC_LINUX_SUBVERSION 72
+#define NETXEN_NIC_LINUX_VERSIONID "4.0.72"
#define NETXEN_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c))
#define _major(v) (((v) >> 24) & 0xff)
--
1.6.0.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-2.6 0/4]netxen: fix memory leak
2010-01-08 8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
` (3 preceding siblings ...)
2010-01-08 8:10 ` [PATCH net-2.6 4/4] netxen: update version to 4.0.72 Amit Kumar Salecha
@ 2010-01-08 8:40 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-01-08 8:40 UTC (permalink / raw)
To: amit.salecha; +Cc: netdev, dhananjay.phadke
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Fri, 8 Jan 2010 00:10:13 -0800
> Series of 4 patches to fix memory leak and bug fixes.
> Please apply them on net-2.6 tree.
All applied, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-08 8:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 1/4] netxen: fix tx ring " Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 2/4] netxen: fix smatch warning Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 3/4] netxen: fix set mac addr Amit Kumar Salecha
2010-01-08 8:10 ` [PATCH net-2.6 4/4] netxen: update version to 4.0.72 Amit Kumar Salecha
2010-01-08 8:40 ` [PATCH net-2.6 0/4]netxen: fix memory leak David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).