From c6895ebc13914748f5340350994c4020ba3cc58b Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Mon, 10 Dec 2012 11:50:08 +0100 Subject: [PATCH] --- yaml --- r: 354943 b: refs/heads/master c: e0f8d323f34dee3f47388dc3d87e7c428b077a0d h: refs/heads/master i: 354941: 3d4c812cd6d60c0634dc963e06d9e0027a6a9b0d 354939: c47143625d82ab2ba29fb9ec537f8b0f872be89c 354935: f8bd7766a681d3c4bc0320950c917cf33ea9bd36 354927: 8aa078fbb7ef4ad01c24b1f77d63cfb5d31efbf9 354911: 9aa914c3e7a16febe343bc12a9e200f1f91a5223 354879: 7aaff2b0acff2c7ade6c4523610d3d68b89e87c7 354815: c1e0d891adbcde8aced45f686ea5d6de9f3a57da v: v3 --- [refs] | 2 +- trunk/drivers/ipack/devices/ipoctal.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2ef0cfb102ae..3d6aecefe209 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b0d17fbdacb32f9f4b9ee1ad2b8f42f6a480d842 +refs/heads/master: e0f8d323f34dee3f47388dc3d87e7c428b077a0d diff --git a/trunk/drivers/ipack/devices/ipoctal.c b/trunk/drivers/ipack/devices/ipoctal.c index 8666d2d05eef..0b3c4b8fe830 100644 --- a/trunk/drivers/ipack/devices/ipoctal.c +++ b/trunk/drivers/ipack/devices/ipoctal.c @@ -625,6 +625,22 @@ static void ipoctal_hangup(struct tty_struct *tty) wake_up_interruptible(&channel->tty_port.open_wait); } +static void ipoctal_shutdown(struct tty_struct *tty) +{ + struct ipoctal_channel *channel = tty->driver_data; + + if (channel == NULL) + return; + + iowrite8(CR_DISABLE_RX | CR_DISABLE_TX, &channel->regs->w.cr); + channel->rx_enable = 0; + iowrite8(CR_CMD_RESET_RX, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_TX, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_ERR_STATUS, &channel->regs->w.cr); + iowrite8(CR_CMD_RESET_MR, &channel->regs->w.cr); + clear_bit(ASYNCB_INITIALIZED, &channel->tty_port.flags); +} + static const struct tty_operations ipoctal_fops = { .ioctl = NULL, .open = ipoctal_open, @@ -635,6 +651,7 @@ static const struct tty_operations ipoctal_fops = { .chars_in_buffer = ipoctal_chars_in_buffer, .get_icount = ipoctal_get_icount, .hangup = ipoctal_hangup, + .shutdown = ipoctal_shutdown, }; static int ipoctal_probe(struct ipack_device *dev)