Staging: Clean up octeon Ethernet some.
Subsystems (4)
cover Staging: Clean up octeon Ethernet some.
These two patches clean up some comments and get rid of the code that creates a non-standard file in /proc
As with the previous octeon_ethernet patches, these can probably go via Ralf's linux-mips.org tree.
I will reply with the two patches.
David Daney (2):
Staging: Octeon: Reformat a bunch of comments.
Staging: Octeon: Remove /proc/octeon_ethernet_stats
drivers/staging/octeon/Makefile | 1 - drivers/staging/octeon/ethernet-mdio.c | 6 +- drivers/staging/octeon/ethernet-mem.c | 16 ++-- drivers/staging/octeon/ethernet-proc.c | 144 ------------------------------ drivers/staging/octeon/ethernet-proc.h | 29 ------ drivers/staging/octeon/ethernet-rx.c | 17 ++-- drivers/staging/octeon/ethernet-tx.c | 14 ++-- drivers/staging/octeon/ethernet-util.h | 13 +-- drivers/staging/octeon/ethernet.c | 46 +++------- drivers/staging/octeon/octeon-ethernet.h | 7 -- 10 files changed, 44 insertions(+), 249 deletions(-) delete mode 100644 drivers/staging/octeon/ethernet-proc.c delete mode 100644 drivers/staging/octeon/ethernet-proc.h
PATCH 1/2 Staging: Octeon: Reformat a bunch of comments.
Many of the comments didn't follow kerneldoc guidlines.
--- drivers/staging/octeon/ethernet-mdio.c | 6 ++-- drivers/staging/octeon/ethernet-mem.c | 16 +++++----- drivers/staging/octeon/ethernet-rx.c | 17 ++++++----- drivers/staging/octeon/ethernet-tx.c | 14 +++++----- drivers/staging/octeon/ethernet-util.h | 13 +++------ drivers/staging/octeon/ethernet.c | 42 +++++++++-------------------- drivers/staging/octeon/octeon-ethernet.h | 7 ----- 7 files changed, 44 insertions(+), 71 deletions(-)
drivers/staging/octeon/ethernet-mdio.c +3 -3
@@ -96,11 +96,11 @@ const struct ethtool_ops cvm_oct_ethtool_ops = { };/** -* IOCTL support for PHY control -* +* cvm_oct_ioctl - IOCTL support for PHY control * @dev: Device to change * @rq: the request * @cmd: the command +* * Returns Zero on success */ int 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)/** -* Setup the PHY +* cvm_oct_phy_setup_device - setup the PHY * * @dev: Device to setup *
drivers/staging/octeon/ethernet-mem.c +8 -8
@@ -34,11 +34,12 @@#include "cvmx-fpa.h" /** -* Fill the supplied hardware pool with skbuffs -* +* cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs * @pool: Pool to allocate an skbuff for * @size: Size of the buffer needed for the pool * @elements: Number of buffers to allocate +* +* Returns the actual number of buffers allocated. */ static int cvm_oct_fill_hw_skbuff (int pool,int size,int elements) {
@@ -62,8 +63,7 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) }/** -* Free the supplied hardware pool of skbuffs -* +* cvm_oct_free_hw_skbuff- free hardware pool skbuffs * @pool: Pool to allocate an skbuff for * @size: Size of the buffer needed for the pool * @elements: Number of buffers to allocate
@@ -91,11 +91,12 @@ static void cvm_oct_free_hw_skbuff(int pool, int size, int elements) }/** -* This function fills a hardware pool with memory. -* +* cvm_oct_fill_hw_memory - fill a hardware pool with memory. * @pool: Pool to populate * @size: Size of each buffer in the pool * @elements: Number of buffers to allocate +* +* Returns the actual number of buffers allocated. */ static int cvm_oct_fill_hw_memory (int pool,int size,int elements) {
@@ -129,8 +130,7 @@ static int cvm_oct_fill_hw_memory(int pool, int size, int elements) }/** -* Free memory previously allocated with cvm_oct_fill_hw_memory -* +* cvm_oct_free_hw_memory - Free memory allocated by cvm_oct_fill_hw_memory * @pool: FPA pool to free * @size: Size of each buffer in the pool * @elements: Number of buffers that should be in the pool
drivers/staging/octeon/ethernet-rx.c +9 -8
@@ -124,8 +124,9 @@ static void cvm_oct_no_more_work(void) }/** -* Interrupt handler. The interrupt occurs whenever the POW -* has packets in our group. +* cvm_oct_do_interrupt - interrupt handler. +* +* The interrupt occurs whenever the POW has packets in our group. * */ static 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) }/** -* This is called on receive errors, and determines if the packet -* can be dropped early-on in cvm_oct_tasklet_rx(). -* +* cvm_oct_check_rcv_error - process receive errors * @work: Work queue entry pointing to the packet. +* * Returns Non-zero if the packet can be dropped, zero otherwise. */ static 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) }/** -* The NAPI poll function. -* +* cvm_oct_napi_poll - the NAPI poll function. * @napi: The NAPI instance, or null if called from cvm_oct_poll_controller * @budget: Maximum number of packets to receive. +* +* Returns the number of packets processed. */ static int cvm_oct_napi_poll (struct napi_struct *napi,int budget) {
@@ -484,7 +485,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)#ifdef CONFIG_NET_POLL_CONTROLLER /** -* This is called when the kernel needs to manually poll the +* cvm_oct_poll_controller - poll for receive packets * device. * * @dev: Device to poll. Unused
drivers/staging/octeon/ethernet-tx.c +7 -7
@@ -137,11 +137,11 @@ void cvm_oct_free_tx_skbs(struct net_device *dev) }/** -* Packet transmit -* +* cvm_oct_xmit - transmit a packet * @skb: Packet to send * @dev: Device info structure -* Returns Always returns zero +* +* Returns Always returns NETDEV_TX_OK */ int cvm_oct_xmit (struct sk_buff *skb,struct net_device *dev) {
@@ -510,10 +510,10 @@ skip_xmit: }/** -* Packet transmit to the POW -* +* cvm_oct_xmit_pow - transmit a packet to the POW * @skb: Packet to send * @dev: Device info structure +* Returns Always returns zero */ int 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) }/** -* This function frees all skb that are currently queued for TX. -* +* cvm_oct_tx_shutdown_dev - free all skb that are currently queued for TX. * @dev: Device being shutdown +* */ void cvm_oct_tx_shutdown_dev (struct net_device *dev) {
drivers/staging/octeon/ethernet-util.h +4 -9
@@ -30,10 +30,9 @@ }while (0 )/** -* Given a packet data address, return a pointer to the -* beginning of the packet buffer. -* +* cvm_oct_get_buffer_ptr - convert packet data address to pointer * @packet_ptr: Packet data hardware address +* * Returns Packet buffer pointer */ static 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) }/** -* Given an IPD/PKO port number, return the logical interface it is -* on. -* +* INTERFACE - convert IPD port to locgical interface * @ipd_port: Port to check * * Returns Logical interface
@@ -65,9 +62,7 @@ static inline int INTERFACE(int ipd_port) }/** -* Given an IPD/PKO port number, return the port's index on a -* logical interface. -* +* INDEX - convert IPD/PKO port number to the port's interface index * @ipd_port: Port to check * * Returns Index into interface port list
drivers/staging/octeon/ethernet.c +13 -29
99 lines not on this page · raw message
drivers/staging/octeon/octeon-ethernet.h +0 -7
@@ -61,13 +61,6 @@ struct octeon_ethernet {struct work_struct port_work;/* may be unused. */ }; -/** -* Free a work queue entry received in a intercept callback. -* -* @work_queue_entry: -* Work queue entry to free -* Returns Zero on success, Negative on failure. -*/ int cvm_oct_free_work (void *work_queue_entry);extern int cvm_oct_rgmii_init (struct net_device *dev);
Signature · 1 line
1.6.6
Re: [PATCH 1/2] Staging: Octeon: Reformat a bunch of comments.
Thanks folks, queued for 2.6.23.
Ralf
PATCH 2/2 Staging: Octeon: Remove /proc/octeon_ethernet_stats
In reply to David DaneyThis file shouldn't be in /proc, so we remove it.
--- drivers/staging/octeon/Makefile | 1 - drivers/staging/octeon/ethernet-proc.c | 144 -------------------------------- drivers/staging/octeon/ethernet-proc.h | 29 ------- drivers/staging/octeon/ethernet.c | 4 - 4 files changed, 0 insertions(+), 178 deletions(-) delete mode 100644 drivers/staging/octeon/ethernet-proc.c delete mode 100644 drivers/staging/octeon/ethernet-proc.h
drivers/staging/octeon/Makefile +0 -1
@@ -14,7 +14,6 @@ obj-${CONFIG_OCTEON_ETHERNET} := octeon-ethernet.o octeon-ethernet-objs := ethernet.o octeon-ethernet-objs += ethernet-mdio.o octeon-ethernet-objs += ethernet-mem.o -octeon-ethernet-objs += ethernet-proc.o octeon-ethernet-objs += ethernet-rgmii.o octeon-ethernet-objs += ethernet-rx.o octeon-ethernet-objs += ethernet-sgmii.o
drivers/staging/octeon/ethernet-proc.c deleted +0 -144
144 lines not on this page · raw message
drivers/staging/octeon/ethernet-proc.h deleted +0 -29
@@ -1,29 +0,0 @@ -/********************************************************************* -* Author: Cavium Networks -* -* Contact: [email protected] -* This file is part of the OCTEON SDK -* -* Copyright (c) 2003-2007 Cavium Networks -* -* This file is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License, Version 2, as -* published by the Free Software Foundation. -* -* This file is distributed in the hope that it will be useful, but -* AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty -* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or -* NONINFRINGEMENT. See the GNU General Public License for more -* details. -* -* You should have received a copy of the GNU General Public License -* along with this file; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* or visit http://www.gnu.org/licenses/. -* -* This file may also be available under a different license from Cavium. -* Contact Cavium Networks for more information -*********************************************************************/ - -void cvm_oct_proc_initialize (void ); -void cvm_oct_proc_shutdown (void );
drivers/staging/octeon/ethernet.c +0 -4
@@ -42,8 +42,6 @@#include "ethernet-tx.h" #include "ethernet-mdio.h" #include "ethernet-util.h" -#include "ethernet-proc.h" -#include "cvmx-pip.h" #include "cvmx-pko.h"
@@ -621,7 +619,6 @@ static int __init cvm_oct_init_module(void)return -ENOMEM ; } -cvm_oct_proc_initialize ();cvm_oct_configure_common_hw ();cvmx_helper_initialize_packet_io_global ();
@@ -828,7 +825,6 @@ static void __exit cvm_oct_cleanup_module(void)destroy_workqueue (cvm_oct_poll_queue);cvmx_pko_shutdown (); -cvm_oct_proc_shutdown ();cvmx_ipd_free_ptr ();
Signature · 1 line
1.6.6
Re: [PATCH 2/2] Staging: Octeon: Remove /proc/octeon_ethernet_stats
Thanks folks, queued for 2.6.23.
Ralf
Quoted 5 lines · David Daney
These two patches clean up some comments and get rid of the code that creates a non-standard file in /proc
As with the previous
octeon_ethernetpatches, these can probably go via Ralf's linux-mips.org tree.
Going through Ralf's tree is fine for me.
thanks,
greg k-h