History

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).

Sudarsana Reddy Kalluru committed 6 years ago

Commit 699fed41 parent fedc1733 files · +11 −0Browse files

Unified · Split

3 files
  1. drivers/net/ethernet/qlogic/qed/qed.h +1 −0
  2. drivers/net/ethernet/qlogic/qed/qed_main.c +9 −0
  3. include/linux/qed/qed_if.h +1 −0
drivers/net/ethernet/qlogic/qed/qed.h+1−0
@@ -1016,6 +1016,7 @@ int qed_device_num_ports(struct qed_dev *cdev); · 1015 unmodified lines
10161016 int qed_fill_dev_info(struct qed_dev *cdev,
10171017 struct qed_dev_info *dev_info);
10181018 void qed_link_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
1019+void qed_bw_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
10191020 u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
10201021 u32 input_len, u8 *input_buf,
10211022 u32 max_size, u8 *unzip_buf);
drivers/net/ethernet/qlogic/qed/qed_main.c+9−0
@@ -1940,6 +1940,15 @@ void qed_link_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt) · 1939 unmodified lines
19401940 op->link_update(cookie, &if_link);
19411941 }
19421942
1943+void qed_bw_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt)
1944+{
1945+ void *cookie = hwfn->cdev->ops_cookie;
1946+ struct qed_common_cb_ops *op = hwfn->cdev->protocol_ops.common;
1947+
1948+ if (IS_LEAD_HWFN(hwfn) && cookie && op && op->bw_update)
1949+ op->bw_update(cookie);
1950+}
1951+
19431952 static int qed_drain(struct qed_dev *cdev)
19441953 {
19451954 struct qed_hwfn *hwfn;
include/linux/qed/qed_if.h+1−0
@@ -817,6 +817,7 @@ struct qed_common_cb_ops { · 816 unmodified lines
817817 void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
818818 void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
819819 void (*get_protocol_tlv_data)(void *dev, void *data);
820+ void (*bw_update)(void *dev);
820821 };
821822
822823 struct qed_selftest_ops {