MFC r239545, r239665:
Fix/add support for SCSI UNMAP to ATA DSM translation.
(Note: scsi_da does not support BIO_DELETE->SCSI_UNMAP on this
stable branch, but I am MFC'ing the changes to keep a
consistent driver across all stable releases.)
This addresses kernel panic observed when sending SCSI UNMAP
commands to SATA disks attached to isci(4).
1) Flesh out callback routines to allocate/free buffers needed for
translating SCSI UNMAP data to ATA DSM data.
2) Add controller-level pool for storing buffers previously allocated
for UNMAP translation, to lessen chance of no buffer available
under memory pressure.
3) Ensure driver properly handles case where buffer pool is empty
and contigmalloc returns NULL.
4) Clear freeze bit in isci_remote_device_release_lun_queue() before
calling xpt_release_devq to ensure that any ccbs which immediately
start during the call to xpt_release_devq() see an accurate picture
of the frozen_lun_mask. This code path is extensively exercised
when tagged read/write commands mix with non-tagged DSM commands.
Sponsored by: Intel
git-svn-id: svn://svn.freebsd.org/base/stable/8@239735
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f