mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 06:00:53 +07:00
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>
This commit is contained in:
parent
d2db9eea79
commit
9b41011724
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user