Message ID | 1495104651-18871-1-git-send-email-uri.mashiach@compulab.co.il |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wT7Kh1rK1z9ryT for <incoming@patchwork.ozlabs.org>; Thu, 18 May 2017 20:51:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=compulab.co.il header.i=@compulab.co.il header.b="g4ll8Plj"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 99C9DC21D33; Thu, 18 May 2017 10:51:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 88029C21D0C; Thu, 18 May 2017 10:51:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 70C27C21D0C; Thu, 18 May 2017 10:51:43 +0000 (UTC) Received: from compulab.co.il (softlayer.compulab.co.il [50.23.254.55]) by lists.denx.de (Postfix) with ESMTPS id D6469C21C72 for <u-boot@lists.denx.de>; Thu, 18 May 2017 10:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=compulab.co.il; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MEA3aIXZ9BG1AHO+fJbr+MX2yvJwQYtpDbnrPjVPySo=; b=g4ll8Plj/kiqEyej+0lZ+updMT rvNVNlig/U/f3xyz0RU4boYcVU+hV+NmyzqyETz5aCpKxLNv2egC/qdyONqVE2P7cSzqlEUkPrRS0 MrKNyuzQC5gm/YJXvVxno2s5jiN6m3rYKg6zIzNByPHZH+1vXJTs6NZ+TNEMevXPy4VIDO/c2Zte3 fKGHjlwTzawwsK6vg88ZAjZLOMvzIJnuJH1TTCErcBTF+ywklUPomtP/foL3lff/+k/aIVSmDmZyf fddn+QpV5qchgrQ0Xo2TI30YZFG72yEnvY8vKNhWrbkL2adoDpDR6nkJXi+qU808H+Uy+bzdlTjt0 zIE/yPDA==; Received: from [62.90.235.247] (port=57461 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.87) (envelope-from <uri.mashiach@compulab.co.il>) id 1dBJ1x-0003Or-57; Thu, 18 May 2017 13:51:41 +0300 Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 59725483F01; Thu, 18 May 2017 13:51:40 +0300 (IDT) Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id A0xJPpXS1kFt; Thu, 18 May 2017 13:51:39 +0300 (IDT) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id C4842483F00; Thu, 18 May 2017 13:51:39 +0300 (IDT) X-Virus-Scanned: amavisd-new at zimbra-mta.compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id amNaNnmTv6wr; Thu, 18 May 2017 13:51:39 +0300 (IDT) Received: from urim-desk.compulab.local (uri-ipc.compulab.local [192.168.11.218]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 85631483EFA; Thu, 18 May 2017 13:51:39 +0300 (IDT) From: Uri Mashiach <uri.mashiach@compulab.co.il> To: Tom Rini <trini@konsulko.com> Date: Thu, 18 May 2017 13:50:51 +0300 Message-Id: <1495104651-18871-1-git-send-email-uri.mashiach@compulab.co.il> X-Mailer: git-send-email 2.7.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_recent_authed_mail_ips_text_entry: uri.mashiach@compulab.co.il|compulab.co.il X-Authenticated-Sender: softlayer.compulab.co.il: uri.mashiach@compulab.co.il Cc: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3] net: usb: mcs7830: fix no DM recive path X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c index 9d6cf8c..4abef5d 100644 --- a/drivers/usb/eth/mcs7830.c +++ b/drivers/usb/eth/mcs7830.c @@ -622,10 +622,12 @@ static int mcs7830_recv(struct eth_device *eth) int len; len = mcs7830_recv_common(ueth, buf); - if (len <= 0) + if (len >= 0) { net_process_received_packet(buf, len); + return 0; + } - return 0; + return len; } /*
The function mcs7830_recv_common() returns a negative value on error, 0 or positive value on success. Fix the condition for calling the function net_process_received_packet(). The function mcs7830_recv() is always returning 0. Update the return value of mcs7830_recv() to reflect the function's success status. Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> --- v1 -> v3: update the commit message. drivers/usb/eth/mcs7830.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)