aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge.h
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-02-26 05:08:35 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-27 01:28:09 -0500
commitb0c2aadfa4d2194615ba8f5630be7ae686b9ed01 (patch)
tree4843831c1cf39df7aefb7fb5733753b9921805f2 /drivers/net/qlge/qlge.h
parent125844eaff0e9600c92a753995564fd93c807f3c (diff)
qlge: Prepare to add new device.
This organizes a few calls into a function table to enable adding new devices. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge.h')
-rw-r--r--drivers/net/qlge/qlge.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index 2103fe6ff3a5..7bf18c6d7bc0 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -28,7 +28,7 @@
28 } while (0) 28 } while (0)
29 29
30#define QLGE_VENDOR_ID 0x1077 30#define QLGE_VENDOR_ID 0x1077
31#define QLGE_DEVICE_ID 0x8012 31#define QLGE_DEVICE_ID_8012 0x8012
32 32
33#define MAX_CPUS 8 33#define MAX_CPUS 8
34#define MAX_TX_RINGS MAX_CPUS 34#define MAX_TX_RINGS MAX_CPUS
@@ -798,7 +798,7 @@ struct mbox_params {
798 int out_count; 798 int out_count;
799}; 799};
800 800
801struct flash_params { 801struct flash_params_8012 {
802 u8 dev_id_str[4]; 802 u8 dev_id_str[4];
803 __le16 size; 803 __le16 size;
804 __le16 csum; 804 __le16 csum;
@@ -808,6 +808,9 @@ struct flash_params {
808 __le16 res; 808 __le16 res;
809}; 809};
810 810
811union flash_params {
812 struct flash_params_8012 flash_params_8012;
813};
811 814
812/* 815/*
813 * doorbell space for the rx ring context 816 * doorbell space for the rx ring context
@@ -1367,6 +1370,12 @@ enum {
1367 CFG_DEFAULT_MAX_FRAME_SIZE = 0x00002580, 1370 CFG_DEFAULT_MAX_FRAME_SIZE = 0x00002580,
1368}; 1371};
1369 1372
1373struct nic_operations {
1374
1375 int (*get_flash) (struct ql_adapter *);
1376 int (*port_initialize) (struct ql_adapter *);
1377};
1378
1370/* 1379/*
1371 * The main Adapter structure definition. 1380 * The main Adapter structure definition.
1372 * This structure has all fields relevant to the hardware. 1381 * This structure has all fields relevant to the hardware.
@@ -1444,7 +1453,7 @@ struct ql_adapter {
1444 u32 port_init; 1453 u32 port_init;
1445 u32 link_status; 1454 u32 link_status;
1446 1455
1447 struct flash_params flash; 1456 union flash_params flash;
1448 1457
1449 struct net_device_stats stats; 1458 struct net_device_stats stats;
1450 struct workqueue_struct *q_workqueue; 1459 struct workqueue_struct *q_workqueue;
@@ -1452,6 +1461,8 @@ struct ql_adapter {
1452 struct delayed_work asic_reset_work; 1461 struct delayed_work asic_reset_work;
1453 struct delayed_work mpi_reset_work; 1462 struct delayed_work mpi_reset_work;
1454 struct delayed_work mpi_work; 1463 struct delayed_work mpi_work;
1464 struct nic_operations *nic_ops;
1465 u16 device_id;
1455}; 1466};
1456 1467
1457/* 1468/*