Mercurial > illumos > git > illumos-joyent
changeset 25592:03b38e24bfd3
13343 some mlxcx devices don't support temperature sensors
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Jerry Jelinek <gjelinek@gmail.com>
Reviewed by: Andy Fiddaman <andy@omnios.org>
Reviewed by: Paul Winder <paul@winder.uk.net>
Approved by: Dan McDonald <danmcd@joyent.com>
author | Robert Mustacchi <rm@fingolfin.org> |
---|---|
date | Fri, 20 Nov 2020 10:06:59 -0800 |
parents | 28fe0f57abf4 |
children | 4483942be336 |
files | usr/src/uts/common/io/mlxcx/mlxcx.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/mlxcx/mlxcx.c Mon Dec 07 13:11:22 2020 +0200 +++ b/usr/src/uts/common/io/mlxcx/mlxcx.c Fri Nov 20 10:06:59 2020 -0800 @@ -2874,10 +2874,14 @@ } mlxp->mlx_attach |= MLXCX_ATTACH_CHKTIMERS; - if (!mlxcx_setup_sensors(mlxp)) { - goto err; + /* + * Some devices may not have a working temperature sensor; however, + * there isn't a great way for us to know. We shouldn't fail attach if + * this doesn't work. + */ + if (mlxcx_setup_sensors(mlxp)) { + mlxp->mlx_attach |= MLXCX_ATTACH_SENSORS; } - mlxp->mlx_attach |= MLXCX_ATTACH_SENSORS; /* * Finally, tell MAC that we exist!