On Mon, Nov 17, 2025 at 05:21:33PM +0000, Dharanitharan R wrote:
> v2: Fix indentation issues pointed out by Greg KH.
No real changelog? And this goes below the --- line, right?
>
> Signed-off-by:Dharanitharan R <dharanitharan725(a)gmail.com>
You need a space after the :
thanks,
greg k-h
Check the return values of send_control() and send_line_coding() during
device initialization in gb_uart_probe(). If these operations fail, the
device will be left in an inconsistent state, so propagate the error to
properly fail the probe.
Both functions call gb_operation_sync() which can fail with errors such
as -ENOMEM, -ENODEV, or -ETIMEDOUT. Ignoring these errors means the TTY
device would be registered despite incomplete initialization.
Signed-off-by: Nirbhay Sharma <nirbhay.lkd(a)gmail.com>
---
drivers/staging/greybus/uart.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 10df5c37c83e..5cece0a6606f 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -879,14 +879,18 @@ static int gb_uart_probe(struct gbphy_device *gbphy_dev,
if (retval)
goto exit_put_port;
- send_control(gb_tty, gb_tty->ctrlout);
+ retval = send_control(gb_tty, gb_tty->ctrlout);
+ if (retval)
+ goto exit_connection_disable;
/* initialize the uart to be 9600n81 */
gb_tty->line_coding.rate = cpu_to_le32(9600);
gb_tty->line_coding.format = GB_SERIAL_1_STOP_BITS;
gb_tty->line_coding.parity = GB_SERIAL_NO_PARITY;
gb_tty->line_coding.data_bits = 8;
- send_line_coding(gb_tty);
+ retval = send_line_coding(gb_tty);
+ if (retval)
+ goto exit_connection_disable;
retval = gb_connection_enable(connection);
if (retval)
--
2.48.1
Hi,
This patchset brings support for Silicon Labs' CPC (Co-Processor
Communication) protocol as transport layer for Greybus. This is
introduced as a module that sits between Greybus and CPC Host Device
Driver implementations, like SDIO or SPI, which are not part of this
RFC. If there's no push back with this RFC, the final patchset ready for
upstream will include the SDIO driver.
The goal of this module is to implement some of the features of Unipro
that Greybus relies upon, like reliable transmission. CPC takes care of
detecting transmission errors and retransmit frames if necessary. That
feature is not part of the RFC to keep it concise, but it's planned for
a future patchset. There's also a flow-control feature, to prevent from
sending messages to cports that don't have anymore room.
In order to implement these features, a 4-byte header is prepended to
Greybus messages, making the whole header 12 bytes (Greybus header
itself being 8 bytes).
This RFC starts by implementing a shim layer that sits between physical
bus drivers (like SDIO and SPI) and Greybus, and progressively add more
elements to it to make it useful in its own right.
+----------------------------------------------------+
| Greybus |
+----------------------------------------------------+
/|\
|
\|/
+----------------------------------------------------+
| CPC |
+----------------------------------------------------+
/|\ /|\ /|\
| | |
\|/ \|/ \|/
+----------+ +---------+ +-----------+
| SDIO | | SPI | | Others |
+----------+ +---------+ +-----------+
Changes in v2:
- v1 included a new protocol for Bluetooth HCI, this has been dropped
to focus on CPC itself
- likewise, there was an SPI driver, it has been dropped of this RFC
for the same reason
- v1 introduced CPC in a big commit, this time it's been split in
smaller commits to make review manageable
Damien Riégel (12):
greybus: cpc: add minimal CPC Host Device infrastructure
greybus: cpc: introduce CPC cport structure
greybus: cpc: use socket buffers instead of gb_message in TX path
greybus: cpc: pack cport ID in Greybus header
greybus: cpc: switch RX path to socket buffers
greybus: cpc: introduce CPC header structure
greybus: cpc: account for CPC header size in RX and TX path
greybus: cpc: add and validate sequence numbers
greybus: cpc: acknowledge all incoming messages
greybus: cpc: use holding queue instead of sending out immediately
greybus: cpc: honour remote's RX window
greybus: cpc: let host device drivers dequeue TX frames
MAINTAINERS | 6 +
drivers/greybus/Kconfig | 2 +
drivers/greybus/Makefile | 2 +
drivers/greybus/cpc/Kconfig | 10 ++
drivers/greybus/cpc/Makefile | 6 +
drivers/greybus/cpc/cpc.h | 76 +++++++++
drivers/greybus/cpc/cport.c | 107 ++++++++++++
drivers/greybus/cpc/header.c | 146 +++++++++++++++++
drivers/greybus/cpc/header.h | 54 +++++++
drivers/greybus/cpc/host.c | 287 +++++++++++++++++++++++++++++++++
drivers/greybus/cpc/host.h | 58 +++++++
drivers/greybus/cpc/protocol.c | 169 +++++++++++++++++++
12 files changed, 923 insertions(+)
create mode 100644 drivers/greybus/cpc/Kconfig
create mode 100644 drivers/greybus/cpc/Makefile
create mode 100644 drivers/greybus/cpc/cpc.h
create mode 100644 drivers/greybus/cpc/cport.c
create mode 100644 drivers/greybus/cpc/header.c
create mode 100644 drivers/greybus/cpc/header.h
create mode 100644 drivers/greybus/cpc/host.c
create mode 100644 drivers/greybus/cpc/host.h
create mode 100644 drivers/greybus/cpc/protocol.c
--
2.49.0
On Thu, Nov 13, 2025 at 10:12:00PM +0800, Chang Junzheng wrote:
> From: Chang Junzheng <guagua210311(a)outlook.com>
>
> Fix checkpatch.pl warning by changing envp array declaration to
> static const char * const. This improves code safety and follows
> kernel coding style recommendations.
>
> Signed-off-by: Chang Junzheng <guagua210311(a)qq.com>
> Changes in v2:
> - Restored original indentation of array elements
> - Only changed the array declaration as originally intended
The "Changes" goes below the --- line, as per the documentation.
thanks,
greg k-h
On Thu, Nov 13, 2025 at 09:39:54PM +0800, cjz_VM wrote:
> Hi Greg,
>
> Thanks for reviewing my patch!
>
> For sending twice: I apologize for the duplicate. After the first send, I realized I had missed some greybus-specific maintainers, so I resent to include them all.
Then that should have been a v2 patch :)
> For the indentation: You're right to ask about it. When I changed the declaration from 'char *envp[]' to 'static const char * const envp[]', the opening bracket moved to the right due to the longer declaration. I added tabs to keep the array elements aligned with the opening bracket, following the kernel coding style rule that parameters should align with the opening parenthesis.
>
> If this alignment approach is not preferred, I'm happy to adjust it to whatever style you recommend.
You did not document your change, and it had nothing really to do with
the const change, so I would not recommend doing this.
Also, please do not top-post, and be sure to properly wrap your lines in
your email client.
thanks,
greg k-h