diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
commit | 4b7bd364700d9ac8372eff48832062b936d0793b (patch) | |
tree | 0dbf78c95456a0b02d07fcd473281f04a87e266d /drivers/net/wan | |
parent | c0d8768af260e2cbb4bf659ae6094a262c86b085 (diff) | |
parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) |
Merge branch 'master' into for-next
Conflicts:
MAINTAINERS
arch/arm/mach-omap2/pm24xx.c
drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/hd64572.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 13 |
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index ea476cbd38b5..e305274f83fb 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c | |||
@@ -293,6 +293,7 @@ static inline void sca_tx_done(port_t *port) | |||
293 | struct net_device *dev = port->netdev; | 293 | struct net_device *dev = port->netdev; |
294 | card_t* card = port->card; | 294 | card_t* card = port->card; |
295 | u8 stat; | 295 | u8 stat; |
296 | unsigned count = 0; | ||
296 | 297 | ||
297 | spin_lock(&port->lock); | 298 | spin_lock(&port->lock); |
298 | 299 | ||
@@ -316,10 +317,12 @@ static inline void sca_tx_done(port_t *port) | |||
316 | dev->stats.tx_bytes += readw(&desc->len); | 317 | dev->stats.tx_bytes += readw(&desc->len); |
317 | } | 318 | } |
318 | writeb(0, &desc->stat); /* Free descriptor */ | 319 | writeb(0, &desc->stat); /* Free descriptor */ |
320 | count++; | ||
319 | port->txlast = (port->txlast + 1) % card->tx_ring_buffers; | 321 | port->txlast = (port->txlast + 1) % card->tx_ring_buffers; |
320 | } | 322 | } |
321 | 323 | ||
322 | netif_wake_queue(dev); | 324 | if (count) |
325 | netif_wake_queue(dev); | ||
323 | spin_unlock(&port->lock); | 326 | spin_unlock(&port->lock); |
324 | } | 327 | } |
325 | 328 | ||
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index d81ad8397885..24297b274cd4 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -498,7 +498,6 @@ norbuff: | |||
498 | static int x25_asy_close(struct net_device *dev) | 498 | static int x25_asy_close(struct net_device *dev) |
499 | { | 499 | { |
500 | struct x25_asy *sl = netdev_priv(dev); | 500 | struct x25_asy *sl = netdev_priv(dev); |
501 | int err; | ||
502 | 501 | ||
503 | spin_lock(&sl->lock); | 502 | spin_lock(&sl->lock); |
504 | if (sl->tty) | 503 | if (sl->tty) |
@@ -507,10 +506,6 @@ static int x25_asy_close(struct net_device *dev) | |||
507 | netif_stop_queue(dev); | 506 | netif_stop_queue(dev); |
508 | sl->rcount = 0; | 507 | sl->rcount = 0; |
509 | sl->xleft = 0; | 508 | sl->xleft = 0; |
510 | err = lapb_unregister(dev); | ||
511 | if (err != LAPB_OK) | ||
512 | printk(KERN_ERR "x25_asy_close: lapb_unregister error -%d\n", | ||
513 | err); | ||
514 | spin_unlock(&sl->lock); | 509 | spin_unlock(&sl->lock); |
515 | return 0; | 510 | return 0; |
516 | } | 511 | } |
@@ -582,7 +577,7 @@ static int x25_asy_open_tty(struct tty_struct *tty) | |||
582 | if (err) | 577 | if (err) |
583 | return err; | 578 | return err; |
584 | /* Done. We have linked the TTY line to a channel. */ | 579 | /* Done. We have linked the TTY line to a channel. */ |
585 | return sl->dev->base_addr; | 580 | return 0; |
586 | } | 581 | } |
587 | 582 | ||
588 | 583 | ||
@@ -595,6 +590,7 @@ static int x25_asy_open_tty(struct tty_struct *tty) | |||
595 | static void x25_asy_close_tty(struct tty_struct *tty) | 590 | static void x25_asy_close_tty(struct tty_struct *tty) |
596 | { | 591 | { |
597 | struct x25_asy *sl = tty->disc_data; | 592 | struct x25_asy *sl = tty->disc_data; |
593 | int err; | ||
598 | 594 | ||
599 | /* First make sure we're connected. */ | 595 | /* First make sure we're connected. */ |
600 | if (!sl || sl->magic != X25_ASY_MAGIC) | 596 | if (!sl || sl->magic != X25_ASY_MAGIC) |
@@ -605,6 +601,11 @@ static void x25_asy_close_tty(struct tty_struct *tty) | |||
605 | dev_close(sl->dev); | 601 | dev_close(sl->dev); |
606 | rtnl_unlock(); | 602 | rtnl_unlock(); |
607 | 603 | ||
604 | err = lapb_unregister(sl->dev); | ||
605 | if (err != LAPB_OK) | ||
606 | printk(KERN_ERR "x25_asy_close: lapb_unregister error -%d\n", | ||
607 | err); | ||
608 | |||
608 | tty->disc_data = NULL; | 609 | tty->disc_data = NULL; |
609 | sl->tty = NULL; | 610 | sl->tty = NULL; |
610 | x25_asy_free(sl); | 611 | x25_asy_free(sl); |