Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2830655ybi; Sun, 2 Jun 2019 02:09:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzm8l1/VHx9yFtWXA62NLIADdjLIQKqspBv1/b5TnhWEL6abO9mFPadQsx5gOfVY8fobbjX X-Received: by 2002:a17:902:404:: with SMTP id 4mr21591216ple.204.1559466562885; Sun, 02 Jun 2019 02:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559466562; cv=none; d=google.com; s=arc-20160816; b=fm7/gMdtEcPXKfR883WsXHOD81XJ0p5LcZ1uqm3Tynepnxh9KFAuI5hEmXl3QqJDO2 lErn6MyYOpjZD93e47hSkTii3Bx194TWqelDaoGwa2XdvOQOGoe8/xDmloKKw1zi2izR mqmCssyb3XTsnN4UQTb9W5OJpFG8qLqFjQi0NKYki+sFxe/BllzidjRuebgMzgPvTpiW R0lrd5Fx22GWPe9DhInmUda82mtyZCII7GnDlWdsYCBFLYfIMZKmwU3R8uofIvxvr6c4 2rvCsu5WeukcSDyPBa+Shbw+XXKoGuy7VtaAa4SFX0NCwLMe6IguJRd+NDP5WtTpjbTe kTKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=E3LHC70VmPjWfUEwWCZUhxJK2v23LsUvMVDDFT+88Do=; b=JKl1gPVDUgiDoXx8sHINfSRHBsXn8OPmbcTK3KFR70MnEnI6D5gV+qCCBnJm1PlC71 u94s7oxl7tSRoziWNL2lwblAyh7eL7YyU6RtypfZA7W8X9fxnW3/+hBe4WX75hbVPwQo 80s2EtOH58puESKLn2INAAVHsbio6DCoFpye5mDhfULb/q/wsFVb9YwvPPFwzHVYbI5x ZOxG5ahEcerWUWni8jQ7D66uVlOOI3X7RhL4nm9Xvt4U7PrbWDVP0WyKE4+g94uo2IjW knhKg2jtdMKCE7dQ7tvZcmyqFt/gvdjz2hIwIlVKpTXgokfa1DdQLLtqyIk41dIDpD+y Tl6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si13491159pji.88.2019.06.02.02.09.07; Sun, 02 Jun 2019 02:09:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfFBJHX (ORCPT + 99 others); Sun, 2 Jun 2019 05:07:23 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:41776 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfFBJHW (ORCPT ); Sun, 2 Jun 2019 05:07:22 -0400 Received: by mail-lf1-f68.google.com with SMTP id 136so11216724lfa.8; Sun, 02 Jun 2019 02:07:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E3LHC70VmPjWfUEwWCZUhxJK2v23LsUvMVDDFT+88Do=; b=t/aKIikr1PdapJ+uG190SGfU4tj20xb0xPHhBXXAzpgFJb0VYYTzveZPV/gYGo2wO8 qPQc7jpvQpPVLHks/IHQG56mVc0yg9uhdfC+gXbiCMkZwdCnMhU2WQ6RaGyFACf0JPAM iifaNwbqFFfpTDnmlO6PRSinP9D2zoMCOnzEbrEyBpf0N6gypVDmpnGjlMctEI7qhHMV EeRGB2cqHaPM5jtGEQp87kT+K0jntWhrtGkRtwLhLiajZFkkQ7iJhVTcRVkHMFYyRvSO kllx3y7W7G6c1FMx+bfYFe64/DjBE+/1QdIDEEU1TO+8zOzJBECYHkPbi4xM5lRaOIFj yBbw== X-Gm-Message-State: APjAAAWbdEMJHdElzCRtPGlDmqm8l1JBvJFUbdmjXItIBr4spLKWSxaP KmKon1IUc8j3mInUhvMpMzNKcnaUgmmBVwAr2Hg= X-Received: by 2002:a19:218b:: with SMTP id h133mr10380233lfh.151.1559466440253; Sun, 02 Jun 2019 02:07:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Sun, 2 Jun 2019 11:07:08 +0200 Message-ID: Subject: Re: [PATCH 5/7] scsi: mac_scsi: Fix pseudo DMA implementation, take 2 To: Finn Thain Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Michael Schmitz , scsi , Linux Kernel Mailing List , stable , linux-m68k Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On Sun, Jun 2, 2019 at 3:29 AM Finn Thain wrote: > A system bus error during a PDMA transfer can mess up the calculation of > the transfer residual (the PDMA handshaking hardware lacks a byte > counter). This results in data corruption. > > The algorithm in this patch anticipates a bus error by starting each > transfer with a MOVE.B instruction. If a bus error is caught the transfer > will be retried. If a bus error is caught later in the transfer (for a > MOVE.W instruction) the transfer gets failed and subsequent requests for > that target will use PIO instead of PDMA. > > This avoids the "!REQ and !ACK" error so the severity level of that > message is reduced to KERN_DEBUG. > > Cc: Michael Schmitz > Cc: Geert Uytterhoeven > Cc: stable@vger.kernel.org # v4.14+ > Fixes: 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation") > Reported-by: Chris Jones > Tested-by: Stan Johnson > Signed-off-by: Finn Thain Thanks for your patch! > --- > arch/m68k/include/asm/mac_pdma.h | 179 +++++++++++++++++++++++++++ > drivers/scsi/mac_scsi.c | 201 ++++++++----------------------- Why have you moved the PDMA implementation to a header file under arch/m68k/? Do you intend to reuse it by other drivers? If not, please keep it in the driver, so (a) you don't need an ack from me ;-), and (b) your change may be easier to review. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds