Skip to content

Commit

Permalink
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/jejb/scsi

Pull SCSI updates from James Bottomley:
 "Updates to the usual drivers (ufs, lpfc, qla2xxx, mpi3mr, libsas) and
  the usual minor updates and bug fixes but no significant core changes"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (116 commits)
  scsi: storvsc: Handle additional SRB status values
  scsi: libsas: Delete sas_ata_task.retry_count
  scsi: libsas: Delete sas_ata_task.stp_affil_pol
  scsi: libsas: Delete sas_ata_task.set_affil_pol
  scsi: libsas: Delete sas_ssp_task.task_prio
  scsi: libsas: Delete sas_ssp_task.enable_first_burst
  scsi: libsas: Delete sas_ssp_task.retry_count
  scsi: libsas: Delete struct scsi_core
  scsi: libsas: Delete enum sas_phy_type
  scsi: libsas: Delete enum sas_class
  scsi: libsas: Delete sas_ha_struct.lldd_module
  scsi: target: Fix write perf due to unneeded throttling
  scsi: lpfc: Do not abuse UUID APIs and LPFC_COMPRESS_VMID_SIZE
  scsi: pm8001: Remove unused declarations
  scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
  scsi: elx: sli4: Remove code duplication
  scsi: bfa: Replace one-element array with flexible-array member in struct fc_rscn_pl_s
  scsi: qla2xxx: Remove unused declarations
  scsi: pmcraid: Use pci_dev_id() to simplify the code
  scsi: pm80xx: Set RETFIS when requested by libsas
  ...
  • Loading branch information
torvalds committed Sep 2, 2023
2 parents b70100f + e03843a commit b89b029
Show file tree
Hide file tree
Showing 121 changed files with 1,878 additions and 4,561 deletions.
247 changes: 0 additions & 247 deletions Documentation/ABI/testing/sysfs-driver-ufs
Original file line number Diff line number Diff line change
Expand Up @@ -1437,180 +1437,6 @@ Description:
If avail_wb_buff < wb_flush_threshold, it indicates that WriteBooster buffer needs to
be flushed, otherwise it is not necessary.

