From patchwork Wed Apr 27 11:24:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petko Manolov X-Patchwork-Id: 615560 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qvyLN19PXz9t3w for ; Wed, 27 Apr 2016 21:25:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mip-labs.com header.i=@mip-labs.com header.b=ASAruuft; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbcD0LZL (ORCPT ); Wed, 27 Apr 2016 07:25:11 -0400 Received: from lan.nucleusys.com ([92.247.61.126]:42502 "EHLO zztop.nucleusys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751866AbcD0LY7 (ORCPT ); Wed, 27 Apr 2016 07:24:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mip-labs.com; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=j0MsBfOCdGLgNePPQq0ZdoRHJx3QtLyMdA7n+ZIAapA=; b=ASAruuftEWi60RgNRTu7KxiVNgaMGXJBapkdpt8eaNbjT8nerVEGGjQgnS4M7iiJg+AqHJ5z2oiUgG/hBA0WG7Tb0mdxDDzCg4EW/AO2V8bTJDOWT1S+1eqRgzfamOg3/nwlx5Jk/EEu+aKxIv1Jm47dkLjoAD+0LjUxxdcvqks=; Received: from 78-83-66-70.spectrumnet.bg ([78.83.66.70] helo=localhost.localdomain) by zztop.nucleusys.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1avNaS-0003C6-2W; Wed, 27 Apr 2016 14:24:56 +0300 From: Petko Manolov To: netdev@vger.kernel.org Cc: davem@davemloft.net, a1291762@gmail.com, johannes@sipsolutions.net, Petko Manolov Subject: [PATCH v3 2/2] pegasus: fixes reported packet length Date: Wed, 27 Apr 2016 14:24:50 +0300 Message-Id: <1461756290-27421-3-git-send-email-petkan@mip-labs.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1461756290-27421-1-git-send-email-petkan@mip-labs.com> References: <1461756290-27421-1-git-send-email-petkan@mip-labs.com> X-Spam-Score: -1.0 (-) X-Spam-Report: Spam detection software, running on the system "zztop.nucleusys.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The default Pegasus setup was to append the status and CRC at the end of each received packet. The status bits are used to update various stats, but CRC has been ignored. The new default is to not append CRC at the end of RX packets. [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The default Pegasus setup was to append the status and CRC at the end of each received packet. The status bits are used to update various stats, but CRC has been ignored. The new default is to not append CRC at the end of RX packets. Signed-off-by: Petko Manolov --- drivers/net/usb/pegasus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index f919e20..82129ee 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -411,7 +411,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb) int ret; read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart); - data[0] = 0xc9; + data[0] = 0xc8; /* TX & RX enable, append status, no CRC */ data[1] = 0; if (linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL)) data[1] |= 0x20; /* set full duplex */ @@ -497,7 +497,7 @@ static void read_bulk_callback(struct urb *urb) pkt_len = buf[count - 3] << 8; pkt_len += buf[count - 4]; pkt_len &= 0xfff; - pkt_len -= 8; + pkt_len -= 4; } /*