Loading drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +10 −4 Original line number Diff line number Diff line Loading @@ -1140,6 +1140,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) int ret = 0; bool qmap_check; struct ipa3_wwan_private *wwan_ptr = netdev_priv(dev); unsigned long flags; if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) { IPAWANERR_RL("IPA embedded data on APQ platform\n"); Loading Loading @@ -1184,6 +1185,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) } send: spin_lock_irqsave(&wwan_ptr->lock, flags); /* IPA_RM checking start */ if (ipa3_ctx->use_ipa_pm) { /* activate the modem pm for clock scaling */ Loading @@ -1195,6 +1197,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) } if (ret == -EINPROGRESS) { netif_stop_queue(dev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); return NETDEV_TX_BUSY; } if (ret) { Loading @@ -1202,6 +1205,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) dev->name, ret); dev_kfree_skb_any(skb); dev->stats.tx_dropped++; spin_unlock_irqrestore(&wwan_ptr->lock, flags); return -EFAULT; } /* IPA_RM checking end */ Loading Loading @@ -1230,6 +1234,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) IPA_RM_RESOURCE_WWAN_0_PROD); } } spin_unlock_irqrestore(&wwan_ptr->lock, flags); return ret; } Loading Loading @@ -2728,6 +2733,7 @@ static int rmnet_ipa_ap_suspend(struct device *dev) struct net_device *netdev = IPA_NETDEV(); struct ipa3_wwan_private *wwan_ptr; int ret; unsigned long flags; IPAWANDBG("Enter...\n"); Loading @@ -2737,26 +2743,26 @@ static int rmnet_ipa_ap_suspend(struct device *dev) goto bail; } netif_tx_lock_bh(netdev); wwan_ptr = netdev_priv(netdev); if (wwan_ptr == NULL) { IPAWANERR("wwan_ptr is NULL.\n"); ret = 0; netif_tx_unlock_bh(netdev); goto bail; } spin_lock_irqsave(&wwan_ptr->lock, flags); /* Do not allow A7 to suspend in case there are outstanding packets */ if (atomic_read(&wwan_ptr->outstanding_pkts) != 0) { IPAWANDBG("Outstanding packets, postponing AP suspend.\n"); ret = -EAGAIN; netif_tx_unlock_bh(netdev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); goto bail; } /* Make sure that there is no Tx operation ongoing */ netif_stop_queue(netdev); netif_tx_unlock_bh(netdev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); if (ipa3_ctx->use_ipa_pm) ipa_pm_deactivate_sync(rmnet_ipa3_ctx->pm_hdl); else Loading Loading
drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +10 −4 Original line number Diff line number Diff line Loading @@ -1140,6 +1140,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) int ret = 0; bool qmap_check; struct ipa3_wwan_private *wwan_ptr = netdev_priv(dev); unsigned long flags; if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) { IPAWANERR_RL("IPA embedded data on APQ platform\n"); Loading Loading @@ -1184,6 +1185,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) } send: spin_lock_irqsave(&wwan_ptr->lock, flags); /* IPA_RM checking start */ if (ipa3_ctx->use_ipa_pm) { /* activate the modem pm for clock scaling */ Loading @@ -1195,6 +1197,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) } if (ret == -EINPROGRESS) { netif_stop_queue(dev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); return NETDEV_TX_BUSY; } if (ret) { Loading @@ -1202,6 +1205,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) dev->name, ret); dev_kfree_skb_any(skb); dev->stats.tx_dropped++; spin_unlock_irqrestore(&wwan_ptr->lock, flags); return -EFAULT; } /* IPA_RM checking end */ Loading Loading @@ -1230,6 +1234,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev) IPA_RM_RESOURCE_WWAN_0_PROD); } } spin_unlock_irqrestore(&wwan_ptr->lock, flags); return ret; } Loading Loading @@ -2728,6 +2733,7 @@ static int rmnet_ipa_ap_suspend(struct device *dev) struct net_device *netdev = IPA_NETDEV(); struct ipa3_wwan_private *wwan_ptr; int ret; unsigned long flags; IPAWANDBG("Enter...\n"); Loading @@ -2737,26 +2743,26 @@ static int rmnet_ipa_ap_suspend(struct device *dev) goto bail; } netif_tx_lock_bh(netdev); wwan_ptr = netdev_priv(netdev); if (wwan_ptr == NULL) { IPAWANERR("wwan_ptr is NULL.\n"); ret = 0; netif_tx_unlock_bh(netdev); goto bail; } spin_lock_irqsave(&wwan_ptr->lock, flags); /* Do not allow A7 to suspend in case there are outstanding packets */ if (atomic_read(&wwan_ptr->outstanding_pkts) != 0) { IPAWANDBG("Outstanding packets, postponing AP suspend.\n"); ret = -EAGAIN; netif_tx_unlock_bh(netdev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); goto bail; } /* Make sure that there is no Tx operation ongoing */ netif_stop_queue(netdev); netif_tx_unlock_bh(netdev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); if (ipa3_ctx->use_ipa_pm) ipa_pm_deactivate_sync(rmnet_ipa3_ctx->pm_hdl); else Loading