[PATCH v2 4/6] esp_scsi: Eliminate ESP_FLAG_DOING_SLOWCMD

2018-10-13 Thread Finn Thain
The concept of a 'slow command' as it appears in esp_scsi is confusing because it could refer to an ESP command or a SCSI command. It turns out that it refers to a particular ESP select command which the driver also tracks as 'ESP_SELECT_MSGOUT'. For readability, it is better to use the terminology

[PATCH v2 0/6] mac_esp, zorro_esp, esp_scsi: Various improvements

2018-10-13 Thread Finn Thain
This series has fixes and cleanup for mac_esp, zorro_esp and the core esp_scsi driver. These improvements include elimination of duplicated code temporarily introduced for zorro_esp. Finn Thain (6): zorro_esp: Limit DMA transfers to 65535 bytes esp_scsi: Track residual for PIO transfers es

[PATCH v2 3/6] esp_scsi: Grant disconnect privilege for untagged commands

2018-10-13 Thread Finn Thain
A SCSI device is not granted disconnect privilege by an esp_scsi host unless that device has its simple_tags flag set. However, a device may support disconnect/reselect and not support command queueing. Allow these devices to disconnect and improve bus utilization. Tested-by: Stan Johnson Signed-

[PATCH v2 1/6] zorro_esp: Limit DMA transfers to 65535 bytes

2018-10-13 Thread Finn Thain
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. Fixes: 3109e5ae0311 Signed-off-by: Finn Thain

[PATCH v2 2/6] esp_scsi: Track residual for PIO transfers

2018-10-13 Thread Finn Thain
If a target disconnects during a PIO data transfer the command may fail when the target reconnects: scsi host1: DMA length is zero! scsi host1: cur adr[0438] len[] The scsi bus is then reset. This happens because the residual reached zero before the transfer was completed. The usual

[PATCH v2 6/6] esp_scsi: Optimize PIO loops

