Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938628AbcKXStx (ORCPT ); Thu, 24 Nov 2016 13:49:53 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:63357 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934873AbcKXStv (ORCPT ); Thu, 24 Nov 2016 13:49:51 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=TKtaNM Tunia6hzHPGcwf32dKCQYsLkKDxGkLxX32qHPNPGw4IN9a+A5eqMM73xoX1fr/12 BPdOafosr7mMmGfP6FawhyzgLtHedSOMtNiXTw0Mt53z2qrEs8YHmJpnOP2YAxxT bulE2l8kHWKsKN9dcKWBjEX9NBWSRZMrVuwr0= Subject: Re: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable To: David Miller 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> Cc: hayeswang@realtek.com, netdev@vger.kernel.org, nic_swsd@realtek.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: Mark Lord Message-ID: <07a78491-3523-99fd-f08c-10ce277a1793@pobox.com> Date: Thu, 24 Nov 2016 13:49:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: C7718BB6-B276-11E6-9242-7471F2301B6D-82205200!pb-sasl2.pobox.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 483 Lines: 9 On 16-11-24 01:34 PM, Mark Lord wrote: >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). Slight correction: the invalidate_dcache_range() is only done when using kmalloc'd buffers. I have converted the driver here to use usb_alloc_coherent() instead, so that now gets skipped since the memory is never cached.