Re: [PATCH v8 4/4] scsi: ufs: Prepare HPB read for cached sub-region

2020-08-12 Thread Daejun Park
On 2020-08-06 02:18, Daejun Park wrote: > > +static inline u32 ufshpb_get_lpn(struct scsi_cmnd *cmnd) > > +{ > > +return blk_rq_pos(cmnd->request) >> > > +(ilog2(cmnd->device->sector_size) - 9); > > +} > > Please use sectors_to_logical() from drivers/scsi/sd.h instead of open-coding >

Re: [PATCH v8 4/4] scsi: ufs: Prepare HPB read for cached sub-region

2020-08-08 Thread Bart Van Assche
On 2020-08-06 02:18, Daejun Park wrote: > +static inline u32 ufshpb_get_lpn(struct scsi_cmnd *cmnd) > +{ > + return blk_rq_pos(cmnd->request) >> > + (ilog2(cmnd->device->sector_size) - 9); > +} Please use sectors_to_logical() from drivers/scsi/sd.h instead of open-coding that funct

[PATCH v8 4/4] scsi: ufs: Prepare HPB read for cached sub-region

2020-08-06 Thread Daejun Park
This patch changes the read I/O to the HPB read I/O. If the logical address of the read I/O belongs to active sub-region, the HPB driver modifies the read I/O command to HPB read. It modifies the UPIU command of UFS instead of modifying the existing SCSI command. In the HPB version 1.0, the maxim