Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7635db6f authored by peter.wuw's avatar peter.wuw Committed by Harshit Agarwal
Browse files

add support for 64GB UFS

Change-Id: I8d6d212f78fdc26a16775fb8d80607b088d0fc8f
parent 4723e94f
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ void ufsf_device_check(struct ufs_hba *hba)
	struct ufsf_feature *ufsf = &hba->ufsf;
	int ret, lun;
	u32 status;
	int is_samsung_ufs = 0;
	int is_samsung_feature = 0;
	struct Scsi_Host *shost;
	struct scsi_device *sdev;

@@ -292,15 +292,20 @@ void ufsf_device_check(struct ufs_hba *hba)

	shost = hba->host;
	shost_for_each_device(sdev, shost) {
		if (strncmp(sdev->vendor, "SAMSUNG", 7) == 0)
			is_samsung_ufs = 1;
		if ((strncmp(sdev->vendor, "SAMSUNG", 7) == 0)
			&& ((strncmp(sdev->rev, "0500", 4) == 0)
				|| (strncmp(sdev->rev, "1500", 4) == 0)))
			is_samsung_feature = 1;
	}

	if (is_samsung_ufs == 0) {
	if (is_samsung_feature == 0) {
#if defined(CONFIG_UFSHPB)
		ufsf->ufshpb_state = HPB_FAILED;

#endif
#if defined(CONFIG_UFSTW)
		ufsf->tw_dev_info.tw_device = false;
		atomic_set(&ufsf->tw_state, TW_FAILED);
#endif
		return;
	}