Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3231696imm; Sun, 14 Oct 2018 15:01:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Z9VBst/CJspJ2+n7iHXtvd9GIr2zD99K+00QlL8ygJ4KXo5G4o1xYcDjCM/yHS1X942UH X-Received: by 2002:a17:902:bd45:: with SMTP id b5-v6mr14302516plx.171.1539554505854; Sun, 14 Oct 2018 15:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539554505; cv=none; d=google.com; s=arc-20160816; b=Un6R7ctccL5xRYxxD79YHEDo5dCRw8ddGxYitBpaozbUmLMQT6UAn+LP6UAtSY0YfC GD++FKPb/EcTcmvLqjeGbTba4hQkZhZDsH6O5g8USJyt8AHS0sIJpqJCOgKAlMsOP8pV LyrIp4ay7C9hnY87LtS9P0sNe+pZ2OVxdlxZRJcqkgA/d8xx4u42pIVrMkYUA0XG3Mtz Jrs2GVsufQgG83mUSySXdGMfsGwVQ+RPHPF8ZFZ7g7ho2R5sPfBAO9v+FY3dae+yBHVB prQ6OQ87bnkiN+CxXNu9zK2wQKKijjm/TpK8QB+PjNV5t0dgSepaOJG+g6UAEqXbOB78 /7Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=6YsrNlXfFgTwGBal6PIrb4nChsJJaktVF3dKL8sEE/g=; b=zPh5+hfsv0t5rlT46DlHu9yabgDF2CGsarUKNThCR2Tx7S3JNnQBPlqjNR//xaqLPF 7L5FSGoTWFTpl5bMsjvoZZRCGv5E6yKrY8vHMTaY6L2IAKQixoRJ4k8Z0c/5NZqmzNSZ Dt3wX1oL+7p/HAKpStySXKuZDxQfVB0nE417vnJJHFo4/HGdoribXZjKBd9btW2OEgmk j6PH1a8JE9qi2btm6j0sZuVyFLMAVPrpZYyZvbC/tSFgbajO+SzZ2m5aVbRozoe8KE/6 BM9plK7xg+n4SWT0pBbrt05Li6B1n9OkohWE9j1sucZ1GBih1R1K62dNc+OfTYqOgQ58 xiog== 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 r12-v6si8405666pgg.209.2018.10.14.15.01.30; Sun, 14 Oct 2018 15:01:45 -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 S1726463AbeJOFne (ORCPT + 99 others); Mon, 15 Oct 2018 01:43:34 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:58786 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbeJOFne (ORCPT ); Mon, 15 Oct 2018 01:43:34 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 058DF22C36; Sun, 14 Oct 2018 18:01:01 -0400 (EDT) Date: Mon, 15 Oct 2018 09:00:57 +1100 (AEDT) From: Finn Thain To: Geert Uytterhoeven cc: "James E.J. Bottomley" , "Martin K. Petersen" , Michael Schmitz , Hannes Reinecke , scsi , linux-m68k , Linux Kernel Mailing List Subject: Re: [PATCH v2 1/6] zorro_esp: Limit DMA transfers to 65535 bytes In-Reply-To: Message-ID: References: <022a8c581d228f3f01dfa783aadd183a53169daa.1539497520.git.fthain@telegraphics.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 14 Oct 2018, Geert Uytterhoeven wrote: > > > Fixes: 3109e5ae0311 > > Fixes: 3109e5ae0311 ("scsi: zorro_esp: New driver for Amiga Zorro > NCR53C9x boards") > OK. > $ git help fixes > 'fixes' is aliased to 'show --format='Fixes: %h ("%s")' -s' > > BTW, if you use vim, add > > noremap ;gs "zyiw:exe "new \| setlocal buftype=nofile > bufhidden=hide noswapfile syntax=git \| 0r ! git show ".@z."" \| > :0 > > to .vimrc, and type ";gs" when the cursor is positioned on a commit ID. > Thanks. > > Signed-off-by: Finn Thain > > Cc: Michael Schmitz > > Tested-by: Michael Schmitz > > > --- a/drivers/scsi/zorro_esp.c > > +++ b/drivers/scsi/zorro_esp.c > > @@ -245,7 +245,7 @@ static int fastlane_esp_irq_pending(struct esp *esp) > > static u32 zorro_esp_dma_length_limit(struct esp *esp, u32 dma_addr, > > u32 dma_len) > > { > > - return dma_len > 0xFFFFFF ? 0xFFFFFF : dma_len; > > + return dma_len > 0xFFFF ? 0xFFFF : dma_len; > > } > > > > static void zorro_esp_reset_dma(struct esp *esp) > > @@ -484,7 +484,6 @@ static void zorro_esp_send_blz1230_dma_cmd(struct esp *esp, u32 addr, > > scsi_esp_cmd(esp, ESP_CMD_DMA); > > zorro_esp_write8(esp, (esp_count >> 0) & 0xff, ESP_TCLOW); > > zorro_esp_write8(esp, (esp_count >> 8) & 0xff, ESP_TCMED); > > - zorro_esp_write8(esp, (esp_count >> 16) & 0xff, ESP_TCHI); > > Since all these sub-drivers seem to support 24-bit transfers, perhaps this is > something to be fixed in the esp_scsi core? > I don't think there is anything to fix in the esp_scsi core. The fact that no-one saw the error indicates that large transfers don't occur in practice. If you said there is an opportunity for an enhancement, I could agree, assuming that you also found a way to produce large IO requests. But I doubt that such an enhancement would make a measurable improvement. Even if the benefit was measurable, the fix under review would still be needed for stable kernels. BTW, Michael and I already discussed all this (it probably should have happened on the linux-m68k list). Please see, $ grep -lr ESP_CONFIG2_FENAB drivers/scsi/ drivers/scsi/am53c974.c drivers/scsi/esp_scsi.c drivers/scsi/esp_scsi.h The authors of am53c974.c obviously decided it wasn't wise to make this feature mandatory (which suggests that perhaps it shouldn't go into common code). The comments in esp_scsi.c say that ESP_CONFIG2_FENAB has undesirable consequences. There is information in the datasheets on this point but I didn't follow it up because I don't see a performance issue. --