]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fc: set max_segments to lldd max value
authorJames Smart <jsmart2021@gmail.com>
Tue, 14 Jul 2020 19:03:36 +0000 (12:03 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2020 05:45:20 +0000 (07:45 +0200)
commita0f2b00cb401ddcb5d756f9d236e3c2caa6f745a
treed1b0268adfb7cc6b18ed1846b09c45616c99de00
parent042a21e0079af5aeefbe31edcdd3c7bf3cd6cb0b
nvme-fc: set max_segments to lldd max value

Currently the FC transport is set max_hw_sectors based on the lldds
max sgl segment count. However, the block queue max segments is
set based on the controller's max_segments count, which the transport
does not set.  As such, the lldd is receiving sgl lists that are
exceeding its max segment count.

Set the controller max segment count and derive max_hw_sectors from
the max segment count.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c