/*****************************************************************************/

/*
 *      dvdpcdev.h -- An add-on to handle packet command level ioctls on IDE 
 *                 DVD drives as a module. This is a very thin layer on 
 * 	           top of the Linux cdrom driver.
 *
 *      Copyright (C) 1999-2000  Sigma Designs
 *                    written by Emmanuel Michon <emmanuel_michon@sdesigns.com>
 *      Copyright (c) 1996, 1997 David A. van Leeuwen
 *      Copyright (c) 1997, 1998 Erik Andersen <andersee@debian.org>
 *      Copyright (c) 1998, 1999 Jens Axboe
 *
 *
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*****************************************************************************/

/*
 *  DVD packet command device node    (MAJOR,MINOR)  meaning
 *  /dev/dvdpc0                       (123,0)        the first ATAPI DVD drive
 *  /dev/dvdpc1                       (123,1)        the second ATAPI DVD drive
 *  ...and so on.
 */

#define DVDPC_DEVICE_NAME "dvdpc"
#define DVDPC_MAJOR 123
#define DVDPC_MINOR_DEV_MASK 3

typedef struct  dvdpc_dev_t_tag {
	struct file_operations *fops;
	
	ide_drive_t *handle;
	int opentimes;
} dvdpc_dev_t;

#define DVDPC_MAX_DEV 6

// this table stores up to DVDPC_MAX_DEV devices
extern dvdpc_dev_t dvdpc_dev_tab[DVDPC_MAX_DEV];
extern int dvdpc_dev_idx;
