patch-2.4.22 linux-2.4.22/drivers/message/fusion/mptlan.c
Next file: linux-2.4.22/drivers/message/fusion/mptscsih.c
Previous file: linux-2.4.22/drivers/message/fusion/mptctl.h
Back to the patch index
Back to the overall index
- Lines: 116
- Date:
2003-08-25 04:44:42.000000000 -0700
- Orig file:
linux-2.4.21/drivers/message/fusion/mptlan.c
- Orig date:
2003-06-13 07:51:34.000000000 -0700
diff -urN linux-2.4.21/drivers/message/fusion/mptlan.c linux-2.4.22/drivers/message/fusion/mptlan.c
@@ -26,7 +26,7 @@
* Copyright (c) 2000-2002 LSI Logic Corporation
* Originally By: Noah Romer
*
- * $Id: mptlan.c,v 1.53 2002/10/17 20:15:58 pdelaney Exp $
+ * $Id: mptlan.c,v 1.55 2003/05/07 14:08:32 pdelaney Exp $
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
@@ -154,7 +154,7 @@
static int mpt_lan_reset(struct net_device *dev);
static int mpt_lan_close(struct net_device *dev);
static void mpt_lan_post_receive_buckets(void *dev_id);
-static void mpt_lan_wake_post_buckets_task(struct net_device *dev,
+static void mpt_lan_wake_post_buckets_task(struct net_device *dev,
int priority);
static int mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg);
static int mpt_lan_receive_post_reply(struct net_device *dev,
@@ -242,7 +242,7 @@
// would Oops because mf has already been set
// to NULL. So after return from this func,
// mpt_interrupt() will attempt to put (NULL) mf ptr
- // item back onto it's adapter FreeQ - Oops!:-(
+ // item back onto its adapter FreeQ - Oops!:-(
// It's Ok, since mpt_lan_send_turbo() *currently*
// always returns 0, but..., just in case:
@@ -339,12 +339,15 @@
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv;
dlprintk((KERN_INFO MYNAM ": IOC %s_reset routed to LAN driver!\n",
- reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post"));
+ reset_phase==MPT_IOC_SETUP_RESET ? "setup" : (
+ reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post")));
if (priv->mpt_rxfidx == NULL)
return (1);
- if (reset_phase == MPT_IOC_PRE_RESET) {
+ if (reset_phase == MPT_IOC_SETUP_RESET) {
+ ;
+ } else if (reset_phase == MPT_IOC_PRE_RESET) {
int i;
unsigned long flags;
@@ -868,7 +871,7 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static inline void
mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
-/*
+/*
* @priority: 0 = put it on the timer queue, 1 = put it on the immediate queue
*/
{
@@ -878,8 +881,6 @@
if (priority) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
schedule_work(&priv->post_buckets_task);
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,40)
- schedule_task(&priv->post_buckets_task);
#else
queue_task(&priv->post_buckets_task, &tq_immediate);
mark_bh(IMMEDIATE_BH);
@@ -887,8 +888,6 @@
} else {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
schedule_delayed_work(&priv->post_buckets_task, 1);
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,40)
- schedule_task(&priv->post_buckets_task);
#else
queue_task(&priv->post_buckets_task, &tq_timer);
#endif
@@ -1191,7 +1190,7 @@
remaining, atomic_read(&priv->buckets_out));
if ((remaining < priv->bucketthresh) &&
- ((atomic_read(&priv->buckets_out) - remaining) >
+ ((atomic_read(&priv->buckets_out) - remaining) >
MPT_LAN_BUCKETS_REMAIN_MISMATCH_THRESH)) {
printk (KERN_WARNING MYNAM " Mismatch between driver's "
@@ -1525,7 +1524,7 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-void __init mpt_lan_exit(void)
+static void mpt_lan_exit(void)
{
int i;
@@ -1534,10 +1533,11 @@
for (i = 0; mpt_landev[i] != NULL; i++) {
struct net_device *dev = mpt_landev[i];
- printk (KERN_INFO MYNAM ": %s/%s: Fusion MPT LAN device unregistered\n",
+ printk (KERN_INFO ": %s/%s: Fusion MPT LAN device unregistered\n",
IOC_AND_NETDEV_NAMES_s_s(dev));
unregister_fcdev(dev);
- mpt_landev[i] = (struct net_device *) 0xdeadbeef; /* Debug */
+ //mpt_landev[i] = (struct net_device *) 0xdeadbeef; /* Debug */
+ mpt_landev[i] = NULL;
}
if (LanCtx >= 0) {
@@ -1550,9 +1550,10 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,59)
MODULE_PARM(tx_max_out_p, "i");
MODULE_PARM(max_buckets_out, "i"); // Debug stuff. FIXME!
+#endif
module_init(mpt_lan_init);
module_exit(mpt_lan_exit);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)