netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Neptune regression...
@ 2008-05-04  6:52 David Miller
  2008-05-05 20:10 ` Matheos Worku
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2008-05-04  6:52 UTC (permalink / raw)
  To: matheos.worku; +Cc: netdev


Matheos, this patch of your's:

commit 7f7c4072ea552f97a0898331322f71986a97299c
Author: Matheos Worku <matheos.worku@sun.com>
Date:   Thu Apr 24 21:02:37 2008 -0700

    niu: Determine the # of ports from the card's VPD data
    
    [ Fix minor whitespace and coding style stuff... -DaveM ]
    
    Signed-off-by: Matheos Worku <matheos.worku@sun.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Breaks on-board Neptune chips on Maramba systems.

Previously the code in niu_get_and_validate_port() used a default of
"4" ports if the various probing methods failed.  Your code removed
that fallback.

This case seems to be what triggers for on-board Maramba chips.

So, for now, I'm going to put the:

	if (!parent->num_ports)
		parent->num_ports = 4;

back in there to fix the regression.  I've validated that this fixes
the problem.

Is there some other mechanism we should be using here to detect the
port count in the Maramba on-board case?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Neptune regression...
  2008-05-04  6:52 Neptune regression David Miller
@ 2008-05-05 20:10 ` Matheos Worku
  2008-05-05 21:03   ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Matheos Worku @ 2008-05-05 20:10 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

David Miller wrote:
> Matheos, this patch of your's:
>
> commit 7f7c4072ea552f97a0898331322f71986a97299c
> Author: Matheos Worku <matheos.worku@sun.com>
> Date:   Thu Apr 24 21:02:37 2008 -0700
>
>     niu: Determine the # of ports from the card's VPD data
>     
>     [ Fix minor whitespace and coding style stuff... -DaveM ]
>     
>     Signed-off-by: Matheos Worku <matheos.worku@sun.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Breaks on-board Neptune chips on Maramba systems.
>
> Previously the code in niu_get_and_validate_port() used a default of
> "4" ports if the various probing methods failed.  Your code removed
> that fallback.
>
> This case seems to be what triggers for on-board Maramba chips.
>
> So, for now, I'm going to put the:
>
> 	if (!parent->num_ports)
> 		parent->num_ports = 4;
>
> back in there to fix the regression.  I've validated that this fixes
> the problem.
>
> Is there some other mechanism we should be using here to detect the
> port count in the Maramba on-board case?
>   
Dave,

