Module Name:    src
Committed By:   jdolecek
Date:           Sun Oct  8 19:00:29 UTC 2017

Modified Files:
        src/sys/dev/ata: ata.c ataconf.h files.ata

Log Message:
as a stopgap measure, include necessary parts of dev/ata/ata.c even
if no atabus is configured, so that kernels with just 'wd* at umass?'
and no atabus compile; fixes kernel builds for vax, pmax and evbmips
after NCQ branch merge

XXX wd* at umass? still actually untested after the merge, need to discuss
XXX what to do with it


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/ata/ata.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ata/ataconf.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ata/files.ata

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.134 src/sys/dev/ata/ata.c:1.135
--- src/sys/dev/ata/ata.c:1.134	Sun Oct  8 04:52:33 2017
+++ src/sys/dev/ata/ata.c	Sun Oct  8 19:00:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.134 2017/10/08 04:52:33 mlelstv Exp $	*/
+/*	$NetBSD: ata.c,v 1.135 2017/10/08 19:00:29 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.134 2017/10/08 04:52:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.135 2017/10/08 19:00:29 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -83,6 +83,7 @@ int atadebug_mask = ATADEBUG_MASK;
 #define ATADEBUG_PRINT(args, level)
 #endif
 
+#if NATABUS
 static ONCE_DECL(ata_init_ctrl);
 
 /*
@@ -185,6 +186,7 @@ ataprint(void *aux, const char *pnp)
 
 	return (UNCONF);
 }
+#endif /* NATABUS */
 
 static void
 ata_queue_reset(struct ata_queue *chq)
@@ -347,6 +349,14 @@ ata_channel_init(struct ata_channel *chp
 	cv_init(&chp->ch_thr_idle, "atath");
 }
 
+void
+ata_channel_destroy(struct ata_channel *chp)
+{
+	mutex_destroy(&chp->ch_lock);
+	cv_destroy(&chp->ch_thr_idle);
+}
+
+#if NATABUS
 /*
  * ata_channel_attach:
  *
@@ -366,13 +376,6 @@ ata_channel_attach(struct ata_channel *c
 		atabusprint);
 }
 
-void
-ata_channel_destroy(struct ata_channel *chp)
-{
-	mutex_destroy(&chp->ch_lock);
-	cv_destroy(&chp->ch_thr_idle);
-}
-
 /*
  * ata_channel_detach:
  *
@@ -1428,6 +1431,7 @@ ata_xfer_start(struct ata_xfer *xfer)
 
 	return rv;
 }
+#endif /* NATABUS */
 
 /*
  * Does it's own locking, does not require splbio().
@@ -1549,6 +1553,7 @@ out:
 	ata_channel_unlock(chp);
 }
 
+#if NATABUS
 static void
 ata_activate_xfer_locked(struct ata_channel *chp, struct ata_xfer *xfer)
 {
@@ -2547,6 +2552,7 @@ atacmd_toncq(struct ata_xfer *xfer, uint
 	if (xfer->c_bio.flags & ATA_FUA)
 		*device |= WDSD_FUA;
 }
+#endif /* NATABUS */
 
 /*
  * Must be called without any locks, i.e. with both drive and channel locks
@@ -2613,6 +2619,7 @@ ata_channel_lock_owned(struct ata_channe
 	KASSERT(mutex_owned(&chp->ch_lock));
 }
 
+#if NATABUS
 void
 ata_wait_xfer(struct ata_channel *chp, struct ata_xfer *xfer)
 {
@@ -2628,3 +2635,4 @@ ata_wake_xfer(struct ata_channel *chp, s
 
 	cv_signal(&xfer->c_finish);
 }
+#endif /* NATABUS */

Index: src/sys/dev/ata/ataconf.h
diff -u src/sys/dev/ata/ataconf.h:1.3 src/sys/dev/ata/ataconf.h:1.4
--- src/sys/dev/ata/ataconf.h:1.3	Fri Feb 13 22:41:04 2009
+++ src/sys/dev/ata/ataconf.h	Sun Oct  8 19:00:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ataconf.h,v 1.3 2009/02/13 22:41:04 apb Exp $	*/
+/*	$NetBSD: ataconf.h,v 1.4 2017/10/08 19:00:29 jdolecek Exp $	*/
 
 /*
  * Written in 2006 by ITOH Yasufumi.
@@ -18,6 +18,7 @@
 # define NATA_DMA	1
 # define NATA_UDMA	1
 # define NATA_PIOBM	1
+# define NATABUS	1
 
 #else
 

Index: src/sys/dev/ata/files.ata
diff -u src/sys/dev/ata/files.ata:1.25 src/sys/dev/ata/files.ata:1.26
--- src/sys/dev/ata/files.ata:1.25	Sat Oct  7 16:05:32 2017
+++ src/sys/dev/ata/files.ata	Sun Oct  8 19:00:29 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ata,v 1.25 2017/10/07 16:05:32 jdolecek Exp $
+#	$NetBSD: files.ata,v 1.26 2017/10/08 19:00:29 jdolecek Exp $
 #
 # Config file and device description for machine-independent devices
 # which attach to ATA busses.  Included by ports that need it.  Ports
@@ -14,7 +14,7 @@ file	dev/ata/ata_wdc.c		wd & atabus & wd
 defflag	opt_wd.h	WD_SOFTBADSECT
 defflag	opt_wd.h	WD_CHAOS_MONKEY
 
-file	dev/ata/ata.c			(ata_hl | atapi) & atabus
+file	dev/ata/ata.c			(ata_hl | atapi)
 
 # ATA RAID configuration support
 defpseudodev ataraid {[vendtype = -1], [unit = -1]}

Reply via email to