qed: Introduce VFs
This adds the qed VFs for the first time - The vfs are limited functions, with a very different PCI bar structure [when compared with PFs] to better impose the related security demands associated with them. This patch includes the logic neccesary to allow VFs to successfully probe [without actually adding the ability to enable iov]. This includes diverging all the flows that would occur as part of the pci probe of the driver, preventing VF from accessing registers/memories it can't and instead utilize the VF->PF channel to query the PF for needed information. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
37bff2b9c6
commit
1408cc1fa4
@@ -285,6 +285,63 @@
|
||||
#define PXP_ILT_PAGE_SIZE_NUM_BITS_MIN 12
|
||||
#define PXP_ILT_BLOCK_FACTOR_MULTIPLIER 1024
|
||||
|
||||
#define PXP_VF_BAR0_START_IGU 0
|
||||
#define PXP_VF_BAR0_IGU_LENGTH 0x3000
|
||||
#define PXP_VF_BAR0_END_IGU (PXP_VF_BAR0_START_IGU + \
|
||||
PXP_VF_BAR0_IGU_LENGTH - 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_DQ 0x3000
|
||||
#define PXP_VF_BAR0_DQ_LENGTH 0x200
|
||||
#define PXP_VF_BAR0_DQ_OPAQUE_OFFSET 0
|
||||
#define PXP_VF_BAR0_ME_OPAQUE_ADDRESS (PXP_VF_BAR0_START_DQ + \
|
||||
PXP_VF_BAR0_DQ_OPAQUE_OFFSET)
|
||||
#define PXP_VF_BAR0_ME_CONCRETE_ADDRESS (PXP_VF_BAR0_ME_OPAQUE_ADDRESS \
|
||||
+ 4)
|
||||
#define PXP_VF_BAR0_END_DQ (PXP_VF_BAR0_START_DQ + \
|
||||
PXP_VF_BAR0_DQ_LENGTH - 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_TSDM_ZONE_B 0x3200
|
||||
#define PXP_VF_BAR0_SDM_LENGTH_ZONE_B 0x200
|
||||
#define PXP_VF_BAR0_END_TSDM_ZONE_B (PXP_VF_BAR0_START_TSDM_ZONE_B \
|
||||
+ \
|
||||
PXP_VF_BAR0_SDM_LENGTH_ZONE_B \
|
||||
- 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_MSDM_ZONE_B 0x3400
|
||||
#define PXP_VF_BAR0_END_MSDM_ZONE_B (PXP_VF_BAR0_START_MSDM_ZONE_B \
|
||||
+ \
|
||||
PXP_VF_BAR0_SDM_LENGTH_ZONE_B \
|
||||
- 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_USDM_ZONE_B 0x3600
|
||||
#define PXP_VF_BAR0_END_USDM_ZONE_B (PXP_VF_BAR0_START_USDM_ZONE_B \
|
||||
+ \
|
||||
PXP_VF_BAR0_SDM_LENGTH_ZONE_B \
|
||||
- 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_XSDM_ZONE_B 0x3800
|
||||
#define PXP_VF_BAR0_END_XSDM_ZONE_B (PXP_VF_BAR0_START_XSDM_ZONE_B \
|
||||
+ \
|
||||
PXP_VF_BAR0_SDM_LENGTH_ZONE_B \
|
||||
- 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_YSDM_ZONE_B 0x3a00
|
||||
#define PXP_VF_BAR0_END_YSDM_ZONE_B (PXP_VF_BAR0_START_YSDM_ZONE_B \
|
||||
+ \
|
||||
PXP_VF_BAR0_SDM_LENGTH_ZONE_B \
|
||||
- 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_PSDM_ZONE_B 0x3c00
|
||||
#define PXP_VF_BAR0_END_PSDM_ZONE_B (PXP_VF_BAR0_START_PSDM_ZONE_B \
|
||||
+ \
|
||||
PXP_VF_BAR0_SDM_LENGTH_ZONE_B \
|
||||
- 1)
|
||||
|
||||
#define PXP_VF_BAR0_START_SDM_ZONE_A 0x4000
|
||||
#define PXP_VF_BAR0_END_SDM_ZONE_A 0x10000
|
||||
|
||||
#define PXP_VF_BAR0_GRC_WINDOW_LENGTH 32
|
||||
|
||||
/* ILT Records */
|
||||
#define PXP_NUM_ILT_RECORDS_BB 7600
|
||||
#define PXP_NUM_ILT_RECORDS_K2 11000
|
||||
|
@@ -140,6 +140,13 @@ struct qed_link_output {
|
||||
u32 pause_config;
|
||||
};
|
||||
|
||||
struct qed_probe_params {
|
||||
enum qed_protocol protocol;
|
||||
u32 dp_module;
|
||||
u8 dp_level;
|
||||
bool is_vf;
|
||||
};
|
||||
|
||||
#define QED_DRV_VER_STR_SIZE 12
|
||||
struct qed_slowpath_params {
|
||||
u32 int_mode;
|
||||
@@ -207,8 +214,7 @@ struct qed_common_ops {
|
||||
struct qed_selftest_ops *selftest;
|
||||
|
||||
struct qed_dev* (*probe)(struct pci_dev *dev,
|
||||
enum qed_protocol protocol,
|
||||
u32 dp_module, u8 dp_level);
|
||||
struct qed_probe_params *params);
|
||||
|
||||
void (*remove)(struct qed_dev *cdev);
|
||||
|
||||
|
Reference in New Issue
Block a user