Skip to content

Commit 22d29f1

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, mpi3mr, mpt3sas, lpfc, fnic, hisi_sas, arcmsr, ) plus the usual assorted minor fixes and updates. This time around there's only a single line update to the core, so nothing major and barely anything minor" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (135 commits) scsi: ufs: core: Simplify ufshcd_auto_hibern8_update() scsi: ufs: core: Rename ufshcd_auto_hibern8_enable() and make it static scsi: ufs: qcom: Fix ESI vector mask scsi: ufs: host: Fix kernel-doc warning scsi: hisi_sas: Correct the number of global debugfs registers scsi: hisi_sas: Rollback some operations if FLR failed scsi: hisi_sas: Check before using pointer variables scsi: hisi_sas: Replace with standard error code return value scsi: hisi_sas: Set .phy_attached before notifing phyup event HISI_PHYE_PHY_UP_PM scsi: ufs: core: Add sysfs node for UFS RTC update scsi: ufs: core: Add UFS RTC support scsi: ufs: core: Add ufshcd_is_ufs_dev_busy() scsi: ufs: qcom: Remove unused definitions scsi: ufs: qcom: Use ufshcd_rmwl() where applicable scsi: ufs: qcom: Remove support for host controllers older than v2.0 scsi: ufs: qcom: Simplify ufs_qcom_{assert/deassert}_reset scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl() scsi: ufs: qcom: Sort includes alphabetically scsi: ufs: qcom: Remove unused ufs_qcom_hosts struct array scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() ...
2 parents 4c72e2b + 45a2c87 commit 22d29f1

97 files changed

Lines changed: 2567 additions & 1730 deletions

Some content is hidden

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

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,55 @@ Description: This file shows the total latency (in micro seconds) of write
12231223

12241224
The file is read only.
12251225

1226+
What: /sys/bus/platform/drivers/ufshcd/*/power_info/lane
1227+
What: /sys/bus/platform/devices/*.ufs/power_info/lane
1228+
Date: September 2023
1229+
Contact: Can Guo <quic_cang@quicinc.com>
1230+
Description: This file shows how many lanes are enabled on the UFS link,
1231+
i.e., an output 2 means UFS link is operating with 2 lanes.
1232+
1233+
The file is read only.
1234+
1235+
What: /sys/bus/platform/drivers/ufshcd/*/power_info/mode
1236+
What: /sys/bus/platform/devices/*.ufs/power_info/mode
1237+
Date: September 2023
1238+
Contact: Can Guo <quic_cang@quicinc.com>
1239+
Description: This file shows the PA power mode of UFS.
1240+
1241+
The file is read only.
1242+
1243+
What: /sys/bus/platform/drivers/ufshcd/*/power_info/rate
1244+
What: /sys/bus/platform/devices/*.ufs/power_info/rate
1245+
Date: September 2023
1246+
Contact: Can Guo <quic_cang@quicinc.com>
1247+
Description: This file shows the speed rate of UFS link.
1248+
1249+
The file is read only.
1250+
1251+
What: /sys/bus/platform/drivers/ufshcd/*/power_info/gear
1252+
What: /sys/bus/platform/devices/*.ufs/power_info/gear
1253+
Date: September 2023
1254+
Contact: Can Guo <quic_cang@quicinc.com>
1255+
Description: This file shows the gear of UFS link.
1256+
1257+
The file is read only.
1258+
1259+
What: /sys/bus/platform/drivers/ufshcd/*/power_info/dev_pm
1260+
What: /sys/bus/platform/devices/*.ufs/power_info/dev_pm
1261+
Date: September 2023
1262+
Contact: Can Guo <quic_cang@quicinc.com>
1263+
Description: This file shows the UFS device power mode.
1264+
1265+
The file is read only.
1266+
1267+
What: /sys/bus/platform/drivers/ufshcd/*/power_info/link_state
1268+
What: /sys/bus/platform/devices/*.ufs/power_info/link_state
1269+
Date: September 2023
1270+
Contact: Can Guo <quic_cang@quicinc.com>
1271+
Description: This file shows the state of UFS link.
1272+
1273+
The file is read only.
1274+
12261275
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en
12271276
What: /sys/bus/platform/devices/*.ufs/device_descriptor/wb_presv_us_en
12281277
Date: June 2020
@@ -1474,3 +1523,10 @@ Description: Indicates status of Write Booster.
14741523

14751524
The file is read only.
14761525

1526+
What: /sys/bus/platform/drivers/ufshcd/*/rtc_update_ms
1527+
What: /sys/bus/platform/devices/*.ufs/rtc_update_ms
1528+
Date: November 2023
1529+
Contact: Bean Huo <beanhuo@micron.com>
1530+
Description:
1531+
rtc_update_ms indicates how often the host should synchronize or update the
1532+
UFS RTC. If set to 0, this will disable UFS RTC periodic update.

Documentation/devicetree/bindings/ufs/qcom,ufs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- qcom,msm8996-ufshc
2828
- qcom,msm8998-ufshc
2929
- qcom,sa8775p-ufshc
30+
- qcom,sc7280-ufshc
3031
- qcom,sc8280xp-ufshc
3132
- qcom,sdm845-ufshc
3233
- qcom,sm6115-ufshc
@@ -118,6 +119,7 @@ allOf:
118119
enum:
119120
- qcom,msm8998-ufshc
120121
- qcom,sa8775p-ufshc
122+
- qcom,sc7280-ufshc
121123
- qcom,sc8280xp-ufshc
122124
- qcom,sm8250-ufshc
123125
- qcom,sm8350-ufshc

Documentation/devicetree/bindings/ufs/ufs-common.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ properties:
8787
description:
8888
Specifies max. load that can be drawn from VCCQ2 supply.
8989

90+
msi-parent: true
91+
9092
dependencies:
9193
freq-table-hz: [ clocks ]
9294
operating-points-v2: [ clocks, clock-names ]

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22320,7 +22320,8 @@ S: Maintained
2232022320
F: drivers/ufs/host/ufs-exynos*
2232122321

2232222322
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER MEDIATEK HOOKS
22323-
M: Stanley Chu <stanley.chu@mediatek.com>
22323+
M: Peter Wang <peter.wang@mediatek.com>
22324+
R: Stanley Jhu <chu.stanley@gmail.com>
2232422325
L: linux-scsi@vger.kernel.org
2232522326
L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)
2232622327
S: Maintained

drivers/s390/scsi/zfcp_fc.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,19 @@ static void zfcp_fc_rspn(struct zfcp_adapter *adapter,
900900
zfcp_fc_ct_ns_init(&rspn_req->ct_hdr, FC_NS_RSPN_ID,
901901
FC_SYMBOLIC_NAME_SIZE);
902902
hton24(rspn_req->rspn.fr_fid.fp_fid, fc_host_port_id(shost));
903-
len = strlcpy(rspn_req->rspn.fr_name, fc_host_symbolic_name(shost),
904-
FC_SYMBOLIC_NAME_SIZE);
903+
904+
BUILD_BUG_ON(sizeof(rspn_req->name) !=
905+
sizeof(fc_host_symbolic_name(shost)));
906+
BUILD_BUG_ON(sizeof(rspn_req->name) !=
907+
type_max(typeof(rspn_req->rspn.fr_name_len)) + 1);
908+
len = strscpy(rspn_req->name, fc_host_symbolic_name(shost),
909+
sizeof(rspn_req->name));
910+
/*
911+
* It should be impossible for this to truncate (see BUILD_BUG_ON()
912+
* above), but be robust anyway.
913+
*/
914+
if (WARN_ON(len < 0))
915+
len = sizeof(rspn_req->name) - 1;
905916
rspn_req->rspn.fr_name_len = len;
906917

