panic: Segment size is not aligned (smartpqi related)

From: Yuri <yuri_at_aetern.org>
Date: Thu, 27 Jul 2023 20:00:54 UTC
Hi,

I'm getting the panic below trying to install latest current snapshot
(20230720) on HPE Proliant 380 Gen10.

There don't seem to be any recent changes to smartpqi driver itself so
it's likely something else changed as this HBA didn't have *this*
specific problem previously on this system.  The panic happens after
selecting the disk for ZFS pool and confirming that its contents are
going to be destroyed.  What's interesting, doing `gpart destroy -F da0`
from installer shell didn't trigger this.

I have not tried to bisect this yet as it's very time consuming
(uploading iso images to remote site takes hours) and hoping someone
could point out the problem.

panic: Segment size is not aligned
cpuid = 53
KDB: stack backtrace
vpanic()
panic()
bounce_bus_dmamap_load_ma() at bounce_bus_dmamap_load_ma+0x402
bus_dmamap_load_mem() at bus_dmamap_load_mem+034a
bus_dmamap_load_ccb() at bus_dmamap_load_ccb+05d
pqi_map_request() at pqi_map_request+0x54
smartpqi_cam_action() at smartpqi_cam_action+0xca1
xpt_run_devq() at xpt_run_devq+0x2e9
xpt_action_default() at xpt_action_default+0x3fd
dastart() at dastart+0x327
xpt_run_allocq() at xpt_run_allocq+0x9f
dastrategy() at dastrategy+0x6d
g_disk_start() at g_disk_start+0x36f
g_io_request() at 0x2c2
g_io_request() at 0x2c2
g_io_request() at 0x2c2
g_dev_strategy() at g_dev_strategy+0x155
physio() at physio+0x4a1
devfs_write_f() at devfs_write_f+0xf3
dofilewrite(() at dofilewrite+0x82
sys_write() at sys_write+0xc2
amd64_syscall() at amd64_syscall+0x138
fast_syscall_common() at fast_syscall_common+0xf8
--- syscall (4, FreeBSD ELF64, write), rip = 0x2899740792ba, rsp =
0x289971621568, rbp = 0x289971621c00 ---