* [PATCH] net: cdc_ncm: Fix spelling mistakes
@ 2025-07-22 2:32 yicongsrfy
2025-07-22 5:46 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: yicongsrfy @ 2025-07-22 2:32 UTC (permalink / raw)
To: oneukum, andrew+netdev, davem; +Cc: netdev, linux-usb, Yi Cong
From: Yi Cong <yicong@kylinos.cn>
According to the Universal Serial Bus Class Definitions for
Communications Devices v1.2, in chapter 6.3.3 table-21:
DLBitRate(downlink bit rate) seems like spelling error.
Signed-off-by: Yi Cong <yicong@kylinos.cn>
---
drivers/net/usb/cdc_ncm.c | 2 +-
include/uapi/linux/usb/cdc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 34e82f1e37d9..057ad1cf0820 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1847,7 +1847,7 @@ cdc_ncm_speed_change(struct usbnet *dev,
struct usb_cdc_speed_change *data)
{
/* RTL8156 shipped before 2021 sends notification about every 32ms. */
- dev->rx_speed = le32_to_cpu(data->DLBitRRate);
+ dev->rx_speed = le32_to_cpu(data->DLBitRate);
dev->tx_speed = le32_to_cpu(data->ULBitRate);
}
diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h
index 1924cf665448..f528c8e0a04e 100644
--- a/include/uapi/linux/usb/cdc.h
+++ b/include/uapi/linux/usb/cdc.h
@@ -316,7 +316,7 @@ struct usb_cdc_notification {
#define USB_CDC_SERIAL_STATE_OVERRUN (1 << 6)
struct usb_cdc_speed_change {
- __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */
+ __le32 DLBitRate; /* contains the downlink bit rate (IN pipe) */
__le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */
} __attribute__ ((packed));
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: cdc_ncm: Fix spelling mistakes
2025-07-22 2:32 [PATCH] net: cdc_ncm: Fix spelling mistakes yicongsrfy
@ 2025-07-22 5:46 ` Greg KH
2025-07-22 6:51 ` yicongsrfy
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2025-07-22 5:46 UTC (permalink / raw)
To: yicongsrfy; +Cc: oneukum, andrew+netdev, davem, netdev, linux-usb, Yi Cong
On Tue, Jul 22, 2025 at 10:32:59AM +0800, yicongsrfy@163.com wrote:
> From: Yi Cong <yicong@kylinos.cn>
>
> According to the Universal Serial Bus Class Definitions for
> Communications Devices v1.2, in chapter 6.3.3 table-21:
> DLBitRate(downlink bit rate) seems like spelling error.
>
> Signed-off-by: Yi Cong <yicong@kylinos.cn>
> ---
> drivers/net/usb/cdc_ncm.c | 2 +-
> include/uapi/linux/usb/cdc.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
> index 34e82f1e37d9..057ad1cf0820 100644
> --- a/drivers/net/usb/cdc_ncm.c
> +++ b/drivers/net/usb/cdc_ncm.c
> @@ -1847,7 +1847,7 @@ cdc_ncm_speed_change(struct usbnet *dev,
> struct usb_cdc_speed_change *data)
> {
> /* RTL8156 shipped before 2021 sends notification about every 32ms. */
> - dev->rx_speed = le32_to_cpu(data->DLBitRRate);
> + dev->rx_speed = le32_to_cpu(data->DLBitRate);
> dev->tx_speed = le32_to_cpu(data->ULBitRate);
> }
>
> diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h
> index 1924cf665448..f528c8e0a04e 100644
> --- a/include/uapi/linux/usb/cdc.h
> +++ b/include/uapi/linux/usb/cdc.h
> @@ -316,7 +316,7 @@ struct usb_cdc_notification {
> #define USB_CDC_SERIAL_STATE_OVERRUN (1 << 6)
>
> struct usb_cdc_speed_change {
> - __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */
> + __le32 DLBitRate; /* contains the downlink bit rate (IN pipe) */
> __le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */
> } __attribute__ ((packed));
You are changing a structure that userspace sees. How did you verify
that this is not going to break any existing code out there?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: cdc_ncm: Fix spelling mistakes
2025-07-22 5:46 ` Greg KH
@ 2025-07-22 6:51 ` yicongsrfy
2025-07-22 6:56 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: yicongsrfy @ 2025-07-22 6:51 UTC (permalink / raw)
To: greg; +Cc: andrew+netdev, davem, linux-usb, netdev, oneukum, yicong
On Tue, 22 Jul 2025 07:46:34 +0200 [thread overview] Greg <greg@kroah.com> wrote:
>
> On Tue, Jul 22, 2025 at 10:32:59AM +0800, yicongsrfy@163.com wrote:
> > From: Yi Cong <yicong@kylinos.cn>
> >
> > According to the Universal Serial Bus Class Definitions for
> > Communications Devices v1.2, in chapter 6.3.3 table-21:
> > DLBitRate(downlink bit rate) seems like spelling error.
> >
> > Signed-off-by: Yi Cong <yicong@kylinos.cn>
> > ---
> > drivers/net/usb/cdc_ncm.c | 2 +-
> > include/uapi/linux/usb/cdc.h | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
> > index 34e82f1e37d9..057ad1cf0820 100644
> > --- a/drivers/net/usb/cdc_ncm.c
> > +++ b/drivers/net/usb/cdc_ncm.c
> > @@ -1847,7 +1847,7 @@ cdc_ncm_speed_change(struct usbnet *dev,
> > struct usb_cdc_speed_change *data)
> > {
> > /* RTL8156 shipped before 2021 sends notification about every 32ms. */
> > - dev->rx_speed = le32_to_cpu(data->DLBitRRate);
> > + dev->rx_speed = le32_to_cpu(data->DLBitRate);
> > dev->tx_speed = le32_to_cpu(data->ULBitRate);
> > }
> >
> > diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h
> > index 1924cf665448..f528c8e0a04e 100644
> > --- a/include/uapi/linux/usb/cdc.h
> > +++ b/include/uapi/linux/usb/cdc.h
> > @@ -316,7 +316,7 @@ struct usb_cdc_notification {
> > #define USB_CDC_SERIAL_STATE_OVERRUN (1 << 6)
> >
> > struct usb_cdc_speed_change {
> > - __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */
> > + __le32 DLBitRate; /* contains the downlink bit rate (IN pipe) */
> > __le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */
> > } __attribute__ ((packed));
>
> You are changing a structure that userspace sees. How did you verify
> that this is not going to break any existing code out there?
Your question is very valid. I can only guarantee that the devices
in my possession do not involve references to the relevant structures,
but I'm not sure the behavior of other vendors' implementations,
which may vary.
So, perhaps it would be better to keep things as they are?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: cdc_ncm: Fix spelling mistakes
2025-07-22 6:51 ` yicongsrfy
@ 2025-07-22 6:56 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-07-22 6:56 UTC (permalink / raw)
To: yicongsrfy; +Cc: andrew+netdev, davem, linux-usb, netdev, oneukum, yicong
On Tue, Jul 22, 2025 at 02:51:43PM +0800, yicongsrfy@163.com wrote:
> On Tue, 22 Jul 2025 07:46:34 +0200 [thread overview] Greg <greg@kroah.com> wrote:
> >
> > On Tue, Jul 22, 2025 at 10:32:59AM +0800, yicongsrfy@163.com wrote:
> > > From: Yi Cong <yicong@kylinos.cn>
> > >
> > > According to the Universal Serial Bus Class Definitions for
> > > Communications Devices v1.2, in chapter 6.3.3 table-21:
> > > DLBitRate(downlink bit rate) seems like spelling error.
> > >
> > > Signed-off-by: Yi Cong <yicong@kylinos.cn>
> > > ---
> > > drivers/net/usb/cdc_ncm.c | 2 +-
> > > include/uapi/linux/usb/cdc.h | 2 +-
> > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
> > > index 34e82f1e37d9..057ad1cf0820 100644
> > > --- a/drivers/net/usb/cdc_ncm.c
> > > +++ b/drivers/net/usb/cdc_ncm.c
> > > @@ -1847,7 +1847,7 @@ cdc_ncm_speed_change(struct usbnet *dev,
> > > struct usb_cdc_speed_change *data)
> > > {
> > > /* RTL8156 shipped before 2021 sends notification about every 32ms. */
> > > - dev->rx_speed = le32_to_cpu(data->DLBitRRate);
> > > + dev->rx_speed = le32_to_cpu(data->DLBitRate);
> > > dev->tx_speed = le32_to_cpu(data->ULBitRate);
> > > }
> > >
> > > diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h
> > > index 1924cf665448..f528c8e0a04e 100644
> > > --- a/include/uapi/linux/usb/cdc.h
> > > +++ b/include/uapi/linux/usb/cdc.h
> > > @@ -316,7 +316,7 @@ struct usb_cdc_notification {
> > > #define USB_CDC_SERIAL_STATE_OVERRUN (1 << 6)
> > >
> > > struct usb_cdc_speed_change {
> > > - __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */
> > > + __le32 DLBitRate; /* contains the downlink bit rate (IN pipe) */
> > > __le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */
> > > } __attribute__ ((packed));
> >
> > You are changing a structure that userspace sees. How did you verify
> > that this is not going to break any existing code out there?
>
> Your question is very valid. I can only guarantee that the devices
> in my possession do not involve references to the relevant structures,
> but I'm not sure the behavior of other vendors' implementations,
> which may vary.
>
> So, perhaps it would be better to keep things as they are?
Yes please.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-22 6:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 2:32 [PATCH] net: cdc_ncm: Fix spelling mistakes yicongsrfy
2025-07-22 5:46 ` Greg KH
2025-07-22 6:51 ` yicongsrfy
2025-07-22 6:56 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox