Trying to fix a kernel module... (DETAILED!)

Hi,
I’m trying to fix a modem driver kernel module on my SuSE system… so I hope this is the right place to ask.
The module is a driver for my LSI 11c11040 modem, and LSI rarely releases updates to their drivers unless paid by a company, so it’s up to myself and the rest of the Linmodems discussion group to hack something together that works until such an update.

The issue is that on attempting to access the modem port on a 2.6.25.11 system, the driver produces a kernel OOPS message, whereas the modem works fine on 2.6.25.9.
After a few hours of bugtracing, I’ve tracked it down to a single line in the code:
<snip>
char findHDACodec(void)
{
int i;
struct azx *chip_temp;
struct hda_bus *bus_temp;
struct hda_codec *codec_temp;
chip_temp = snd_cards[0]->private_data; //probe
bus_temp = chip_temp->bus;

for (i=0; i<16; i++)
{
codec_temp = bus_temp->caddr_tbl*;
<snip>

The last line (codec_temp = bus_temp ->caddr_tbl*) causes the OOPS, with ‘unable to handle kernel paging request’… So it sounds like a null pointer to me.
Since the line ‘bus_temp = chip_temp → bus;’ works, it’s my guess that either the ‘bus’ member of the chip_temp struct has become deprecated (possible, since find_pci_slot() also was in this kernel release) or that a structure value was renamed… (less likely.)

As I see it, there are two things I can try from here:

  1. Find some way to print the contents of the structures to /var/log/messages to see where something went wrong
  2. Trace back the calls to external structures in to the linux source to find what changes were made to that section of the kernel code from v. 2.6.25.9 to 2.6.25.11.

FWIW, the changes are NOT in the ALSA section of the kernel code, since both kernels have those sections identical (verified with diff, also both same version, 1.0.16rc2).
Since this code works fine before the kernel upgrade, I am fairly confident the driver code itself is fine, and that the problem itself lies somewhere in the external structure snd_cards].

Any thoughts and help are appreciated, I can get you more sections of the code and crash logs if needed.
Thanks!
VintagePC

P.S. just noticed my title text ‘Puzzled Penguin’… How appropriate :)**

Resolved.
Turned out there was some stray crud in my /usr/src/linux directory that ‘make clean’ wasn’t getting rid of.