cxlflash: Add a literal for units of max_sector
PATCH 2/29 cxlflash: Add a literal for units of max_sector
From: Manoj Kumar <[email protected]>
Signed-off-by Matthew R. Ochs <[email protected]>
Signed-off-by Manoj N. Kumar <[email protected]>
--- drivers/scsi/cxlflash/superpipe.c | 3 ++- drivers/scsi/cxlflash/superpipe.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/cxlflash/superpipe.c +2 -1
@@ -1375,7 +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 *512 ) / gli->blk_len; + attach->max_xfer = (sdev->host->max_sectors *MAX_SECTOR_UNIT ) / + gli->blk_len; out: attach->adap_fd = fd;
drivers/scsi/cxlflash/superpipe.h +2 -0
@@ -30,6 +30,8 @@ extern struct cxlflash_global global;#define MC_DISCOVERY_TIMEOUT 5/* 5 secs */ +#define MAX_SECTOR_UNIT 512/* max_sector is in 512 byte multiples */ +#define CHAN2PORT (_x) ((_x) + 1)#define PORT2CHAN (_x) ((_x) - 1)
Signature · 1 line
2.1.0