diff options
Diffstat (limited to 'drivers/net/jazzsonic.c')
-rw-r--r-- | drivers/net/jazzsonic.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index 1a73630fd7d5..75f6f441e876 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c | |||
@@ -88,6 +88,23 @@ static unsigned short known_revisions[] = | |||
88 | 0xffff /* end of list */ | 88 | 0xffff /* end of list */ |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static int jazzsonic_open(struct net_device* dev) | ||
92 | { | ||
93 | if (request_irq(dev->irq, &sonic_interrupt, IRQF_DISABLED, "sonic", dev)) { | ||
94 | printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq); | ||
95 | return -EAGAIN; | ||
96 | } | ||
97 | return sonic_open(dev); | ||
98 | } | ||
99 | |||
100 | static int jazzsonic_close(struct net_device* dev) | ||
101 | { | ||
102 | int err; | ||
103 | err = sonic_close(dev); | ||
104 | free_irq(dev->irq, dev); | ||
105 | return err; | ||
106 | } | ||
107 | |||
91 | static int __init sonic_probe1(struct net_device *dev) | 108 | static int __init sonic_probe1(struct net_device *dev) |
92 | { | 109 | { |
93 | static unsigned version_printed; | 110 | static unsigned version_printed; |
@@ -169,8 +186,8 @@ static int __init sonic_probe1(struct net_device *dev) | |||
169 | lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS | 186 | lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS |
170 | * SONIC_BUS_SCALE(lp->dma_bitmode)); | 187 | * SONIC_BUS_SCALE(lp->dma_bitmode)); |
171 | 188 | ||
172 | dev->open = sonic_open; | 189 | dev->open = jazzsonic_open; |
173 | dev->stop = sonic_close; | 190 | dev->stop = jazzsonic_close; |
174 | dev->hard_start_xmit = sonic_send_packet; | 191 | dev->hard_start_xmit = sonic_send_packet; |
175 | dev->get_stats = sonic_get_stats; | 192 | dev->get_stats = sonic_get_stats; |
176 | dev->set_multicast_list = &sonic_multicast_list; | 193 | dev->set_multicast_list = &sonic_multicast_list; |
@@ -260,8 +277,6 @@ MODULE_DESCRIPTION("Jazz SONIC ethernet driver"); | |||
260 | module_param(sonic_debug, int, 0); | 277 | module_param(sonic_debug, int, 0); |
261 | MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); | 278 | MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); |
262 | 279 | ||
263 | #define SONIC_IRQ_FLAG IRQF_DISABLED | ||
264 | |||
265 | #include "sonic.c" | 280 | #include "sonic.c" |
266 | 281 | ||
267 | static int __devexit jazz_sonic_device_remove (struct platform_device *pdev) | 282 | static int __devexit jazz_sonic_device_remove (struct platform_device *pdev) |