From: Alan Cox <alan@redhat.com>
The edgeport reports negative error codes to functions that do not
expect them. This can cause ports to jam forever
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/usb/serial/io_edgeport.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 3cb2511..44d020e 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -1444,15 +1444,15 @@ static int edge_write_room(struct tty_struct *tty)
dbg("%s", __func__);
if (edge_port == NULL)
- return -ENODEV;
+ return 0;
if (edge_port->closePending)
- return -ENODEV;
+ return 0;
dbg("%s - port %d", __func__, port->number);
if (!edge_port->open) {
dbg("%s - port not opened", __func__);
- return -EINVAL;
+ return 0;
}
/* total of both buffers is still txCredit */
@@ -1484,13 +1484,13 @@ static int edge_chars_in_buffer(struct tty_struct *tty)
dbg("%s", __func__);
if (edge_port == NULL)
- return -ENODEV;
+ return 0;
if (edge_port->closePending)
- return -ENODEV;
+ return 0;
if (!edge_port->open) {
dbg("%s - port not opened", __func__);
- return -EINVAL;
+ return 0;
}
spin_lock_irqsave(&edge_port->ep_lock, flags);
--
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| David Woodhouse | [PATCH 1/3] firmware: allow firmware files to be built into kernel image |
| Linus Torvalds | Linux 2.6.21 |
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
git: | |
| David Miller | [GIT]: Networking |
| Rick Jones | Re: Network latency regressions from 2.6.22 to 2.6.29 |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
