* [PATCH 6/7] NetXen: Fixes for Power PC architecture
@ 2007-04-13 15:42 Linsys Contractor Mithlesh Thukral
2007-04-13 15:54 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Linsys Contractor Mithlesh Thukral @ 2007-04-13 15:42 UTC (permalink / raw)
To: netdev; +Cc: amitkale, jeff, mithlesh, netxenproj, rob
NetXen: Configurable interrupts on PPC architecture
This patch will add support to add command line argument to specify
the interrupt type on a PPC machine. Fixes some issues seen on Big endian
machines.
Signed-off by: Milan Bag <mbag@netxen.com>
Acked-by: Mithlesh Thukral <mithlesh@netxen.com>
---
drivers/net/netxen/netxen_nic.h | 6 +++---
drivers/net/netxen/netxen_nic_hw.c | 2 +-
drivers/net/netxen/netxen_nic_init.c | 4 ++--
drivers/net/netxen/netxen_nic_main.c | 6 ++++++
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 3549c7c..7ba2383 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -64,9 +64,9 @@ #include <asm/pgtable.h>
#include "netxen_nic_hw.h"
#define _NETXEN_NIC_LINUX_MAJOR 3
-#define _NETXEN_NIC_LINUX_MINOR 3
-#define _NETXEN_NIC_LINUX_SUBVERSION 3
-#define NETXEN_NIC_LINUX_VERSIONID "3.3.3"
+#define _NETXEN_NIC_LINUX_MINOR 4
+#define _NETXEN_NIC_LINUX_SUBVERSION 2
+#define NETXEN_NIC_LINUX_VERSIONID "3.4.2"
#define NUM_FLASH_SECTORS (64)
#define FLASH_SECTOR_SIZE (64 * 1024)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 3195fa5..4206125 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -1141,7 +1141,7 @@ void netxen_nic_flash_print(struct netxe
netxen_nic_driver_name);
return;
}
- *ptr32 = le32_to_cpu(*ptr32);
+ *ptr32 = cpu_to_le32(*ptr32);
ptr32++;
addr += sizeof(u32);
}
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 3c68eea..3e2b541 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -439,6 +439,7 @@ do_rom_fast_read_words(struct netxen_ada
ret = do_rom_fast_read(adapter, addridx, (int *)bytes);
if (ret != 0)
break;
+ *(int *)bytes = cpu_to_le32(*(int *)bytes);
bytes += 4;
}
@@ -496,8 +497,7 @@ static inline int do_rom_fast_write_word
int timeout = 0;
int data;
- data = *(u32*)bytes;
-
+ data = le32_to_cpu((*(u32*)bytes));
ret = do_rom_fast_write(adapter, addridx, data);
if (ret < 0)
return ret;
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 1739308..18521a4 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -51,6 +51,12 @@ module_param(nx_ppc_msi_enable, int, 064
MODULE_PARM_DESC(nx_ppc_msi_enable, "NetXen PPC MSI enable value");
#endif /* CONFIG_PPC */
+#ifdef CONFIG_PPC
+static int nx_ppc_msi_enable = 0; /* by default donot enable msi */
+module_param(nx_ppc_msi_enable, int, 0644);
+MODULE_PARM_DESC(nx_ppc_msi_enable, "NetXen PPC MSI enable value");
+#endif /* CONFIG_PPC */
+
char netxen_nic_driver_name[] = "netxen-nic";
static char netxen_nic_driver_string[] = "NetXen Network Driver version "
NETXEN_NIC_LINUX_VERSIONID;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 6/7] NetXen: Fixes for Power PC architecture
2007-04-13 15:42 [PATCH 6/7] NetXen: Fixes for Power PC architecture Linsys Contractor Mithlesh Thukral
@ 2007-04-13 15:54 ` Christoph Hellwig
2007-04-17 16:44 ` Amit Kale
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2007-04-13 15:54 UTC (permalink / raw)
To: Linsys Contractor Mithlesh Thukral
Cc: netdev, amitkale, jeff, netxenproj, rob
On Fri, Apr 13, 2007 at 08:42:57AM -0700, Linsys Contractor Mithlesh Thukral wrote:
> NetXen: Configurable interrupts on PPC architecture
> This patch will add support to add command line argument to specify
> the interrupt type on a PPC machine. Fixes some issues seen on Big endian
> machines.
>
> Signed-off by: Milan Bag <mbag@netxen.com>
> Acked-by: Mithlesh Thukral <mithlesh@netxen.com>
>
> ---
>
> drivers/net/netxen/netxen_nic.h | 6 +++---
> drivers/net/netxen/netxen_nic_hw.c | 2 +-
> drivers/net/netxen/netxen_nic_init.c | 4 ++--
> drivers/net/netxen/netxen_nic_main.c | 6 ++++++
> 4 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
> index 3549c7c..7ba2383 100644
> --- a/drivers/net/netxen/netxen_nic.h
> +++ b/drivers/net/netxen/netxen_nic.h
> @@ -64,9 +64,9 @@ #include <asm/pgtable.h>
> #include "netxen_nic_hw.h"
>
> #define _NETXEN_NIC_LINUX_MAJOR 3
> -#define _NETXEN_NIC_LINUX_MINOR 3
> -#define _NETXEN_NIC_LINUX_SUBVERSION 3
> -#define NETXEN_NIC_LINUX_VERSIONID "3.3.3"
> +#define _NETXEN_NIC_LINUX_MINOR 4
> +#define _NETXEN_NIC_LINUX_SUBVERSION 2
> +#define NETXEN_NIC_LINUX_VERSIONID "3.4.2"
>
> #define NUM_FLASH_SECTORS (64)
> #define FLASH_SECTOR_SIZE (64 * 1024)
> diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
> index 3195fa5..4206125 100644
> --- a/drivers/net/netxen/netxen_nic_hw.c
> +++ b/drivers/net/netxen/netxen_nic_hw.c
> @@ -1141,7 +1141,7 @@ void netxen_nic_flash_print(struct netxe
> netxen_nic_driver_name);
> return;
> }
> - *ptr32 = le32_to_cpu(*ptr32);
> + *ptr32 = cpu_to_le32(*ptr32);
Please add proper __le32 and avoid in-place swapping. Please use sparse
to verify that your endianess handling is correct.
> +#ifdef CONFIG_PPC
> +static int nx_ppc_msi_enable = 0; /* by default donot enable msi */
> +module_param(nx_ppc_msi_enable, int, 0644);
> +MODULE_PARM_DESC(nx_ppc_msi_enable, "NetXen PPC MSI enable value");
> +#endif /* CONFIG_PPC */
NACK. If msi is broken on your card for certain setup disable it
completely, if ppc msi support is broken fix it there.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6/7] NetXen: Fixes for Power PC architecture
2007-04-13 15:54 ` Christoph Hellwig
@ 2007-04-17 16:44 ` Amit Kale
0 siblings, 0 replies; 5+ messages in thread
From: Amit Kale @ 2007-04-17 16:44 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Linsys Contractor Mithlesh Thukral, netdev, jeff, netxenproj, rob
On Friday 13 April 2007 21:24, Christoph Hellwig wrote:
> On Fri, Apr 13, 2007 at 08:42:57AM -0700, Linsys Contractor Mithlesh Thukral
wrote:
> > NetXen: Configurable interrupts on PPC architecture
> > This patch will add support to add command line argument to specify
> > the interrupt type on a PPC machine. Fixes some issues seen on Big endian
> > machines.
> >
> > Signed-off by: Milan Bag <mbag@netxen.com>
> > Acked-by: Mithlesh Thukral <mithlesh@netxen.com>
> >
> > ---
> >
> > drivers/net/netxen/netxen_nic.h | 6 +++---
> > drivers/net/netxen/netxen_nic_hw.c | 2 +-
> > drivers/net/netxen/netxen_nic_init.c | 4 ++--
> > drivers/net/netxen/netxen_nic_main.c | 6 ++++++
> > 4 files changed, 12 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/netxen/netxen_nic.h
> > b/drivers/net/netxen/netxen_nic.h index 3549c7c..7ba2383 100644
> > --- a/drivers/net/netxen/netxen_nic.h
> > +++ b/drivers/net/netxen/netxen_nic.h
> > @@ -64,9 +64,9 @@ #include <asm/pgtable.h>
> > #include "netxen_nic_hw.h"
> >
> > #define _NETXEN_NIC_LINUX_MAJOR 3
> > -#define _NETXEN_NIC_LINUX_MINOR 3
> > -#define _NETXEN_NIC_LINUX_SUBVERSION 3
> > -#define NETXEN_NIC_LINUX_VERSIONID "3.3.3"
> > +#define _NETXEN_NIC_LINUX_MINOR 4
> > +#define _NETXEN_NIC_LINUX_SUBVERSION 2
> > +#define NETXEN_NIC_LINUX_VERSIONID "3.4.2"
> >
> > #define NUM_FLASH_SECTORS (64)
> > #define FLASH_SECTOR_SIZE (64 * 1024)
> > diff --git a/drivers/net/netxen/netxen_nic_hw.c
> > b/drivers/net/netxen/netxen_nic_hw.c index 3195fa5..4206125 100644
> > --- a/drivers/net/netxen/netxen_nic_hw.c
> > +++ b/drivers/net/netxen/netxen_nic_hw.c
> > @@ -1141,7 +1141,7 @@ void netxen_nic_flash_print(struct netxe
> > netxen_nic_driver_name);
> > return;
> > }
> > - *ptr32 = le32_to_cpu(*ptr32);
> > + *ptr32 = cpu_to_le32(*ptr32);
>
> Please add proper __le32 and avoid in-place swapping. Please use sparse
> to verify that your endianess handling is correct.
Yes. We'll do this.
Thanks.
>
> > +#ifdef CONFIG_PPC
> > +static int nx_ppc_msi_enable = 0; /* by default donot enable msi */
> > +module_param(nx_ppc_msi_enable, int, 0644);
> > +MODULE_PARM_DESC(nx_ppc_msi_enable, "NetXen PPC MSI enable value");
> > +#endif /* CONFIG_PPC */
>
> NACK. If msi is broken on your card for certain setup disable it
> completely, if ppc msi support is broken fix it there.
Ok. I believe this can be handled through a firmware change, so that driver
will read MIS parameter from there.
-Amit
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 6/7] NetXen: Fixes for Power PC architecture
@ 2007-04-19 14:58 Linsys Contractor Mithlesh Thukral
0 siblings, 0 replies; 5+ messages in thread
From: Linsys Contractor Mithlesh Thukral @ 2007-04-19 14:58 UTC (permalink / raw)
To: netdev; +Cc: amitkale, jeff, netxenproj, rob
NetXen: Fix PPC architecture specific bugs
Fixes some issues seen on Big endian machines.
Signed-off by: Milan Bag <mbag@netxen.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>
---
drivers/net/netxen/netxen_nic.h | 6 +++---
drivers/net/netxen/netxen_nic_hw.c | 3 +--
drivers/net/netxen/netxen_nic_init.c | 4 ++--
drivers/net/netxen/netxen_nic_main.c | 0
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 43e712d..e0c3aab 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -64,9 +64,9 @@ #include <asm/pgtable.h>
#include "netxen_nic_hw.h"
#define _NETXEN_NIC_LINUX_MAJOR 3
-#define _NETXEN_NIC_LINUX_MINOR 3
-#define _NETXEN_NIC_LINUX_SUBVERSION 3
-#define NETXEN_NIC_LINUX_VERSIONID "3.3.3"
+#define _NETXEN_NIC_LINUX_MINOR 4
+#define _NETXEN_NIC_LINUX_SUBVERSION 2
+#define NETXEN_NIC_LINUX_VERSIONID "3.4.2"
#define NUM_FLASH_SECTORS (64)
#define FLASH_SECTOR_SIZE (64 * 1024)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index fba8790..2af5a9d 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -1115,7 +1115,7 @@ void netxen_nic_flash_print(struct netxe
char brd_name[NETXEN_MAX_SHORT_NAME];
struct netxen_new_user_info user_info;
int i, addr = USER_START;
- u32 *ptr32;
+ __le32 *ptr32;
struct netxen_board_info *board_info = &(adapter->ahw.boardcfg);
if (board_info->magic != NETXEN_BDINFO_MAGIC) {
@@ -1141,7 +1141,6 @@ void netxen_nic_flash_print(struct netxe
netxen_nic_driver_name);
return;
}
- *ptr32 = le32_to_cpu(*ptr32);
ptr32++;
addr += sizeof(u32);
}
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index ca3d78b..b75998d 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -439,6 +439,7 @@ do_rom_fast_read_words(struct netxen_ada
ret = do_rom_fast_read(adapter, addridx, (int *)bytes);
if (ret != 0)
break;
+ *(int *)bytes = cpu_to_le32(*(int *)bytes);
bytes += 4;
}
@@ -496,8 +497,7 @@ static inline int do_rom_fast_write_word
int timeout = 0;
int data;
- data = *(u32*)bytes;
-
+ data = le32_to_cpu((*(u32*)bytes));
ret = do_rom_fast_write(adapter, addridx, data);
if (ret < 0)
return ret;
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 6/7] NetXen: Fixes for Power PC architecture
@ 2007-04-20 14:56 Mithlesh Thukral
0 siblings, 0 replies; 5+ messages in thread
From: Mithlesh Thukral @ 2007-04-20 14:56 UTC (permalink / raw)
To: netdev; +Cc: amitkale, jeff, netxenproj, rob
NetXen: Fix PPC architecture specific bugs
Fixes some issues seen on Big endian machines.
Signed-off by: Milan Bag <mbag@netxen.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>
---
drivers/net/netxen/netxen_nic.h | 6 +++---
drivers/net/netxen/netxen_nic_hw.c | 3 +--
drivers/net/netxen/netxen_nic_init.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 1e944d5..5095a3f 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -64,9 +64,9 @@ #include <asm/pgtable.h>
#include "netxen_nic_hw.h"
#define _NETXEN_NIC_LINUX_MAJOR 3
-#define _NETXEN_NIC_LINUX_MINOR 3
-#define _NETXEN_NIC_LINUX_SUBVERSION 3
-#define NETXEN_NIC_LINUX_VERSIONID "3.3.3"
+#define _NETXEN_NIC_LINUX_MINOR 4
+#define _NETXEN_NIC_LINUX_SUBVERSION 2
+#define NETXEN_NIC_LINUX_VERSIONID "3.4.2"
#define NUM_FLASH_SECTORS (64)
#define FLASH_SECTOR_SIZE (64 * 1024)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index fba8790..2af5a9d 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -1115,7 +1115,7 @@ void netxen_nic_flash_print(struct netxe
char brd_name[NETXEN_MAX_SHORT_NAME];
struct netxen_new_user_info user_info;
int i, addr = USER_START;
- u32 *ptr32;
+ __le32 *ptr32;
struct netxen_board_info *board_info = &(adapter->ahw.boardcfg);
if (board_info->magic != NETXEN_BDINFO_MAGIC) {
@@ -1141,7 +1141,6 @@ void netxen_nic_flash_print(struct netxe
netxen_nic_driver_name);
return;
}
- *ptr32 = le32_to_cpu(*ptr32);
ptr32++;
addr += sizeof(u32);
}
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index ca3d78b..b75998d 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -439,6 +439,7 @@ do_rom_fast_read_words(struct netxen_ada
ret = do_rom_fast_read(adapter, addridx, (int *)bytes);
if (ret != 0)
break;
+ *(int *)bytes = cpu_to_le32(*(int *)bytes);
bytes += 4;
}
@@ -496,8 +497,7 @@ static inline int do_rom_fast_write_word
int timeout = 0;
int data;
- data = *(u32*)bytes;
-
+ data = le32_to_cpu((*(u32*)bytes));
ret = do_rom_fast_write(adapter, addridx, data);
if (ret < 0)
return ret;
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-04-20 14:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-13 15:42 [PATCH 6/7] NetXen: Fixes for Power PC architecture Linsys Contractor Mithlesh Thukral
2007-04-13 15:54 ` Christoph Hellwig
2007-04-17 16:44 ` Amit Kale
-- strict thread matches above, loose matches on Subject: below --
2007-04-19 14:58 Linsys Contractor Mithlesh Thukral
2007-04-20 14:56 Mithlesh Thukral
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).