[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <391da589-5256-3b28-646c-56d87d9ebd@linux.intel.com>
Date: Tue, 1 Feb 2022 12:13:50 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
cc: Netdev <netdev@...r.kernel.org>, linux-wireless@...r.kernel.org,
kuba@...nel.org, davem@...emloft.net, johannes@...solutions.net,
ryazanov.s.a@...il.com, loic.poulain@...aro.org,
m.chetan.kumar@...el.com, chandrashekar.devegowda@...el.com,
linuxwwan@...el.com, chiranjeevi.rapolu@...ux.intel.com,
haijun.liu@...iatek.com, amir.hanania@...el.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
dinesh.sharma@...el.com, eliot.lee@...el.com,
moises.veleta@...el.com, pierre-louis.bossart@...el.com,
muralidharan.sethuraman@...el.com, Soumya.Prakash.Mishra@...el.com,
sreehari.kancharla@...el.com
Subject: Re: [PATCH net-next v4 07/13] net: wwan: t7xx: Data path HW layer
On Tue, 1 Feb 2022, Ilpo Järvinen wrote:
> On Thu, 13 Jan 2022, Ricardo Martinez wrote:
>
> > From: Haijun Liu <haijun.liu@...iatek.com>
> >
> > Data Path Modem AP Interface (DPMAIF) HW layer provides HW abstraction
> > for the upper layer (DPMAIF HIF). It implements functions to do the HW
> > configuration, TX/RX control and interrupt handling.
> >
> > Signed-off-by: Haijun Liu <haijun.liu@...iatek.com>
> > Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>
> > Co-developed-by: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
> > Signed-off-by: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
> > ---
> > +enum dpmaif_hw_intr_type {
> > + DPF_INTR_INVALID_MIN,
> > + DPF_INTR_UL_DONE,
> > + DPF_INTR_UL_DRB_EMPTY,
> > + DPF_INTR_UL_MD_NOTREADY,
> > + DPF_INTR_UL_MD_PWR_NOTREADY,
> > + DPF_INTR_UL_LEN_ERR,
> > + DPF_INTR_DL_DONE,
> > + DPF_INTR_DL_SKB_LEN_ERR,
> > + DPF_INTR_DL_BATCNT_LEN_ERR,
> > + DPF_INTR_DL_PITCNT_LEN_ERR,
> > + DPF_INTR_DL_PKT_EMPTY_SET,
> > + DPF_INTR_DL_FRG_EMPTY_SET,
> > + DPF_INTR_DL_MTU_ERR,
> > + DPF_INTR_DL_FRGCNT_LEN_ERR,
> > + DPF_INTR_DL_Q0_PITCNT_LEN_ERR,
> > + DPF_INTR_DL_Q1_PITCNT_LEN_ERR,
> > + DPF_INTR_DL_HPC_ENT_TYPE_ERR,
> > + DPF_INTR_DL_Q0_DONE,
> > + DPF_INTR_DL_Q1_DONE,
> > + DPF_INTR_INVALID_MAX
> > +};
> > +
> > +#define DPF_RX_QNO0 0
> > +#define DPF_RX_QNO1 1
> > +#define DPF_RX_QNO_DFT DPF_RX_QNO0
> > +
> > +struct dpmaif_hw_intr_st_para {
> > + unsigned int intr_cnt;
> > + enum dpmaif_hw_intr_type intr_types[DPF_INTR_INVALID_MAX - 1];
> > + unsigned int intr_queues[DPF_INTR_INVALID_MAX - 1];
>
> Off-by-one errors?
>
> In addition, I think there's some other problem related to these as
> there are 20 values in enum (of which two are named "INVALID") but
> t7xx_dpmaif_set_intr_para seems to be called only with 17 of them
> (DPF_INTR_DL_DONE not among the calls). This implies intr_cnt will
> likely be too small to cover the last entry when it is being used
> in 08/13 for a for loop termination condition.
Nevermind this one. I misread the code (I somehow got into thinking that
the type would be used for indexing which isn't true).
--
i.
Powered by blists - more mailing lists