Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268492
b: refs/heads/master
c: e8df167
h: refs/heads/master
v: v3
  • Loading branch information
Kautuk Consul authored and Greg Kroah-Hartman committed Sep 19, 2011
1 parent 0a2ea32 commit bdb1d1f
Show file tree
Hide file tree
Showing 2 changed files with 8 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: e228b7426e65df0f2e93c783c2c89baabe318b9b
refs/heads/master: e8df1674d383d2ecc6efa8d7dba74c03aafdfdd7
9 changes: 7 additions & 2 deletions trunk/drivers/staging/quatech_usb2/quatech_usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,19 +916,23 @@ static int qt2_ioctl(struct tty_struct *tty,
dbg("%s() port %d, cmd == TIOCMIWAIT enter",
__func__, port->number);
prev_msr_value = port_extra->shadowMSR & QT2_SERIAL_MSR_MASK;
barrier();
__set_current_state(TASK_INTERRUPTIBLE);
while (1) {
add_wait_queue(&port_extra->wait, &wait);
set_current_state(TASK_INTERRUPTIBLE);
schedule();
dbg("%s(): port %d, cmd == TIOCMIWAIT here\n",
__func__, port->number);
remove_wait_queue(&port_extra->wait, &wait);
/* see if a signal woke us up */
if (signal_pending(current))
return -ERESTARTSYS;
set_current_state(TASK_INTERRUPTIBLE);
msr_value = port_extra->shadowMSR & QT2_SERIAL_MSR_MASK;
if (msr_value == prev_msr_value)
if (msr_value == prev_msr_value) {
__set_current_state(TASK_RUNNING);
return -EIO; /* no change - error */
}
if ((arg & TIOCM_RNG &&
((prev_msr_value & QT2_SERIAL_MSR_RI) ==
(msr_value & QT2_SERIAL_MSR_RI))) ||
Expand All @@ -941,6 +945,7 @@ static int qt2_ioctl(struct tty_struct *tty,
(arg & TIOCM_CTS &&
((prev_msr_value & QT2_SERIAL_MSR_CTS) ==
(msr_value & QT2_SERIAL_MSR_CTS)))) {
__set_current_state(TASK_RUNNING);
return 0;
}
} /* end inifinite while */
Expand Down

0 comments on commit bdb1d1f

Please sign in to comment.