Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b410117 authored by Amit S. Kale's avatar Amit S. Kale Committed by Jeff Garzik
Browse files

NetXen: Fixes for ppc architecture.



NetXen: Fixes for ppc architecture.

Signed-off-by: default avatarAmit S. Kale <amitkale@netxen.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent d2db9eea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -420,6 +420,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,
	for (i = 0; i < size / sizeof(u32); i++) {
		if (netxen_rom_fast_read(adapter, addr, ptr32) == -1)
			return -1;
		*ptr32 = cpu_to_le32(*ptr32);
		ptr32++;
		addr += sizeof(u32);
	}
@@ -428,6 +429,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,

		if (netxen_rom_fast_read(adapter, addr, &local) == -1)
			return -1;
		local = cpu_to_le32(local);
		memcpy(ptr32, &local, (char *)buf + size - (char *)ptr32);
	}

+2 −2
Original line number Diff line number Diff line
@@ -1246,7 +1246,7 @@ int netxen_process_cmd_ring(unsigned long data)
	 * the netdev which is associated with that device.
	 */

	consumer = *(adapter->cmd_consumer);
	consumer = le32_to_cpu(*(adapter->cmd_consumer));
	if (last_consumer == consumer) {	/* Ring is empty    */
		DPRINTK(INFO, "last_consumer %d == consumer %d\n",
			last_consumer, consumer);
@@ -1340,7 +1340,7 @@ int netxen_process_cmd_ring(unsigned long data)
	if (adapter->last_cmd_consumer == consumer &&
	    (((adapter->cmd_producer + 1) %
	      adapter->max_tx_desc_count) == adapter->last_cmd_consumer)) {
		consumer = *(adapter->cmd_consumer);
		consumer = le32_to_cpu(*(adapter->cmd_consumer));
	}
	done = (adapter->last_cmd_consumer == consumer);

+2 −1
Original line number Diff line number Diff line
@@ -434,12 +434,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
		adapter->port_count++;
		adapter->port[i] = port;
	}

#ifndef CONFIG_PPC64
	writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
	netxen_pinit_from_rom(adapter, 0);
	udelay(500);
	netxen_load_firmware(adapter);
	netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
#endif
	/*
	 * delay a while to ensure that the Pegs are up & running.
	 * Otherwise, we might see some flaky behaviour.
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port)

int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port)
{
	long reg = 0, ret = 0;
	u32 reg = 0, ret = 0;

	if (adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ) {
		netxen_crb_writelit_adapter(adapter,