Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376070
b: refs/heads/master
c: dfc7b83
h: refs/heads/master
v: v3
  • Loading branch information
Matwey V. Kornilov authored and Greg Kroah-Hartman committed May 21, 2013
1 parent a5e8159 commit 92a5d0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 9d83e1807e6462ac5c4edb7eae96c69594e8c8ef
refs/heads/master: dfc7b837c7f9f01f76511aa3eeea35232903e58f
11 changes: 9 additions & 2 deletions trunk/drivers/tty/mxser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,8 +1618,12 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
if (ip->type == PORT_16550A)
me->fifo[p] = 1;

opmode = inb(ip->opmode_ioaddr)>>((p % 4) * 2);
opmode &= OP_MODE_MASK;
if (ip->board->chip_flag == MOXA_MUST_MU860_HWID) {
opmode = inb(ip->opmode_ioaddr)>>((p % 4) * 2);
opmode &= OP_MODE_MASK;
} else {
opmode = RS232_MODE;
}
me->iftype[p] = opmode;
mutex_unlock(&port->mutex);
}
Expand Down Expand Up @@ -1670,6 +1674,9 @@ static int mxser_ioctl(struct tty_struct *tty,
return mxser_ioctl_special(cmd, argp);

if (cmd == MOXA_SET_OP_MODE || cmd == MOXA_GET_OP_MODE) {
if (info->board->chip_flag != MOXA_MUST_MU860_HWID)
return -EFAULT;

int p;
unsigned long opmode;
static unsigned char ModeMask[] = { 0xfc, 0xf3, 0xcf, 0x3f };
Expand Down

0 comments on commit 92a5d0f

Please sign in to comment.