diff options
-rw-r--r-- | drivers/staging/octeon/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet-proc.c | 144 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet-proc.h | 29 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet.c | 4 |
4 files changed, 0 insertions, 178 deletions
diff --git a/drivers/staging/octeon/Makefile b/drivers/staging/octeon/Makefile index c0a583cc2227..87447c102fa0 100644 --- a/drivers/staging/octeon/Makefile +++ b/drivers/staging/octeon/Makefile | |||
@@ -14,7 +14,6 @@ obj-${CONFIG_OCTEON_ETHERNET} := octeon-ethernet.o | |||
14 | octeon-ethernet-objs := ethernet.o | 14 | octeon-ethernet-objs := ethernet.o |
15 | octeon-ethernet-objs += ethernet-mdio.o | 15 | octeon-ethernet-objs += ethernet-mdio.o |
16 | octeon-ethernet-objs += ethernet-mem.o | 16 | octeon-ethernet-objs += ethernet-mem.o |
17 | octeon-ethernet-objs += ethernet-proc.o | ||
18 | octeon-ethernet-objs += ethernet-rgmii.o | 17 | octeon-ethernet-objs += ethernet-rgmii.o |
19 | octeon-ethernet-objs += ethernet-rx.o | 18 | octeon-ethernet-objs += ethernet-rx.o |
20 | octeon-ethernet-objs += ethernet-sgmii.o | 19 | octeon-ethernet-objs += ethernet-sgmii.o |
diff --git a/drivers/staging/octeon/ethernet-proc.c b/drivers/staging/octeon/ethernet-proc.c deleted file mode 100644 index 16308d484d3b..000000000000 --- a/drivers/staging/octeon/ethernet-proc.c +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | * Author: Cavium Networks | ||
3 | * | ||
4 | * Contact: support@caviumnetworks.com | ||
5 | * This file is part of the OCTEON SDK | ||
6 | * | ||
7 | * Copyright (c) 2003-2007 Cavium Networks | ||
8 | * | ||
9 | * This file is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License, Version 2, as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This file is distributed in the hope that it will be useful, but | ||
14 | * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty | ||
15 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or | ||
16 | * NONINFRINGEMENT. See the GNU General Public License for more | ||
17 | * details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this file; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | * or visit http://www.gnu.org/licenses/. | ||
23 | * | ||
24 | * This file may also be available under a different license from Cavium. | ||
25 | * Contact Cavium Networks for more information | ||
26 | **********************************************************************/ | ||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/seq_file.h> | ||
29 | #include <linux/proc_fs.h> | ||
30 | #include <net/dst.h> | ||
31 | |||
32 | #include <asm/octeon/octeon.h> | ||
33 | |||
34 | #include "octeon-ethernet.h" | ||
35 | #include "ethernet-defines.h" | ||
36 | |||
37 | #include "cvmx-helper.h" | ||
38 | #include "cvmx-pip.h" | ||
39 | |||
40 | /** | ||
41 | * User is reading /proc/octeon_ethernet_stats | ||
42 | * | ||
43 | * @m: | ||
44 | * @v: | ||
45 | * Returns | ||
46 | */ | ||
47 | static int cvm_oct_stats_show(struct seq_file *m, void *v) | ||
48 | { | ||
49 | struct octeon_ethernet *priv; | ||
50 | int port; | ||
51 | |||
52 | for (port = 0; port < TOTAL_NUMBER_OF_PORTS; port++) { | ||
53 | |||
54 | if (cvm_oct_device[port]) { | ||
55 | priv = netdev_priv(cvm_oct_device[port]); | ||
56 | |||
57 | seq_printf(m, "\nOcteon Port %d (%s)\n", port, | ||
58 | cvm_oct_device[port]->name); | ||
59 | seq_printf(m, | ||
60 | "rx_packets: %12lu\t" | ||
61 | "tx_packets: %12lu\n", | ||
62 | priv->stats.rx_packets, | ||
63 | priv->stats.tx_packets); | ||
64 | seq_printf(m, | ||
65 | "rx_bytes: %12lu\t" | ||
66 | "tx_bytes: %12lu\n", | ||
67 | priv->stats.rx_bytes, priv->stats.tx_bytes); | ||
68 | seq_printf(m, | ||
69 | "rx_errors: %12lu\t" | ||
70 | "tx_errors: %12lu\n", | ||
71 | priv->stats.rx_errors, | ||
72 | priv->stats.tx_errors); | ||
73 | seq_printf(m, | ||
74 | "rx_dropped: %12lu\t" | ||
75 | "tx_dropped: %12lu\n", | ||
76 | priv->stats.rx_dropped, | ||
77 | priv->stats.tx_dropped); | ||
78 | seq_printf(m, | ||
79 | "rx_length_errors: %12lu\t" | ||
80 | "tx_aborted_errors: %12lu\n", | ||
81 | priv->stats.rx_length_errors, | ||
82 | priv->stats.tx_aborted_errors); | ||
83 | seq_printf(m, | ||
84 | "rx_over_errors: %12lu\t" | ||
85 | "tx_carrier_errors: %12lu\n", | ||
86 | priv->stats.rx_over_errors, | ||
87 | priv->stats.tx_carrier_errors); | ||
88 | seq_printf(m, | ||
89 | "rx_crc_errors: %12lu\t" | ||
90 | "tx_fifo_errors: %12lu\n", | ||
91 | priv->stats.rx_crc_errors, | ||
92 | priv->stats.tx_fifo_errors); | ||
93 | seq_printf(m, | ||
94 | "rx_frame_errors: %12lu\t" | ||
95 | "tx_heartbeat_errors: %12lu\n", | ||
96 | priv->stats.rx_frame_errors, | ||
97 | priv->stats.tx_heartbeat_errors); | ||
98 | seq_printf(m, | ||
99 | "rx_fifo_errors: %12lu\t" | ||
100 | "tx_window_errors: %12lu\n", | ||
101 | priv->stats.rx_fifo_errors, | ||
102 | priv->stats.tx_window_errors); | ||
103 | seq_printf(m, | ||
104 | "rx_missed_errors: %12lu\t" | ||
105 | "multicast: %12lu\n", | ||
106 | priv->stats.rx_missed_errors, | ||
107 | priv->stats.multicast); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * /proc/octeon_ethernet_stats was openned. Use the single_open iterator | ||
116 | * | ||
117 | * @inode: | ||
118 | * @file: | ||
119 | * Returns | ||
120 | */ | ||
121 | static int cvm_oct_stats_open(struct inode *inode, struct file *file) | ||
122 | { | ||
123 | return single_open(file, cvm_oct_stats_show, NULL); | ||
124 | } | ||
125 | |||
126 | static const struct file_operations cvm_oct_stats_operations = { | ||
127 | .open = cvm_oct_stats_open, | ||
128 | .read = seq_read, | ||
129 | .llseek = seq_lseek, | ||
130 | .release = single_release, | ||
131 | }; | ||
132 | |||
133 | void cvm_oct_proc_initialize(void) | ||
134 | { | ||
135 | struct proc_dir_entry *entry = | ||
136 | create_proc_entry("octeon_ethernet_stats", 0, NULL); | ||
137 | if (entry) | ||
138 | entry->proc_fops = &cvm_oct_stats_operations; | ||
139 | } | ||
140 | |||
141 | void cvm_oct_proc_shutdown(void) | ||
142 | { | ||
143 | remove_proc_entry("octeon_ethernet_stats", NULL); | ||
144 | } | ||
diff --git a/drivers/staging/octeon/ethernet-proc.h b/drivers/staging/octeon/ethernet-proc.h deleted file mode 100644 index 82c7d9f78bc4..000000000000 --- a/drivers/staging/octeon/ethernet-proc.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /********************************************************************* | ||
2 | * Author: Cavium Networks | ||
3 | * | ||
4 | * Contact: support@caviumnetworks.com | ||
5 | * This file is part of the OCTEON SDK | ||
6 | * | ||
7 | * Copyright (c) 2003-2007 Cavium Networks | ||
8 | * | ||
9 | * This file is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License, Version 2, as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This file is distributed in the hope that it will be useful, but | ||
14 | * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty | ||
15 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or | ||
16 | * NONINFRINGEMENT. See the GNU General Public License for more | ||
17 | * details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this file; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | * or visit http://www.gnu.org/licenses/. | ||
23 | * | ||
24 | * This file may also be available under a different license from Cavium. | ||
25 | * Contact Cavium Networks for more information | ||
26 | *********************************************************************/ | ||
27 | |||
28 | void cvm_oct_proc_initialize(void); | ||
29 | void cvm_oct_proc_shutdown(void); | ||
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 45cb4c7d422d..02b63678811a 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c | |||
@@ -42,8 +42,6 @@ | |||
42 | #include "ethernet-tx.h" | 42 | #include "ethernet-tx.h" |
43 | #include "ethernet-mdio.h" | 43 | #include "ethernet-mdio.h" |
44 | #include "ethernet-util.h" | 44 | #include "ethernet-util.h" |
45 | #include "ethernet-proc.h" | ||
46 | |||
47 | 45 | ||
48 | #include "cvmx-pip.h" | 46 | #include "cvmx-pip.h" |
49 | #include "cvmx-pko.h" | 47 | #include "cvmx-pko.h" |
@@ -621,7 +619,6 @@ static int __init cvm_oct_init_module(void) | |||
621 | return -ENOMEM; | 619 | return -ENOMEM; |
622 | } | 620 | } |
623 | 621 | ||
624 | cvm_oct_proc_initialize(); | ||
625 | cvm_oct_configure_common_hw(); | 622 | cvm_oct_configure_common_hw(); |
626 | 623 | ||
627 | cvmx_helper_initialize_packet_io_global(); | 624 | cvmx_helper_initialize_packet_io_global(); |
@@ -828,7 +825,6 @@ static void __exit cvm_oct_cleanup_module(void) | |||
828 | destroy_workqueue(cvm_oct_poll_queue); | 825 | destroy_workqueue(cvm_oct_poll_queue); |
829 | 826 | ||
830 | cvmx_pko_shutdown(); | 827 | cvmx_pko_shutdown(); |
831 | cvm_oct_proc_shutdown(); | ||
832 | 828 | ||
833 | cvmx_ipd_free_ptr(); | 829 | cvmx_ipd_free_ptr(); |
834 | 830 | ||