Skip to contentSkip to conversation

i2c: Prevent log spam on some DVB adapters

PATCH In review Jean Delvare 2 participants 4 messages Aug 21, 2008 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: Prevent log spam on some DVB adapters

Some DVB adapters do not support the special I2C transaction that we use for probing purposes. There's no point in logging this event, as there's nothing the user can do and in general there is no actual problem. So, degrade one of these message to a debug message, and move the other one around so that it is only printed on bogus drivers.

---
 drivers/i2c/i2c-core.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/i2c/i2c-core.c +6 -6
@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte
 		 && address_data->normal_i2c[0] == I2C_CLIENT_END)
 			return 0;
 
-		dev_warn(&adapter->dev, "SMBus Quick command not supported, "
-			 "can't probe for chips\n");
+		dev_dbg(&adapter->dev, "SMBus Quick command not supported, "
+			"can't probe for chips\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter
 		}
 	}
 
+	/* Stop here if the classes do not match */
+	if (!(adapter->class & driver->class))
+		goto exit_free;
+
 	/* Stop here if we can't use SMBUS_QUICK */
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
 		if (address_data->probe[0] == I2C_CLIENT_END
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapter
 		goto exit_free;
 	}
 
-	/* Stop here if the classes do not match */
-	if (!(adapter->class & driver->class))
-		goto exit_free;
-
 	/* Probe entries are done second, and are not affected by ignore
 	   entries either */
 	for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {
Signature · 6 lines
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
#2 lore raw
In reply to a message not in the archive

Am Thursday 21 August 2008 15:15:56 schrieben Sie:

Quoted 38 lines

Some DVB adapters do not support the special I2C transaction that we use for probing purposes. There's no point in logging this event, as there's nothing the user can do and in general there is no actual problem. So, degrade one of these message to a debug message, and move the other one around so that it is only printed on bogus drivers.

---
 drivers/i2c/i2c-core.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.27-rc4.orig/drivers/i2c/i2c-core.c 2008-08-21
14:04:03.000000000 +0200 +++
linux-2.6.27-rc4/drivers/i2c/i2c-core.c 2008-08-21 14:58:14.000000000 +0200

drivers/i2c/i2c-core.c +6 -2
@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte
 		 && address_data->normal_i2c[0] == I2C_CLIENT_END)
 			return 0;
 
-		dev_warn(&adapter->dev, "SMBus Quick command not supported, "
-			 "can't probe for chips\n");
+		dev_dbg(&adapter->dev, "SMBus Quick command not supported, "
+			"can't probe for chips\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter
 		}
 	}
 
