Hi Kyuho, 2015-05-07 22:06 GMT+09:00 Kyuho Choi <chlrbgh0@xxxxxxxxx>: > This patch disables write_same for ufs. > > Signed-off-by: Kyuho Choi <kyuho.choi@xxxxxx> > --- > 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html