Remove matcd. It isn't in the build, has issues and can be retired.
Submitted by: trhodes (the real one) Approved by: core, mdodd, uhclem
This commit is contained in:
parent
2948a1cb52
commit
bfd902391f
@ -1,102 +0,0 @@
|
||||
/*creative.h-------------------------------------------------------------------
|
||||
|
||||
Matsushita(Panasonic) / Creative CD-ROM Driver (matcd)
|
||||
Authored by Frank Durda IV
|
||||
*/
|
||||
/*-
|
||||
Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved.
|
||||
"FDIV" is a trademark of Frank Durda IV.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the author nor the names of their contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
See matcd.c for Edit History
|
||||
*/
|
||||
|
||||
/* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
These are the I/O port mapping offsets and bit assignments used by Creative
|
||||
Labs in their implementation of the host interface adapter for the Matsushita
|
||||
CD-ROM drive. These may be different in the adapter cards (including sound
|
||||
cards) made by other vendors. It is unknown if the Creative interface is
|
||||
based on a reference design provided by Matsushita. (If Matsushita did
|
||||
provide a reference design, you would expect adapters made by other vendors
|
||||
to be more compatible.)
|
||||
|
||||
Note that the Matsushita drives are actually capable of using DMA and
|
||||
generating interrupts, but none of the host adapters provide the circuitry
|
||||
needed to do DMA or generate interrupts.
|
||||
|
||||
See matcd.h for defines related to the drive command set.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Creative Labs (and compatible) host adapter I/O port mapping offsets
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define NUMPORTS 4 /*Four ports are decoded by the i/f*/
|
||||
|
||||
#define CMD 0 /*Write - commands*/
|
||||
#define DATA 0 /*Read - status from drive. Also for*/
|
||||
/*reading data on Creative adapters.*/
|
||||
#define PHASE 1 /*Write - switch between data/status*/
|
||||
#define STATUS 1 /*Read - bus status*/
|
||||
#define RESET 2 /*Write - reset all attached drives*/
|
||||
/*Any value written will reset*/
|
||||
#define ALTDATA 2 /*Read - data on non-Creative adaptrs.*/
|
||||
#define SELECT 3 /*Write - drive select*/
|
||||
|
||||
|
||||
/* Creative PHASE port bit assignments
|
||||
*/
|
||||
|
||||
#define PHASENA 1 /*Access data bytes instead of status*/
|
||||
/*on shared data/status port*/
|
||||
|
||||
|
||||
/* Creative STATUS port register bits
|
||||
*/
|
||||
|
||||
#define DTEN 2 /*When low, in data xfer phase*/
|
||||
#define STEN 4 /*When low, in status phase*/
|
||||
#define TEST 1 /*Function is unknown*/
|
||||
|
||||
|
||||
/* Creative drive SELECT port bit assignments
|
||||
Note that on the Creative host adapters, DS0==Bit 1 and
|
||||
DS1==Bit 0 (DS is Drive Select).
|
||||
*/
|
||||
|
||||
#define CRDRIVE0 0x00
|
||||
#define CRDRIVE1 0x02
|
||||
#define CRDRIVE2 0x01
|
||||
#define CRDRIVE3 0x03
|
||||
|
||||
/*End of creative.h*/
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,63 +0,0 @@
|
||||
/*matcd_data.h---------------------------------------------------------------
|
||||
|
||||
Matsushita(Panasonic) / Creative CD-ROM Driver (matcd)
|
||||
Authored by Frank Durda IV
|
||||
*/
|
||||
/*-
|
||||
Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved.
|
||||
"FDIV" is a trademark of Frank Durda IV.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the author nor the names of their contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
See matcd.c for Edit History
|
||||
*/
|
||||
|
||||
/* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Structures common in matcd.c and matcd_isa.c
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* This structure is a creation required by the newer FreeBSD 5.0 bus
|
||||
abstraction. Mainly used by all *_isa_*, attach and probe functions.
|
||||
*/
|
||||
|
||||
struct matcd_softc {
|
||||
device_t dev;
|
||||
struct cdev *matcd_dev_t;
|
||||
struct resource * port;
|
||||
int port_rid;
|
||||
int port_type;
|
||||
bus_space_tag_t port_bst;
|
||||
bus_space_handle_t port_bsh;
|
||||
};
|
||||
|
||||
/*End of matcd_data.h*/
|
||||
|
@ -1,200 +0,0 @@
|
||||
/*- matcd_isa.c---------------------------------------------------------------
|
||||
|
||||
Matsushita(Panasonic) / Creative CD-ROM Driver (matcd)
|
||||
Authored by Frank Durda IV
|
||||
*/
|
||||
/*-
|
||||
Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved.
|
||||
"FDIV" is a trademark of Frank Durda IV.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the author nor the names of their contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/bio.h>
|
||||
#include <sys/cdio.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
|
||||
#include <machine/bus_pio.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <isa/isavar.h>
|
||||
|
||||
#include <dev/matcd/options.h>
|
||||
#include <dev/matcd/matcd_data.h>
|
||||
|
||||
extern int matcd_probe(struct matcd_softc *sc);
|
||||
extern int matcd_attach(struct matcd_softc *sc);
|
||||
|
||||
static int matcd_isa_probe (device_t);
|
||||
static int matcd_isa_attach (device_t);
|
||||
static int matcd_isa_detach (device_t);
|
||||
|
||||
static int matcd_alloc_resources (device_t);
|
||||
static void matcd_release_resources (device_t);
|
||||
|
||||
|
||||
static int matcd_isa_probe (device_t dev)
|
||||
{
|
||||
struct matcd_softc * sc;
|
||||
int error;
|
||||
|
||||
/*Any Plug aNd Pray Support?*/
|
||||
if (isa_get_vendorid(dev)) {
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
if (bus_get_resource_start(dev,SYS_RES_IOPORT,0)==0) {
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
sc->dev=dev;
|
||||
sc->port_rid=0;
|
||||
sc->port_type=SYS_RES_IOPORT;
|
||||
|
||||
error=matcd_alloc_resources(dev);
|
||||
if (error==0) {
|
||||
error = matcd_probe(sc);
|
||||
#if 0
|
||||
if (error==0) {
|
||||
device_set_desc(dev, "Matsushita CR-562/CR-563");
|
||||
}
|
||||
#endif /*0*/
|
||||
}
|
||||
matcd_release_resources(dev);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
static int matcd_isa_attach (device_t dev)
|
||||
{
|
||||
struct matcd_softc * sc;
|
||||
int error;
|
||||
|
||||
sc=device_get_softc(dev);
|
||||
error=0;
|
||||
|
||||
sc->dev=dev;
|
||||
sc->port_rid=0;
|
||||
sc->port_type=SYS_RES_IOPORT;
|
||||
|
||||
error=matcd_alloc_resources(dev);
|
||||
if (error==0) {
|
||||
error=matcd_probe(sc); /*Redundant Probe*/
|
||||
if (error==0) {
|
||||
error=matcd_attach(sc);
|
||||
if (error==0) {
|
||||
return(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
matcd_release_resources(dev);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
static int matcd_isa_detach (device_t dev)
|
||||
{
|
||||
struct matcd_softc * sc;
|
||||
|
||||
sc=device_get_softc(dev);
|
||||
destroy_dev(sc->matcd_dev_t);
|
||||
matcd_release_resources(dev);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static int matcd_alloc_resources (device_t dev)
|
||||
{
|
||||
struct matcd_softc * sc;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
if (sc->port_type) {
|
||||
sc->port=bus_alloc_resource_any(dev, sc->port_type,
|
||||
&sc->port_rid, RF_ACTIVE);
|
||||
if (sc->port == NULL) {
|
||||
device_printf(dev,
|
||||
"Port resource not available.\n");
|
||||
return(ENOMEM);
|
||||
}
|
||||
sc->port_bst = rman_get_bustag(sc->port);
|
||||
sc->port_bsh = rman_get_bushandle(sc->port);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static void matcd_release_resources (device_t dev)
|
||||
{
|
||||
struct matcd_softc * sc;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
if (sc->port) {
|
||||
bus_release_resource(dev, sc->port_type, sc->port_rid,
|
||||
sc->port);
|
||||
sc->port_bst=0;
|
||||
sc->port_bsh=0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static device_method_t matcd_isa_methods[] = {
|
||||
DEVMETHOD(device_probe, matcd_isa_probe),
|
||||
DEVMETHOD(device_attach, matcd_isa_attach),
|
||||
DEVMETHOD(device_detach, matcd_isa_detach),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t matcd_isa_driver = {
|
||||
"matcd",
|
||||
matcd_isa_methods,
|
||||
sizeof(struct matcd_softc)
|
||||
};
|
||||
|
||||
static devclass_t matcd_devclass;
|
||||
|
||||
DRIVER_MODULE(matcd, isa, matcd_isa_driver, matcd_devclass, NULL, 0);
|
||||
|
||||
/*End of matcd_isa.c*/
|
||||
|
@ -1,160 +0,0 @@
|
||||
/*matcddrv.h------------------------------------------------------------------
|
||||
|
||||
Matsushita(Panasonic) / Creative CD-ROM Driver (matcd)
|
||||
Authored by Frank Durda IV
|
||||
*/
|
||||
/*-
|
||||
Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved.
|
||||
"FDIV" is a trademark of Frank Durda IV.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the author nor the names of their contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
See matcd.c for Edit History information.
|
||||
*/
|
||||
|
||||
/* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Matsushita CR562/CR563 Commands
|
||||
|
||||
These equates are for commands accepted by the Matsushita drive.
|
||||
This is not a complete list - just the ones that this driver uses.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define NOP 0x05 /*No action - just return status*/
|
||||
#define DOOROPEN 0x06 /*Open tray*/
|
||||
#define DOORCLOSE 0x07 /*Close tray*/
|
||||
#define ABORT 0x08 /*Abort command*/
|
||||
#define MODESELECT 0x09 /*Set drive parameters*/
|
||||
#define LOCK 0x0c /*Prevent/Allow medium removal*/
|
||||
#define PAUSE 0x0d /*Pause/Resume playback*/
|
||||
#define PLAYBLOCKS 0x0e /*Play audio - block to block range*/
|
||||
#define PLAYTRKS 0x0f /*Play audio - tracks & index*/
|
||||
#define READ 0x10 /*Read data*/
|
||||
#define READERROR 0x82 /*Read Error*/
|
||||
#define READID 0x83 /*Read Drive Type & Firmware Info*/
|
||||
#define MODESENSE 0x84 /*Report drive settings*/
|
||||
#define READSUBQ 0x87 /*Read Q channel information*/
|
||||
#define READDINFO 0x8b /*Read TOC tracks & drive size*/
|
||||
#define READTOC 0x8c /*Read entry from TOC*/
|
||||
|
||||
#define BLOCKPARAM 0x00 /*Used with MODESELECT command*/
|
||||
#define SPEEDPARM 0x03 /*Adjust audio playback speed*/
|
||||
#define AUDIOPARM 0x05 /*Set/read audio levels & routing*/
|
||||
#define RESUME 0x80 /*Used with PAUSE command*/
|
||||
|
||||
#define MAXCMDSIZ 12 /*Max command size with NULL*/
|
||||
|
||||
/* Possible data transfers for MODESELECT + BLOCKPARAM */
|
||||
|
||||
#define MODE_DATA 0x00 /*2048, 2340*/
|
||||
#define MODE_DA 0x82 /*2352*/
|
||||
#define MODE_USER 0x01 /*2048, 2052, 2336, 2340, 2352*/
|
||||
#define MODE_UNKNOWN 0xff /*Uninitialized state*/
|
||||
#define MODE_XA 0x81 /*2048, 2060, 2324, 2336, 2340, 2352*/
|
||||
/*The driver does not implement XA.*/
|
||||
#define DEFVOL 0xff /*Default drive volume level, 100%
|
||||
volume. Based on drive action.*/
|
||||
#define OUTLEFT 0x01 /*Output on Left*/
|
||||
#define OUTRIGHT 0x02 /*Output on Right*/
|
||||
|
||||
|
||||
/* Matsushita CR562/CR563 Status bits*/
|
||||
|
||||
#define MATCD_ST_DOOROPEN 0x80 /*Door is open right now*/
|
||||
#define MATCD_ST_DSKIN 0x40 /*Disc in drive*/
|
||||
#define MATCD_ST_SPIN 0x20 /*Disc is spinning*/
|
||||
#define MATCD_ST_ERROR 0x10 /*Error on command*/
|
||||
#define MATCD_ST_AUDIOBSY 0x08 /*Drive is playing audio*/
|
||||
#define MATCD_ST_LOCK 0x04 /*Drive is locked*/
|
||||
#define MATCD_ST_X2 0x02 /*Media is at double-speed*/
|
||||
#define MATCD_ST_READY 0x01 /*Drive is ready*/
|
||||
|
||||
|
||||
/* Error codes returned from READERROR command.
|
||||
(The hardware vendor did not provide any additional information
|
||||
on what conditions generate these errors.)
|
||||
*/
|
||||
|
||||
#define NO_ERROR 0x00
|
||||
#define RECV_RETRY 0x01
|
||||
#define RECV_ECC 0x02
|
||||
#define NOT_READY 0x03
|
||||
#define TOC_ERROR 0x04
|
||||
#define UNRECV_ERROR 0x05
|
||||
#define SEEK_ERROR 0x06
|
||||
#define TRACK_ERROR 0x07
|
||||
#define RAM_ERROR 0x08
|
||||
#define DIAG_ERROR 0x09
|
||||
#define FOCUS_ERROR 0x0a
|
||||
#define CLV_ERROR 0x0b
|
||||
#define DATA_ERROR 0x0c
|
||||
#define ADDRESS_ERROR 0x0d
|
||||
#define CDB_ERROR 0x0e
|
||||
#define END_ADDRESS 0x0f
|
||||
#define MODE_ERROR 0x10
|
||||
#define MEDIA_CHANGED 0x11
|
||||
#define HARD_RESET 0x12
|
||||
#define ROM_ERROR 0x13
|
||||
#define CMD_ERROR 0x14
|
||||
#define DISC_OUT 0x15
|
||||
#define HARD_ERROR 0x16
|
||||
#define ILLEGAL_REQ 0x17
|
||||
|
||||
|
||||
/* Human-readable error messages - what a concept!*/
|
||||
|
||||
static unsigned char * matcderrors[]={"No error", /* 00 */
|
||||
"Soft read error after retry", /* 01 */
|
||||
"Soft read error after error-correction", /* 02 */
|
||||
"Not ready", /* 03 */
|
||||
"Unable to read TOC", /* 04 */
|
||||
"Hard read error of data track",/* 05 */
|
||||
"Seek did not complete", /* 06 */
|
||||
"Tracking servo failure", /* 07 */
|
||||
"Drive RAM failure", /* 08 */
|
||||
"Drive self-test failed", /* 09 */
|
||||
"Focusing servo failure", /* 0a */
|
||||
"Spindle servo failure", /* 0b */
|
||||
"Data path failure", /* 0c */
|
||||
"Illegal logical block address",/* 0d */
|
||||
"Illegal field in CDB", /* 0e */
|
||||
"End of user encountered on this track", /* 0f */
|
||||
"Illegal data mode for this track", /* 10 */
|
||||
"Media changed", /* 11 */
|
||||
"Power-on or drive reset occurred", /* 12 */
|
||||
"Drive ROM failure", /* 13 */
|
||||
"Illegal drive command received from host",/* 14 */
|
||||
"Disc removed during operation",/* 15 */
|
||||
"Drive Hardware error", /* 16 */
|
||||
"Illegal request from host"}; /* 17 */
|
||||
|
||||
/*End of matcddrv.h*/
|
||||
|
@ -1,235 +0,0 @@
|
||||
/*options.h--------------------------------------------------------------------
|
||||
|
||||
Matsushita(Panasonic) / Creative CD-ROM Driver (matcd)
|
||||
Authored by Frank Durda IV
|
||||
*/
|
||||
/*-
|
||||
Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved.
|
||||
"FDIV" is a trademark of Frank Durda IV.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the author nor the names of their contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
See matcd.c for Edit History
|
||||
*/
|
||||
|
||||
/* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Conditional compilation flags - change to suit your system
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/* AUTOHUNT Adds extra code that allows the driver to search
|
||||
for interface cards rather than having to hard-code
|
||||
the locations in the kernel /boot/device.hint file,
|
||||
which is only read at boot-time.
|
||||
|
||||
Leaving AUTOHUNT enabled is the recommended setting.
|
||||
*/
|
||||
|
||||
/*#define AUTOHUNT*/
|
||||
|
||||
|
||||
/* NUMCTRLRS Configures support for between one and four host
|
||||
interfaces, for up to 16 drives. The number of
|
||||
entries in the kernel config file is used by default,
|
||||
but this may be changed to a specific value if
|
||||
desired. The number of controllers cannot exceed 4.
|
||||
|
||||
Setting the value smaller than four slightly reduces
|
||||
the amount of memory used by the driver, but since
|
||||
the driver is under 30K, it probably isn't worth
|
||||
changing.
|
||||
*/
|
||||
|
||||
#define NUMCTRLRS 4 /*Limit driver to four host interfaces*/
|
||||
|
||||
|
||||
/* FULLDRIVER If not set, the audio, non-data functions and some
|
||||
error recovery functions are eliminated from the
|
||||
compiled driver. The resulting driver will be smaller,
|
||||
savings which may be needed on a boot or fixit floppy.
|
||||
|
||||
Leaving FULLDRIVER enabled is the recommended setting.
|
||||
*/
|
||||
|
||||
#ifndef BOOTMFS
|
||||
#define FULLDRIVER
|
||||
#endif /*BOOTMFS*/
|
||||
|
||||
|
||||
/* RESETONBOOT This setting causes the driver to reset the drive(s)
|
||||
during probing. This causes any audio playback to be
|
||||
aborted and the drives will close their trays if they
|
||||
are open.
|
||||
|
||||
Leaving RESETONBOOT enabled is the recommended setting.
|
||||
*/
|
||||
|
||||
#define RESETONBOOT
|
||||
|
||||
|
||||
/* LOCKDRIVE If enabled, when a drive is opened using a minor
|
||||
number greater than 127, the drive door is locked.
|
||||
The drive door remains locked until all partitions on
|
||||
on the drive are closed. The EJECT, ALLOW and PREVENT
|
||||
ioctls are refused when this locking mechanism is
|
||||
active. The additional code for this feature is small.
|
||||
|
||||
Leaving LOCKDRIVE enabled is the recommended setting.
|
||||
*/
|
||||
|
||||
#define LOCKDRIVE
|
||||
|
||||
/* KRYTEN This enables a bug that someone might consider to be a
|
||||
a feature. If KRYTEN is enabled and you are playing
|
||||
audio and you issue the resume-play ioctl, the audio
|
||||
will stutter, playing the same quarter of a second or
|
||||
so of audio several times before resuming normally.
|
||||
Resuming from a pause never causes the stutter.
|
||||
See Edit History for Edit 14.
|
||||
|
||||
Leaving KRYTEN disabled is the recommended setting.
|
||||
*/
|
||||
|
||||
/*#define KRYTEN*/
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
This structure contains the hints for where we should look for the
|
||||
host adapter. If you want to change where the driver searches or
|
||||
reduce the places searched to avoid confusing some other device,
|
||||
either specify explicit addresses in the /boot/device.hints file
|
||||
(preferred) or change this array.
|
||||
|
||||
If the /boot/device.hints config file has multiple ? entries for
|
||||
the matcd driver, the probe routines will use this table multiple
|
||||
times and will eliminate each failed entry that probe tries.
|
||||
|
||||
WARNING: The number of controller entries for this driver in
|
||||
/boot/device.hints must be less than or equal to the number of hints
|
||||
if hints are used.
|
||||
|
||||
If you add entries to the table, add them immediately before
|
||||
the -1 end-of-table marker. The values already present are
|
||||
the ones used by Creative Labs boards and those of a few
|
||||
other vendors.
|
||||
|
||||
Each additional entry increases the boot time by four seconds,
|
||||
and can increase the chance of accessing some other device by mistake.
|
||||
Therefore, the list should be kept to a minimum. Once the
|
||||
devices have been correctly located, the system should be
|
||||
configured so that it looks only at the correct location from
|
||||
that point on.
|
||||
|
||||
Be sure to search devices located below 0x3ff BEFORE scanning
|
||||
higher locations. Some boards don't decode all I/O address lines,
|
||||
so 0x230 and 0x630 appear identical on the simpler boards.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef AUTOHUNT
|
||||
#ifdef DRIVESPERC /*Declared only when compiling matcd.c*/
|
||||
int port_hints[]={
|
||||
0x230, /*SB Pro & SB16*/
|
||||
0x240, /*SB Pro & SB16*/
|
||||
0x250, /*Creative omniCD standalone boards*/
|
||||
0x260, /*Creative omniCD standalone boards*/
|
||||
0x340, /*Laser Mate*/
|
||||
0x360, /*Laser Mate*/
|
||||
0x630, /*IBM*/
|
||||
#if 0
|
||||
/* These locations are alternate settings for LaserMate and IBM
|
||||
boards, but they usually conflict with network and SCSI cards.
|
||||
I recommend against probing these randomly.
|
||||
*/
|
||||
0x310, /*Laser Mate*/
|
||||
0x320, /*Laser Mate*/
|
||||
0x330, /*Laser Mate*/
|
||||
0x350, /*Laser Mate*/
|
||||
0x370, /*Laser Mate*/
|
||||
0x650, /*IBM*/
|
||||
0x670, /*IBM*/
|
||||
0x690, /*IBM*/
|
||||
#endif /*0*/
|
||||
-1}; /*use. Table MUST end with -1*/
|
||||
#endif /*DRIVESPERC*/
|
||||
#endif /*AUTOHUNT*/
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Debugging flags - Turn these on only if you are looking at a
|
||||
problem.
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
/* DEBUGOPEN If enabled, debug messages for open and close
|
||||
operations.
|
||||
*/
|
||||
|
||||
/*#define DEBUGOPEN*/
|
||||
|
||||
|
||||
/* DEBUGIO If enabled, reports on calls to strategy, start
|
||||
and other I/O related functions.
|
||||
*/
|
||||
|
||||
/*#define DEBUGIO*/
|
||||
|
||||
|
||||
/* DEBUGCMD If enabled, shows the actual commands being issued
|
||||
to the CD-ROM drives.
|
||||
*/
|
||||
|
||||
/*#define DEBUGCMD*/
|
||||
|
||||
|
||||
/* DEBUGSLEEP If enabled, reports on timeouts, wakeups, dropped
|
||||
threads, etc.
|
||||
*/
|
||||
|
||||
/*#define DEBUGSLEEP*/
|
||||
|
||||
|
||||
/* DEBUGIOCTL If enabled, reports on the various ioctl-related
|
||||
calls and operations. You might have to enable
|
||||
DEBUGCMD as well to get enough debugging information.
|
||||
*/
|
||||
|
||||
/*#define DEBUGIOCTL*/
|
||||
|
||||
|
||||
/* DEBUGPROBE If enabled, reports on the process of locating
|
||||
adapters and drives. The debugging in matcdprobe()
|
||||
and matcdattach() routines is enabled with this
|
||||
flag.
|
||||
*/
|
||||
|
||||
/*#define DEBUGPROBE*/
|
||||
|
||||
/*End of options.h*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user