Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751064AbcKYA1l (ORCPT ); Thu, 24 Nov 2016 19:27:41 -0500 Received: from violet.fr.zoreil.com ([92.243.8.30]:52482 "EHLO violet.fr.zoreil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbcKYA1e (ORCPT ); Thu, 24 Nov 2016 19:27:34 -0500 Date: Fri, 25 Nov 2016 01:27:02 +0100 From: Francois Romieu To: Mark Lord Cc: David Miller , hayeswang@realtek.com, netdev@vger.kernel.org, nic_swsd@realtek.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable Message-ID: <20161125002702.GA14085@electric-eye.fr.zoreil.com> References: <0835B3720019904CB8F7AA43166CEEB201055ED8@RTITMBSV03.realtek.com.tw> <20161124.112152.692025478489876693.davem@davemloft.net> <23e0c132-8844-0a34-3e0b-e412f76493ba@pobox.com> <20161124.121140.2054576632424977475.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Organisation: Land of Sunshine Inc. User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1200 Lines: 27 Mark Lord : [...] > >From tracing through the powerpc arch code, this is the buffer that > is being directly DMA'd into. And the USB layer does an invalidate_dcache > on that entire buffer before initiating the DMA (confirmed via printk). > > The driver itself NEVER writes anything to that buffer, > and nobody else has a pointer to it other than the USB host controller, > so there's nothing else that can write to it either. > > According to the driver writer, the chip should only ever write a fresh > rx_desc struct at the beginning of a buffer, never ASCII data. > > So how does that buffer end up containing ASCII data from the NFS transfers? Through aliasing the URB was given a page that contains said (previously) received file. The ethernet chip/usb host does not write anything in it. There could be a device or a driver problem but it may not be the real problem. So far the analysis focused on "how was this corrupted content written into this receive buffer page ?". If I read David correctly (?) the "nobody else has a pointer to it other than the USB host controller" point may be replaced with "the pointer to it aliases some already used page". -- Ueimor