Thread (35 messages) 35 messages, 5 authors, 2022-01-13

Re: [PATCH net-next v3 03/12] net: wwan: t7xx: Add port proxy infrastructure

From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date: 2021-12-16 12:18:02
Also in: linux-wireless

On Mon, 6 Dec 2021, Ricardo Martinez wrote:
From: Haijun Liu <haijun.liu@mediatek.com>

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@mediatek.com>
Co-developed-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
+		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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help