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
1016int qed_fill_dev_info(struct qed_dev *cdev,1016int qed_fill_dev_info(struct qed_dev *cdev,
1017 struct qed_dev_info *dev_info);1017 struct qed_dev_info *dev_info);
1018void qed_link_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);1018void qed_link_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
1019void qed_bw_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
1019u32 qed_unzip_data(struct qed_hwfn *p_hwfn,1020u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
1020 u32 input_len, u8 *input_buf,1021 u32 input_len, u8 *input_buf,
1021 u32 max_size, u8 *unzip_buf);1022 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
1940 op->link_update(cookie, &if_link);1940 op->link_update(cookie, &if_link);
1941}1941}
1942 1942
1943void 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
1943static int qed_drain(struct qed_dev *cdev)1952static int qed_drain(struct qed_dev *cdev)
1944{1953{
1945 struct qed_hwfn *hwfn;1954 struct qed_hwfn *hwfn;
include/linux/qed/qed_if.h+1−0
@@ -817,6 +817,7 @@ struct qed_common_cb_ops { · 816 unmodified lines
817 void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);817 void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
818 void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);818 void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
819 void (*get_protocol_tlv_data)(void *dev, void *data);819 void (*get_protocol_tlv_data)(void *dev, void *data);
820 void (*bw_update)(void *dev);
820};821};
821 822
822struct qed_selftest_ops {823struct qed_selftest_ops {