netxen: fix endianness read mac address
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
71fceff0ea
commit
a03d245199
@ -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_get_flash_mac_addr(struct netxen_adapter *adapter, u64 *mac);
|
||||||
int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac);
|
int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, u64 *mac);
|
||||||
extern void netxen_change_ringparam(struct netxen_adapter *adapter);
|
extern void netxen_change_ringparam(struct netxen_adapter *adapter);
|
||||||
extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr,
|
extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr,
|
||||||
int *valp);
|
int *valp);
|
||||||
|
@ -1033,7 +1033,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,
|
|||||||
return 0;
|
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;
|
__le32 *pmac = (__le32 *) mac;
|
||||||
u32 offset;
|
u32 offset;
|
||||||
@ -1058,7 +1058,7 @@ int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac)
|
|||||||
return 0;
|
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;
|
uint32_t crbaddr, mac_hi, mac_lo;
|
||||||
int pci_func = adapter->ahw.pci_func;
|
int pci_func = adapter->ahw.pci_func;
|
||||||
|
@ -432,7 +432,7 @@ netxen_read_mac_addr(struct netxen_adapter *adapter)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
__le64 mac_addr;
|
u64 mac_addr;
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
struct pci_dev *pdev = adapter->pdev;
|
struct pci_dev *pdev = adapter->pdev;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user