diff options
author | Amit S. Kale <amitkale@netxen.com> | 2006-12-04 12:18:00 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-04 18:36:03 -0500 |
commit | 80922fbcb6f00127e91580e7565bb665947ac5d3 (patch) | |
tree | e7847240ca0813c217cb1d21dd94833c39845120 /drivers/net/netxen/netxen_nic_ethtool.c | |
parent | 59dc76a4e3bed66f5be474dcdc81cc39c7290cec (diff) |
[PATCH] NetXen: whitespace cleaup and more cleanup fixes
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
netxen_nic.h | 56 ++++++++++++++++++++--------------------------
netxen_nic_ethtool.c | 53 +++++++++++++++++++++-----------------------
netxen_nic_hdr.h | 6 ++---
netxen_nic_hw.c | 54 +++++++++++++++++++++------------------------
netxen_nic_hw.h | 10 ++++----
netxen_nic_init.c | 61 +++++++++++++++++++++++++--------------------------
netxen_nic_ioctl.h | 6 ++---
netxen_nic_isr.c | 48 +++++++++++++++++-----------------------
netxen_nic_main.c | 54 +++++++++++++++++----------------------------
netxen_nic_niu.c | 10 ++++----
10 files changed, 165 insertions(+), 193 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_ethtool.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_ethtool.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 9a914aeba5bc..c7fcbf345db9 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -1,25 +1,25 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2003 - 2006 NetXen, Inc. | 2 | * Copyright (C) 2003 - 2006 NetXen, Inc. |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 6 | * modify it under the terms of the GNU General Public License |
7 | * as published by the Free Software Foundation; either version 2 | 7 | * as published by the Free Software Foundation; either version 2 |
8 | * of the License, or (at your option) any later version. | 8 | * of the License, or (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, but | 10 | * This program is distributed in the hope that it will be useful, but |
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, | 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
18 | * MA 02111-1307, USA. | 18 | * MA 02111-1307, USA. |
19 | * | 19 | * |
20 | * The full GNU General Public License is included in this distribution | 20 | * The full GNU General Public License is included in this distribution |
21 | * in the file called LICENSE. | 21 | * in the file called LICENSE. |
22 | * | 22 | * |
23 | * Contact Information: | 23 | * Contact Information: |
24 | * info@netxen.com | 24 | * info@netxen.com |
25 | * NetXen, | 25 | * NetXen, |
@@ -118,7 +118,7 @@ netxen_nic_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo) | |||
118 | u32 fw_minor = 0; | 118 | u32 fw_minor = 0; |
119 | u32 fw_build = 0; | 119 | u32 fw_build = 0; |
120 | 120 | ||
121 | strncpy(drvinfo->driver, "netxen_nic", 32); | 121 | strncpy(drvinfo->driver, netxen_nic_driver_name, 32); |
122 | strncpy(drvinfo->version, NETXEN_NIC_LINUX_VERSIONID, 32); | 122 | strncpy(drvinfo->version, NETXEN_NIC_LINUX_VERSIONID, 32); |
123 | fw_major = readl(NETXEN_CRB_NORMALIZE(adapter, | 123 | fw_major = readl(NETXEN_CRB_NORMALIZE(adapter, |
124 | NETXEN_FW_VERSION_MAJOR)); | 124 | NETXEN_FW_VERSION_MAJOR)); |
@@ -210,7 +210,6 @@ netxen_nic_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
210 | printk(KERN_ERR "netxen-nic: Unsupported board model %d\n", | 210 | printk(KERN_ERR "netxen-nic: Unsupported board model %d\n", |
211 | (netxen_brdtype_t) boardinfo->board_type); | 211 | (netxen_brdtype_t) boardinfo->board_type); |
212 | return -EIO; | 212 | return -EIO; |
213 | |||
214 | } | 213 | } |
215 | 214 | ||
216 | return 0; | 215 | return 0; |
@@ -226,18 +225,18 @@ netxen_nic_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
226 | /* read which mode */ | 225 | /* read which mode */ |
227 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { | 226 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { |
228 | /* autonegotiation */ | 227 | /* autonegotiation */ |
229 | if (adapter->ops->phy_write | 228 | if (adapter->phy_write |
230 | && adapter->ops->phy_write(adapter, port->portnum, | 229 | && adapter->phy_write(adapter, port->portnum, |
231 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, | 230 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, |
232 | (__le32) ecmd->autoneg) != 0) | 231 | (__le32) ecmd->autoneg) != 0) |
233 | return -EIO; | 232 | return -EIO; |
234 | else | 233 | else |
235 | port->link_autoneg = ecmd->autoneg; | 234 | port->link_autoneg = ecmd->autoneg; |
236 | 235 | ||
237 | if (adapter->ops->phy_read | 236 | if (adapter->phy_read |
238 | && adapter->ops->phy_read(adapter, port->portnum, | 237 | && adapter->phy_read(adapter, port->portnum, |
239 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 238 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
240 | &status) != 0) | 239 | &status) != 0) |
241 | return -EIO; | 240 | return -EIO; |
242 | 241 | ||
243 | /* speed */ | 242 | /* speed */ |
@@ -257,10 +256,10 @@ netxen_nic_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
257 | netxen_clear_phy_duplex(status); | 256 | netxen_clear_phy_duplex(status); |
258 | if (ecmd->duplex == DUPLEX_FULL) | 257 | if (ecmd->duplex == DUPLEX_FULL) |
259 | netxen_set_phy_duplex(status); | 258 | netxen_set_phy_duplex(status); |
260 | if (adapter->ops->phy_write | 259 | if (adapter->phy_write |
261 | && adapter->ops->phy_write(adapter, port->portnum, | 260 | && adapter->phy_write(adapter, port->portnum, |
262 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 261 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
263 | *((int *)&status)) != 0) | 262 | *((int *)&status)) != 0) |
264 | return -EIO; | 263 | return -EIO; |
265 | else { | 264 | else { |
266 | port->link_speed = ecmd->speed; | 265 | port->link_speed = ecmd->speed; |
@@ -422,10 +421,10 @@ static u32 netxen_nic_get_link(struct net_device *dev) | |||
422 | 421 | ||
423 | /* read which mode */ | 422 | /* read which mode */ |
424 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { | 423 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { |
425 | if (adapter->ops->phy_read | 424 | if (adapter->phy_read |
426 | && adapter->ops->phy_read(adapter, port->portnum, | 425 | && adapter->phy_read(adapter, port->portnum, |
427 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 426 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
428 | &status) != 0) | 427 | &status) != 0) |
429 | return -EIO; | 428 | return -EIO; |
430 | else | 429 | else |
431 | return (netxen_get_phy_link(status)); | 430 | return (netxen_get_phy_link(status)); |
@@ -526,10 +525,10 @@ netxen_nic_set_pauseparam(struct net_device *dev, | |||
526 | *(u32 *) (&val)); | 525 | *(u32 *) (&val)); |
527 | /* set autoneg */ | 526 | /* set autoneg */ |
528 | autoneg = pause->autoneg; | 527 | autoneg = pause->autoneg; |
529 | if (adapter->ops->phy_write | 528 | if (adapter->phy_write |
530 | && adapter->ops->phy_write(adapter, port->portnum, | 529 | && adapter->phy_write(adapter, port->portnum, |
531 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, | 530 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, |
532 | (__le32) autoneg) != 0) | 531 | (__le32) autoneg) != 0) |
533 | return -EIO; | 532 | return -EIO; |
534 | else { | 533 | else { |
535 | port->link_autoneg = pause->autoneg; | 534 | port->link_autoneg = pause->autoneg; |