2018-10-13 Thread Finn Thain
Avoid function calls in the inner PIO loops. On a Centris 660av this improves throughput for sequential read transfers by about 40% and sequential write by about 10%. Unfortunately it is not possible to have method calls like esp_write8() placed inline so this is always going to be slow (even with

[PATCH v2 5/6] esp_scsi: De-duplicate PIO routines

2018-10-13 Thread Finn Thain
As a temporary measure, the code to implement PIO transfers was duplicated in zorro_esp and mac_esp. Now that it has stabilized move the common code into the core driver but don't build it unless needed. This replaces the inline assembler with more portable writesb() calls. Optimizing the m68k wri

Re: move bus (PCI, PCMCIA, EISA, rapdio) config to drivers/

2018-10-13 Thread Thomas Gleixner
On Sat, 13 Oct 2018, Christoph Hellwig wrote: > Hi all, > > currently every architecture that wants to provide on of the common > periphal busses needs to add some boilerplate code and include the > right Kconfig files. This series instead just selects the presence > (when needed) and then hand

Re: [PATCH 5/8] pcmcia: allow PCMCIA support independent of the architecture

2018-10-13 Thread Dominik Brodowski
On Sat, Oct 13, 2018 at 05:10:13PM +0200, Christoph Hellwig wrote: > There is nothing architecture specific in the PCMCIA core, so allow > building it everywhere. The actual host controllers will depend on ISA, > PCI or a specific SOC. > > Signed-off-by: Christoph Hellwig Looks good to me, thou

Re: [PATCH v3] target: split out helper for cxn timeout error stashing

2018-10-13 Thread kbuild test robot
Hi David, Thank you for the patch! Yet something to improve: [auto build test ERROR on target/master] [also build test ERROR on v4.19-rc7 next-20181012] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/c

Re: [PATCH 0/6] mac_esp, zorro_esp, esp_scsi: Various improvements

2018-10-13 Thread Michael Schmitz
Hi Finn, Am 13.10.2018 um 13:51 schrieb Finn Thain: This series has fixes and cleanup for mac_esp, zorro_esp and the core esp_scsi driver. The improvements include elimination of duplicated code temporarily introduced for zorro_esp. Michael, would you please regression test this series on elga

Please Reply / Can i have a bit of your attention?

2018-10-13 Thread Bauer McDonalds
-- Hello dear! I sincerely hope i do not bother you with my message.I know this might look strange because we don't know each other but i believe anything is possible if we try. I have actually lost confidence on dating sites and due to the nature of my work its not easy to find someone so

[PATCH v3] target: split out helper for cxn timeout error stashing

2018-10-13 Thread David Disseldorp
Replace existing nested code blocks with helper function calls. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_erl0.c | 15 + drivers/target/iscsi/iscsi_target_util.c | 36 ++-- drivers/target/iscsi/iscsi_target_util.h | 1 + 3 file

Re: [PATCH v4 00/11] Zoned block device support improvements

2018-10-13 Thread Jens Axboe
On 10/12/18 4:08 AM, Damien Le Moal wrote: > This series improves zoned block device support (reduce overhead) and > introduces many simplifications to the code (overall, there are more deletions > than insertions). > > In more details: > * Patches 1 to 3 are SCSI side (sd driver) cleanups and imp

Re: aic7xxx DMA overflow error

2018-10-13 Thread tedheadster
> it seems like we do for some reason never actually enable swiotlb > for 32-bit x86. Before my commit the block bounce buffering papered > over that for networking, Please try this patch: > > diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c > index 661583662430..71c0b01

[PATCH 2/8] powerpc: simplify CONFIG_PCI_QSPAN Kconfig magic

2018-10-13 Thread Christoph Hellwig
The way how CONFIG_PCI_QSPAN selects the CONFIG_PCI default is highly unusual and gets in the way of moving CONFIG_PCI into drivers/pci/Kconfig. Simplify it by just having it depend on CONFIG_PCI. Signed-off-by: Christoph Hellwig --- arch/powerpc/Kconfig | 3 +-- 1 file changed, 1 insertion(+),

[PATCH 3/8] powerpc: PCI_MSI needs PCI

2018-10-13 Thread Christoph Hellwig
Various powerpc boards select the PCI_MSI config option without selecting PCI, resulting in potentially not compilable configurations if the by default enabled PCI option is disabled. Explicitly select PCI to ensure we always have valid configs. Signed-off-by: Christoph Hellwig --- arch/powerpc

move bus (PCI, PCMCIA, EISA, rapdio) config to drivers/

2018-10-13 Thread Christoph Hellwig
Hi all, currently every architecture that wants to provide on of the common periphal busses needs to add some boilerplate code and include the right Kconfig files. This series instead just selects the presence (when needed) and then handles everything in the bus-specific Kconfig file under drive

[PATCH 4/8] pci: consolidate PCI config entry in drivers/pci

2018-10-13 Thread Christoph Hellwig
There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAS_PCI symbol that indicates availability of PCI support and the handle the rest in drivers/pci. Note that for powerpc we now select HAS_PCI globally instead of the convoluted mess of conditional

[PATCH 8/8] kconfig: remove CONFIG_MCA leftovers

2018-10-13 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/powerpc/Kconfig | 4 drivers/scsi/Kconfig | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index f0ea460653cd..8b9edf7caf96 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kco

[PATCH 1/8] aha152x: rename the PCMCIA define

2018-10-13 Thread Christoph Hellwig
We plan to enable building the pcmcia core and drivers, and the non-prefixed PCMCIA name clashes with some arch headers. Signed-off-by: Christoph Hellwig --- drivers/scsi/aha152x.c | 14 +++--- drivers/scsi/pcmcia/aha152x_core.c | 2 +- 2 files changed, 8 insertions(+), 8 de

[PATCH 6/8] rapidio: consolidate RAPIDIO config entry in drivers/rapidio

2018-10-13 Thread Christoph Hellwig
There is no good reason to duplicate the RAPIDIO menu in various architectures. Instead provide a selectable HAS_RAPIDIO symbol that indicates native availability of RAPIDIO support and the handle the rest in drivers/pci. This also means we now provide support for PCI(e) to Rapidio bridges for ev

[PATCH 7/8] eisa: consolidate EISA Kconfig entry in drivers/eisa

2018-10-13 Thread Christoph Hellwig
Let architectures opt into EISA support by selecting HAS_EISA and handle everything else in drivers/eisa. Signed-off-by: Christoph Hellwig --- arch/alpha/Kconfig | 8 +++- arch/arm/Kconfig | 16 +--- arch/mips/Kconfig | 31 +-- arch/pow

[PATCH 5/8] pcmcia: allow PCMCIA support independent of the architecture

2018-10-13 Thread Christoph Hellwig
There is nothing architecture specific in the PCMCIA core, so allow building it everywhere. The actual host controllers will depend on ISA, PCI or a specific SOC. Signed-off-by: Christoph Hellwig --- arch/alpha/Kconfig | 2 -- arch/arm/Kconfig | 2 -- arch/ia64/Kconfig | 2 -- ar

Re: aic7xxx DMA overflow error

2018-10-13 Thread Christoph Hellwig
On Sat, Oct 13, 2018 at 10:09:52AM -0400, tedheadster wrote: > Christoph, > here is all of the newly patched dmesg output. I also added > 'aic7xxx.a9c7xxx=verbose' for extra information. Hi Matthew, it seems like we do for some reason never actually enable swiotlb for 32-bit x86. Before my com

Re: SCSI qla2xxx: tcm_qla2xxx server code seems to have regressed quite badly with latest testing

2018-10-13 Thread Laurence Oberman
On Fri, 2018-10-12 at 17:51 -0700, Bart Van Assche wrote: > On 10/12/18 1:36 PM, Laurence Oberman wrote: >  > While I have for the longest time used 4.5 as a base for my F/C > jammer >  > that I use every day here in our lab I recently added more jammer > code >  > so I decided to test this all on

Re: aic7xxx DMA overflow error

2018-10-13 Thread tedheadster
Christoph, here is all of the newly patched dmesg output. I also added 'aic7xxx.a9c7xxx=verbose' for extra information. Matthew [0.00] Linux version 4.18.12.pentium4-xeon-christoph+ (root@pentium4) (gcc version 5.4.0 (Gentoo 5.4.0-r4 p1.8, pie-0.6.5)) #525 SMP PREEMPT Sat Oct 13 09:49:3

Re: [PATCH v2 4/5] target: split out helper for cxn timeout error stashing

2018-10-13 Thread David Disseldorp
On Fri, 12 Oct 2018 09:11:27 -0700, Bart Van Assche wrote: > There have been too many problems with strcpy() and buffer overflows in the > past. If the source and destination strings both have the same size, please > add a BUILD_BUG_ON() statement that verifies that at compile time. If that > not'

Re: various esp_scsi cleanups V3

2018-10-13 Thread Finn Thain
On Sat, 13 Oct 2018, Christoph Hellwig wrote: > Mostly to avoid methods calls for dma mapping, but also to tidy up > a few bits found while doing that. > > Changes since v2: > - add back required DMA_NONE check > - also clear sense_ptr for PIO transfers > - remove the pointless union in struct

Re: [PATCH 5/6] esp_scsi: De-duplicate PIO routines

2018-10-13 Thread Christoph Hellwig
On Sat, Oct 13, 2018 at 06:22:18PM +1100, Finn Thain wrote: > > > + pr_err("FIFO is empty (sreg %02x)\n", esp_read8(ESP_STATUS)); > > > > This should probably use dev_err (at least with my series). > > > > How about shost_printk()? That would be consistent with the rest of > esp_scsi.c. It also

[PATCH 2/6] sun_esp: don't use GFP_ATOMIC for command block allocation

2018-10-13 Thread Christoph Hellwig
esp_sbus_map_command_block is called straight from the probe routine without any locks held, so we can safely use GFP_KERNEL here. Signed-off-by: Christoph Hellwig --- drivers/scsi/sun_esp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi

[PATCH 3/6] esp_scsi: use strong typing for the dev field

2018-10-13 Thread Christoph Hellwig
esp->dev is a void pointer that points either to a struct device, or a struct platform_device. As we can easily get from the device to the platform_device if needed change it to always point to a struct device and properly type the pointer to avoid errors. Signed-off-by: Christoph Hellwig --- d

[PATCH 6/6] esp_scsi: remove union in esp_cmd_priv

2018-10-13 Thread Christoph Hellwig
The dma_addr_t member is unused ever since we switched the SCSI layer to send down single-segement command using a scatterlist as well many years ago. Signed-off-by: Christoph Hellwig --- drivers/scsi/esp_scsi.c | 12 ++-- drivers/scsi/esp_scsi.h | 6 +- 2 files changed, 7 insertion

[PATCH 4/6] esp_scsi: remove the dev argument to scsi_esp_register

2018-10-13 Thread Christoph Hellwig
We can simplify use esp->dev now. Signed-off-by: Christoph Hellwig --- drivers/scsi/am53c974.c | 2 +- drivers/scsi/esp_scsi.c | 8 drivers/scsi/esp_scsi.h | 5 ++--- drivers/scsi/jazz_esp.c | 2 +- drivers/scsi/mac_esp.c | 2 +- drivers/scsi/sun3x_esp.c | 2 +- drivers/scsi/sun_e

[PATCH 5/6] esp_scsi: move dma mapping into the core code

2018-10-13 Thread Christoph Hellwig
Except for the mac_esp driver, which uses PIO or pseudo DMA, all drivers share the same dma mapping calls. Move the dma mapping into the core code using the scsi_dma_map / scsi_dma_unmap helpers, with a special identify mapping variant triggered off a new ESP_FLAG_NO_DMA_MAP flag for mac_esp. Sig

various esp_scsi cleanups V3

2018-10-13 Thread Christoph Hellwig
Mostly to avoid methods calls for dma mapping, but also to tidy up a few bits found while doing that. Changes since v2: - add back required DMA_NONE check - also clear sense_ptr for PIO transfers - remove the pointless union in struct esp_cmd_priv Changes since v1: - fix a sun_esp compiler fa

[PATCH 1/6] am53c974: use the generic DMA API

2018-10-13 Thread Christoph Hellwig
Remove usage of the legacy PCI DMA API. To make this easier we also store a struct device instead of pci_dev in the dev field of struct esp. Signed-off-by: Christoph Hellwig --- drivers/scsi/am53c974.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) dif

