Deleted Added
full compact
fdc.c (16359) fdc.c (17256)
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Don Ahn.
7 *
8 * Copyright (c) 1993, 1994 by

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

38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Don Ahn.
7 *
8 * Copyright (c) 1993, 1994 by

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

38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91
46 * $Id: fd.c,v 1.89 1996/05/03 20:15:11 phk Exp $
46 * $Id: fd.c,v 1.1.1.1 1996/06/14 10:04:43 asami Exp $
47 *
48 */
49
50#include "ft.h"
51#if NFT < 1
52#undef NFDC
53#endif
54#include "fd.h"

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

425#define STARTRECAL 6
426#define RESETCTLR 7
427#define SEEKWAIT 8
428#define RECALWAIT 9
429#define MOTORWAIT 10
430#define IOTIMEDOUT 11
431
432#ifdef DEBUG
47 *
48 */
49
50#include "ft.h"
51#if NFT < 1
52#undef NFDC
53#endif
54#include "fd.h"

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

425#define STARTRECAL 6
426#define RESETCTLR 7
427#define SEEKWAIT 8
428#define RECALWAIT 9
429#define MOTORWAIT 10
430#define IOTIMEDOUT 11
431
432#ifdef DEBUG
433char *fdstates[] =
433static char const * const fdstates[] =
434{
435"DEVIDLE",
436"FINDWORK",
437"DOSEEK",
438"SEEKCOMPLETE",
439"IOCOMPLETE",
440"RECALCOMPLETE",
441"STARTRECAL",
442"RESETCTLR",
443"SEEKWAIT",
444"RECALWAIT",
445"MOTORWAIT",
446"IOTIMEDOUT"
447};
448
449/* CAUTION: fd_debug causes huge amounts of logging output */
434{
435"DEVIDLE",
436"FINDWORK",
437"DOSEEK",
438"SEEKCOMPLETE",
439"IOCOMPLETE",
440"RECALCOMPLETE",
441"STARTRECAL",
442"RESETCTLR",
443"SEEKWAIT",
444"RECALWAIT",
445"MOTORWAIT",
446"IOTIMEDOUT"
447};
448
449/* CAUTION: fd_debug causes huge amounts of logging output */
450int fd_debug = 0;
450static int volatile fd_debug = 0;
451#define TRACE0(arg) if(fd_debug) printf(arg)
452#define TRACE1(arg1, arg2) if(fd_debug) printf(arg1, arg2)
453#else /* DEBUG */
454#define TRACE0(arg)
455#define TRACE1(arg1, arg2)
456#endif /* DEBUG */
457
458/* autoconfig structure */

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

781fdattach(struct isa_device *dev)
782#endif
783{
784 unsigned fdt;
785 fdu_t fdu;
786 fdcu_t fdcu = dev->id_unit;
787 fdc_p fdc = fdc_data + fdcu;
788 fd_p fd;
451#define TRACE0(arg) if(fd_debug) printf(arg)
452#define TRACE1(arg1, arg2) if(fd_debug) printf(arg1, arg2)
453#else /* DEBUG */
454#define TRACE0(arg)
455#define TRACE1(arg1, arg2)
456#endif /* DEBUG */
457
458/* autoconfig structure */

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

781fdattach(struct isa_device *dev)
782#endif
783{
784 unsigned fdt;
785 fdu_t fdu;
786 fdcu_t fdcu = dev->id_unit;
787 fdc_p fdc = fdc_data + fdcu;
788 fd_p fd;
789 int fdsu, st0, st3, i, unithasfd;
789 int fdsu, st0, st3, i;
790#if NFT > 0
791 int unithasfd;
792#endif
790#ifdef PC98
791 struct pc98_device *fdup;
792#else
793 struct isa_device *fdup;
794#endif
795 int ic_type = 0;
796#ifdef DEVFS
797 int mynor;

--- 1692 unchanged lines hidden ---
793#ifdef PC98
794 struct pc98_device *fdup;
795#else
796 struct isa_device *fdup;
797#endif
798 int ic_type = 0;
799#ifdef DEVFS
800 int mynor;

--- 1692 unchanged lines hidden ---