Commit 25e3854c authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: hdm-usb: add comment

This patch adds a comment to function hdm_configure_channel() to clarify
its execution paths.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b5367061
...@@ -634,6 +634,15 @@ static int hdm_enqueue(struct most_interface *iface, int channel, ...@@ -634,6 +634,15 @@ static int hdm_enqueue(struct most_interface *iface, int channel,
* @iface: interface * @iface: interface
* @channel: channel ID * @channel: channel ID
* @conf: structure that holds the configuration information * @conf: structure that holds the configuration information
*
* The attached network interface controller (NIC) supports a padding mode
* to avoid short packets on USB, hence increasing the performance due to a
* lower interrupt load. This mode is default for synchronous data and can
* be switched on for isochronous data. In case padding is active the
* driver needs to know the frame size of the payload in order to calculate
* the number of bytes it needs to pad when transmitting or to cut off when
* receiving data.
*
*/ */
static int hdm_configure_channel(struct most_interface *iface, int channel, static int hdm_configure_channel(struct most_interface *iface, int channel,
struct most_channel_config *conf) struct most_channel_config *conf)
...@@ -667,6 +676,11 @@ static int hdm_configure_channel(struct most_interface *iface, int channel, ...@@ -667,6 +676,11 @@ static int hdm_configure_channel(struct most_interface *iface, int channel,
!(conf->data_type == MOST_CH_ISOC && !(conf->data_type == MOST_CH_ISOC &&
conf->packets_per_xact != 0xFF)) { conf->packets_per_xact != 0xFF)) {
mdev->padding_active[channel] = false; mdev->padding_active[channel] = false;
/*
* Since the NIC's padding mode is not going to be
* used, we can skip the frame size calculations and
* move directly on to exit.
*/
goto exit; goto exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment