usb: typec: ucsi: Do not call ACPI _DSM method for UCSI read operations
Subsystems (2)
PATCH 1/1 usb: typec: ucsi: Do not call ACPI _DSM method for UCSI read operations
ACPI _DSM methods are needed only for UCSI write operations and for reading CCI during RESET_PPM operation. So, remove _DSM calls from other places. While there, remove the Zenbook quirk also since the default behavior now aligns with the Zenbook quirk. With this change, GET_CONNECTOR_STATUS returns at least 6 seconds faster than before in Arrowlake-S platforms.
--- drivers/usb/typec/ucsi/ucsi_acpi.c | 56 +++--------------------------- 1 file changed, 5 insertions(+), 51 deletions(-)
drivers/usb/typec/ucsi/ucsi_acpi.c +5 -51
@@ -61,9 +61,11 @@ static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci)struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi);int ret; - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; +if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { + ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); +if (ret) +return ret; + }memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci));
@@ -73,11 +75,6 @@ static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci)static int ucsi_acpi_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) {struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret;memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len);
@@ -102,42 +99,6 @@ static const struct ucsi_operations ucsi_acpi_ops = { .async_control = ucsi_acpi_async_control }; -static int -ucsi_zenbook_read_cci (struct ucsi *ucsi,u32 *cci) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - -if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; - } - -memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci)); - -return 0 ; -} - -static int -ucsi_zenbook_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); - -/* UCSI_MESSAGE_IN is never read for PPM_RESET, return stored data */ -memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len); - -return 0 ; -} - -static const struct ucsi_operations ucsi_zenbook_ops = { - .read_version = ucsi_acpi_read_version, - .read_cci = ucsi_zenbook_read_cci, - .read_message_in = ucsi_zenbook_read_message_in, - .sync_control = ucsi_sync_control_common, - .async_control = ucsi_acpi_async_control -}; -static int ucsi_gram_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) { u16 bogus_change = UCSI_CONSTAT_POWER_LEVEL_CHANGE |
@@ -190,13 +151,6 @@ static const struct ucsi_operations ucsi_gram_ops = { };static const struct dmi_system_id ucsi_acpi_quirks[] = { - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"ZenBook UX325UA_UM325UA" ), - }, - .driver_data = (void *)&ucsi_zenbook_ops, - }, { .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"LG Electronics" ),
Signature · 1 line
2.34.1
Heikki Krogerus
maintainerQuoted 8 lines · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operations and for reading CCI duringRESET_PPMoperation. So, remove_DSMcalls from other places. While there, remove the Zenbook quirk also since the default behavior now aligns with the Zenbook quirk. With this change,GET_CONNECTOR_STATUSreturns at least 6 seconds faster than before in Arrowlake-S platforms.Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>
Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/[email protected]/
Christian, can you check this?
thanks,
Quoted 94 lines
--- drivers/usb/typec/ucsi/ucsi_acpi.c | 56 +++--------------------------- 1 file changed, 5 insertions(+), 51 deletions(-)drivers/usb/typec/ucsi/ucsi_acpi.c +5
-51@@ -61,9 +61,11 @@ static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci)struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi);int ret; - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; +if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { + ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); +if (ret) +return ret; + }memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci));@@ -73,11 +75,6 @@ static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci)static int ucsi_acpi_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) {struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret;memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len);@@ -102,42 +99,6 @@ static const struct ucsi_operations ucsi_acpi_ops = { .async_control = ucsi_acpi_async_control }; -static int -ucsi_zenbook_read_cci (struct ucsi *ucsi,u32 *cci) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - -if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; - } - -memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci)); - -return 0 ; -} - -static int -ucsi_zenbook_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); - -/* UCSI_MESSAGE_IN is never read for PPM_RESET, return stored data */ -memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len); - -return 0 ; -} - -static const struct ucsi_operations ucsi_zenbook_ops = { - .read_version = ucsi_acpi_read_version, - .read_cci = ucsi_zenbook_read_cci, - .read_message_in = ucsi_zenbook_read_message_in, - .sync_control = ucsi_sync_control_common, - .async_control = ucsi_acpi_async_control -}; -static int ucsi_gram_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) { u16 bogus_change = UCSI_CONSTAT_POWER_LEVEL_CHANGE |@@ -190,13 +151,6 @@ static const struct ucsi_operations ucsi_gram_ops = { };static const struct dmi_system_id ucsi_acpi_quirks[] = { - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"ZenBook UX325UA_UM325UA" ), - }, - .driver_data = (void *)&ucsi_zenbook_ops, - }, { .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"LG Electronics" ),Signature · 1 line
2.34.1
Signature · 1 line
heikki
Christian A. Ehrhardt
Reviewed-byHi Heikki, Hi Saranya,
Quoted 7 lines · Heikki Krogerus
Quoted 6 lines · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operations and for reading CCI duringRESET_PPMoperation. So, remove_DSMcalls from other places. While there, remove the Zenbook quirk also since the default behavior now aligns with the Zenbook quirk. With this change,GET_CONNECTOR_STATUSreturns at least 6 seconds faster than before in Arrowlake-S platforms.
Quoted 7 lines
Quoted 2 lines
Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/[email protected]/Christian, can you check this?
The change certainly looks like the correct thing to do and would remove the need for the zenbook quirk. I'll try to get that combination tested by the original reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108
Quoted 12 lines
Quoted 12 lines
--- drivers/usb/typec/ucsi/ucsi_acpi.c | 56 +++--------------------------- 1 file changed, 5 insertions(+), 51 deletions(-)drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0@@ -61,9 +61,11 @@ static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci)struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi);int ret;
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci) · line 68
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +5
-3- ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; +if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { + ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); +if (ret) +return ret; + }
This is slightly incorrect because we wait for the completion of at least one other command (UCSI_SET_NOTIFICATION_ENABLE) by polling cci. However, this is a very minor corner case. It could be fixed by adding an optional ->poll() method or similar that is NULL on other implementations and does the DSM READ on ACPI. We could then call this before read_cci when polling for completion. If this is done ->read_cci() would never call the DSM method.
However, the change in its current state is a definitive improvement, and looks good to me. Thus feel free to add
Quoted 61 lines
Quoted 61 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-41memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci));@@ -73,11 +75,6 @@ static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci)static int ucsi_acpi_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) {struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret;memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len);@@ -102,42 +99,6 @@ static const struct ucsi_operations ucsi_acpi_ops = { .async_control = ucsi_acpi_async_control }; -static int -ucsi_zenbook_read_cci (struct ucsi *ucsi,u32 *cci) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - -if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; - } - -memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci)); - -return 0 ; -} - -static int -ucsi_zenbook_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); - -/* UCSI_MESSAGE_IN is never read for PPM_RESET, return stored data */ -memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len); - -return 0 ; -} - -static const struct ucsi_operations ucsi_zenbook_ops = { - .read_version = ucsi_acpi_read_version, - .read_cci = ucsi_zenbook_read_cci, - .read_message_in = ucsi_zenbook_read_message_in, - .sync_control = ucsi_sync_control_common, - .async_control = ucsi_acpi_async_control -}; -static int ucsi_gram_read_message_in (struct ucsi *ucsi,void *val,size_t val_len) { u16 bogus_change = UCSI_CONSTAT_POWER_LEVEL_CHANGE |@@ -190,13 +151,6 @@ static const struct ucsi_operations ucsi_gram_ops = { };
Quoted 13 lines
Quoted 13 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-7static const struct dmi_system_id ucsi_acpi_quirks[] = { - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"ZenBook UX325UA_UM325UA" ), - }, - .driver_data = (void *)&ucsi_zenbook_ops, - }, { .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"LG Electronics" ),Signature · 1 line
2.34.1
Best regards,
Christian
Hi Heikki, Christian,
Quoted 24 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki, Hi Saranya,
Quoted 2 lines · Heikki Krogerus
Quoted 1 line · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operationsand for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcalls fromother places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the default
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in Arrowlake-S
Quoted 9 lines
platforms.
Quoted 6 lines
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already (https://lore.kernel.org/linux-usb/[email protected]/T/#u).
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.
Quoted 41 lines
Quoted 1 line
Christian, can you check this?
The change certainly looks like the correct thing to do and would remove the need for the zenbook quirk. I'll try to get that combination tested by the original reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108Quoted 2 lines
Quoted 2 lines
--- drivers/usb/typec/ucsi/ucsi_acpi.c | 56 +++---------------------------
Quoted 3 lines
Review
Quoted 3 lines
1 file changed, 5 insertions(+), 51 deletions(-)(quoted diff) +0
-0
b/drivers/usb/typec/ucsi/ucsi_acpi.cQuoted 4 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi
Quoted 4 lines
index
7a5dff8d9cc6..accf15ff1306100644drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0@@ -61,9 +61,11 @@ static int ucsi_acpi_read_cci(struct ucsi*ucsi, u32 *cci)
Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci) · line 68
Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +5
-3struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi);int ret; - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; +if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { + ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); +if (ret) +return ret; + }This is slightly incorrect because we wait for the completion of at least one other command (
UCSI_SET_NOTIFICATION_ENABLE) by polling cci.
However, this is a very minor corner case. It could be fixed by adding an optional ->poll() method or similar that is NULL on other implementations and does the DSM READ on ACPI. We could then call this
beforeread_cciwhen polling for completion. If this is done -
Quoted 6 lines
Quoted 1 line
read_cci()would never call the DSM method.
However, the change in its current state is a definitive improvement, and looks good to me. Thus feel free to add
Reviewed-by Christian A. Ehrhardt <[email protected]>
Thanks for the review, Christian.
Thanks,
Saranya
Quoted 89 lines
Quoted 5 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi
Quoted 5 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci));@@ -73,11 +75,6 @@ static int ucsi_acpi_read_cci(struct ucsi*ucsi, u32 *cci)
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi · line 75
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0static int ucsi_acpi_read_message_in(struct ucsi *ucsi, void *val,
size_tval_len)Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations
Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-5{struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret;memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len);@@ -102,42 +99,6 @@ static const struct ucsi_operations
ucsi_acpi_ops= {Quoted 14 lines
Quoted 14 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-11.async_control = ucsi_acpi_async_control }; -static int -ucsi_zenbook_read_cci (struct ucsi *ucsi,u32 *cci) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - -if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; - }Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_acpi_ops = {
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-8- -memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci)); - -return 0 ; -} - -static int -ucsi_zenbook_read_message_in(struct ucsi *ucsi, void *val,
size_tval_len)Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_acpi_ops = {
Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-4-{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); - -/* UCSI_MESSAGE_IN is never read for PPM_RESET, return stored data */
Quoted 6 lines
Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-6-memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len); - -return 0 ; -} - -static const struct ucsi_operations ucsi_zenbook_ops = {Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_acpi_ops = {
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-7- .read_version = ucsi_acpi_read_version, - .read_cci = ucsi_zenbook_read_cci, - .read_message_in = ucsi_zenbook_read_message_in, - .sync_control = ucsi_sync_control_common, - .async_control = ucsi_acpi_async_control -}; - static int ucsi_gram_read_message_in(struct ucsi *ucsi, void*val,
size_tval_len)Quoted 2 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations · line 104
Quoted 2 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0{ u16 bogus_change =
UCSI_CONSTAT_POWER_LEVEL_CHANGE|Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0@@ -190,13 +151,6 @@ static const struct ucsi_operations
ucsi_gram_ops= {Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_gram_ops = {
Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-3};static const struct dmi_system_id ucsi_acpi_quirks[] = { - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeKCOMPUTER INC."),
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations · line 196
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-1- DMI_MATCH(DMI_PRODUCT_NAME,"ZenBook
UX325UA_UM325UA"),Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_gram_ops = {
Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-3- }, - .driver_data = (void *)&ucsi_zenbook_ops, - }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LGElectronics"),
Quoted 2 lines
Quoted 2 lines
--
2.34.1Best regards,
Christian
Heikki Krogerus
maintainerHi Saranya, Christian,
Quoted 31 lines · Saranya
Hi Heikki, Christian,
Quoted 29 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki, Hi Saranya,
Quoted 2 lines · Heikki Krogerus
Quoted 1 line · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operationsand for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcalls fromother places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the default
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in Arrowlake-S
platforms.
Quoted 4 lines
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already (https://lore.kernel.org/linux-usb/[email protected]/T/#u).
The other part still needs a fix.
Quoted 2 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.
If you prefer that we go with Christian's patch to fix the issue
- which is fine by me - you need to rebase this on top of his patch in any case. So you will need to resend this either way.
Christian would you mind resending that second patch after all where you take the Zenbook quirk into use on that ASUS system?
Let's make that as the actual fix for the issue. Maybe it's more clear that way.
thanks,
Quoted 138 lines
Quoted 41 lines
Quoted 1 line
Christian, can you check this?
The change certainly looks like the correct thing to do and would remove the need for the zenbook quirk. I'll try to get that combination tested by the original reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108Quoted 2 lines
Quoted 2 lines
--- drivers/usb/typec/ucsi/ucsi_acpi.c | 56 +++---------------------------
Quoted 3 lines
Review
Quoted 3 lines
1 file changed, 5 insertions(+), 51 deletions(-)(quoted diff) +0
-0
b/drivers/usb/typec/ucsi/ucsi_acpi.cQuoted 4 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi
Quoted 4 lines
index
7a5dff8d9cc6..accf15ff1306100644drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0@@ -61,9 +61,11 @@ static int ucsi_acpi_read_cci(struct ucsi*ucsi, u32 *cci)
Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi *ucsi, u32 *cci) · line 68
Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +5
-3struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi);int ret; - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; +if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { + ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); +if (ret) +return ret; + }This is slightly incorrect because we wait for the completion of at least one other command (
UCSI_SET_NOTIFICATION_ENABLE) by polling cci.
However, this is a very minor corner case. It could be fixed by adding an optional ->poll() method or similar that is NULL on other implementations and does the DSM READ on ACPI. We could then call this
beforeread_cciwhen polling for completion. If this is done -Quoted 6 lines
Quoted 1 line
read_cci()would never call the DSM method.
However, the change in its current state is a definitive improvement, and looks good to me. Thus feel free to add
Reviewed-by Christian A. Ehrhardt <[email protected]>Thanks for the review, Christian.
Thanks,
SaranyaQuoted 86 lines
Quoted 5 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi
Quoted 5 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci));@@ -73,11 +75,6 @@ static int ucsi_acpi_read_cci(struct ucsi*ucsi, u32 *cci)
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c static int ucsi_acpi_read_cci(struct ucsi · line 75
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0static int ucsi_acpi_read_message_in(struct ucsi *ucsi, void *val,
size_tval_len)Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations
Quoted 11 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-5{struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret;memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len);@@ -102,42 +99,6 @@ static const struct ucsi_operations
ucsi_acpi_ops= {Quoted 14 lines
Quoted 14 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-11.async_control = ucsi_acpi_async_control }; -static int -ucsi_zenbook_read_cci (struct ucsi *ucsi,u32 *cci) -{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -int ret; - -if (UCSI_COMMAND (ua->cmd) ==UCSI_PPM_RESET ) { - ret =ucsi_acpi_dsm (ua,UCSI_DSM_FUNC_READ ); -if (ret) -return ret; - }Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_acpi_ops = {
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-8- -memcpy (cci, ua->base +UCSI_CCI ,sizeof (*cci)); - -return 0 ; -} - -static int -ucsi_zenbook_read_message_in(struct ucsi *ucsi, void *val,
size_tval_len)Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_acpi_ops = {
Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-4-{ -struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); - -/* UCSI_MESSAGE_IN is never read for PPM_RESET, return stored data */
Quoted 6 lines
Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-6-memcpy (val, ua->base +UCSI_MESSAGE_IN , val_len); - -return 0 ; -} - -static const struct ucsi_operations ucsi_zenbook_ops = {Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_acpi_ops = {
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-7- .read_version = ucsi_acpi_read_version, - .read_cci = ucsi_zenbook_read_cci, - .read_message_in = ucsi_zenbook_read_message_in, - .sync_control = ucsi_sync_control_common, - .async_control = ucsi_acpi_async_control -}; - static int ucsi_gram_read_message_in(struct ucsi *ucsi, void*val,
size_tval_len)Quoted 2 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations · line 104
Quoted 2 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0{ u16 bogus_change =
UCSI_CONSTAT_POWER_LEVEL_CHANGE|Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-0@@ -190,13 +151,6 @@ static const struct ucsi_operations
ucsi_gram_ops= {Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_gram_ops = {
Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-3};static const struct dmi_system_id ucsi_acpi_quirks[] = { - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeKCOMPUTER INC."),
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations · line 196
Quoted 1 line
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-1- DMI_MATCH(DMI_PRODUCT_NAME,"ZenBook
UX325UA_UM325UA"),Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c static const struct ucsi_operations ucsi_gram_ops = {
Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_acpi.c +0
-3- }, - .driver_data = (void *)&ucsi_zenbook_ops, - }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LGElectronics"),
Quoted 2 lines
Quoted 2 lines
--
2.34.1
Signature · 1 line
heikki
Hi Heikki,
Quoted 36 lines · Heikki Krogerus
Hi Saranya, Christian,
Quoted 33 lines · Saranya
Hi Heikki, Christian,
Quoted 31 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki, Hi Saranya,
Quoted 2 lines · Heikki Krogerus
Quoted 1 line · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operationsand for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcalls fromother places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the default
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in Arrowlake-S
platforms.
Quoted 6 lines
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already (https://lore.kernel.org/linux-usb/[email protected]/T/#u).The other part still needs a fix.
Well technically not. I've established with the reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108
that the immediate regression (keyboard on ASUS laptop not working) is fixed with the ucsi.c patch (that got your Reviewed-By today) alone.
UCSI on the ASUS laptop is still broken but it always was, AFAICT. Thus I'd like to push the above mentioned patch as the fix for the regression.
The reporter was very helpful and responsive in testing and I intend to look into the reason why UCSI does not work after that with the reporter's help.
Quoted 52 lines · Christian A. Ehrhardt
Quoted 7 lines
Hi again,
attached is version 4 of the patch. This will not fix the error messages we talked about (I have to think about this some more).
Quoted 9 lines
It should fix your keyboard issues, though.
Heikki had another request to change the patch and it would be cool if you could test this version to make sure that it really fixes your immediate problem.
Best regards,
Christian[ 0.019168] [Firmware Bug]: CPU8: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 4 shift 7 != 6Quoted 2 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.
Quoted 6 lines
If you prefer that we go with Christian's patch to fix the issue
- which is fine by me - you need to rebase this on top of his patch in any case. So you will need to resend this either way.Christian would you mind resending that second patch after all where you take the Zenbook quirk into use on that ASUS system?
See above. The immediate regression is fixed with the already reviewed patch alone. The remaining issue with UCSI on the ASUS laptop not working can be fixed separately.
I'd rather base a fix for UCSI on the ASUS laptop onto Saranya's patch because I think that patch is the correct thing to do.
Unfortunately, testing by the original reporter was inconclusive wrt. this. I have one report of a test run with the (classical) ASUS quirk (and the other patch) where UCSI on the ASUS laptop did work. Patch version v1 was the result of this.
With Saranya's patch and my patch to ucsi.c the regression was gone but UCSI did _not_ work.
As this does not make sense because Saranya's patch should be equivalent to the ASUS zenbook quirk. Thus this needs more investigation and dropping the zenbook quirk patch looks like the correct thing to do.
Quoted 2 lines
Let's make that as the actual fix for the issue. Maybe it's more clear that way.
Please let me know if you disagree and I can resend the ASUS quirk patch.
Best regards,
Christian
Quoted 140 lines · Christian A. Ehrhardt
Hi Heikki,
Quoted 36 lines · Heikki Krogerus
Hi Saranya, Christian,
Quoted 33 lines · Saranya
Hi Heikki, Christian,
Quoted 31 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki, Hi Saranya,
Quoted 2 lines · Heikki Krogerus
Quoted 1 line · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operationsand for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcalls fromother places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the default
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in Arrowlake-S
platforms.
Quoted 6 lines
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already (https://lore.kernel.org/linux-usb/[email protected]/T/#u).The other part still needs a fix.
Well technically not. I've established with the reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108that the immediate regression (keyboard on ASUS laptop not working) is fixed with the
ucsi.cpatch (that got your Reviewed-By today) alone.UCSI on the ASUS laptop is still broken but it always was, AFAICT. Thus I'd like to push the above mentioned patch as the fix for the regression.
The reporter was very helpful and responsive in testing and I intend to look into the reason why UCSI does not work after that with the reporter's help.
Quoted 52 lines · Christian A. Ehrhardt
Quoted 7 lines
Hi again,
attached is version 4 of the patch. This will not fix the error messages we talked about (I have to think about this some more).
Quoted 9 lines
It should fix your keyboard issues, though.
Heikki had another request to change the patch and it would be cool if you could test this version to make sure that it really fixes your immediate problem.
Best regards,
Christian[ 0.019168] [Firmware Bug]: CPU8: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 4 shift 7 != 6Quoted 2 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.Quoted 6 lines
If you prefer that we go with Christian's patch to fix the issue
- which is fine by me - you need to rebase this on top of his patch in any case. So you will need to resend this either way.Christian would you mind resending that second patch after all where you take the Zenbook quirk into use on that ASUS system?
See above. The immediate regression is fixed with the already reviewed patch alone. The remaining issue with UCSI on the ASUS laptop not working can be fixed separately.
I'd rather base a fix for UCSI on the ASUS laptop onto Saranya's patch because I think that patch is the correct thing to do.
Unfortunately, testing by the original reporter was inconclusive wrt. this. I have one report of a test run with the (classical) ASUS quirk (and the other patch) where UCSI on the ASUS laptop did work. Patch version v1 was the result of this.
With Saranya's patch and my patch to
ucsi.cthe regression was gone but UCSI did _not_ work.As this does not make sense because Saranya's patch should be equivalent to the ASUS zenbook quirk. Thus this needs more investigation and dropping the zenbook quirk patch looks like the correct thing to do.
Quoted 5 lines
Quoted 2 lines
Let's make that as the actual fix for the issue. Maybe it's more clear that way.
Please let me know if you disagree and I can resend the ASUS quirk patch.
No, that's not necessary. So we go ahead with this patch from Saranya as is - we don't caim it fixes anything. Then you guys continue debugging that UCSI not working on the ASUS laptop issue. If I got this correct then:
If there was nothing else, then my appologies for all the noise.
thanks,
Signature · 1 line
heikki
Hi Heikki,
Quoted 144 lines · Heikki Krogerus
Quoted 143 lines · Christian A. Ehrhardt
Hi Heikki,
Quoted 36 lines · Heikki Krogerus
Hi Saranya, Christian,
Quoted 33 lines · Saranya
Hi Heikki, Christian,
Quoted 31 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki, Hi Saranya,
Quoted 2 lines · Heikki Krogerus
Quoted 1 line · Saranya Gopal
ACPI
_DSMmethods are needed only for UCSI write operationsand for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcalls fromother places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the default
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in Arrowlake-S
platforms.
Quoted 6 lines
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>Signed-off-by Saranya Gopal <[email protected]>Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already (https://lore.kernel.org/linux-usb/[email protected]/T/#u).The other part still needs a fix.
Well technically not. I've established with the reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108that the immediate regression (keyboard on ASUS laptop not working) is fixed with the
ucsi.cpatch (that got your Reviewed-By today) alone.UCSI on the ASUS laptop is still broken but it always was, AFAICT. Thus I'd like to push the above mentioned patch as the fix for the regression.
The reporter was very helpful and responsive in testing and I intend to look into the reason why UCSI does not work after that with the reporter's help.
Quoted 52 lines · Christian A. Ehrhardt
Quoted 7 lines
Hi again,
attached is version 4 of the patch. This will not fix the error messages we talked about (I have to think about this some more).
Quoted 9 lines
It should fix your keyboard issues, though.
Heikki had another request to change the patch and it would be cool if you could test this version to make sure that it really fixes your immediate problem.
Best regards,
Christian[ 0.019168] [Firmware Bug]: CPU8: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU8: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU9: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU10: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 4 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 5 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU11: Topology domain 6 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 1 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 2 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 3 shift 7 != 6 [ 0.019168] [Firmware Bug]: CPU12: Topology domain 4 shift 7 != 6Quoted 2 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.Quoted 6 lines
If you prefer that we go with Christian's patch to fix the issue
- which is fine by me - you need to rebase this on top of his patch in any case. So you will need to resend this either way.Christian would you mind resending that second patch after all where you take the Zenbook quirk into use on that ASUS system?
See above. The immediate regression is fixed with the already reviewed patch alone. The remaining issue with UCSI on the ASUS laptop not working can be fixed separately.
I'd rather base a fix for UCSI on the ASUS laptop onto Saranya's patch because I think that patch is the correct thing to do.
Unfortunately, testing by the original reporter was inconclusive wrt. this. I have one report of a test run with the (classical) ASUS quirk (and the other patch) where UCSI on the ASUS laptop did work. Patch version v1 was the result of this.
With Saranya's patch and my patch to
ucsi.cthe regression was gone but UCSI did _not_ work.As this does not make sense because Saranya's patch should be equivalent to the ASUS zenbook quirk. Thus this needs more investigation and dropping the zenbook quirk patch looks like the correct thing to do.
Quoted 2 lines
Let's make that as the actual fix for the issue. Maybe it's more clear that way.
Quoted 7 lines
Quoted 2 lines
Please let me know if you disagree and I can resend the ASUS quirk patch.
No, that's not necessary. So we go ahead with this patch from Saranya as is - we don't caim it fixes anything. Then you guys continue debugging that UCSI not working on the ASUS laptop issue. If I got this correct then:
Exactly. And
https://lore.kernel.org/all/[email protected]/
proceeds but is independent.
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>If there was nothing else, then my appologies for all the noise.
No need to. The state of things was confusing and this type of "noise" is your job as a maintainer :-)
Thanks for the review.
Best regards,
Christian
Hi Greg,
Quoted 225 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Wednesday, September 11, 2024 3:21 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki,
Quoted 1 line · Heikki Krogerus
On Mon, Sep 09, 2024 at 08:32:53PM +0200, Christian A. Ehrhardt
Quoted 4 lines · wrote:
Quoted 4 lines
Hi Heikki,
On Mon, Sep 09, 2024 at 12:20:47PM +0300, Heikki Krogerus
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Hi Saranya, Christian,
On Fri, Sep 06, 2024 at 11:47:42AM +0000, Gopal, Saranya
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Hi Heikki, Christian,
Quoted 6 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected];Regupathy,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
for UCSI read operations
Hi Heikki, Hi Saranya,
On Fri, Aug 30, 2024 at 11:44:33AM +0300, Heikki Krogerus
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Fri, Aug 30, 2024 at 02:13:42PM +0530, Saranya Gopal
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
ACPI
_DSMmethods are needed only for UCSI writeoperations
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
and for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcallsfrom
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
other places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the
default
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in
Arrowlake-S
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
platforms.
Quoted 2 lines
Quoted 2 lines
Reviewed-by Heikki KrogerusQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Saranya GopalQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already(https://lore.kernel.org/linux-usb/20240906065853.637205-1-lk@c--
e.de/T/#u).Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The other part still needs a fix.
Well technically not. I've established with the reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108that the immediate regression (keyboard on ASUS laptop not
working) is
Quoted 1 line
Quoted 1 line
fixed with the
ucsi.cpatch (that got your Reviewed-By today)alone.
Quoted 10 lines
Quoted 10 lines
UCSI on the ASUS laptop is still broken but it always was, AFAICT. Thus I'd like to push the above mentioned patch as the fix for the regression.
The reporter was very helpful and responsive in testing and I intend to look into the reason why UCSI does not work after that with the reporter's help.
Quoted 1 line
On Thu, 5 Sept 2024 at 20:00, Christian A. Ehrhardt <lk@c--
Quoted 6 lines · e.de> wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Hi again,
attached is version 4 of the patch. This will not fix the error messages we talked about (I have to think about this some
more).
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
It should fix your keyboard issues, though.
Heikki had another request to change the patch and it would
be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
cool if you could test this version to make sure that it really fixes your immediate problem.
Best regards,
Christian[ 0.019168] [Firmware Bug]: CPU8: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 4 shift 7!= 6
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.If you prefer that we go with Christian's patch to fix the issue
- which is fine by me - you need to rebase this on top of hispatch in
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
any case. So you will need to resend this either way.
Christian would you mind resending that second patch after all
where
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
you take the Zenbook quirk into use on that ASUS system?
See above. The immediate regression is fixed with the already reviewed patch alone. The remaining issue with UCSI on the ASUS laptop not working can be fixed separately.
I'd rather base a fix for UCSI on the ASUS laptop onto Saranya's patch because I think that patch is the correct thing to do.
Quoted 6 lines
Quoted 6 lines
Unfortunately, testing by the original reporter was inconclusive wrt. this. I have one report of a test run with the (classical) ASUS quirk (and the other patch) where UCSI on the ASUS laptop did work. Patch version v1 was the result of this.
With Saranya's patch and my patch to
ucsi.cthe regression wasgone
Quoted 8 lines
Quoted 8 lines
but UCSI did _not_ work.
As this does not make sense because Saranya's patch should be equivalent to the ASUS zenbook quirk. Thus this needs more investigation and dropping the zenbook quirk patch looks like the correct thing to do.
Quoted 1 line
Let's make that as the actual fix for the issue. Maybe it's more
clear
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
that way.
Please let me know if you disagree and I can resend the ASUS
quirk
Quoted 3 lines
Quoted 1 line
patch.
No, that's not necessary. So we go ahead with this patch from
Saranya
Quoted 3 lines
as is - we don't caim it fixes anything. Then you guys continue debugging that UCSI not working on the ASUS laptop issue. If I got this correct then:
Exactly. And
https://lore.kernel.org/all/[email protected]/
proceeds but is independent.
Quoted 8 lines
Quoted 3 lines
Reviewed-by Heikki Krogerus <[email protected]>If there was nothing else, then my appologies for all the noise.
No need to. The state of things was confusing and this type of "noise" is your job as a maintainer :-)
Thanks for the review.
Gentle ping to consider taking this patch.
Heikki and Christian have reviewed the patch and no more changes were suggested. The patch still applies clean to linux-next.
Please let me know if any more changes need to be made.
Thanks,
Saranya
Quoted 3 lines
Best regards,
Christian
[email protected]
maintainerQuoted 228 lines · Saranya
Hi Greg,
Quoted 227 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Wednesday, September 11, 2024 3:21 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsHi Heikki,
Quoted 1 line · Heikki Krogerus
On Mon, Sep 09, 2024 at 08:32:53PM +0200, Christian A. Ehrhardt
Quoted 4 lines · wrote:
Quoted 4 lines
Hi Heikki,
On Mon, Sep 09, 2024 at 12:20:47PM +0300, Heikki Krogerus
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Hi Saranya, Christian,
On Fri, Sep 06, 2024 at 11:47:42AM +0000, Gopal, Saranya
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Hi Heikki, Christian,
Quoted 6 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected];Regupathy,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
for UCSI read operations
Hi Heikki, Hi Saranya,
On Fri, Aug 30, 2024 at 11:44:33AM +0300, Heikki Krogerus
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Fri, Aug 30, 2024 at 02:13:42PM +0530, Saranya Gopal
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
ACPI
_DSMmethods are needed only for UCSI writeoperations
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
and for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcallsfrom
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
other places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the
default
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in
Arrowlake-S
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
platforms.
Quoted 2 lines
Quoted 2 lines
Reviewed-by Heikki KrogerusQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Saranya GopalQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Maybe this should be marked as a fix. I think this covers:
https://lore.kernel.org/linux-usb/20240829100109.562429-2-
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix already(https://lore.kernel.org/linux-usb/20240906065853.637205-1-lk@c--
e.de/T/#u).Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The other part still needs a fix.
Well technically not. I've established with the reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108that the immediate regression (keyboard on ASUS laptop not
working) is
Quoted 1 line
Quoted 1 line
fixed with the
ucsi.cpatch (that got your Reviewed-By today)alone.
Quoted 10 lines
Quoted 10 lines
UCSI on the ASUS laptop is still broken but it always was, AFAICT. Thus I'd like to push the above mentioned patch as the fix for the regression.
The reporter was very helpful and responsive in testing and I intend to look into the reason why UCSI does not work after that with the reporter's help.
Quoted 1 line
On Thu, 5 Sept 2024 at 20:00, Christian A. Ehrhardt <lk@c--
Quoted 6 lines · e.de> wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Hi again,
attached is version 4 of the patch. This will not fix the error messages we talked about (I have to think about this some
more).
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
It should fix your keyboard issues, though.
Heikki had another request to change the patch and it would
be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
cool if you could test this version to make sure that it really fixes your immediate problem.
Best regards,
Christian[ 0.019168] [Firmware Bug]: CPU8: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 4 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 5 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 6 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 1 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 2 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 3 shift 7!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 4 shift 7!= 6
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with any changes.If you prefer that we go with Christian's patch to fix the issue
- which is fine by me - you need to rebase this on top of hispatch in
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
any case. So you will need to resend this either way.
Christian would you mind resending that second patch after all
where
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
you take the Zenbook quirk into use on that ASUS system?
See above. The immediate regression is fixed with the already reviewed patch alone. The remaining issue with UCSI on the ASUS laptop not working can be fixed separately.
I'd rather base a fix for UCSI on the ASUS laptop onto Saranya's patch because I think that patch is the correct thing to do.
Quoted 6 lines
Quoted 6 lines
Unfortunately, testing by the original reporter was inconclusive wrt. this. I have one report of a test run with the (classical) ASUS quirk (and the other patch) where UCSI on the ASUS laptop did work. Patch version v1 was the result of this.
With Saranya's patch and my patch to
ucsi.cthe regression wasgone
Quoted 8 lines
Quoted 8 lines
but UCSI did _not_ work.
As this does not make sense because Saranya's patch should be equivalent to the ASUS zenbook quirk. Thus this needs more investigation and dropping the zenbook quirk patch looks like the correct thing to do.
Quoted 1 line
Let's make that as the actual fix for the issue. Maybe it's more
clear
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
that way.
Please let me know if you disagree and I can resend the ASUS
quirk
Quoted 3 lines
Quoted 1 line
patch.
No, that's not necessary. So we go ahead with this patch from
Saranya
Quoted 3 lines
as is - we don't caim it fixes anything. Then you guys continue debugging that UCSI not working on the ASUS laptop issue. If I got this correct then:
Exactly. And
https://lore.kernel.org/all/[email protected]/
proceeds but is independent.Quoted 2 lines
Reviewed-by Heikki Krogerus <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
If there was nothing else, then my appologies for all the noise.
No need to. The state of things was confusing and this type of "noise" is your job as a maintainer :-)
Thanks for the review.
Gentle ping to consider taking this patch.
It has been mere hours since the merge window closed and I could even consider applying this change. Please relax and understand the ecosystem in which you are working in (also remember the weeks of conferences most of us have been at right now.)
To help make this work better, please take the time to review other pending patches for the subsystem, which will ensure that your changes get moved to the top as others get reviewed. I'll wait for you to do that before getting to this one...
thanks,
greg k-h
Hi Greg,
Quoted 299 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, September 30, 2024 3:44 PM
To: Gopal, Saranya <[email protected]>
Cc: 'Christian A. Ehrhardt' <[email protected]>; Heikki Krogerus <[email protected]>; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod for UCSI read operationsQuoted 9 lines · Saranya
Hi Greg,
Quoted 8 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Wednesday, September 11, 2024 3:21 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected]; Regupathy, Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI_DSMmethod
Quoted 6 lines
Quoted 6 lines
for UCSI read operations
Hi Heikki,
On Tue, Sep 10, 2024 at 02:21:30PM +0300, Heikki Krogerus
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
On Mon, Sep 09, 2024 at 08:32:53PM +0200, Christian A.
Ehrhardt
Quoted 18 lines
Quoted 18 lines
Quoted 4 lines · wrote:
Quoted 4 lines
Hi Heikki,
On Mon, Sep 09, 2024 at 12:20:47PM +0300, Heikki Krogerus
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Hi Saranya, Christian,
On Fri, Sep 06, 2024 at 11:47:42AM +0000, Gopal, Saranya
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Hi Heikki, Christian,
Quoted 6 lines
-----Original Message-----
From: Christian A. Ehrhardt <[email protected]>
Sent: Saturday, August 31, 2024 3:40 AM
To: Heikki Krogerus <[email protected]>
Cc: Gopal, Saranya <[email protected]>; linux- [email protected]; [email protected];Quoted 3 lines
Quoted 3 lines
Regupathy,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Rajaram <[email protected]>
Subject: Re: [PATCH] usb: typec: ucsi: Do not call ACPI
_DSMQuoted 7 lines
Quoted 7 lines
method
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
for UCSI read operations
Hi Heikki, Hi Saranya,
On Fri, Aug 30, 2024 at 11:44:33AM +0300, Heikki
Krogerus
Quoted 2 lines
Quoted 2 lines
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Fri, Aug 30, 2024 at 02:13:42PM +0530, Saranya
Gopal
Quoted 5 lines
Quoted 5 lines
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
ACPI
_DSMmethods are needed only for UCSI writeoperations
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
and for reading
Quoted 1 line
Quoted 1 line
CCI during
RESET_PPMoperation. So, remove_DSMcalls
Quoted 9 lines
Quoted 9 lines
from
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
other places.
Quoted 1 line
Quoted 1 line
While there, remove the Zenbook quirk also since the
default
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
behavior
Quoted 1 line
Quoted 1 line
now aligns with the Zenbook quirk. With this change,
GET_CONNECTOR_STATUSQuoted 1 line
Quoted 1 line
returns at least 6 seconds faster than before in
Arrowlake-S
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
platforms.
Quoted 2 lines
Quoted 2 lines
Reviewed-by Heikki KrogerusQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Saranya GopalQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Maybe this should be marked as a fix. I think this
covers:
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
usb/20240829100109.562429-2-
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Heikki,
I see that Christian's other patch is marked as a fix alreadylk@c--
Quoted 4 lines
Quoted 4 lines
e.de/T/#u).
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
The other part still needs a fix.
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Well technically not. I've established with the reporter of
https://bugzilla.kernel.org/show_bug.cgi?id=219108that the immediate regression (keyboard on ASUS laptop not
working) is
Quoted 1 line
Quoted 1 line
fixed with the
ucsi.cpatch (that got your Reviewed-By today)alone.
Quoted 2 lines
Quoted 2 lines
UCSI on the ASUS laptop is still broken but it always was,
AFAICT.
Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 8 lines
Thus I'd like to push the above mentioned patch as the fix for the regression.
The reporter was very helpful and responsive in testing and I intend to look into the reason why UCSI does not work after that with the reporter's help.
Quoted 1 line
On Thu, 5 Sept 2024 at 20:00, Christian A. Ehrhardt <lk@c--
Quoted 4 lines · e.de> wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi again,
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
attached is version 4 of the patch. This will not fix the error messages we talked about (I have to think about this some
more).
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
It should fix your keyboard issues, though.
Heikki had another request to change the patch and it
would
Quoted 9 lines
Quoted 9 lines
be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
cool if you could test this version to make sure that it really fixes your immediate problem.
Best regards,
Christian[ 0.019168] [Firmware Bug]: CPU8: Topology domain 1shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 2shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 3shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 4shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 5shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU8: Topology domain 6shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 1shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 2shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 3shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 4shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 5shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU9: Topology domain 6shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 1shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 2shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 3shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 4shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 5shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU10: Topology domain 6shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 1shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 2shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 3shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 4shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 5shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU11: Topology domain 6shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 1shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 2shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 3shift 7
Quoted 2 lines
Quoted 2 lines
!= 6
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 0.019168] [Firmware Bug]: CPU12: Topology domain 4shift 7
Quoted 6 lines
Quoted 6 lines
!= 6
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
So, can this patch go in as it is?
Please let me know if I need to resubmit with anychanges.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If you prefer that we go with Christian's patch to fix the
issue
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
- which is fine by me - you need to rebase this on top of his
patch in
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
any case. So you will need to resend this either way.
Christian would you mind resending that second patch after
all
Quoted 5 lines
Quoted 5 lines
where
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
you take the Zenbook quirk into use on that ASUS system?
See above. The immediate regression is fixed with the already reviewed patch alone. The remaining issue with UCSI on the
ASUS
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
laptop not working can be fixed separately.
I'd rather base a fix for UCSI on the ASUS laptop onto
Saranya's
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
patch because I think that patch is the correct thing to do.
Unfortunately, testing by the original reporter was
inconclusive
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
wrt. this. I have one report of a test run with the (classical) ASUS quirk (and the other patch) where UCSI on the ASUS
laptop
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
did work. Patch version v1 was the result of this.
With Saranya's patch and my patch to
ucsi.cthe regressionwas
Quoted 4 lines
Quoted 4 lines
gone
Quoted 3 lines
Quoted 3 lines
but UCSI did _not_ work.
As this does not make sense because Saranya's patch should
be
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
equivalent to the ASUS zenbook quirk. Thus this needs more investigation and dropping the zenbook quirk patch looks like
the
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
correct thing to do.
Quoted 1 line
Let's make that as the actual fix for the issue. Maybe it's
more
Quoted 11 lines
Quoted 11 lines
clear
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
that way.
Please let me know if you disagree and I can resend the ASUS
quirk
Quoted 3 lines
Quoted 1 line
patch.
No, that's not necessary. So we go ahead with this patch from
Saranya
Quoted 2 lines
as is - we don't caim it fixes anything. Then you guys continue debugging that UCSI not working on the ASUS laptop issue. If I
got
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
this correct then:
Exactly. And
https://lore.kernel.org/all/20240906065853.637205-1-lk@c--e.de/
Quoted 3 lines
Quoted 3 lines
proceeds but is independent.
Quoted 1 line
Reviewed-by Heikki KrogerusQuoted 8 lines
Quoted 7 lines
Quoted 2 lines
If there was nothing else, then my appologies for all the noise.
No need to. The state of things was confusing and this type of "noise" is your job as a maintainer :-)
Thanks for the review.
Quoted 8 lines
Quoted 1 line
Gentle ping to consider taking this patch.
It has been mere hours since the merge window closed and I could even
consider applying this change. Please relax and understand the ecosystem in which you are working in (also remember the weeks of conferences most of us have been at right now.)
Sorry for my previous mail. I realize that the time I sent it wasn't correct.
Quoted 5 lines
To help make this work better, please take the time to review other pending patches for the subsystem, which will ensure that your changes
get moved to the top as others get reviewed. I'll wait for you to do that before getting to this one...
Sure, let me take the time to review the other pending patches.
Thanks,
Saranya
Quoted 4 lines
thanks,
greg k-h