Skip to content

Commit

Permalink
ipack/devices/ipoctal: avoid re-enable RX two times.
Browse files Browse the repository at this point in the history
RX is enabled when the tty port is open, so no need to do it in initialization
time: it can allow the device to receive characters but no TTY client is
listening to them.

It produced an infinite number of IRQ as RxFIFO is not read to clear that
IRQ in the device, so it is still pending.

Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
samuelig authored and gregkh committed Jan 16, 2013
1 parent 9d01b6f commit a3882b7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty)

channel = dev_get_drvdata(tty->dev);

/*
* Enable RX. TX will be enabled when
* there is something to send
*/
iowrite8(CR_ENABLE_RX, &channel->regs->w.cr);
return 0;
}
Expand Down Expand Up @@ -385,12 +389,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
continue;
}
dev_set_drvdata(tty_dev, channel);

/*
* Enable again the RX. TX will be enabled when
* there is something to send
*/
iowrite8(CR_ENABLE_RX, &channel->regs->w.cr);
}

return 0;
Expand Down

0 comments on commit a3882b7

Please sign in to comment.