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

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

Merge "usb: pd: Do not allow pending out going requests with src_cap_ext"

parents 6a6b6f4d cf86abf1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3105,6 +3105,7 @@ static void usbpd_sm(struct work_struct *w)
			memcpy(&pd->src_cap_ext_db, rx_msg->payload,
				sizeof(pd->src_cap_ext_db));
			complete(&pd->is_ready);
			break;
		} else if (IS_EXT(rx_msg, MSG_PPS_STATUS)) {
			if (rx_msg->data_len != sizeof(pd->pps_status_db)) {
				usbpd_err(&pd->dev, "Invalid pps status db\n");
@@ -3113,6 +3114,7 @@ static void usbpd_sm(struct work_struct *w)
			memcpy(&pd->pps_status_db, rx_msg->payload,
				sizeof(pd->pps_status_db));
			complete(&pd->is_ready);
			break;
		} else if (IS_EXT(rx_msg, MSG_STATUS)) {
			if (rx_msg->data_len != PD_STATUS_DB_LEN) {
				usbpd_err(&pd->dev, "Invalid status db\n");
@@ -3122,6 +3124,7 @@ static void usbpd_sm(struct work_struct *w)
				sizeof(pd->status_db));
			kobject_uevent(&pd->dev.kobj, KOBJ_CHANGE);
			complete(&pd->is_ready);
			break;
		} else if (IS_EXT(rx_msg, MSG_BATTERY_CAPABILITIES)) {
			if (rx_msg->data_len != PD_BATTERY_CAP_DB_LEN) {
				usbpd_err(&pd->dev, "Invalid battery cap db\n");
@@ -3130,6 +3133,7 @@ static void usbpd_sm(struct work_struct *w)
			memcpy(&pd->battery_cap_db, rx_msg->payload,
				sizeof(pd->battery_cap_db));
			complete(&pd->is_ready);
			break;
		} else if (IS_EXT(rx_msg, MSG_BATTERY_STATUS)) {
			if (rx_msg->data_len != sizeof(pd->battery_sts_dobj)) {
				usbpd_err(&pd->dev, "Invalid bat sts dobj\n");
@@ -3138,6 +3142,7 @@ static void usbpd_sm(struct work_struct *w)
			memcpy(&pd->battery_sts_dobj, rx_msg->payload,
				sizeof(pd->battery_sts_dobj));
			complete(&pd->is_ready);
			break;
		} else if (IS_CTRL(rx_msg, MSG_GET_SOURCE_CAP_EXTENDED)) {
			handle_get_src_cap_extended(pd);
		} else if (IS_EXT(rx_msg, MSG_GET_BATTERY_CAP)) {