2

I'm trying to debug why a change I made isn't working as it should. It's quite strange because there's two different builds of this driver running simultaneously (mpt2sas and mpt3sas) and the change is such that it's identical for both. The change works in mpt2sas but not in mpt3sas. I've got to figure out why. My first thought: print out what is actually being inspected by the driver.

To that end, I've read stuff from here and have referenced a few links from Stack Overflow about similar problems (e.g. this answer and this question). My current printk levels:

[root@dmandylnx64 ~]# cat /proc/sys/kernel/printk
8       4       1       7

Yet, I see no output when I do something like this:

dmesg | less   # and search around for my strings

I found another link stating that the kernel buffers are made available through /proc/kmsg. So, I did

cat /proc/kmsg

... still not dice. I run my program and see no printks. One of the links I provided above stated something like, "... changing printk to pr_info did the trick ...". Well, I tried that too.

printk(KERN_DEBUG "MPT3SAS: 0x%08x\n", someIntegerData);
// became
pr_dbg("MPT3SAS: 0x%08x\n", someIntegerData);

Nope, that didn't work either. I upped the priority by changing them from DEBUG level to INFO level. Nope, that didn't work.

The question is really simple: what am I missing?

edit I forgot to mention, not even sure it is relevant, but this is CentOS 6.5.

Thanks,
Andy

Community
  • 1
  • 1
Andrew Falanga
  • 2,274
  • 4
  • 26
  • 51
  • @osgx That is a great question and must be asked. Yes, I did reboot. I even used modinfo to make sure that the version numbers and stamps I'd changed in the appropriate headers where updated. – Andrew Falanga Apr 14 '14 at 21:10
  • 2
    @AndrewFalanga Where are your printk() messages? Are they in your module init? Can you try printk("<1> Test....\n");? – Peter L. Apr 14 '14 at 21:20
  • Is `printk` with `KERN_ALERT` working? – Alexander Dzyoba Apr 15 '14 at 15:04
  • I cannot say that I know what the problem was. I conferred with a colleague in another office (a couple of states away) and we found that it did work, but this came after some rebuilds. I think that, somehow, my build environment became corrupted. At one point, I wasn't able to load modules built from this source tree enough though the kernel was built from the same tree. A clean of the build area and rebuild/reinstall of everything seems to have corrected things. – Andrew Falanga Apr 15 '14 at 22:11

0 Answers0