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