Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"The important core fix is another tweak to our discard discovery
issues. The off by 512 in logical block count seems bad, but in fact
the inline was only ever used in debug prints, which is why no-one
noticed"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: sd: Do not attempt to configure discard unless LBPME is set
scsi: MAINTAINERS: Add header files to SCSI SUBSYSTEM
scsi: ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC
scsi: ufs: core: Add a quirk for handling broken LSDBS field in controller capabilities register
scsi: core: Fix the return value of scsi_logical_block_count()
scsi: MAINTAINERS: Update HiSilicon SAS controller driver maintainer

+24 -4
+2 -1
MAINTAINERS
··· 10175 10175 F: drivers/infiniband/hw/hns/ 10176 10176 10177 10177 HISILICON SAS Controller 10178 - M: Xiang Chen <chenxiang66@hisilicon.com> 10178 + M: Yihang Li <liyihang9@huawei.com> 10179 10179 S: Supported 10180 10180 W: http://www.hisilicon.com 10181 10181 F: Documentation/devicetree/bindings/scsi/hisilicon-sas.txt ··· 20374 20374 F: drivers/scsi/ 20375 20375 F: drivers/ufs/ 20376 20376 F: include/scsi/ 20377 + F: include/uapi/scsi/ 20377 20378 20378 20379 SCSI TAPE DRIVER 20379 20380 M: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
+3
drivers/scsi/sd.c
··· 3308 3308 3309 3309 static unsigned int sd_discard_mode(struct scsi_disk *sdkp) 3310 3310 { 3311 + if (!sdkp->lbpme) 3312 + return SD_LBP_FULL; 3313 + 3311 3314 if (!sdkp->lbpvpd) { 3312 3315 /* LBP VPD page not provided */ 3313 3316 if (sdkp->max_unmap_blocks)
+5 -1
drivers/ufs/core/ufshcd.c
··· 2426 2426 * 0h: legacy single doorbell support is available 2427 2427 * 1h: indicate that legacy single doorbell support has been removed 2428 2428 */ 2429 - hba->lsdb_sup = !FIELD_GET(MASK_LSDB_SUPPORT, hba->capabilities); 2429 + if (!(hba->quirks & UFSHCD_QUIRK_BROKEN_LSDBS_CAP)) 2430 + hba->lsdb_sup = !FIELD_GET(MASK_LSDB_SUPPORT, hba->capabilities); 2431 + else 2432 + hba->lsdb_sup = true; 2433 + 2430 2434 if (!hba->mcq_sup) 2431 2435 return 0; 2432 2436
+5 -1
drivers/ufs/host/ufs-qcom.c
··· 857 857 858 858 if (host->hw_ver.major > 0x3) 859 859 hba->quirks |= UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH; 860 + 861 + if (of_device_is_compatible(hba->dev->of_node, "qcom,sm8550-ufshc")) 862 + hba->quirks |= UFSHCD_QUIRK_BROKEN_LSDBS_CAP; 860 863 } 861 864 862 865 static void ufs_qcom_set_phy_gear(struct ufs_qcom_host *host) ··· 1850 1847 } 1851 1848 1852 1849 static const struct of_device_id ufs_qcom_of_match[] __maybe_unused = { 1853 - { .compatible = "qcom,ufshc"}, 1850 + { .compatible = "qcom,ufshc" }, 1851 + { .compatible = "qcom,sm8550-ufshc" }, 1854 1852 {}, 1855 1853 }; 1856 1854 MODULE_DEVICE_TABLE(of, ufs_qcom_of_match);
+1 -1
include/scsi/scsi_cmnd.h
··· 234 234 235 235 static inline unsigned int scsi_logical_block_count(struct scsi_cmnd *scmd) 236 236 { 237 - unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; 237 + unsigned int shift = ilog2(scmd->device->sector_size); 238 238 239 239 return blk_rq_bytes(scsi_cmd_to_rq(scmd)) >> shift; 240 240 }
+8
include/ufs/ufshcd.h
··· 676 676 * the standard best practice for managing keys). 677 677 */ 678 678 UFSHCD_QUIRK_KEYS_IN_PRDT = 1 << 24, 679 + 680 + /* 681 + * This quirk indicates that the controller reports the value 1 (not 682 + * supported) in the Legacy Single DoorBell Support (LSDBS) bit of the 683 + * Controller Capabilities register although it supports the legacy 684 + * single doorbell mode. 685 + */ 686 + UFSHCD_QUIRK_BROKEN_LSDBS_CAP = 1 << 25, 679 687 }; 680 688 681 689 enum ufshcd_caps {