diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dm9000.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 5470062659f4..ec9730aee1e3 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -90,9 +90,9 @@ | |||
90 | #define writesb outsb | 90 | #define writesb outsb |
91 | #define writesw outsw | 91 | #define writesw outsw |
92 | #define writesl outsl | 92 | #define writesl outsl |
93 | #define DM9000_IRQ_FLAGS (IRQF_SHARED | IRQF_TRIGGER_HIGH) | 93 | #define DEFAULT_TRIGGER IRQF_TRIGGER_HIGH |
94 | #else | 94 | #else |
95 | #define DM9000_IRQ_FLAGS (IRQF_SHARED | IRQT_RISING) | 95 | #define DEFAULT_TRIGGER (0) |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | /* | 98 | /* |
@@ -614,10 +614,21 @@ static int | |||
614 | dm9000_open(struct net_device *dev) | 614 | dm9000_open(struct net_device *dev) |
615 | { | 615 | { |
616 | board_info_t *db = (board_info_t *) dev->priv; | 616 | board_info_t *db = (board_info_t *) dev->priv; |
617 | unsigned long irqflags = db->irq_res->flags & IRQF_TRIGGER_MASK; | ||
617 | 618 | ||
618 | dev_dbg(db->dev, "entering %s\n", __func__); | 619 | dev_dbg(db->dev, "entering %s\n", __func__); |
619 | 620 | ||
620 | if (request_irq(dev->irq, &dm9000_interrupt, DM9000_IRQ_FLAGS, dev->name, dev)) | 621 | /* If there is no IRQ type specified, default to something that |
622 | * may work, and tell the user that this is a problem */ | ||
623 | |||
624 | if (irqflags == IRQF_TRIGGER_NONE) { | ||
625 | dev_warn(db->dev, "WARNING: no IRQ resource flags set.\n"); | ||
626 | irqflags = DEFAULT_TRIGGER; | ||
627 | } | ||
628 | |||
629 | irqflags |= IRQF_SHARED; | ||
630 | |||
631 | if (request_irq(dev->irq, &dm9000_interrupt, irqflags, dev->name, dev)) | ||
621 | return -EAGAIN; | 632 | return -EAGAIN; |
622 | 633 | ||
623 | /* Initialize DM9000 board */ | 634 | /* Initialize DM9000 board */ |