lkml.org 
[lkml]   [2019]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 07/12] net: ll_temac: Support indirect_mutex share within TEMAC IP
Date
Andrew Lunn <andrew@lunn.ch> writes:

>> For OF devices, the xlnx,compound parent of the temac node should be
>> used to find siblings, and setup a shared indirect_mutex between them.
>> I will leave this work to somebody else, as I don't have hardware to
>> test that. No regression is introduced by that, as before this commit
>> using two Ethernet interfaces in same TEMAC block is simply broken.
>
> Is that true?

Ouch, it was in v1. But I messed up here in v2. I will fix for v3.

>> @@ -1092,7 +1092,16 @@ static int temac_probe(struct platform_device *pdev)
>> lp->dev = &pdev->dev;
>> lp->options = XTE_OPTION_DEFAULTS;
>> spin_lock_init(&lp->rx_lock);
>> - mutex_init(&lp->indirect_mutex);
>> +
>> + /* Setup mutex for synchronization of indirect register access */
>> + if (pdata) {
>> + if (!pdata->indirect_mutex) {
>> + dev_err(&pdev->dev,
>> + "indirect_mutex missing in platform_data\n");
>> + return -EINVAL;
>> + }
>> + lp->indirect_mutex = pdata->indirect_mutex;
>> + }
>
> In the OF case, isn't lp->indirect_mutex now a NULL pointer, where as
> before it was a valid mutex?
>
> Or did i miss something somewhere?

No, you did not miss something. But I did messed up the OF case in v2
of this series. Sorry.

/Esben

\
 
 \ /
  Last update: 2019-04-30 08:55    [W:0.299 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site