|
@@ -87,6 +87,11 @@ static struct be_cmd_priv_map cmd_priv_map[] = {
|
|
CMD_SUBSYSTEM_LOWLEVEL,
|
|
CMD_SUBSYSTEM_LOWLEVEL,
|
|
BE_PRIV_DEVCFG | BE_PRIV_DEVSEC
|
|
BE_PRIV_DEVCFG | BE_PRIV_DEVSEC
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ OPCODE_COMMON_SET_HSW_CONFIG,
|
|
|
|
+ CMD_SUBSYSTEM_COMMON,
|
|
|
|
+ BE_PRIV_DEVCFG | BE_PRIV_VHADM
|
|
|
|
+ },
|
|
};
|
|
};
|
|
|
|
|
|
static bool be_cmd_allowed(struct be_adapter *adapter, u8 opcode, u8 subsystem)
|
|
static bool be_cmd_allowed(struct be_adapter *adapter, u8 opcode, u8 subsystem)
|
|
@@ -3850,6 +3855,10 @@ int be_cmd_set_hsw_config(struct be_adapter *adapter, u16 pvid,
|
|
void *ctxt;
|
|
void *ctxt;
|
|
int status;
|
|
int status;
|
|
|
|
|
|
|
|
+ if (!be_cmd_allowed(adapter, OPCODE_COMMON_SET_HSW_CONFIG,
|
|
|
|
+ CMD_SUBSYSTEM_COMMON))
|
|
|
|
+ return -EPERM;
|
|
|
|
+
|
|
spin_lock_bh(&adapter->mcc_lock);
|
|
spin_lock_bh(&adapter->mcc_lock);
|
|
|
|
|
|
wrb = wrb_from_mccq(adapter);
|
|
wrb = wrb_from_mccq(adapter);
|
|
@@ -3871,7 +3880,7 @@ int be_cmd_set_hsw_config(struct be_adapter *adapter, u16 pvid,
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, pvid_valid, ctxt, 1);
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, pvid_valid, ctxt, 1);
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, pvid, ctxt, pvid);
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, pvid, ctxt, pvid);
|
|
}
|
|
}
|
|
- if (!BEx_chip(adapter) && hsw_mode) {
|
|
|
|
|
|
+ if (hsw_mode) {
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, interface_id,
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, interface_id,
|
|
ctxt, adapter->hba_port_num);
|
|
ctxt, adapter->hba_port_num);
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, pport, ctxt, 1);
|
|
AMAP_SET_BITS(struct amap_set_hsw_context, pport, ctxt, 1);
|