[PATCH 2.4] iph5526.c fixes from 2.6
From: O.Sezer
Date: Fri Aug 13 2004 - 14:07:37 EST
unreached code, rx/tx typo, etc.
Özkan Sezer
--- 27rc5~/drivers/net/fc/iph5526.c 2003-06-13 17:51:34.000000000 +0300
+++ 27rc5/drivers/net/fc/iph5526.c 2004-08-07 14:09:39.000000000 +0300
@@ -689,8 +689,8 @@
prev_IMQ_index = current_IMQ_index;
}
} /*end of for loop*/
- return;
LEAVE("tachyon_interrupt");
+ return;
}
@@ -2933,7 +2933,7 @@
{
struct fc_info *fi = (struct fc_info*)dev->priv;
printk(KERN_WARNING "%s: timed out on send.\n", dev->name);
- fi->fc_stats.rx_dropped++;
+ fi->fc_stats.tx_dropped++;
dev->trans_start = jiffies;
netif_wake_queue(dev);
}
@@ -2976,7 +2976,7 @@
fi->fc_stats.tx_packets++;
}
else
- fi->fc_stats.rx_dropped++;
+ fi->fc_stats.tx_dropped++;
dev->trans_start = jiffies;
/* We free up the IP buffers in the OCI_interrupt handler.
* status == 0 implies that the frame was not transmitted. So the
@@ -3374,8 +3374,8 @@
q = q->next;
}
DPRINTK1("Port Name does not match. Txing LOGO.");
- return 0;
LEAVE("validate_login");
+ return 0;
}
static void add_to_address_cache(struct fc_info *fi, u_int *base_ptr)
@@ -3758,8 +3758,10 @@
sprintf(fi->name, "fc%d", count);
host = scsi_register(tmpt, sizeof(struct iph5526_hostdata));
- if(host==NULL)
+ if(host==NULL) {
+ kfree(fc[count]);
return no_of_hosts;
+ }
hostdata = (struct iph5526_hostdata *)host->hostdata;
memset(hostdata, 0 , sizeof(struct iph5526_hostdata));