Re: [PATCH 5/6] esp_scsi: De-duplicate PIO routines

2018-10-13 Thread Finn Thain
On Sat, 13 Oct 2018, Christoph Hellwig wrote: > > +#if IS_ENABLED(CONFIG_SCSI_MAC_ESP) || IS_ENABLED(CONFIG_SCSI_ZORRO_ESP) > > Please add a new CONFIG_SCSI_ESP_PIO symbol that is selected by > the mac and zorro drivers instead. > OK. > > + pr_err("FIFO is empty (sreg %02x)\n", esp_read8(ESP

Re: [PATCH 5/6] esp_scsi: De-duplicate PIO routines

2018-10-13 Thread Christoph Hellwig
> +#if IS_ENABLED(CONFIG_SCSI_MAC_ESP) || IS_ENABLED(CONFIG_SCSI_ZORRO_ESP) Please add a new CONFIG_SCSI_ESP_PIO symbol that is selected by the mac and zorro drivers instead. > + pr_err("FIFO is empty (sreg %02x)\n", esp_read8(ESP_STATUS)); This should probably use dev_err (at least with my

Re: [PATCH 5/5] esp_scsi: move dma mapping into the core code

2018-10-13 Thread Finn Thain
On Sat, 13 Oct 2018, Christoph Hellwig wrote: > On Sat, Oct 13, 2018 at 09:24:51AM +1100, Finn Thain wrote: > > > struct scatterlist *sg = scsi_sglist(cmd); > > > - int dir = cmd->sc_data_direction; > > > - int total, i; > > > + int total = 0, i; > > > > > > - if (dir == DMA_NONE) > > > -