aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorAmit S. Kale <amitkale@netxen.com>2007-02-09 08:45:18 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-09 16:09:46 -0500
commit9b41011724024238c94b4c5469df11bb4fd3ba12 (patch)
treed942cec8e865873ac7c2520dc402bcaee3837d5a /drivers/net/netxen
parentd2db9eea7901d83e494340c93d131fc1fd463e4c (diff)
NetXen: Fixes for ppc architecture.
NetXen: Fixes for ppc architecture. Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c2
-rw-r--r--drivers/net/netxen/netxen_nic_init.c4
-rw-r--r--drivers/net/netxen/netxen_nic_main.c3
-rw-r--r--drivers/net/netxen/netxen_nic_niu.c2
4 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index f263232f499f..7195af3e8f3d 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -420,6 +420,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,
420 for (i = 0; i < size / sizeof(u32); i++) { 420 for (i = 0; i < size / sizeof(u32); i++) {
421 if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) 421 if (netxen_rom_fast_read(adapter, addr, ptr32) == -1)
422 return -1; 422 return -1;
423 *ptr32 = cpu_to_le32(*ptr32);
423 ptr32++; 424 ptr32++;
424 addr += sizeof(u32); 425 addr += sizeof(u32);
425 } 426 }
@@ -428,6 +429,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,
428 429
429 if (netxen_rom_fast_read(adapter, addr, &local) == -1) 430 if (netxen_rom_fast_read(adapter, addr, &local) == -1)
430 return -1; 431 return -1;
432 local = cpu_to_le32(local);
431 memcpy(ptr32, &local, (char *)buf + size - (char *)ptr32); 433 memcpy(ptr32, &local, (char *)buf + size - (char *)ptr32);
432 } 434 }
433 435
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index f7bb8c90537c..c243c16fe546 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1246,7 +1246,7 @@ int netxen_process_cmd_ring(unsigned long data)
1246 * the netdev which is associated with that device. 1246 * the netdev which is associated with that device.
1247 */ 1247 */
1248 1248
1249 consumer = *(adapter->cmd_consumer); 1249 consumer = le32_to_cpu(*(adapter->cmd_consumer));
1250 if (last_consumer == consumer) { /* Ring is empty */ 1250 if (last_consumer == consumer) { /* Ring is empty */
1251 DPRINTK(INFO, "last_consumer %d == consumer %d\n", 1251 DPRINTK(INFO, "last_consumer %d == consumer %d\n",
1252 last_consumer, consumer); 1252 last_consumer, consumer);
@@ -1340,7 +1340,7 @@ int netxen_process_cmd_ring(unsigned long data)
1340 if (adapter->last_cmd_consumer == consumer && 1340 if (adapter->last_cmd_consumer == consumer &&
1341 (((adapter->cmd_producer + 1) % 1341 (((adapter->cmd_producer + 1) %
1342 adapter->max_tx_desc_count) == adapter->last_cmd_consumer)) { 1342 adapter->max_tx_desc_count) == adapter->last_cmd_consumer)) {
1343 consumer = *(adapter->cmd_consumer); 1343 consumer = le32_to_cpu(*(adapter->cmd_consumer));
1344 } 1344 }
1345 done = (adapter->last_cmd_consumer == consumer); 1345 done = (adapter->last_cmd_consumer == consumer);
1346 1346
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 69c1b9d23a1a..c2da7ec0248a 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -434,12 +434,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
434 adapter->port_count++; 434 adapter->port_count++;
435 adapter->port[i] = port; 435 adapter->port[i] = port;
436 } 436 }
437 437#ifndef CONFIG_PPC64
438 writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); 438 writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
439 netxen_pinit_from_rom(adapter, 0); 439 netxen_pinit_from_rom(adapter, 0);
440 udelay(500); 440 udelay(500);
441 netxen_load_firmware(adapter); 441 netxen_load_firmware(adapter);
442 netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE); 442 netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
443#endif
443 /* 444 /*
444 * delay a while to ensure that the Pegs are up & running. 445 * delay a while to ensure that the Pegs are up & running.
445 * Otherwise, we might see some flaky behaviour. 446 * Otherwise, we might see some flaky behaviour.
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c
index 40d7003a371c..d5d95074e569 100644
--- a/drivers/net/netxen/netxen_nic_niu.c
+++ b/drivers/net/netxen/netxen_nic_niu.c
@@ -458,7 +458,7 @@ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port)
458 458
459int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port) 459int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port)
460{ 460{
461 long reg = 0, ret = 0; 461 u32 reg = 0, ret = 0;
462 462
463 if (adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ) { 463 if (adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ) {
464 netxen_crb_writelit_adapter(adapter, 464 netxen_crb_writelit_adapter(adapter,