Sorry I broke the driver.
I think the clean way to handle this would be to use the "board" 
property which exists for all Neptune variants, both in OBP properties  
as well as PCI VPD. I will work on the fix based on that approach  and 
will generate a patch as soon possible.
Regards
Matheos



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Neptune regression...
  2008-05-05 20:10 ` Matheos Worku
@ 2008-05-05 21:03   ` David Miller
  2008-05-05 21:15     ` Matheos Worku
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2008-05-05 21:03 UTC (permalink / raw)
  To: Matheos.Worku; +Cc: netdev

From: Matheos Worku <Matheos.Worku@Sun.COM>
Date: Mon, 05 May 2008 13:10:50 -0700

> I think the clean way to handle this would be to use the "board" 
> property which exists for all Neptune variants, both in OBP properties  
> as well as PCI VPD. I will work on the fix based on that approach  and 
> will generate a patch as soon possible.

There is no "board" property on my maramba on-board neptune device
nodes.  And the vpd.board_model[] string is the empty string.

See the OF tree dump below from my system.

I would really prefer if you actually tested your changes on the
relevant hardware.

Thanks.

                Node 0xf02d64cc
                    .node:  f02d64cc
                    local-mac-address:  00144fa7.bd36
                    mac-addresses:  00144fa7.bd36
                    phy-type: 'mif'
                    assigned-addresses:  82040010.00000000.01000000.00000000.01000000.82040018.00000000.00200000.00000000.00008000.82040020.00000000.00208000.00000000.00008000.82040030.00000000.00300000.00000000.00100000
                    reg:  00040000.00000000.00000000.00000000.00000000.03040010.00000000.00000000.00000000.01000000.03040018.00000000.00000000.00000000.00008000.03040020.00000000.00000000.00000000.00008000.02040030.00000000.00000000.00000000.00100000
                    model: 'SUNW,pcie-neptune'
                    compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
                    address-bits:  00000030
                    max-frame-size:  00002400
                    network-interface-type: 'ethernet'
                    device_type: 'network'
                    name: 'network'
                    interrupts:  00000001
                    cache-line-size:  00000010
                    class-code:  00020000
                    subsystem-vendor-id:  0000108e
                    revision-id:  00000001
                    device-id:  0000abcd
                    vendor-id:  0000108e

                Node 0xf02e88ac
                    .node:  f02e88ac
                    local-mac-address:  00144fa7.bd37
                    mac-addresses:  00144fa7.bd37
                    phy-type: 'mif'
                    assigned-addresses:  82040110.00000000.02000000.00000000.01000000.82040118.00000000.00210000.00000000.00008000.82040120.00000000.00218000.00000000.00008000.82040130.00000000.00400000.00000000.00100000
                    reg:  00040100.00000000.00000000.00000000.00000000.03040110.00000000.00000000.00000000.01000000.03040118.00000000.00000000.00000000.00008000.03040120.00000000.00000000.00000000.00008000.02040130.00000000.00000000.00000000.00100000
                    model: 'SUNW,pcie-neptune'
                    compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
                    address-bits:  00000030
                    max-frame-size:  00002400
                    network-interface-type: 'ethernet'
                    device_type: 'network'
                    name: 'network'
                    interrupts:  00000002
                    cache-line-size:  00000010
                    class-code:  00020000
                    subsystem-vendor-id:  0000108e
                    revision-id:  00000001
                    device-id:  0000abcd
                    vendor-id:  0000108e

                Node 0xf02fac8c
                    .node:  f02fac8c
                    local-mac-address:  00144fa7.bd38
                    mac-addresses:  00144fa7.bd38
                    phy-type: 'mif'
                    assigned-addresses:  82040210.00000000.03000000.00000000.01000000.82040218.00000000.00220000.00000000.00008000.82040220.00000000.00228000.00000000.00008000.82040230.00000000.00500000.00000000.00100000
                    reg:  00040200.00000000.00000000.00000000.00000000.03040210.00000000.00000000.00000000.01000000.03040218.00000000.00000000.00000000.00008000.03040220.00000000.00000000.00000000.00008000.02040230.00000000.00000000.00000000.00100000
                    model: 'SUNW,pcie-neptune'
                    compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
                    address-bits:  00000030
                    max-frame-size:  00002400
                    network-interface-type: 'ethernet'
                    device_type: 'network'
                    name: 'network'
                    interrupts:  00000003
                    cache-line-size:  00000010
                    class-code:  00020000
                    subsystem-vendor-id:  0000108e
                    revision-id:  00000001
                    device-id:  0000abcd
                    vendor-id:  0000108e

                Node 0xf030d06c
                    .node:  f030d06c
                    local-mac-address:  00144fa7.bd39
                    mac-addresses:  00144fa7.bd39
                    phy-type: 'mif'
                    assigned-addresses:  82040310.00000000.04000000.00000000.01000000.82040318.00000000.00230000.00000000.00008000.82040320.00000000.00238000.00000000.00008000.82040330.00000000.00600000.00000000.00100000
                    reg:  00040300.00000000.00000000.00000000.00000000.03040310.00000000.00000000.00000000.01000000.03040318.00000000.00000000.00000000.00008000.03040320.00000000.00000000.00000000.00008000.02040330.00000000.00000000.00000000.00100000
                    model: 'SUNW,pcie-neptune'
                    compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
                    address-bits:  00000030
                    max-frame-size:  00002400
                    network-interface-type: 'ethernet'
                    device_type: 'network'
                    name: 'network'
                    interrupts:  00000004
                    cache-line-size:  00000010
                    class-code:  00020000
                    subsystem-vendor-id:  0000108e
                    revision-id:  00000001
                    device-id:  0000abcd
                    vendor-id:  0000108e



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Neptune regression...
  2008-05-05 21:03   ` David Miller
