diff options
| -rw-r--r-- | drivers/ipack/devices/ipoctal.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index 8666d2d05eef..0b3c4b8fe830 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers/ipack/devices/ipoctal.c | |||
| @@ -625,6 +625,22 @@ static void ipoctal_hangup(struct tty_struct *tty) | |||
| 625 | wake_up_interruptible(&channel->tty_port.open_wait); | 625 | wake_up_interruptible(&channel->tty_port.open_wait); |
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | static void ipoctal_shutdown(struct tty_struct *tty) | ||
| 629 | { | ||
| 630 | struct ipoctal_channel *channel = tty->driver_data; | ||
| 631 | |||
| 632 | if (channel == NULL) | ||
| 633 | return; | ||
| 634 | |||
| 635 | iowrite8(CR_DISABLE_RX | CR_DISABLE_TX, &channel->regs->w.cr); | ||
| 636 | channel->rx_enable = 0; | ||
| 637 | iowrite8(CR_CMD_RESET_RX, &channel->regs->w.cr); | ||
| 638 | iowrite8(CR_CMD_RESET_TX, &channel->regs->w.cr); | ||
| 639 | iowrite8(CR_CMD_RESET_ERR_STATUS, &channel->regs->w.cr); | ||
| 640 | iowrite8(CR_CMD_RESET_MR, &channel->regs->w.cr); | ||
| 641 | clear_bit(ASYNCB_INITIALIZED, &channel->tty_port.flags); | ||
| 642 | } | ||
| 643 | |||
| 628 | static const struct tty_operations ipoctal_fops = { | 644 | static const struct tty_operations ipoctal_fops = { |
| 629 | .ioctl = NULL, | 645 | .ioctl = NULL, |
| 630 | .open = ipoctal_open, | 646 | .open = ipoctal_open, |
| @@ -635,6 +651,7 @@ static const struct tty_operations ipoctal_fops = { | |||
| 635 | .chars_in_buffer = ipoctal_chars_in_buffer, | 651 | .chars_in_buffer = ipoctal_chars_in_buffer, |
| 636 | .get_icount = ipoctal_get_icount, | 652 | .get_icount = ipoctal_get_icount, |
| 637 | .hangup = ipoctal_hangup, | 653 | .hangup = ipoctal_hangup, |
| 654 | .shutdown = ipoctal_shutdown, | ||
| 638 | }; | 655 | }; |
| 639 | 656 | ||
| 640 | static int ipoctal_probe(struct ipack_device *dev) | 657 | static int ipoctal_probe(struct ipack_device *dev) |
