Skip to content

Commit a9c9a6f

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: "This series consists of the usual driver updates (ufs, qla2xxx, target, smartpqi, lpfc, mpt3sas). The core change causing the most churn was replacing the command request field request with a macro, allowing us to offset map to it and remove the redundant field; the same was also done for the tag field. The most impactful change is the final removal of scsi_ioctl, which has been deprecated for over a decade" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (293 commits) scsi: ufs: Fix ufshcd_request_sense_async() for Samsung KLUFG8RHDA-B2D1 scsi: ufs: ufs-exynos: Fix static checker warning scsi: mpt3sas: Use the proper SCSI midlayer interfaces for PI scsi: lpfc: Use the proper SCSI midlayer interfaces for PI scsi: lpfc: Copyright updates for 14.0.0.1 patches scsi: lpfc: Update lpfc version to 14.0.0.1 scsi: lpfc: Add bsg support for retrieving adapter cmf data scsi: lpfc: Add cmf_info sysfs entry scsi: lpfc: Add debugfs support for cm framework buffers scsi: lpfc: Add support for maintaining the cm statistics buffer scsi: lpfc: Add rx monitoring statistics scsi: lpfc: Add support for the CM framework scsi: lpfc: Add cmfsync WQE support scsi: lpfc: Add support for cm enablement buffer scsi: lpfc: Add cm statistics buffer support scsi: lpfc: Add EDC ELS support scsi: lpfc: Expand FPIN and RDF receive logging scsi: lpfc: Add MIB feature enablement support scsi: lpfc: Add SET_HOST_DATA mbox cmd to pass date/time info to firmware scsi: fc: Add EDC ELS definition ...
2 parents 23852be + 9b5ac8a commit a9c9a6f

File tree

217 files changed

+17400
-4075
lines changed

Some content is hidden

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

217 files changed

