net: netcp: fix forward port number usage for 10G ethss
10G switch requires forward port number in the taginfo field, where as it should be in packet_info field for necp 1.4 Ethss. So fill this value correctly in the knav dma descriptor. Also rename dma_psflags field in struct netcp_tx_pipe to switch_to_port as it contain no flag, but the switch port number for forwarding the packet. Add a flag to hold the new flag, SWITCH_TO_PORT_IN_TAGINFO which will be set for 10G. This can also used in the future for other flags for the tx_pipe. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: WingMan Kwok <w-kwok2@ti.com> CC: "David S. Miller" <davem@davemloft.net> CC: Mugunthan V N <mugunthanvnm@ti.com> CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> CC: Grygorii Strashko <grygorii.strashko@ti.com> CC: Christoph Jaeger <cj@linux.com> CC: Lokesh Vutla <lokeshvutla@ti.com> CC: Markus Pargmann <mpa@pengutronix.de> CC: Kumar Gala <galak@codeaurora.org> CC: Ian Campbell <ijc+devicetree@hellion.org.uk> CC: Mark Rutland <mark.rutland@arm.com> CC: Pawel Moll <pawel.moll@arm.com> CC: Rob Herring <robh+dt@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
89c69d3ce5
commit
e170f40992
@@ -1472,15 +1472,21 @@ static int gbe_open(void *intf_priv, struct net_device *ndev)
|
||||
GBE_MAJOR_VERSION(reg), GBE_MINOR_VERSION(reg),
|
||||
GBE_RTL_VERSION(reg), GBE_IDENT(reg));
|
||||
|
||||
if (gbe_dev->enable_ale)
|
||||
gbe_intf->tx_pipe.dma_psflags = 0;
|
||||
else
|
||||
gbe_intf->tx_pipe.dma_psflags = port_num;
|
||||
/* For 10G use directed to port */
|
||||
if (gbe_dev->ss_version == XGBE_SS_VERSION_10)
|
||||
gbe_intf->tx_pipe.flags = SWITCH_TO_PORT_IN_TAGINFO;
|
||||
|
||||
dev_dbg(gbe_dev->dev, "opened TX channel %s: %p with psflags %d\n",
|
||||
if (gbe_dev->enable_ale)
|
||||
gbe_intf->tx_pipe.switch_to_port = 0;
|
||||
else
|
||||
gbe_intf->tx_pipe.switch_to_port = port_num;
|
||||
|
||||
dev_dbg(gbe_dev->dev,
|
||||
"opened TX channel %s: %p with to port %d, flags %d\n",
|
||||
gbe_intf->tx_pipe.dma_chan_name,
|
||||
gbe_intf->tx_pipe.dma_channel,
|
||||
gbe_intf->tx_pipe.dma_psflags);
|
||||
gbe_intf->tx_pipe.switch_to_port,
|
||||
gbe_intf->tx_pipe.flags);
|
||||
|
||||
gbe_slave_stop(gbe_intf);
|
||||
|
||||
|
Reference in New Issue
Block a user