Commit d46a47ea authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

Small janitor fixes from net drivers rrunner and sgiseeq.

parent c5ad8565
...@@ -75,13 +75,13 @@ static inline void netif_start_queue(struct net_device *dev) ...@@ -75,13 +75,13 @@ static inline void netif_start_queue(struct net_device *dev)
#define rr_mark_net_bh(foo) mark_bh(foo) #define rr_mark_net_bh(foo) mark_bh(foo)
#define rr_if_busy(dev) dev->tbusy #define rr_if_busy(dev) dev->tbusy
#define rr_if_running(dev) dev->start /* Currently unused. */ #define rr_if_running(dev) dev->start /* Currently unused. */
#define rr_if_down(dev) {do{dev->start = 0;}while (0);} #define rr_if_down(dev) do { dev->start = 0; } while (0)
#else #else
#define NET_BH 0 #define NET_BH 0
#define rr_mark_net_bh(foo) {do{} while(0);} #define rr_mark_net_bh(foo) do { } while(0)
#define rr_if_busy(dev) netif_queue_stopped(dev) #define rr_if_busy(dev) netif_queue_stopped(dev)
#define rr_if_running(dev) netif_running(dev) #define rr_if_running(dev) netif_running(dev)
#define rr_if_down(dev) {do{} while(0);} #define rr_if_down(dev) do { } while(0)
#endif #endif
#include "rrunner.h" #include "rrunner.h"
...@@ -773,7 +773,7 @@ static int rr_init1(struct net_device *dev) ...@@ -773,7 +773,7 @@ static int rr_init1(struct net_device *dev)
* Give the FirmWare time to chew on the `get running' command. * Give the FirmWare time to chew on the `get running' command.
*/ */
myjif = jiffies + 5 * HZ; myjif = jiffies + 5 * HZ;
while ((jiffies < myjif) && !rrpriv->fw_running); while (time_before(jiffies, myjif) && !rrpriv->fw_running);
netif_start_queue(dev); netif_start_queue(dev);
......
/* $Id: sgiseeq.c,v 1.17 2000/03/27 23:02:57 ralf Exp $ /*
*
* sgiseeq.c: Seeq8003 ethernet driver for SGI machines. * sgiseeq.c: Seeq8003 ethernet driver for SGI machines.
* *
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -450,20 +450,22 @@ static int sgiseeq_open(struct net_device *dev) ...@@ -450,20 +450,22 @@ static int sgiseeq_open(struct net_device *dev)
unsigned long flags; unsigned long flags;
int err; int err;
save_flags(flags); cli(); __save_and_cli(flags);
if (request_irq(dev->irq, sgiseeq_interrupt, 0, sgiseeqstr, (void *) dev)) {
err = -EAGAIN;
if (request_irq(dev->irq, sgiseeq_interrupt, 0, sgiseeqstr, dev)) {
printk("Seeq8003: Can't get irq %d\n", dev->irq); printk("Seeq8003: Can't get irq %d\n", dev->irq);
restore_flags(flags); goto out;
return -EAGAIN;
} }
err = init_seeq(dev, sp, sregs); err = init_seeq(dev, sp, sregs);
if (err) if (err)
return err; goto out;
netif_start_queue(dev); netif_start_queue(dev);
restore_flags(flags);
return 0; out:
__restore_flags(flags);
return err;
} }
static int sgiseeq_close(struct net_device *dev) static int sgiseeq_close(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment