diff options
Diffstat (limited to 'drivers/net/tokenring/lanstreamer.c')
-rw-r--r-- | drivers/net/tokenring/lanstreamer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 99e0b03b69a8..97712c3c4e07 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -118,6 +118,7 @@ | |||
118 | #include <linux/stddef.h> | 118 | #include <linux/stddef.h> |
119 | #include <linux/init.h> | 119 | #include <linux/init.h> |
120 | #include <linux/pci.h> | 120 | #include <linux/pci.h> |
121 | #include <linux/dma-mapping.h> | ||
121 | #include <linux/spinlock.h> | 122 | #include <linux/spinlock.h> |
122 | #include <linux/version.h> | 123 | #include <linux/version.h> |
123 | #include <linux/bitops.h> | 124 | #include <linux/bitops.h> |
@@ -257,7 +258,7 @@ static int __devinit streamer_init_one(struct pci_dev *pdev, | |||
257 | #endif | 258 | #endif |
258 | #endif | 259 | #endif |
259 | 260 | ||
260 | rc = pci_set_dma_mask(pdev, 0xFFFFFFFFULL); | 261 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
261 | if (rc) { | 262 | if (rc) { |
262 | printk(KERN_ERR "%s: No suitable PCI mapping available.\n", | 263 | printk(KERN_ERR "%s: No suitable PCI mapping available.\n", |
263 | dev->name); | 264 | dev->name); |
@@ -454,8 +455,7 @@ static int streamer_reset(struct net_device *dev) | |||
454 | writew(readw(streamer_mmio + BCTL) | BCTL_SOFTRESET, streamer_mmio + BCTL); | 455 | writew(readw(streamer_mmio + BCTL) | BCTL_SOFTRESET, streamer_mmio + BCTL); |
455 | t = jiffies; | 456 | t = jiffies; |
456 | /* Hold soft reset bit for a while */ | 457 | /* Hold soft reset bit for a while */ |
457 | current->state = TASK_UNINTERRUPTIBLE; | 458 | ssleep(1); |
458 | schedule_timeout(HZ); | ||
459 | 459 | ||
460 | writew(readw(streamer_mmio + BCTL) & ~BCTL_SOFTRESET, | 460 | writew(readw(streamer_mmio + BCTL) & ~BCTL_SOFTRESET, |
461 | streamer_mmio + BCTL); | 461 | streamer_mmio + BCTL); |
@@ -511,8 +511,7 @@ static int streamer_reset(struct net_device *dev) | |||
511 | writew(SISR_MI, streamer_mmio + SISR_MASK_SUM); | 511 | writew(SISR_MI, streamer_mmio + SISR_MASK_SUM); |
512 | 512 | ||
513 | while (!((readw(streamer_mmio + SISR)) & SISR_SRB_REPLY)) { | 513 | while (!((readw(streamer_mmio + SISR)) & SISR_SRB_REPLY)) { |
514 | current->state = TASK_INTERRUPTIBLE; | 514 | msleep_interruptible(100); |
515 | schedule_timeout(HZ/10); | ||
516 | if (jiffies - t > 40 * HZ) { | 515 | if (jiffies - t > 40 * HZ) { |
517 | printk(KERN_ERR | 516 | printk(KERN_ERR |
518 | "IBM PCI tokenring card not responding\n"); | 517 | "IBM PCI tokenring card not responding\n"); |