* [PATCH] staging: most: hdm-usb: add comment
@ 2016-10-28 11:11 Christian Gromm
2016-10-28 12:08 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Christian Gromm @ 2016-10-28 11:11 UTC (permalink / raw)
To: gregkh; +Cc: Christian Gromm, driverdev-devel
This patch adds a comment to function hdm_configure_channel() to clarify
its execution paths as requested by Dan Carpenter.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
drivers/staging/most/hdm-usb/hdm_usb.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 3433646..d6db0bd 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -634,6 +634,15 @@ static int hdm_enqueue(struct most_interface *iface, int channel,
* @iface: interface
* @channel: channel ID
* @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,
struct most_channel_config *conf)
@@ -667,6 +676,11 @@ static int hdm_configure_channel(struct most_interface *iface, int channel,
!(conf->data_type == MOST_CH_ISOC &&
conf->packets_per_xact != 0xFF)) {
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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: most: hdm-usb: add comment
2016-10-28 11:11 [PATCH] staging: most: hdm-usb: add comment Christian Gromm
@ 2016-10-28 12:08 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-10-28 12:08 UTC (permalink / raw)
To: Christian Gromm; +Cc: driverdev-devel
On Fri, Oct 28, 2016 at 01:11:15PM +0200, Christian Gromm wrote:
> This patch adds a comment to function hdm_configure_channel() to clarify
> its execution paths as requested by Dan Carpenter.
>
> Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
"reported-by:" tag please?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-28 12:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 11:11 [PATCH] staging: most: hdm-usb: add comment Christian Gromm
2016-10-28 12:08 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.