mvebu: drop linux 3.14 support
[openwrt/svn-archive/archive.git] / target / linux / netlogic / patches-3.14 / 002-xlr_net_fix.patch
1 Subject: [PATCH] staging: xlr_net: Replace obsolete nlm_cop2_{enable,restore} macros
2
3 Commit 64f6ebe63914 ("MIPS: Netlogic: rename nlm_cop2_save/restore")
4 replaced nlm_cop2_enable with nlm_cop2_enable_irqsave and
5 nlm_cop2_restore with nlm_cop2_disable_irqrestore but it did not
6 update the xlr_net driver to use the new macros resulting into build
7 problems like this:
8
9 drivers/staging/netlogic/xlr_net.c: In function 'send_to_rfr_fifo':
10 drivers/staging/netlogic/xlr_net.c:128:3: error: implicit declaration of
11 function 'nlm_cop2_enable' [-Werror=implicit-function-declaration]
12 mflags = nlm_cop2_enable();
13 ^
14 drivers/staging/netlogic/xlr_net.c:130:3: error: implicit declaration of
15 function 'nlm_cop2_restore' [-Werror=implicit-function-declaration]
16 nlm_cop2_restore(mflags);
17
18 Therefore rename these cases as well
19
20 Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 Cc: "David S. Miller" <davem@davemloft.net>
22 Cc: devel@driverdev.osuosl.org
23 Cc: linux-kernel@vger.kernel.org
24 Cc: Jayachandran C <jchandra@broadcom.com>
25 Cc: netdev@vger.kernel.org
26 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
27 ---
28 drivers/staging/netlogic/xlr_net.c | 8 ++++----
29 1 file changed, 4 insertions(+), 4 deletions(-)
30
31 diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
32 index 9bf407d6241a..469f75f0f818 100644
33 --- a/drivers/staging/netlogic/xlr_net.c
34 +++ b/drivers/staging/netlogic/xlr_net.c
35 @@ -125,9 +125,9 @@ static int send_to_rfr_fifo(struct xlr_net_priv *priv, void *addr)
36 msg.msg3 = 0;
37 stnid = priv->nd->rfr_station;
38 do {
39 - mflags = nlm_cop2_enable();
40 + mflags = nlm_cop2_enable_irqsave();
41 ret = nlm_fmn_send(1, 0, stnid, &msg);
42 - nlm_cop2_restore(mflags);
43 + nlm_cop2_disable_irqrestore(mflags);
44 if (ret == 0)
45 return 0;
46 } while (++num_try < 10000);
47 @@ -298,9 +298,9 @@ static netdev_tx_t xlr_net_start_xmit(struct sk_buff *skb,
48 u32 flags;
49
50 xlr_make_tx_desc(&msg, virt_to_phys(skb->data), skb);
51 - flags = nlm_cop2_enable();
52 + flags = nlm_cop2_enable_irqsave();
53 ret = nlm_fmn_send(2, 0, priv->nd->tx_stnid, &msg);
54 - nlm_cop2_restore(flags);
55 + nlm_cop2_disable_irqrestore(flags);
56 if (ret)
57 dev_kfree_skb_any(skb);
58 return NETDEV_TX_OK;
59 --
60 2.1.1
61
62
63