What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
What: /sys/bus/platform/devices/*.ufs/device_descriptor/hpb_version
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the HPB specification version.
The full information about the descriptor can be found in the UFS
HPB (Host Performance Booster) Extension specifications.
Example: version 1.2.3 = 0123h

The file is read only.

What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_control
What: /sys/bus/platform/devices/*.ufs/device_descriptor/hpb_control
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows an indication of the HPB control mode.
00h: Host control mode
01h: Device control mode

The file is read only.

What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_region_size
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_region_size
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the bHPBRegionSize which can be calculated
as in the following (in bytes):
HPB Region size = 512B * 2^bHPBRegionSize

The file is read only.

What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_number_lu
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the maximum number of HPB LU supported by
the device.
00h: HPB is not supported by the device.
01h ~ 20h: Maximum number of HPB LU supported by the device

The file is read only.

What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_subregion_size
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_subregion_size
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the bHPBSubRegionSize, which can be
calculated as in the following (in bytes) and shall be a multiple of
logical block size:
HPB Sub-Region size = 512B x 2^bHPBSubRegionSize
bHPBSubRegionSize shall not exceed bHPBRegionSize.

The file is read only.

What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_max_active_regions
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_max_active_regions
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the maximum number of active HPB regions that
is supported by the device.

The file is read only.

What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_lu_max_active_regions
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the maximum number of HPB regions assigned to
the HPB logical unit.

The file is read only.

What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_pinned_region_start_offset
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the start offset of HPB pinned region.

The file is read only.

What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_number_pinned_regions
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the number of HPB pinned regions assigned to
the HPB logical unit.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_stats/hit_cnt
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the number of reads that changed to HPB read.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_stats/miss_cnt
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the number of reads that cannot be changed to
HPB read.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_noti_cnt
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the number of response UPIUs that has
recommendations for activating sub-regions and/or inactivating region.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_active_cnt
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: For the HPB device control mode, this entry shows the number of
active sub-regions recommended by response UPIUs. For the HPB host control
mode, this entry shows the number of active sub-regions recommended by the
HPB host control mode heuristic algorithm.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_inactive_cnt
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: For the HPB device control mode, this entry shows the number of
inactive regions recommended by response UPIUs. For the HPB host control
mode, this entry shows the number of inactive regions recommended by the
HPB host control mode heuristic algorithm.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_stats/map_req_cnt
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the number of read buffer commands for
activating sub-regions recommended by response UPIUs.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_params/requeue_timeout_ms
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the requeue timeout threshold for write buffer
command in ms. The value can be changed by writing an integer to
this entry.

What: /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_size_hpb_single_cmd
What: /sys/bus/platform/devices/*.ufs/attributes/max_data_size_hpb_single_cmd
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the maximum HPB data size for using a single HPB
command.

=== ========
00h 4KB
01h 8KB
02h 12KB
...
FFh 1024KB
=== ========

The file is read only.

What: /sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable
What: /sys/bus/platform/devices/*.ufs/flags/hpb_enable
Date: June 2021
Contact: Daejun Park <[email protected]>
Description: This entry shows the status of HPB.

== ============================
0 HPB is not enabled.
1 HPB is enabled
== ============================

The file is read only.

Contact: Daniil Lunev <[email protected]>
What: /sys/bus/platform/drivers/ufshcd/*/capabilities/
What: /sys/bus/platform/devices/*.ufs/capabilities/
Expand Down Expand Up @@ -1648,76 +1474,3 @@ Description: Indicates status of Write Booster.

The file is read only.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/activation_thld
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: In host control mode, reads are the major source of activation
trials. Once this threshold hs met, the region is added to the
"to-be-activated" list. Since we reset the read counter upon
write, this include sending a rb command updating the region
ppn as well.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/normalization_factor
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: In host control mode, we think of the regions as "buckets".
Those buckets are being filled with reads, and emptied on write.
We use entries_per_srgn - the amount of blocks in a subregion as
our bucket size. This applies because HPB1.0 only handles
single-block reads. Once the bucket size is crossed, we trigger
a normalization work - not only to avoid overflow, but mainly
because we want to keep those counters normalized, as we are
using those reads as a comparative score, to make various decisions.
The normalization is dividing (shift right) the read counter by
the normalization_factor. If during consecutive normalizations
an active region has exhausted its reads - inactivate it.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_enter
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: Region deactivation is often due to the fact that eviction took
place: A region becomes active at the expense of another. This is
happening when the max-active-regions limit has been crossed.
In host mode, eviction is considered an extreme measure. We
want to verify that the entering region has enough reads, and
the exiting region has much fewer reads. eviction_thld_enter is
the min reads that a region must have in order to be considered
a candidate for evicting another region.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_exit
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: Same as above for the exiting region. A region is considered to
be a candidate for eviction only if it has fewer reads than
eviction_thld_exit.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_ms
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: In order not to hang on to "cold" regions, we inactivate
a region that has no READ access for a predefined amount of
time - read_timeout_ms. If read_timeout_ms has expired, and the
region is dirty, it is less likely that we can make any use of
HPB reading it so we inactivate it. Still, deactivation has
its overhead, and we may still benefit from HPB reading this
region if it is clean - see read_timeout_expiries.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_expiries
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: If the region read timeout has expired, but the region is clean,
just re-wind its timer for another spin. Do that as long as it
is clean and did not exhaust its read_timeout_expiries threshold.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/timeout_polling_interval_ms
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: The frequency with which the delayed worker that checks the
read_timeouts is awakened.

What: /sys/class/scsi_device/*/device/hpb_param_sysfs/inflight_map_req
Date: February 2021
Contact: Avri Altman <[email protected]>
Description: In host control mode the host is the originator of map requests.
To avoid flooding the device with map requests, use a simple throttling
mechanism that limits the number of inflight map requests.
4 changes: 2 additions & 2 deletions Documentation/scsi/scsi_mid_low_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1190,11 +1190,11 @@ Members of interest:
- pointer to scsi_device object that this command is
associated with.
resid
- an LLD should set this signed integer to the requested
- an LLD should set this unsigned integer to the requested
transfer length (i.e. 'request_bufflen') less the number
of bytes that are actually transferred. 'resid' is
preset to 0 so an LLD can ignore it if it cannot detect
underruns (overruns should be rare). If possible an LLD
underruns (overruns should not be reported). An LLD
should set 'resid' prior to invoking 'done'. The most
interesting case is data transfers from a SCSI target
device (e.g. READs) that underrun.
Expand Down
4 changes: 0 additions & 4 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,12 +1979,8 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)

if (unlikely(rsp->flags & SRP_RSP_FLAG_DIUNDER))
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DIOVER))
scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_in_res_cnt));
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DOUNDER))
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_out_res_cnt));
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DOOVER))
scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_out_res_cnt));