+17400
-4075
lines changed

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,3 +1298,239 @@ Description: This node is used to set or display whether UFS WriteBooster is
12981298
(if the platform supports UFSHCD_CAP_CLK_SCALING). For a
12991299
platform that doesn't support UFSHCD_CAP_CLK_SCALING, we can
13001300
disable/enable WriteBooster through this sysfs node.
1301+
1302+
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
1303+
Date: June 2021
1304+
Contact: Daejun Park <[email protected]>
1305+
Description: This entry shows the HPB specification version.
1306+
The full information about the descriptor can be found in the UFS
1307+
HPB (Host Performance Booster) Extension specifications.
1308+
Example: version 1.2.3 = 0123h
1309+
1310+
The file is read only.
1311+
1312+
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_control
1313+
Date: June 2021
1314+
Contact: Daejun Park <[email protected]>
1315+
Description: This entry shows an indication of the HPB control mode.
1316+
00h: Host control mode
1317+
01h: Device control mode
1318+
1319+
The file is read only.
1320+
1321+
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_region_size
1322+
Date: June 2021
1323+
Contact: Daejun Park <[email protected]>
1324+
Description: This entry shows the bHPBRegionSize which can be calculated
1325+
as in the following (in bytes):
1326+
HPB Region size = 512B * 2^bHPBRegionSize
1327+
1328+
The file is read only.
1329+
1330+
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
1331+
Date: June 2021
1332+
Contact: Daejun Park <[email protected]>
1333+
Description: This entry shows the maximum number of HPB LU supported by
1334+
the device.
1335+
00h: HPB is not supported by the device.
1336+
01h ~ 20h: Maximum number of HPB LU supported by the device
1337+
1338+
The file is read only.
1339+
1340+
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_subregion_size
1341+
Date: June 2021
1342+
Contact: Daejun Park <[email protected]>
1343+
Description: This entry shows the bHPBSubRegionSize, which can be
1344+
calculated as in the following (in bytes) and shall be a multiple of
1345+
logical block size:
1346+
HPB Sub-Region size = 512B x 2^bHPBSubRegionSize
1347+
bHPBSubRegionSize shall not exceed bHPBRegionSize.
1348+
1349+
The file is read only.
1350+
1351+
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_max_active_regions
1352+
Date: June 2021
1353+
Contact: Daejun Park <[email protected]>
1354+
Description: This entry shows the maximum number of active HPB regions that
1355+
is supported by the device.
1356+
1357+
The file is read only.
1358+
1359+
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_lu_max_active_regions
1360+
Date: June 2021
1361+
Contact: Daejun Park <[email protected]>
1362+
Description: This entry shows the maximum number of HPB regions assigned to
1363+
the HPB logical unit.
1364+
1365+
The file is read only.
1366+
1367+
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_pinned_region_start_offset
1368+
Date: June 2021
1369+
Contact: Daejun Park <[email protected]>
1370+
Description: This entry shows the start offset of HPB pinned region.
1371+
1372+
The file is read only.
1373+
1374+
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_number_pinned_regions
1375+
Date: June 2021
1376+
Contact: Daejun Park <[email protected]>
1377+
Description: This entry shows the number of HPB pinned regions assigned to
1378+
the HPB logical unit.
1379+
1380+
The file is read only.
1381+
1382+
What: /sys/class/scsi_device/*/device/hpb_stats/hit_cnt
1383+
Date: June 2021
1384+
Contact: Daejun Park <[email protected]>
1385+
Description: This entry shows the number of reads that changed to HPB read.
1386+
1387+
The file is read only.
1388+
1389+
What: /sys/class/scsi_device/*/device/hpb_stats/miss_cnt
1390+
Date: June 2021
1391+
Contact: Daejun Park <[email protected]>
1392+
Description: This entry shows the number of reads that cannot be changed to
1393+
HPB read.
1394+
1395+
The file is read only.
1396+
1397+
What: /sys/class/scsi_device/*/device/hpb_stats/rb_noti_cnt
1398+
Date: June 2021
1399+
Contact: Daejun Park <[email protected]>
1400+
Description: This entry shows the number of response UPIUs that has
1401+
recommendations for activating sub-regions and/or inactivating region.
1402+
1403+
The file is read only.
1404+
1405+
What: /sys/class/scsi_device/*/device/hpb_stats/rb_active_cnt
1406+
Date: June 2021
1407+
Contact: Daejun Park <[email protected]>
1408+
Description: This entry shows the number of active sub-regions recommended by
1409+
response UPIUs.
1410+
1411+
The file is read only.
1412+
1413+
What: /sys/class/scsi_device/*/device/hpb_stats/rb_inactive_cnt
1414+
Date: June 2021
1415+
Contact: Daejun Park <[email protected]>
1416+
Description: This entry shows the number of inactive regions recommended by
1417+
response UPIUs.
1418+
1419+
The file is read only.
1420+
1421+
What: /sys/class/scsi_device/*/device/hpb_stats/map_req_cnt
1422+
Date: June 2021
1423+
Contact: Daejun Park <[email protected]>
1424+
Description: This entry shows the number of read buffer commands for
1425+
activating sub-regions recommended by response UPIUs.
1426+
1427+
The file is read only.
1428+
1429+
What: /sys/class/scsi_device/*/device/hpb_params/requeue_timeout_ms
1430+
Date: June 2021
1431+
Contact: Daejun Park <[email protected]>
1432+
Description: This entry shows the requeue timeout threshold for write buffer
1433+
command in ms. The value can be changed by writing an integer to
1434+
this entry.
1435+
1436+
What: /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_size_hpb_single_cmd
1437+
Date: June 2021
1438+
Contact: Daejun Park <[email protected]>
1439+
Description: This entry shows the maximum HPB data size for using a single HPB
1440+
command.
1441+
1442+
=== ========
1443+
00h 4KB
1444+
01h 8KB
1445+
02h 12KB
1446+
...
1447+
FFh 1024KB
1448+
=== ========
1449+
1450+
The file is read only.
1451+
1452+
What: /sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable
1453+
Date: June 2021
1454+
Contact: Daejun Park <[email protected]>
1455+
Description: This entry shows the status of HPB.
1456+
1457+
== ============================
1458+
0 HPB is not enabled.
1459+
1 HPB is enabled
1460+
== ============================
1461+
1462+
The file is read only.
1463+
1464+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/activation_thld
1465+
Date: February 2021
1466+
Contact: Avri Altman <[email protected]>
1467+
Description: In host control mode, reads are the major source of activation
1468+
trials. Once this threshold hs met, the region is added to the
1469+
"to-be-activated" list. Since we reset the read counter upon
1470+
write, this include sending a rb command updating the region
1471+
ppn as well.
1472+
1473+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/normalization_factor
1474+
Date: February 2021
1475+
Contact: Avri Altman <[email protected]>
1476+
Description: In host control mode, we think of the regions as "buckets".
1477+
Those buckets are being filled with reads, and emptied on write.
1478+
We use entries_per_srgn - the amount of blocks in a subregion as
1479+
our bucket size. This applies because HPB1.0 only handles
1480+
single-block reads. Once the bucket size is crossed, we trigger
1481+
a normalization work - not only to avoid overflow, but mainly
1482+
because we want to keep those counters normalized, as we are
1483+
using those reads as a comparative score, to make various decisions.
1484+
The normalization is dividing (shift right) the read counter by
1485+
the normalization_factor. If during consecutive normalizations
1486+
an active region has exhausted its reads - inactivate it.
1487+
1488+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_enter
1489+
Date: February 2021
1490+
Contact: Avri Altman <[email protected]>
1491+
Description: Region deactivation is often due to the fact that eviction took
1492+
place: A region becomes active at the expense of another. This is
1493+
happening when the max-active-regions limit has been crossed.
1494+
In host mode, eviction is considered an extreme measure. We
1495+
want to verify that the entering region has enough reads, and
1496+
the exiting region has much fewer reads. eviction_thld_enter is
1497+
the min reads that a region must have in order to be considered
1498+
a candidate for evicting another region.
1499+
1500+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_exit
1501+
Date: February 2021
1502+
Contact: Avri Altman <[email protected]>
1503+
Description: Same as above for the exiting region. A region is considered to
1504+
be a candidate for eviction only if it has fewer reads than
1505+
eviction_thld_exit.
1506+
1507+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_ms
1508+
Date: February 2021
1509+
Contact: Avri Altman <[email protected]>
1510+
Description: In order not to hang on to "cold" regions, we inactivate
1511+
a region that has no READ access for a predefined amount of
1512+
time - read_timeout_ms. If read_timeout_ms has expired, and the
1513+
region is dirty, it is less likely that we can make any use of
1514+
HPB reading it so we inactivate it. Still, deactivation has
1515+
its overhead, and we may still benefit from HPB reading this
1516+
region if it is clean - see read_timeout_expiries.
1517+
1518+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_expiries
1519+
Date: February 2021
1520+
Contact: Avri Altman <[email protected]>
1521+
Description: If the region read timeout has expired, but the region is clean,
1522+
just re-wind its timer for another spin. Do that as long as it
1523+
is clean and did not exhaust its read_timeout_expiries threshold.
1524+
1525+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/timeout_polling_interval_ms
1526+
Date: February 2021
1527+
Contact: Avri Altman <[email protected]>
1528+
Description: The frequency with which the delayed worker that checks the
1529+
read_timeouts is awakened.
1530+
1531+
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/inflight_map_req
1532+
Date: February 2021
1533+
Contact: Avri Altman <[email protected]>
1534+
Description: In host control mode the host is the originator of map requests.
1535+
To avoid flooding the device with map requests, use a simple throttling
1536+
mechanism that limits the number of inflight map requests.

block/Kconfig

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,15 @@ if BLOCK
2929
config BLK_RQ_ALLOC_TIME
3030
bool
3131

32-
config BLK_SCSI_REQUEST
33-
bool
34-
3532
config BLK_CGROUP_RWSTAT
3633
bool
3734

38-
config BLK_DEV_BSG
39-
bool "Block layer SG support v4"
40-
default y
41-
select BLK_SCSI_REQUEST
42-
help
43-
Saying Y here will enable generic SG (SCSI generic) v4 support
44-
for any block device.
45-
46-
Unlike SG v3 (aka block/scsi_ioctl.c drivers/scsi/sg.c), SG v4
47-
can handle complicated SCSI commands: tagged variable length cdbs
48-
with bidirectional data transfers and generic request/response
49-
protocols (e.g. Task Management Functions and SMP in Serial
50-
Attached SCSI).
51-
52-
This option is required by recent UDEV versions to properly
53-
access device serial numbers, etc.
54-
55-
If unsure, say Y.
35+
config BLK_DEV_BSG_COMMON
36+
tristate
5637

5738
config BLK_DEV_BSGLIB
5839
bool "Block layer SG support v4 helper lib"
59-
select BLK_DEV_BSG
60-
select BLK_SCSI_REQUEST
40+
select BLK_DEV_BSG_COMMON
6141
help
6242
Subsystems will normally enable this if needed. Users will not
6343
normally need to manually enable this.

block/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-sysfs.o \
1212
disk-events.o
1313

1414
obj-$(CONFIG_BOUNCE) += bounce.o
15-
obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_ioctl.o
16-
obj-$(CONFIG_BLK_DEV_BSG) += bsg.o
15+
obj-$(CONFIG_BLK_DEV_BSG_COMMON) += bsg.o
1716
obj-$(CONFIG_BLK_DEV_BSGLIB) += bsg-lib.o
1817
obj-$(CONFIG_BLK_CGROUP) += blk-cgroup.o
1918
obj-$(CONFIG_BLK_CGROUP_RWSTAT) += blk-cgroup-rwstat.o

block/blk-mq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3280,8 +3280,6 @@ int blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
32803280
set->map[HCTX_TYPE_POLL].nr_queues)
32813281
blk_queue_flag_set(QUEUE_FLAG_POLL, q);
32823282

3283-
q->sg_reserved_size = INT_MAX;
3284-
32853283
INIT_DELAYED_WORK(&q->requeue_work, blk_mq_requeue_work);
32863284
INIT_LIST_HEAD(&q->requeue_list);
32873285
spin_lock_init(&q->requeue_lock);

0 commit comments

Comments
 (0)