aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_init.c
diff options
context:
space:
mode:
authorAmit S. Kale <amitkale@netxen.com>2006-12-04 12:18:00 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-04 18:36:03 -0500
commit80922fbcb6f00127e91580e7565bb665947ac5d3 (patch)
treee7847240ca0813c217cb1d21dd94833c39845120 /drivers/net/netxen/netxen_nic_init.c
parent59dc76a4e3bed66f5be474dcdc81cc39c7290cec (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_init.c')
-rw-r--r--drivers/net/netxen/netxen_nic_init.c61
1 files changed, 30 insertions, 31 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 0dca029bc3e5..deac1a3ae275 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.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,
@@ -212,37 +212,36 @@ void netxen_initialize_adapter_hw(struct netxen_adapter *adapter)
212 212
213void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) 213void netxen_initialize_adapter_ops(struct netxen_adapter *adapter)
214{ 214{
215 struct netxen_drvops *ops = adapter->ops;
216 switch (adapter->ahw.board_type) { 215 switch (adapter->ahw.board_type) {
217 case NETXEN_NIC_GBE: 216 case NETXEN_NIC_GBE:
218 ops->enable_phy_interrupts = 217 adapter->enable_phy_interrupts =
219 netxen_niu_gbe_enable_phy_interrupts; 218 netxen_niu_gbe_enable_phy_interrupts;
220 ops->disable_phy_interrupts = 219 adapter->disable_phy_interrupts =
221 netxen_niu_gbe_disable_phy_interrupts; 220 netxen_niu_gbe_disable_phy_interrupts;
222 ops->handle_phy_intr = netxen_nic_gbe_handle_phy_intr; 221 adapter->handle_phy_intr = netxen_nic_gbe_handle_phy_intr;
223 ops->macaddr_set = netxen_niu_macaddr_set; 222 adapter->macaddr_set = netxen_niu_macaddr_set;
224 ops->set_mtu = netxen_nic_set_mtu_gb; 223 adapter->set_mtu = netxen_nic_set_mtu_gb;
225 ops->set_promisc = netxen_niu_set_promiscuous_mode; 224 adapter->set_promisc = netxen_niu_set_promiscuous_mode;
226 ops->unset_promisc = netxen_niu_set_promiscuous_mode; 225 adapter->unset_promisc = netxen_niu_set_promiscuous_mode;
227 ops->phy_read = netxen_niu_gbe_phy_read; 226 adapter->phy_read = netxen_niu_gbe_phy_read;
228 ops->phy_write = netxen_niu_gbe_phy_write; 227 adapter->phy_write = netxen_niu_gbe_phy_write;
229 ops->init_port = netxen_niu_gbe_init_port; 228 adapter->init_port = netxen_niu_gbe_init_port;
230 ops->init_niu = netxen_nic_init_niu_gb; 229 adapter->init_niu = netxen_nic_init_niu_gb;
231 ops->stop_port = netxen_niu_disable_gbe_port; 230 adapter->stop_port = netxen_niu_disable_gbe_port;
232 break; 231 break;
233 232
234 case NETXEN_NIC_XGBE: 233 case NETXEN_NIC_XGBE:
235 ops->enable_phy_interrupts = 234 adapter->enable_phy_interrupts =
236 netxen_niu_xgbe_enable_phy_interrupts; 235 netxen_niu_xgbe_enable_phy_interrupts;
237 ops->disable_phy_interrupts = 236 adapter->disable_phy_interrupts =
238 netxen_niu_xgbe_disable_phy_interrupts; 237 netxen_niu_xgbe_disable_phy_interrupts;
239 ops->handle_phy_intr = netxen_nic_xgbe_handle_phy_intr; 238 adapter->handle_phy_intr = netxen_nic_xgbe_handle_phy_intr;
240 ops->macaddr_set = netxen_niu_xg_macaddr_set; 239 adapter->macaddr_set = netxen_niu_xg_macaddr_set;
241 ops->set_mtu = netxen_nic_set_mtu_xgb; 240 adapter->set_mtu = netxen_nic_set_mtu_xgb;
242 ops->init_port = netxen_niu_xg_init_port; 241 adapter->init_port = netxen_niu_xg_init_port;
243 ops->set_promisc = netxen_niu_xg_set_promiscuous_mode; 242 adapter->set_promisc = netxen_niu_xg_set_promiscuous_mode;
244 ops->unset_promisc = netxen_niu_xg_set_promiscuous_mode; 243 adapter->unset_promisc = netxen_niu_xg_set_promiscuous_mode;
245 ops->stop_port = netxen_niu_disable_xg_port; 244 adapter->stop_port = netxen_niu_disable_xg_port;
246 break; 245 break;
247 246
248 default: 247 default:
@@ -383,8 +382,8 @@ int netxen_rom_wip_poll(struct netxen_adapter *adapter)
383 return 0; 382 return 0;
384} 383}
385 384
386static inline int do_rom_fast_write(struct netxen_adapter *adapter, 385static inline int do_rom_fast_write(struct netxen_adapter *adapter, int addr,
387 int addr, int data) 386 int data)
388{ 387{
389 if (netxen_rom_wren(adapter)) { 388 if (netxen_rom_wren(adapter)) {
390 return -1; 389 return -1;
@@ -734,8 +733,8 @@ void netxen_watchdog_task(unsigned long v)
734 netif_wake_queue(netdev); 733 netif_wake_queue(netdev);
735 } 734 }
736 735
737 if (adapter->ops->handle_phy_intr) 736 if (adapter->handle_phy_intr)
738 adapter->ops->handle_phy_intr(adapter); 737 adapter->handle_phy_intr(adapter);
739 mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); 738 mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);
740} 739}
741 740