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

Commit 568c2613 authored by Vamsi Krishna's avatar Vamsi Krishna
Browse files

usb: misc: ks_bridge: Mark device busy during data xfer



EFS sync involves downloading file system image from external soc
and writing to local file system. Avoid unnecessary suspend/resume
in middle efs sync download by marking device busy whenever there is
data exchange.

Change-Id: Ib12d86188131420d2150b65876222457bf141262
Signed-off-by: default avatarVamsi Krishna <vskrishn@codeaurora.org>
parent 93a10794
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -537,6 +537,8 @@ static void ksb_rx_cb(struct urb *urb)
		goto done;
	}

	usb_mark_last_busy(ksb->udev);

	if (urb->actual_length == 0) {
		submit_one_urb(ksb, GFP_ATOMIC, pkt);
		goto done;
@@ -796,6 +798,11 @@ static int ksb_usb_suspend(struct usb_interface *ifc, pm_message_t message)

	dbg_log_event(ksb, "SUSPEND", 0, 0);

	if (pm_runtime_autosuspend_expiration(&ksb->udev->dev)) {
		dbg_log_event(ksb, "SUSP ABORT-TimeCheck", 0, 0);
		return -EBUSY;
	}

	usb_kill_anchored_urbs(&ksb->submitted);

	spin_lock_irqsave(&ksb->lock, flags);