/* Free a SCB structure Note: We assume the scsi commands associated with this scb is not free yet.  */
static void mega_free_scb(adapter_t *adapter, scb_t *scb)
/* Free a SCB structure Note: We assume the scsi commands associated with this scb is not free yet.  */
static void mega_free_scb(adapter_t *adapter, scb_t *scb)
{
	switch( scb->dma_type ) {
	case MEGA_DMA_TYPE_NONE:
		break;
	case MEGA_SGLIST:
		scsi_dma_unmap(scb->cmd);
		break;
	default:
		break;
	}
	list_del_init(&scb->list);
	scb->state = SCB_FREE;
	scb->cmd = NULL;
	list_add(&scb->list, &adapter->free_list);
}