diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
commit | 2fca877b68b2b4fc5b94277858a1bedd46017cde (patch) | |
tree | fd02725406299ba2f26354463b3c261721e9eb6b /drivers/net/tokenring/lanstreamer.c | |
parent | ff40c6d3d1437ecdf295b8e39adcb06c3d6021ef (diff) | |
parent | 02b3e4e2d71b6058ec11cc01c72ac651eb3ded2b (diff) |
/spare/repo/libata-dev branch 'v2.6.13'
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"); |