aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-02-16 20:25:32 -0500
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:30 -0500
commitec977c5b473e29dbfdac8f2c7477eccc2142e3bc (patch)
treed944179a8c762c0430a676fe1843d3dc97c46e5b /drivers
parent4898c560103fb8075c10a8e9d70e0ca26873075e (diff)
Staging: Octeon: Reformat a bunch of comments.
Many of the comments didn't follow kerneldoc guidlines. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org To: netdev@vger.kernel.org To: gregkh@suse.de Patchwork: http://patchwork.linux-mips.org/patch/971/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/octeon/ethernet-mdio.c6
-rw-r--r--drivers/staging/octeon/ethernet-mem.c16
-rw-r--r--drivers/staging/octeon/ethernet-rx.c17
-rw-r--r--drivers/staging/octeon/ethernet-tx.c14
-rw-r--r--drivers/staging/octeon/ethernet-util.h13
-rw-r--r--drivers/staging/octeon/ethernet.c42
-rw-r--r--drivers/staging/octeon/octeon-ethernet.h7
7 files changed, 44 insertions, 71 deletions
diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 05a5cc0f43ed..7e0be8d00dc3 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -96,11 +96,11 @@ const struct ethtool_ops cvm_oct_ethtool_ops = {
96}; 96};
97 97
98/** 98/**
99 * IOCTL support for PHY control 99 * cvm_oct_ioctl - IOCTL support for PHY control
100 *
101 * @dev: Device to change 100 * @dev: Device to change
102 * @rq: the request 101 * @rq: the request
103 * @cmd: the command 102 * @cmd: the command
103 *
104 * Returns Zero on success 104 * Returns Zero on success
105 */ 105 */
106int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 106int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
@@ -153,7 +153,7 @@ static void cvm_oct_adjust_link(struct net_device *dev)
153 153
154 154
155/** 155/**
156 * Setup the PHY 156 * cvm_oct_phy_setup_device - setup the PHY
157 * 157 *
158 * @dev: Device to setup 158 * @dev: Device to setup
159 * 159 *
diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c
index 53ed2f7ffdfd..00cc91df6b46 100644
--- a/drivers/staging/octeon/ethernet-mem.c
+++ b/drivers/staging/octeon/ethernet-mem.c
@@ -34,11 +34,12 @@
34#include "cvmx-fpa.h" 34#include "cvmx-fpa.h"
35 35
36/** 36/**
37 * Fill the supplied hardware pool with skbuffs 37 * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs
38 *
39 * @pool: Pool to allocate an skbuff for 38 * @pool: Pool to allocate an skbuff for
40 * @size: Size of the buffer needed for the pool 39 * @size: Size of the buffer needed for the pool
41 * @elements: Number of buffers to allocate 40 * @elements: Number of buffers to allocate
41 *
42 * Returns the actual number of buffers allocated.
42 */ 43 */
43static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) 44static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
44{ 45{
@@ -62,8 +63,7 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
62} 63}
63 64
64/** 65/**
65 * Free the supplied hardware pool of skbuffs 66 * cvm_oct_free_hw_skbuff- free hardware pool skbuffs
66 *
67 * @pool: Pool to allocate an skbuff for 67 * @pool: Pool to allocate an skbuff for
68 * @size: Size of the buffer needed for the pool 68 * @size: Size of the buffer needed for the pool
69 * @elements: Number of buffers to allocate 69 * @elements: Number of buffers to allocate
@@ -91,11 +91,12 @@ static void cvm_oct_free_hw_skbuff(int pool, int size, int elements)
91} 91}
92 92
93/** 93/**
94 * This function fills a hardware pool with memory. 94 * cvm_oct_fill_hw_memory - fill a hardware pool with memory.
95 *
96 * @pool: Pool to populate 95 * @pool: Pool to populate
97 * @size: Size of each buffer in the pool 96 * @size: Size of each buffer in the pool
98 * @elements: Number of buffers to allocate 97 * @elements: Number of buffers to allocate
98 *
99 * Returns the actual number of buffers allocated.
99 */ 100 */
100static int cvm_oct_fill_hw_memory(int pool, int size, int elements) 101static int cvm_oct_fill_hw_memory(int pool, int size, int elements)
101{ 102{
@@ -129,8 +130,7 @@ static int cvm_oct_fill_hw_memory(int pool, int size, int elements)
129} 130}
130 131
131/** 132/**
132 * Free memory previously allocated with cvm_oct_fill_hw_memory 133 * cvm_oct_free_hw_memory - Free memory allocated by cvm_oct_fill_hw_memory
133 *
134 * @pool: FPA pool to free 134 * @pool: FPA pool to free
135 * @size: Size of each buffer in the pool 135 * @size: Size of each buffer in the pool
136 * @elements: Number of buffers that should be in the pool 136 * @elements: Number of buffers that should be in the pool
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index b2e6ab6a3349..cb38f9eb2cc0 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -124,8 +124,9 @@ static void cvm_oct_no_more_work(void)
124} 124}
125 125
126/** 126/**
127 * Interrupt handler. The interrupt occurs whenever the POW 127 * cvm_oct_do_interrupt - interrupt handler.
128 * has packets in our group. 128 *
129 * The interrupt occurs whenever the POW has packets in our group.
129 * 130 *
130 */ 131 */
131static irqreturn_t cvm_oct_do_interrupt(int cpl, void *dev_id) 132static irqreturn_t cvm_oct_do_interrupt(int cpl, void *dev_id)
@@ -138,10 +139,9 @@ static irqreturn_t cvm_oct_do_interrupt(int cpl, void *dev_id)
138} 139}
139 140
140/** 141/**
141 * This is called on receive errors, and determines if the packet 142 * cvm_oct_check_rcv_error - process receive errors
142 * can be dropped early-on in cvm_oct_tasklet_rx().
143 *
144 * @work: Work queue entry pointing to the packet. 143 * @work: Work queue entry pointing to the packet.
144 *
145 * Returns Non-zero if the packet can be dropped, zero otherwise. 145 * Returns Non-zero if the packet can be dropped, zero otherwise.
146 */ 146 */
147static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) 147static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
@@ -224,10 +224,11 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
224} 224}
225 225
226/** 226/**
227 * The NAPI poll function. 227 * cvm_oct_napi_poll - the NAPI poll function.
228 *
229 * @napi: The NAPI instance, or null if called from cvm_oct_poll_controller 228 * @napi: The NAPI instance, or null if called from cvm_oct_poll_controller
230 * @budget: Maximum number of packets to receive. 229 * @budget: Maximum number of packets to receive.
230 *
231 * Returns the number of packets processed.
231 */ 232 */
232static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) 233static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
233{ 234{
@@ -484,7 +485,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
484 485
485#ifdef CONFIG_NET_POLL_CONTROLLER 486#ifdef CONFIG_NET_POLL_CONTROLLER
486/** 487/**
487 * This is called when the kernel needs to manually poll the 488 * cvm_oct_poll_controller - poll for receive packets
488 * device. 489 * device.
489 * 490 *
490 * @dev: Device to poll. Unused 491 * @dev: Device to poll. Unused
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 5175247ce0a8..afc2b734d554 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -137,11 +137,11 @@ void cvm_oct_free_tx_skbs(struct net_device *dev)
137} 137}
138 138
139/** 139/**
140 * Packet transmit 140 * cvm_oct_xmit - transmit a packet
141 *
142 * @skb: Packet to send 141 * @skb: Packet to send
143 * @dev: Device info structure 142 * @dev: Device info structure
144 * Returns Always returns zero 143 *
144 * Returns Always returns NETDEV_TX_OK
145 */ 145 */
146int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev) 146int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
147{ 147{
@@ -510,10 +510,10 @@ skip_xmit:
510} 510}
511 511
512/** 512/**
513 * Packet transmit to the POW 513 * cvm_oct_xmit_pow - transmit a packet to the POW
514 *
515 * @skb: Packet to send 514 * @skb: Packet to send
516 * @dev: Device info structure 515 * @dev: Device info structure
516
517 * Returns Always returns zero 517 * Returns Always returns zero
518 */ 518 */
519int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) 519int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
@@ -661,9 +661,9 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
661} 661}
662 662
663/** 663/**
664 * This function frees all skb that are currently queued for TX. 664 * cvm_oct_tx_shutdown_dev - free all skb that are currently queued for TX.
665 *
666 * @dev: Device being shutdown 665 * @dev: Device being shutdown
666 *
667 */ 667 */
668void cvm_oct_tx_shutdown_dev(struct net_device *dev) 668void cvm_oct_tx_shutdown_dev(struct net_device *dev)
669{ 669{
diff --git a/drivers/staging/octeon/ethernet-util.h b/drivers/staging/octeon/ethernet-util.h
index 37b665918000..23467563fe57 100644
--- a/drivers/staging/octeon/ethernet-util.h
+++ b/drivers/staging/octeon/ethernet-util.h
@@ -30,10 +30,9 @@
30 } while (0) 30 } while (0)
31 31
32/** 32/**
33 * Given a packet data address, return a pointer to the 33 * cvm_oct_get_buffer_ptr - convert packet data address to pointer
34 * beginning of the packet buffer.
35 *
36 * @packet_ptr: Packet data hardware address 34 * @packet_ptr: Packet data hardware address
35 *
37 * Returns Packet buffer pointer 36 * Returns Packet buffer pointer
38 */ 37 */
39static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr) 38static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr)
@@ -43,9 +42,7 @@ static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr)
43} 42}
44 43
45/** 44/**
46 * Given an IPD/PKO port number, return the logical interface it is 45 * INTERFACE - convert IPD port to locgical interface
47 * on.
48 *
49 * @ipd_port: Port to check 46 * @ipd_port: Port to check
50 * 47 *
51 * Returns Logical interface 48 * Returns Logical interface
@@ -65,9 +62,7 @@ static inline int INTERFACE(int ipd_port)
65} 62}
66 63
67/** 64/**
68 * Given an IPD/PKO port number, return the port's index on a 65 * INDEX - convert IPD/PKO port number to the port's interface index
69 * logical interface.
70 *
71 * @ipd_port: Port to check 66 * @ipd_port: Port to check
72 * 67 *
73 * Returns Index into interface port list 68 * Returns Index into interface port list
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 5ee60ab0b236..45cb4c7d422d 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -176,9 +176,6 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
176 queue_delayed_work(cvm_oct_poll_queue, &priv->port_periodic_work, HZ); 176 queue_delayed_work(cvm_oct_poll_queue, &priv->port_periodic_work, HZ);
177 } 177 }
178 178
179/**
180 * Configure common hardware for all interfaces
181 */
182static __init void cvm_oct_configure_common_hw(void) 179static __init void cvm_oct_configure_common_hw(void)
183{ 180{
184 /* Setup the FPA */ 181 /* Setup the FPA */
@@ -198,10 +195,10 @@ static __init void cvm_oct_configure_common_hw(void)
198} 195}
199 196
200/** 197/**
201 * Free a work queue entry received in a intercept callback. 198 * cvm_oct_free_work- Free a work queue entry
199 *
200 * @work_queue_entry: Work queue entry to free
202 * 201 *
203 * @work_queue_entry:
204 * Work queue entry to free
205 * Returns Zero on success, Negative on failure. 202 * Returns Zero on success, Negative on failure.
206 */ 203 */
207int cvm_oct_free_work(void *work_queue_entry) 204int cvm_oct_free_work(void *work_queue_entry)
@@ -228,9 +225,9 @@ int cvm_oct_free_work(void *work_queue_entry)
228EXPORT_SYMBOL(cvm_oct_free_work); 225EXPORT_SYMBOL(cvm_oct_free_work);
229 226
230/** 227/**
231 * Get the low level ethernet statistics 228 * cvm_oct_common_get_stats - get the low level ethernet statistics
232 *
233 * @dev: Device to get the statistics from 229 * @dev: Device to get the statistics from
230 *
234 * Returns Pointer to the statistics 231 * Returns Pointer to the statistics
235 */ 232 */
236static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev) 233static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
@@ -274,8 +271,7 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
274} 271}
275 272
276/** 273/**
277 * Change the link MTU. Unimplemented 274 * cvm_oct_common_change_mtu - change the link MTU
278 *
279 * @dev: Device to change 275 * @dev: Device to change
280 * @new_mtu: The new MTU 276 * @new_mtu: The new MTU
281 * 277 *
@@ -339,8 +335,7 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
339} 335}
340 336
341/** 337/**
342 * Set the multicast list. Currently unimplemented. 338 * cvm_oct_common_set_multicast_list - set the multicast list
343 *
344 * @dev: Device to work on 339 * @dev: Device to work on
345 */ 340 */
346static void cvm_oct_common_set_multicast_list(struct net_device *dev) 341static void cvm_oct_common_set_multicast_list(struct net_device *dev)
@@ -395,10 +390,10 @@ static void cvm_oct_common_set_multicast_list(struct net_device *dev)
395} 390}
396 391
397/** 392/**
398 * Set the hardware MAC address for a device 393 * cvm_oct_common_set_mac_address - set the hardware MAC address for a device
399 * 394 * @dev: The device in question.
400 * @dev: Device to change the MAC address for 395 * @addr: Address structure to change it too.
401 * @addr: Address structure to change it too. MAC address is addr + 2. 396
402 * Returns Zero on success 397 * Returns Zero on success
403 */ 398 */
404static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr) 399static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr)
@@ -445,9 +440,9 @@ static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr)
445} 440}
446 441
447/** 442/**
448 * Per network device initialization 443 * cvm_oct_common_init - per network device initialization
449 *
450 * @dev: Device to initialize 444 * @dev: Device to initialize
445 *
451 * Returns Zero on success 446 * Returns Zero on success
452 */ 447 */
453int cvm_oct_common_init(struct net_device *dev) 448int cvm_oct_common_init(struct net_device *dev)
@@ -603,12 +598,6 @@ static const struct net_device_ops cvm_oct_pow_netdev_ops = {
603 598
604extern void octeon_mdiobus_force_mod_depencency(void); 599extern void octeon_mdiobus_force_mod_depencency(void);
605 600
606/**
607 * Module/ driver initialization. Creates the linux network
608 * devices.
609 *
610 * Returns Zero on success
611 */
612static int __init cvm_oct_init_module(void) 601static int __init cvm_oct_init_module(void)
613{ 602{
614 int num_interfaces; 603 int num_interfaces;
@@ -802,11 +791,6 @@ static int __init cvm_oct_init_module(void)
802 return 0; 791 return 0;
803} 792}
804 793
805/**
806 * Module / driver shutdown
807 *
808 * Returns Zero on success
809 */
810static void __exit cvm_oct_cleanup_module(void) 794static void __exit cvm_oct_cleanup_module(void)
811{ 795{
812 int port; 796 int port;
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index db2a3cc048e7..d58192563552 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -61,13 +61,6 @@ struct octeon_ethernet {
61 struct work_struct port_work; /* may be unused. */ 61 struct work_struct port_work; /* may be unused. */
62}; 62};
63 63
64/**
65 * Free a work queue entry received in a intercept callback.
66 *
67 * @work_queue_entry:
68 * Work queue entry to free
69 * Returns Zero on success, Negative on failure.
70 */
71int cvm_oct_free_work(void *work_queue_entry); 64int cvm_oct_free_work(void *work_queue_entry);
72 65
73extern int cvm_oct_rgmii_init(struct net_device *dev); 66extern int cvm_oct_rgmii_init(struct net_device *dev);