/* megasas_teardown_frame_pool - Destroy the cmd frame DMA pool @instance: Adapter soft state  */
static void megasas_teardown_frame_pool(struct megasas_instance *instance)
/* megasas_teardown_frame_pool - Destroy the cmd frame DMA pool @instance: Adapter soft state  */
static void megasas_teardown_frame_pool(struct megasas_instance *instance)
{
	int i;
	u32 max_cmd = instance->max_fw_cmds;
	struct megasas_cmd *cmd;
	if (!instance->frame_dma_pool)
		return;
	for (i = 0; i < max_cmd; i++) {
		cmd = instance->cmd_list[i];
		if (cmd->frame)
			pci_pool_free(instance->frame_dma_pool, cmd->frame,
				      cmd->frame_phys_addr);
		if (cmd->sense)
			pci_pool_free(instance->sense_dma_pool, cmd->sense,
				      cmd->sense_phys_addr);
	}
	pci_pool_destroy(instance->frame_dma_pool);
	pci_pool_destroy(instance->sense_dma_pool);
	instance->frame_dma_pool = NULL;
	instance->sense_dma_pool = NULL;
}