Message ID | 1431003981-7106-1-git-send-email-kyuho.choi@sk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Kyuho, 2015-05-07 22:06 GMT+09:00 Kyuho Choi <chlrbgh0@gmail.com>: > This patch disables write_same for ufs. > > Signed-off-by: Kyuho Choi <kyuho.choi@sk.com> > --- > drivers/scsi/ufs/ufshcd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 648a446..6f770cd 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -4255,6 +4255,7 @@ static struct scsi_host_template ufshcd_driver_template = { > .max_host_blocked = 1, > .use_blk_tags = 1, > .track_queue_depth = 1, > + .no_write_same = 1, > }; Is there any specific reason to disable WRITE_SAME in the host controller level? no_write_same flag in scsi_host_template was introduced by commit 54b2b50c ("[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers") for RAID and virtual host adapter drivers which can lead to adapter firmware hangs or excessive I/O errors. The UFS device that does not support WRITE SAME should return ILLEGAL_REQUEST sense key (and with INVALID COMMAND OPCODE code for example). If there is a specific product model/revision which causes an undesirable result by WRITE_SAME, we should disable only when such device is detected. Otherwise I think this patch could conflict with any attempts to support WRITE SAME by some vendors who want it in their products or future UFS specification change. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Akinobu, On Fri, May 8, 2015 at 10:33 PM, Akinobu Mita <akinobu.mita@gmail.com> wrote: > > Hi Kyuho, > > 2015-05-07 22:06 GMT+09:00 Kyuho Choi <chlrbgh0@gmail.com>: > > This patch disables write_same for ufs. > > > > Signed-off-by: Kyuho Choi <kyuho.choi@sk.com> > > --- > > drivers/scsi/ufs/ufshcd.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > > index 648a446..6f770cd 100644 > > --- a/drivers/scsi/ufs/ufshcd.c > > +++ b/drivers/scsi/ufs/ufshcd.c > > @@ -4255,6 +4255,7 @@ static struct scsi_host_template ufshcd_driver_template = { > > .max_host_blocked = 1, > > .use_blk_tags = 1, > > .track_queue_depth = 1, > > + .no_write_same = 1, > > }; > > Is there any specific reason to disable WRITE_SAME in the host > controller level? Nope. But, according to UFS specification, does not support WRITE_SAME until UFS 2.0. So I thought host controller does not need WRITE_SAME command for UFS device. > > no_write_same flag in scsi_host_template was introduced by commit > 54b2b50c ("[SCSI] Disable WRITE SAME for RAID and virtual host adapter > drivers") for RAID and virtual host adapter drivers which can lead > to adapter firmware hangs or excessive I/O errors. Right. I'd refer that for this patch. > > The UFS device that does not support WRITE SAME should return > ILLEGAL_REQUEST sense key (and with INVALID COMMAND OPCODE code for > example). If there is a specific product model/revision which causes > an undesirable result by WRITE_SAME, we should disable only when > such device is detected. Otherwise I think this patch could conflict > with any attempts to support WRITE SAME by some vendors who want it in > their products or future UFS specification change. Right. UFS device always should return ILLEGAL_REQUEST about WRITE_SAME command. But I didn't consider of specification change in future. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 648a446..6f770cd 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4255,6 +4255,7 @@ static struct scsi_host_template ufshcd_driver_template = { .max_host_blocked = 1, .use_blk_tags = 1, .track_queue_depth = 1, + .no_write_same = 1, }; static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg,
This patch disables write_same for ufs. Signed-off-by: Kyuho Choi <kyuho.choi@sk.com> --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+)