]> www.infradead.org Git - nvme.git/commit
nvmet: Export nvmet_update_cc() and nvmet_cc_xxx() helpers
authorDamien Le Moal <dlemoal@kernel.org>
Sat, 4 Jan 2025 04:59:36 +0000 (13:59 +0900)
committerKeith Busch <kbusch@kernel.org>
Sat, 11 Jan 2025 03:30:47 +0000 (19:30 -0800)
commit15e9d26445441a0c05ee14bef7ba752088f66a0c
tree16b17f2aa3e7121ab0c8d3afe8a2c59c453a714f
parent5d4f4ea8fa2992eaf7040aab2f87e8dc849387fd
nvmet: Export nvmet_update_cc() and nvmet_cc_xxx() helpers

Make the function nvmet_update_cc() available to target drivers by
exporting it. To also facilitate the manipulation of the cc register
bits, move the inline helper functions nvmet_cc_en(), nvmet_cc_css(),
nvmet_cc_mps(), nvmet_cc_ams(), nvmet_cc_shn(), nvmet_cc_iosqes(), and
nvmet_cc_iocqes() from core.c to nvmet.h so that these functions can be
reused in target controller drivers.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com>
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/core.c
drivers/nvme/target/nvmet.h