[SCSI] add use_sg_chaining option to scsi_host_template
authorFUJITA Tomonori <tomof@acm.org>
Tue, 16 Oct 2007 09:24:32 +0000 (11:24 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 16 Oct 2007 09:24:32 +0000 (11:24 +0200)
This option is true if a low-level driver can support sg
chaining. This will be removed eventually when all the drivers are
converted to support sg chaining. q->max_phys_segments is set to
SCSI_MAX_SG_SEGMENTS if false.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
39 files changed:
arch/ia64/hp/sim/simscsi.c
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-xxxx.c
drivers/scsi/BusLogic.c
drivers/scsi/NCR53c406a.c
drivers/scsi/a100u2w.c
drivers/scsi/aacraid/linit.c
drivers/scsi/aha1740.c
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx_old.c
drivers/scsi/arcmsr/arcmsr_hba.c
drivers/scsi/dc395x.c
drivers/scsi/dpt_i2o.c
drivers/scsi/eata.c
drivers/scsi/hosts.c
drivers/scsi/hptiop.c
drivers/scsi/ibmmca.c
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/initio.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/mac53c94.c
drivers/scsi/megaraid.c
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas.c
drivers/scsi/mesh.c
drivers/scsi/nsp32.c
drivers/scsi/pcmcia/sym53c500_cs.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla4xxx/ql4_os.c
drivers/scsi/qlogicfas.c
drivers/scsi/scsi_lib.c
drivers/scsi/stex.c
drivers/scsi/sym53c416.c
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/scsi/u14-34f.c
drivers/scsi/ultrastor.c
drivers/scsi/wd7000.c
include/scsi/scsi_host.h

index d62fa76e5a7d05680a3fcf2d1dc75faee35e88dc..a3a558a0675779e602d9bb43625646cfe2cb02b6 100644 (file)
@@ -360,6 +360,7 @@ static struct scsi_host_template driver_template = {
        .max_sectors            = 1024,
        .cmd_per_lun            = SIMSCSI_REQ_QUEUE_LEN,
        .use_clustering         = DISABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 static int __init
index efd9d8d3a890c60ead2c5b5d547ff636cde73cfb..fb14014ee16e190f6688daba25684a19db216082 100644 (file)
@@ -1990,6 +1990,7 @@ static struct scsi_host_template driver_template = {
        .max_sectors            = TW_MAX_SECTORS,
        .cmd_per_lun            = TW_MAX_CMDS_PER_LUN,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .shost_attrs            = twa_host_attrs,
        .emulated               = 1
 };
index c7995fc216e8ed43a572ea9e41f482fc7c6a88c8..a64153b960344d84d3b742905fa9132d3bb092c5 100644 (file)
@@ -2261,6 +2261,7 @@ static struct scsi_host_template driver_template = {
        .max_sectors            = TW_MAX_SECTORS,
        .cmd_per_lun            = TW_MAX_CMDS_PER_LUN,  
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .shost_attrs            = tw_host_attrs,
        .emulated               = 1
 };
index 9b206176f717773fce56674a5fc8f4da5508354e..49e1ffa4b2ffbf700f2c1c22b43ebd7c59f8776a 100644 (file)
@@ -3575,6 +3575,7 @@ static struct scsi_host_template Bus_Logic_template = {
        .unchecked_isa_dma = 1,
        .max_sectors = 128,
        .use_clustering = ENABLE_CLUSTERING,
+       .use_sg_chaining = ENABLE_SG_CHAINING,
 };
 
 /*
index eda8c48f6be7713ae0e4597e14ff7a07a8de4ac1..3168a1794849657c5447df861331e1329a845e91 100644 (file)
@@ -1066,7 +1066,8 @@ static struct scsi_host_template driver_template =
      .sg_tablesize             = 32                    /*SG_ALL*/ /*SG_NONE*/, 
      .cmd_per_lun              = 1                     /* commands per lun */, 
      .unchecked_isa_dma        = 1                     /* unchecked_isa_dma */,
-     .use_clustering           = ENABLE_CLUSTERING                               
+     .use_clustering           = ENABLE_CLUSTERING,
+     .use_sg_chaining           = ENABLE_SG_CHAINING,
 };
 
 #include "scsi_module.c"
index f608d4a1d6daeaa8b44ca46d25cb3fe2b3cc2276..d3a6d15fb77af90ead7ee78bfd1deed94e5bef8f 100644 (file)
@@ -1071,6 +1071,7 @@ static struct scsi_host_template inia100_template = {
        .sg_tablesize           = SG_ALL,
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 static int __devinit inia100_probe_one(struct pci_dev *pdev,
index a7f42a17b5c708ba331b59874690f8a84cdab920..038980be763d18f75ef37902662ceb766b72a530 100644 (file)
@@ -944,6 +944,7 @@ static struct scsi_host_template aac_driver_template = {
        .cmd_per_lun                    = AAC_NUM_IO_FIB, 
 #endif 
        .use_clustering                 = ENABLE_CLUSTERING,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
        .emulated                       = 1,
 };
 
index e4a4f3a965d9a9ce3f4b79c7f140c8e42ba63870..f6722fd46008a2f451ceb645411e93f6b4115fae 100644 (file)
@@ -563,6 +563,7 @@ static struct scsi_host_template aha1740_template = {
        .sg_tablesize     = AHA1740_SCATTER,
        .cmd_per_lun      = AHA1740_CMDLUN,
        .use_clustering   = ENABLE_CLUSTERING,
+       .use_sg_chaining  = ENABLE_SG_CHAINING,
        .eh_abort_handler = aha1740_eh_abort_handler,
 };
 
index a055a96e3ad34e9185f10a214f798788928e6260..42c0f14a262cbf8f3b4e3e44c80046b009a9c7b1 100644 (file)
@@ -766,6 +766,7 @@ struct scsi_host_template aic79xx_driver_template = {
        .max_sectors            = 8192,
        .cmd_per_lun            = 2,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .slave_alloc            = ahd_linux_slave_alloc,
        .slave_configure        = ahd_linux_slave_configure,
        .target_alloc           = ahd_linux_target_alloc,
index 2e9c38f2e8a68d1065be272baa7174fa2eb06e90..7770befbf50c17171a03077a91e5794070c8217f 100644 (file)
@@ -747,6 +747,7 @@ struct scsi_host_template aic7xxx_driver_template = {
        .max_sectors            = 8192,
        .cmd_per_lun            = 2,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .slave_alloc            = ahc_linux_slave_alloc,
        .slave_configure        = ahc_linux_slave_configure,
        .target_alloc           = ahc_linux_target_alloc,
index 1a71b0236c974ef8ed3006f9a82756c163d0d3c6..4025608d6964cf3ee019708d3ae4ee067e1094ac 100644 (file)
@@ -11142,6 +11142,7 @@ static struct scsi_host_template driver_template = {
        .max_sectors            = 2048,
        .cmd_per_lun            = 3,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 #include "scsi_module.c"
index cfcf40159eab96e0d512dabec9b39c4c3c19296a..f81777586b8f8ea77b7a2ee8abeae4b13f1e9523 100644 (file)
@@ -122,6 +122,7 @@ static struct scsi_host_template arcmsr_scsi_host_template = {
        .max_sectors            = ARCMSR_MAX_XFER_SECTORS,
        .cmd_per_lun            = ARCMSR_MAX_CMD_PERLUN,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .shost_attrs            = arcmsr_host_attrs,
 };
 #ifdef CONFIG_SCSI_ARCMSR_AER
index 1591824cf4b3b7ed6c8c01202426b717032590e9..fd42d47892021487aa916588b99d87a55c76a048 100644 (file)
@@ -4765,6 +4765,7 @@ static struct scsi_host_template dc395x_driver_template = {
        .eh_bus_reset_handler   = dc395x_eh_bus_reset,
        .unchecked_isa_dma      = 0,
        .use_clustering         = DISABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 
index bea9d659af1549e0dd2e5a8cd1f996eb78d65c25..8258506ba7d793d8a4fe2fd8e0e7fe4a3fb26245 100644 (file)
@@ -3295,6 +3295,7 @@ static struct scsi_host_template adpt_template = {
        .this_id                = 7,
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 static s32 adpt_scsi_register(adpt_hba* pHba)
index ec2233114bc9b6bbaf74d9281e5d4e9b53376653..7ead5210de968dfb0ece36e1d81058a018875d14 100644 (file)
@@ -523,7 +523,8 @@ static struct scsi_host_template driver_template = {
        .slave_configure = eata2x_slave_configure,
        .this_id = 7,
        .unchecked_isa_dma = 1,
-       .use_clustering = ENABLE_CLUSTERING
+       .use_clustering = ENABLE_CLUSTERING,
+       .use_sg_chaining = ENABLE_SG_CHAINING,
 };
 
 #if !defined(__BIG_ENDIAN_BITFIELD) && !defined(__LITTLE_ENDIAN_BITFIELD)
index adc9559cb6f40b20e4666d93550bc0b8b6fc8e83..112ab6abe62bf513cd7f2b25926fdab9571f0304 100644 (file)
@@ -343,6 +343,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
        shost->use_clustering = sht->use_clustering;
        shost->ordered_tag = sht->ordered_tag;
        shost->active_mode = sht->supported_mode;
+       shost->use_sg_chaining = sht->use_sg_chaining;
 
        if (sht->max_host_blocked)
                shost->max_host_blocked = sht->max_host_blocked;
index 8b384fa7f048c96a92d555e74377ab3d1a4bb22d..8515054cdf703ef079f7525334c24865276fa11b 100644 (file)
@@ -655,6 +655,7 @@ static struct scsi_host_template driver_template = {
        .unchecked_isa_dma          = 0,
        .emulated                   = 0,
        .use_clustering             = ENABLE_CLUSTERING,
+       .use_sg_chaining            = ENABLE_SG_CHAINING,
        .proc_name                  = driver_name,
        .shost_attrs                = hptiop_attrs,
        .this_id                    = -1,
index 1a924e9b02718f405dac5e9be65a13979b4a502a..714e6273a70d0444c28e938dbcb864ee677cdb87 100644 (file)
@@ -1501,6 +1501,7 @@ static struct scsi_host_template ibmmca_driver_template = {
           .sg_tablesize   = 16,
           .cmd_per_lun    = 1,
           .use_clustering = ENABLE_CLUSTERING,
+          .use_sg_chaining = ENABLE_SG_CHAINING,
 };
 
 static int ibmmca_probe(struct device *dev)
index cda0cc3d182fde457f4b15259d8a10eb476489af..22d91ee173c594f1d101f6f1d97e9395aac00ccb 100644 (file)
@@ -1548,6 +1548,7 @@ static struct scsi_host_template driver_template = {
        .this_id = -1,
        .sg_tablesize = SG_ALL,
        .use_clustering = ENABLE_CLUSTERING,
+       .use_sg_chaining = ENABLE_SG_CHAINING,
        .shost_attrs = ibmvscsi_attrs,
 };
 
index d9dfb69ae031c0c5804b336a62cc6b2f9d549d63..22d40fd5845b68b30e22fe06dc56d35633ffa501 100644 (file)
@@ -2831,6 +2831,7 @@ static struct scsi_host_template initio_template = {
        .sg_tablesize           = SG_ALL,
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 static int initio_probe_one(struct pci_dev *pdev,
index cd674938ccd53ab2c5f7ebe7a7e563930f6dcd68..c0755565fae9da39f9173fbfcd5d92e85db5229e 100644 (file)
@@ -1438,6 +1438,7 @@ struct scsi_host_template lpfc_template = {
        .scan_finished          = lpfc_scan_finished,
        .this_id                = -1,
        .sg_tablesize           = LPFC_SG_SEG_CNT,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .cmd_per_lun            = LPFC_CMD_PER_LUN,
        .use_clustering         = ENABLE_CLUSTERING,
        .shost_attrs            = lpfc_hba_attrs,
@@ -1460,6 +1461,7 @@ struct scsi_host_template lpfc_vport_template = {
        .sg_tablesize           = LPFC_SG_SEG_CNT,
        .cmd_per_lun            = LPFC_CMD_PER_LUN,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .shost_attrs            = lpfc_vport_attrs,
        .max_sectors            = 0xFFFF,
 };
index b12ad7c7c6736908419987896a2402898ba2620e..a035001f44386a36e49abcd3d292fb31239cf85e 100644 (file)
@@ -402,6 +402,7 @@ static struct scsi_host_template mac53c94_template = {
        .sg_tablesize   = SG_ALL,
        .cmd_per_lun    = 1,
        .use_clustering = DISABLE_CLUSTERING,
+       .use_sg_chaining = ENABLE_SG_CHAINING,
 };
 
 static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *match)
index e7e11f282c8f4357d419e8508746871cdda1a492..10d1aff9938a1938b79ec54e92cb1a5bb6bc7ecd 100644 (file)
@@ -4492,6 +4492,7 @@ static struct scsi_host_template megaraid_template = {
        .sg_tablesize                   = MAX_SGLIST,
        .cmd_per_lun                    = DEF_CMD_PER_LUN,
        .use_clustering                 = ENABLE_CLUSTERING,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
        .eh_abort_handler               = megaraid_abort,
        .eh_device_reset_handler        = megaraid_reset,
        .eh_bus_reset_handler           = megaraid_reset,
index c6a53dccc16a84d52b6aa3d041630a57421a58ee..e4e4c6a39ed6368d090cef0dea29fff4f491e757 100644 (file)
@@ -361,6 +361,7 @@ static struct scsi_host_template megaraid_template_g = {
        .eh_host_reset_handler          = megaraid_reset_handler,
        .change_queue_depth             = megaraid_change_queue_depth,
        .use_clustering                 = ENABLE_CLUSTERING,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
        .sdev_attrs                     = megaraid_sdev_attrs,
        .shost_attrs                    = megaraid_shost_attrs,
 };
index ebb948c016bbfa871db78ebc3ce5508562440585..e3c5c52822030f42283b6c9baa357f1921238336 100644 (file)
@@ -1110,6 +1110,7 @@ static struct scsi_host_template megasas_template = {
        .eh_timed_out = megasas_reset_timer,
        .bios_param = megasas_bios_param,
        .use_clustering = ENABLE_CLUSTERING,
+       .use_sg_chaining = ENABLE_SG_CHAINING,
 };
 
 /**
index 651d09b08f2a22eb6283da21830736271d1d4cd8..7470ff39ab22f59bd09e8140ba42811730b50230 100644 (file)
@@ -1843,6 +1843,7 @@ static struct scsi_host_template mesh_template = {
        .sg_tablesize                   = SG_ALL,
        .cmd_per_lun                    = 2,
        .use_clustering                 = DISABLE_CLUSTERING,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
 };
 
 static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
index 7fed35372150afe68d619d61d4faa4a2a4588437..28161dc95e0d7107613933da5186e50f265a0ded 100644 (file)
@@ -281,6 +281,7 @@ static struct scsi_host_template nsp32_template = {
        .cmd_per_lun                    = 1,
        .this_id                        = NSP32_HOST_SCSIID,
        .use_clustering                 = DISABLE_CLUSTERING,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
        .eh_abort_handler               = nsp32_eh_abort,
        .eh_bus_reset_handler           = nsp32_eh_bus_reset,
        .eh_host_reset_handler          = nsp32_eh_host_reset,
index 961839ecfe868ed487b69ceb1000330f903bb496..190e2a7d706748a10275bde1c40842415b459948 100644 (file)
@@ -694,6 +694,7 @@ static struct scsi_host_template sym53c500_driver_template = {
      .sg_tablesize             = 32,
      .cmd_per_lun              = 1,
      .use_clustering           = ENABLE_CLUSTERING,
+     .use_sg_chaining          = ENABLE_SG_CHAINING,
      .shost_attrs              = SYM53C500_shost_attrs
 };
 
index a6bb8d0ecf139fe46de567eb773abd8fead11dba..0351d380c2d7b1790c93d5655ff856b66d59cb74 100644 (file)
@@ -132,6 +132,7 @@ struct scsi_host_template qla2x00_driver_template = {
        .this_id                = -1,
        .cmd_per_lun            = 3,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .sg_tablesize           = SG_ALL,
 
        /*
@@ -163,6 +164,7 @@ struct scsi_host_template qla24xx_driver_template = {
        .this_id                = -1,
        .cmd_per_lun            = 3,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .sg_tablesize           = SG_ALL,
 
        .max_sectors            = 0xFFFF,
index b1d565c12c5b9af0da0350f909c11e95f9617b59..03b68d4f3bd0e1821f84aa5d75af404e8170e16c 100644 (file)
@@ -94,6 +94,7 @@ static struct scsi_host_template qla4xxx_driver_template = {
        .this_id                = -1,
        .cmd_per_lun            = 3,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .sg_tablesize           = SG_ALL,
 
        .max_sectors            = 0xFFFF,
index 1e874f1fb5c64a403fd6e7da8365edce51b929df..1769f965eedf496e9e0602365220641c5caa2fd1 100644 (file)
@@ -197,6 +197,7 @@ static struct scsi_host_template qlogicfas_driver_template = {
        .sg_tablesize           = SG_ALL,
        .cmd_per_lun            = 1,
        .use_clustering         = DISABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 static __init int qlogicfas_init(void)
index c75cb6ad6d9416eadcdd5c7a4a4914d1da29b9d9..b6e6d801768b140235d7e0c565753c4f4bb78a29 100644 (file)
@@ -1645,7 +1645,10 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
         * converted, so better keep it safe.
         */
 #ifdef ARCH_HAS_SG_CHAIN
-       blk_queue_max_phys_segments(q, SCSI_MAX_SG_CHAIN_SEGMENTS);
+       if (shost->use_sg_chaining)
+               blk_queue_max_phys_segments(q, SCSI_MAX_SG_CHAIN_SEGMENTS);
+       else
+               blk_queue_max_phys_segments(q, SCSI_MAX_SG_SEGMENTS);
 #else
        blk_queue_max_phys_segments(q, SCSI_MAX_SG_SEGMENTS);
 #endif
index 72f6d8015358d6f52c967f51876d53cac2597c29..e3fab3a6aed79f843e44de0720ff3dea485b18b2 100644 (file)
@@ -1123,6 +1123,7 @@ static struct scsi_host_template driver_template = {
        .this_id                        = -1,
        .sg_tablesize                   = ST_MAX_SG,
        .cmd_per_lun                    = ST_CMD_PER_LUN,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
 };
 
 static int stex_set_dma_mask(struct pci_dev * pdev)
index 92bfaeafe30da0fece863c0b39e7fb60568d7bfc..8befab7e98397b759c9c3a80989b5f4edb5f42ee 100644 (file)
@@ -854,5 +854,6 @@ static struct scsi_host_template driver_template = {
        .cmd_per_lun =          1,
        .unchecked_isa_dma =    1,
        .use_clustering =       ENABLE_CLUSTERING,
+       .use_sg_chaining =      ENABLE_SG_CHAINING,
 };
 #include "scsi_module.c"
index 3db22325ea2cdf55a76b0dca34e59a2f579495e6..db03c4c8ec1e55fe21fb9dc31db910ea69d80767 100644 (file)
@@ -1808,6 +1808,7 @@ static struct scsi_host_template sym2_template = {
        .eh_host_reset_handler  = sym53c8xx_eh_host_reset_handler,
        .this_id                = 7,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
        .max_sectors            = 0xFFFF,
 #ifdef SYM_LINUX_PROC_INFO_SUPPORT
        .proc_info              = sym53c8xx_proc_info,
index fc9f51818e8f3fb2b6e4a0d48027250d67a4eeaa..d6cb549a60ca0eb12ab9d3868d869f92b5e26cd8 100644 (file)
@@ -451,6 +451,7 @@ static struct scsi_host_template driver_template = {
                 .this_id                 = 7,
                 .unchecked_isa_dma       = 1,
                 .use_clustering          = ENABLE_CLUSTERING
+                .use_sg_chaining         = ENABLE_SG_CHAINING,
                 };
 
 #if !defined(__BIG_ENDIAN_BITFIELD) && !defined(__LITTLE_ENDIAN_BITFIELD)
index c08235d5afc9c648fc2a29c0aad22515149da419..ea72bbeb8f9d54ae4a02cf505480e4bca463b29c 100644 (file)
@@ -1197,5 +1197,6 @@ static struct scsi_host_template driver_template = {
        .cmd_per_lun       = ULTRASTOR_MAX_CMDS_PER_LUN,
        .unchecked_isa_dma = 1,
        .use_clustering    = ENABLE_CLUSTERING,
+       .use_sg_chaining   = ENABLE_SG_CHAINING,
 };
 #include "scsi_module.c"
index d6fd4259c56bde5614d22fd8ffb532e2fdb18a15..255c611e78b8469a8ee2b2951c18f3b357d123c5 100644 (file)
@@ -1671,6 +1671,7 @@ static struct scsi_host_template driver_template = {
        .cmd_per_lun            = 1,
        .unchecked_isa_dma      = 1,
        .use_clustering         = ENABLE_CLUSTERING,
+       .use_sg_chaining        = ENABLE_SG_CHAINING,
 };
 
 #include "scsi_module.c"
index 7d210cd6c38d03a476b4f06fe563126d69db42c2..0fd4746ee39d4437e788c37b9a7f59d9b65dc11a 100644 (file)
@@ -39,6 +39,9 @@ struct blk_queue_tags;
 #define DISABLE_CLUSTERING 0
 #define ENABLE_CLUSTERING 1
 
+#define DISABLE_SG_CHAINING 0
+#define ENABLE_SG_CHAINING 1
+
 enum scsi_eh_timer_return {
        EH_NOT_HANDLED,
        EH_HANDLED,
@@ -442,6 +445,15 @@ struct scsi_host_template {
         */
        unsigned ordered_tag:1;
 
+       /*
+        * true if the low-level driver can support sg chaining. this
+        * will be removed eventually when all the drivers are
+        * converted to support sg chaining.
+        *
+        * Status: OBSOLETE
+        */
+       unsigned use_sg_chaining:1;
+
        /*
         * Countdown for host blocking with no commands outstanding
         */
@@ -586,6 +598,7 @@ struct Scsi_Host {
        unsigned unchecked_isa_dma:1;
        unsigned use_clustering:1;
        unsigned use_blk_tcq:1;
+       unsigned use_sg_chaining:1;
 
        /*
         * Host has requested that no further requests come through for the