Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21216
b: refs/heads/master
c: c5580a7
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Feb 20, 2006
1 parent 1793315 commit 4097fd0
Show file tree
Hide file tree
Showing 93 changed files with 2,130 additions and 2,320 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d33a73c81241e3d9ab8da2d0558429bdd5b4ef9a
refs/heads/master: c5580a7ecb859c6821dd761c95fa150ec7695ae1
7 changes: 7 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ Who: Ralf Baechle <ralf@linux-mips.org>

---------------------------

What: eepro100 network driver
When: January 2007
Why: replaced by the e100 driver
Who: Adrian Bunk <bunk@stusta.de>

---------------------------

What: Legacy /proc/pci interface (PCI_LEGACY_PROC)
When: March 2006
Why: deprecated since 2.5.53 in favor of lspci(8)
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/ppc/platforms/hdpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,10 @@ static void __init hdpu_fixup_eth_pdata(struct platform_device *pd)
struct mv643xx_eth_platform_data *eth_pd;
eth_pd = pd->dev.platform_data;

eth_pd->port_serial_control =
mv64x60_read(&bh, MV643XX_ETH_PORT_SERIAL_CONTROL_REG(pd->id) & ~1);

eth_pd->force_phy_addr = 1;
eth_pd->phy_addr = pd->id;
eth_pd->speed = SPEED_100;
eth_pd->duplex = DUPLEX_FULL;
eth_pd->tx_queue_size = 400;
eth_pd->rx_queue_size = 800;
}
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
#include <linux/mca-legacy.h>
#include <linux/ethtool.h>
#include <linux/bitops.h>
#include <linux/jiffies.h>

#include <asm/uaccess.h>
#include <asm/processor.h>
Expand Down Expand Up @@ -658,7 +659,7 @@ static int init586(struct net_device *dev)

s = jiffies; /* warning: only active with interrupts on !! */
while (!(cfg_cmd->cmd_status & STAT_COMPL)) {
if (jiffies - s > 30*HZ/100)
if (time_after(jiffies, s + 30*HZ/100))
break;
}

Expand All @@ -684,7 +685,7 @@ static int init586(struct net_device *dev)

s = jiffies;
while (!(ias_cmd->cmd_status & STAT_COMPL)) {
if (jiffies - s > 30*HZ/100)
if (time_after(jiffies, s + 30*HZ/100))
break;
}

Expand All @@ -709,7 +710,7 @@ static int init586(struct net_device *dev)

