/* Get a free scb. If there are none, see if we can allocate a new SCB.  */
struct scb* ahc_get_scb(struct ahc_softc *ahc)
/* Get a free scb. If there are none, see if we can allocate a new SCB.  */
struct scb* ahc_get_scb(struct ahc_softc *ahc)
{
	struct scb *scb;
	if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) {
		ahc_alloc_scbs(ahc);
		scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
		if (scb == NULL)
			return (NULL);
	}
	SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle);
	return (scb);
}