Garrett D'Amore wrote: > On Tue, 2007-09-11 at 17:47 +0200, [EMAIL PROTECTED] wrote: > >> Garrett D'Amore wrote: >> >>> On Tue, 2007-09-11 at 10:22 -0400, Daniel Corbe wrote: >>> >>> >>>> You guys are extremely patient with answering these questions, thank >>>> you. >>>> >>>> >>>> I've run into another issue. >>>> >>>> >>>> Running add_drv causes my system to reboot. I assume it's something >>>> I'm doing wrong. I figured it had something to do with either the >>>> attach or getinfo procedures in my driver, and in fact the getinfo >>>> procedure is using an uninitialized pointer. >>>> >>>> >>> I don't think getinfo() is the problem... its more likely to be >>> attach(). (getinfo() is normally only called as part of Dynamic >>> Reconfiguration operation, IIRC.) >>> >>> -- Garrett >>> >>> >> Actually, getinfo() is called twice on open(2). Try >> >> # dtrace -n 'pts_devinfo:entry{stack();}' >> >> and then open a new terminal window. The pts_devinfo() routine is the >> getinfo for the pseudo terminal slave >> driver (also a streams driver). >> > > Is that true for all drivers, or just clone devices? I confess I've not > looked at getinfo() much lately.. most of the NIC drivers these days > don't need a getinfo(), since they use qassociate() to provide the > mapping between dev_info_t and streams. > > -- Garrett > Yes. True for all drivers that use cb_ops. See getinfo(9e) and ddi_no_info(9f). And I thought pts was cloned, but glancing at the source code, I guess not!?
max _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss