Skip to content

Commit 593d6ad

Browse files
oleremkuba-moo
authored andcommitted
net: dsa: microchip: dcb: add comments for DSCP related functions
All other functions are commented. Add missing comments to following functions: ksz_set_global_dscp_entry() ksz_port_add_dscp_prio() ksz_port_del_dscp_prio() Signed-off-by: Oleksij Rempel <[email protected]> Acked-by: Arun Ramadoss <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2ccb1ac commit 593d6ad

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

drivers/net/dsa/microchip/ksz_dcb.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,17 @@ int ksz_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp)
310310
return (data >> shift) & mask;
311311
}
312312

313+
/**
314+
* ksz_set_global_dscp_entry - Sets the global DSCP-to-priority mapping entry
315+
* @dev: Pointer to the KSZ switch device structure
316+
* @dscp: DSCP value for which to set the priority
317+
* @ipm: Priority value to set
318+
*
319+
* This function sets the global DSCP-to-priority mapping entry for the
320+
* specified DSCP value.
321+
*
322+
* Return: 0 on success, or a negative error code on failure.
323+
*/
313324
static int ksz_set_global_dscp_entry(struct ksz_device *dev, u8 dscp, u8 ipm)
314325
{
315326
int reg, per_reg, shift;
@@ -377,6 +388,16 @@ static int ksz_init_global_dscp_map(struct ksz_device *dev)
377388
return 0;
378389
}
379390

391+
/**
392+
* ksz_port_add_dscp_prio - Adds a DSCP-to-priority mapping entry for a port on
393+
* a KSZ switch.
394+
* @ds: Pointer to the DSA switch structure
395+
* @port: Port number for which to add the DSCP-to-priority mapping entry
396+
* @dscp: DSCP value for which to add the priority
397+
* @prio: Priority value to set
398+
*
399+
* Return: 0 on success, or a negative error code on failure
400+
*/
380401
int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
381402
{
382403
struct ksz_device *dev = ds->priv;
@@ -387,6 +408,16 @@ int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
387408
return ksz_set_global_dscp_entry(dev, dscp, prio);
388409
}
389410

411+
/**
412+
* ksz_port_del_dscp_prio - Deletes a DSCP-to-priority mapping entry for a port
413+
* on a KSZ switch.
414+
* @ds: Pointer to the DSA switch structure
415+
* @port: Port number for which to delete the DSCP-to-priority mapping entry
416+
* @dscp: DSCP value for which to delete the priority
417+
* @prio: Priority value to delete
418+
*
419+
* Return: 0 on success, or a negative error code on failure
420+
*/
390421
int ksz_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
391422
{
392423
struct ksz_device *dev = ds->priv;

0 commit comments

Comments
 (0)