lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <851BA4133600BADF3FBB6427@[172.22.2.41]>
Date:	Mon, 10 Mar 2014 08:16:14 +0100
From:	Christian Riesch <christian.riesch@...cron.at>
To:	Mugunthan V N <mugunthanvnm@...com>, netdev@...r.kernel.org
cc:	davinci-linux-open-source@...ux.davincidsp.com,
	Florian Fainelli <f.fainelli@...il.com>,
	Jon Ringle <jon@...gle.org>
Subject: Re: [PATCH RFC] net: davinci_emac: Fix rollback of emac_dev_open()



--On March 07, 2014 20:15 +0530 Mugunthan V N <mugunthanvnm@...com> wrote:

> On Friday 07 March 2014 07:37 PM, Christian Riesch wrote:
>> Signed-off-by: Christian Riesch <christian.riesch@...cron.at>
>> Cc: Prabhakar Lad <prabhakar.csengg@...il.com>
>> Cc: Mugunthan V N <mugunthanvnm@...com>
>> Cc: Florian Fainelli <f.fainelli@...il.com>
>> ---
>>
>> Hi again,
>>
>> How about this solution for fixing the rollback of emac_dev_open()?
>> Especially the change in davinci_cpdma.c, would this break anything?
>>
>> The patch applies on top of
>> [PATCH] net: davinci_emac: Replace devm_request_irq with request_irq
>>
>> Regards,
>> Christian
>>
>>  drivers/net/ethernet/ti/davinci_cpdma.c |    4 +--
>>  drivers/net/ethernet/ti/davinci_emac.c  |   44
>>  ++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 17
>>  deletions(-)
>>
>> diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c
>> b/drivers/net/ethernet/ti/davinci_cpdma.c index 364d0c7..88ef270 100644
>> --- a/drivers/net/ethernet/ti/davinci_cpdma.c
>> +++ b/drivers/net/ethernet/ti/davinci_cpdma.c
>> @@ -355,7 +355,7 @@ int cpdma_ctlr_stop(struct cpdma_ctlr *ctlr)
>>  	int i;
>>
>>  	spin_lock_irqsave(&ctlr->lock, flags);
>> -	if (ctlr->state != CPDMA_STATE_ACTIVE) {
>> +	if (ctlr->state == CPDMA_STATE_TEARDOWN) {
>>  		spin_unlock_irqrestore(&ctlr->lock, flags);
>>  		return -EINVAL;
>>  	}
>> @@ -891,7 +891,7 @@ int cpdma_chan_stop(struct cpdma_chan *chan)
>>  	unsigned		timeout;
>>
>>  	spin_lock_irqsave(&chan->lock, flags);
>> -	if (chan->state != CPDMA_STATE_ACTIVE) {
>> +	if (chan->state == CPDMA_STATE_TEARDOWN) {
>>  		spin_unlock_irqrestore(&chan->lock, flags);
>>  		return -EINVAL;
>>  	}
>
> Even when in idle mode chan stop should return error.

Can you please explain? I do not see why.

I must be able to call cpdma_ctlr_stop in idle mode to free the rx 
descriptors in case ndo_open in davinci_emac.c fails. Any other ideas how 
to solve the problem addressed in the rest of the patch?

Thanks, Christian
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