From gd78059@sac.sfbay.sun.com Sun Jan  3 11:42:46 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o03Jgkh7011069
	for <psarc-ext@sac.sfbay.sun.com>; Sun, 3 Jan 2010 11:42:46 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o03Jgkqk029879;
	Sun, 3 Jan 2010 11:42:46 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KVO00301S3AMV00@nwk-avmta-1.sfbay.Sun.COM>; Sun,
 03 Jan 2010 11:42:46 -0800 (PST)
Received: from dm-sfbay-01.sfbay.sun.com ([129.145.155.118])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KVO00MHES3ADR10@nwk-avmta-1.sfbay.Sun.COM>; Sun,
 03 Jan 2010 11:42:46 -0800 (PST)
Received: from sac.sfbay.sun.com (sac.SFBay.Sun.COM [129.146.226.132])
	by dm-sfbay-01.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4)
 with ESMTP id o03Jgkb8004309; Sun, 03 Jan 2010 11:42:46 -0800 (PST)
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o03JgZa0011064; Sun,
 03 Jan 2010 11:42:35 -0800 (PST)
Received: (from gd78059@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id o03JgZdn011060; Sun,
 03 Jan 2010 11:42:35 -0800 (PST)
Date: Sun, 03 Jan 2010 11:42:35 -0800 (PST)
From: "Garrett D'Amore - sun microsystems" <gd78059@sac.sfbay.sun.com>
Subject: first-phy MII property [PSARC/2010/002 Self Review]
To: PSARC-ext@sun.com
Cc: Garrett.Damore@sun.com
Message-id: <201001031942.o03JgZdn011060@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 1831


Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2010 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 first-phy MII property
    1.2. Name of Document Author/Supplier:
	 Author:  Garrett D'Amore
    1.3  Date of This Document:
	03 January, 2010
4. Technical Description

Problem

The MII common layer (PSARC 2009/319) currently assumes that the "preferred"
phy for a NIC driver will exist at address 1 or above.  (It assumes that
an internal PHY will reside at address 0.  This address is only chosen
if no other addresses are matched.)

This is true for many drivers, but not for one important driver -- hme.
As a result, on some systems (Netra T1 105 at least) the wrong PHY is
selected, because the external PHY is in use and resides at address 0.
This is detailed in CR 6913787.


Solution

We propose to provide a mechanism whereby NIC drivers can change the
starting address for the PHY search.  (The first address matched is
identified.)  This is done via a driver property ("first-phy"), which
indicates the address of the first PHY to be checked.  (By default the
first address searched will be 1, going through 31, and then finally
searching at 0.)  Note that all 32 addresses will checked; the search
starts at the first-phy (or 1 if not set), checks each address in ascending
order, loops around at 31 and continues the search at address 0.

The new property, "first-phy" will remain Consolidation Private, along
with the rest of the MII interfaces.

Note that existing drivers will not have this property exported, and thus
will not be affected by any new search order.

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


From Sebastien.Roy@sun.com Mon Jan  4 08:50:35 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o04GoYMK017514
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 4 Jan 2010 08:50:34 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o04GoYhj027096
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Mon, 4 Jan 2010 08:50:34 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KVQ00403ESAEI00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 08:50:34 -0800 (PST)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KVQ00056ES9DA50@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Mon,
 04 Jan 2010 08:50:33 -0800 (PST)
Received: from fe-amer-09.sun.com ([192.18.109.79])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o04GoWbe011604	for
 <PSARC-ext@sun.com>; Mon, 04 Jan 2010 16:50:32 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 id <0KVQ00I00ER1IU00@mail-amer.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 09:50:32 -0700 (MST)
Received: from [129.148.174.103] ([unknown] [129.148.174.103])
 by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 with ESMTPSA id <0KVQ001AEES8AAB0@mail-amer.sun.com>; Mon,
 04 Jan 2010 09:50:32 -0700 (MST)
Date: Mon, 04 Jan 2010 11:48:00 -0500
From: Sebastien Roy <Sebastien.Roy@sun.com>
Subject: Re: first-phy MII property [PSARC/2010/002 Self Review]
In-reply-to: <201001031942.o03JgZdn011060@sac.sfbay.sun.com>
Sender: Sebastien.Roy@sun.com
To: "Garrett D'Amore - sun microsystems" <gd78059@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, Garrett.Damore@sun.com
Message-id: <1262623680.4018.42.camel@strat>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <201001031942.o03JgZdn011060@sac.sfbay.sun.com>
Status: RO
Content-Length: 1036

On Sun, 2010-01-03 at 11:42 -0800, Garrett D'Amore - sun microsystems
wrote:
> Solution
> 
> We propose to provide a mechanism whereby NIC drivers can change the
> starting address for the PHY search.  (The first address matched is
> identified.)  This is done via a driver property ("first-phy"), which
> indicates the address of the first PHY to be checked.  (By default the
> first address searched will be 1, going through 31, and then finally
> searching at 0.)  Note that all 32 addresses will checked; the search
> starts at the first-phy (or 1 if not set), checks each address in ascending
> order, loops around at 31 and continues the search at address 0.
> 
> The new property, "first-phy" will remain Consolidation Private, along
> with the rest of the MII interfaces.

Does "driver property" mean dladm link property, or driver.conf setting,
or something else?  Why wouldn't it be better to simply have the driver
call some mii_*() function to set the probe order without getting an
administrative tunable involved?

-Seb



From Garrett.Damore@sun.com Mon Jan  4 09:11:41 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o04HBe37018070
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 4 Jan 2010 09:11:40 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o04HBaqe009104
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Mon, 4 Jan 2010 11:11:40 -0600 (CST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KVQ0052PFRGMM00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 09:11:40 -0800 (PST)
Received: from sca-es-mail-1.sun.com ([192.18.43.132])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KVQ000O7FRFD460@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Mon,
 04 Jan 2010 09:11:39 -0800 (PST)
Received: from fe-sfbay-10.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o04HBdYB004704	for
 <PSARC-ext@sun.com>; Mon, 04 Jan 2010 09:11:39 -0800 (PST)
Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 id <0KVQ00D00F6OCG00@fe-sfbay-10.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 09:11:39 -0800 (PST)
Received: from [192.168.251.11] ([unknown] [76.93.15.33])
 by fe-sfbay-10.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 with ESMTPSA id <0KVQ00MG8FREOOE0@fe-sfbay-10.sun.com>; Mon,
 04 Jan 2010 09:11:39 -0800 (PST)
Date: Mon, 04 Jan 2010 09:11:37 -0800
From: "Garrett D'Amore" <Garrett.Damore@sun.com>
Subject: Re: first-phy MII property [PSARC/2010/002 Self Review]
In-reply-to: <1262623680.4018.42.camel@strat>
Sender: Garrett.Damore@sun.com
To: Sebastien Roy <Sebastien.Roy@sun.com>
Cc: "Garrett D'Amore - sun microsystems" <gd78059@sac.sfbay.sun.com>,
        PSARC-ext@sun.com
Reply-to: Garrett.Damore@sun.com
Message-id: <4B422149.50902@sun.com>
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <201001031942.o03JgZdn011060@sac.sfbay.sun.com>
 <1262623680.4018.42.camel@strat>
User-Agent: Thunderbird 2.0.0.23 (X11/20091013)
Status: RO
Content-Length: 1401

Sebastien Roy wrote:
> On Sun, 2010-01-03 at 11:42 -0800, Garrett D'Amore - sun microsystems
> wrote:
>   
>> Solution
>>
>> We propose to provide a mechanism whereby NIC drivers can change the
>> starting address for the PHY search.  (The first address matched is
>> identified.)  This is done via a driver property ("first-phy"), which
>> indicates the address of the first PHY to be checked.  (By default the
>> first address searched will be 1, going through 31, and then finally
>> searching at 0.)  Note that all 32 addresses will checked; the search
>> starts at the first-phy (or 1 if not set), checks each address in ascending
>> order, loops around at 31 and continues the search at address 0.
>>
>> The new property, "first-phy" will remain Consolidation Private, along
>> with the rest of the MII interfaces.
>>     
>
> Does "driver property" mean dladm link property, or driver.conf setting,
> or something else?  Why wouldn't it be better to simply have the driver
> call some mii_*() function to set the probe order without getting an
> administrative tunable involved?
>   

Its via ddi_prop_update_int().  While this could be administratively 
tuned, the intent is that the property is created programatically.

I need the property to exist fairly early, so having a driver set it up 
in attach() seemed like the least intrusive way of handling this.

    - Garrett
> -Seb
>
>
>   


From Sebastien.Roy@Sun.COM Mon Jan  4 10:59:41 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o04Ixfmt020717
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 4 Jan 2010 10:59:41 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o04IxfKQ026038
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Mon, 4 Jan 2010 10:59:41 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KVQ00C01KRH7R00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 10:59:41 -0800 (PST)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KVQ000LFKRGDHE0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Mon,
 04 Jan 2010 10:59:40 -0800 (PST)
Received: from fe-amer-10.sun.com ([192.18.109.80])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o04Ixe6x018416	for
 <PSARC-ext@sun.com>; Mon, 04 Jan 2010 18:59:40 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 id <0KVQ00C00KB2JK00@mail-amer.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 11:59:40 -0700 (MST)
Received: from [129.148.174.103] ([unknown] [129.148.174.103])
 by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 with ESMTPSA id <0KVQ00I3QKQV4AG0@mail-amer.sun.com>; Mon,
 04 Jan 2010 11:59:19 -0700 (MST)
Date: Mon, 04 Jan 2010 13:56:48 -0500
From: Sebastien Roy <Sebastien.Roy@Sun.COM>
Subject: Re: first-phy MII property [PSARC/2010/002 Self Review]
In-reply-to: <4B422149.50902@sun.com>
Sender: Sebastien.Roy@Sun.COM
To: Garrett.Damore@Sun.COM
Cc: "Garrett D'Amore - sun microsystems" <gd78059@sac.sfbay.sun.com>,
        PSARC-ext@Sun.COM
Message-id: <1262631408.4018.139.camel@strat>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <201001031942.o03JgZdn011060@sac.sfbay.sun.com>
 <1262623680.4018.42.camel@strat> <4B422149.50902@sun.com>
Status: RO
Content-Length: 887

On Mon, 2010-01-04 at 09:11 -0800, Garrett D'Amore wrote:
> Sebastien Roy wrote:
> > Does "driver property" mean dladm link property, or driver.conf setting,
> > or something else?  Why wouldn't it be better to simply have the driver
> > call some mii_*() function to set the probe order without getting an
> > administrative tunable involved?
> >   
> 
> Its via ddi_prop_update_int().  While this could be administratively 
> tuned, the intent is that the property is created programatically.
> 
> I need the property to exist fairly early, so having a driver set it up 
> in attach() seemed like the least intrusive way of handling this.

Right, and doesn't the driver create a mii handle in attach?  It seems
odd that something that will never need to be tuned ends up in a .conf
file.  It's your call though, I don't have a strong opinion over this
private workaround. (+1)

-Seb



From Garrett.Damore@sun.com Mon Jan  4 11:03:42 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o04J3fHC020853
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 4 Jan 2010 11:03:41 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o04J3fjD028477
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Mon, 4 Jan 2010 11:03:41 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KVQ00C0BKY5FT00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 11:03:41 -0800 (PST)
Received: from sca-es-mail-1.sun.com ([192.18.43.132])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KVQ000N2KY5D4E0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Mon,
 04 Jan 2010 11:03:41 -0800 (PST)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o04J3fZ5019196	for
 <PSARC-ext@sun.com>; Mon, 04 Jan 2010 11:03:41 -0800 (PST)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 id <0KVQ00200KW0P400@fe-sfbay-09.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 04 Jan 2010 11:03:41 -0800 (PST)
Received: from [192.168.251.11] ([unknown] [76.93.15.33])
 by fe-sfbay-09.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul  2 2009))
 with ESMTPSA id <0KVQ005YEKY1MEI0@fe-sfbay-09.sun.com>; Mon,
 04 Jan 2010 11:03:41 -0800 (PST)
