Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531163

Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset

From Harini Katakam <harinikatakamlinux@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset
Date 2016-11-28 10:50 +0100
Message-ID <sIqJr-lL-9@gated-at.bofh.it> (permalink)
References <sIqzL-io-7@gated-at.bofh.it> <sIqzL-io-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Nicolas,

On Mon, Nov 28, 2016 at 3:01 PM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> Le 28/11/2016 à 10:23, Harini Katakam a écrit :
>> In macb_reset_hw, use read-modify-write to disable RX and TX.
>> This way exiting settings and reserved bits wont be disturbed.
>
> Yes, indeed... but I would have liked a line about how you discovered it
> was an issue for you ;  what did it break, etc...

Thanks for the review.
It did not necessarily break anything but we noticed
during some experiments that management port was being
enabled and disabled.
In addition, I thought it would be good to do
just because there were reserved read only bits in
the register.

>
>> Use the same method for clearing statistics as well.
>>
>> Signed-off-by: Harini Katakam <harinik@xilinx.com>
>> ---
>>  drivers/net/ethernet/cadence/macb.c | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
>> index 0e489bb..80ccfc4 100644
>> --- a/drivers/net/ethernet/cadence/macb.c
>> +++ b/drivers/net/ethernet/cadence/macb.c
>> @@ -1743,15 +1743,18 @@ static void macb_init_rings(struct macb *bp)
>>  static void macb_reset_hw(struct macb *bp)
>>  {
>>       struct macb_queue *queue;
>> -     unsigned int q;
>> +     unsigned int q, ctrl;
>
> I would have preferred a different line with u32 type.

Sure, I'll add and send a v2

Regards,
Harini

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-11-28 10:40 +0100
  Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-28 10:50 +0100

csiph-web