@ 2008-05-05 21:15     ` Matheos Worku
  2008-05-05 22:03       ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Matheos Worku @ 2008-05-05 21:15 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

David Miller wrote:
> From: Matheos Worku <Matheos.Worku@Sun.COM>
> Date: Mon, 05 May 2008 13:10:50 -0700
>
>   
>> I think the clean way to handle this would be to use the "board" 
>> property which exists for all Neptune variants, both in OBP properties  
>> as well as PCI VPD. I will work on the fix based on that approach  and 
>> will generate a patch as soon possible.
>>     
>
> There is no "board" property on my maramba on-board neptune device
> nodes.  And the vpd.board_model[] string is the empty string.
>
> See the OF tree dump below from my system.
>
> I would really prefer if you actually tested your changes on the
> relevant hardware.
>
> Thanks.
>
>                 Node 0xf02d64cc
>                     .node:  f02d64cc
>                     local-mac-address:  00144fa7.bd36
>                     mac-addresses:  00144fa7.bd36
>                     phy-type: 'mif'
>                     assigned-addresses:  82040010.00000000.01000000.00000000.01000000.82040018.00000000.00200000.00000000.00008000.82040020.00000000.00208000.00000000.00008000.82040030.00000000.00300000.00000000.00100000
>                     reg:  00040000.00000000.00000000.00000000.00000000.03040010.00000000.00000000.00000000.01000000.03040018.00000000.00000000.00000000.00008000.03040020.00000000.00000000.00000000.00008000.02040030.00000000.00000000.00000000.00100000
>                     model: 'SUNW,pcie-neptune'
>   
Dave,

I actually meant the "model" property which exists on all variants.  For 
Maramba, it  is 'SUNW,pcie-neptune'.
The fix I have in mind  would modify the function niu_pci_vpd_get_nports 
to use the "model" property instead of "board_model". I will test and 
make sure the fix works on appropriate  SPARC and X86 hardware.

Regards
Matheos

>                     compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
>                     address-bits:  00000030
>                     max-frame-size:  00002400
>                     network-interface-type: 'ethernet'
>                     device_type: 'network'
>                     name: 'network'
>                     interrupts:  00000001
>                     cache-line-size:  00000010
>                     class-code:  00020000
>                     subsystem-vendor-id:  0000108e
>                     revision-id:  00000001
>                     device-id:  0000abcd
>                     vendor-id:  0000108e
>
>                 Node 0xf02e88ac
>                     .node:  f02e88ac
>                     local-mac-address:  00144fa7.bd37
>                     mac-addresses:  00144fa7.bd37
>                     phy-type: 'mif'
>                     assigned-addresses:  82040110.00000000.02000000.00000000.01000000.82040118.00000000.00210000.00000000.00008000.82040120.00000000.00218000.00000000.00008000.82040130.00000000.00400000.00000000.00100000
>                     reg:  00040100.00000000.00000000.00000000.00000000.03040110.00000000.00000000.00000000.01000000.03040118.00000000.00000000.00000000.00008000.03040120.00000000.00000000.00000000.00008000.02040130.00000000.00000000.00000000.00100000
>                     model: 'SUNW,pcie-neptune'
>                     compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
>                     address-bits:  00000030
>                     max-frame-size:  00002400
>                     network-interface-type: 'ethernet'
>                     device_type: 'network'
>                     name: 'network'
>                     interrupts:  00000002
>                     cache-line-size:  00000010
>                     class-code:  00020000
>                     subsystem-vendor-id:  0000108e
>                     revision-id:  00000001
>                     device-id:  0000abcd
>                     vendor-id:  0000108e
>
>                 Node 0xf02fac8c
>                     .node:  f02fac8c
>                     local-mac-address:  00144fa7.bd38
>                     mac-addresses:  00144fa7.bd38
>                     phy-type: 'mif'
>                     assigned-addresses:  82040210.00000000.03000000.00000000.01000000.82040218.00000000.00220000.00000000.00008000.82040220.00000000.00228000.00000000.00008000.82040230.00000000.00500000.00000000.00100000
>                     reg:  00040200.00000000.00000000.00000000.00000000.03040210.00000000.00000000.00000000.01000000.03040218.00000000.00000000.00000000.00008000.03040220.00000000.00000000.00000000.00008000.02040230.00000000.00000000.00000000.00100000
>                     model: 'SUNW,pcie-neptune'
>                     compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
>                     address-bits:  00000030
>                     max-frame-size:  00002400
>                     network-interface-type: 'ethernet'
>                     device_type: 'network'
>                     name: 'network'
>                     interrupts:  00000003
>                     cache-line-size:  00000010
>                     class-code:  00020000
>                     subsystem-vendor-id:  0000108e
>                     revision-id:  00000001
>                     device-id:  0000abcd
>                     vendor-id:  0000108e
>
>                 Node 0xf030d06c
>                     .node:  f030d06c
>                     local-mac-address:  00144fa7.bd39
>                     mac-addresses:  00144fa7.bd39
>                     phy-type: 'mif'
>                     assigned-addresses:  82040310.00000000.04000000.00000000.01000000.82040318.00000000.00230000.00000000.00008000.82040320.00000000.00238000.00000000.00008000.82040330.00000000.00600000.00000000.00100000
>                     reg:  00040300.00000000.00000000.00000000.00000000.03040310.00000000.00000000.00000000.01000000.03040318.00000000.00000000.00000000.00008000.03040320.00000000.00000000.00000000.00008000.02040330.00000000.00000000.00000000.00100000
>                     model: 'SUNW,pcie-neptune'
>                     compatible:  70636965.78313038.652c6162.63642e31.3038652e.302e3100.70636965.78313038.652c6162.63642e31.3038652e.30007063.69657831.3038652c.61626364.2e310070.63696578.31303865.2c616263.64007063.69657863.6c617373.2c303230.30303000.70636965.78636c61.73732c30.32303000.70636931.3038652c.61626364.00
>                     address-bits:  00000030
>                     max-frame-size:  00002400
>                     network-interface-type: 'ethernet'
>                     device_type: 'network'
>                     name: 'network'
>                     interrupts:  00000004
>                     cache-line-size:  00000010
>                     class-code:  00020000
>                     subsystem-vendor-id:  0000108e
>                     revision-id:  00000001
>                     device-id:  0000abcd
>                     vendor-id:  0000108e
>
>
>   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Neptune regression...
  2008-05-05 21:15     ` Matheos Worku
@ 2008-05-05 22:03       ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2008-05-05 22:03 UTC (permalink / raw)
  To: Matheos.Worku; +Cc: netdev

From: Matheos Worku <Matheos.Worku@Sun.COM>
Date: Mon, 05 May 2008 14:15:02 -0700

> I actually meant the "model" property which exists on all variants.  For 
> Maramba, it  is 'SUNW,pcie-neptune'.
> The fix I have in mind  would modify the function niu_pci_vpd_get_nports 
> to use the "model" property instead of "board_model". I will test and 
> make sure the fix works on appropriate  SPARC and X86 hardware.

Aha, that makes more sense.

I look forward to seeing your patch ;-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-05 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04  6:52 Neptune regression David Miller
2008-05-05 20:10 ` Matheos Worku
2008-05-05 21:03   ` David Miller
2008-05-05 21:15     ` Matheos Worku
2008-05-05 22:03       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).