Date: Fri, 5 Jun 2009 08:36:04 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-drivers@freebsd.org Cc: AJ Shipley <aric.shipley@gmail.com> Subject: Re: Kernel Loadable Driver vs. Custom Compiled Driver Question Message-ID: <200906050836.04538.jhb@freebsd.org> In-Reply-To: <be8835320906041202g18ee68ccm159501adc7d17f4d@mail.gmail.com> References: <be8835320906041202g18ee68ccm159501adc7d17f4d@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 04 June 2009 3:02:30 pm AJ Shipley wrote: > Hi, >=20 > I am in the process of integrating a 3rd party HW vendor=92s driver into > our FreeBSD code base. The driver works when it is loaded as a KLM > using kldload =96v <driver_name> but when I modified the kernel using > config and compiled the driver into the kernel, it does not work. The > kernel builds and installs fine, but the driver does not load > correctly. >=20 > I was able to verify that the first 10 steps of the driver works > during load in both cases and that the driver is loading the device > into the same PCI memory range (it=92s a PCI based HW card). However, > at a critical step in the driver, it polls an ISR register waiting for > a bit to toggle high indicating that the board is ready and out of > reset and it never does, and eventually hits the driver timeout and > aborts its load. >=20 > Why would a driver work as a KLM but not statically compiled into the=20 kernel? Are you depending on working interrupts? If so, you will need to defer tha= t=20 work using config_intrhook(9). =2D-=20 John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906050836.04538.jhb>