From: Ayush Singh <ayushdevel1325@gmail.com>
To: Alex Elder <elder@ieee.org>, greybus-dev@lists.linaro.org
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, jkridner@beagleboard.org,
nm@ti.com, yujie.liu@intel.com
Subject: Re: [PATCH V2 1/1] greybus: gb-beagleplay: Remove use of pad bytes
Date: Tue, 12 Dec 2023 20:00:52 +0530 [thread overview]
Message-ID: <27e768dd-f752-40d8-b4e0-0be34eb1d409@gmail.com> (raw)
In-Reply-To: <786e357b-df63-42bb-bc8a-b5fc8d6e9146@ieee.org>
On 12/12/23 19:31, Alex Elder wrote:
> On 12/11/23 12:54 AM, Ayush Singh wrote:
>> Make gb-beagleplay greybus spec compliant by moving cport information to
>> transport layer instead of using `header->pad` bytes.
>>
>> Greybus HDLC frame now has the following payload:
>> 1. le16 cport
>> 2. gb_operation_msg_hdr msg_header
>> 3. u8 *msg_payload
>>
>> Fixes: ec558bbfea67 ("greybus: Add BeaglePlay Linux Driver")
>> Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
>
> I would say that this is an improvement, but I wish I
> had a better picture in mind of how this works. The
> initial commit provided some explanation, but even
> there it talks about the "CC1352 (running SVC Zephyr
> application)" and that leads me to wonder even how
> the hardware is structured. (I'm not really asking
> you for this right now, but you have a reference to
> something that provides some background, you should
> provide it for context.)
Yes, I am thinking of revamping the Beagle connect docs to reflect the
new architecture with some charts and provide a better overall picture.
It is sorely needed at this point.
> Another general comment is that the use of HDLC seems
> like it could be a more clearly separated layer that
> could be used by other Greybus protocols or applications.
> Maybe that's overkill, but it is a distinct layer, right?
Initial commits of gb-beagleplay did separate all the HDLC parts from
the driver. However, it was decided to keep it together and maybe
extract it in the future if other drivers need it.
>
> I had a comment or two about using (void *) instead of
> (u8 *), to reduce the need for explicit type casts. But
> I found that (u8 *) is used elsewhere in the Greybus code.
>
> One comment I *will* share is that the serdev RX callback
> has a const receive buffer. I recommend you preserve that
> "constness" in your code.
>
> -Alex
The constness of the receive buffer is actually preserved. The
`gb_tty_receive` function calls `hdlc_rx` (which takes const u8 *). This
function copies the data to a separate buffer
(`gb_beagleplay->rx_buffer`) for further processing. So the const data
is not modified.
Ayush Singh
next prev parent reply other threads:[~2023-12-12 14:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 6:54 [PATCH V2 0/1] Make gb-beagleplay driver Greybus compliant Ayush Singh
2023-12-11 6:54 ` [PATCH V2 1/1] greybus: gb-beagleplay: Remove use of pad bytes Ayush Singh
2023-12-12 14:01 ` Alex Elder
2023-12-12 14:30 ` Ayush Singh [this message]
2023-12-15 16:20 ` Greg KH
2023-12-16 0:09 ` Ayush Singh
2023-12-16 7:19 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27e768dd-f752-40d8-b4e0-0be34eb1d409@gmail.com \
--to=ayushdevel1325@gmail.com \
--cc=elder@ieee.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=jkridner@beagleboard.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=yujie.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®