[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4BF4109F.4000706@hartkopp.net>
Date: Wed, 19 May 2010 18:23:59 +0200
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Sam Ravnborg <sam@...nborg.org>
CC: David Miller <davem@...emloft.net>,
SocketCAN Core Mailing List <socketcan-core@...ts.berlios.de>,
Linux Netdev List <netdev@...r.kernel.org>,
Wolfgang Grandegger <wg@...ndegger.com>
Subject: Re: [PATCH v3] Fix SJA1000 command register writes on SMP systems
On 18.05.2010 23:31, Sam Ravnborg wrote:
> Hi Oliver.
>
>> diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
>> index 97a622b..de8e778 100644
>> --- a/drivers/net/can/sja1000/sja1000.h
>> +++ b/drivers/net/can/sja1000/sja1000.h
>> @@ -167,6 +167,7 @@ struct sja1000_priv {
>>
>> void __iomem *reg_base; /* ioremap'ed address to registers */
>> unsigned long irq_flags; /* for request_irq() */
>> + spinlock_t cmdreg_lock; /* lock for concurrent cmd register writes */
>>
>> u16 flags; /* custom mode flags */
>> u8 ocr; /* output control register */
>
> You define your spinlock inside a struct so you cannot use
> DEFINE_SPINLOCK().
>
> But then you need to use spin_lock_init() - which I fail to see
> you are doing in your patch.
Indeed. Sorry.
Will send a patch with spin_lock_init() e.g. to enable the spinlock debugging ...
Regards,
Oliver
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists