History

Merge branch '6.5/scsi-fixes' into 6.6/scsi-staging

Pull in the fixes tree for a commit that missed 6.5. Also resolve a trivial merge conflict in fnic. * 6.5/scsi-fixes: (36 commits) scsi: storvsc: Handle additional SRB status values scsi: snic: Fix double free in snic_tgt_create() scsi: core: raid_class: Remove raid_component_add() scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5 scsi: ufs: mcq: Fix the search/wrap around logic scsi: qedf: Fix firmware halt over suspend and resume scsi: qedi: Fix firmware halt over suspend and resume scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock scsi: lpfc: Remove reftag check in DIF paths scsi: ufs: renesas: Fix private allocation scsi: snic: Fix possible memory leak if device_add() fails scsi: core: Fix possible memory leak if device_add() fails scsi: core: Fix legacy /proc parsing buffer overflow scsi: 53c700: Check that command slot is not NULL scsi: fnic: Replace return codes in fnic_clean_pending_aborts() scsi: storvsc: Fix handling of virtual Fibre Channel timeouts scsi: pm80xx: Fix error return code in pm8001_pci_probe() scsi: zfcp: Defer fc_rport blocking until after ADISC response scsi: storvsc: Limit max_sectors for virtual Fibre Channel devices scsi: sg: Fix checking return value of blk_get_queue() ...

Martin K. Petersen committed 3 years ago

Commit 58330d62 parents 15924b0 812fe6433 files · +282 −235Browse files

Unified · Split

33 files
  1. Documentation/ABI/testing/sysfs-driver-ufs +38 −38
  2. block/blk-zoned.c +50 −36
  3. drivers/block/null_blk/zoned.c +5 −11
  4. drivers/block/virtio_blk.c +15 −19
  5. drivers/nvme/host/zns.c +4 −5
  6. drivers/s390/scsi/zfcp_fc.c +1 −5
  7. drivers/scsi/53c700.c +1 −1
  8. drivers/scsi/aacraid/aacraid.h +1 −1
  9. drivers/scsi/fnic/fnic_scsi.c +4 −2
  10. drivers/scsi/fnic/fnic_trace.c +1 −1
  11. drivers/scsi/lpfc/lpfc_hbadisc.c +2 −0
  12. drivers/scsi/lpfc/lpfc_scsi.c +3 −17
  13. drivers/scsi/pm8001/pm8001_init.c +2 −1
  14. drivers/scsi/qedf/qedf_main.c +18 −0
  15. drivers/scsi/qedi/qedi_main.c +21 −2
  16. drivers/scsi/qla2xxx/qla_def.h +0 −1
  17. drivers/scsi/qla2xxx/qla_init.c +2 −2
  18. drivers/scsi/qla2xxx/qla_iocb.c +3 −2
  19. drivers/scsi/raid_class.c +0 −47
  20. drivers/scsi/scsi_debug.c +0 −8
  21. drivers/scsi/scsi_proc.c +17 −13
  22. drivers/scsi/sd_zbc.c +5 −7
  23. drivers/scsi/sg.c +4 −3
  24. drivers/scsi/snic/snic_disc.c +1 −1
  25. drivers/scsi/storvsc_drv.c +13 −4
  26. drivers/ufs/core/ufs-mcq.c +4 −2
  27. drivers/ufs/core/ufshcd.c +38 −0
  28. drivers/ufs/host/Kconfig +1 −0
  29. drivers/ufs/host/ufs-qcom.c +1 −1
  30. drivers/ufs/host/ufs-renesas.c +1 −1
  31. include/linux/raid_class.h +0 −4
  32. include/uapi/scsi/scsi_bsg_ufs.h +25 −0
  33. include/ufs/ufs.h +1 −0