+	/* Stop here if the classes do not match */
+	if (!(adapter->class & driver->class))
+		goto exit_free;
+
 	/* Stop here if we can't use SMBUS_QUICK */
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
 		if (address_data->probe[0] == I2C_CLIENT_END

drivers/i2c/i2c-core.c static int i2c_detect(struct i2c_adapter · line 1373

Quoted 10 lines
drivers/i2c/i2c-core.c +0 -4
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapter
 		goto exit_free;
 	}
 
-	/* Stop here if the classes do not match */
-	if (!(adapter->class & driver->class))
-		goto exit_free;
-
 	/* Probe entries are done second, and are not affected by ignore
 	   entries either */
 	for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {

Salut Jean,

in case that you change the following:

@@ -1188,8 +1188,8 @@ int i2c_probe(struct i2c_adapter *adapte

instead of:

@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte,

@@ -1350,6 +1350,10 @@ static int i2c_detect(struct i2c_adapter

instead of:

@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter,

@@ -1362,10 +1366,6 @@ static int i2c_detect(struct i2c_adapte

instead of:

@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapte

I'll give you my: Signed-Off-By: Uwe Bugla <[email protected]>

for your patch material......

Mille fois merci encore une fois! : )

I've understood the issue in so far that this patch stuff only suppresses the symptom, but does not cure the source problem, and I'd be very happy to see a card driver fully supporting the I2C bus.

And if I'm not completely aside my DVB-S card runs somwhow now, but it runs with an applied brake.

Fact is that the nerving messages are gone : )

C'est une plaisanterie travailler avec toi, Jean! : )

On se verra

Uwe

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

#4 lore raw
In reply to a message not in the archive
Quoted 74 lines · Uwe Bugla

Am Thursday 21 August 2008 15:15:56 schrieben Sie:

Quoted 38 lines

Some DVB adapters do not support the special I2C transaction that we use for probing purposes. There's no point in logging this event, as there's nothing the user can do and in general there is no actual problem. So, degrade one of these message to a debug message, and move the other one around so that it is only printed on bogus drivers.

---
 drivers/i2c/i2c-core.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.27-rc4.orig/drivers/i2c/i2c-core.c 2008-08-21
14:04:03.000000000 +0200 +++
linux-2.6.27-rc4/drivers/i2c/i2c-core.c 2008-08-21 14:58:14.000000000 +0200

drivers/i2c/i2c-core.c +6 -2
@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte
 		 && address_data->normal_i2c[0] == I2C_CLIENT_END)
 			return 0;
 
-		dev_warn(&adapter->dev, "SMBus Quick command not supported, "
-			 "can't probe for chips\n");
+		dev_dbg(&adapter->dev, "SMBus Quick command not supported, "
+			"can't probe for chips\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter
 		}
 	}
 
+	/* Stop here if the classes do not match */
+	if (!(adapter->class & driver->class))
+		goto exit_free;
+
 	/* Stop here if we can't use SMBUS_QUICK */
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
 		if (address_data->probe[0] == I2C_CLIENT_END

drivers/i2c/i2c-core.c static int i2c_detect(struct i2c_adapter · line 1373

Quoted 10 lines
drivers/i2c/i2c-core.c +0 -4
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapter
 		goto exit_free;
 	}
 
-	/* Stop here if the classes do not match */
-	if (!(adapter->class & driver->class))
-		goto exit_free;
-
 	/* Probe entries are done second, and are not affected by ignore
 	   entries either */
 	for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {

Salut Jean,

in case that you change the following:

(quoted diff) +0 -0
@@ -1188,8 +1188,8 @@ int i2c_probe(struct i2c_adapter *adapte
 

instead of:

(quoted diff) +0 -0
@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte,
 
@@ -1350,6 +1350,10 @@ static int i2c_detect(struct i2c_adapter
 

instead of:

(quoted diff) +0 -0
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter,
 
@@ -1362,10 +1366,6 @@ static int i2c_detect(struct i2c_adapte
 

instead of:

(quoted diff) +0 -0
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapte
 

I'll give you my: Signed-Off-By: Uwe Bugla <[email protected]>

Quoted 1 line

for your patch material......

Err, I'm not sure I quite follow you. You're worried about the 2 line offset? That's nothing to worry about. It happens all the time, and is not a problem at all. Patches with offsets still apply OK. I probably have an additional patch to the same file in my tree, and that's about it.

Quoted 8 lines

Mille fois merci encore une fois! : )

I've understood the issue in so far that this patch stuff only suppresses the symptom, but does not cure the source problem, and I'd be very happy to see a card driver fully supporting the I2C bus.

And if I'm not completely aside my DVB-S card runs somwhow now, but it runs with an applied brake.

The metaphor is probably slightly exaggerated, initialization might be a little slower than it should, but after that the remaining bug should have no effect.

Quoted 3 lines

Fact is that the nerving messages are gone : )

C'est une plaisanterie travailler avec toi, Jean! : )

False friends... The above translates to "it's a joke to work with you" when you meant - I guess and hope - "it's pleasant to work with you" ;)

But thanks anyway :)

Signature · 6 lines
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
#6 lore raw
In reply to a message not in the archive

Am Thursday 21 August 2008 16:59:25 schrieben Sie:

Quoted 96 lines · Uwe Bugla
Quoted 74 lines

Am Thursday 21 August 2008 15:15:56 schrieben Sie:

Quoted 38 lines

Some DVB adapters do not support the special I2C transaction that we use for probing purposes. There's no point in logging this event, as there's nothing the user can do and in general there is no actual problem. So, degrade one of these message to a debug message, and move the other one around so that it is only printed on bogus drivers.

---
 drivers/i2c/i2c-core.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.27-rc4.orig/drivers/i2c/i2c-core.c 2008-08-21
14:04:03.000000000 +0200 +++
linux-2.6.27-rc4/drivers/i2c/i2c-core.c 2008-08-21 14:58:14.000000000
+0200 @@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte && address_data->normal_i2c[0] == I2C_CLIENT_END)

drivers/i2c/i2c-core.c +6 -2
 			return 0;
 
-		dev_warn(&adapter->dev, "SMBus Quick command not supported, "
-			 "can't probe for chips\n");
+		dev_dbg(&adapter->dev, "SMBus Quick command not supported, "
+			"can't probe for chips\n");
 		return -EOPNOTSUPP;
 	}
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter
 		}
 	}
 