srp_free_req(ch, req, scmnd,
be32_to_cpu(rsp->req_lim_delta));
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ config SCSI_IMM

config SCSI_IZIP_EPP16
bool "ppa/imm option - Use slow (but safe) EPP-16"
depends on SCSI_PPA || SCSI_IMM
depends on SCSI_IMM
help
EPP (Enhanced Parallel Port) is a standard for parallel ports which
allows them to act as expansion buses that can handle up to 64
Expand Down
18 changes: 3 additions & 15 deletions drivers/scsi/aic7xxx/aicasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,11 @@ $(OUTDIR)/aicdb.h:
clean:
rm -f $(clean-files)

# Create a dependency chain in generated files
# to avoid concurrent invocations of the single
# rule that builds them all.
$(OUTDIR)/aicasm_gram.c: $(OUTDIR)/aicasm_gram.h
$(OUTDIR)/aicasm_gram.c $(OUTDIR)/aicasm_gram.h: aicasm_gram.y
$(YACC) $(YFLAGS) -b $(<:.y=) $<
mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)

# Create a dependency chain in generated files
# to avoid concurrent invocations of the single
# rule that builds them all.
$(OUTDIR)/aicasm_macro_gram.c: $(OUTDIR)/aicasm_macro_gram.h
$(YACC) $(YFLAGS) -b $(<:.y=) $< -o $(OUTDIR)/$(<:.y=.c)

$(OUTDIR)/aicasm_macro_gram.c $(OUTDIR)/aicasm_macro_gram.h: aicasm_macro_gram.y
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $< -o $(OUTDIR)/$(<:.y=.c)

$(OUTDIR)/aicasm_scan.c: aicasm_scan.l
$(LEX) $(LFLAGS) -o $@ $<
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <ctype.h>

#include "aicasm_symbol.h"
#include "aicasm.h"
Expand Down
4 changes: 1 addition & 3 deletions drivers/scsi/aic94xx/aic94xx_hwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static int asd_get_user_sas_addr(struct asd_ha_struct *asd_ha)
if (asd_ha->hw_prof.sas_addr[0])
return 0;

return sas_request_addr(asd_ha->sas_ha.core.shost,
return sas_request_addr(asd_ha->sas_ha.shost,
asd_ha->hw_prof.sas_addr);
}

Expand Down Expand Up @@ -72,10 +72,8 @@ static int asd_init_phy(struct asd_phy *phy)
struct asd_sas_phy *sas_phy = &phy->sas_phy;

sas_phy->enabled = 1;
sas_phy->class = SAS;
sas_phy->iproto = SAS_PROTOCOL_ALL;
sas_phy->tproto = 0;
sas_phy->type = PHY_TYPE_PHYSICAL;
sas_phy->role = PHY_ROLE_INITIATOR;
sas_phy->oob_mode = OOB_NOT_CONNECTED;
sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN;
Expand Down
7 changes: 3 additions & 4 deletions drivers/scsi/aic94xx/aic94xx_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ static int asd_register_sas_ha(struct asd_ha_struct *asd_ha)
}

asd_ha->sas_ha.sas_ha_name = (char *) asd_ha->name;
asd_ha->sas_ha.lldd_module = THIS_MODULE;
asd_ha->sas_ha.sas_addr = &asd_ha->hw_prof.sas_addr[0];

for (i = 0; i < ASD_MAX_PHYS; i++) {
Expand All @@ -688,8 +687,8 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha)

err = sas_unregister_ha(&asd_ha->sas_ha);

sas_remove_host(asd_ha->sas_ha.core.shost);
scsi_host_put(asd_ha->sas_ha.core.shost);
sas_remove_host(asd_ha->sas_ha.shost);
scsi_host_put(asd_ha->sas_ha.shost);

kfree(asd_ha->sas_ha.sas_phy);
kfree(asd_ha->sas_ha.sas_port);
Expand Down Expand Up @@ -739,7 +738,7 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
asd_printk("found %s, device %s\n", asd_ha->name, pci_name(dev));

SHOST_TO_SAS_HA(shost) = &asd_ha->sas_ha;
asd_ha->sas_ha.core.shost = shost;
asd_ha->sas_ha.shost = shost;
shost->transportt = aic94xx_transport_template;
shost->max_id = ~0;
shost->max_lun = ~0;
Expand Down
Loading

0 comments on commit b89b029

Please sign in to comment.