Skip to content

Commit b89b029

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/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 ...
2 parents b70100f + e03843a commit b89b029

File tree

121 files changed

+1878
-4561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1878
-4561
lines changed

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 0 additions & 247 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,180 +1437,6 @@ Description:
14371437
If avail_wb_buff < wb_flush_threshold, it indicates that WriteBooster buffer needs to
14381438
be flushed, otherwise it is not necessary.
14391439

1440-
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
1441-
What: /sys/bus/platform/devices/*.ufs/device_descriptor/hpb_version
1442-
Date: June 2021
1443-
Contact: Daejun Park <daejun7.park@samsung.com>
1444-
Description: This entry shows the HPB specification version.
1445-
The full information about the descriptor can be found in the UFS
1446-
HPB (Host Performance Booster) Extension specifications.
1447-
Example: version 1.2.3 = 0123h
1448-
1449-
The file is read only.
1450-
1451-
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_control
1452-
What: /sys/bus/platform/devices/*.ufs/device_descriptor/hpb_control
1453-
Date: June 2021
1454-
Contact: Daejun Park <daejun7.park@samsung.com>
1455-
Description: This entry shows an indication of the HPB control mode.
1456-
00h: Host control mode
1457-
01h: Device control mode
1458-
1459-
The file is read only.
1460-
1461-
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_region_size
1462-
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_region_size
1463-
Date: June 2021
1464-
Contact: Daejun Park <daejun7.park@samsung.com>
1465-
Description: This entry shows the bHPBRegionSize which can be calculated
1466-
as in the following (in bytes):
1467-
HPB Region size = 512B * 2^bHPBRegionSize
1468-
1469-
The file is read only.
1470-
1471-
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
1472-
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_number_lu
1473-
Date: June 2021
1474-
Contact: Daejun Park <daejun7.park@samsung.com>
1475-
Description: This entry shows the maximum number of HPB LU supported by
1476-
the device.
1477-
00h: HPB is not supported by the device.
1478-
01h ~ 20h: Maximum number of HPB LU supported by the device
1479-
1480-
The file is read only.
1481-
1482-
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_subregion_size
1483-
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_subregion_size
1484-
Date: June 2021
1485-
Contact: Daejun Park <daejun7.park@samsung.com>
1486-
Description: This entry shows the bHPBSubRegionSize, which can be
1487-
calculated as in the following (in bytes) and shall be a multiple of
1488-
logical block size:
1489-
HPB Sub-Region size = 512B x 2^bHPBSubRegionSize
1490-
bHPBSubRegionSize shall not exceed bHPBRegionSize.
1491-
1492-
The file is read only.
1493-
1494-
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_max_active_regions
1495-
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_max_active_regions
1496-
Date: June 2021
1497-
Contact: Daejun Park <daejun7.park@samsung.com>
1498-
Description: This entry shows the maximum number of active HPB regions that
1499-
is supported by the device.
1500-
1501-
The file is read only.
1502-
1503-
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_lu_max_active_regions
1504-
Date: June 2021
1505-
Contact: Daejun Park <daejun7.park@samsung.com>
1506-
Description: This entry shows the maximum number of HPB regions assigned to
1507-
the HPB logical unit.
1508-
1509-
The file is read only.
1510-
1511-
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_pinned_region_start_offset
1512-
Date: June 2021
1513-
Contact: Daejun Park <daejun7.park@samsung.com>
1514-
Description: This entry shows the start offset of HPB pinned region.
1515-
1516-
The file is read only.
1517-
1518-
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_number_pinned_regions
1519-
Date: June 2021
1520-
Contact: Daejun Park <daejun7.park@samsung.com>
1521-
Description: This entry shows the number of HPB pinned regions assigned to
1522-
the HPB logical unit.
1523-
1524-
The file is read only.
1525-
1526-
What: /sys/class/scsi_device/*/device/hpb_stats/hit_cnt
1527-
Date: June 2021
1528-
Contact: Daejun Park <daejun7.park@samsung.com>
1529-
Description: This entry shows the number of reads that changed to HPB read.
1530-
1531-
The file is read only.
1532-
1533-
What: /sys/class/scsi_device/*/device/hpb_stats/miss_cnt
1534-
Date: June 2021
1535-
Contact: Daejun Park <daejun7.park@samsung.com>
1536-
Description: This entry shows the number of reads that cannot be changed to
1537-
HPB read.
1538-
1539-
The file is read only.
1540-
1541-
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_noti_cnt
1542-
Date: June 2021
1543-
Contact: Daejun Park <daejun7.park@samsung.com>
1544-
Description: This entry shows the number of response UPIUs that has
1545-
recommendations for activating sub-regions and/or inactivating region.
1546-
1547-
The file is read only.
1548-
1549-
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_active_cnt
1550-
Date: June 2021
1551-
Contact: Daejun Park <daejun7.park@samsung.com>
1552-
Description: For the HPB device control mode, this entry shows the number of
1553-
active sub-regions recommended by response UPIUs. For the HPB host control
1554-
mode, this entry shows the number of active sub-regions recommended by the
1555-
HPB host control mode heuristic algorithm.
1556-
1557-
The file is read only.
1558-
1559-
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_inactive_cnt
1560-
Date: June 2021
1561-
Contact: Daejun Park <daejun7.park@samsung.com>
1562-
Description: For the HPB device control mode, this entry shows the number of
1563-
inactive regions recommended by response UPIUs. For the HPB host control
1564-
mode, this entry shows the number of inactive regions recommended by the
1565-
HPB host control mode heuristic algorithm.
1566-
1567-
The file is read only.
1568-
1569-
What: /sys/class/scsi_device/*/device/hpb_stats/map_req_cnt
1570-
Date: June 2021
1571-
Contact: Daejun Park <daejun7.park@samsung.com>
1572-
Description: This entry shows the number of read buffer commands for
1573-
activating sub-regions recommended by response UPIUs.
1574-
1575-
The file is read only.
1576-
1577-
What: /sys/class/scsi_device/*/device/hpb_params/requeue_timeout_ms
1578-
Date: June 2021
1579-
Contact: Daejun Park <daejun7.park@samsung.com>
1580-
Description: This entry shows the requeue timeout threshold for write buffer
1581-
command in ms. The value can be changed by writing an integer to
1582-
this entry.
1583-
1584-
What: /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_size_hpb_single_cmd
1585-
What: /sys/bus/platform/devices/*.ufs/attributes/max_data_size_hpb_single_cmd
1586-
Date: June 2021
1587-
Contact: Daejun Park <daejun7.park@samsung.com>
1588-
Description: This entry shows the maximum HPB data size for using a single HPB
1589-
command.
1590-
1591-
=== ========
1592-
00h 4KB
1593-
01h 8KB
1594-
02h 12KB
1595-
...
1596-
FFh 1024KB
1597-
=== ========
1598-
1599-
The file is read only.
1600-
1601-
What: /sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable
1602-
What: /sys/bus/platform/devices/*.ufs/flags/hpb_enable
1603-
Date: June 2021
1604-
Contact: Daejun Park <daejun7.park@samsung.com>
1605-
Description: This entry shows the status of HPB.
1606-
1607-
== ============================
1608-
0 HPB is not enabled.
1609-
1 HPB is enabled
1610-
== ============================
1611-
1612-
The file is read only.
1613-
16141440
Contact: Daniil Lunev <dlunev@chromium.org>
16151441
What: /sys/bus/platform/drivers/ufshcd/*/capabilities/
16161442
What: /sys/bus/platform/devices/*.ufs/capabilities/
@@ -1648,76 +1474,3 @@ Description: Indicates status of Write Booster.
16481474

16491475
The file is read only.
16501476

1651-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/activation_thld
1652-
Date: February 2021
1653-
Contact: Avri Altman <avri.altman@wdc.com>
1654-
Description: In host control mode, reads are the major source of activation
1655-
trials. Once this threshold hs met, the region is added to the
1656-
"to-be-activated" list. Since we reset the read counter upon
1657-
write, this include sending a rb command updating the region
1658-
ppn as well.
1659-
1660-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/normalization_factor
1661-
Date: February 2021
1662-
Contact: Avri Altman <avri.altman@wdc.com>
1663-
Description: In host control mode, we think of the regions as "buckets".
1664-
Those buckets are being filled with reads, and emptied on write.
1665-
We use entries_per_srgn - the amount of blocks in a subregion as
1666-
our bucket size. This applies because HPB1.0 only handles
1667-
single-block reads. Once the bucket size is crossed, we trigger
1668-
a normalization work - not only to avoid overflow, but mainly
1669-
because we want to keep those counters normalized, as we are
1670-
using those reads as a comparative score, to make various decisions.
1671-
The normalization is dividing (shift right) the read counter by
1672-
the normalization_factor. If during consecutive normalizations
1673-
an active region has exhausted its reads - inactivate it.
1674-
1675-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_enter
1676-
Date: February 2021
1677-
Contact: Avri Altman <avri.altman@wdc.com>
1678-
Description: Region deactivation is often due to the fact that eviction took
1679-
place: A region becomes active at the expense of another. This is
1680-
happening when the max-active-regions limit has been crossed.
1681-
In host mode, eviction is considered an extreme measure. We
1682-
want to verify that the entering region has enough reads, and
1683-
the exiting region has much fewer reads. eviction_thld_enter is
1684-
the min reads that a region must have in order to be considered
1685-
a candidate for evicting another region.
1686-
1687-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_exit
1688-
Date: February 2021
1689-
Contact: Avri Altman <avri.altman@wdc.com>
1690-
Description: Same as above for the exiting region. A region is considered to
1691-
be a candidate for eviction only if it has fewer reads than
1692-
eviction_thld_exit.
1693-
1694-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_ms
1695-
Date: February 2021
1696-
Contact: Avri Altman <avri.altman@wdc.com>
1697-
Description: In order not to hang on to "cold" regions, we inactivate
1698-
a region that has no READ access for a predefined amount of
1699-
time - read_timeout_ms. If read_timeout_ms has expired, and the
1700-
region is dirty, it is less likely that we can make any use of
1701-
HPB reading it so we inactivate it. Still, deactivation has
1702-
its overhead, and we may still benefit from HPB reading this
1703-
region if it is clean - see read_timeout_expiries.
1704-
1705-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_expiries
1706-
Date: February 2021
1707-
Contact: Avri Altman <avri.altman@wdc.com>
1708-
Description: If the region read timeout has expired, but the region is clean,
1709-
just re-wind its timer for another spin. Do that as long as it
1710-
is clean and did not exhaust its read_timeout_expiries threshold.
1711-
1712-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/timeout_polling_interval_ms
1713-
Date: February 2021
1714-
Contact: Avri Altman <avri.altman@wdc.com>
1715-
Description: The frequency with which the delayed worker that checks the
1716-
read_timeouts is awakened.
1717-
1718-
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/inflight_map_req
1719-
Date: February 2021
1720-
Contact: Avri Altman <avri.altman@wdc.com>
1721-
Description: In host control mode the host is the originator of map requests.
1722-
To avoid flooding the device with map requests, use a simple throttling
1723-
mechanism that limits the number of inflight map requests.

Documentation/scsi/scsi_mid_low_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,11 +1190,11 @@ Members of interest:
11901190
- pointer to scsi_device object that this command is
11911191
associated with.
11921192
resid
1193-
- an LLD should set this signed integer to the requested
1193+
- an LLD should set this unsigned integer to the requested
11941194
transfer length (i.e. 'request_bufflen') less the number
11951195
of bytes that are actually transferred. 'resid' is
11961196
preset to 0 so an LLD can ignore it if it cannot detect
1197-
underruns (overruns should be rare). If possible an LLD
1197+
underruns (overruns should not be reported). An LLD
11981198
should set 'resid' prior to invoking 'done'. The most
11991199
interesting case is data transfers from a SCSI target
12001200
device (e.g. READs) that underrun.

drivers/infiniband/ulp/srp/ib_srp.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,12 +1979,8 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)
19791979

19801980
if (unlikely(rsp->flags & SRP_RSP_FLAG_DIUNDER))
19811981
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
1982-
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DIOVER))
1983-
scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_in_res_cnt));
19841982
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DOUNDER))
19851983
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_out_res_cnt));
1986-
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DOOVER))
1987-
scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_out_res_cnt));
19881984

19891985
srp_free_req(ch, req, scmnd,
19901986
be32_to_cpu(rsp->req_lim_delta));

drivers/scsi/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ config SCSI_IMM
836836

837837
config SCSI_IZIP_EPP16
838838
bool "ppa/imm option - Use slow (but safe) EPP-16"
839-
depends on SCSI_PPA || SCSI_IMM
839+
depends on SCSI_IMM
840840
help
841841
EPP (Enhanced Parallel Port) is a standard for parallel ports which
842842
allows them to act as expansion buses that can handle up to 64

drivers/scsi/aic7xxx/aicasm/Makefile

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,11 @@ $(OUTDIR)/aicdb.h:
6161
clean:
6262
rm -f $(clean-files)
6363

64-
# Create a dependency chain in generated files
65-
# to avoid concurrent invocations of the single
66-
# rule that builds them all.
67-
$(OUTDIR)/aicasm_gram.c: $(OUTDIR)/aicasm_gram.h
6864
$(OUTDIR)/aicasm_gram.c $(OUTDIR)/aicasm_gram.h: aicasm_gram.y
69-
$(YACC) $(YFLAGS) -b $(<:.y=) $<
70-
mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
71-
mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
72-
73-
# Create a dependency chain in generated files
74-
# to avoid concurrent invocations of the single
75-
# rule that builds them all.
76-
$(OUTDIR)/aicasm_macro_gram.c: $(OUTDIR)/aicasm_macro_gram.h
65+
$(YACC) $(YFLAGS) -b $(<:.y=) $< -o $(OUTDIR)/$(<:.y=.c)
66+
7767
$(OUTDIR)/aicasm_macro_gram.c $(OUTDIR)/aicasm_macro_gram.h: aicasm_macro_gram.y
78-
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
79-
mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
80-
mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
68+
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $< -o $(OUTDIR)/$(<:.y=.c)
8169

8270
$(OUTDIR)/aicasm_scan.c: aicasm_scan.l
8371
$(LEX) $(LFLAGS) -o $@ $<

drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include <stdlib.h>
5353
#include <string.h>
5454
#include <sysexits.h>
55+
#include <ctype.h>
5556

5657
#include "aicasm_symbol.h"
5758
#include "aicasm.h"

drivers/scsi/aic94xx/aic94xx_hwi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static int asd_get_user_sas_addr(struct asd_ha_struct *asd_ha)
2828
if (asd_ha->hw_prof.sas_addr[0])
2929
return 0;
3030

31-
return sas_request_addr(asd_ha->sas_ha.core.shost,
31+
return sas_request_addr(asd_ha->sas_ha.shost,
3232
asd_ha->hw_prof.sas_addr);
3333
}
3434

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

7474
sas_phy->enabled = 1;
75-
sas_phy->class = SAS;
7675
sas_phy->iproto = SAS_PROTOCOL_ALL;
7776
sas_phy->tproto = 0;
78-
sas_phy->type = PHY_TYPE_PHYSICAL;
7977
sas_phy->role = PHY_ROLE_INITIATOR;
8078
sas_phy->oob_mode = OOB_NOT_CONNECTED;
8179
sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN;

drivers/scsi/aic94xx/aic94xx_init.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ static int asd_register_sas_ha(struct asd_ha_struct *asd_ha)
667667
}
668668

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

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

689688
err = sas_unregister_ha(&asd_ha->sas_ha);
690689

691-
sas_remove_host(asd_ha->sas_ha.core.shost);
692-
scsi_host_put(asd_ha->sas_ha.core.shost);
690+
sas_remove_host(asd_ha->sas_ha.shost);
691+
scsi_host_put(asd_ha->sas_ha.shost);
693692

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

741740
SHOST_TO_SAS_HA(shost) = &asd_ha->sas_ha;
742-
asd_ha->sas_ha.core.shost = shost;
741+
asd_ha->sas_ha.shost = shost;
743742
shost->transportt = aic94xx_transport_template;
744743
shost->max_id = ~0;
745744
shost->max_lun = ~0;

0 commit comments

Comments
 (0)