MII & GMII Common Layer [PSARC/2009/319 FastTrack timeout 06/01/2009]

James Carlson james.d.carlson at sun.com
Tue May 26 09:25:45 PDT 2009


Garrett D'Amore writes:
> James Carlson wrote:
> > Ah, ok.  As long as none of the registers can ever legitimately have
> > 0xffff in them, I guess it's ok.
> >   
> 
> Well, I suppose some register *could*, but I've yet to see it.  The spec 
> say that unimplemented registers should return this value.

Good point; that does it.

> >> Drivers that have PPA == ddi_get_instance() may just supply 0 for the 
> >> instance.
> >>     
> >
> > So you can't override and specify (otherwise legal) instance 0?
> >   
> 
> No.  I've never seen a situation where this was desireable.  Every case 
> I've ever seen only has PPA zero when ddi_get_instance() is also zero.

That's weird, but ok ...

> That said, I'm thinking that a better way to do this might be to use an 
> allocator for the mac_ops as you originally suggested, and then supply 
> an instance number there.  Then I could initialize to -1 and thereby 
> shield drivers from even knowing about this if they don't need it.

Yep; that's a possibility.

> The problem with that approach is that it adds additional complexity to 
> the driver's attach routine, because it has to free the structure as well.
> 
> Its probably worth it though.

Yes, that part's a little annoying.  Fortunately, we do it in many
places now.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677



More information about the opensolaris-arc mailing list