scsi: core: Clean up SG_NONE
authorFinn Thain <fthain@telegraphics.com.au>
Sat, 2 Nov 2019 01:06:54 +0000 (12:06 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Nov 2019 03:21:35 +0000 (22:21 -0500)
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
Link: https://lore.kernel.org/r/b4779b7a6563f6bd8d259ee457871c1c463c420e.1572656814.git.fthain@telegraphics.com.au
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Documentation/scsi/scsi_mid_low_api.txt
drivers/ata/pata_arasan_cf.c
drivers/scsi/atp870u.c
drivers/usb/storage/uas.c
include/scsi/scsi_host.h

index c1dd4939f4ae55b55115a9e4104b542e2707b56c..2a4be1c3e6db6929d3aa7b24cb5621f72bd0215e 100644 (file)
@@ -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
index ebecab8c3f36c947f94aa512ec59717ed534228f..135173c8d13891a952ed12afe985e34e082a0f69 100644 (file)
@@ -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,
 };
 
index e41f0bbdc9fdb2290b70823d1a517e08b5eb11b3..c6a752309ddac3c344ec9f2708dc2614afc3f6e0 100644 (file)
@@ -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,
 };
 
index bf80d6f81f587f4269b2bf7a96d74099f63e9d15..fd9c0d2c111fd7391b1d933e4eb5909b5874b0d9 100644 (file)
@@ -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,
 };
index fccdf84ec7e22b239dab09b3d45b3c09fd091ae1..f577647bf5f21d95e10af5339be0363af6e03d2d 100644 (file)
@@ -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