net/qede/base: refactor device's number of ports logic
authorRasesh Mody <rasesh.mody@cavium.com>
Tue, 19 Sep 2017 01:51:21 +0000 (18:51 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:49 +0000 (02:49 +0200)
commitdd7b6aadaa1a2cbaf709137a0ba8102bf6d64bdd
tree57094331dcb5a5539f228671da366d32df88a5b2
parent823a84aa6ba2a6b9a496319e9e010b31ef4b24c4
net/qede/base: refactor device's number of ports logic

- Avoid having num_of_ports as 0 [to prevent a division by 0 via
   MFW_PORT()]. Also fix the MFW_PORT() macro for CMT.
 - Read the device's number of ports from shmem.
 - Rename num_ports_in_engines to num_ports_in_engine.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/ecore.h
drivers/net/qede/base/ecore_dev.c
drivers/net/qede/base/ecore_l2.c
drivers/net/qede/base/ecore_mcp.h