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

Commit 9e34b2c8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: QTI: Check for IPA pipe index updation with EP_LOOKUP ioctl"

parents 573f765e 8f76663c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -277,6 +277,10 @@ void gqti_ctrl_disconnect(void *gr, u8 port_num)
	atomic_set(&port->connected, 0);
	atomic_set(&port->line_state, 0);
	spin_lock_irqsave(&port->lock, flags);

	/* reset ipa eps to -1 */
	port->ipa_prod_idx = -1;
	port->ipa_cons_idx = -1;
	port->port_usb = NULL;

	if (g_rmnet) {
@@ -574,6 +578,12 @@ static long qti_ctrl_ioctl(struct file *fp, unsigned cmd, unsigned long arg)
			break;
		}

		if (port->ipa_prod_idx == -1 && port->ipa_cons_idx == -1) {
			pr_err("EP_LOOKUP failed - ipa pipes were not updated\n");
			ret = -EAGAIN;
			break;
		}

		info.ph_ep_info.ep_type = port->ep_type;
		info.ph_ep_info.peripheral_iface_id = port->intf;
		info.ipa_ep_pair.cons_pipe_num = port->ipa_cons_idx;