Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octeon: Add Cavium Octeon driver support #731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LINUX/configure
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ subsys enable ptnetmap

# available drivers
driver_avail="r8169.c virtio_net.c forcedeth.c veth.c \
e1000 e1000e igb ixgbe ixgbevf i40e vmxnet3 mlx5"
e1000 e1000e igb ixgbe ixgbevf i40e vmxnet3 mlx5 octeon"
# enabled drivers (bitfield)
driver=
drv()
Expand Down
3 changes: 3 additions & 0 deletions LINUX/default-config.mak.in_
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,6 @@ virtio_net.c@force := 1
endef

$(foreach d,$(filter virtio_net.c,$(E_DRIVERS)),$(eval $(call virtio_net)))

octeon@src := cp -Rp @KSRC@/source/drivers/staging/octeon octeon
octeon@conf := CONFIG_OCTEON_ETHERNET
37 changes: 37 additions & 0 deletions LINUX/final-patches/vanilla--octeon--40406--99999
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);
Loading