Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1539818
| From | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/5] net: ethernet: ti: cpsw: use same macros to get active slave |
| Date | 2016-12-10 13:30 +0100 |
| Message-ID | <sMOWR-2d6-19@gated-at.bofh.it> (permalink) |
| References | <sMOWR-2d6-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use the same, more convenient macros, to get active slave.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
drivers/net/ethernet/ti/cpsw.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index b62d958..c45f7d2 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1624,10 +1624,7 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv)
struct cpsw_common *cpsw = priv->cpsw;
u32 ctrl, mtype;
- if (cpsw->data.dual_emac)
- slave = &cpsw->slaves[priv->emac_port];
- else
- slave = &cpsw->slaves[cpsw->data.active_slave];
+ slave = &cpsw->slaves[cpsw_slave_index(cpsw, priv)];
ctrl = slave_read(slave, CPSW2_CONTROL);
switch (cpsw->version) {
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] net: ethernet: ti: cpsw: improve re-split policy Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-12-10 13:30 +0100
[PATCH 1/5] net: ethernet: ti: cpsw: use same macros to get active slave Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-12-10 13:30 +0100
[PATCH 4/5] net: ethernet: ti: cpsw: re-split res only when speed is changed Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-12-10 13:30 +0100
Re: [PATCH 4/5] net: ethernet: ti: cpsw: re-split res only when speed is changed David Miller <davem@davemloft.net> - 2016-12-10 23:40 +0100
[PATCH 5/5] net: ethernet: ti: cpsw: sync rates for channels in dual emac mode Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-12-10 13:30 +0100
Re: [PATCH 5/5] net: ethernet: ti: cpsw: sync rates for channels in dual emac mode David Miller <davem@davemloft.net> - 2016-12-10 23:40 +0100
[PATCH 3/5] net: ethernet: ti: cpsw: combine budget and weight split and check Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-12-10 13:30 +0100
Re: [PATCH 3/5] net: ethernet: ti: cpsw: combine budget and weight split and check David Miller <davem@davemloft.net> - 2016-12-10 23:40 +0100
Re: [PATCH 1/5] net: ethernet: ti: cpsw: improve re-split policy David Miller <davem@davemloft.net> - 2016-12-10 23:40 +0100
csiph-web