Steven Stallion wrote:
> On Wed, 27 Feb 2008 20:51:14 -0800, Garrett D'Amore
> <[EMAIL PROTECTED]> wrote:
>
>> First off, _info has nothing to do with the gld_getinfo. You
>> definitely do not a getinfo(9e) entry point with a GLDv2 or v3 driver.
>> (GLDv2 should do qassociate on your behalf, obviating the need for a
>> non-NULL getinfo(9e) -- note that this is only true for Solaris 9 (?)
>> and later -- earlier Solaris 8 still needed a getinfo(9e).)
>>
>> Your driver is also a GLDv3 driver. For that, it would be informative
>> to post your _init(). My guess is that that this is where the problem
>> lies.
>>
>
> That was my first assumption, however the breakpoint for dnet`_init was
> never reached (using dnet`_init:b) - dnet`_info and dnet`_fini worked fine.
>
Over the course of history, I've learned that sometimes the breakpoint
on a function entry doesn't always get triggered. Adding 4 or 8 to the
function entry (_init+4:b) may show different results.
_init is surely the first thing called in any kernel module. Put a
cmn_err() debug message if you really want to see it.
> . I thought this was exceptionally odd, I thought _init was always called
> first? Is _init not called again when update_drv is called? If not, what
> would be the correct approach to catch that breakpoint from within kmdb?
>
>
>> Note that if _init is not getting called, then something is very very
>> wrong. This should be the very first routine called in any kernel
>>
> module.
>
> _init posted below:
>
> 349 int
> 350 _init(void)
> 351 {
> 352 int i;
> 353
> 354 /* Configure fake sroms for legacy cards */
> 355 mutex_init(&dnet_rbuf_lock, NULL, MUTEX_DRIVER, NULL);
> 356 setup_legacy_blocks();
>
Hmm... setup_legacy_blocks() looks suspicious. I'd do that *after*
calling mac_init_ops. In fact, mac_init_ops should *probably* be the
first thing you do, though it won't matter for the mutex_init().
-- Garrett
> 357
> 358 mac_init_ops(&dnet_ops, "dnet");
> 359
> 360 if ((i = mod_install(&modlinkage)) != 0) {
> 361 mutex_destroy(&dnet_rbuf_lock);
> 362 mac_fini_ops(&dnet_ops);
> 363 }
> 364 return (i);
> 365 }
>
> Steve
>
>
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss