Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2744695imm; Sun, 14 Oct 2018 03:56:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV61LMXnGdjAvgifr/8cmx2kMoT1FGTfY1CnO6JgnU/Fm3gNCih7dduR4omAwx0fxfcRptnIY X-Received: by 2002:a17:902:2825:: with SMTP id e34-v6mr3938808plb.244.1539514595389; Sun, 14 Oct 2018 03:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539514595; cv=none; d=google.com; s=arc-20160816; b=OPztqGOTJ4P7ete1awo2itmx5yYNqoLeEU09AHQBtjX7xfs5ahtbTs1xvo9T58vy2K lQqIwZPjvci42iX1NEU1e0t2eiNgwcVG0yux7tLIIO190pINvreE91hKVsle0lLWlzIY /BzmNE8K28eRk/PcicLD4OoFn1ip4BPo6qqRSRkdijOq9u1COSvSGR/yZ/NqxjSsb4SQ c4NcfVEFYHQPwAO3l3xxZbIn/o+vkvMqk7UHRu3hYm12frioJ/XPwIa4y0XHnESGdvb3 06kkRpLQex4OGsK4yvFkF9J3Hhtnbnu/XnmPKuJvjUODrpe6PiLm21Pl8LMf3pbb8I88 a87w== 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=Vxu1fH6HeyY/jFeli4p/cSj5HJKl5bFHT5W2pM+gbXg=; b=M8vpCzCgAMwuCK+NF/w8J12+GBUOeAewm+6MHC5b0ZOq3F25kQbbxAyZJA5U3QYaVG fJeJ1WnXhN4lAQ+beqIglrnDbwm1TIB1WjDtc6rIfoyiifwnShNeb9rP9W+15VCrt2Ij /RfdiV2uwotJzBecE083umzW1nelKLE7VAmAGMuRkWMRNRhvDwfLOc9lqU+mfwltxr17 UgMiNBfUaVveodCPzcdIgqMeZb8PqEZT9IZnQ0B3NYwzFhk0Pkw6OoASVRa/Gv+bZGUN 7UpL/7hi70xNlJ0DpEU5fhKyOCezhuoowTT/sQ5M+CDhawWAORPVzYcVSYf0W1JYZWNx +kmA== 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 m16-v6si6207426pgl.462.2018.10.14.03.56.08; Sun, 14 Oct 2018 03:56:35 -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 S1726690AbeJNSgL (ORCPT + 99 others); Sun, 14 Oct 2018 14:36:11 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:37640 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbeJNSgL (ORCPT ); Sun, 14 Oct 2018 14:36:11 -0400 Received: by mail-vs1-f66.google.com with SMTP id r83so14689599vsc.4; Sun, 14 Oct 2018 03:55:33 -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=Vxu1fH6HeyY/jFeli4p/cSj5HJKl5bFHT5W2pM+gbXg=; b=beEW7LDCDDvE42sW/ZsUg3tlGwwI8lRFXU5OnxG3hRsi02yOaT+Kk80AuIfAXyeoFg SMBDfve7XG/FohiDYL40P8Umi2kLigawjM2vqNL1jGZdZL4alvU1hjZ9s+mXfTermzRM 2lBG/dcLM8/NYMzSbkSf+hZbryE7y1/0ztfLlzVjGZ+4KKubmcd1O526wrUoa+FQHTBU 3smwBtzUEs5el2j2Pn32L/U6H17GvQfODMgd9gkaDxFOjf1UCtHUhQUizEJS1T6p+9X+ kCSl6S9Aslus8pu2mqzDxZfyWJMLDP9IiNSgoiNXRhygz8F7+52G2NhHm/cLbc+BRVQ0 NoZA== X-Gm-Message-State: ABuFfojq2BiiyZmYLXq2Ld95iIUK11gslqgIn9pCPkIg8IUNHePzkfyz f+khtk21SYkOBCwghY5/jreBrhYsWFGoQc/6wuk= X-Received: by 2002:a67:f3cc:: with SMTP id j12mr4404940vsn.96.1539514533263; Sun, 14 Oct 2018 03:55:33 -0700 (PDT) MIME-Version: 1.0 References: <022a8c581d228f3f01dfa783aadd183a53169daa.1539497520.git.fthain@telegraphics.com.au> In-Reply-To: <022a8c581d228f3f01dfa783aadd183a53169daa.1539497520.git.fthain@telegraphics.com.au> From: Geert Uytterhoeven Date: Sun, 14 Oct 2018 12:55:21 +0200 Message-ID: Subject: Re: [PATCH v2 1/6] zorro_esp: Limit DMA transfers to 65535 bytes To: Finn Thain Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Michael Schmitz , Hannes Reinecke , scsi , linux-m68k , Linux Kernel Mailing List 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, Oct 14, 2018 at 8:36 AM Finn Thain wrote: > The core driver, esp_scsi, does not use the ESP_CONFIG2_FENAB bit, so > the chip's Transfer Counter register is only 16 bits wide (not 24). > A larger transfer cannot work and will theoretically result in a failed > command and a "DMA length is zero" error. Thanks for your patch! > Fixes: 3109e5ae0311 Fixes: 3109e5ae0311 ("scsi: zorro_esp: New driver for Amiga Zorro NCR53C9x boards") $ 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. > 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? 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