diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 11:19:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 11:19:33 -0400 |
commit | df3d80f5a5c74168be42788364d13cf6c83c7b9c (patch) | |
tree | 892a964c2fd28d028f2fb7471e8543d3f4006a58 /drivers/message/fusion/mptlan.c | |
parent | 3d06f7a5f74a813cee817c4b30b5e6f0398da0be (diff) | |
parent | c8e91b0a8fc8493e3bf3efcb3c8f866e9453cf1c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (207 commits)
[SCSI] gdth: fix CONFIG_ISA build failure
[SCSI] esp_scsi: remove __dev{init,exit}
[SCSI] gdth: !use_sg cleanup and use of scsi accessors
[SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2
[SCSI] gdth: Setup proper per-command private data
[SCSI] gdth: Remove gdth_ctr_tab[]
[SCSI] gdth: switch to modern scsi host registration
[SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes
[SCSI] gdth: clean up host private data
[SCSI] gdth: Remove virt hosts
[SCSI] gdth: Reorder scsi_host_template intitializers
[SCSI] gdth: kill gdth_{read,write}[bwl] wrappers
[SCSI] gdth: Remove 2.4.x support, in-kernel changelog
[SCSI] gdth: split out pci probing
[SCSI] gdth: split out eisa probing
[SCSI] gdth: split out isa probing
gdth: Make one abuse of scsi_cmnd less obvious
[SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation
[SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution
[SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
...
Diffstat (limited to 'drivers/message/fusion/mptlan.c')
-rw-r--r-- | drivers/message/fusion/mptlan.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index 3da4c37846ec..7950fc678ed1 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/message/fusion/mptlan.c | 2 | * linux/drivers/message/fusion/mptlan.c |
3 | * IP Over Fibre Channel device driver. | 3 | * IP Over Fibre Channel device driver. |
4 | * For use with LSI Logic Fibre Channel PCI chip/adapters | 4 | * For use with LSI Fibre Channel PCI chip/adapters |
5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 5 | * running LSI Fusion MPT (Message Passing Technology) firmware. |
6 | * | 6 | * |
7 | * Copyright (c) 2000-2007 LSI Logic Corporation | 7 | * Copyright (c) 2000-2007 LSI Corporation |
8 | * (mailto:DL-MPTFusionLinux@lsi.com) | 8 | * (mailto:DL-MPTFusionLinux@lsi.com) |
9 | * | 9 | * |
10 | */ | 10 | */ |
@@ -154,7 +154,7 @@ static unsigned short mpt_lan_type_trans(struct sk_buff *skb, | |||
154 | /* | 154 | /* |
155 | * Fusion MPT LAN private data | 155 | * Fusion MPT LAN private data |
156 | */ | 156 | */ |
157 | static int LanCtx = -1; | 157 | static u8 LanCtx = MPT_MAX_PROTOCOL_DRIVERS; |
158 | 158 | ||
159 | static u32 max_buckets_out = 127; | 159 | static u32 max_buckets_out = 127; |
160 | static u32 tx_max_out_p = 127 - 16; | 160 | static u32 tx_max_out_p = 127 - 16; |
@@ -165,12 +165,6 @@ DEFINE_RWLOCK(bad_naa_lock); | |||
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 167 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
168 | /* | ||
169 | * Fusion MPT LAN external data | ||
170 | */ | ||
171 | extern int mpt_lan_index; | ||
172 | |||
173 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | ||
174 | /** | 168 | /** |
175 | * lan_reply - Handle all data sent from the hardware. | 169 | * lan_reply - Handle all data sent from the hardware. |
176 | * @ioc: Pointer to MPT_ADAPTER structure | 170 | * @ioc: Pointer to MPT_ADAPTER structure |
@@ -1230,6 +1224,8 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv) | |||
1230 | } | 1224 | } |
1231 | pRecvReq = (LANReceivePostRequest_t *) mf; | 1225 | pRecvReq = (LANReceivePostRequest_t *) mf; |
1232 | 1226 | ||
1227 | i = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); | ||
1228 | mpt_dev->RequestNB[i] = 0; | ||
1233 | count = buckets; | 1229 | count = buckets; |
1234 | if (count > max) | 1230 | if (count > max) |
1235 | count = max; | 1231 | count = max; |
@@ -1351,10 +1347,11 @@ mpt_lan_post_receive_buckets_work(struct work_struct *work) | |||
1351 | static struct net_device * | 1347 | static struct net_device * |
1352 | mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) | 1348 | mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) |
1353 | { | 1349 | { |
1354 | struct net_device *dev = alloc_fcdev(sizeof(struct mpt_lan_priv)); | 1350 | struct net_device *dev; |
1355 | struct mpt_lan_priv *priv = NULL; | 1351 | struct mpt_lan_priv *priv; |
1356 | u8 HWaddr[FC_ALEN], *a; | 1352 | u8 HWaddr[FC_ALEN], *a; |
1357 | 1353 | ||
1354 | dev = alloc_fcdev(sizeof(struct mpt_lan_priv)); | ||
1358 | if (!dev) | 1355 | if (!dev) |
1359 | return NULL; | 1356 | return NULL; |
1360 | 1357 | ||
@@ -1366,7 +1363,6 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) | |||
1366 | priv->mpt_dev = mpt_dev; | 1363 | priv->mpt_dev = mpt_dev; |
1367 | priv->pnum = pnum; | 1364 | priv->pnum = pnum; |
1368 | 1365 | ||
1369 | memset(&priv->post_buckets_task, 0, sizeof(priv->post_buckets_task)); | ||
1370 | INIT_DELAYED_WORK(&priv->post_buckets_task, | 1366 | INIT_DELAYED_WORK(&priv->post_buckets_task, |
1371 | mpt_lan_post_receive_buckets_work); | 1367 | mpt_lan_post_receive_buckets_work); |
1372 | priv->post_buckets_active = 0; | 1368 | priv->post_buckets_active = 0; |
@@ -1391,8 +1387,6 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) | |||
1391 | spin_lock_init(&priv->txfidx_lock); | 1387 | spin_lock_init(&priv->txfidx_lock); |
1392 | spin_lock_init(&priv->rxfidx_lock); | 1388 | spin_lock_init(&priv->rxfidx_lock); |
1393 | 1389 | ||
1394 | memset(&priv->stats, 0, sizeof(priv->stats)); | ||
1395 | |||
1396 | /* Grab pre-fetched LANPage1 stuff. :-) */ | 1390 | /* Grab pre-fetched LANPage1 stuff. :-) */ |
1397 | a = (u8 *) &mpt_dev->lan_cnfg_page1.HardwareAddressLow; | 1391 | a = (u8 *) &mpt_dev->lan_cnfg_page1.HardwareAddressLow; |
1398 | 1392 | ||
@@ -1508,9 +1502,6 @@ static int __init mpt_lan_init (void) | |||
1508 | return -EBUSY; | 1502 | return -EBUSY; |
1509 | } | 1503 | } |
1510 | 1504 | ||
1511 | /* Set the callback index to be used by driver core for turbo replies */ | ||
1512 | mpt_lan_index = LanCtx; | ||
1513 | |||
1514 | dlprintk((KERN_INFO MYNAM ": assigned context of %d\n", LanCtx)); | 1505 | dlprintk((KERN_INFO MYNAM ": assigned context of %d\n", LanCtx)); |
1515 | 1506 | ||
1516 | if (mpt_reset_register(LanCtx, mpt_lan_ioc_reset)) { | 1507 | if (mpt_reset_register(LanCtx, mpt_lan_ioc_reset)) { |
@@ -1531,10 +1522,9 @@ static void __exit mpt_lan_exit(void) | |||
1531 | mpt_device_driver_deregister(MPTLAN_DRIVER); | 1522 | mpt_device_driver_deregister(MPTLAN_DRIVER); |
1532 | mpt_reset_deregister(LanCtx); | 1523 | mpt_reset_deregister(LanCtx); |
1533 | 1524 | ||
1534 | if (LanCtx >= 0) { | 1525 | if (LanCtx) { |
1535 | mpt_deregister(LanCtx); | 1526 | mpt_deregister(LanCtx); |
1536 | LanCtx = -1; | 1527 | LanCtx = MPT_MAX_PROTOCOL_DRIVERS; |
1537 | mpt_lan_index = 0; | ||
1538 | } | 1528 | } |
1539 | } | 1529 | } |
1540 | 1530 | ||