* [PATCH 0/2] SG_NONE fix and cleanup
@ 2019-11-02 1:06 Finn Thain
2019-11-02 1:06 ` [PATCH 2/2] scsi: Clean up SG_NONE Finn Thain
2019-11-13 3:12 ` [PATCH 0/2] SG_NONE fix and cleanup Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Finn Thain @ 2019-11-02 1:06 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: Michael Schmitz, linux-scsi, linux-kernel, stable,
Jonathan Corbet, Bartlomiej Zolnierkiewicz, Jens Axboe,
Viresh Kumar, Oliver Neukum, Alan Stern, Greg Kroah-Hartman,
usb-storage, linux-doc, linux-ide, linux-usb
These two patches address some issues stemming from scsi-mq conversion.
Finn Thain (2):
atari_scsi, sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE
scsi: Clean up SG_NONE
Documentation/scsi/scsi_mid_low_api.txt | 3 ++-
drivers/ata/pata_arasan_cf.c | 1 -
drivers/scsi/atari_scsi.c | 6 +++---
drivers/scsi/atp870u.c | 2 +-
drivers/scsi/mac_scsi.c | 2 +-
drivers/scsi/sun3_scsi.c | 4 ++--
drivers/usb/storage/uas.c | 1 -
include/scsi/scsi_host.h | 13 -------------
8 files changed, 9 insertions(+), 23 deletions(-)
--
2.23.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] scsi: Clean up SG_NONE
2019-11-02 1:06 [PATCH 0/2] SG_NONE fix and cleanup Finn Thain
@ 2019-11-02 1:06 ` Finn Thain
2019-11-13 3:12 ` [PATCH 0/2] SG_NONE fix and cleanup Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Finn Thain @ 2019-11-02 1:06 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: Michael Schmitz, linux-scsi, linux-kernel, Jonathan Corbet,
Bartlomiej Zolnierkiewicz, Jens Axboe, Viresh Kumar,
Oliver Neukum, Alan Stern, Greg Kroah-Hartman, usb-storage,
linux-doc, linux-ide, linux-usb
Remove SG_NONE and a related misleading comment. Update documentation.
This patch does not affect behaviour as zero initialization is redundant.
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Oliver Neukum <oneukum@suse.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: usb-storage@lists.one-eyed-alien.net
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
Documentation/scsi/scsi_mid_low_api.txt | 3 ++-
drivers/ata/pata_arasan_cf.c | 1 -
drivers/scsi/atp870u.c | 2 +-
drivers/usb/storage/uas.c | 1 -
include/scsi/scsi_host.h | 13 -------------
5 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index c1dd4939f4ae..2a4be1c3e6db 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -1084,7 +1084,8 @@ of interest:
commands to the adapter.
this_id - scsi id of host (scsi initiator) or -1 if not known
sg_tablesize - maximum scatter gather elements allowed by host.
- 0 implies scatter gather not supported by host
+ Set this to SG_ALL or less to avoid chained SG lists.
+ Must be at least 1.
max_sectors - maximum number of sectors (usually 512 bytes) allowed
in a single SCSI command. The default value of 0 leads
to a setting of SCSI_DEFAULT_MAX_SECTORS (defined in
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index ebecab8c3f36..135173c8d138 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -219,7 +219,6 @@ struct arasan_cf_dev {
static struct scsi_host_template arasan_cf_sht = {
ATA_BASE_SHT(DRIVER_NAME),
- .sg_tablesize = SG_NONE,
.dma_boundary = 0xFFFFFFFFUL,
};
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index e41f0bbdc9fd..c6a752309dda 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -1680,7 +1680,7 @@ static struct scsi_host_template atp870u_template = {
.bios_param = atp870u_biosparam /* biosparm */,
.can_queue = qcnt /* can_queue */,
.this_id = 7 /* SCSI ID */,
- .sg_tablesize = ATP870U_SCATTER /*SG_ALL*/ /*SG_NONE*/,
+ .sg_tablesize = ATP870U_SCATTER /*SG_ALL*/,
.max_sectors = ATP870U_MAX_SECTORS,
};
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index bf80d6f81f58..fd9c0d2c111f 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -879,7 +879,6 @@ static struct scsi_host_template uas_host_template = {
.eh_abort_handler = uas_eh_abort_handler,
.eh_device_reset_handler = uas_eh_device_reset_handler,
.this_id = -1,
- .sg_tablesize = SG_NONE,
.skip_settle_delay = 1,
.dma_boundary = PAGE_SIZE - 1,
};
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 31e0d6ca1eba..d7cf9c7fecac 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -23,19 +23,6 @@ struct scsi_host_cmd_pool;
struct scsi_transport_template;
-/*
- * The various choices mean:
- * NONE: Self evident. Host adapter is not capable of scatter-gather.
- * ALL: Means that the host adapter module can do scatter-gather,
- * and that there is no limit to the size of the table to which
- * we scatter/gather data. The value we set here is the maximum
- * single element sglist. To use chained sglists, the adapter
- * has to set a value beyond ALL (and correctly use the chain
- * handling API.
- * Anything else: Indicates the maximum number of chains that can be
- * used in one scatter-gather request.
- */
-#define SG_NONE 0
#define SG_ALL SG_CHUNK_SIZE
#define MODE_UNKNOWN 0x00
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/2] SG_NONE fix and cleanup
2019-11-02 1:06 [PATCH 0/2] SG_NONE fix and cleanup Finn Thain
2019-11-02 1:06 ` [PATCH 2/2] scsi: Clean up SG_NONE Finn Thain
@ 2019-11-13 3:12 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-11-13 3:12 UTC (permalink / raw)
To: Finn Thain
Cc: James E.J. Bottomley, Martin K. Petersen, Michael Schmitz,
linux-scsi, linux-kernel, stable, Jonathan Corbet,
Bartlomiej Zolnierkiewicz, Jens Axboe, Viresh Kumar,
Oliver Neukum, Alan Stern, Greg Kroah-Hartman, usb-storage,
linux-doc, linux-ide, linux-usb
Finn,
> These two patches address some issues stemming from scsi-mq conversion.
Applied to 5.5/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-13 4:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02 1:06 [PATCH 0/2] SG_NONE fix and cleanup Finn Thain
2019-11-02 1:06 ` [PATCH 2/2] scsi: Clean up SG_NONE Finn Thain
2019-11-13 3:12 ` [PATCH 0/2] SG_NONE fix and cleanup Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).