Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354937
b: refs/heads/master
c: 9d01b6f
h: refs/heads/master
i:
  354935: f8bd776
v: v3
  • Loading branch information
Samuel Iglesias Gonsalvez authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent d2689c5 commit b3aeaae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5071f2cd89bfd88cc3c3a820cbb9e7d7d9b5c92
refs/heads/master: 9d01b6f064c130028be8beb729ada7c39021b582
18 changes: 7 additions & 11 deletions trunk/drivers/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 */
Expand Down

0 comments on commit b3aeaae

Please sign in to comment.