/* Feed the tape device CCW queue with requests supplied in a list.  */
static int tapeblock_start_request(struct tape_device *device, struct request *req)
/* Feed the tape device CCW queue with requests supplied in a list.  */
static int tapeblock_start_request(struct tape_device *device, struct request *req)
{
	struct tape_request *	ccw_req;
	int			rc;
	DBF_LH(6, "tapeblock_start_request(%p, %p)\n", device, req);
	ccw_req = device->discipline->bread(device, req);
	if (IS_ERR(ccw_req)) {
		DBF_EVENT(1, "TBLOCK: bread failed\n");
		blk_end_request_all(req, -EIO);
		return PTR_ERR(ccw_req);
	}
	ccw_req->callback = __tapeblock_end_request;
	ccw_req->callback_data = (void *) req;
	ccw_req->retries = TAPEBLOCK_RETRIES;
	rc = tape_do_io_async(device, ccw_req);
	if (rc) {
		blk_end_request_all(req, -EIO);
		device->discipline->free_bread(ccw_req);
	}
	return rc;
}