Commit 89141972 authored by Russell King's avatar Russell King Committed by David S. Miller

net: mvpp2: rename mis-named "link status" interrupt

The link interrupt is used for way more than just the link status; it
comes from a collection of units to do with the port. The Marvell
documentation describes the interrupt as "GOP port X interrupt".

Since we are adding PTP support, and the PTP interrupt uses this,
rename it to be more inline with the documentation.

This interrupt is also mis-named in the DT binding, but we leave that
alone.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 36cfd3a6
...@@ -915,7 +915,7 @@ struct mvpp2_port { ...@@ -915,7 +915,7 @@ struct mvpp2_port {
*/ */
int gop_id; int gop_id;
int link_irq; int port_irq;
struct mvpp2 *priv; struct mvpp2 *priv;
......
...@@ -3036,7 +3036,7 @@ static void mvpp2_isr_handle_gmac_internal(struct mvpp2_port *port) ...@@ -3036,7 +3036,7 @@ static void mvpp2_isr_handle_gmac_internal(struct mvpp2_port *port)
} }
/* Per-port interrupt for link status changes */ /* Per-port interrupt for link status changes */
static irqreturn_t mvpp2_link_status_isr(int irq, void *dev_id) static irqreturn_t mvpp2_port_isr(int irq, void *dev_id)
{ {
struct mvpp2_port *port = (struct mvpp2_port *)dev_id; struct mvpp2_port *port = (struct mvpp2_port *)dev_id;
...@@ -4230,12 +4230,13 @@ static int mvpp2_open(struct net_device *dev) ...@@ -4230,12 +4230,13 @@ static int mvpp2_open(struct net_device *dev)
valid = true; valid = true;
} }
if (priv->hw_version == MVPP22 && port->link_irq) { if (priv->hw_version == MVPP22 && port->port_irq) {
err = request_irq(port->link_irq, mvpp2_link_status_isr, 0, err = request_irq(port->port_irq, mvpp2_port_isr, 0,
dev->name, port); dev->name, port);
if (err) { if (err) {
netdev_err(port->dev, "cannot request link IRQ %d\n", netdev_err(port->dev,
port->link_irq); "cannot request port link/ptp IRQ %d\n",
port->port_irq);
goto err_free_irq; goto err_free_irq;
} }
...@@ -4246,7 +4247,7 @@ static int mvpp2_open(struct net_device *dev) ...@@ -4246,7 +4247,7 @@ static int mvpp2_open(struct net_device *dev)
valid = true; valid = true;
} else { } else {
port->link_irq = 0; port->port_irq = 0;
} }
if (!valid) { if (!valid) {
...@@ -4290,8 +4291,8 @@ static int mvpp2_stop(struct net_device *dev) ...@@ -4290,8 +4291,8 @@ static int mvpp2_stop(struct net_device *dev)
if (port->phylink) if (port->phylink)
phylink_disconnect_phy(port->phylink); phylink_disconnect_phy(port->phylink);
if (port->link_irq) if (port->port_irq)
free_irq(port->link_irq, port); free_irq(port->port_irq, port);
mvpp2_irqs_deinit(port); mvpp2_irqs_deinit(port);
if (!port->has_tx_irqs) { if (!port->has_tx_irqs) {
...@@ -6056,16 +6057,16 @@ static int mvpp2_port_probe(struct platform_device *pdev, ...@@ -6056,16 +6057,16 @@ static int mvpp2_port_probe(struct platform_device *pdev,
goto err_free_netdev; goto err_free_netdev;
if (port_node) if (port_node)
port->link_irq = of_irq_get_byname(port_node, "link"); port->port_irq = of_irq_get_byname(port_node, "link");
else else
port->link_irq = fwnode_irq_get(port_fwnode, port->nqvecs + 1); port->port_irq = fwnode_irq_get(port_fwnode, port->nqvecs + 1);
if (port->link_irq == -EPROBE_DEFER) { if (port->port_irq == -EPROBE_DEFER) {
err = -EPROBE_DEFER; err = -EPROBE_DEFER;
goto err_deinit_qvecs; goto err_deinit_qvecs;
} }
if (port->link_irq <= 0) if (port->port_irq <= 0)
/* the link irq is optional */ /* the link irq is optional */
port->link_irq = 0; port->port_irq = 0;
if (fwnode_property_read_bool(port_fwnode, "marvell,loopback")) if (fwnode_property_read_bool(port_fwnode, "marvell,loopback"))
port->flags |= MVPP2_F_LOOPBACK; port->flags |= MVPP2_F_LOOPBACK;
...@@ -6229,8 +6230,8 @@ static int mvpp2_port_probe(struct platform_device *pdev, ...@@ -6229,8 +6230,8 @@ static int mvpp2_port_probe(struct platform_device *pdev,
err_free_stats: err_free_stats:
free_percpu(port->stats); free_percpu(port->stats);
err_free_irq: err_free_irq:
if (port->link_irq) if (port->port_irq)
irq_dispose_mapping(port->link_irq); irq_dispose_mapping(port->port_irq);
err_deinit_qvecs: err_deinit_qvecs:
mvpp2_queue_vectors_deinit(port); mvpp2_queue_vectors_deinit(port);
err_free_netdev: err_free_netdev:
...@@ -6251,8 +6252,8 @@ static void mvpp2_port_remove(struct mvpp2_port *port) ...@@ -6251,8 +6252,8 @@ static void mvpp2_port_remove(struct mvpp2_port *port)
for (i = 0; i < port->ntxqs; i++) for (i = 0; i < port->ntxqs; i++)
free_percpu(port->txqs[i]->pcpu); free_percpu(port->txqs[i]->pcpu);
mvpp2_queue_vectors_deinit(port); mvpp2_queue_vectors_deinit(port);
if (port->link_irq) if (port->port_irq)
irq_dispose_mapping(port->link_irq); irq_dispose_mapping(port->port_irq);
free_netdev(port->dev); free_netdev(port->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment