public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: Set BLIST_TRY_VPD_PAGES for WD Black P10 external HDD
@ 2021-05-31 21:22 David Sebek
  2021-06-02  2:53 ` Martin K. Petersen
  0 siblings, 1 reply; 7+ messages in thread
From: David Sebek @ 2021-05-31 21:22 UTC (permalink / raw)
  To: jejb, martin.petersen, linux-scsi; +Cc: dasebek

The 5TB 2.5-inch WD Black P10 external USB hard drive seems
to use SMR technology. It supports TRIM via the unmap operation.
Maybe because it is marketed as a drive for gaming that is
compatible with PlayStation, Xbox, PC and Mac, it does not
support UASP protocol but uses bulk-only transport.
Therefore, Linux does not attempt to read the VPD and does
not enable TRIM by default. (Currently, there is a bug and
Linux incorrectly enables a writesame_16 TRIM operation on
the drive and does not change it to the correct unmap TRIM
operation because it does not attempt to read the info from
the VPD. I already submitted a patch for that bug.)

This patch adds this drive to the scsi_static_device_list
with a BLIST_TRY_VPD_PAGES flag. Although there are comments
in the code indicating that this list is deprecated and that
'echo "WD:Game Drive:0x10000400" > /proc/scsi/device_info'
should be used instead, I haven't found a better place to
persist this information. Moreover, the list already contains
a similar entry for the SanDisk Cruzer Blade USB flash drive.

Signed-off-by: David Sebek <dasebek@gmail.com>
---
 drivers/scsi/scsi_devinfo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index d92cec12454c..3ed558c168be 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -256,6 +256,7 @@ static struct {
 	{"WangDAT", "Model 2600", "01.7", BLIST_SELECT_NO_ATN},
 	{"WangDAT", "Model 3200", "02.2", BLIST_SELECT_NO_ATN},
 	{"WangDAT", "Model 1300", "02.4", BLIST_SELECT_NO_ATN},
+	{"WD", "Game Drive", NULL, BLIST_TRY_VPD_PAGES | BLIST_INQUIRY_36},
 	{"WDC WD25", "00JB-00FUA0", NULL, BLIST_NOREPORTLUN},
 	{"XYRATEX", "RS", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
 	{"Zzyzx", "RocketStor 500S", NULL, BLIST_SPARSELUN},
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-19  1:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 21:22 [PATCH] scsi: Set BLIST_TRY_VPD_PAGES for WD Black P10 external HDD David Sebek
2021-06-02  2:53 ` Martin K. Petersen
2021-06-02  2:57   ` Martin K. Petersen
2021-06-02 15:26     ` David Sebek
2021-06-11  2:10       ` Martin K. Petersen
2021-06-17  2:19         ` David Sebek
2021-06-19  1:55           ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox