* [PATCH net-next] net: usb: sr9700: fix byte numbering in comments
@ 2026-01-13 7:53 Ethan Nelson-Moore
2026-01-15 17:36 ` Simon Horman
2026-01-16 3:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-01-13 7:53 UTC (permalink / raw)
To: netdev, linux-usb
Cc: Ethan Nelson-Moore, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
The comments describing the RX/TX headers and status response use
a combination of 0- and 1-based indexing, leading to confusion. Correct
the numbering and make it consistent. Also fix a typo "pm" for "pn".
This issue also existed in dm9601 and was fixed in commit 61189c78bda8
("dm9601: trivial comment fixes").
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
drivers/net/usb/sr9700.c | 42 ++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 820c4c506979..bd90ac40acdd 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -391,20 +391,20 @@ static int sr9700_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
int len;
/* skb content (packets) format :
- * p0 p1 p2 ...... pm
+ * p1 p2 p3 ...... pn
* / \
* / \
* / \
* / \
- * p0b0 p0b1 p0b2 p0b3 ...... p0b(n-4) p0b(n-3)...p0bn
+ * p1b1 p1b2 p1b3 p1b4 ...... p1b(n-4) p1b(n-3)...p1bn
*
- * p0 : packet 0
- * p0b0 : packet 0 byte 0
+ * p1 : packet 1
+ * p1b1 : packet 1 byte 1
*
- * b0: rx status
- * b1: packet length (incl crc) low
- * b2: packet length (incl crc) high
- * b3..n-4: packet data
+ * b1: rx status
+ * b2: packet length (incl crc) low
+ * b3: packet length (incl crc) high
+ * b4..n-4: packet data
* bn-3..bn: ethernet packet crc
*/
if (unlikely(skb->len < SR_RX_OVERHEAD)) {
@@ -452,12 +452,12 @@ static struct sk_buff *sr9700_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
/* SR9700 can only send out one ethernet packet at once.
*
- * b0 b1 b2 b3 ...... b(n-4) b(n-3)...bn
+ * b1 b2 b3 b4 ...... b(n-4) b(n-3)...bn
*
- * b0: rx status
- * b1: packet length (incl crc) low
- * b2: packet length (incl crc) high
- * b3..n-4: packet data
+ * b1: rx status
+ * b2: packet length (incl crc) low
+ * b3: packet length (incl crc) high
+ * b4..n-4: packet data
* bn-3..bn: ethernet packet crc
*/
@@ -488,14 +488,14 @@ static void sr9700_status(struct usbnet *dev, struct urb *urb)
u8 *buf;
/* format:
- b0: net status
- b1: tx status 1
- b2: tx status 2
- b3: rx status
- b4: rx overflow
- b5: rx count
- b6: tx count
- b7: gpr
+ b1: net status
+ b2: tx status 1
+ b3: tx status 2
+ b4: rx status
+ b5: rx overflow
+ b6: rx count
+ b7: tx count
+ b8: gpr
*/
if (urb->actual_length < 8)
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: usb: sr9700: fix byte numbering in comments
2026-01-13 7:53 [PATCH net-next] net: usb: sr9700: fix byte numbering in comments Ethan Nelson-Moore
@ 2026-01-15 17:36 ` Simon Horman
2026-01-15 20:22 ` Peter Korsgaard
2026-01-16 3:50 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Simon Horman @ 2026-01-15 17:36 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: netdev, linux-usb, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Peter Korsgaard
On Mon, Jan 12, 2026 at 11:53:21PM -0800, Ethan Nelson-Moore wrote:
> The comments describing the RX/TX headers and status response use
> a combination of 0- and 1-based indexing, leading to confusion. Correct
> the numbering and make it consistent. Also fix a typo "pm" for "pn".
>
> This issue also existed in dm9601 and was fixed in commit 61189c78bda8
> ("dm9601: trivial comment fixes").
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Thanks,
I agree this is consistent with the cited commit.
Reviewed-by: Simon Horman <horms@kernel.org>
Context left below for the benefit of Peter who I've added to the CC list.
> ---
> drivers/net/usb/sr9700.c | 42 ++++++++++++++++++++--------------------
> 1 file changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
> index 820c4c506979..bd90ac40acdd 100644
> --- a/drivers/net/usb/sr9700.c
> +++ b/drivers/net/usb/sr9700.c
> @@ -391,20 +391,20 @@ static int sr9700_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
> int len;
>
> /* skb content (packets) format :
> - * p0 p1 p2 ...... pm
> + * p1 p2 p3 ...... pn
> * / \
> * / \
> * / \
> * / \
> - * p0b0 p0b1 p0b2 p0b3 ...... p0b(n-4) p0b(n-3)...p0bn
> + * p1b1 p1b2 p1b3 p1b4 ...... p1b(n-4) p1b(n-3)...p1bn
> *
> - * p0 : packet 0
> - * p0b0 : packet 0 byte 0
> + * p1 : packet 1
> + * p1b1 : packet 1 byte 1
> *
> - * b0: rx status
> - * b1: packet length (incl crc) low
> - * b2: packet length (incl crc) high
> - * b3..n-4: packet data
> + * b1: rx status
> + * b2: packet length (incl crc) low
> + * b3: packet length (incl crc) high
> + * b4..n-4: packet data
> * bn-3..bn: ethernet packet crc
> */
> if (unlikely(skb->len < SR_RX_OVERHEAD)) {
> @@ -452,12 +452,12 @@ static struct sk_buff *sr9700_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
>
> /* SR9700 can only send out one ethernet packet at once.
> *
> - * b0 b1 b2 b3 ...... b(n-4) b(n-3)...bn
> + * b1 b2 b3 b4 ...... b(n-4) b(n-3)...bn
> *
> - * b0: rx status
> - * b1: packet length (incl crc) low
> - * b2: packet length (incl crc) high
> - * b3..n-4: packet data
> + * b1: rx status
> + * b2: packet length (incl crc) low
> + * b3: packet length (incl crc) high
> + * b4..n-4: packet data
> * bn-3..bn: ethernet packet crc
> */
>
> @@ -488,14 +488,14 @@ static void sr9700_status(struct usbnet *dev, struct urb *urb)
> u8 *buf;
>
> /* format:
> - b0: net status
> - b1: tx status 1
> - b2: tx status 2
> - b3: rx status
> - b4: rx overflow
> - b5: rx count
> - b6: tx count
> - b7: gpr
> + b1: net status
> + b2: tx status 1
> + b3: tx status 2
> + b4: rx status
> + b5: rx overflow
> + b6: rx count
> + b7: tx count
> + b8: gpr
> */
>
> if (urb->actual_length < 8)
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: usb: sr9700: fix byte numbering in comments
2026-01-15 17:36 ` Simon Horman
@ 2026-01-15 20:22 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2026-01-15 20:22 UTC (permalink / raw)
To: Simon Horman
Cc: Ethan Nelson-Moore, netdev, linux-usb, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
>>>>> "Simon" == Simon Horman <horms@kernel.org> writes:
> On Mon, Jan 12, 2026 at 11:53:21PM -0800, Ethan Nelson-Moore wrote:
>> The comments describing the RX/TX headers and status response use
>> a combination of 0- and 1-based indexing, leading to confusion. Correct
>> the numbering and make it consistent. Also fix a typo "pm" for "pn".
>>
>> This issue also existed in dm9601 and was fixed in commit 61189c78bda8
>> ("dm9601: trivial comment fixes").
>>
>> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> Thanks,
> I agree this is consistent with the cited commit.
> Reviewed-by: Simon Horman <horms@kernel.org>
> Context left below for the benefit of Peter who I've added to the CC list.
Heh, old stuff ;)
Acked-by: Peter Korsgaard <peter@korsgaard.com>
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: usb: sr9700: fix byte numbering in comments
2026-01-13 7:53 [PATCH net-next] net: usb: sr9700: fix byte numbering in comments Ethan Nelson-Moore
2026-01-15 17:36 ` Simon Horman
@ 2026-01-16 3:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-16 3:50 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: netdev, linux-usb, andrew+netdev, davem, edumazet, kuba, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 12 Jan 2026 23:53:21 -0800 you wrote:
> The comments describing the RX/TX headers and status response use
> a combination of 0- and 1-based indexing, leading to confusion. Correct
> the numbering and make it consistent. Also fix a typo "pm" for "pn".
>
> This issue also existed in dm9601 and was fixed in commit 61189c78bda8
> ("dm9601: trivial comment fixes").
>
> [...]
Here is the summary with links:
- [net-next] net: usb: sr9700: fix byte numbering in comments
https://git.kernel.org/netdev/net-next/c/acbe4a141e89
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-16 3:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 7:53 [PATCH net-next] net: usb: sr9700: fix byte numbering in comments Ethan Nelson-Moore
2026-01-15 17:36 ` Simon Horman
2026-01-15 20:22 ` Peter Korsgaard
2026-01-16 3:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox