From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: [PATCH] net_dma: call dmaengine_get only if NET_DMA enabled
Date: Sat, 7 Feb 2009 01:02:49 +0900 [thread overview]
Message-ID: <1233936169-5243-1-git-send-email-anemo@mba.ocn.ne.jp> (raw)
The commit 649274d993212e7c23c0cb734572c2311c200872 ("net_dma:
acquire/release dma channels on ifup/ifdown") added unconditional call
of dmaengine_get() to net_dma. The API should be called only if
NET_DMA was enabled.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
net/core/dev.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 5379b0c..3d510d4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1087,10 +1087,12 @@ int dev_open(struct net_device *dev)
*/
dev->flags |= IFF_UP;
+#ifdef CONFIG_NET_DMA
/*
* Enable NET_DMA
*/
dmaengine_get();
+#endif
/*
* Initialize multicasting status
@@ -1169,10 +1171,12 @@ int dev_close(struct net_device *dev)
*/
call_netdevice_notifiers(NETDEV_DOWN, dev);
+#ifdef CONFIG_NET_DMA
/*
* Shutdown NET_DMA
*/
dmaengine_put();
+#endif
return 0;
}
--
1.5.6.3
next reply other threads:[~2009-02-06 16:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 16:02 Atsushi Nemoto [this message]
2009-02-06 21:15 ` Dan Williams
2009-02-06 22:09 ` David Miller
2009-02-06 22:52 ` Dan Williams
2009-02-07 3:29 ` David Miller
2009-02-07 5:55 ` David Miller
2009-02-07 6:03 ` Dan Williams
2009-02-07 6:05 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233936169-5243-1-git-send-email-anemo@mba.ocn.ne.jp \
--to=anemo@mba.ocn.ne.jp \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.sosnowski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®