• JK Kim's avatar
    nvme-pci: fix var. type for increasing cq_head · a0aac973
    JK Kim authored
    nvmeq->cq_head is compared with nvmeq->q_depth and changed the value
    and cq_phase for handling the next cq db.
    
    but, nvmeq->q_depth's type is u32 and max. value is 0x10000 when
    CQP.MSQE is 0xffff and io_queue_depth is 0x10000.
    
    current temp. variable for comparing with nvmeq->q_depth is overflowed
    when previous nvmeq->cq_head is 0xffff.
    
    in this case, nvmeq->cq_phase is not updated.
    so, fix data type for temp. variable to u32.
    Signed-off-by: default avatarJK Kim <jongkang.kim2@gmail.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    a0aac973
pci.c 85.7 KB