From b3aeaae5b47ef43a7b3702151f9a8694a9abcb78 Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Mon, 10 Dec 2012 11:50:02 +0100 Subject: [PATCH] --- yaml --- r: 354937 b: refs/heads/master c: 9d01b6f064c130028be8beb729ada7c39021b582 h: refs/heads/master i: 354935: f8bd7766a681d3c4bc0320950c917cf33ea9bd36 v: v3 --- [refs] | 2 +- trunk/drivers/ipack/devices/ipoctal.c | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index e9f051124676..793ece81d51c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b5071f2cd89bfd88cc3c3a820cbb9e7d7d9b5c92 +refs/heads/master: 9d01b6f064c130028be8beb729ada7c39021b582 diff --git a/trunk/drivers/ipack/devices/ipoctal.c b/trunk/drivers/ipack/devices/ipoctal.c index 850f10506a79..f2875f0f14d4 100644 --- a/trunk/drivers/ipack/devices/ipoctal.c +++ b/trunk/drivers/ipack/devices/ipoctal.c @@ -177,10 +177,6 @@ static void ipoctal_irq_tx(struct ipoctal_channel *channel) (*pointer_write)++; *pointer_write = *pointer_write % PAGE_SIZE; channel->nb_bytes--; - - if (channel->nb_bytes == 0 && - channel->board_id != IPACK1_DEVICE_ID_SBS_OCTAL_485) - iowrite8(CR_DISABLE_TX, &channel->regs->w.cr); } static void ipoctal_irq_channel(struct ipoctal_channel *channel) @@ -196,14 +192,14 @@ static void ipoctal_irq_channel(struct ipoctal_channel *channel) isr = ioread8(&channel->block_regs->r.isr); sr = ioread8(&channel->regs->r.sr); - /* In case of RS-485, change from TX to RX when finishing TX. - * Half-duplex. */ - if ((channel->board_id == IPACK1_DEVICE_ID_SBS_OCTAL_485) && - (sr & SR_TX_EMPTY) && (channel->nb_bytes == 0)) { - iowrite8(CR_DISABLE_TX, &channel->regs->w.cr); - iowrite8(CR_CMD_NEGATE_RTSN, &channel->regs->w.cr); - iowrite8(CR_ENABLE_RX, &channel->regs->w.cr); + if ((sr & SR_TX_EMPTY) && (channel->nb_bytes == 0)) { iowrite8(CR_DISABLE_TX, &channel->regs->w.cr); + /* In case of RS-485, change from TX to RX when finishing TX. + * Half-duplex. */ + if (channel->board_id == IPACK1_DEVICE_ID_SBS_OCTAL_485) { + iowrite8(CR_CMD_NEGATE_RTSN, &channel->regs->w.cr); + iowrite8(CR_ENABLE_RX, &channel->regs->w.cr); + } } /* RX data */