Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2949d5c authored by Sreelakshmi Gownipalli's avatar Sreelakshmi Gownipalli Committed by Gerrit - the friendly Code Review server
Browse files

diag: Don't queue read to usb during disconnect



Don't queue read to usb again when usb returns EIO error. Requeue
the buffer to usb again only after receiving connect event.

Change-Id: I18796722ad3b9baee26ed692f27eb9684ee37158
Signed-off-by: default avatarSreelakshmi Gownipalli <sgownipa@codeaurora.org>
parent f6fbeafa
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -286,7 +286,7 @@ static void usb_read_work_fn(struct work_struct *work)
		req->buf = ch->read_buf;
		req->buf = ch->read_buf;
		req->length = USB_MAX_OUT_BUF;
		req->length = USB_MAX_OUT_BUF;
		err = usb_diag_read(ch->hdl, req);
		err = usb_diag_read(ch->hdl, req);
		if (err) {
		if (err && err != -EIO) {
			pr_debug("diag: In %s, error in reading from USB %s, err: %d\n",
			pr_debug("diag: In %s, error in reading from USB %s, err: %d\n",
				 __func__, ch->name, err);
				 __func__, ch->name, err);
			atomic_set(&ch->read_pending, 0);
			atomic_set(&ch->read_pending, 0);