Commit afa00d3f authored by David S. Miller's avatar David S. Miller

Merge branch 'eean-iosm-fixes'

M Chetan Kumar says:

====================
net: wwan: iosm: fixes

This patch series contains IOSM Driver fixes. Below is the patch
series breakdown.

PATCH1:
* Correct the td buffer type casting & format specifier to fix lkp buildbot
warning.

PATCH2:
* Endianness type correction for nr_of_bytes. This field is exchanged
as part of host-device protocol communication.

PATCH3:
* Correct ul/dl data protocol mask bit to know which protocol capability
does device implement.

PATCH4:
* Calling unregister_netdevice() inside wwan del link is trying to
acquire the held lock in ndo_stop_cb(). Instead, queue net dev to
be unregistered later.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6b67d4d6 679505ba
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#define IOSM_CP_VERSION 0x0100UL #define IOSM_CP_VERSION 0x0100UL
/* DL dir Aggregation support mask */ /* DL dir Aggregation support mask */
#define DL_AGGR BIT(23) #define DL_AGGR BIT(9)
/* UL dir Aggregation support mask */ /* UL dir Aggregation support mask */
#define UL_AGGR BIT(22) #define UL_AGGR BIT(8)
/* UL flow credit support mask */ /* UL flow credit support mask */
#define UL_FLOW_CREDIT BIT(21) #define UL_FLOW_CREDIT BIT(21)
......
...@@ -320,7 +320,7 @@ static void ipc_mux_dl_fcth_decode(struct iosm_mux *ipc_mux, ...@@ -320,7 +320,7 @@ static void ipc_mux_dl_fcth_decode(struct iosm_mux *ipc_mux,
return; return;
} }
ul_credits = fct->vfl.nr_of_bytes; ul_credits = le32_to_cpu(fct->vfl.nr_of_bytes);
dev_dbg(ipc_mux->dev, "Flow_Credit:: if_id[%d] Old: %d Grants: %d", dev_dbg(ipc_mux->dev, "Flow_Credit:: if_id[%d] Old: %d Grants: %d",
if_id, ipc_mux->session[if_id].ul_flow_credits, ul_credits); if_id, ipc_mux->session[if_id].ul_flow_credits, ul_credits);
...@@ -586,7 +586,7 @@ static bool ipc_mux_lite_send_qlt(struct iosm_mux *ipc_mux) ...@@ -586,7 +586,7 @@ static bool ipc_mux_lite_send_qlt(struct iosm_mux *ipc_mux)
qlt->reserved[0] = 0; qlt->reserved[0] = 0;
qlt->reserved[1] = 0; qlt->reserved[1] = 0;
qlt->vfl.nr_of_bytes = session->ul_list.qlen; qlt->vfl.nr_of_bytes = cpu_to_le32(session->ul_list.qlen);
/* Add QLT to the transfer list. */ /* Add QLT to the transfer list. */
skb_queue_tail(&ipc_mux->channel->ul_list, skb_queue_tail(&ipc_mux->channel->ul_list,
......
...@@ -106,7 +106,7 @@ struct mux_lite_cmdh { ...@@ -106,7 +106,7 @@ struct mux_lite_cmdh {
* @nr_of_bytes: Number of bytes available to transmit in the queue. * @nr_of_bytes: Number of bytes available to transmit in the queue.
*/ */
struct mux_lite_vfl { struct mux_lite_vfl {
u32 nr_of_bytes; __le32 nr_of_bytes;
}; };
/** /**
......
...@@ -412,8 +412,8 @@ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol, ...@@ -412,8 +412,8 @@ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol,
} }
if (p_td->buffer.address != IPC_CB(skb)->mapping) { if (p_td->buffer.address != IPC_CB(skb)->mapping) {
dev_err(ipc_protocol->dev, "invalid buf=%p or skb=%p", dev_err(ipc_protocol->dev, "invalid buf=%llx or skb=%p",
(void *)p_td->buffer.address, skb->data); (unsigned long long)p_td->buffer.address, skb->data);
ipc_pcie_kfree_skb(ipc_protocol->pcie, skb); ipc_pcie_kfree_skb(ipc_protocol->pcie, skb);
skb = NULL; skb = NULL;
goto ret; goto ret;
......
...@@ -228,7 +228,7 @@ static void ipc_wwan_dellink(void *ctxt, struct net_device *dev, ...@@ -228,7 +228,7 @@ static void ipc_wwan_dellink(void *ctxt, struct net_device *dev,
RCU_INIT_POINTER(ipc_wwan->sub_netlist[if_id], NULL); RCU_INIT_POINTER(ipc_wwan->sub_netlist[if_id], NULL);
/* unregistering includes synchronize_net() */ /* unregistering includes synchronize_net() */
unregister_netdevice(dev); unregister_netdevice_queue(dev, head);
unlock: unlock:
mutex_unlock(&ipc_wwan->if_mutex); mutex_unlock(&ipc_wwan->if_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment