FreeBSD/sys/dev/ips/ips_commands.c
/* Below are a series of functions for sending an IO request
 * to the adapter.  The flow order is: start, send, callback, finish.
 * The caller must have already assembled an iorequest struct to hold
 * the details of the IO request. */
Below are a series of functions for sending an IO request
to the adapter.  The flow order is: start, send, callback, finish.
The caller must have already assembled an iorequest struct to hold
the details of the IO request.
Below are a series of functions for sending an IO request to the adapter . The flow order is : start send callback finish . The caller must have already assembled an iorequest struct to hold the details of the IO request .
static void ips_io_request_finish(ips_command_t *command)
{
	struct bio *iobuf = command->arg;
	if(ips_read_request(iobuf)) {
		bus_dmamap_sync(command->data_dmatag, command->data_dmamap, 
				BUS_DMASYNC_POSTREAD);
	} else {
		bus_dmamap_sync(command->data_dmatag, command->data_dmamap, 
				BUS_DMASYNC_POSTWRITE);
	}
	bus_dmamap_unload(command->data_dmatag, command->data_dmamap);
	if(COMMAND_ERROR(command)){
		iobuf->bio_flags |=BIO_ERROR;
		iobuf->bio_error = EIO;
		printf("ips: io error, status= 0x%x\n", command->status.value);
	}
	ips_insert_free_cmd(command->sc, command);
	ipsd_finish(iobuf);
}
static void ips_io_request_finish ( ips_command_t * command ) { struct bio * iobuf = command -> arg ; if ( ips_read_request ( iobuf ) ) { bus_dmamap_sync ( command -> data_dmatag , command -> data_dmamap , BUS_DMASYNC_POSTREAD ) ; } else { bus_dmamap_sync ( command -> data_dmatag , command -> data_dmamap , BUS_DMASYNC_POSTWRITE ) ; } bus_dmamap_unload ( command -> data_dmatag , command -> data_dmamap ) ; if ( COMMAND_ERROR ( command ) ) { iobuf -> bio_flags |= BIO_ERROR ; iobuf -> bio_error = EIO ; printf ( " \n " , command -> status . value ) ; } ips_insert_free_cmd ( command -> sc , command ) ; ipsd_finish ( iobuf ) ; }
Below are a series of functions for sending an IO request
 to the adapter.
Below are a series of functions for sending an IO request to the adapter .