sensors command requires manual loading of 'ibmpowernv' module

Bug #1452473 reported by bugproxy
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Canonical Kernel Team

Bug Description

== Comment: #0 - Shilpasri G. Bhat <email address hidden> - 2015-05-06 12:55:40 ==
"ibmpowernv" module is not auto loaded. This leads to failure of 'sensors' command.
Either have 'CONFIG_SENSORS_IBMPOWERNV=y' to statically build this module or an rc script to load this during init to promote seamless operation of 'sensors' command.

---uname output---
3.19.0-15-generic

---Steps to Reproduce---
 #sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

Contact Information = Shilpasri G Bhat / <email address hidden>

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-124702 severity-medium targetmilestone-inin1510
Dave Heller (hellerda)
affects: ubuntu → linux (Ubuntu)
penalvch (penalvch)
Changed in linux (Ubuntu):
importance: Undecided → High
status: New → Triaged
Chris J Arges (arges)
Changed in linux (Ubuntu):
assignee: nobody → Chris J Arges (arges)
Chris J Arges (arges)
Changed in linux (Ubuntu):
assignee: Chris J Arges (arges) → nobody
Chris J Arges (arges)
Changed in linux (Ubuntu):
assignee: nobody → Chris J Arges (arges)
Revision history for this message
Chris J Arges (arges) wrote :

This also exists upstream.

Looks like the modalias that gets generated is:
$ cat /lib/modules/`uname -r`/modules.alias | grep ibmpowernv
alias platform:opal-sensor ibmpowernv

Where OF creates this for the device:
$ cat /sys/devices/platform/opal-sensor/modalias
of:NsensorsT<NULL>

If I make the module use the OF string it still doesn't seem to work. Patch below:

diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
index 4255514..c872818 100644
--- a/drivers/hwmon/ibmpowernv.c
+++ b/drivers/hwmon/ibmpowernv.c
@@ -466,19 +466,17 @@ static int ibmpowernv_probe(struct platform_device *pdev)
        return PTR_ERR_OR_ZERO(hwmon_dev);
 }

-static const struct platform_device_id opal_sensor_driver_ids[] = {
- {
- .name = "opal-sensor",
- },
- { }
+static const struct of_device_id opal_sensor_match[] = {
+ { .compatible = "sensors",},
+ {},
 };
-MODULE_DEVICE_TABLE(platform, opal_sensor_driver_ids);
+MODULE_DEVICE_TABLE(of, opal_sensor_match);

 static struct platform_driver ibmpowernv_driver = {
        .probe = ibmpowernv_probe,
- .id_table = opal_sensor_driver_ids,
        .driver = {
                .name = DRVNAME,
+ .of_match_table = opal_sensor_match,
        },
 };

Any suggestions?

Chris J Arges (arges)
Changed in linux (Ubuntu):
importance: High → Low
no longer affects: linux (Ubuntu Vivid)
Chris J Arges (arges)
Changed in linux (Ubuntu):
assignee: Chris J Arges (arges) → nobody
status: Triaged → Confirmed
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-06-25 10:22 EDT-------
*** Bug 126635 has been marked as a duplicate of this bug. ***

Chris J Arges (arges)
Changed in linux (Ubuntu):
importance: Low → Medium
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-08-24 16:59 EDT-------
Externalizing this comment, sorry you didn't see this before.

(In reply to comment #5)
> (In reply to comment #2)
> > Agreed, mirroring...
> >
> > Maybe adding the module to /etc/modules is all that's required. Can you
> > give that a quick test please?
>
> Verified by adding "ibmpowernv" to /etc/modules. Tested and works fine.
>
> Thanks and Regards,
> Shilpa

Changed in linux (Ubuntu):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
status: Confirmed → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Can we consider this issue resolved per comment #3? Or would IBM still prefer to have CONFIG_SENSORS_IBMPOWERNV=y built in vs. enabled as a module?

Revision history for this message
Breno Leitão (breno-leitao) wrote :

I understand we don't need OCNFIG_SENSORS_IBMPOWERNV=y, as the solution on comment #3 works.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-02-04 13:01 EDT-------
*** Bug 126635 has been marked as a duplicate of this bug. ***

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-10-03 09:38 EDT-------
*** Bug 127378 has been marked as a duplicate of this bug. ***

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.