[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3afdfb86-7b81-a435-5853-8b238d922977@aquantia.com>
Date: Mon, 14 Oct 2019 11:43:56 +0000
From: Igor Russkikh <Igor.Russkikh@...antia.com>
To: Richard Cochran <richardcochran@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
Egor Pomozov <Egor.Pomozov@...antia.com>,
Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>,
"andrew@...n.ch" <andrew@...n.ch>,
Simon Edelhaus <sedelhaus@...vell.com>,
Sergey Samoilenko <Sergey.Samoilenko@...antia.com>
Subject: Re: [PATCH v2 net-next 03/12] net: aquantia: add basic ptp_clock
callbacks
Hi Richard,
Thanks for your review, will update the patchset after the comments.
>> +{
>> + struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
>> + struct aq_nic_s *aq_nic = aq_ptp->aq_nic;
>> +
>> + mutex_lock(&aq_nic->fwreq_mutex);
>
> Here you use a different lock than...
>
>> +
>> + spin_lock_irqsave(&aq_ptp->ptp_lock, flags);
>
> ... here. Is it safe to concurrently set the time and the frequency?
Yes, its safe. The purpose of the locks is different, mutex secures FW accesses.
They could take time and should be serialized.
Working with ptp clock however does not use FW, but spinlock is used to secure
possible concurrent access and math over 64bit variable aq_ptp->ptp_clock_offset
Regards,
Igor
Powered by blists - more mailing lists