diff options
Diffstat (limited to 'drivers/net/wan/dscc4.c')
-rw-r--r-- | drivers/net/wan/dscc4.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 520a77a798e2..2f61a47b4716 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -446,8 +446,8 @@ static inline unsigned int dscc4_tx_quiescent(struct dscc4_dev_priv *dpriv, | |||
446 | return readl(dpriv->base_addr + CH0FTDA + dpriv->dev_id*4) == dpriv->ltda; | 446 | return readl(dpriv->base_addr + CH0FTDA + dpriv->dev_id*4) == dpriv->ltda; |
447 | } | 447 | } |
448 | 448 | ||
449 | int state_check(u32 state, struct dscc4_dev_priv *dpriv, struct net_device *dev, | 449 | static int state_check(u32 state, struct dscc4_dev_priv *dpriv, |
450 | const char *msg) | 450 | struct net_device *dev, const char *msg) |
451 | { | 451 | { |
452 | int ret = 0; | 452 | int ret = 0; |
453 | 453 | ||
@@ -466,8 +466,9 @@ int state_check(u32 state, struct dscc4_dev_priv *dpriv, struct net_device *dev, | |||
466 | return ret; | 466 | return ret; |
467 | } | 467 | } |
468 | 468 | ||
469 | void dscc4_tx_print(struct net_device *dev, struct dscc4_dev_priv *dpriv, | 469 | static void dscc4_tx_print(struct net_device *dev, |
470 | char *msg) | 470 | struct dscc4_dev_priv *dpriv, |
471 | char *msg) | ||
471 | { | 472 | { |
472 | printk(KERN_DEBUG "%s: tx_current=%02d tx_dirty=%02d (%s)\n", | 473 | printk(KERN_DEBUG "%s: tx_current=%02d tx_dirty=%02d (%s)\n", |
473 | dev->name, dpriv->tx_current, dpriv->tx_dirty, msg); | 474 | dev->name, dpriv->tx_current, dpriv->tx_dirty, msg); |
@@ -507,7 +508,8 @@ static void dscc4_release_ring(struct dscc4_dev_priv *dpriv) | |||
507 | } | 508 | } |
508 | } | 509 | } |
509 | 510 | ||
510 | inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, struct net_device *dev) | 511 | static inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, |
512 | struct net_device *dev) | ||
511 | { | 513 | { |
512 | unsigned int dirty = dpriv->rx_dirty%RX_RING_SIZE; | 514 | unsigned int dirty = dpriv->rx_dirty%RX_RING_SIZE; |
513 | struct RxFD *rx_fd = dpriv->rx_fd + dirty; | 515 | struct RxFD *rx_fd = dpriv->rx_fd + dirty; |
@@ -542,8 +544,7 @@ static int dscc4_wait_ack_cec(struct dscc4_dev_priv *dpriv, | |||
542 | msg, i); | 544 | msg, i); |
543 | goto done; | 545 | goto done; |
544 | } | 546 | } |
545 | set_current_state(TASK_UNINTERRUPTIBLE); | 547 | schedule_timeout_uninterruptible(10); |
546 | schedule_timeout(10); | ||
547 | rmb(); | 548 | rmb(); |
548 | } while (++i > 0); | 549 | } while (++i > 0); |
549 | printk(KERN_ERR "%s: %s timeout\n", dev->name, msg); | 550 | printk(KERN_ERR "%s: %s timeout\n", dev->name, msg); |
@@ -588,8 +589,7 @@ static inline int dscc4_xpr_ack(struct dscc4_dev_priv *dpriv) | |||
588 | (dpriv->iqtx[cur] & Xpr)) | 589 | (dpriv->iqtx[cur] & Xpr)) |
589 | break; | 590 | break; |
590 | smp_rmb(); | 591 | smp_rmb(); |
591 | set_current_state(TASK_UNINTERRUPTIBLE); | 592 | schedule_timeout_uninterruptible(10); |
592 | schedule_timeout(10); | ||
593 | } while (++i > 0); | 593 | } while (++i > 0); |
594 | 594 | ||
595 | return (i >= 0 ) ? i : -EAGAIN; | 595 | return (i >= 0 ) ? i : -EAGAIN; |
@@ -1035,8 +1035,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr) | |||
1035 | /* Flush posted writes */ | 1035 | /* Flush posted writes */ |
1036 | readl(ioaddr + GSTAR); | 1036 | readl(ioaddr + GSTAR); |
1037 | 1037 | ||
1038 | set_current_state(TASK_UNINTERRUPTIBLE); | 1038 | schedule_timeout_uninterruptible(10); |
1039 | schedule_timeout(10); | ||
1040 | 1039 | ||
1041 | for (i = 0; i < 16; i++) | 1040 | for (i = 0; i < 16; i++) |
1042 | pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]); | 1041 | pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]); |
@@ -1894,7 +1893,7 @@ try: | |||
1894 | * It failed and locked solid. Thus the introduction of a dummy skb. | 1893 | * It failed and locked solid. Thus the introduction of a dummy skb. |
1895 | * Problem is acknowledged in errata sheet DS5. Joy :o/ | 1894 | * Problem is acknowledged in errata sheet DS5. Joy :o/ |
1896 | */ | 1895 | */ |
1897 | struct sk_buff *dscc4_init_dummy_skb(struct dscc4_dev_priv *dpriv) | 1896 | static struct sk_buff *dscc4_init_dummy_skb(struct dscc4_dev_priv *dpriv) |
1898 | { | 1897 | { |
1899 | struct sk_buff *skb; | 1898 | struct sk_buff *skb; |
1900 | 1899 | ||