s = jiffies;
while (!(tdr_cmd->cmd_status & STAT_COMPL)) {
if (jiffies - s > 30*HZ/100) {
if (time_after(jiffies, s + 30*HZ/100)) {
printk(KERN_WARNING "%s: %d Problems while running the TDR.\n", dev->name, __LINE__);
result = 1;
break;
Expand Down Expand Up @@ -798,7 +799,7 @@ static int init586(struct net_device *dev)
elmc_id_attn586();
s = jiffies;
while (!(mc_cmd->cmd_status & STAT_COMPL)) {
if (jiffies - s > 30*HZ/100)
if (time_after(jiffies, s + 30*HZ/100))
break;
}
if (!(mc_cmd->cmd_status & STAT_COMPL)) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ static int vortex_debug = 1;
#include <linux/highmem.h>
#include <linux/eisa.h>
#include <linux/bitops.h>
#include <linux/jiffies.h>
#include <asm/irq.h> /* For NR_IRQS only. */
#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -2724,7 +2725,7 @@ boomerang_rx(struct net_device *dev)
skb = dev_alloc_skb(PKT_BUF_SZ);
if (skb == NULL) {
static unsigned long last_jif;
if ((jiffies - last_jif) > 10 * HZ) {
if (time_after(jiffies, last_jif + 10 * HZ)) {
printk(KERN_WARNING "%s: memory shortage\n", dev->name);
last_jif = jiffies;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/7990.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/irq.h>
#include <asm/irq.h>
/* Used for the temporal inet entries and routing */
#include <linux/socket.h>
#include <linux/bitops.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/82596.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
static int init_i596_mem(struct net_device *dev)
{
struct i596_private *lp = dev->priv;
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET)
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET) || defined(ENABLE_APRICOT)
short ioaddr = dev->base_addr;
#endif
unsigned long flags;
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/net/apne.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/jiffies.h>

#include <asm/system.h>
#include <asm/io.h>
Expand Down Expand Up @@ -216,7 +217,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);

while ((inb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
if (jiffies - reset_start_time > 2*HZ/100) {
if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
printk(" not found (no reset ack).\n");
return -ENODEV;
}
Expand Down Expand Up @@ -382,7 +383,7 @@ apne_reset_8390(struct net_device *dev)

/* This check _should_not_ be necessary, omit eventually. */
while ((inb(NE_BASE+NE_EN0_ISR) & ENISR_RESET) == 0)
if (jiffies - reset_start_time > 2*HZ/100) {
if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
printk("%s: ne_reset_8390() did not complete.\n", dev->name);
break;
}
Expand Down Expand Up @@ -530,7 +531,7 @@ apne_block_output(struct net_device *dev, int count,
dma_start = jiffies;

while ((inb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
if (jiffies - dma_start > 2*HZ/100) { /* 20ms */
if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */
printk("%s: timeout waiting for Tx RDC.\n", dev->name);
apne_reset_8390(dev);
NS8390_init(dev,1);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/arcnet/arc-rawmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static int build_header(struct sk_buff *skb, struct net_device *dev,
static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
int bufnum);

struct ArcProto rawmode_proto =
static struct ArcProto rawmode_proto =
{
.suffix = 'r',
.mtu = XMTU,
Expand Down
68 changes: 49 additions & 19 deletions trunk/drivers/net/arcnet/arc-rimi.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,44 @@ static int __init arcrimi_probe(struct net_device *dev)
"must specify the shmem and irq!\n");
return -ENODEV;
}
if (dev->dev_addr[0] == 0) {
BUGMSG(D_NORMAL, "You need to specify your card's station "
"ID!\n");
return -ENODEV;
}
/*
* Grab the memory region at mem_start for BUFFER_SIZE bytes.
* Grab the memory region at mem_start for MIRROR_SIZE bytes.
* Later in arcrimi_found() the real size will be determined
* and this reserve will be released and the correct size
* will be taken.
*/
if (!request_mem_region(dev->mem_start, BUFFER_SIZE, "arcnet (90xx)")) {
if (!request_mem_region(dev->mem_start, MIRROR_SIZE, "arcnet (90xx)")) {
BUGMSG(D_NORMAL, "Card memory already allocated\n");
return -ENODEV;
}
if (dev->dev_addr[0] == 0) {
release_mem_region(dev->mem_start, BUFFER_SIZE);
BUGMSG(D_NORMAL, "You need to specify your card's station "
"ID!\n");
return -ENODEV;
}
return arcrimi_found(dev);
}

static int check_mirror(unsigned long addr, size_t size)
{
void __iomem *p;
int res = -1;

if (!request_mem_region(addr, size, "arcnet (90xx)"))
return -1;

p = ioremap(addr, size);
if (p) {
if (readb(p) == TESTvalue)
res = 1;
else
res = 0;
iounmap(p);
}

release_mem_region(addr, size);
return res;
}

/*
* Set up the struct net_device associated with this card. Called after
Expand All @@ -125,19 +144,28 @@ static int __init arcrimi_found(struct net_device *dev)
{
struct arcnet_local *lp;
unsigned long first_mirror, last_mirror, shmem;
void __iomem *p;
int mirror_size;
int err;

p = ioremap(dev->mem_start, MIRROR_SIZE);
if (!p) {
release_mem_region(dev->mem_start, MIRROR_SIZE);
BUGMSG(D_NORMAL, "Can't ioremap\n");
return -ENODEV;
}

/* reserve the irq */
if (request_irq(dev->irq, &arcnet_interrupt, 0, "arcnet (RIM I)", dev)) {
release_mem_region(dev->mem_start, BUFFER_SIZE);
iounmap(p);
release_mem_region(dev->mem_start, MIRROR_SIZE);
BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq);
return -ENODEV;
}

shmem = dev->mem_start;
isa_writeb(TESTvalue, shmem);
isa_writeb(dev->dev_addr[0], shmem + 1); /* actually the node ID */
writeb(TESTvalue, p);
writeb(dev->dev_addr[0], p + 1); /* actually the node ID */

/* find the real shared memory start/end points, including mirrors */

Expand All @@ -146,17 +174,18 @@ static int __init arcrimi_found(struct net_device *dev)
* 2k (or there are no mirrors at all) but on some, it's 4k.
*/
mirror_size = MIRROR_SIZE;
if (isa_readb(shmem) == TESTvalue
&& isa_readb(shmem - mirror_size) != TESTvalue
&& isa_readb(shmem - 2 * mirror_size) == TESTvalue)
mirror_size *= 2;
if (readb(p) == TESTvalue
&& check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0
&& check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1)
mirror_size = 2 * MIRROR_SIZE;

first_mirror = last_mirror = shmem;
while (isa_readb(first_mirror) == TESTvalue)
first_mirror = shmem - mirror_size;
while (check_mirror(first_mirror, mirror_size) == 1)
first_mirror -= mirror_size;
first_mirror += mirror_size;

while (isa_readb(last_mirror) == TESTvalue)
last_mirror = shmem + mirror_size;
while (check_mirror(last_mirror, mirror_size) == 1)
last_mirror += mirror_size;
last_mirror -= mirror_size;

Expand All @@ -181,7 +210,8 @@ static int __init arcrimi_found(struct net_device *dev)
* with the correct size. There is a VERY slim chance this could
* fail.
*/
release_mem_region(shmem, BUFFER_SIZE);
iounmap(p);
release_mem_region(shmem, MIRROR_SIZE);
if (!request_mem_region(dev->mem_start,
dev->mem_end - dev->mem_start + 1,
"arcnet (90xx)")) {
Expand Down
20 changes: 12 additions & 8 deletions trunk/drivers/net/arcnet/arcnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <net/arp.h>
#include <linux/init.h>
#include <linux/arcdevice.h>
#include <linux/jiffies.h>

/* "do nothing" functions for protocol drivers */
static void null_rx(struct net_device *dev, int bufnum,
Expand All @@ -61,6 +62,7 @@ static int null_build_header(struct sk_buff *skb, struct net_device *dev,
static int null_prepare_tx(struct net_device *dev, struct archdr *pkt,
int length, int bufnum);

static void arcnet_rx(struct net_device *dev, int bufnum);

/*
* one ArcProto per possible proto ID. None of the elements of
Expand All @@ -71,7 +73,7 @@ static int null_prepare_tx(struct net_device *dev, struct archdr *pkt,
struct ArcProto *arc_proto_map[256], *arc_proto_default,
*arc_bcast_proto, *arc_raw_proto;

struct ArcProto arc_proto_null =
static struct ArcProto arc_proto_null =
{
.suffix = '?',
.mtu = XMTU,
Expand All @@ -90,7 +92,6 @@ EXPORT_SYMBOL(arc_proto_map);
EXPORT_SYMBOL(arc_proto_default);
EXPORT_SYMBOL(arc_bcast_proto);
EXPORT_SYMBOL(arc_raw_proto);
EXPORT_SYMBOL(arc_proto_null);
EXPORT_SYMBOL(arcnet_unregister_proto);
EXPORT_SYMBOL(arcnet_debug);
EXPORT_SYMBOL(alloc_arcdev);
Expand Down Expand Up @@ -118,7 +119,7 @@ static int __init arcnet_init(void)

arcnet_debug = debug;

printk(VERSION);
printk("arcnet loaded.\n");

#ifdef ALPHA_WARNING
BUGLVL(D_EXTRA) {
Expand Down Expand Up @@ -178,8 +179,8 @@ EXPORT_SYMBOL(arcnet_dump_skb);
* Dump the contents of an ARCnet buffer
*/
#if (ARCNET_DEBUG_MAX & (D_RX | D_TX))
void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
int take_arcnet_lock)
static void arcnet_dump_packet(struct net_device *dev, int bufnum,
char *desc, int take_arcnet_lock)
{
struct arcnet_local *lp = dev->priv;
int i, length;
Expand Down Expand Up @@ -208,7 +209,10 @@ void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,

}

EXPORT_SYMBOL(arcnet_dump_packet);
#else

#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) do { } while (0)

#endif


Expand Down Expand Up @@ -733,7 +737,7 @@ static void arcnet_timeout(struct net_device *dev)

spin_unlock_irqrestore(&lp->lock, flags);

if (jiffies - lp->last_timeout > 10*HZ) {
if (time_after(jiffies, lp->last_timeout + 10*HZ)) {
BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n",
msg, status, lp->intmask, lp->lasttrans_dest);
lp->last_timeout = jiffies;
Expand Down Expand Up @@ -996,7 +1000,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs)
* This is a generic packet receiver that calls arcnet??_rx depending on the
* protocol ID found.
*/
void arcnet_rx(struct net_device *dev, int bufnum)
static void arcnet_rx(struct net_device *dev, int bufnum)
{
struct arcnet_local *lp = dev->priv;
struct archdr pkt;
Expand Down
Loading

0 comments on commit 4097fd0

Please sign in to comment.