[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <551AED33.2040206@mentor.com>
Date: Tue, 31 Mar 2015 19:53:39 +0100
From: "Baxter, Jim" <jim_baxter@...tor.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
CC: "Zapolskiy, Vladimir" <Vladimir_Zapolskiy@...tor.com>
Subject: usb: gadget: f_fs: O_NONBLOCK waits MAX_SCHEDULE_TIMEOUT
Hi,
I have been looking at an issue where a phone that is the Function FS
host sometimes locks up and causes the function:
static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data
*io_data) in drivers/usb/gadget/function/f_fs.c to timeout after
MAX_SCHEDULE_TIMEOUT jiffies.
We are opening the ffs connection with the O_NONBLOCK option and this
timeout seems to be far too long.
The code causing the wait is here (line 834):
if (unlikely(ret < 0)) {
/* nop */
} else if (unlikely(
wait_for_completion_interruptible(&done))) {
ret = -EINTR;
usb_ep_dequeue(ep->ep, req);
} else {
The function call wait_for_completion_interruptible(&done) equates to:
wait_for_completion_interruptible_timeout(&done, MAX_SCHEDULE_TIMEOUT);
I was wondering what to change to fix this, is it reasonable to use a
very small timeout if it is O_NONBLOCK or is any blocking not allowed?
I would appreciate any thoughts on how this should work?
Thank you,
Jim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists