On 11/24/2014 03:36 PM, Christoph Hellwig wrote:
> Since we got rid of ordered tag support in 2010 the prime use case of
> switching on and off ordered tags has been obsolete.  The other function
> of enabling/dsiabling tagging entirely has only been correctly implemented
> by the 53c700 driver and isn't generally useful.
> 
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
>  drivers/infiniband/ulp/srp/ib_srp.c  |  1 -
>  drivers/scsi/53c700.c                | 35 -----------------------------------
>  drivers/scsi/aic94xx/aic94xx_init.c  |  1 -
>  drivers/scsi/bnx2fc/bnx2fc_fcoe.c    |  1 -
>  drivers/scsi/esas2r/esas2r_main.c    |  1 -
>  drivers/scsi/fcoe/fcoe.c             |  1 -
>  drivers/scsi/fnic/fnic_main.c        |  1 -
>  drivers/scsi/ibmvscsi/ibmvfc.c       |  1 -
>  drivers/scsi/ipr.c                   | 25 -------------------------
>  drivers/scsi/isci/init.c             |  1 -
>  drivers/scsi/libsas/sas_scsi_host.c  |  8 --------
>  drivers/scsi/lpfc/lpfc_scsi.c        |  2 --
>  drivers/scsi/mpt2sas/mpt2sas_scsih.c |  1 -
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c |  1 -
>  drivers/scsi/mvsas/mv_init.c         |  1 -
>  drivers/scsi/pm8001/pm8001_init.c    |  1 -
>  drivers/scsi/pmcraid.c               |  1 -
>  drivers/scsi/qla2xxx/qla_os.c        |  1 -
>  drivers/scsi/scsi.c                  | 16 ----------------
>  drivers/scsi/scsi_debug.c            | 27 ---------------------------
>  drivers/scsi/scsi_sysfs.c            | 30 ++++--------------------------
>  drivers/target/loopback/tcm_loop.c   |  1 -
>  include/scsi/libsas.h                |  1 -
>  include/scsi/scsi_host.h             | 13 -------------
>  include/scsi/scsi_tcq.h              |  3 ---
>  25 files changed, 4 insertions(+), 171 deletions(-)
> 

[ .. ]

> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
> index 1cb64a8..1ac38e7 100644
> --- a/drivers/scsi/scsi_sysfs.c
> +++ b/drivers/scsi/scsi_sysfs.c
> @@ -738,30 +738,12 @@ store_queue_type_field(struct device *dev, struct 
> device_attribute *attr,
>                      const char *buf, size_t count)
>  {
>       struct scsi_device *sdev = to_scsi_device(dev);
> -     struct scsi_host_template *sht = sdev->host->hostt;
> -     int tag_type = 0, retval;
> -     int prev_tag_type = scsi_get_tag_type(sdev);
> -
> -     if (!sdev->tagged_supported || !sht->change_queue_type)
> -             return -EINVAL;
>  
> -     /*
> -      * We're never issueing order tags these days, but allow the value
> -      * for backwards compatibility.
> -      */
> -     if (strncmp(buf, "ordered", 7) == 0 ||
> -         strncmp(buf, "simple", 6) == 0)
> -             tag_type = MSG_SIMPLE_TAG;
> -     else if (strncmp(buf, "none", 4) != 0)
> +     if (!sdev->tagged_supported)
>               return -EINVAL;
> -
> -     if (tag_type == prev_tag_type)
> -             return count;
> -
> -     retval = sht->change_queue_type(sdev, tag_type);
> -     if (retval < 0)
> -             return retval;
> -
> +             
> +     sdev_printk(KERN_INFO, sdev,
> +                 "ignoring write to deprecated queue_type attribute");
>       return count;
>  }
>  
> @@ -938,10 +920,6 @@ static umode_t scsi_sdev_attr_is_visible(struct kobject 
> *kobj,
>           !sdev->host->hostt->change_queue_depth)
>               return 0;
>  
> -     if (attr == &dev_attr_queue_type.attr &&
> -         !sdev->host->hostt->change_queue_type)
> -             return S_IRUGO;
> -
>       return attr->mode;
>  }
>  
Why not setting the attribute to S_IRUGO always and drop the 'store'
method altogether?

Otherwise:

Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
[email protected]                          +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to