On Mon, 6 Dec 2021, Ricardo Martinez wrote: > From: Haijun Liu <haijun.liu@xxxxxxxxxxxx> > > Port-proxy provides a common interface to interact with different types > of ports. Ports export their configuration via `struct t7xx_port` and > operate as defined by `struct port_ops`. > > Signed-off-by: Haijun Liu <haijun.liu@xxxxxxxxxxxx> > Co-developed-by: Chandrashekar Devegowda <chandrashekar.devegowda@xxxxxxxxx> > Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@xxxxxxxxx> > Co-developed-by: Ricardo Martinez <ricardo.martinez@xxxxxxxxxxxxxxx> > Signed-off-by: Ricardo Martinez <ricardo.martinez@xxxxxxxxxxxxxxx> > + status = FIELD_GET(HDR_FLD_CHN, le32_to_cpu(ccci_h->status)); > + if (status == PORT_CH_STATUS_RX) { > + port->skb_handler(port, skb); In the other callsite, port->skb_handler is checked for NULL but not here, is it ok? > + if (md_state == MD_STATE_EXCEPTION && port_static->tx_ch != PORT_CH_MD_LOG_TX && > + port_static->tx_ch != PORT_CH_UART1_TX) > + return -ETXTBSY; Here "TXT" = "text" (it seems unrelated to TX path). > +#define MTK_MAX_QUEUE_NUM 16 > +#define MAX_RX_QUEUE_LENGTH 32 > +#define MAX_CTRL_QUEUE_LENGTH 16 MTK_QUEUES, RX_QUEUE_MAXLEN, CTRL_QUEUE_MAXLEN would be shorter and not lose any of the meaning. > +#define CLDMA_TXQ_MTU MTK_SKB_4K > + > +struct port_proxy { > + int port_number; > + struct t7xx_port_static *ports_shared; > + struct t7xx_port *ports_private; > + struct list_head rx_ch_ports[PORT_CH_ID_MASK]; An off-by-one error in the array sizing? -- i.