Deleted Added
full compact
mcd.c (5177) mcd.c (5178)
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 by Andrew A. Chernov
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 by Andrew A. Chernov
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.32 1994/11/14 19:32:11 ache Exp $
43 * $Id: mcd.c,v 1.33 1994/12/21 15:12:41 ache Exp $
44 */
45static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
46
47#include "mcd.h"
48#if NMCD > 0
49#include <sys/types.h>
50#include <sys/param.h>
51#include <sys/systm.h>

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

663 */
664 for (i = 1000000; i != 0; i--)
665 inb(port+MCD_FLAGS);
666
667 /* Get status */
668 outb(port+MCD_DATA, MCD_CMDGETSTAT);
669 if (!twiddle_thumbs(port, unit, 1000000, "getting status"))
670 return 0; /* Timeout */
44 */
45static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
46
47#include "mcd.h"
48#if NMCD > 0
49#include <sys/types.h>
50#include <sys/param.h>
51#include <sys/systm.h>

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

663 */
664 for (i = 1000000; i != 0; i--)
665 inb(port+MCD_FLAGS);
666
667 /* Get status */
668 outb(port+MCD_DATA, MCD_CMDGETSTAT);
669 if (!twiddle_thumbs(port, unit, 1000000, "getting status"))
670 return 0; /* Timeout */
671 status = inb(port+MCD_DATA);
672 if (status != MCDCDABSENT && status != MCDCDPRESENT &&
673 status != MCDSOPEN && status != MCDSCLOSED)
674 return 0; /* Not actually a Mitsumi drive here */
675 /* Get version information */
676 outb(port+MCD_DATA, MCD_CMDCONTINFO);
677 for (j = 0; j < 3; j++) {
678 if (!twiddle_thumbs(port, unit, 3000, "getting version info"))
679 return 0;
680 stbytes[j] = (inb(port+MCD_DATA) & 0xFF);
681 }
671 /* Get version information */
672 outb(port+MCD_DATA, MCD_CMDCONTINFO);
673 for (j = 0; j < 3; j++) {
674 if (!twiddle_thumbs(port, unit, 3000, "getting version info"))
675 return 0;
676 stbytes[j] = (inb(port+MCD_DATA) & 0xFF);
677 }
678 if (stbytes[1] == stbytes[2])
679 return 0;
682 printf("mcd%d: version information is %c %x\n", unit,
683 stbytes[1], stbytes[2]);
684 if (stbytes[2] >= 4) {
685 outb(port+MCD_CTRL, M_PICKLE);
686 mcd_data[unit].flags |= MCDNEWMODEL;
687 printf("mcd%d: Adjusted for newer drive model\n", unit);
688 }
689 switch (stbytes[1]) {

--- 836 unchanged lines hidden ---
680 printf("mcd%d: version information is %c %x\n", unit,
681 stbytes[1], stbytes[2]);
682 if (stbytes[2] >= 4) {
683 outb(port+MCD_CTRL, M_PICKLE);
684 mcd_data[unit].flags |= MCDNEWMODEL;
685 printf("mcd%d: Adjusted for newer drive model\n", unit);
686 }
687 switch (stbytes[1]) {

--- 836 unchanged lines hidden ---