-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
octeon: Add Cavium Octeon driver support
- Loading branch information
1 parent
dc57832
commit 0075fac
Showing
4 changed files
with
535 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c | ||
index c6344edfa6f4..006fbbd4e7aa 100644 | ||
--- a/octeon/ethernet.c | ||
+++ b/octeon/ethernet.c | ||
@@ -128,6 +128,10 @@ static DECLARE_DELAYED_WORK(cvm_oct_rx_refill_work, cvm_oct_rx_refill_worker); | ||
extern int __cvmx_helper_set_phy_mode(int interface, int index); | ||
#endif | ||
|
||
+#if defined(CONFIG_NETMAP) || defined(CONFIG_NETMAP_MODULE) | ||
+#include <octeon_netmap.h> | ||
+#endif | ||
+ | ||
static void cvm_oct_rx_refill_worker(struct work_struct *work) | ||
{ | ||
/ | ||
@@ -1100,6 +1104,10 @@ static int cvm_oct_probe(struct platform_device *pdev) | ||
queue_delayed_work(cvm_oct_poll_queue, | ||
&priv->port_periodic_work, HZ); | ||
} | ||
+ | ||
+#ifdef CONFIG_NETMAP | ||
+ octeon_netmap_attach(priv); | ||
+#endif /* DEV_NETMAP */ | ||
} | ||
} | ||
|
||
@@ -1145,6 +1153,10 @@ static int cvm_oct_remove(struct platform_device *pdev) | ||
struct net_device *dev = cvm_oct_device[port]; | ||
struct octeon_ethernet *priv = netdev_priv(dev); | ||
|
||
+#ifdef CONFIG_NETMAP | ||
+ octeon_netmap_detach(priv); | ||
+#endif /* DEV_NETMAP */ | ||
+ | ||
cancel_delayed_work_sync(&priv->port_periodic_work); | ||
|
||
cvm_oct_tx_shutdown_dev(dev); |
Oops, something went wrong.