Netdev Archive on lore.kernel.org
 help / color / Atom feed
* Altera TSE driver not working in 100mbps mode
@ 2019-11-27 13:54 Petko Manolov
  2019-12-03  9:29 ` Petko Manolov
  0 siblings, 1 reply; 2+ messages in thread
From: Petko Manolov @ 2019-11-27 13:54 UTC (permalink / raw)
  To: Thor Thayer; +Cc: netdev

	Hi Thor,

In my effort to move Altera TSE driver from PHYLIB to PHYLINK i ran into a 
problem.  The driver would not work properly on 100Mbit/s links.  This is true 
for the original driver in linux-5.4.y as well as for my PHYLINK/SFP enabled 
version.

This is a DT fragment of what i've been trying with 5.4.y kernels and the 
stock driver:

                tse_sub_2: ethernet@0xc0300000 {
                        status = "disabled";

                        compatible = "altr,tse-msgdma-1.0";
                        reg =   <0xc0300000 0x00000400>,
                                <0xc0301000 0x00000020>,
                                <0xc0302000 0x00000020>,
                                <0xc0303000 0x00000008>,
                                <0xc0304000 0x00000020>,
                                <0xc0305000 0x00000020>;
                        reg-names = "control_port", "rx_csr", "rx_desc", "rx_resp", "tx_csr", "tx_desc";
                        interrupt-parent =< &intc >;
                        interrupts = <0 54 4>, <0 55 4>;
                        interrupt-names = "rx_irq", "tx_irq";
                        rx-fifo-depth = <2048>;
                        tx-fifo-depth = <2048>;
                        address-bits = <48>;
                        max-frame-size = <1500>;
                        local-mac-address = [ 00 0C ED 00 00 06 ];
                        altr,has-supplementary-unicast;
                        altr,has-hash-multicast-filter;
                        phy-handle = <0>;
                        fixed-link {
                                speed = <1000>;
                                full-duplex;
                        };
                };

Trying "speed = <100>;" above also doesn't change much, except that the link is 
reported (as expected) as 100Mbps.

With the PHYLINK code the above fragment is pretty much the same except for:

                        sfp = <&sfp0>;
                        phy-mode = "sgmii";
                        managed = "in-band-status";

Both (old and new) drivers are working fine on 1Gbps links with optics and 
copper SFPs.  With PHYLINK code (and in auto-negotiation mode) the link speed 
and duplex is properly detected as 100Mbps.  MAC and PCS also look correctly set 
up, but the device is still unable to receive or transmit packages.


Please let me know should you need more details.


thanks,
Petko

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

* Re: Altera TSE driver not working in 100mbps mode
  2019-11-27 13:54 Altera TSE driver not working in 100mbps mode Petko Manolov
@ 2019-12-03  9:29 ` Petko Manolov
  0 siblings, 0 replies; 2+ messages in thread
From: Petko Manolov @ 2019-12-03  9:29 UTC (permalink / raw)
  To: Thor Thayer; +Cc: netdev

All right, the first message got ignored so this is my take two. :)

Has anyone stumbled on the same problem as me?


cheers,
Petko


On 19-11-27 15:54:19, Petko Manolov wrote:
> 	Hi Thor,
> 
> In my effort to move Altera TSE driver from PHYLIB to PHYLINK i ran into a 
> problem.  The driver would not work properly on 100Mbit/s links.  This is true 
> for the original driver in linux-5.4.y as well as for my PHYLINK/SFP enabled 
> version.
> 
> This is a DT fragment of what i've been trying with 5.4.y kernels and the 
> stock driver:
> 
>                 tse_sub_2: ethernet@0xc0300000 {
>                         status = "disabled";
> 
>                         compatible = "altr,tse-msgdma-1.0";
>                         reg =   <0xc0300000 0x00000400>,
>                                 <0xc0301000 0x00000020>,
>                                 <0xc0302000 0x00000020>,
>                                 <0xc0303000 0x00000008>,
>                                 <0xc0304000 0x00000020>,
>                                 <0xc0305000 0x00000020>;
>                         reg-names = "control_port", "rx_csr", "rx_desc", "rx_resp", "tx_csr", "tx_desc";
>                         interrupt-parent =< &intc >;
>                         interrupts = <0 54 4>, <0 55 4>;
>                         interrupt-names = "rx_irq", "tx_irq";
>                         rx-fifo-depth = <2048>;
>                         tx-fifo-depth = <2048>;
>                         address-bits = <48>;
>                         max-frame-size = <1500>;
>                         local-mac-address = [ 00 0C ED 00 00 06 ];
>                         altr,has-supplementary-unicast;
>                         altr,has-hash-multicast-filter;
>                         phy-handle = <0>;
>                         fixed-link {
>                                 speed = <1000>;
>                                 full-duplex;
>                         };
>                 };
> 
> Trying "speed = <100>;" above also doesn't change much, except that the link is 
> reported (as expected) as 100Mbps.
> 
> With the PHYLINK code the above fragment is pretty much the same except for:
> 
>                         sfp = <&sfp0>;
>                         phy-mode = "sgmii";
>                         managed = "in-band-status";
> 
> Both (old and new) drivers are working fine on 1Gbps links with optics and 
> copper SFPs.  With PHYLINK code (and in auto-negotiation mode) the link speed 
> and duplex is properly detected as 100Mbps.  MAC and PCS also look correctly set 
> up, but the device is still unable to receive or transmit packages.
> 
> 
> Please let me know should you need more details.
> 
> 
> thanks,
> Petko
> 

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 13:54 Altera TSE driver not working in 100mbps mode Petko Manolov
2019-12-03  9:29 ` Petko Manolov

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git