git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
net
/
eth16i.c
diff --git
a/drivers/net/eth16i.c
b/drivers/net/eth16i.c
index
ca42efa
..
f32a6b3
100644
(file)
--- a/
drivers/net/eth16i.c
+++ b/
drivers/net/eth16i.c
@@
-161,7
+161,6
@@
static char *version =
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/bitops.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/bitops.h>
-#include <linux/jiffies.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/io.h>
@@
-755,7
+754,7
@@
static void eth16i_set_port(int ioaddr, int porttype)
static int eth16i_send_probe_packet(int ioaddr, unsigned char *b, int l)
{
static int eth16i_send_probe_packet(int ioaddr, unsigned char *b, int l)
{
-
unsigned long
starttime;
+
int
starttime;
outb(0xff, ioaddr + TX_STATUS_REG);
outb(0xff, ioaddr + TX_STATUS_REG);
@@
-766,7
+765,7
@@
static int eth16i_send_probe_packet(int ioaddr, unsigned char *b, int l)
outb(TX_START | 1, ioaddr + TRANSMIT_START_REG);
while( (inb(ioaddr + TX_STATUS_REG) & 0x80) == 0) {
outb(TX_START | 1, ioaddr + TRANSMIT_START_REG);
while( (inb(ioaddr + TX_STATUS_REG) & 0x80) == 0) {
- if(
time_after(jiffies, starttime + TX_TIMEOUT)
) {
+ if(
(jiffies - starttime) > TX_TIMEOUT
) {
return -1;
}
}
return -1;
}
}
@@
-776,18
+775,18
@@
static int eth16i_send_probe_packet(int ioaddr, unsigned char *b, int l)
static int eth16i_receive_probe_packet(int ioaddr)
{
static int eth16i_receive_probe_packet(int ioaddr)
{
-
unsigned long
starttime;
+
int
starttime;
starttime = jiffies;
while((inb(ioaddr + TX_STATUS_REG) & 0x20) == 0) {
starttime = jiffies;
while((inb(ioaddr + TX_STATUS_REG) & 0x20) == 0) {
- if(
time_after(jiffies, starttime + TX_TIMEOUT)
) {
+ if(
(jiffies - starttime) > TX_TIMEOUT
) {
if(eth16i_debug > 1)
printk(KERN_DEBUG "Timeout occurred waiting transmit packet received\n");
starttime = jiffies;
while((inb(ioaddr + RX_STATUS_REG) & 0x80) == 0) {
if(eth16i_debug > 1)
printk(KERN_DEBUG "Timeout occurred waiting transmit packet received\n");
starttime = jiffies;
while((inb(ioaddr + RX_STATUS_REG) & 0x80) == 0) {
- if(
time_after(jiffies, starttime + TX_TIMEOUT)
) {
+ if(
(jiffies - starttime) > TX_TIMEOUT
) {
if(eth16i_debug > 1)
printk(KERN_DEBUG "Timeout occurred waiting receive packet\n");
return -1;
if(eth16i_debug > 1)
printk(KERN_DEBUG "Timeout occurred waiting receive packet\n");
return -1;
@@
-1064,7
+1063,8
@@
static int eth16i_tx(struct sk_buff *skb, struct net_device *dev)
unsigned long flags;
if (length < ETH_ZLEN) {
unsigned long flags;
if (length < ETH_ZLEN) {
- if (skb_padto(skb, ETH_ZLEN))
+ skb = skb_padto(skb, ETH_ZLEN);
+ if (skb == NULL)
return 0;
length = ETH_ZLEN;
}
return 0;
length = ETH_ZLEN;
}
@@
-1434,7
+1434,7
@@
MODULE_PARM_DESC(mediatype, "eth16i media type of interface(s) (bnc,tp,dix,auto,
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "eth16i debug level (0-6)");
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "eth16i debug level (0-6)");
-int
__init
init_module(void)
+int init_module(void)
{
int this_dev, found = 0;
struct net_device *dev;
{
int this_dev, found = 0;
struct net_device *dev;