On Thu, Feb 24, 2022 at 1:35 AM Ricardo Martinez <ricardo.martinez@xxxxxxxxxxxxxxx> wrote: > From: Haijun Liu <haijun.liu@xxxxxxxxxxxx> > > Cross Layer DMA (CLDMA) Hardware interface (HIF) enables the control > path of Host-Modem data transfers. CLDMA HIF layer provides a common > interface to the Port Layer. > > CLDMA manages 8 independent RX/TX physical channels with data flow > control in HW queues. CLDMA uses ring buffers of General Packet > Descriptors (GPD) for TX/RX. GPDs can represent multiple or single > data buffers (DB). > > CLDMA HIF initializes GPD rings, registers ISR handlers for CLDMA > interrupts, and initializes CLDMA HW registers. > > CLDMA TX flow: > 1. Port Layer write > 2. Get DB address > 3. Configure GPD > 4. Triggering processing via HW register write > > CLDMA RX flow: > 1. CLDMA HW sends a RX "done" to host > 2. Driver starts thread to safely read GPD > 3. DB is sent to Port layer > 4. Create a new buffer for GPD ring > > Signed-off-by: Haijun Liu <haijun.liu@xxxxxxxxxxxx> > Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@xxxxxxxxx> > Co-developed-by: Ricardo Martinez <ricardo.martinez@xxxxxxxxxxxxxxx> > Signed-off-by: Ricardo Martinez <ricardo.martinez@xxxxxxxxxxxxxxx> > > From a WWAN framework perspective: > Reviewed-by: Loic Poulain <loic.poulain@xxxxxxxxxx> > --- > drivers/net/wwan/t7xx/t7xx_cldma.c | 281 ++++++ > drivers/net/wwan/t7xx/t7xx_cldma.h | 176 ++++ > drivers/net/wwan/t7xx/t7xx_common.h | 40 + > drivers/net/wwan/t7xx/t7xx_hif_cldma.c | 1204 ++++++++++++++++++++++++ > drivers/net/wwan/t7xx/t7xx_hif_cldma.h | 141 +++ > drivers/net/wwan/t7xx/t7xx_reg.h | 33 + > 6 files changed, 1875 insertions(+) > create mode 100644 drivers/net/wwan/t7xx/t7xx_cldma.c > create mode 100644 drivers/net/wwan/t7xx/t7xx_cldma.h > create mode 100644 drivers/net/wwan/t7xx/t7xx_common.h > create mode 100644 drivers/net/wwan/t7xx/t7xx_hif_cldma.c > create mode 100644 drivers/net/wwan/t7xx/t7xx_hif_cldma.h > create mode 100644 drivers/net/wwan/t7xx/t7xx_reg.h > > diff --git a/drivers/net/wwan/t7xx/t7xx_cldma.c b/drivers/net/wwan/t7xx/t7xx_cldma.c > new file mode 100644 > index 000000000000..2713d9a6034b > --- /dev/null > +++ b/drivers/net/wwan/t7xx/t7xx_cldma.c > @@ -0,0 +1,281 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (c) 2021, MediaTek Inc. > + * Copyright (c) 2021-2022, Intel Corporation. > + * > + * Authors: > + * Haijun Liu <haijun.liu@xxxxxxxxxxxx> > + * Moises Veleta <moises.veleta@xxxxxxxxx> > + * Ricardo Martinez<ricardo.martinez@xxxxxxxxxxxxxxx> The space is missed between name and email. The same issue repeated in every file of the series. [skipped] > +#ifdef NET_SKBUFF_DATA_USES_OFFSET > +static inline unsigned int t7xx_skb_data_area_size(struct sk_buff *skb) > +{ > + return skb->head + skb->end - skb->data; > +} > +#else > +static inline unsigned int t7xx_skb_data_area_size(struct sk_buff *skb) > +{ > + return skb->end - skb->data; > +} > +#endif You can use skb_end_pointer() to avoid conditional compilation. -- Sergey