+	/* Stop here if the classes do not match */
+	if (!(adapter->class & driver->class))
+		goto exit_free;
+
 	/* Stop here if we can't use SMBUS_QUICK */
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
 		if (address_data->probe[0] == I2C_CLIENT_END

drivers/i2c/i2c-core.c static int i2c_detect(struct i2c_adapter · line 1373

Quoted 10 lines
drivers/i2c/i2c-core.c +0 -4
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapter
 		goto exit_free;
 	}
 
-	/* Stop here if the classes do not match */
-	if (!(adapter->class & driver->class))
-		goto exit_free;
-
 	/* Probe entries are done second, and are not affected by ignore
 	   entries either */
 	for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {

Salut Jean,

in case that you change the following:

(quoted diff) +0 -0
@@ -1188,8 +1188,8 @@ int i2c_probe(struct i2c_adapter *adapte
 

instead of:

(quoted diff) +0 -0
@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapte,
 
@@ -1350,6 +1350,10 @@ static int i2c_detect(struct i2c_adapter
 

instead of:

(quoted diff) +0 -0
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter,
 
@@ -1362,10 +1366,6 @@ static int i2c_detect(struct i2c_adapte
 

instead of:

(quoted diff) +0 -0
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapte
 

I'll give you my: Signed-Off-By: Uwe Bugla <[email protected]>

Quoted 1 line

for your patch material......

Err, I'm not sure I quite follow you. You're worried about the 2 line offset? That's nothing to worry about. It happens all the time, and is not a problem at all. Patches with offsets still apply OK. I probably have an additional patch to the same file in my tree, and that's about it.

Quoted 8 lines

Mille fois merci encore une fois! : )

I've understood the issue in so far that this patch stuff only suppresses the symptom, but does not cure the source problem, and I'd be very happy to see a card driver fully supporting the I2C bus.

And if I'm not completely aside my DVB-S card runs somwhow now, but it runs with an applied brake.

The metaphor is probably slightly exaggerated, initialization might be a little slower than it should, but after that the remaining bug should have no effect.

Quoted 8 lines
Quoted 3 lines

Fact is that the nerving messages are gone : )

C'est une plaisanterie travailler avec toi, Jean! : )

False friends... The above translates to "it's a joke to work with you" when you meant - I guess and hope - "it's pleasant to work with you" ;)

But thanks anyway :)

Jean,

I'm so much longing to go to France for some weeks to improve my language practice. It's rotten, and I know that........
I prefer the department of Herault and Carcassonne. It's half Spanish and half French there, and it's very agreeable down there. I hate Paris and all the North of France.... That's in the same way petit-bourgeois as whole Germany is
- just horrible!
There are severe sanitary problems of a very severe kind retaining me from doing what I want.
I certainly meant the second choice - how could I be cynical enough to mean the first one? Impossible!!!

It's me to say "Thank you", not you.
And I'd really be happy if the majority of the linuxtv "maintainers" (whatever that might mean in that specific context) would be as friendly and reliable as you are. : )
But that's only a dream, and that's condemned to be a dream - just a dream!

On se verra

Uwe

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c