[PATCH/RFC net-next 4/5] ravb: remove undocumented processing
From: Kazuya Mizuguchi Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman --- drivers/net/ethernet/renesas/ravb.h | 5 - drivers/net/ethernet/renesas/ravb_main.c | 15 --- 2 files changed, 20 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h index 57eea4a77826..fcd04dbc7dde 100644 --- a/drivers/net/ethernet/renesas/ravb.h +++ b/drivers/net/ethernet/renesas/ravb.h @@ -197,15 +197,11 @@ enum ravb_reg { MAHR= 0x05c0, MALR= 0x05c8, TROCR = 0x0700, /* Undocumented? */ - CDCR= 0x0708, /* Undocumented? */ - LCCR= 0x0710, /* Undocumented? */ CEFCR = 0x0740, FRECR = 0x0748, TSFRCR = 0x0750, TLFRCR = 0x0758, RFCR= 0x0760, - CERCR = 0x0768, /* Undocumented? */ - CEECR = 0x0770, /* Undocumented? */ MAFCR = 0x0778, }; @@ -223,7 +219,6 @@ enum CCC_BIT { CCC_CSEL_HPB= 0x0001, CCC_CSEL_ETH_TX = 0x0002, CCC_CSEL_GMII_REF = 0x0003, - CCC_BOC = 0x0010, /* Undocumented? */ CCC_LBME= 0x0100, }; diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 736ca2f76a35..88056dd912ed 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -451,12 +451,6 @@ static int ravb_dmac_init(struct net_device *ndev) ravb_ring_format(ndev, RAVB_BE); ravb_ring_format(ndev, RAVB_NC); -#if defined(__LITTLE_ENDIAN) - ravb_modify(ndev, CCC, CCC_BOC, 0); -#else - ravb_modify(ndev, CCC, CCC_BOC, CCC_BOC); -#endif - /* Set AVB RX */ ravb_write(ndev, RCR_EFFS | RCR_ENCF | RCR_ETS0 | RCR_ESF | 0x1800, RCR); @@ -1660,15 +1654,6 @@ static struct net_device_stats *ravb_get_stats(struct net_device *ndev) nstats->tx_dropped += ravb_read(ndev, TROCR); ravb_write(ndev, 0, TROCR); /* (write clear) */ - nstats->collisions += ravb_read(ndev, CDCR); - ravb_write(ndev, 0, CDCR); /* (write clear) */ - nstats->tx_carrier_errors += ravb_read(ndev, LCCR); - ravb_write(ndev, 0, LCCR); /* (write clear) */ - - nstats->tx_carrier_errors += ravb_read(ndev, CERCR); - ravb_write(ndev, 0, CERCR); /* (write clear) */ - nstats->tx_carrier_errors += ravb_read(ndev, CEECR); - ravb_write(ndev, 0, CEECR); /* (write clear) */ nstats->rx_packets = stats0->rx_packets + stats1->rx_packets; nstats->tx_packets = stats0->tx_packets + stats1->tx_packets; -- 2.11.0
Re: [PATCH/RFC net-next 4/5] ravb: remove undocumented processing
On Tue, Apr 17, 2018 at 10:50:29AM +0200, Simon Horman wrote: > From: Kazuya Mizuguchi > > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Simon Horman > --- > drivers/net/ethernet/renesas/ravb.h | 5 - > drivers/net/ethernet/renesas/ravb_main.c | 15 --- > 2 files changed, 20 deletions(-) > > diff --git a/drivers/net/ethernet/renesas/ravb.h > b/drivers/net/ethernet/renesas/ravb.h > index 57eea4a77826..fcd04dbc7dde 100644 > --- a/drivers/net/ethernet/renesas/ravb.h > +++ b/drivers/net/ethernet/renesas/ravb.h > @@ -197,15 +197,11 @@ enum ravb_reg { > MAHR= 0x05c0, > MALR= 0x05c8, > TROCR = 0x0700, /* Undocumented? */ Why not this, too? Maybe some background info from HW team for the commit message would be nice to have... signature.asc Description: PGP signature
Re: [PATCH/RFC net-next 4/5] ravb: remove undocumented processing
From: Simon Horman Date: Tue, 17 Apr 2018 10:50:29 +0200 > From: Kazuya Mizuguchi > > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Simon Horman Why? What was wrong with it? Need more text and explanations in these commit messages please.
Re: [PATCH/RFC net-next 4/5] ravb: remove undocumented processing
On 04/17/2018 11:50 AM, Simon Horman wrote: > From: Kazuya Mizuguchi How about the description (or 2)? > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Simon Horman > --- > drivers/net/ethernet/renesas/ravb.h | 5 - > drivers/net/ethernet/renesas/ravb_main.c | 15 --- > 2 files changed, 20 deletions(-) > > diff --git a/drivers/net/ethernet/renesas/ravb.h > b/drivers/net/ethernet/renesas/ravb.h > index 57eea4a77826..fcd04dbc7dde 100644 > --- a/drivers/net/ethernet/renesas/ravb.h > +++ b/drivers/net/ethernet/renesas/ravb.h > @@ -197,15 +197,11 @@ enum ravb_reg { > MAHR= 0x05c0, > MALR= 0x05c8, > TROCR = 0x0700, /* Undocumented? */ > - CDCR= 0x0708, /* Undocumented? */ > - LCCR= 0x0710, /* Undocumented? */ > CEFCR = 0x0740, > FRECR = 0x0748, > TSFRCR = 0x0750, > TLFRCR = 0x0758, > RFCR= 0x0760, > - CERCR = 0x0768, /* Undocumented? */ > - CEECR = 0x0770, /* Undocumented? */ > MAFCR = 0x0778, > }; > I think this is a material of patch #1... > @@ -223,7 +219,6 @@ enum CCC_BIT { > CCC_CSEL_HPB= 0x0001, > CCC_CSEL_ETH_TX = 0x0002, > CCC_CSEL_GMII_REF = 0x0003, > - CCC_BOC = 0x0010, /* Undocumented? */ > CCC_LBME= 0x0100, ... and this -- of patch #2. Or vice versa. :-) [...] MBR, Sergei