soc/qman: add return value to interrupt coalesce changing APIs

Check that the values received by the portal interrupt coalesce
change APIs are in range.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Madalin Bucur
2018-11-21 13:41:08 +02:00
committed by David S. Miller
parent 830b61ba4e
commit 5c664ace8c
2 changed files with 33 additions and 10 deletions

View File

@@ -1205,8 +1205,10 @@ void qman_dqrr_get_ithresh(struct qman_portal *portal, u8 *ithresh);
* qman_dqrr_set_ithresh - Set coalesce interrupt threshold
* @portal: portal to set the new value on
* @ithresh: new threshold value
*
* Returns 0 on success, or a negative error code.
*/
void qman_dqrr_set_ithresh(struct qman_portal *portal, u8 ithresh);
int qman_dqrr_set_ithresh(struct qman_portal *portal, u8 ithresh);
/**
* qman_dqrr_get_iperiod - Get coalesce interrupt period
@@ -1219,7 +1221,9 @@ void qman_portal_get_iperiod(struct qman_portal *portal, u32 *iperiod);
* qman_dqrr_set_iperiod - Set coalesce interrupt period
* @portal: portal to set the new value on
* @ithresh: new period value
*
* Returns 0 on success, or a negative error code.
*/
void qman_portal_set_iperiod(struct qman_portal *portal, u32 iperiod);
int qman_portal_set_iperiod(struct qman_portal *portal, u32 iperiod);
#endif /* __FSL_QMAN_H */