From c2e45973a724fb32a9d890a6e836735aa7fc053e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 9 Mar 2011 11:15:37 -0300 Subject: [PATCH] parse_em28xx.pl: Parse also i2c device scans While comparing the parsed messages between the saved register data of em28xx and netmon parser, noticed that the scan messages were not parsed. Also, it seems that the data from the driver is wrong, as it is saying that some data were returned by the probed devices. Comparing both logs is actually a very good test, as it shows that the netfilter parser is working properly, as the only differences are on the I2C scan messages. Signed-off-by: Mauro Carvalho Chehab --- contrib/em28xx/parse_em28xx.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/em28xx/parse_em28xx.pl b/contrib/em28xx/parse_em28xx.pl index 05e12db..e4b5525 100755 --- a/contrib/em28xx/parse_em28xx.pl +++ b/contrib/em28xx/parse_em28xx.pl @@ -282,8 +282,14 @@ while (<>) { if (m/40 0[23] 00 00 ([0-9a-f].) 00 ([0-9a-f].) 00\s+[\>]+\s+([0-9a-f ]+)/) { printf "i2c_master_send(0x$1>>1, { $3 }, 0x$2);\n"; + next; } if (m/c0 0[23] 00 00 ([0-9a-f].) 00 ([0-9a-f].) 00\s+[\<]+\s+([0-9a-f ]+)/) { printf "i2c_master_recv(0x$1>>1, &buf, 0x$2); /* $3 */\n"; + next; + } + if (m/c0 0[23] 00 00 ([0-9a-f].) 00 ([0-9a-f].) 00\s+[\<]+/) { + printf "i2c_master_recv(0x$1>>1, &buf, 0x$2); /* nothing returned */\n"; + next; } } -- 2.7.4