Re: [PATCH 40/52] scsi: Kill DRIVER_SENSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2019-11-04 at 10:01 +0100, Hannes Reinecke wrote:
> Replace the check for DRIVER_SENSE with a check for
> SAM_STAT_CHECK_CONDITION and audit all callsites to
> ensure the SAM status is set correctly.
> For backwards compability move the DRIVER_SENSE definition
> to sg.h, and update the sg driver to set the DRIVER_SENSE
> driver_status whenever SAM_STAT_CHECK_CONDITION is present.
> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> ---
>  drivers/ata/libata-scsi.c                   | 13 ++++-----
>  drivers/scsi/NCR5380.c                      |  2 +-
>  drivers/scsi/aic7xxx/aic79xx_osm.c          | 19 +++++-------
>  drivers/scsi/aic7xxx/aic7xxx_osm.c          |  1 -
>  drivers/scsi/arcmsr/arcmsr_hba.c            |  1 -
>  drivers/scsi/ch.c                           |  3 +-
>  drivers/scsi/constants.c                    |  2 +-
>  drivers/scsi/cxlflash/superpipe.c           | 45 ++++++++++++++-----
> ----------
>  drivers/scsi/dc395x.c                       |  2 +-
>  drivers/scsi/esp_scsi.c                     |  3 +-
>  drivers/scsi/megaraid.c                     | 14 ++++-----
>  drivers/scsi/megaraid/megaraid_mbox.c       | 14 ++++-----
>  drivers/scsi/megaraid/megaraid_sas_base.c   |  2 --
>  drivers/scsi/megaraid/megaraid_sas_fusion.c |  1 -
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c        |  3 +-
>  drivers/scsi/mvumi.c                        |  1 -
>  drivers/scsi/scsi.c                         |  7 -----
>  drivers/scsi/scsi_debug.c                   |  4 +--
>  drivers/scsi/scsi_ioctl.c                   |  2 +-
>  drivers/scsi/scsi_lib.c                     | 13 ++++-----
>  drivers/scsi/scsi_scan.c                    |  2 +-
>  drivers/scsi/scsi_transport_spi.c           |  2 +-
>  drivers/scsi/sd.c                           | 33 +++++++++++------
> ----
>  drivers/scsi/sg.c                           |  9 +++---
>  drivers/scsi/stex.c                         |  4 +--
>  drivers/scsi/sym53c8xx_2/sym_glue.c         |  6 ++--
>  drivers/scsi/ufs/ufshcd.c                   |  2 +-
>  drivers/scsi/virtio_scsi.c                  |  3 +-
>  drivers/scsi/vmw_pvscsi.c                   |  3 --
>  drivers/target/loopback/tcm_loop.c          |  1 -
>  drivers/usb/storage/cypress_atacb.c         |  4 +--
>  drivers/xen/xen-scsiback.c                  |  2 +-
>  include/scsi/scsi.h                         |  1 -
>  include/scsi/sg.h                           |  5 ++--
>  include/trace/events/scsi.h                 |  3 +-
>  35 files changed, 94 insertions(+), 138 deletions(-)
> 
>  	}
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c
> b/drivers/scsi/aic7xxx/aic79xx_osm.c
> index 72c67e89b911..0d83184d069c 100644
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1940,7 +1940,7 @@ ahd_linux_handle_scsi_status(struct ahd_softc
> *ahd,
>  			memcpy(cmd->sense_buffer,
>  			       ahd_get_sense_buf(ahd, scb)
>  			       + sense_offset, sense_size);
> -			cmd->result |= (DRIVER_SENSE << 24);
> +			cmd->result |= SAM_STAT_CHECK_CONDITION;

Perhaps you should consider using set_status_byte() here, too?

Regards,
Martin






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux