Use cvmx_mgmt_port_num_ports() instead of the inlined copy of a
previous version of this function.
This commit is contained in:
parent
4335f7f258
commit
4f1c369b1f
@ -107,22 +107,7 @@ int cvm_assign_mac_address(uint64_t *macp, uint8_t *octets)
|
|||||||
if (cvm_oct_mac_addr == 0)
|
if (cvm_oct_mac_addr == 0)
|
||||||
return ENXIO;
|
return ENXIO;
|
||||||
|
|
||||||
/*
|
cvm_oct_mac_addr_offset = cvmx_mgmt_port_num_ports();
|
||||||
* The offset from mac_addr_base that should be used for the next port
|
|
||||||
* that is configured. By convention, if any mgmt ports exist on the
|
|
||||||
* chip, they get the first mac addresses. The ports controlled by
|
|
||||||
* driver that use this function are numbered sequencially following
|
|
||||||
* any mgmt addresses that may exist.
|
|
||||||
*
|
|
||||||
* XXX Would be nice if __cvmx_mgmt_port_num_ports() were
|
|
||||||
* not static to cvmx-mgmt-port.c.
|
|
||||||
*/
|
|
||||||
if (OCTEON_IS_MODEL(OCTEON_CN56XX))
|
|
||||||
cvm_oct_mac_addr_offset = 1;
|
|
||||||
else if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))
|
|
||||||
cvm_oct_mac_addr_offset = 2;
|
|
||||||
else
|
|
||||||
cvm_oct_mac_addr_offset = 0;
|
|
||||||
cvm_oct_mac_addr += cvm_oct_mac_addr_offset;
|
cvm_oct_mac_addr += cvm_oct_mac_addr_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR W
|
|||||||
#include <contrib/octeon-sdk/cvmx-app-init.h>
|
#include <contrib/octeon-sdk/cvmx-app-init.h>
|
||||||
#include <contrib/octeon-sdk/cvmx-helper.h>
|
#include <contrib/octeon-sdk/cvmx-helper.h>
|
||||||
#include <contrib/octeon-sdk/cvmx-helper-board.h>
|
#include <contrib/octeon-sdk/cvmx-helper-board.h>
|
||||||
|
#include <contrib/octeon-sdk/cvmx-mgmt-port.h>
|
||||||
#include <mips/cavium/octeon_irq.h>
|
#include <mips/cavium/octeon_irq.h>
|
||||||
#include <contrib/octeon-sdk/octeon-model.h>
|
#include <contrib/octeon-sdk/octeon-model.h>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user