* [PATCH 1/4] netxen: fix endianness read mac address
2010-01-14 10:43 [PATCH 0/4] netxen: endianness fixes Amit Kumar Salecha
@ 2010-01-14 10:43 ` Amit Kumar Salecha
2010-01-14 10:43 ` [PATCH 2/4] netxen: Fix endianness intr coalesce Amit Kumar Salecha
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Amit Kumar Salecha @ 2010-01-14 10:43 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
In netxen_read_mac_addr, mac_addr should be declared
u64 instead of __le64, used by host only.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic.h | 4 ++--
drivers/net/netxen/netxen_nic_hw.c | 4 ++--
drivers/net/netxen/netxen_nic_main.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 9bc5bd1..c5a03a6 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -1427,8 +1427,8 @@ static inline u32 netxen_tx_avail(struct nx_host_tx_ring *tx_ring)
}
-int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac);
-int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac);
+int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, u64 *mac);
+int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, u64 *mac);
extern void netxen_change_ringparam(struct netxen_adapter *adapter);
extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr,
int *valp);
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 85e28e6..0db36f1 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -1033,7 +1033,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,
return 0;
}
-int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac)
+int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, u64 *mac)
{
__le32 *pmac = (__le32 *) mac;
u32 offset;
@@ -1058,7 +1058,7 @@ int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac)
return 0;
}
-int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac)
+int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, u64 *mac)
{
uint32_t crbaddr, mac_hi, mac_lo;
int pci_func = adapter->ahw.pci_func;
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 9f9d608..2d584ea 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -430,7 +430,7 @@ netxen_read_mac_addr(struct netxen_adapter *adapter)
{
int i;
unsigned char *p;
- __le64 mac_addr;
+ u64 mac_addr;
struct net_device *netdev = adapter->netdev;
struct pci_dev *pdev = adapter->pdev;
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] netxen: Fix endianness intr coalesce
2010-01-14 10:43 [PATCH 0/4] netxen: endianness fixes Amit Kumar Salecha
2010-01-14 10:43 ` [PATCH 1/4] netxen: fix endianness read mac address Amit Kumar Salecha
@ 2010-01-14 10:43 ` Amit Kumar Salecha
2010-01-14 10:43 ` [PATCH 3/4] netxen: fix license header Amit Kumar Salecha
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Amit Kumar Salecha @ 2010-01-14 10:43 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
Before sending Interrupt coalesce parameters to device,
convert them in little endian.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_hw.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 0db36f1..9548e59 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -777,17 +777,20 @@ int netxen_p3_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr)
int netxen_config_intr_coalesce(struct netxen_adapter *adapter)
{
nx_nic_req_t req;
- u64 word;
- int rv;
+ u64 word[6];
+ int rv, i;
memset(&req, 0, sizeof(nx_nic_req_t));
+ memset(word, 0, sizeof(word));
req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23);
- word = NETXEN_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16);
- req.req_hdr = cpu_to_le64(word);
+ word[0] = NETXEN_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16);
+ req.req_hdr = cpu_to_le64(word[0]);
- memcpy(&req.words[0], &adapter->coal, sizeof(adapter->coal));
+ memcpy(&word[0], &adapter->coal, sizeof(adapter->coal));
+ for (i = 0; i < 6; i++)
+ req.words[i] = cpu_to_le64(word[i]);
rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
if (rv != 0) {
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] netxen: fix license header
2010-01-14 10:43 [PATCH 0/4] netxen: endianness fixes Amit Kumar Salecha
2010-01-14 10:43 ` [PATCH 1/4] netxen: fix endianness read mac address Amit Kumar Salecha
2010-01-14 10:43 ` [PATCH 2/4] netxen: Fix endianness intr coalesce Amit Kumar Salecha
@ 2010-01-14 10:43 ` Amit Kumar Salecha
2010-01-14 10:43 ` [PATCH 4/4] netxen: fix sparse warning Amit Kumar Salecha
2010-01-14 11:08 ` [PATCH 0/4] netxen: endianness fixes David Miller
4 siblings, 0 replies; 8+ messages in thread
From: Amit Kumar Salecha @ 2010-01-14 10:43 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
GNU General Public License is in file "COPYING".
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/Makefile | 2 +-
drivers/net/netxen/netxen_nic.h | 2 +-
drivers/net/netxen/netxen_nic_ctx.c | 2 +-
drivers/net/netxen/netxen_nic_ethtool.c | 2 +-
drivers/net/netxen/netxen_nic_hdr.h | 2 +-
drivers/net/netxen/netxen_nic_hw.c | 2 +-
drivers/net/netxen/netxen_nic_hw.h | 2 +-
drivers/net/netxen/netxen_nic_init.c | 2 +-
drivers/net/netxen/netxen_nic_main.c | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/netxen/Makefile b/drivers/net/netxen/Makefile
index 11d94e2..861a059 100644
--- a/drivers/net/netxen/Makefile
+++ b/drivers/net/netxen/Makefile
@@ -18,7 +18,7 @@
# MA 02111-1307, USA.
#
# The full GNU General Public License is included in this distribution
-# in the file called LICENSE.
+# in the file called "COPYING".
#
#
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index c5a03a6..6dd33eb 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
index 9cb8f68..2a8ef5f 100644
--- a/drivers/net/netxen/netxen_nic_ctx.c
+++ b/drivers/net/netxen/netxen_nic_ctx.c
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index 542f408..f8499e5 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h
index d138fc2..4d17579 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 9548e59..dd45c7a 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_hw.h b/drivers/net/netxen/netxen_nic_hw.h
index 3fd1dcb..e2c5b6f 100644
--- a/drivers/net/netxen/netxen_nic_hw.h
+++ b/drivers/net/netxen/netxen_nic_hw.h
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 64cff68..c8dceaf 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 2d584ea..2173f98 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -19,7 +19,7 @@
* MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution
- * in the file called LICENSE.
+ * in the file called "COPYING".
*
*/
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] netxen: fix sparse warning
2010-01-14 10:43 [PATCH 0/4] netxen: endianness fixes Amit Kumar Salecha
` (2 preceding siblings ...)
2010-01-14 10:43 ` [PATCH 3/4] netxen: fix license header Amit Kumar Salecha
@ 2010-01-14 10:43 ` Amit Kumar Salecha
2010-01-14 11:08 ` [PATCH 0/4] netxen: endianness fixes David Miller
4 siblings, 0 replies; 8+ messages in thread
From: Amit Kumar Salecha @ 2010-01-14 10:43 UTC (permalink / raw)
To: davem; +Cc: netdev, dhananjay.phadke
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 2173f98..374e23a 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -2496,7 +2496,7 @@ netxen_sysfs_read_mem(struct kobject *kobj, struct bin_attribute *attr,
return size;
}
-ssize_t netxen_sysfs_write_mem(struct kobject *kobj,
+static ssize_t netxen_sysfs_write_mem(struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t offset, size_t size)
{
--
1.6.0.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] netxen: endianness fixes
2010-01-14 10:43 [PATCH 0/4] netxen: endianness fixes Amit Kumar Salecha
` (3 preceding siblings ...)
2010-01-14 10:43 ` [PATCH 4/4] netxen: fix sparse warning Amit Kumar Salecha
@ 2010-01-14 11:08 ` David Miller
2010-01-14 14:57 ` Dhananjay Phadke
4 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2010-01-14 11:08 UTC (permalink / raw)
To: amit.salecha; +Cc: netdev, dhananjay.phadke
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Thu, 14 Jan 2010 02:43:03 -0800
> Series of 4 small patches to fix endianness issues and License header.
> These issues were suggested by Ben Hutchings for qlcnic driver,
> same apply to netxen_nic driver.
> Please apply these patches in net-2.6 tree.
These endianness fixes for netxen are starting to get reduclious.
You mean in all this time, nobody noticed that reading the MAC
address isn't done correctly on big-endian?
Well then I guess all of these small endianness fixes aren't
very critical this late in the RC series.
I want to start slimming down the amount of small driver fixes
that are still being submitted this late. And these endian
bits that show the device is basically unused by anyone (perhaps
other than you) on big endian are a good way to start.
Submit them for net-next-2.6 of course, but I'm tossing this
series for net-2.6, sorry.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] netxen: endianness fixes
2010-01-14 11:08 ` [PATCH 0/4] netxen: endianness fixes David Miller
@ 2010-01-14 14:57 ` Dhananjay Phadke
2010-01-15 0:54 ` David Miller
0 siblings, 1 reply; 8+ messages in thread
From: Dhananjay Phadke @ 2010-01-14 14:57 UTC (permalink / raw)
To: David Miller, Amit Salecha; +Cc: netdev@vger.kernel.org
On Jan 14, 2010, at 3:08 AM, David Miller wrote:
> You mean in all this time, nobody noticed that reading the MAC
> address isn't done correctly on big-endian?
>
> Well then I guess all of these small endianness fixes aren't
> very critical this late in the RC series.
The MAC fix doesn't change any functionality, just changing data types.
It was working on big-endian machines.
-Dhananjay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] netxen: endianness fixes
2010-01-14 14:57 ` Dhananjay Phadke
@ 2010-01-15 0:54 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2010-01-15 0:54 UTC (permalink / raw)
To: dhananjay.phadke; +Cc: amit.salecha, netdev
From: Dhananjay Phadke <dhananjay.phadke@qlogic.com>
Date: Thu, 14 Jan 2010 06:57:47 -0800
>
> On Jan 14, 2010, at 3:08 AM, David Miller wrote:
>
>> You mean in all this time, nobody noticed that reading the MAC
>> address isn't done correctly on big-endian?
>>
>> Well then I guess all of these small endianness fixes aren't
>> very critical this late in the RC series.
>
> The MAC fix doesn't change any functionality, just changing data types.
> It was working on big-endian machines.
Then that's a cleanup and thus even less appropriate for net-2.6
^ permalink raw reply [flat|nested] 8+ messages in thread