/* zfcp_qdio_send - set PCI flag in first SBALE and send req to QDIO @qdio: pointer to struct zfcp_qdio @q_req: pointer to struct zfcp_queue_req Returns: 0 on success, error otherwise  */
int zfcp_qdio_send(struct zfcp_qdio *qdio, struct zfcp_queue_req *q_req)
/* zfcp_qdio_send - set PCI flag in first SBALE and send req to QDIO @qdio: pointer to struct zfcp_qdio @q_req: pointer to struct zfcp_queue_req Returns: 0 on success, error otherwise  */
int zfcp_qdio_send(struct zfcp_qdio *qdio, struct zfcp_queue_req *q_req)
{
	struct zfcp_qdio_queue *req_q = &qdio->req_q;
	int first = q_req->sbal_first;
	int count = q_req->sbal_number;
	int retval;
	unsigned int qdio_flags = QDIO_FLAG_SYNC_OUTPUT;
	zfcp_qdio_account(qdio);
	retval = do_QDIO(qdio->adapter->ccw_device, qdio_flags, 0, first,
			 count);
	if (unlikely(retval)) {
		zfcp_qdio_zero_sbals(req_q->sbal, first, count);
		return retval;
	}
	atomic_sub(count, &req_q->count);
	req_q->first += count;
	req_q->first %= QDIO_MAX_BUFFERS_PER_Q;
	return 0;
}