Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unable to probe emc2301/2/3 #312

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

Pavan-Nokia
Copy link
Contributor

@Pavan-Nokia Pavan-Nokia commented Mar 24, 2023

The current code only supports EMC2305, enable support for EMC2301/2/3 also
Same driver is used for EMC 2301/2/3/5 family of products.
https://docs.kernel.org/hwmon/emc2305.html

The definitions of 'EMC2305_REG_PRODUCT_ID' and 'EMC2305_REG_DEVICE' are
both '0xfd', they actually return the same value, but the values returned
by emc2301/2/3/5 are different, so probe emc2301/2/3 will fail, This patch
fixes that.

upstream commit:
torvalds/linux@4d50591

Signed-off-by: Natarajan Subbiramani natarajan.subbiramani.ext@nokia.com
Signed-off-by: Xingjiang Qiao nanpuyue@gmail.com
Link: https://lore.kernel.org/r/20221206055331.170459-1-nanpuyue@gmail.com
Fixes: 0d8400c ("hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller.")
Signed-off-by: Guenter Roeck linux@roeck-us.net

@saiarcot895
Copy link
Contributor

Can you add a reference to the upstream commit, and add in the second chunk of that change where device is being removed?

torvalds/linux@4d50591

patch/0001-hwmon-supporting-emc2302.patch Outdated Show resolved Hide resolved
patch/series Outdated Show resolved Hide resolved
patch/0001-hwmon-supporting-emc2302.patch Outdated Show resolved Hide resolved
patch/0001-hwmon-supporting-emc2302.patch Outdated Show resolved Hide resolved
patch/0001-hwmon-supporting-emc2302.patch Outdated Show resolved Hide resolved
@paulmenzel
Copy link
Contributor

Please add a space after [patch] (maybe spell it [PATCH]). No idea, if the tag is needed though.

The definitions of 'EMC2305_REG_PRODUCT_ID' and 'EMC2305_REG_DEVICE' are
both '0xfd', they actually return the same value, but the values returned
by emc2301/2/3/5 are different, so probe emc2301/2/3 will fail, This patch
fixes that.

upstream commit:
torvalds/linux@4d50591

Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani.ext@nokia.com>
Signed-off-by: Xingjiang Qiao <nanpuyue@gmail.com>
Link: https://lore.kernel.org/r/20221206055331.170459-1-nanpuyue@gmail.com
Fixes: 0d8400c ("hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller.")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
@Pavan-Nokia Pavan-Nokia changed the title [patch]Add hwmon support for EMC2302 Fix unable to probe emc2301/2/3 Mar 31, 2023
@Pavan-Nokia
Copy link
Contributor Author

Pavan-Nokia commented Apr 4, 2023

Hi @paulmenzel @saiarcot895 Thanks for the review. I have addressed the review comments and updated the PR. Please review.

@saiarcot895 saiarcot895 merged commit fbd307e into sonic-net:master Apr 4, 2023
@paulmenzel
Copy link
Contributor

Please revert and backport the upstream commit 4d50591ebf60 (hwmon: (emc2305) fix unable to probe emc2301/2/3).

@Pavan-Nokia, why did you not check that?

@Pavan-Nokia, please make up for this, by sending a message to stable@vger.kernel.org asking to backport this patch to the stable series.

PS: patch/0087-hwmon-Add-support-for-EMC2305-RPM-based-PWM-Fan-Spee.patch was added to Linux v6.1-rc1 in commit 0d8400c5a2ce1595f31b2f99e3139cf5bc5f35fd.

@paulmenzel
Copy link
Contributor

@Pavan-Nokia, please make up for this, by sending a message to stable@vger.kernel.org asking to backport this patch to the stable series.

The driver was only added in Linux v6.1-rc1, the commit adding the driver would also need to be backported.

@Pavan-Nokia
Copy link
Contributor Author

Hi Paul

  1. I did check torvalds/linux@4d50591
    before creating this PR and have added the link to the upstream commit in the PR description, commit message as well as the patch file.

  2. I will send an email to stable@vger.kernel.org and ask them to backport the 2 commits from V6.1 to V5.10. In the mean time can we keep this Merged PR with an understanding that it would be removed with a future sonic-kernel update similar to what Linux 5.10.140 update #297 did.
    looking at Linux 5.10.140 update #297, Linux 5.10.103 update #277 etc. My understanding is this is the standard process of how it has been done in sonic all this while

vivekrnv added a commit to vivekrnv/sonic-buildimage that referenced this pull request Apr 5, 2023
Update sonic-linux-kernel submodule pointer to include the following:
* 6f38dca Provision the ability to apply the non upstream patches in any order ([sonic-net#313](sonic-net/sonic-linux-kernel#313))
* fbd307e Fix unable to probe emc2301/2/3 ([sonic-net#312](sonic-net/sonic-linux-kernel#312))

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@paulmenzel
Copy link
Contributor

I am sorry for missing this detail and overreacting. Please accept my apologies.

Next time, if you found the upstream commit, you should have cherry-picked it so the author information would have been from the upstream author. Also for backports, the upstream commit is usually mentioned right at the top.

[ Upstream commit 4d50591ebf60ccf79380fff3a4c23659c61c482f ]

@Pavan-Nokia Pavan-Nokia deleted the dev_enable_fan_driver branch April 6, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants