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

Commit 3d7b513f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: function: f_gsi: Allow line state ioctl query"

parents 48d3bb27 e20b7664
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1519,8 +1519,10 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned int cmd,
	gsi = inst_cur->opts->gsi;
	c_port = &gsi->c_port;

	if (!atomic_read(&gsi->connected)) {
		log_event_err("USB cable not connected\n");
	if (!atomic_read(&gsi->connected) && cmd != QTI_CTRL_GET_LINE_STATE
			&& cmd != GSI_MBIM_GPS_USB_STATUS) {
		log_event_err("%s:cmd %u failed, USB not connected\n",
					__func__, cmd);
		return -ECONNRESET;
	}

@@ -1569,12 +1571,6 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned int cmd,
	case GSI_MBIM_EP_LOOKUP:
		log_event_dbg("%s: EP_LOOKUP for prot id:%d", __func__,
							gsi->prot_id);
		if (!atomic_read(&gsi->connected)) {
			log_event_dbg("EP_LOOKUP failed: not connected");
			ret = -EAGAIN;
			break;
		}

		if (gsi->prot_id == IPA_USB_DIAG &&
				(gsi->d_port.in_channel_handle == -EINVAL)) {
			ret = -EAGAIN;