Search Linux Wireless

Re: [PATCH net-next v4 07/13] net: wwan: t7xx: Data path HW layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 1 Feb 2022, Ilpo Järvinen wrote:

> On Thu, 13 Jan 2022, Ricardo Martinez wrote:
> 
> > From: Haijun Liu <haijun.liu@xxxxxxxxxxxx>
> > 
> > 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@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>
> > ---

> > +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.

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux