Deleted Added
full compact
mcd.c (37618) mcd.c (40565)
1/*
2 * Copyright 1993 by Holger Veit (data part)
3 * Copyright 1993 by Brian Moore (audio part)
4 * Changes Copyright 1993 by Gary Clark II
5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia
6 *
7 * Rewrote probe routine to work on newer Mitsumi drives.
8 * Additional changes (C) 1994 by Jordan K. Hubbard

--- 26 unchanged lines hidden (view full) ---

35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 *
1/*
2 * Copyright 1993 by Holger Veit (data part)
3 * Copyright 1993 by Brian Moore (audio part)
4 * Changes Copyright 1993 by Gary Clark II
5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia
6 *
7 * Rewrote probe routine to work on newer Mitsumi drives.
8 * Additional changes (C) 1994 by Jordan K. Hubbard

--- 26 unchanged lines hidden (view full) ---

35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 *
43 * $Id: mcd.c,v 1.99 1998/07/04 22:30:17 julian Exp $
43 * $Id: mcd.c,v 1.100 1998/07/13 09:53:01 bde Exp $
44 */
45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
46
47#include "mcd.h"
48#if NMCD > 0
49#include "opt_devfs.h"
50
51#include <sys/param.h>

--- 121 unchanged lines hidden (view full) ---

173#endif
174static int mcd_get(int unit, char *buf, int nmax);
175static int mcd_setflags(int unit,struct mcd_data *cd);
176static int mcd_getstat(int unit,int sflg);
177static int mcd_send(int unit, int cmd,int nretrys);
178static void hsg2msf(int hsg, bcd_t *msf);
179static int msf2hsg(bcd_t *msf, int relative);
180static int mcd_volinfo(int unit);
44 */
45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
46
47#include "mcd.h"
48#if NMCD > 0
49#include "opt_devfs.h"
50
51#include <sys/param.h>

--- 121 unchanged lines hidden (view full) ---

173#endif
174static int mcd_get(int unit, char *buf, int nmax);
175static int mcd_setflags(int unit,struct mcd_data *cd);
176static int mcd_getstat(int unit,int sflg);
177static int mcd_send(int unit, int cmd,int nretrys);
178static void hsg2msf(int hsg, bcd_t *msf);
179static int msf2hsg(bcd_t *msf, int relative);
180static int mcd_volinfo(int unit);
181static ointhand2_t mcdintr;
181static int mcd_waitrdy(int port,int dly);
182static timeout_t mcd_timeout;
183static void mcd_doread(int state, struct mcd_mbx *mbxin);
184static void mcd_soft_reset(int unit);
185static int mcd_hard_reset(int unit);
186static int mcd_setmode(int unit, int mode);
187static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
188static int mcd_subchan(int unit, struct ioc_read_subchannel *sc);

--- 55 unchanged lines hidden (view full) ---

244#define MIN_DELAY 15
245#define DELAY_GETREPLY 5000000
246
247int mcd_attach(struct isa_device *dev)
248{
249 int unit = dev->id_unit;
250 struct mcd_data *cd = mcd_data + unit;
251
182static int mcd_waitrdy(int port,int dly);
183static timeout_t mcd_timeout;
184static void mcd_doread(int state, struct mcd_mbx *mbxin);
185static void mcd_soft_reset(int unit);
186static int mcd_hard_reset(int unit);
187static int mcd_setmode(int unit, int mode);
188static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
189static int mcd_subchan(int unit, struct ioc_read_subchannel *sc);

--- 55 unchanged lines hidden (view full) ---

245#define MIN_DELAY 15
246#define DELAY_GETREPLY 5000000
247
248int mcd_attach(struct isa_device *dev)
249{
250 int unit = dev->id_unit;
251 struct mcd_data *cd = mcd_data + unit;
252
253 dev->id_ointr = mcdintr;
252 cd->iobase = dev->id_iobase;
253 cd->flags |= MCDINIT;
254 mcd_soft_reset(unit);
255 bufq_init(&cd->head);
256
257#ifdef NOTYET
258 /* wire controller for interrupts and dma */
259 mcd_configure(cd);

--- 712 unchanged lines hidden (view full) ---

972 ) {
973 cd->flags |= MCDVOLINFO; /* volinfo is OK */
974 return 0;
975 }
976
977 return EINVAL;
978}
979
254 cd->iobase = dev->id_iobase;
255 cd->flags |= MCDINIT;
256 mcd_soft_reset(unit);
257 bufq_init(&cd->head);
258
259#ifdef NOTYET
260 /* wire controller for interrupts and dma */
261 mcd_configure(cd);

--- 712 unchanged lines hidden (view full) ---

974 ) {
975 cd->flags |= MCDVOLINFO; /* volinfo is OK */
976 return 0;
977 }
978
979 return EINVAL;
980}
981
980void
982static void
981mcdintr(unit)
982 int unit;
983{
984 MCD_TRACE("stray interrupt\n");
985}
986
987/* state machine to process read requests
988 * initialize with MCD_S_BEGIN: calculate sizes, and read status

--- 876 unchanged lines hidden ---
983mcdintr(unit)
984 int unit;
985{
986 MCD_TRACE("stray interrupt\n");
987}
988
989/* state machine to process read requests
990 * initialize with MCD_S_BEGIN: calculate sizes, and read status

--- 876 unchanged lines hidden ---