On 16.9.2015 23:26, Matthew R. Ochs wrote: > From: Manoj Kumar <kumarmn@xxxxxxxxxx> > > The timeout value for read capacity is too small. Certain devices > may take longer to respond and thus the command may prematurely > timeout. Additionally the literal used for the timeout is stale. > > Update the timeout to 30 seconds (matches the value used in sd.c) > and rework the timeout literal to a more appropriate description. > > Signed-off-by: Matthew R. Ochs <mrochs@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Manoj N. Kumar <manoj@xxxxxxxxxxxxxxxxxx> > Suggested-by: Brian King <brking@xxxxxxxxxxxxxxxxxx> > --- > drivers/scsi/cxlflash/superpipe.c | 9 ++++----- > drivers/scsi/cxlflash/superpipe.h | 2 +- > drivers/scsi/cxlflash/vlun.c | 4 ++-- > 3 files changed, 7 insertions(+), 8 deletions(-) > > diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c > index 7df985d..fa513ba 100644 > --- a/drivers/scsi/cxlflash/superpipe.c > +++ b/drivers/scsi/cxlflash/superpipe.c > @@ -296,7 +296,7 @@ static int read_cap16(struct scsi_device *sdev, struct llun_info *lli) > int rc = 0; > int result = 0; > int retry_cnt = 0; > - u32 tout = (MC_DISCOVERY_TIMEOUT * HZ); > + u32 to = (CMD_TIMEOUT * HZ); In V3 please remove the parenthesis here^ > > retry: > cmd_buf = kzalloc(CMD_BUFSIZE, GFP_KERNEL); ... > @@ -1376,8 +1375,8 @@ out_attach: > attach->block_size = gli->blk_len; > attach->mmio_size = sizeof(afu->afu_map->hosts[0].harea); > attach->last_lba = gli->max_lba; > - attach->max_xfer = (sdev->host->max_sectors * MAX_SECTOR_UNIT) / > - gli->blk_len; > + attach->max_xfer = (sdev->host->max_sectors * MAX_SECTOR_UNIT); and here^ too. Thanks, Tomas -- 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