907918
sg_init_one(&fc_req->sg_req, rspn_req, sizeof(*rspn_req));

drivers/scsi/3w-sas.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,8 @@ static int twl_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset)
13261326
}
13271327

13281328
/* Load rest of compatibility struct */
1329-
strncpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
1329+
strscpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION,
1330+
sizeof(tw_dev->tw_compat_info.driver_version));
13301331
tw_dev->tw_compat_info.driver_srl_high = TW_CURRENT_DRIVER_SRL;
13311332
tw_dev->tw_compat_info.driver_branch_high = TW_CURRENT_DRIVER_BRANCH;
13321333
tw_dev->tw_compat_info.driver_build_high = TW_CURRENT_DRIVER_BUILD;

drivers/scsi/a3000.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int __init amiga_a3000_scsi_probe(struct platform_device *pdev)
282282
return error;
283283
}
284284

285-
static int __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
285+
static void __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
286286
{
287287
struct Scsi_Host *instance = platform_get_drvdata(pdev);
288288
struct a3000_hostdata *hdata = shost_priv(instance);
@@ -293,11 +293,10 @@ static int __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
293293
free_irq(IRQ_AMIGA_PORTS, instance);
294294
scsi_host_put(instance);
295295
release_mem_region(res->start, resource_size(res));
296-
return 0;
297296
}
298297

299298
static struct platform_driver amiga_a3000_scsi_driver = {
300-
.remove = __exit_p(amiga_a3000_scsi_remove),
299+
.remove_new = __exit_p(amiga_a3000_scsi_remove),
301300
.driver = {
302301
.name = "amiga-a3000-scsi",
303302
},

drivers/scsi/a4000t.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int __init amiga_a4000t_scsi_probe(struct platform_device *pdev)
9595
return -ENODEV;
9696
}
9797

98-
static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
98+
static void __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
9999
{
100100
struct Scsi_Host *host = platform_get_drvdata(pdev);
101101
struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
@@ -106,11 +106,10 @@ static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
106106
kfree(hostdata);
107107
free_irq(host->irq, host);
108108
release_mem_region(res->start, resource_size(res));
109-
return 0;
110109
}
111110

112111
static struct platform_driver amiga_a4000t_scsi_driver = {
113-
.remove = __exit_p(amiga_a4000t_scsi_remove),
112+
.remove_new = __exit_p(amiga_a4000t_scsi_remove),
114113
.driver = {
115114
.name = "amiga-a4000t-scsi",
116115
},

drivers/scsi/aic7xxx/aic7770_osm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ aic7770_probe(struct device *dev)
8787
sprintf(buf, "ahc_eisa:%d", eisaBase >> 12);
8888
name = kstrdup(buf, GFP_ATOMIC);
8989
if (name == NULL)
90-
return (ENOMEM);
90+
return -ENOMEM;
9191
ahc = ahc_alloc(&aic7xxx_driver_template, name);
9292
if (ahc == NULL)
93-
return (ENOMEM);
93+
return -ENOMEM;
9494
ahc->dev = dev;
9595
error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data,
9696
eisaBase);
9797
if (error != 0) {
9898
ahc->bsh.ioport = 0;
9999
ahc_free(ahc);
100-
return (error);
100+
return error < 0 ? error : -error;
101101
}
102102

103103
dev_set_drvdata(dev, ahc);

drivers/scsi/aic7xxx/aic7xxx_osm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
10851085
template->name = ahc->description;
10861086
host = scsi_host_alloc(template, sizeof(struct ahc_softc *));
10871087
if (host == NULL)
1088-
return (ENOMEM);
1088+
return -ENOMEM;
10891089

10901090
*((struct ahc_softc **)host->hostdata) = ahc;
10911091
ahc->platform_data->host = host;

0 commit comments

Comments
 (0)