forked from luck/tmp_suning_uos_patched
scsi: qed: Send BW update notifications to the protocol drivers
Management firmware (MFW) sends a notification whenever there is a change in the bandwidth values. Add driver support for sending this notification to the upper layer drivers (e.g., qedf). Link: https://lore.kernel.org/r/20200416084314.18851-6-skashyap@marvell.com Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
fedc173e46
commit
699fed4a2d
|
@ -1016,6 +1016,7 @@ int qed_device_num_ports(struct qed_dev *cdev);
|
|||
int qed_fill_dev_info(struct qed_dev *cdev,
|
||||
struct qed_dev_info *dev_info);
|
||||
void qed_link_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
|
||||
void qed_bw_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
|
||||
u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
|
||||
u32 input_len, u8 *input_buf,
|
||||
u32 max_size, u8 *unzip_buf);
|
||||
|
|
|
@ -1940,6 +1940,15 @@ void qed_link_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt)
|
|||
op->link_update(cookie, &if_link);
|
||||
}
|
||||
|
||||
void qed_bw_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt)
|
||||
{
|
||||
void *cookie = hwfn->cdev->ops_cookie;
|
||||
struct qed_common_cb_ops *op = hwfn->cdev->protocol_ops.common;
|
||||
|
||||
if (IS_LEAD_HWFN(hwfn) && cookie && op && op->bw_update)
|
||||
op->bw_update(cookie);
|
||||
}
|
||||
|
||||
static int qed_drain(struct qed_dev *cdev)
|
||||
{
|
||||
struct qed_hwfn *hwfn;
|
||||
|
|
|
@ -817,6 +817,7 @@ struct qed_common_cb_ops {
|
|||
void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
|
||||
void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
|
||||
void (*get_protocol_tlv_data)(void *dev, void *data);
|
||||
void (*bw_update)(void *dev);
|
||||
};
|
||||
|
||||
struct qed_selftest_ops {
|
||||
|
|
Loading…
Reference in New Issue
Block a user