Documentation/ABI/testing/sysfs-driver-ufs+38−38
@@ -994,7 +994,7 @@ Description: This file shows the amount of physical memory needed · 993 unmodified lines
994What: /sys/bus/platform/drivers/ufshcd/*/rpm_lvl994What: /sys/bus/platform/drivers/ufshcd/*/rpm_lvl
995What: /sys/bus/platform/devices/*.ufs/rpm_lvl995What: /sys/bus/platform/devices/*.ufs/rpm_lvl
996Date: September 2014996Date: September 2014
997Contact: Subhash Jadavani <subhashj@codeaurora.org>997Contact: Can Guo <quic_cang@quicinc.com>
998Description: This entry could be used to set or show the UFS device998Description: This entry could be used to set or show the UFS device
999 runtime power management level. The current driver999 runtime power management level. The current driver
1000 implementation supports 7 levels with next target states:1000 implementation supports 7 levels with next target states:
@@ -1021,7 +1021,7 @@ Description: This entry could be used to set or show the UFS device · 20 unmodified lines
1021What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_dev_state1021What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_dev_state
1022What: /sys/bus/platform/devices/*.ufs/rpm_target_dev_state1022What: /sys/bus/platform/devices/*.ufs/rpm_target_dev_state
1023Date: February 20181023Date: February 2018
1024Contact: Subhash Jadavani <subhashj@codeaurora.org>1024Contact: Can Guo <quic_cang@quicinc.com>
1025Description: This entry shows the target power mode of an UFS device1025Description: This entry shows the target power mode of an UFS device
1026 for the chosen runtime power management level.1026 for the chosen runtime power management level.
1027 1027
@@ -1030,7 +1030,7 @@ Description: This entry shows the target power mode of an UFS device · 2 unmodified lines
1030What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_link_state1030What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_link_state
1031What: /sys/bus/platform/devices/*.ufs/rpm_target_link_state1031What: /sys/bus/platform/devices/*.ufs/rpm_target_link_state
1032Date: February 20181032Date: February 2018
1033Contact: Subhash Jadavani <subhashj@codeaurora.org>1033Contact: Can Guo <quic_cang@quicinc.com>
1034Description: This entry shows the target state of an UFS UIC link1034Description: This entry shows the target state of an UFS UIC link
1035 for the chosen runtime power management level.1035 for the chosen runtime power management level.
1036 1036
@@ -1039,7 +1039,7 @@ Description: This entry shows the target state of an UFS UIC link · 2 unmodified lines
1039What: /sys/bus/platform/drivers/ufshcd/*/spm_lvl1039What: /sys/bus/platform/drivers/ufshcd/*/spm_lvl
1040What: /sys/bus/platform/devices/*.ufs/spm_lvl1040What: /sys/bus/platform/devices/*.ufs/spm_lvl
1041Date: September 20141041Date: September 2014
1042Contact: Subhash Jadavani <subhashj@codeaurora.org>1042Contact: Can Guo <quic_cang@quicinc.com>
1043Description: This entry could be used to set or show the UFS device1043Description: This entry could be used to set or show the UFS device
1044 system power management level. The current driver1044 system power management level. The current driver
1045 implementation supports 7 levels with next target states:1045 implementation supports 7 levels with next target states:
@@ -1066,7 +1066,7 @@ Description: This entry could be used to set or show the UFS device · 20 unmodified lines
1066What: /sys/bus/platform/drivers/ufshcd/*/spm_target_dev_state1066What: /sys/bus/platform/drivers/ufshcd/*/spm_target_dev_state
1067What: /sys/bus/platform/devices/*.ufs/spm_target_dev_state1067What: /sys/bus/platform/devices/*.ufs/spm_target_dev_state
1068Date: February 20181068Date: February 2018
1069Contact: Subhash Jadavani <subhashj@codeaurora.org>1069Contact: Can Guo <quic_cang@quicinc.com>
1070Description: This entry shows the target power mode of an UFS device1070Description: This entry shows the target power mode of an UFS device
1071 for the chosen system power management level.1071 for the chosen system power management level.
1072 1072
@@ -1075,7 +1075,7 @@ Description: This entry shows the target power mode of an UFS device · 2 unmodified lines
1075What: /sys/bus/platform/drivers/ufshcd/*/spm_target_link_state1075What: /sys/bus/platform/drivers/ufshcd/*/spm_target_link_state
1076What: /sys/bus/platform/devices/*.ufs/spm_target_link_state1076What: /sys/bus/platform/devices/*.ufs/spm_target_link_state
1077Date: February 20181077Date: February 2018
1078Contact: Subhash Jadavani <subhashj@codeaurora.org>1078Contact: Can Guo <quic_cang@quicinc.com>
1079Description: This entry shows the target state of an UFS UIC link1079Description: This entry shows the target state of an UFS UIC link
1080 for the chosen system power management level.1080 for the chosen system power management level.
1081 1081
@@ -1084,7 +1084,7 @@ Description: This entry shows the target state of an UFS UIC link · 2 unmodified lines
1084What: /sys/bus/platform/drivers/ufshcd/*/monitor/monitor_enable1084What: /sys/bus/platform/drivers/ufshcd/*/monitor/monitor_enable
1085What: /sys/bus/platform/devices/*.ufs/monitor/monitor_enable1085What: /sys/bus/platform/devices/*.ufs/monitor/monitor_enable
1086Date: January 20211086Date: January 2021
1087Contact: Can Guo <cang@codeaurora.org>1087Contact: Can Guo <quic_cang@quicinc.com>
1088Description: This file shows the status of performance monitor enablement1088Description: This file shows the status of performance monitor enablement
1089 and it can be used to start/stop the monitor. When the monitor1089 and it can be used to start/stop the monitor. When the monitor
1090 is stopped, the performance data collected is also cleared.1090 is stopped, the performance data collected is also cleared.
@@ -1092,7 +1092,7 @@ Description: This file shows the status of performance monitor enablement · 1 unmodified line
1092What: /sys/bus/platform/drivers/ufshcd/*/monitor/monitor_chunk_size1092What: /sys/bus/platform/drivers/ufshcd/*/monitor/monitor_chunk_size
1093What: /sys/bus/platform/devices/*.ufs/monitor/monitor_chunk_size1093What: /sys/bus/platform/devices/*.ufs/monitor/monitor_chunk_size
1094Date: January 20211094Date: January 2021
1095Contact: Can Guo <cang@codeaurora.org>1095Contact: Can Guo <quic_cang@quicinc.com>
1096Description: This file tells the monitor to focus on requests transferring1096Description: This file tells the monitor to focus on requests transferring
1097 data of specific chunk size (in Bytes). 0 means any chunk size.1097 data of specific chunk size (in Bytes). 0 means any chunk size.
1098 It can only be changed when monitor is disabled.1098 It can only be changed when monitor is disabled.
@@ -1100,7 +1100,7 @@ Description: This file tells the monitor to focus on requests transferring · 1 unmodified line
1100What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_total_sectors1100What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_total_sectors
1101What: /sys/bus/platform/devices/*.ufs/monitor/read_total_sectors1101What: /sys/bus/platform/devices/*.ufs/monitor/read_total_sectors
1102Date: January 20211102Date: January 2021
1103Contact: Can Guo <cang@codeaurora.org>1103Contact: Can Guo <quic_cang@quicinc.com>
1104Description: This file shows how many sectors (in 512 Bytes) have been1104Description: This file shows how many sectors (in 512 Bytes) have been
1105 sent from device to host after monitor gets started.1105 sent from device to host after monitor gets started.
1106 1106
@@ -1109,7 +1109,7 @@ Description: This file shows how many sectors (in 512 Bytes) have been · 2 unmodified lines
1109What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_total_busy1109What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_total_busy
1110What: /sys/bus/platform/devices/*.ufs/monitor/read_total_busy1110What: /sys/bus/platform/devices/*.ufs/monitor/read_total_busy
1111Date: January 20211111Date: January 2021
1112Contact: Can Guo <cang@codeaurora.org>1112Contact: Can Guo <quic_cang@quicinc.com>
1113Description: This file shows how long (in micro seconds) has been spent1113Description: This file shows how long (in micro seconds) has been spent
1114 sending data from device to host after monitor gets started.1114 sending data from device to host after monitor gets started.
1115 1115
@@ -1118,7 +1118,7 @@ Description: This file shows how long (in micro seconds) has been spent · 2 unmodified lines
1118What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_nr_requests1118What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_nr_requests
1119What: /sys/bus/platform/devices/*.ufs/monitor/read_nr_requests1119What: /sys/bus/platform/devices/*.ufs/monitor/read_nr_requests
1120Date: January 20211120Date: January 2021
1121Contact: Can Guo <cang@codeaurora.org>1121Contact: Can Guo <quic_cang@quicinc.com>
1122Description: This file shows how many read requests have been sent after1122Description: This file shows how many read requests have been sent after
1123 monitor gets started.1123 monitor gets started.
1124 1124
@@ -1127,7 +1127,7 @@ Description: This file shows how many read requests have been sent after · 2 unmodified lines
1127What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_max1127What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_max
1128What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_max1128What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_max
1129Date: January 20211129Date: January 2021
1130Contact: Can Guo <cang@codeaurora.org>1130Contact: Can Guo <quic_cang@quicinc.com>
1131Description: This file shows the maximum latency (in micro seconds) of1131Description: This file shows the maximum latency (in micro seconds) of
1132 read requests after monitor gets started.1132 read requests after monitor gets started.
1133 1133
@@ -1136,7 +1136,7 @@ Description: This file shows the maximum latency (in micro seconds) of · 2 unmodified lines
1136What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_min1136What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_min
1137What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_min1137What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_min
1138Date: January 20211138Date: January 2021
1139Contact: Can Guo <cang@codeaurora.org>1139Contact: Can Guo <quic_cang@quicinc.com>
1140Description: This file shows the minimum latency (in micro seconds) of1140Description: This file shows the minimum latency (in micro seconds) of
1141 read requests after monitor gets started.1141 read requests after monitor gets started.
1142 1142
@@ -1145,7 +1145,7 @@ Description: This file shows the minimum latency (in micro seconds) of · 2 unmodified lines
1145What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_avg1145What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_avg
1146What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_avg1146What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_avg
1147Date: January 20211147Date: January 2021
1148Contact: Can Guo <cang@codeaurora.org>1148Contact: Can Guo <quic_cang@quicinc.com>
1149Description: This file shows the average latency (in micro seconds) of1149Description: This file shows the average latency (in micro seconds) of
1150 read requests after monitor gets started.1150 read requests after monitor gets started.
1151 1151
@@ -1154,7 +1154,7 @@ Description: This file shows the average latency (in micro seconds) of · 2 unmodified lines
1154What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_sum1154What: /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_sum
1155What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_sum1155What: /sys/bus/platform/devices/*.ufs/monitor/read_req_latency_sum
1156Date: January 20211156Date: January 2021
1157Contact: Can Guo <cang@codeaurora.org>1157Contact: Can Guo <quic_cang@quicinc.com>
1158Description: This file shows the total latency (in micro seconds) of1158Description: This file shows the total latency (in micro seconds) of
1159 read requests sent after monitor gets started.1159 read requests sent after monitor gets started.
1160 1160
@@ -1163,7 +1163,7 @@ Description: This file shows the total latency (in micro seconds) of · 2 unmodified lines
1163What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_total_sectors1163What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_total_sectors
1164What: /sys/bus/platform/devices/*.ufs/monitor/write_total_sectors1164What: /sys/bus/platform/devices/*.ufs/monitor/write_total_sectors
1165Date: January 20211165Date: January 2021
1166Contact: Can Guo <cang@codeaurora.org>1166Contact: Can Guo <quic_cang@quicinc.com>
1167Description: This file shows how many sectors (in 512 Bytes) have been sent1167Description: This file shows how many sectors (in 512 Bytes) have been sent
1168 from host to device after monitor gets started.1168 from host to device after monitor gets started.
1169 1169
@@ -1172,7 +1172,7 @@ Description: This file shows how many sectors (in 512 Bytes) have been sent · 2 unmodified lines
1172What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_total_busy1172What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_total_busy
1173What: /sys/bus/platform/devices/*.ufs/monitor/write_total_busy1173What: /sys/bus/platform/devices/*.ufs/monitor/write_total_busy
1174Date: January 20211174Date: January 2021
1175Contact: Can Guo <cang@codeaurora.org>1175Contact: Can Guo <quic_cang@quicinc.com>
1176Description: This file shows how long (in micro seconds) has been spent1176Description: This file shows how long (in micro seconds) has been spent
1177 sending data from host to device after monitor gets started.1177 sending data from host to device after monitor gets started.
1178 1178
@@ -1181,7 +1181,7 @@ Description: This file shows how long (in micro seconds) has been spent · 2 unmodified lines
1181What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_nr_requests1181What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_nr_requests
1182What: /sys/bus/platform/devices/*.ufs/monitor/write_nr_requests1182What: /sys/bus/platform/devices/*.ufs/monitor/write_nr_requests
1183Date: January 20211183Date: January 2021
1184Contact: Can Guo <cang@codeaurora.org>1184Contact: Can Guo <quic_cang@quicinc.com>
1185Description: This file shows how many write requests have been sent after1185Description: This file shows how many write requests have been sent after
1186 monitor gets started.1186 monitor gets started.
1187 1187
@@ -1190,7 +1190,7 @@ Description: This file shows how many write requests have been sent after · 2 unmodified lines
1190What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_max1190What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_max
1191What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_max1191What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_max
1192Date: January 20211192Date: January 2021
1193Contact: Can Guo <cang@codeaurora.org>1193Contact: Can Guo <quic_cang@quicinc.com>
1194Description: This file shows the maximum latency (in micro seconds) of write1194Description: This file shows the maximum latency (in micro seconds) of write
1195 requests after monitor gets started.1195 requests after monitor gets started.
1196 1196
@@ -1199,7 +1199,7 @@ Description: This file shows the maximum latency (in micro seconds) of write · 2 unmodified lines
1199What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_min1199What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_min
1200What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_min1200What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_min
1201Date: January 20211201Date: January 2021
1202Contact: Can Guo <cang@codeaurora.org>1202Contact: Can Guo <quic_cang@quicinc.com>
1203Description: This file shows the minimum latency (in micro seconds) of write1203Description: This file shows the minimum latency (in micro seconds) of write
1204 requests after monitor gets started.1204 requests after monitor gets started.
1205 1205
@@ -1208,7 +1208,7 @@ Description: This file shows the minimum latency (in micro seconds) of write · 2 unmodified lines
1208What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_avg1208What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_avg
1209What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_avg1209What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_avg
1210Date: January 20211210Date: January 2021
1211Contact: Can Guo <cang@codeaurora.org>1211Contact: Can Guo <quic_cang@quicinc.com>
1212Description: This file shows the average latency (in micro seconds) of write1212Description: This file shows the average latency (in micro seconds) of write
1213 requests after monitor gets started.1213 requests after monitor gets started.
1214 1214
@@ -1217,7 +1217,7 @@ Description: This file shows the average latency (in micro seconds) of write · 2 unmodified lines
1217What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum1217What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
1218What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum1218What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum
1219Date: January 20211219Date: January 2021
1220Contact: Can Guo <cang@codeaurora.org>1220Contact: Can Guo <quic_cang@quicinc.com>
1221Description: This file shows the total latency (in micro seconds) of write1221Description: This file shows the total latency (in micro seconds) of write
1222 requests after monitor gets started.1222 requests after monitor gets started.
1223 1223
@@ -1226,7 +1226,7 @@ Description: This file shows the total latency (in micro seconds) of write · 2 unmodified lines
1226What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en1226What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en
1227What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_presv_us_en1227What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_presv_us_en
1228Date: June 20201228Date: June 2020
1229Contact: Asutosh Das <asutoshd@codeaurora.org>1229Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1230Description: This entry shows if preserve user-space was configured1230Description: This entry shows if preserve user-space was configured
1231 1231
1232 The file is read only.1232 The file is read only.
@@ -1234,7 +1234,7 @@ Description: This entry shows if preserve user-space was configured · 1 unmodified line
1234What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units1234What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units
1235What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_shared_alloc_units1235What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_shared_alloc_units
1236Date: June 20201236Date: June 2020
1237Contact: Asutosh Das <asutoshd@codeaurora.org>1237Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1238Description: This entry shows the shared allocated units of WB buffer1238Description: This entry shows the shared allocated units of WB buffer
1239 1239
1240 The file is read only.1240 The file is read only.
@@ -1242,7 +1242,7 @@ Description: This entry shows the shared allocated units of WB buffer · 1 unmodified line
1242What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type1242What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type
1243What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_type1243What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_type
1244Date: June 20201244Date: June 2020
1245Contact: Asutosh Das <asutoshd@codeaurora.org>1245Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1246Description: This entry shows the configured WB type.1246Description: This entry shows the configured WB type.
1247 0x1 for shared buffer mode. 0x0 for dedicated buffer mode.1247 0x1 for shared buffer mode. 0x0 for dedicated buffer mode.
1248 1248
@@ -1251,7 +1251,7 @@ Description: This entry shows the configured WB type. · 2 unmodified lines
1251What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj1251What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj
1252What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_buff_cap_adj1252What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_buff_cap_adj
1253Date: June 20201253Date: June 2020
1254Contact: Asutosh Das <asutoshd@codeaurora.org>1254Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1255Description: This entry shows the total user-space decrease in shared1255Description: This entry shows the total user-space decrease in shared
1256 buffer mode.1256 buffer mode.
1257 The value of this parameter is 3 for TLC NAND when SLC mode1257 The value of this parameter is 3 for TLC NAND when SLC mode
@@ -1262,7 +1262,7 @@ Description: This entry shows the total user-space decrease in shared · 4 unmodified lines
1262What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_units1262What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_units
1263What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_max_alloc_units1263What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_max_alloc_units
1264Date: June 20201264Date: June 2020
1265Contact: Asutosh Das <asutoshd@codeaurora.org>1265Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1266Description: This entry shows the Maximum total WriteBooster Buffer size1266Description: This entry shows the Maximum total WriteBooster Buffer size
1267 which is supported by the entire device.1267 which is supported by the entire device.
1268 1268
@@ -1271,7 +1271,7 @@ Description: This entry shows the Maximum total WriteBooster Buffer size · 2 unmodified lines
1271What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns1271What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns
1272What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_max_wb_luns1272What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_max_wb_luns
1273Date: June 20201273Date: June 2020
1274Contact: Asutosh Das <asutoshd@codeaurora.org>1274Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1275Description: This entry shows the maximum number of luns that can support1275Description: This entry shows the maximum number of luns that can support
1276 WriteBooster.1276 WriteBooster.
1277 1277
@@ -1280,7 +1280,7 @@ Description: This entry shows the maximum number of luns that can support · 2 unmodified lines
1280What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type1280What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type
1281What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_sup_red_type1281What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_sup_red_type
1282Date: June 20201282Date: June 2020
1283Contact: Asutosh Das <asutoshd@codeaurora.org>1283Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1284Description: The supportability of user space reduction mode1284Description: The supportability of user space reduction mode
1285 and preserve user space mode.1285 and preserve user space mode.
1286 00h: WriteBooster Buffer can be configured only in1286 00h: WriteBooster Buffer can be configured only in
@@ -1295,7 +1295,7 @@ Description: The supportability of user space reduction mode · 8 unmodified lines
1295What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type1295What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type
1296What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_sup_wb_type1296What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_sup_wb_type
1297Date: June 20201297Date: June 2020
1298Contact: Asutosh Das <asutoshd@codeaurora.org>1298Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1299Description: The supportability of WriteBooster Buffer type.1299Description: The supportability of WriteBooster Buffer type.
1300 1300
1301 === ==========================================================1301 === ==========================================================
@@ -1310,7 +1310,7 @@ Description: The supportability of WriteBooster Buffer type. · 8 unmodified lines
1310What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable1310What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable
1311What: /sys/bus/platform/devices/*.ufs/flags/wb_enable1311What: /sys/bus/platform/devices/*.ufs/flags/wb_enable
1312Date: June 20201312Date: June 2020
1313Contact: Asutosh Das <asutoshd@codeaurora.org>1313Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1314Description: This entry shows the status of WriteBooster.1314Description: This entry shows the status of WriteBooster.
1315 1315
1316 == ============================1316 == ============================
@@ -1323,7 +1323,7 @@ Description: This entry shows the status of WriteBooster. · 6 unmodified lines
1323What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en1323What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en
1324What: /sys/bus/platform/devices/*.ufs/flags/wb_flush_en1324What: /sys/bus/platform/devices/*.ufs/flags/wb_flush_en
1325Date: June 20201325Date: June 2020
1326Contact: Asutosh Das <asutoshd@codeaurora.org>1326Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1327Description: This entry shows if flush is enabled.1327Description: This entry shows if flush is enabled.
1328 1328
1329 == =================================1329 == =================================
@@ -1336,7 +1336,7 @@ Description: This entry shows if flush is enabled. · 6 unmodified lines
1336What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h81336What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h8
1337What: /sys/bus/platform/devices/*.ufs/flags/wb_flush_during_h81337What: /sys/bus/platform/devices/*.ufs/flags/wb_flush_during_h8
1338Date: June 20201338Date: June 2020
1339Contact: Asutosh Das <asutoshd@codeaurora.org>1339Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1340Description: Flush WriteBooster Buffer during hibernate state.1340Description: Flush WriteBooster Buffer during hibernate state.
1341 1341
1342 == =================================================1342 == =================================================
@@ -1351,7 +1351,7 @@ Description: Flush WriteBooster Buffer during hibernate state. · 8 unmodified lines
1351What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf1351What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf
1352What: /sys/bus/platform/devices/*.ufs/attributes/wb_avail_buf1352What: /sys/bus/platform/devices/*.ufs/attributes/wb_avail_buf
1353Date: June 20201353Date: June 2020
1354Contact: Asutosh Das <asutoshd@codeaurora.org>1354Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1355Description: This entry shows the amount of unused WriteBooster buffer1355Description: This entry shows the amount of unused WriteBooster buffer
1356 available.1356 available.
1357 1357
@@ -1360,7 +1360,7 @@ Description: This entry shows the amount of unused WriteBooster buffer · 2 unmodified lines
1360What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf1360What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf
1361What: /sys/bus/platform/devices/*.ufs/attributes/wb_cur_buf1361What: /sys/bus/platform/devices/*.ufs/attributes/wb_cur_buf
1362Date: June 20201362Date: June 2020
1363Contact: Asutosh Das <asutoshd@codeaurora.org>1363Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1364Description: This entry shows the amount of unused current buffer.1364Description: This entry shows the amount of unused current buffer.
1365 1365
1366 The file is read only.1366 The file is read only.
@@ -1368,7 +1368,7 @@ Description: This entry shows the amount of unused current buffer. · 1 unmodified line
1368What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status1368What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status
1369What: /sys/bus/platform/devices/*.ufs/attributes/wb_flush_status1369What: /sys/bus/platform/devices/*.ufs/attributes/wb_flush_status
1370Date: June 20201370Date: June 2020
1371Contact: Asutosh Das <asutoshd@codeaurora.org>1371Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1372Description: This entry shows the flush operation status.1372Description: This entry shows the flush operation status.
1373 1373
1374 1374
@@ -1385,7 +1385,7 @@ Description: This entry shows the flush operation status. · 10 unmodified lines
1385What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est1385What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est
1386What: /sys/bus/platform/devices/*.ufs/attributes/wb_life_time_est1386What: /sys/bus/platform/devices/*.ufs/attributes/wb_life_time_est
1387Date: June 20201387Date: June 2020
1388Contact: Asutosh Das <asutoshd@codeaurora.org>1388Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1389Description: This entry shows an indication of the WriteBooster Buffer1389Description: This entry shows an indication of the WriteBooster Buffer
1390 lifetime based on the amount of performed program/erase cycles1390 lifetime based on the amount of performed program/erase cycles
1391 1391
@@ -1399,7 +1399,7 @@ Description: This entry shows an indication of the WriteBooster Buffer · 7 unmodified lines
1399 1399
1400What: /sys/class/scsi_device/*/device/unit_descriptor/wb_buf_alloc_units1400What: /sys/class/scsi_device/*/device/unit_descriptor/wb_buf_alloc_units
1401Date: June 20201401Date: June 2020
1402Contact: Asutosh Das <asutoshd@codeaurora.org>1402Contact: Asutosh Das <quic_asutoshd@quicinc.com>
1403Description: This entry shows the configured size of WriteBooster buffer.1403Description: This entry shows the configured size of WriteBooster buffer.
1404 0400h corresponds to 4GB.1404 0400h corresponds to 4GB.
1405 1405
block/blk-zoned.c+50−36
@@ -442,7 +442,6 @@ struct blk_revalidate_zone_args { · 441 unmodified lines
442 unsigned long *conv_zones_bitmap;442 unsigned long *conv_zones_bitmap;
443 unsigned long *seq_zones_wlock;443 unsigned long *seq_zones_wlock;
444 unsigned int nr_zones;444 unsigned int nr_zones;
445 sector_t zone_sectors;
446 sector_t sector;445 sector_t sector;
447};446};
448 447
@@ -456,38 +455,34 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx, · 7 unmodified lines
456 struct gendisk *disk = args->disk;455 struct gendisk *disk = args->disk;
457 struct request_queue *q = disk->queue;456 struct request_queue *q = disk->queue;
458 sector_t capacity = get_capacity(disk);457 sector_t capacity = get_capacity(disk);
458 sector_t zone_sectors = q->limits.chunk_sectors;
459
460 /* Check for bad zones and holes in the zone report */
461 if (zone->start != args->sector) {
462 pr_warn("%s: Zone gap at sectors %llu..%llu\n",
463 disk->disk_name, args->sector, zone->start);
464 return -ENODEV;
465 }
466
467 if (zone->start >= capacity || !zone->len) {
468 pr_warn("%s: Invalid zone start %llu, length %llu\n",
469 disk->disk_name, zone->start, zone->len);
470 return -ENODEV;
471 }
459 472
460 /*473 /*
461 * All zones must have the same size, with the exception on an eventual474 * All zones must have the same size, with the exception on an eventual
462 * smaller last zone.475 * smaller last zone.
463 */476 */
464 if (zone->start == 0) {477 if (zone->start + zone->len < capacity) {
465 if (zone->len == 0 || !is_power_of_2(zone->len)) {478 if (zone->len != zone_sectors) {
466 pr_warn("%s: Invalid zoned device with non power of two zone size (%llu)\n",
467 disk->disk_name, zone->len);
468 return -ENODEV;
469 }
470
471 args->zone_sectors = zone->len;
472 args->nr_zones = (capacity + zone->len - 1) >> ilog2(zone->len);
473 } else if (zone->start + args->zone_sectors < capacity) {
474 if (zone->len != args->zone_sectors) {
475 pr_warn("%s: Invalid zoned device with non constant zone size\n",479 pr_warn("%s: Invalid zoned device with non constant zone size\n",
476 disk->disk_name);480 disk->disk_name);
477 return -ENODEV;481 return -ENODEV;
478 }482 }
479 } else {483 } else if (zone->len > zone_sectors) {
480 if (zone->len > args->zone_sectors) {484 pr_warn("%s: Invalid zoned device with larger last zone size\n",
481 pr_warn("%s: Invalid zoned device with larger last zone size\n",485 disk->disk_name);
482 disk->disk_name);
483 return -ENODEV;
484 }
485 }
486
487 /* Check for holes in the zone report */
488 if (zone->start != args->sector) {
489 pr_warn("%s: Zone gap at sectors %llu..%llu\n",
490 disk->disk_name, args->sector, zone->start);
491 return -ENODEV;486 return -ENODEV;
492 }487 }
493 488
@@ -526,11 +521,13 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx, · 32 unmodified lines
526 * @disk: Target disk521 * @disk: Target disk
527 * @update_driver_data: Callback to update driver data on the frozen disk522 * @update_driver_data: Callback to update driver data on the frozen disk
528 *523 *
529 * Helper function for low-level device drivers to (re) allocate and initialize524 * Helper function for low-level device drivers to check and (re) allocate and
530 * a disk request queue zone bitmaps. This functions should normally be called525 * initialize a disk request queue zone bitmaps. This functions should normally
531 * within the disk ->revalidate method for blk-mq based drivers. For BIO based526 * be called within the disk ->revalidate method for blk-mq based drivers.
532 * drivers only q->nr_zones needs to be updated so that the sysfs exposed value527 * Before calling this function, the device driver must already have set the
533 * is correct.528 * device zone size (chunk_sector limit) and the max zone append limit.
529 * For BIO based drivers, this function cannot be used. BIO based device drivers
530 * only need to set disk->nr_zones so that the sysfs exposed value is correct.
534 * If the @update_driver_data callback function is not NULL, the callback is531 * If the @update_driver_data callback function is not NULL, the callback is
535 * executed with the device request queue frozen after all zones have been532 * executed with the device request queue frozen after all zones have been
536 * checked.533 * checked.
@@ -539,9 +536,9 @@ int blk_revalidate_disk_zones(struct gendisk *disk, · 2 unmodified lines
539 void (*update_driver_data)(struct gendisk *disk))536 void (*update_driver_data)(struct gendisk *disk))
540{537{
541 struct request_queue *q = disk->queue;538 struct request_queue *q = disk->queue;
542 struct blk_revalidate_zone_args args = {539 sector_t zone_sectors = q->limits.chunk_sectors;
543 .disk = disk,540 sector_t capacity = get_capacity(disk);
544 };541 struct blk_revalidate_zone_args args = { };
545 unsigned int noio_flag;542 unsigned int noio_flag;
546 int ret;543 int ret;
547 544
@@ -550,13 +547,31 @@ int blk_revalidate_disk_zones(struct gendisk *disk, · 2 unmodified lines
550 if (WARN_ON_ONCE(!queue_is_mq(q)))547 if (WARN_ON_ONCE(!queue_is_mq(q)))
551 return -EIO;548 return -EIO;
552 549
553 if (!get_capacity(disk))550 if (!capacity)
554 return -EIO;551 return -ENODEV;
552
553 /*
554 * Checks that the device driver indicated a valid zone size and that
555 * the max zone append limit is set.
556 */
557 if (!zone_sectors || !is_power_of_2(zone_sectors)) {
558 pr_warn("%s: Invalid non power of two zone size (%llu)\n",
559 disk->disk_name, zone_sectors);
560 return -ENODEV;
561 }
562
563 if (!q->limits.max_zone_append_sectors) {
564 pr_warn("%s: Invalid 0 maximum zone append limit\n",
565 disk->disk_name);
566 return -ENODEV;
567 }
555 568
556 /*569 /*
557 * Ensure that all memory allocations in this context are done as if570 * Ensure that all memory allocations in this context are done as if
558 * GFP_NOIO was specified.571 * GFP_NOIO was specified.
559 */572 */
573 args.disk = disk;
574 args.nr_zones = (capacity + zone_sectors - 1) >> ilog2(zone_sectors);
560 noio_flag = memalloc_noio_save();575 noio_flag = memalloc_noio_save();
561 ret = disk->fops->report_zones(disk, 0, UINT_MAX,576 ret = disk->fops->report_zones(disk, 0, UINT_MAX,
562 blk_revalidate_zone_cb, &args);577 blk_revalidate_zone_cb, &args);
@@ -570,7 +585,7 @@ int blk_revalidate_disk_zones(struct gendisk *disk, · 7 unmodified lines
570 * If zones where reported, make sure that the entire disk capacity585 * If zones where reported, make sure that the entire disk capacity
571 * has been checked.586 * has been checked.
572 */587 */
573 if (ret > 0 && args.sector != get_capacity(disk)) {588 if (ret > 0 && args.sector != capacity) {
574 pr_warn("%s: Missing zones from sector %llu\n",589 pr_warn("%s: Missing zones from sector %llu\n",
575 disk->disk_name, args.sector);590 disk->disk_name, args.sector);
576 ret = -ENODEV;591 ret = -ENODEV;
@@ -583,7 +598,6 @@ int blk_revalidate_disk_zones(struct gendisk *disk, · 6 unmodified lines
583 */598 */
584 blk_mq_freeze_queue(q);599 blk_mq_freeze_queue(q);
585 if (ret > 0) {600 if (ret > 0) {
586 blk_queue_chunk_sectors(q, args.zone_sectors);
587 disk->nr_zones = args.nr_zones;601 disk->nr_zones = args.nr_zones;
588 swap(disk->seq_zones_wlock, args.seq_zones_wlock);602 swap(disk->seq_zones_wlock, args.seq_zones_wlock);
589 swap(disk->conv_zones_bitmap, args.conv_zones_bitmap);603 swap(disk->conv_zones_bitmap, args.conv_zones_bitmap);
drivers/block/null_blk/zoned.c+5−11
@@ -162,21 +162,15 @@ int null_register_zoned_dev(struct nullb *nullb) · 161 unmodified lines
162 disk_set_zoned(nullb->disk, BLK_ZONED_HM);162 disk_set_zoned(nullb->disk, BLK_ZONED_HM);
163 blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);163 blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);
164 blk_queue_required_elevator_features(q, ELEVATOR_F_ZBD_SEQ_WRITE);164 blk_queue_required_elevator_features(q, ELEVATOR_F_ZBD_SEQ_WRITE);
165 165 blk_queue_chunk_sectors(q, dev->zone_size_sects);
166 if (queue_is_mq(q)) {166 nullb->disk->nr_zones = bdev_nr_zones(nullb->disk->part0);
167 int ret = blk_revalidate_disk_zones(nullb->disk, NULL);
168
169 if (ret)
170 return ret;
171 } else {
172 blk_queue_chunk_sectors(q, dev->zone_size_sects);
173 nullb->disk->nr_zones = bdev_nr_zones(nullb->disk->part0);
174 }
175
176 blk_queue_max_zone_append_sectors(q, dev->zone_size_sects);167 blk_queue_max_zone_append_sectors(q, dev->zone_size_sects);
177 disk_set_max_open_zones(nullb->disk, dev->zone_max_open);168 disk_set_max_open_zones(nullb->disk, dev->zone_max_open);
178 disk_set_max_active_zones(nullb->disk, dev->zone_max_active);169 disk_set_max_active_zones(nullb->disk, dev->zone_max_active);
179 170
171 if (queue_is_mq(q))
172 return blk_revalidate_disk_zones(nullb->disk, NULL);
173
180 return 0;174 return 0;
181}175}
182 176
drivers/block/virtio_blk.c+15−19
@@ -751,7 +751,6 @@ static int virtblk_probe_zoned_device(struct virtio_device *vdev, · 750 unmodified lines
751{751{
752 u32 v, wg;752 u32 v, wg;
753 u8 model;753 u8 model;
754 int ret;
755 754
756 virtio_cread(vdev, struct virtio_blk_config,755 virtio_cread(vdev, struct virtio_blk_config,
757 zoned.model, &model);756 zoned.model, &model);
@@ -806,6 +805,7 @@ static int virtblk_probe_zoned_device(struct virtio_device *vdev, · 48 unmodified lines
806 vblk->zone_sectors);805 vblk->zone_sectors);
807 return -ENODEV;806 return -ENODEV;
808 }807 }
808 blk_queue_chunk_sectors(q, vblk->zone_sectors);
809 dev_dbg(&vdev->dev, "zone sectors = %u\n", vblk->zone_sectors);809 dev_dbg(&vdev->dev, "zone sectors = %u\n", vblk->zone_sectors);
810 810
811 if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) {811 if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) {
@@ -814,26 +814,22 @@ static int virtblk_probe_zoned_device(struct virtio_device *vdev, · 2 unmodified lines
814 blk_queue_max_discard_sectors(q, 0);814 blk_queue_max_discard_sectors(q, 0);
815 }815 }
816 816
817 ret = blk_revalidate_disk_zones(vblk->disk, NULL);817 virtio_cread(vdev, struct virtio_blk_config,
818 if (!ret) {818 zoned.max_append_sectors, &v);
819 virtio_cread(vdev, struct virtio_blk_config,819 if (!v) {
820 zoned.max_append_sectors, &v);820 dev_warn(&vdev->dev, "zero max_append_sectors reported\n");
821 if (!v) {821 return -ENODEV;
822 dev_warn(&vdev->dev, "zero max_append_sectors reported\n");822 }
823 return -ENODEV;823 if ((v << SECTOR_SHIFT) < wg) {
824 }824 dev_err(&vdev->dev,
825 if ((v << SECTOR_SHIFT) < wg) {825 "write granularity %u exceeds max_append_sectors %u limit\n",
826 dev_err(&vdev->dev,826 wg, v);
827 "write granularity %u exceeds max_append_sectors %u limit\n",827 return -ENODEV;
828 wg, v);
829 return -ENODEV;
830 }
831
832 blk_queue_max_zone_append_sectors(q, v);
833 dev_dbg(&vdev->dev, "max append sectors = %u\n", v);
834 }828 }
829 blk_queue_max_zone_append_sectors(q, v);
830 dev_dbg(&vdev->dev, "max append sectors = %u\n", v);
835 831
836 return ret;832 return blk_revalidate_disk_zones(vblk->disk, NULL);
837}833}
838 834
839#else835#else
drivers/nvme/host/zns.c+4−5
@@ -10,12 +10,11 @@ · 9 unmodified lines
10int nvme_revalidate_zones(struct nvme_ns *ns)10int nvme_revalidate_zones(struct nvme_ns *ns)
11{11{
12 struct request_queue *q = ns->queue;12 struct request_queue *q = ns->queue;
13 int ret;
14 13
15 ret = blk_revalidate_disk_zones(ns->disk, NULL);14 blk_queue_chunk_sectors(q, ns->zsze);
16 if (!ret)15 blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append);
17 blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append);16
18 return ret;17 return blk_revalidate_disk_zones(ns->disk, NULL);
19}18}
20 19
21static int nvme_set_max_append(struct nvme_ctrl *ctrl)20static int nvme_set_max_append(struct nvme_ctrl *ctrl)
drivers/s390/scsi/zfcp_fc.c+1−5
@@ -534,8 +534,7 @@ static void zfcp_fc_adisc_handler(void *data) · 533 unmodified lines
534 534
535 /* re-init to undo drop from zfcp_fc_adisc() */535 /* re-init to undo drop from zfcp_fc_adisc() */
536 port->d_id = ntoh24(adisc_resp->adisc_port_id);536 port->d_id = ntoh24(adisc_resp->adisc_port_id);
537 /* port is good, unblock rport without going through erp */537 /* port is still good, nothing to do */
538 zfcp_scsi_schedule_rport_register(port);
539 out:538 out:
540 atomic_andnot(ZFCP_STATUS_PORT_LINK_TEST, &port->status);539 atomic_andnot(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
541 put_device(&port->dev);540 put_device(&port->dev);
@@ -595,9 +594,6 @@ void zfcp_fc_link_test_work(struct work_struct *work) · 53 unmodified lines
595 int retval;594 int retval;
596 595
597 set_worker_desc("zadisc%16llx", port->wwpn); /* < WORKER_DESC_LEN=24 */596 set_worker_desc("zadisc%16llx", port->wwpn); /* < WORKER_DESC_LEN=24 */
598 get_device(&port->dev);
599 port->rport_task = RPORT_DEL;
600 zfcp_scsi_rport_work(&port->rport_work);
601 597
602 /* only issue one test command at one time per port */598 /* only issue one test command at one time per port */
603 if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)599 if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)
drivers/scsi/53c700.c+1−1
@@ -1598,7 +1598,7 @@ NCR_700_intr(int irq, void *dev_id) · 1597 unmodified lines
1598 printk("scsi%d (%d:%d) PHASE MISMATCH IN SEND MESSAGE %d remain, return %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sbcl_to_string(NCR_700_readb(host, SBCL_REG)));1598 printk("scsi%d (%d:%d) PHASE MISMATCH IN SEND MESSAGE %d remain, return %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sbcl_to_string(NCR_700_readb(host, SBCL_REG)));
1599#endif1599#endif
1600 resume_offset = hostdata->pScript + Ent_SendMessagePhaseMismatch;1600 resume_offset = hostdata->pScript + Ent_SendMessagePhaseMismatch;
1601 } else if(dsp >= to32bit(&slot->pSG[0].ins) &&1601 } else if (slot && dsp >= to32bit(&slot->pSG[0].ins) &&
1602 dsp <= to32bit(&slot->pSG[NCR_700_SG_SEGMENTS].ins)) {1602 dsp <= to32bit(&slot->pSG[NCR_700_SG_SEGMENTS].ins)) {
1603 int data_transfer = NCR_700_readl(host, DBC_REG) & 0xffffff;1603 int data_transfer = NCR_700_readl(host, DBC_REG) & 0xffffff;
1604 int SGcount = (dsp - to32bit(&slot->pSG[0].ins))/sizeof(struct NCR_700_SG_List);1604 int SGcount = (dsp - to32bit(&slot->pSG[0].ins))/sizeof(struct NCR_700_SG_List);
drivers/scsi/aacraid/aacraid.h+1−1
@@ -2618,7 +2618,7 @@ struct aac_hba_info { · 2617 unmodified lines
2618struct aac_aifcmd {2618struct aac_aifcmd {
2619 __le32 command; /* Tell host what type of notify this is */2619 __le32 command; /* Tell host what type of notify this is */
2620 __le32 seqnum; /* To allow ordering of reports (if necessary) */2620 __le32 seqnum; /* To allow ordering of reports (if necessary) */
2621 u8 data[1]; /* Undefined length (from kernel viewpoint) */2621 u8 data[]; /* Undefined length (from kernel viewpoint) */
2622};2622};
2623 2623
2624/**2624/**
drivers/scsi/fnic/fnic_scsi.c+4−2
@@ -2139,7 +2139,7 @@ static int fnic_clean_pending_aborts(struct fnic *fnic, · 2138 unmodified lines
2139 bool new_sc)2139 bool new_sc)
2140 2140
2141{2141{
2142 int ret = SUCCESS;2142 int ret = 0;
2143 struct fnic_pending_aborts_iter_data iter_data = {2143 struct fnic_pending_aborts_iter_data iter_data = {
2144 .fnic = fnic,2144 .fnic = fnic,
2145 .lun_dev = lr_sc->device,2145 .lun_dev = lr_sc->device,
@@ -2159,9 +2159,11 @@ static int fnic_clean_pending_aborts(struct fnic *fnic, · 13 unmodified lines
2159 2159
2160 /* walk again to check, if IOs are still pending in fw */2160 /* walk again to check, if IOs are still pending in fw */
2161 if (fnic_is_abts_pending(fnic, lr_sc))2161 if (fnic_is_abts_pending(fnic, lr_sc))
2162 ret = FAILED;2162 ret = 1;
2163 2163
2164clean_pending_aborts_end:2164clean_pending_aborts_end:
2165 FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host,
2166 "%s: exit status: %d\n", __func__, ret);
2165 return ret;2167 return ret;
2166}2168}
2167 2169
drivers/scsi/fnic/fnic_trace.c+1−1
@@ -465,7 +465,7 @@ int fnic_trace_buf_init(void) · 464 unmodified lines
465 fnic_max_trace_entries = (trace_max_pages * PAGE_SIZE)/465 fnic_max_trace_entries = (trace_max_pages * PAGE_SIZE)/
466 FNIC_ENTRY_SIZE_BYTES;466 FNIC_ENTRY_SIZE_BYTES;
467 467
468 fnic_trace_buf_p = (unsigned long)vzalloc(trace_max_pages * PAGE_SIZE);468 fnic_trace_buf_p = (unsigned long)vcalloc(trace_max_pages, PAGE_SIZE);
469 if (!fnic_trace_buf_p) {469 if (!fnic_trace_buf_p) {
470 printk(KERN_ERR PFX "Failed to allocate memory "470 printk(KERN_ERR PFX "Failed to allocate memory "
471 "for fnic_trace_buf_p\n");471 "for fnic_trace_buf_p\n");
drivers/scsi/lpfc/lpfc_hbadisc.c+2−0
@@ -6971,7 +6971,9 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba) · 6970 unmodified lines
6971 if (rc)6971 if (rc)
6972 return;6972 return;
6973 /* Reset HBA FCF states after successful unregister FCF */6973 /* Reset HBA FCF states after successful unregister FCF */
6974 spin_lock_irq(&phba->hbalock);
6974 phba->fcf.fcf_flag = 0;6975 phba->fcf.fcf_flag = 0;
6976 spin_unlock_irq(&phba->hbalock);
6975 phba->fcf.current_rec.flag = 0;6977 phba->fcf.current_rec.flag = 0;
6976 6978
6977 /*6979 /*
drivers/scsi/lpfc/lpfc_scsi.c+3−17
@@ -109,8 +109,6 @@ lpfc_sli4_set_rsp_sgl_last(struct lpfc_hba *phba, · 108 unmodified lines
109 }109 }
110}110}
111 111
112#define LPFC_INVALID_REFTAG ((u32)-1)
113
114/**112/**
115 * lpfc_rampdown_queue_depth - Post RAMP_DOWN_QUEUE event to worker thread113 * lpfc_rampdown_queue_depth - Post RAMP_DOWN_QUEUE event to worker thread
116 * @phba: The Hba for which this call is being executed.114 * @phba: The Hba for which this call is being executed.
@@ -978,8 +976,6 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 861 unmodified lines
978 976
979 sgpe = scsi_prot_sglist(sc);977 sgpe = scsi_prot_sglist(sc);
980 lba = scsi_prot_ref_tag(sc);978 lba = scsi_prot_ref_tag(sc);
981 if (lba == LPFC_INVALID_REFTAG)
982 return 0;
983 979
984 /* First check if we need to match the LBA */980 /* First check if we need to match the LBA */
985 if (phba->lpfc_injerr_lba != LPFC_INJERR_LBA_OFF) {981 if (phba->lpfc_injerr_lba != LPFC_INJERR_LBA_OFF) {
@@ -1560,8 +1556,6 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 574 unmodified lines
1560 1556
1561 /* extract some info from the scsi command for pde*/1557 /* extract some info from the scsi command for pde*/
1562 reftag = scsi_prot_ref_tag(sc);1558 reftag = scsi_prot_ref_tag(sc);
1563 if (reftag == LPFC_INVALID_REFTAG)
1564 goto out;
1565 1559
1566#ifdef CONFIG_SCSI_LPFC_DEBUG_FS1560#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
1567 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);1561 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
@@ -1723,8 +1717,6 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 155 unmodified lines
1723 /* extract some info from the scsi command */1717 /* extract some info from the scsi command */
1724 blksize = scsi_prot_interval(sc);1718 blksize = scsi_prot_interval(sc);
1725 reftag = scsi_prot_ref_tag(sc);1719 reftag = scsi_prot_ref_tag(sc);
1726 if (reftag == LPFC_INVALID_REFTAG)
1727 goto out;
1728 1720
1729#ifdef CONFIG_SCSI_LPFC_DEBUG_FS1721#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
1730 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);1722 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
@@ -1953,8 +1945,6 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 222 unmodified lines
1953 1945
1954 /* extract some info from the scsi command for pde*/1946 /* extract some info from the scsi command for pde*/
1955 reftag = scsi_prot_ref_tag(sc);1947 reftag = scsi_prot_ref_tag(sc);
1956 if (reftag == LPFC_INVALID_REFTAG)
1957 goto out;
1958 1948
1959#ifdef CONFIG_SCSI_LPFC_DEBUG_FS1949#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
1960 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);1950 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
@@ -2154,8 +2144,6 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 193 unmodified lines
2154 /* extract some info from the scsi command */2144 /* extract some info from the scsi command */
2155 blksize = scsi_prot_interval(sc);2145 blksize = scsi_prot_interval(sc);
2156 reftag = scsi_prot_ref_tag(sc);2146 reftag = scsi_prot_ref_tag(sc);
2157 if (reftag == LPFC_INVALID_REFTAG)
2158 goto out;
2159 2147
2160#ifdef CONFIG_SCSI_LPFC_DEBUG_FS2148#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
2161 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);2149 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
@@ -2746,8 +2734,6 @@ lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd) · 584 unmodified lines
2746 2734
2747 src = (struct scsi_dif_tuple *)sg_virt(sgpe);2735 src = (struct scsi_dif_tuple *)sg_virt(sgpe);
2748 start_ref_tag = scsi_prot_ref_tag(cmd);2736 start_ref_tag = scsi_prot_ref_tag(cmd);
2749 if (start_ref_tag == LPFC_INVALID_REFTAG)
2750 goto out;
2751 start_app_tag = src->app_tag;2737 start_app_tag = src->app_tag;
2752 len = sgpe->length;2738 len = sgpe->length;
2753 while (src && protsegcnt) {2739 while (src && protsegcnt) {
@@ -3493,11 +3479,11 @@ err: · 739 unmodified lines
3493 scsi_cmnd->sc_data_direction);3479 scsi_cmnd->sc_data_direction);
3494 3480
3495 lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,3481 lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
3496 "9084 Cannot setup S/G List for HBA"3482 "9084 Cannot setup S/G List for HBA "
3497 "IO segs %d/%d SGL %d SCSI %d: %d %d\n",3483 "IO segs %d/%d SGL %d SCSI %d: %d %d %d\n",
3498 lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt,3484 lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt,
3499 phba->cfg_total_seg_cnt, phba->cfg_sg_seg_cnt,3485 phba->cfg_total_seg_cnt, phba->cfg_sg_seg_cnt,
3500 prot_group_type, num_sge);3486 prot_group_type, num_sge, ret);
3501 3487
3502 lpfc_cmd->seg_cnt = 0;3488 lpfc_cmd->seg_cnt = 0;
3503 lpfc_cmd->prot_seg_cnt = 0;3489 lpfc_cmd->prot_seg_cnt = 0;
drivers/scsi/pm8001/pm8001_init.c+2−1
@@ -1178,7 +1178,8 @@ static int pm8001_pci_probe(struct pci_dev *pdev, · 1177 unmodified lines
1178 pm80xx_set_thermal_config(pm8001_ha);1178 pm80xx_set_thermal_config(pm8001_ha);
1179 }1179 }
1180 1180
1181 if (pm8001_init_sas_add(pm8001_ha))1181 rc = pm8001_init_sas_add(pm8001_ha);
1182 if (rc)
1182 goto err_out_shost;1183 goto err_out_shost;
1183 /* phy setting support for motherboard controller */1184 /* phy setting support for motherboard controller */
1184 rc = pm8001_configure_phy_settings(pm8001_ha);1185 rc = pm8001_configure_phy_settings(pm8001_ha);
drivers/scsi/qedf/qedf_main.c+18−0
@@ -31,6 +31,7 @@ static void qedf_remove(struct pci_dev *pdev); · 30 unmodified lines
31static void qedf_shutdown(struct pci_dev *pdev);31static void qedf_shutdown(struct pci_dev *pdev);
32static void qedf_schedule_recovery_handler(void *dev);32static void qedf_schedule_recovery_handler(void *dev);
33static void qedf_recovery_handler(struct work_struct *work);33static void qedf_recovery_handler(struct work_struct *work);
34static int qedf_suspend(struct pci_dev *pdev, pm_message_t state);
34 35
35/*36/*
36 * Driver module parameters.37 * Driver module parameters.
@@ -3271,6 +3272,7 @@ static struct pci_driver qedf_pci_driver = { · 3234 unmodified lines
3271 .probe = qedf_probe,3272 .probe = qedf_probe,
3272 .remove = qedf_remove,3273 .remove = qedf_remove,
3273 .shutdown = qedf_shutdown,3274 .shutdown = qedf_shutdown,
3275 .suspend = qedf_suspend,
3274};3276};
3275 3277
3276static int __qedf_probe(struct pci_dev *pdev, int mode)3278static int __qedf_probe(struct pci_dev *pdev, int mode)
@@ -4000,6 +4002,22 @@ static void qedf_shutdown(struct pci_dev *pdev) · 723 unmodified lines
4000 __qedf_remove(pdev, QEDF_MODE_NORMAL);4002 __qedf_remove(pdev, QEDF_MODE_NORMAL);
4001}4003}
4002 4004
4005static int qedf_suspend(struct pci_dev *pdev, pm_message_t state)
4006{
4007 struct qedf_ctx *qedf;
4008
4009 if (!pdev) {
4010 QEDF_ERR(NULL, "pdev is NULL.\n");
4011 return -ENODEV;
4012 }
4013
4014 qedf = pci_get_drvdata(pdev);
4015
4016 QEDF_ERR(&qedf->dbg_ctx, "%s: Device does not support suspend operation\n", __func__);
4017
4018 return -EPERM;
4019}
4020
4003/*4021/*
4004 * Recovery handler code4022 * Recovery handler code
4005 */4023 */
drivers/scsi/qedi/qedi_main.c+21−2
@@ -69,6 +69,7 @@ static struct nvm_iscsi_block *qedi_get_nvram_block(struct qedi_ctx *qedi); · 68 unmodified lines
69static void qedi_recovery_handler(struct work_struct *work);69static void qedi_recovery_handler(struct work_struct *work);
70static void qedi_schedule_hw_err_handler(void *dev,70static void qedi_schedule_hw_err_handler(void *dev,
71 enum qed_hw_err_type err_type);71 enum qed_hw_err_type err_type);
72static int qedi_suspend(struct pci_dev *pdev, pm_message_t state);
72 73
73static int qedi_iscsi_event_cb(void *context, u8 fw_event_code, void *fw_handle)74static int qedi_iscsi_event_cb(void *context, u8 fw_event_code, void *fw_handle)
74{75{
@@ -1976,8 +1977,9 @@ static int qedi_cpu_offline(unsigned int cpu) · 1901 unmodified lines
1976 struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu);1977 struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu);
1977 struct qedi_work *work, *tmp;1978 struct qedi_work *work, *tmp;
1978 struct task_struct *thread;1979 struct task_struct *thread;
1980 unsigned long flags;
1979 1981
1980 spin_lock_bh(&p->p_work_lock);1982 spin_lock_irqsave(&p->p_work_lock, flags);
1981 thread = p->iothread;1983 thread = p->iothread;
1982 p->iothread = NULL;1984 p->iothread = NULL;
1983 1985
@@ -1988,7 +1990,7 @@ static int qedi_cpu_offline(unsigned int cpu) · 4 unmodified lines
1988 kfree(work);1990 kfree(work);
1989 }1991 }
1990 1992
1991 spin_unlock_bh(&p->p_work_lock);1993 spin_unlock_irqrestore(&p->p_work_lock, flags);
1992 if (thread)1994 if (thread)
1993 kthread_stop(thread);1995 kthread_stop(thread);
1994 return 0;1996 return 0;
@@ -2510,6 +2512,22 @@ static void qedi_shutdown(struct pci_dev *pdev) · 515 unmodified lines
2510 __qedi_remove(pdev, QEDI_MODE_SHUTDOWN);2512 __qedi_remove(pdev, QEDI_MODE_SHUTDOWN);
2511}2513}
2512 2514
2515static int qedi_suspend(struct pci_dev *pdev, pm_message_t state)
2516{
2517 struct qedi_ctx *qedi;
2518
2519 if (!pdev) {
2520 QEDI_ERR(NULL, "pdev is NULL.\n");
2521 return -ENODEV;
2522 }
2523
2524 qedi = pci_get_drvdata(pdev);
2525
2526 QEDI_ERR(&qedi->dbg_ctx, "%s: Device does not support suspend operation\n", __func__);
2527
2528 return -EPERM;
2529}
2530
2513static int __qedi_probe(struct pci_dev *pdev, int mode)2531static int __qedi_probe(struct pci_dev *pdev, int mode)
2514{2532{
2515 struct qedi_ctx *qedi;2533 struct qedi_ctx *qedi;
@@ -2868,6 +2886,7 @@ static struct pci_driver qedi_pci_driver = { · 352 unmodified lines
2868 .remove = qedi_remove,2886 .remove = qedi_remove,
2869 .shutdown = qedi_shutdown,2887 .shutdown = qedi_shutdown,
2870 .err_handler = &qedi_err_handler,2888 .err_handler = &qedi_err_handler,
2889 .suspend = qedi_suspend,
2871};2890};
2872 2891
2873static int __init qedi_init(void)2892static int __init qedi_init(void)
drivers/scsi/qla2xxx/qla_def.h+0−1
@@ -4502,7 +4502,6 @@ struct qla_hw_data { · 4501 unmodified lines
4502 4502
4503 /* n2n */4503 /* n2n */
4504 struct fc_els_flogi plogi_els_payld;4504 struct fc_els_flogi plogi_els_payld;
4505#define LOGIN_TEMPLATE_SIZE (sizeof(struct fc_els_flogi) - 4)
4506 4505
4507 void *swl;4506 void *swl;
4508 4507
drivers/scsi/qla2xxx/qla_init.c+2−2
@@ -8499,7 +8499,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr, · 8498 unmodified lines
8499 ql_dbg(ql_dbg_init, vha, 0x0163,8499 ql_dbg(ql_dbg_init, vha, 0x0163,
8500 "-> fwdt%u template allocate template %#x words...\n",8500 "-> fwdt%u template allocate template %#x words...\n",
8501 j, risc_size);8501 j, risc_size);
8502 fwdt->template = vmalloc(risc_size * sizeof(*dcode));8502 fwdt->template = vmalloc_array(risc_size, sizeof(*dcode));
8503 if (!fwdt->template) {8503 if (!fwdt->template) {
8504 ql_log(ql_log_warn, vha, 0x0164,8504 ql_log(ql_log_warn, vha, 0x0164,
8505 "-> fwdt%u failed allocate template.\n", j);8505 "-> fwdt%u failed allocate template.\n", j);
@@ -8754,7 +8754,7 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) · 248 unmodified lines
8754 ql_dbg(ql_dbg_init, vha, 0x0173,8754 ql_dbg(ql_dbg_init, vha, 0x0173,
8755 "-> fwdt%u template allocate template %#x words...\n",8755 "-> fwdt%u template allocate template %#x words...\n",
8756 j, risc_size);8756 j, risc_size);
8757 fwdt->template = vmalloc(risc_size * sizeof(*dcode));8757 fwdt->template = vmalloc_array(risc_size, sizeof(*dcode));
8758 if (!fwdt->template) {8758 if (!fwdt->template) {
8759 ql_log(ql_log_warn, vha, 0x0174,8759 ql_log(ql_log_warn, vha, 0x0174,
8760 "-> fwdt%u failed allocate template.\n", j);8760 "-> fwdt%u failed allocate template.\n", j);
drivers/scsi/qla2xxx/qla_iocb.c+3−2
@@ -3072,7 +3072,8 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode, · 3071 unmodified lines
3072 memset(ptr, 0, sizeof(struct els_plogi_payload));3072 memset(ptr, 0, sizeof(struct els_plogi_payload));
3073 memset(resp_ptr, 0, sizeof(struct els_plogi_payload));3073 memset(resp_ptr, 0, sizeof(struct els_plogi_payload));
3074 memcpy(elsio->u.els_plogi.els_plogi_pyld->data,3074 memcpy(elsio->u.els_plogi.els_plogi_pyld->data,
3075 &ha->plogi_els_payld.fl_csp, LOGIN_TEMPLATE_SIZE);3075 (void *)&ha->plogi_els_payld + offsetof(struct fc_els_flogi, fl_csp),
3076 sizeof(ha->plogi_els_payld) - offsetof(struct fc_els_flogi, fl_csp));
3076 3077
3077 elsio->u.els_plogi.els_cmd = els_opcode;3078 elsio->u.els_plogi.els_cmd = els_opcode;
3078 elsio->u.els_plogi.els_plogi_pyld->opcode = els_opcode;3079 elsio->u.els_plogi.els_plogi_pyld->opcode = els_opcode;
@@ -3919,7 +3920,7 @@ qla2x00_start_sp(srb_t *sp) · 840 unmodified lines
3919 3920
3920 pkt = __qla2x00_alloc_iocbs(sp->qpair, sp);3921 pkt = __qla2x00_alloc_iocbs(sp->qpair, sp);
3921 if (!pkt) {3922 if (!pkt) {
3922 rval = EAGAIN;3923 rval = -EAGAIN;
3923 ql_log(ql_log_warn, vha, 0x700c,3924 ql_log(ql_log_warn, vha, 0x700c,
3924 "qla2x00_alloc_iocbs failed.\n");3925 "qla2x00_alloc_iocbs failed.\n");
3925 goto done;3926 goto done;
drivers/scsi/raid_class.c+0−47
@@ -209,53 +209,6 @@ raid_attr_ro_state(level); · 208 unmodified lines
209raid_attr_ro_fn(resync);209raid_attr_ro_fn(resync);
210raid_attr_ro_state_fn(state);210raid_attr_ro_state_fn(state);
211 211
212static void raid_component_release(struct device *dev)
213{
214 struct raid_component *rc =
215 container_of(dev, struct raid_component, dev);
216 dev_printk(KERN_ERR, rc->dev.parent, "COMPONENT RELEASE\n");
217 put_device(rc->dev.parent);
218 kfree(rc);
219}
220
221int raid_component_add(struct raid_template *r,struct device *raid_dev,
222 struct device *component_dev)
223{
224 struct device *cdev =
225 attribute_container_find_class_device(&r->raid_attrs.ac,
226 raid_dev);
227 struct raid_component *rc;
228 struct raid_data *rd = dev_get_drvdata(cdev);
229 int err;
230
231 rc = kzalloc(sizeof(*rc), GFP_KERNEL);
232 if (!rc)
233 return -ENOMEM;
234
235 INIT_LIST_HEAD(&rc->node);
236 device_initialize(&rc->dev);
237 rc->dev.release = raid_component_release;
238 rc->dev.parent = get_device(component_dev);
239 rc->num = rd->component_count++;
240
241 dev_set_name(&rc->dev, "component-%d", rc->num);
242 list_add_tail(&rc->node, &rd->component_list);
243 rc->dev.class = &raid_class.class;
244 err = device_add(&rc->dev);
245 if (err)
246 goto err_out;
247
248 return 0;
249
250err_out:
251 list_del(&rc->node);
252 rd->component_count--;
253 put_device(component_dev);
254 kfree(rc);
255 return err;
256}
257EXPORT_SYMBOL(raid_component_add);
258
259struct raid_template *212struct raid_template *
260raid_class_attach(struct raid_function_template *ft)213raid_class_attach(struct raid_function_template *ft)
261{214{
drivers/scsi/scsi_debug.c+0−8
@@ -841,11 +841,6 @@ static int sdeb_zbc_nr_conv = DEF_ZBC_NR_CONV_ZONES; · 840 unmodified lines
841static int submit_queues = DEF_SUBMIT_QUEUES; /* > 1 for multi-queue (mq) */841static int submit_queues = DEF_SUBMIT_QUEUES; /* > 1 for multi-queue (mq) */
842static int poll_queues; /* iouring iopoll interface.*/842static int poll_queues; /* iouring iopoll interface.*/
843 843
844static DEFINE_RWLOCK(atomic_rw);
845static DEFINE_RWLOCK(atomic_rw2);
846
847static rwlock_t *ramdisk_lck_a[2];
848
849static char sdebug_proc_name[] = MY_NAME;844static char sdebug_proc_name[] = MY_NAME;
850static const char *my_name = MY_NAME;845static const char *my_name = MY_NAME;
851 846
@@ -6818,9 +6813,6 @@ static int __init scsi_debug_init(void) · 5966 unmodified lines
6818 int k, ret, hosts_to_add;6813 int k, ret, hosts_to_add;
6819 int idx = -1;6814 int idx = -1;
6820 6815
6821 ramdisk_lck_a[0] = &atomic_rw;
6822 ramdisk_lck_a[1] = &atomic_rw2;
6823
6824 if (sdebug_ndelay >= 1000 * 1000 * 1000) {6816 if (sdebug_ndelay >= 1000 * 1000 * 1000) {
6825 pr_warn("ndelay must be less than 1 second, ignored\n");6817 pr_warn("ndelay must be less than 1 second, ignored\n");
6826 sdebug_ndelay = 0;6818 sdebug_ndelay = 0;
drivers/scsi/scsi_proc.c+17−13
@@ -406,7 +406,7 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, · 405 unmodified lines
406 size_t length, loff_t *ppos)406 size_t length, loff_t *ppos)
407{407{
408 int host, channel, id, lun;408 int host, channel, id, lun;
409 char *buffer, *p;409 char *buffer, *end, *p;
410 int err;410 int err;
411 411
412 if (!buf || length > PAGE_SIZE)412 if (!buf || length > PAGE_SIZE)
@@ -421,10 +421,14 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, · 8 unmodified lines
421 goto out;421 goto out;
422 422
423 err = -EINVAL;423 err = -EINVAL;
424 if (length < PAGE_SIZE)424 if (length < PAGE_SIZE) {
425 buffer[length] = '\0';425 end = buffer + length;
426 else if (buffer[PAGE_SIZE-1])426 *end = '\0';
427 goto out;427 } else {
428 end = buffer + PAGE_SIZE - 1;
429 if (*end)
430 goto out;
431 }
428 432
429 /*433 /*
430 * Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi434 * Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
@@ -433,10 +437,10 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, · 2 unmodified lines
433 if (!strncmp("scsi add-single-device", buffer, 22)) {437 if (!strncmp("scsi add-single-device", buffer, 22)) {
434 p = buffer + 23;438 p = buffer + 23;
435 439
436 host = simple_strtoul(p, &p, 0);440 host = (p < end) ? simple_strtoul(p, &p, 0) : 0;
437 channel = simple_strtoul(p + 1, &p, 0);441 channel = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0;
438 id = simple_strtoul(p + 1, &p, 0);442 id = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0;
439 lun = simple_strtoul(p + 1, &p, 0);443 lun = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0;
440 444
441 err = scsi_add_single_device(host, channel, id, lun);445 err = scsi_add_single_device(host, channel, id, lun);
442 446
@@ -447,10 +451,10 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, · 4 unmodified lines
447 } else if (!strncmp("scsi remove-single-device", buffer, 25)) {451 } else if (!strncmp("scsi remove-single-device", buffer, 25)) {
448 p = buffer + 26;452 p = buffer + 26;
449 453
450 host = simple_strtoul(p, &p, 0);454 host = (p < end) ? simple_strtoul(p, &p, 0) : 0;
451 channel = simple_strtoul(p + 1, &p, 0);455 channel = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0;
452 id = simple_strtoul(p + 1, &p, 0);456 id = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0;
453 lun = simple_strtoul(p + 1, &p, 0);457 lun = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0;
454 458
455 err = scsi_remove_single_device(host, channel, id, lun);459 err = scsi_remove_single_device(host, channel, id, lun);
456 }460 }
drivers/scsi/sd_zbc.c+5−7
@@ -831,7 +831,6 @@ int sd_zbc_revalidate_zones(struct scsi_disk *sdkp) · 830 unmodified lines
831 struct request_queue *q = disk->queue;831 struct request_queue *q = disk->queue;
832 u32 zone_blocks = sdkp->early_zone_info.zone_blocks;832 u32 zone_blocks = sdkp->early_zone_info.zone_blocks;
833 unsigned int nr_zones = sdkp->early_zone_info.nr_zones;833 unsigned int nr_zones = sdkp->early_zone_info.nr_zones;
834 u32 max_append;
835 int ret = 0;834 int ret = 0;
836 unsigned int flags;835 unsigned int flags;
837 836
@@ -876,6 +875,11 @@ int sd_zbc_revalidate_zones(struct scsi_disk *sdkp) · 38 unmodified lines
876 goto unlock;875 goto unlock;
877 }876 }
878 877
878 blk_queue_chunk_sectors(q,
879 logical_to_sectors(sdkp->device, zone_blocks));
880 blk_queue_max_zone_append_sectors(q,
881 q->limits.max_segments << PAGE_SECTORS_SHIFT);
882
879 ret = blk_revalidate_disk_zones(disk, sd_zbc_revalidate_zones_cb);883 ret = blk_revalidate_disk_zones(disk, sd_zbc_revalidate_zones_cb);
880 884
881 memalloc_noio_restore(flags);885 memalloc_noio_restore(flags);
@@ -888,12 +892,6 @@ int sd_zbc_revalidate_zones(struct scsi_disk *sdkp) · 6 unmodified lines
888 goto unlock;892 goto unlock;
889 }893 }
890 894
891 max_append = min_t(u32, logical_to_sectors(sdkp->device, zone_blocks),
892 q->limits.max_segments << PAGE_SECTORS_SHIFT);
893 max_append = min_t(u32, max_append, queue_max_hw_sectors(q));
894
895 blk_queue_max_zone_append_sectors(q, max_append);
896
897 sd_zbc_print_zones(sdkp);895 sd_zbc_print_zones(sdkp);
898 896
899unlock:897unlock:
drivers/scsi/sg.c+4−3
@@ -1497,9 +1497,10 @@ sg_add_device(struct device *cl_dev) · 1496 unmodified lines
1497 int error;1497 int error;
1498 unsigned long iflags;1498 unsigned long iflags;
1499 1499
1500 error = blk_get_queue(scsidp->request_queue);1500 if (!blk_get_queue(scsidp->request_queue)) {
1501 if (error)1501 pr_warn("%s: get scsi_device queue failed\n", __func__);
1502 return error;1502 return -ENODEV;
1503 }
1503 1504
1504 error = -ENOMEM;1505 error = -ENOMEM;
1505 cdev = cdev_alloc();1506 cdev = cdev_alloc();
drivers/scsi/snic/snic_disc.c+1−1
@@ -307,7 +307,7 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid) · 306 unmodified lines
307 spin_lock_irqsave(snic->shost->host_lock, flags);307 spin_lock_irqsave(snic->shost->host_lock, flags);
308 list_del(&tgt->list);308 list_del(&tgt->list);
309 spin_unlock_irqrestore(snic->shost->host_lock, flags);309 spin_unlock_irqrestore(snic->shost->host_lock, flags);
310 kfree(tgt);310 put_device(&tgt->dev);
311 tgt = NULL;311 tgt = NULL;
312 312
313 return tgt;313 return tgt;
drivers/scsi/storvsc_drv.c+13−4
@@ -316,8 +316,12 @@ enum storvsc_request_type { · 315 unmodified lines
316#define SRB_STATUS_ABORTED 0x02316#define SRB_STATUS_ABORTED 0x02
317#define SRB_STATUS_ERROR 0x04317#define SRB_STATUS_ERROR 0x04
318#define SRB_STATUS_INVALID_REQUEST 0x06318#define SRB_STATUS_INVALID_REQUEST 0x06
319#define SRB_STATUS_TIMEOUT 0x09
320#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
321#define SRB_STATUS_BUS_RESET 0x0E
319#define SRB_STATUS_DATA_OVERRUN 0x12322#define SRB_STATUS_DATA_OVERRUN 0x12
320#define SRB_STATUS_INVALID_LUN 0x20323#define SRB_STATUS_INVALID_LUN 0x20
324#define SRB_STATUS_INTERNAL_ERROR 0x30
321 325
322#define SRB_STATUS(status) \326#define SRB_STATUS(status) \
323 (status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))327 (status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
@@ -365,6 +369,7 @@ static void storvsc_on_channel_callback(void *context); · 41 unmodified lines
365#define STORVSC_FC_MAX_LUNS_PER_TARGET 255369#define STORVSC_FC_MAX_LUNS_PER_TARGET 255
366#define STORVSC_FC_MAX_TARGETS 128370#define STORVSC_FC_MAX_TARGETS 128
367#define STORVSC_FC_MAX_CHANNELS 8371#define STORVSC_FC_MAX_CHANNELS 8
372#define STORVSC_FC_MAX_XFER_SIZE ((u32)(512 * 1024))
368 373
369#define STORVSC_IDE_MAX_LUNS_PER_TARGET 64374#define STORVSC_IDE_MAX_LUNS_PER_TARGET 64
370#define STORVSC_IDE_MAX_TARGETS 1375#define STORVSC_IDE_MAX_TARGETS 1
@@ -978,6 +983,11 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, · 607 unmodified lines
978 case SRB_STATUS_ERROR:983 case SRB_STATUS_ERROR:
979 case SRB_STATUS_ABORTED:984 case SRB_STATUS_ABORTED:
980 case SRB_STATUS_INVALID_REQUEST:985 case SRB_STATUS_INVALID_REQUEST:
986 case SRB_STATUS_INTERNAL_ERROR:
987 case SRB_STATUS_TIMEOUT:
988 case SRB_STATUS_SELECTION_TIMEOUT:
989 case SRB_STATUS_BUS_RESET:
990 case SRB_STATUS_DATA_OVERRUN:
981 if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) {991 if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) {
982 /* Check for capacity change */992 /* Check for capacity change */
983 if ((asc == 0x2a) && (ascq == 0x9)) {993 if ((asc == 0x2a) && (ascq == 0x9)) {
@@ -1671,10 +1681,6 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) · 687 unmodified lines
1671 */1681 */
1672static enum scsi_timeout_action storvsc_eh_timed_out(struct scsi_cmnd *scmnd)1682static enum scsi_timeout_action storvsc_eh_timed_out(struct scsi_cmnd *scmnd)
1673{1683{
1674#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
1675 if (scmnd->device->host->transportt == fc_transport_template)
1676 return fc_eh_timed_out(scmnd);
1677#endif
1678 return SCSI_EH_RESET_TIMER;1684 return SCSI_EH_RESET_TIMER;
1679}1685}
1680 1686
@@ -2004,6 +2010,9 @@ static int storvsc_probe(struct hv_device *device, · 323 unmodified lines
2004 * protecting it from any weird value.2010 * protecting it from any weird value.
2005 */2011 */
2006 max_xfer_bytes = round_down(stor_device->max_transfer_bytes, HV_HYP_PAGE_SIZE);2012 max_xfer_bytes = round_down(stor_device->max_transfer_bytes, HV_HYP_PAGE_SIZE);
2013 if (is_fc)
2014 max_xfer_bytes = min(max_xfer_bytes, STORVSC_FC_MAX_XFER_SIZE);
2015
2007 /* max_hw_sectors_kb */2016 /* max_hw_sectors_kb */
2008 host->max_sectors = max_xfer_bytes >> 9;2017 host->max_sectors = max_xfer_bytes >> 9;
2009 /*2018 /*
drivers/ufs/core/ufs-mcq.c+4−2
@@ -578,7 +578,6 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba, · 577 unmodified lines
578{578{
579 struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];579 struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];
580 struct utp_transfer_req_desc *utrd;580 struct utp_transfer_req_desc *utrd;
581 u32 mask = hwq->max_entries - 1;
582 __le64 cmd_desc_base_addr;581 __le64 cmd_desc_base_addr;
583 bool ret = false;582 bool ret = false;
584 u64 addr, match;583 u64 addr, match;
@@ -606,7 +605,10 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba, · 21 unmodified lines
606 ret = true;605 ret = true;
607 goto out;606 goto out;
608 }607 }
609 sq_head_slot = (sq_head_slot + 1) & mask;608
609 sq_head_slot++;
610 if (sq_head_slot == hwq->max_entries)
611 sq_head_slot = 0;
610 }612 }
611 613
612out:614out:
drivers/ufs/core/ufshcd.c+38−0
@@ -8452,6 +8452,41 @@ out: · 8451 unmodified lines
8452 return ret;8452 return ret;
8453}8453}
8454 8454
8455static void ufshcd_set_timestamp_attr(struct ufs_hba *hba)
8456{
8457 int err;
8458 struct ufs_query_req *request = NULL;
8459 struct ufs_query_res *response = NULL;
8460 struct ufs_dev_info *dev_info = &hba->dev_info;
8461 struct utp_upiu_query_v4_0 *upiu_data;
8462
8463 if (dev_info->wspecversion < 0x400)
8464 return;
8465
8466 ufshcd_hold(hba);
8467
8468 mutex_lock(&hba->dev_cmd.lock);
8469
8470 ufshcd_init_query(hba, &request, &response,
8471 UPIU_QUERY_OPCODE_WRITE_ATTR,
8472 QUERY_ATTR_IDN_TIMESTAMP, 0, 0);
8473
8474 request->query_func = UPIU_QUERY_FUNC_STANDARD_WRITE_REQUEST;
8475
8476 upiu_data = (struct utp_upiu_query_v4_0 *)&request->upiu_req;
8477
8478 put_unaligned_be64(ktime_get_real_ns(), &upiu_data->osf3);
8479
8480 err = ufshcd_exec_dev_cmd(hba, DEV_CMD_TYPE_QUERY, QUERY_REQ_TIMEOUT);
8481
8482 if (err)
8483 dev_err(hba->dev, "%s: failed to set timestamp %d\n",
8484 __func__, err);
8485
8486 mutex_unlock(&hba->dev_cmd.lock);
8487 ufshcd_release(hba);
8488}
8489
8455/**8490/**
8456 * ufshcd_add_lus - probe and add UFS logical units8491 * ufshcd_add_lus - probe and add UFS logical units
8457 * @hba: per-adapter instance8492 * @hba: per-adapter instance
@@ -8641,6 +8676,8 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params) · 183 unmodified lines
8641 ufshcd_set_ufs_dev_active(hba);8676 ufshcd_set_ufs_dev_active(hba);
8642 ufshcd_force_reset_auto_bkops(hba);8677 ufshcd_force_reset_auto_bkops(hba);
8643 8678
8679 ufshcd_set_timestamp_attr(hba);
8680
8644 /* Gear up to HS gear if supported */8681 /* Gear up to HS gear if supported */
8645 if (hba->max_pwr_info.is_valid) {8682 if (hba->max_pwr_info.is_valid) {
8646 /*8683 /*
@@ -9677,6 +9714,7 @@ static int __ufshcd_wl_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) · 1030 unmodified lines
9677 ret = ufshcd_set_dev_pwr_mode(hba, UFS_ACTIVE_PWR_MODE);9714 ret = ufshcd_set_dev_pwr_mode(hba, UFS_ACTIVE_PWR_MODE);
9678 if (ret)9715 if (ret)
9679 goto set_old_link_state;9716 goto set_old_link_state;
9717 ufshcd_set_timestamp_attr(hba);
9680 }9718 }
9681 9719
9682 if (ufshcd_keep_autobkops_enabled_except_suspend(hba))9720 if (ufshcd_keep_autobkops_enabled_except_suspend(hba))
drivers/ufs/host/Kconfig+1−0
@@ -72,6 +72,7 @@ config SCSI_UFS_QCOM · 71 unmodified lines
72config SCSI_UFS_MEDIATEK72config SCSI_UFS_MEDIATEK
73 tristate "Mediatek specific hooks to UFS controller platform driver"73 tristate "Mediatek specific hooks to UFS controller platform driver"
74 depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK74 depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
75 depends on RESET_CONTROLLER
75 select PHY_MTK_UFS76 select PHY_MTK_UFS
76 select RESET_TI_SYSCON77 select RESET_TI_SYSCON
77 help78 help
drivers/ufs/host/ufs-qcom.c+1−1
@@ -365,7 +365,7 @@ static void ufs_qcom_select_unipro_mode(struct ufs_qcom_host *host) · 364 unmodified lines
365 ufs_qcom_cap_qunipro(host) ? QUNIPRO_SEL : 0,365 ufs_qcom_cap_qunipro(host) ? QUNIPRO_SEL : 0,
366 REG_UFS_CFG1);366 REG_UFS_CFG1);
367 367
368 if (host->hw_ver.major == 0x05)368 if (host->hw_ver.major >= 0x05)
369 ufshcd_rmwl(host->hba, QUNIPRO_G4_SEL, 0, REG_UFS_CFG0);369 ufshcd_rmwl(host->hba, QUNIPRO_G4_SEL, 0, REG_UFS_CFG0);
370 370
371 /* make sure above configuration is applied before we return */371 /* make sure above configuration is applied before we return */
drivers/ufs/host/ufs-renesas.c+1−1
@@ -359,7 +359,7 @@ static int ufs_renesas_init(struct ufs_hba *hba) · 358 unmodified lines
359{359{
360 struct ufs_renesas_priv *priv;360 struct ufs_renesas_priv *priv;
361 361
362 priv = devm_kmalloc(hba->dev, sizeof(*priv), GFP_KERNEL);362 priv = devm_kzalloc(hba->dev, sizeof(*priv), GFP_KERNEL);
363 if (!priv)363 if (!priv)
364 return -ENOMEM;364 return -ENOMEM;
365 ufshcd_set_variant(hba, priv);365 ufshcd_set_variant(hba, priv);
include/linux/raid_class.h+0−4
@@ -77,7 +77,3 @@ DEFINE_RAID_ATTRIBUTE(enum raid_state, state) · 76 unmodified lines
77 77
78struct raid_template *raid_class_attach(struct raid_function_template *);78struct raid_template *raid_class_attach(struct raid_function_template *);
79void raid_class_release(struct raid_template *);79void raid_class_release(struct raid_template *);
80
81int __must_check raid_component_add(struct raid_template *, struct device *,
82 struct device *);
83
include/uapi/scsi/scsi_bsg_ufs.h+25−0
@@ -116,6 +116,31 @@ struct utp_upiu_query { · 115 unmodified lines
116 __be32 reserved[2];116 __be32 reserved[2];
117};117};
118 118
119/**
120 * struct utp_upiu_query_v4_0 - upiu request buffer structure for
121 * query request >= UFS 4.0 spec.
122 * @opcode: command to perform B-0
123 * @idn: a value that indicates the particular type of data B-1
124 * @index: Index to further identify data B-2
125 * @selector: Index to further identify data B-3
126 * @osf4: spec field B-5
127 * @osf5: spec field B 6,7
128 * @osf6: spec field DW 8,9
129 * @osf7: spec field DW 10,11
130 */
131struct utp_upiu_query_v4_0 {
132 __u8 opcode;
133 __u8 idn;
134 __u8 index;
135 __u8 selector;
136 __u8 osf3;
137 __u8 osf4;
138 __be16 osf5;
139 __be32 osf6;
140 __be32 osf7;
141 __be32 reserved;
142};
143
119/**144/**
120 * struct utp_upiu_cmd - Command UPIU structure145 * struct utp_upiu_cmd - Command UPIU structure
121 * @data_transfer_len: Data Transfer Length DW-3146 * @data_transfer_len: Data Transfer Length DW-3
include/ufs/ufs.h+1−0
@@ -179,6 +179,7 @@ enum attr_idn { · 178 unmodified lines
179 QUERY_ATTR_IDN_WB_BUFF_LIFE_TIME_EST = 0x1E,179 QUERY_ATTR_IDN_WB_BUFF_LIFE_TIME_EST = 0x1E,
180 QUERY_ATTR_IDN_CURR_WB_BUFF_SIZE = 0x1F,180 QUERY_ATTR_IDN_CURR_WB_BUFF_SIZE = 0x1F,
181 QUERY_ATTR_IDN_EXT_IID_EN = 0x2A,181 QUERY_ATTR_IDN_EXT_IID_EN = 0x2A,
182 QUERY_ATTR_IDN_TIMESTAMP = 0x30
182};183};
183 184
184/* Descriptor idn for Query requests */185/* Descriptor idn for Query requests */