> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index c40fbea06cc5..649f9610ca72 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1,3 +1,4 @@
> +
> // SPDX-License-Identifier
On Mon, 21 Oct 2019, Hannes Reinecke wrote:
> Introduce scsi_build_sense() as a wrapper around
> scsi_build_sense_buffer() to format the buffer and set
> the correct SCSI status.
>
> Signed-off-by: Hannes Reinecke
> ---
> drivers/ata/libata-scsi.c | 7 ++--
> drivers/s390/scsi/zf
On Mon, 21 Oct 2019, Douglas Gilbert wrote:
>
> > As usual, comments and reviews are welcome.
>
> It is hard to make an omelette without breaking some eggs.
>
Coccinelle can minimize the breakage; particularly the
straight-forward conversion of (FOO << 1) to SAM_STAT_BAR.
--
> Doug Gilbert
On Mon, 21 Oct 2019, Hannes Reinecke wrote:
> Use standard SAM status codes and omit the explicit shift to convert
> to linus-specific ones.
"Linux-specific".
--
>
> Signed-off-by: Hannes Reinecke
> ---
> drivers/ata/libata-scsi.c | 2 +-
> drivers/infiniband/ulp/srp/ib_srp.c
On Mon, 21 Oct 2019, Hannes Reinecke wrote:
> Use standard SCSI status and drop usage of the linux-specific ones.
>
> Signed-off-by: Hannes Reinecke
> ---
> drivers/scsi/wd33c93.c | 21 -
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/scsi/wd33c
On Mon, 21 Oct 2019, Hannes Reinecke wrote:
> To be in-line with the other set_XX_byte() functions.
>
> Signed-off-by: Hannes Reinecke
> ---
> include/scsi/scsi_cmnd.h | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
> index 91bd
On Fri, 18 Oct 2019, Martin K. Petersen wrote:
>
> (Sorry, zhengbin, you opened a can of worms. This is some of our oldest
> and most arcane code in SCSI)
>
A call to set_host_byte(cmd, x) or set_msg_byte(cmd, x) when x & 0x80 is
set clobbers the most significant bytes in cmd->result.
Avoid t
On Sat, 12 Oct 2019, zhengbin wrote:
> kmsan report a warning in 5.1-rc4:
>
> BUG: KMSAN: uninit-value in sr_get_events drivers/scsi/sr.c:207 [inline]
> BUG: KMSAN: uninit-value in sr_check_events+0x2cf/0x1090 drivers/scsi/sr.c:243
> CPU: 1 PID: 13858 Comm: syz-executor.0 Tainted: GB
On Sat, 28 Sep 2019, Damien Le Moal wrote:
> When a non-passthrough command is terminated with CHECK CONDITION,
> request sense is executed by hijacking the command descriptor. Since
> scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() do not save/restore the
> original command resid, the value return
[snipped selective measurements of word usage]
On Fri, 27 Sep 2019, Alan Stern wrote:
>
> So I guess this was never defined precisely.
>
The O.E.D. defines these terms:
residual
a. [...]
n. 1. a quantity remaining after other things have been subtracted
On Tue, 25 Jun 2019, Ming Lei wrote:
> On Tue, Jun 25, 2019 at 12:01:24PM +1000, Finn Thain wrote:
> > > diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
> > > index dccdb41bed8c..c7129f5234f0 100644
> > > --- a/drivers/s390/scsi/zfcp_dbf.c
> diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
> index dccdb41bed8c..c7129f5234f0 100644
> --- a/drivers/s390/scsi/zfcp_dbf.c
> +++ b/drivers/s390/scsi/zfcp_dbf.c
> @@ -552,7 +552,7 @@ static u16 zfcp_dbf_san_res_cap_len_if_gpn_ft(char *tag,
> if (x % (ZFCP
On Tue, 18 Jun 2019, Ming Lei wrote:
> From: Finn Thain
>
> Use the scatterlist iterators and remove direct indexing of the
> scatterlist array.
>
> This way allows us to pre-allocate one small scatterlist, which can be
> chained with one runtime allocated scatterlist if
On Mon, 17 Jun 2019, Finn Thain wrote:
> On Mon, 17 Jun 2019, Ming Lei wrote:
>
> > Use the scatterlist iterators and remove direct indexing of the
> > scatterlist array.
> >
> > This way allows us to pre-allocate one small scatterlist, which can be
> >
n't enough for the whole request.
>
> Finn added the change to replace SCp.buffers_residual with sg_is_last()
> for fixing updating it, and the similar change has been applied on
> NCR5380.c
>
> Cc: Finn Thain
> Signed-off-by: Ming Lei
Reviewed-by: Finn Thain
On Fri, 14 Jun 2019, Ming Lei wrote:
>
> Follows the fixed version, could you review again?
>
> From f03484d4bac083c39d70665cfbadb641093b63de Mon Sep 17 00:00:00 2001
> From: Ming Lei
> Date: Wed, 12 Jun 2019 20:37:35 +0800
> Subject: [PATCH] scsi: aha152x: use sg helper to operate scatterlist
On Fri, 14 Jun 2019, Ming Lei wrote:
> Use the scatterlist iterators and remove direct indexing of the
> scatterlist array.
>
> This way allows us to pre-allocate one small scatterlist, which can be
> chained with one runtime allocated scatterlist if the pre-allocated one
> isn't enough for the w
Hi Ming,
On Fri, 14 Jun 2019, Ming Lei wrote:
> Use the scatterlist iterators and remove direct indexing of the
> scatterlist array.
>
> This way allows us to pre-allocate one small scatterlist, which can be
> chained with one runtime allocated scatterlist if the pre-allocated one
> isn't enough
On Thu, 6 Jun 2019, Martin K. Petersen wrote:
>
> Ming,
>
> > Guenter reported scsi boot issue caused by commit c3288dd8c232 ("scsi:
> > core: avoid pre-allocating big SGL for data").
>
> Applied to 5.3/scsi-queue, thank you!
>
Thanks, that seems to fix the esp_scsi regression.
Am I right in
On Wed, 5 Jun 2019, Ming Lei wrote:
> The driver expects that SCSI SGL is a simply array of SG, and itereate
> the SGL via integer index. This way is obviously wrong, because of
> SG_CHAIN.
>
> Fixes it by using sgl helper.
>
> V2:
> - as suggested by Finn Thai
On Tue, 4 Jun 2019, Ming Lei wrote:
> The driver supporses that there isn't sg chain, and itereate the
> list one by one. This way is obviously wrong.
>
> Fixes it by sgl helper.
>
> Cc: Christoph Hellwig
> Cc: Bart Van Assche
> Cc: Ewan D. Milne
> Cc: Hannes Reinecke
> Cc: Guenter Roeck
>
On Mon, 8 Apr 2019, Gustavo A. R. Silva wrote:
> Hi all,
>
> Friendly ping:
>
> Who can take this?
>
> Thanks
>
It has been queued up by Martin and James on git.kernel.org. Apparently it
is to be pushed in the v5.2 merge window.
--
Cc: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 01c23d27f290..7fed9bb72784 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
Adjust comments accordingly.
Cc: Gustavo A. R. Silva
Cc: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 7fed9bb72784..fe0535affc14 100644
On Thu, 28 Feb 2019, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
This switch case is already marked. So I think the patch description
should state that this patch is actually a workaround for a gcc
On Tue, 22 Jan 2019, Greg Kroah-Hartman wrote:
> On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote:
> > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a
> > /dev/nvram misc device. This module is used only by 32-bit PowerPC
> > pl
n this patch and the subsequent fbdev driver patch, the convention is
adopted across all relevant platforms whereby NVRAM functionality gets
enabled in a given device driver when the nvram misc device is built-in
or when both drivers are modules.
Acked-by: Michael Schmitz
Signed-off-by: Finn T
-implemented in subsequent patches.
Replace the sole validate-checksum-and-read-byte sequence with a call to
nvram_read() which will gain the same semantics in subsequent patches.
Remove unused exports.
Acked-by: Geert Uytterhoeven
Signed-off-by: Finn Thain
---
arch/m68k/atari/nvram.c | 39
- Changed the CONFIG_NVRAM default to better approximate the present code.
In particular, the CONFIG_GENERIC_NVRAM default and use of "select NVRAM".
- Added more tested-by tags.
For older change logs, please refer to,
https://lore.kernel.org/lkml/20151101104202.301856...@telegraphics.com.a
On Mon, 31 Dec 2018, Finn Thain wrote:
> On Sun, 30 Dec 2018, James Bottomley wrote:
>
> >
> > That said, as has been pointed out, the current #ifdef has a failing
> > corner case when both are modular (because the code should then be
> > included). The runtime
On Sun, 30 Dec 2018, James Bottomley wrote:
>
> That said, as has been pointed out, the current #ifdef has a failing
> corner case when both are modular (because the code should then be
> included). The runtime macro that correctly expresses this is
> IS_REACHABLE(CONFIG_NVRAM).
>
No, in th
On Sat, 29 Dec 2018, Michael Schmitz wrote:
>
> IS_BUILTIN(CONFIG_NVRAM) is probably what Christophe really meant to suggest.
>
> Or (really going out on a limb here):
>
> IS_BUILTIN(CONFIG_NVRAM) ||
> ( IS_MODULE(CONFIG_ATARI_SCSI) && IS_ENABLED(CONFIG_NVRAM) )
>
> Not that I'd advocate that,
On Fri, 28 Dec 2018, LEROY Christophe wrote:
> Finn Thain a ?crit?:
>
> > On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support.
> > Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without
> > enabling NVRAM support in drivers. Settin
the valkyriefb driver with powerpc, and since that driver uses
NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of
"select NVRAM".
Adopt the powerpc convention on m68k to avoid surprises.
Signed-off-by: Finn Thain
Tested-by: Christian T. Steigies
---
This patch temporaril
l. Replace this
validate-checksum-and-read-byte sequence with the equivalent
rtc_nvram_ops.read() call and remove the now unused functions.
Signed-off-by: Finn Thain
Tested-by: Christian T. Steigies
Acked-by: Geert Uytterhoeven
---
The advantage of the new ops struct over the old global nvram
On Thu, 6 Dec 2018, Christoph Hellwig wrote:
> This function is a huge mess with duplicated error handling. Split out
> a few useful helpers and use goto labels to untangle the error handling
> and no-data ioctl handling.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/scsi/gdth.c | 244
On Mon, 3 Dec 2018, Hannes Reinecke wrote:
> As I said: I need to do PIO for the last two bytes of the data buffer.
> For everything else DMA works nicely, it's just the last two bytes which
> might be left over in the FIFO buffer under certain circumstances.
I read the driver a few times alrea
On Sun, 2 Dec 2018, Hannes Reinecke wrote:
> On 12/2/18 10:21 PM, Finn Thain wrote:
> > On Sun, 2 Dec 2018, Hannes Reinecke wrote:
> >
> > > Well, that lone 'kmap' is due to a quirk/errata in the datasheet;
> > > essentially
> > > we ha
On Sun, 2 Dec 2018, Hannes Reinecke wrote:
> Well, that lone 'kmap' is due to a quirk/errata in the datasheet; essentially
> we have to PIO a lone byte out of the FIFO to clear it up.
> And this byte is technically still part of the SCSI data, so we need to
> stuff it onto the end of the actual da
On Mon, 26 Nov 2018, Christoph Hellwig wrote:
> On Thu, Nov 22, 2018 at 09:02:13AM +1100, Finn Thain wrote:
> > > you in the To list maintain or wrote SCSI drivers that set the
> > > DISABLE_CLUSTERING flag, which basically disable merges of any
> > > bio segment
This patch is not relevant to any -stable branch. Please don't backport.
--
On Thu, 22 Nov 2018, Sasha Levin wrote:
> From: Finn Thain
>
> [ Upstream commit 96edebd6bb995f2acb7694bed6e01bf6f5a7b634 ]
>
> I overlooked this statement when I recently converted the functio
On Wed, 21 Nov 2018, Christoph Hellwig wrote:
> Hi all,
>
> you in the To list maintain or wrote SCSI drivers that set the
> DISABLE_CLUSTERING flag, which basically disable merges of any
> bio segments. We already have the actual max_segment size limit
> to say which length a segment should h
On Wed, 31 Oct 2018, Boaz Harrosh wrote:
> > [...] All changes made by other kernel developers than you are the
> > result of tree-wide refactoring, compiler warning fixes, fixes for
> > issues detected by static source code analyzers or spelling fixes.
> > Hence my question: how big is the use
I overlooked this statement when I recently converted the function result
type from struct scsi_cmnd * to bool. No change to object code.
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/NCR5380.c b/drivers
On Thu, 18 Oct 2018, Christoph Hellwig wrote:
> gdth_show_info currently allocs and frees a dma buffer four times,
> which isn't very efficient. Reuse a single allocation instead.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/scsi/gdth_proc.c | 18 +-
> 1 file changed, 5
On Thu, 18 Oct 2018, Christoph Hellwig wrote:
> +
> +static int ioc_general(void __user *arg, char *cmnd)
> +{
> + gdth_ioctl_general gen;
> + gdth_ha_str *ha;
> + char *buf = NULL;
> + u64 paddr;
> + int rval;
> +
> + if (copy_from_user(&gen, arg, sizeof(gdth_ioctl_general
On Thu, 18 Oct 2018, Christoph Hellwig wrote:
> Switch from the legacy PCI DMA API to the generic DMA API. Also switch
> to dma_map_single from pci_map_page in one case where this makes the code
> simpler.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/scsi/gdth.c | 111
On Wed, 17 Oct 2018, Martin K. Petersen wrote:
>
> >> See the case statements above for another fast exit scenario.
> >>
> >
> > But that's an error path.
>
> Look further down. Several other SCSI commands are completed as NOPs the
> same way.
>
That's true, but it doesn't indicate a bug to
On Wed, 17 Oct 2018, Christoph Hellwig wrote:
>
> Please leave the possibly unused exports as-is.
>
I take that to mean "leave the conditional export as-is". Hence, I think
v3 (posted on the 16th) should address all of the concerns raised by
reviewers...
--
On Tue, 16 Oct 2018, Martin K. Petersen wrote:
>
> Finn,
>
> > This looks wrong to me. I think you've just prevented all START STOP
> > commands sent to logical volumes from reaching
> >
> > return ((*ha->func.issue) (ha, scb));
> >
> > I think a better patch is to add a "fall though" c
On Tue, 16 Oct 2018, Martin K. Petersen wrote:
>
> Gustavo,
>
> > Add missing break statement in order to prevent the code from falling
> > through to case TEST_UNIT_READY.
>
> Applied to 4.20/scsi-queue, thanks!
>
>
This looks wrong to me. I think you've just prevented all START STOP
comma
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
scsi: zorro_esp: New driver for Amiga Zorro NCR53C9x
boards")
Signed-off-by: Finn Thain
Cc: Michael Schmitz
Tested-by: Michael Schmitz
Reviewed-by: Michael Schmitz
---
drivers/scsi/zorro_esp.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/scsi/z
m68k writesb() implementation is a separate patch.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tested-by: Michael Schmitz
---
Changed since v1:
- Use shost_printk() instead of pr_err().
- Add new symbol CONFIG_SCSI_ESP_PIO to Kconfig.
Changed since v2:
- Omit "default n" fro
27;lp' check. The mid-layer invokes .slave_alloc and
.slave_destroy in such a way that we may rely on scmd->device->hostdata
for as long as scmd belongs to the low-level driver.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tested-by: Michael Schmitz
---
Changed since v2:
- Dr
d-by: Stan Johnson
Signed-off-by: Finn Thain
Tested-by: Michael Schmitz
---
Changed since v2:
- Declare send_cmd_residual as u32 instead of int.
---
drivers/scsi/esp_scsi.c | 1 +
drivers/scsi/esp_scsi.h | 2 ++
drivers/scsi/mac_esp.c | 2 ++
3 files changed, 5 insertions(+)
diff --git a/dr
.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tested-by: Michael Schmitz
---
Changed since v1:
- Don't touch the scsi_esp_cmd(esp, ESP_CMD_FLUSH) as it's outside the loop.
---
drivers/scsi/esp_scsi.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
is better to use the
terminology from the datasheets.
The global ESP_FLAG_DOING_SLOWCMD flag is redundant anyway, as it can be
inferred from esp->select_state. Remove the ESP_FLAG_DOING_SLOWCMD cruft
and just use a boolean local variable.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tes
On Mon, 15 Oct 2018, Hannes Reinecke wrote:
>
> However, the function declaration really is a worry, as the actual function
> body only exists when the config option is enabled.
> So either add a dummy function or surround the function declaration by
> CONFIG_ESP_PIO.
> Otherwise I think Dan Carp
On Mon, 15 Oct 2018, Hannes Reinecke wrote:
> >
> > In the case of send_cmd_residual, that would mean a second #ifdef
> > added to esp_data_bytes_sent() where it gets used. I'm happy to comply
> > but I fear that all these #ifdefs may harm readability...
> >
> > There are already other variabl
On Mon, 15 Oct 2018, Hannes Reinecke wrote:
> On 10/14/18 8:12 AM, Finn Thain wrote:
> > 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
On Mon, 15 Oct 2018, Hannes Reinecke wrote:
> On 10/13/18 2:51 AM, Finn Thain wrote:
> > As a temporary measure, the code to implement PIO transfers was
> > duplicated in zorro_esp and mac_esp. Now that this code has stabilized,
> > move it into the core driver to elim
On Mon, 15 Oct 2018, Finn Thain wrote:
> On Sun, 14 Oct 2018, Christoph Hellwig wrote:
>
> > > + *p++ = IDENTIFY(lp && (tp->flags & ESP_TGT_DISCONNECT), lun);
> >
> > I think lp should always be non-NULL here.
> >
>
> It's not clea
On Sun, 14 Oct 2018, Geert Uytterhoeven wrote:
>
> > --- a/drivers/scsi/Kconfig
> > +++ b/drivers/scsi/Kconfig
> > @@ -42,6 +42,10 @@ config SCSI_DMA
> > bool
> > default n
> >
> > +config SCSI_ESP_PIO
> > + bool
> > + default n
>
> "default n" is the default, so plea
On Sun, 14 Oct 2018, Christoph Hellwig wrote:
> > + *p++ = IDENTIFY(lp && (tp->flags & ESP_TGT_DISCONNECT), lun);
>
> I think lp should always be non-NULL here.
>
It's not clear from Documentation/scsi/scsi_mid_low_api.txt, but I guess
that's true for scanning of targets.
Is it true in gene
On Mon, 15 Oct 2018, Michael Schmitz wrote:
>
> Do we really need to make that distinction?
>
esp_reconnect() dereferences lp, so !lp has to inhibit disconnection.
At least, that's my reading. I can't see any other reason for the lp
conditional.
--
On Sun, 14 Oct 2018, Geert Uytterhoeven wrote:
>
> > Fixes: 6fe07aaffbf0
>
> Fixes: 6fe07aaffbf0 ("[SCSI] m68k: new mac_esp scsi driver")
>
Fixed.
> > Tested-by: Stan Johnson
> > Signed-off-by: Finn Thain
> > Tested-by: Michael Schmitz
'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
is better to use the
terminology from the datasheets.
The global ESP_FLAG_DOING_SLOWCMD flag is redundant anyway, as it can be
inferred from esp->select_state. Remove the ESP_FLAG_DOING_SLOWCMD cruft
and just use a boolean local variable.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tes
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
-off-by: Finn Thain
Tested-by: Michael Schmitz
---
drivers/scsi/esp_scsi.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 9e5d3f7d29ae..b7c41aa9927c 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi
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
residual calculation relies on the Transfer Count registers
which works for DMA transfers but not for PIO transfers. Fix the problem
by storing the PIO transfer residual and using that to correctly
calculate bytes_sent.
Fixes: 6fe07aaffbf0
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tested
with LTO).
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tested-by: Michael Schmitz
---
Changed since v1:
- Don't touch the scsi_esp_cmd(esp, ESP_CMD_FLUSH) that's outside the loop.
---
drivers/scsi/esp_scsi.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
di
m68k writesb() implementation is a separate patch.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
Tested-by: Michael Schmitz
---
Changed since v1:
- Use shost_printk() instead of pr_err().
- Add new symbol CONFIG_SCSI_ESP_PIO to Kconfig.
---
drivers/scsi/Kconfig | 6 +
drivers
he pointless union in struct esp_cmd_priv
>
> Changes since v1:
> - fix a sun_esp compiler failure in an intermediate patch
> - drop the dev argument to scsi_esp_register
>
Tested-by: Finn Thain
Thanks.
--
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
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 =
On Sat, 13 Oct 2018, Michael Schmitz wrote:
> Hi Finn,
>
> Am 13.10.2018 um 13:51 schrieb 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
> > s
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
is better to use the
terminology from the datasheets.
The global ESP_FLAG_DOING_SLOWCMD flag is redundant anyway, as it can be
inferred from esp->select_state. Remove the ESP_FLAG_DOING_SLOWCMD cruft
and just use a boolean local variable.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drive
residual calculation relies on the Transfer Count registers
which works for DMA transfers but not for PIO transfers. Fix the problem
by storing the PIO transfer residual and using that to correctly
calculate bytes_sent.
Fixes: 6fe07aaffbf0
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
with LTO).
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drivers/scsi/esp_scsi.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 646701fc22a4..9f0e68cd0e99 100644
--- a/drivers/scsi/esp_scsi.c
+++ b
-off-by: Finn Thain
---
drivers/scsi/esp_scsi.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 9e5d3f7d29ae..b7c41aa9927c 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -800,13 +800,9
() implementation is a separate patch.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drivers/scsi/esp_scsi.c | 126 +
drivers/scsi/esp_scsi.h | 5 +
drivers/scsi/mac_esp.c | 173 ++-
drivers/scsi/zorro_esp.c | 232
with this code.
Finn Thain (6):
zorro_esp: Limit DMA transfers to 65535 bytes
esp_scsi: Track residual for PIO transfers
esp_scsi: Grant disconnect privilege for untagged commands
esp_scsi: Eliminate ESP_FLAG_DOING_SLOWCMD
esp_scsi: De-duplicate PIO routines
esp_scsi: Optimize PIO
> On Fri, 12 Oct 2018, Christoph Hellwig wrote:
>
> >
> > > diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
> > > index eb551f3cc471..85d067889a9b 100644
> > > --- a/drivers/scsi/mac_esp.c
> > > +++ b/drivers/scsi/mac_esp.c
> > > @@ -58,8 +58,7 @@ static struct esp *esp_chips[2];
> >
On Thu, 11 Oct 2018, Christoph Hellwig wrote:
> diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
> index 90604bff8dd2..73fcbd65b9fe 100644
> --- a/drivers/scsi/esp_scsi.c
> +++ b/drivers/scsi/esp_scsi.c
> @@ -369,19 +369,25 @@ static void esp_map_dma(struct esp *esp, struct
> scsi_c
On Thu, 11 Oct 2018, Christoph Hellwig wrote:
> 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
On Thu, 11 Oct 2018, Christoph Hellwig wrote:
> index 90604bff8dd2..73fcbd65b9fe 100644
> --- a/drivers/scsi/esp_scsi.c
> +++ b/drivers/scsi/esp_scsi.c
> @@ -369,19 +369,25 @@ static void esp_map_dma(struct esp *esp, struct
> scsi_cmnd *cmd)
> {
> struct esp_cmd_priv *spriv = ESP_CMD_PRIV(
On Wed, 10 Oct 2018, Christoph Hellwig wrote:
> 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
The return value is taken to mean "retry" or "don't retry". Change it to
bool to improve readability. Fix related comments. No functional change.
Tested-by: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 46 +--
When sense data is valid, call set_driver_byte(cmd, DRIVER_SENSE).
Otherwise some callers of scsi_execute() will ignore sense data.
Don't set DID_ERROR or DID_RESET just because sense data is missing.
Tested-by: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.
EH.
The patch by Hannes Reinecke was cherry-picked from his 'eh-reset.v5'
branch.
Finn Thain (9):
NCR5380: Reduce goto statements in NCR5380_select()
NCR5380: Have NCR5380_select() return a bool
NCR5380: Withhold disconnect privilege for REQUEST SENSE
NCR5380: Use DRIVER_SENSE t
s wait for the target to try again.
Tested-by: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 419033643015..b9a3eb0647e4 100644
--- a/drivers/scsi/NCR5380.c
+++ b/dr
dure.
The selection abort time is only 200 us which may be insufficient time
for a printk() call. Move the diagnostics to the error paths.
Tested-by: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dr
ned-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 74 ++
1 file changed, 45 insertions(+), 29 deletions(-)
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index b9a3eb0647e4..8429c855701f 100644
--- a/drivers/scsi/NCR5380.c
+++ b/dr
hael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index e96a48b9e86c..3058b68b6740 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -2016,6 +2016,11 @@ static v
Replace a 'goto' statement with a simple 'return' where possible.
This improves readability. No functional change.
Tested-by: Michael Schmitz
Signed-off-by: Finn Thain
---
drivers/scsi/NCR5380.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
g set when
NCR5380_abort() fails.
Tested-by: Michael Schmitz
Signed-off-by: Finn Thain
---
Consistent with the rest of NCR5380.c, this patch triggers some
"line over 80 characters" messages from checkpatch.pl. I haven't
addressed those complaints because IMHO the cure is worse than
the disea
1 - 100 of 993 matches
Mail list logo