Date: Mon, 04 Jan 2010 11:03:36 -0800
From: "Garrett D'Amore" <Garrett.Damore@sun.com>
Subject: Re: first-phy MII property [PSARC/2010/002 Self Review]
In-reply-to: <1262631408.4018.139.camel@strat>
Sender: Garrett.Damore@sun.com
To: Sebastien Roy <Sebastien.Roy@sun.com>
Cc: "Garrett D'Amore - sun microsystems" <gd78059@sac.sfbay.sun.com>,
        PSARC-ext@sun.com
Reply-to: Garrett.Damore@sun.com
Message-id: <4B423B88.9090304@sun.com>
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <201001031942.o03JgZdn011060@sac.sfbay.sun.com>
 <1262623680.4018.42.camel@strat> <4B422149.50902@sun.com>
 <1262631408.4018.139.camel@strat>
User-Agent: Thunderbird 2.0.0.23 (X11/20091013)
Status: RO
Content-Length: 1147

Sebastien Roy wrote:
> On Mon, 2010-01-04 at 09:11 -0800, Garrett D'Amore wrote:
>   
>> Sebastien Roy wrote:
>>     
>>> Does "driver property" mean dladm link property, or driver.conf setting,
>>> or something else?  Why wouldn't it be better to simply have the driver
>>> call some mii_*() function to set the probe order without getting an
>>> administrative tunable involved?
>>>   
>>>       
>> Its via ddi_prop_update_int().  While this could be administratively 
>> tuned, the intent is that the property is created programatically.
>>
>> I need the property to exist fairly early, so having a driver set it up 
>> in attach() seemed like the least intrusive way of handling this.
>>     
>
> Right, and doesn't the driver create a mii handle in attach?  It seems
> odd that something that will never need to be tuned ends up in a .conf
> file.  It's your call though, I don't have a strong opinion over this
> private workaround. (+1)
>   

It doesn't end up in the .conf file, unless an administrator puts it 
there (which would probably be a bad idea.)  Instead, its created 
programmatically during attach().

Thanks.

    - Garrett


