FreeBSD/sys/dev/isci/scil/sati_unmap.c
/**
 * @brief This method determines the max number of blocks of DSM data
 *        that can be satisfied by the device and the SW
 *
 * @return Number of blocks supported
 * @retval Number of blocks supported
 */
@brief This method determines the max number of blocks of DSM data
that can be satisfied by the device and the SW

@return Number of blocks supported
@retval Number of blocks supported
@brief This method determines the max number of blocks of DSM data that can be satisfied by the device and the SW @return Number of blocks supported @retval Number of blocks supported
U32 sati_unmap_get_max_buffer_size_in_blocks(
   SATI_TRANSLATOR_SEQUENCE_T * sequence
)
{
   return MIN(SATI_DSM_MAX_BUFFER_SIZE/sequence->device->logical_block_size,
              sequence->device->max_lba_range_entry_blocks);
}
U32 sati_unmap_get_max_buffer_size_in_blocks ( SATI_TRANSLATOR_SEQUENCE_T * sequence ) { return MIN ( SATI_DSM_MAX_BUFFER_SIZE / sequence -> device -> logical_block_size , sequence -> device -> max_lba_range_entry_blocks ) ; }
@brief This method determines the max number of blocks of DSM data
        that can be satisfied by the device and the SW
@brief This method determines the max number of blocks of DSM data that can be satisfied by the device and the SW
// Currently this SATI implementation only supports a single // 4k block of memory for the DMA write operation for simplicity // (no need to handle more than one SG element). // Since most run time UNMAP requests use 1K or less buffer space, // there is no performance degradation with only supporting a // single physical page.  For best results allocate the maximum // amount of memory the device can handle up to the maximum of 4K.