Re: git: c5312bd79e66 - main - cam: Move bus_dmamap_load_ccb into cam.c.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 19 Jul 2023 17:15:05 UTC
On 7/18/23 6:44 PM, Warner Losh wrote:
> As predicted in the review, this is broken:
> 
> -- command output --
> linking kernel.full
> ld: error: undefined symbol: bus_dmamap_load_ccb
>>>> referenced by nvme_qpair.c:1209
> (/usr/home/imp/git/freebsd/src/sys/dev/nvme/nvme_qpair.c:1209)
>>>>                nvme_qpair.o:(_nvme_qpair_submit_request)
> _
> from using sys/amd64/conf/EX
> include MINIMAL
> device nvme
> device nvd
> 
> This has to be in the header file. The MODULE_DEPENDS stuff doesn't pull
> anything in for the
> static kernel case.
> 
> Please, lets' do this in the header with a static inline like I suggested
> to get around this issue.

I only committed it because kib@ requested it to fix the build.  I'm still happy
to make memdesc_ccb an inline function.

However, it's also true that this case (a storage driver with both CAM and non-CAM
frontends) is very unique and is not something we probably intend to support long
term.  Requesting those folks to add 'device scbus' to their kernel is not the
worst tradeoff for this unusual case (esp. given we are defacto deprecating it by
making nda the default in 14.0)

-- 
John Baldwin