Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata as a stopgap measure, include necessary parts of...
details: https://anonhg.NetBSD.org/src/rev/823d9f8673ec
branches: trunk
changeset: 356713:823d9f8673ec
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Oct 08 19:00:29 2017 +0000
description:
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
diffstat:
sys/dev/ata/ata.c | 26 +++++++++++++++++---------
sys/dev/ata/ataconf.h | 3 ++-
sys/dev/ata/files.ata | 4 ++--
3 files changed, 21 insertions(+), 12 deletions(-)
diffs (135 lines):
diff -r 8476468fe02f -r 823d9f8673ec sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Sun Oct 08 18:46:10 2017 +0000
+++ b/sys/dev/ata/ata.c Sun Oct 08 19:00:29 2017 +0000
@@ -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 @@
#define ATADEBUG_PRINT(args, level)
#endif
+#if NATABUS
static ONCE_DECL(ata_init_ctrl);
/*
@@ -185,6 +186,7 @@
return (UNCONF);
}
+#endif /* NATABUS */
static void
ata_queue_reset(struct ata_queue *chq)
@@ -347,6 +349,14 @@
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 @@
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 @@
return rv;
}
+#endif /* NATABUS */
/*
* Does it's own locking, does not require splbio().
@@ -1549,6 +1553,7 @@
ata_channel_unlock(chp);
}
+#if NATABUS
static void
ata_activate_xfer_locked(struct ata_channel *chp, struct ata_xfer *xfer)
{
@@ -2547,6 +2552,7 @@
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 @@
KASSERT(mutex_owned(&chp->ch_lock));
}
+#if NATABUS
void
ata_wait_xfer(struct ata_channel *chp, struct ata_xfer *xfer)
{
@@ -2628,3 +2635,4 @@
cv_signal(&xfer->c_finish);
}
+#endif /* NATABUS */
diff -r 8476468fe02f -r 823d9f8673ec sys/dev/ata/ataconf.h
--- a/sys/dev/ata/ataconf.h Sun Oct 08 18:46:10 2017 +0000
+++ b/sys/dev/ata/ataconf.h Sun Oct 08 19:00:29 2017 +0000
@@ -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
diff -r 8476468fe02f -r 823d9f8673ec sys/dev/ata/files.ata
--- a/sys/dev/ata/files.ata Sun Oct 08 18:46:10 2017 +0000
+++ b/sys/dev/ata/files.ata Sun Oct 08 19:00:29 2017 +0000
@@ -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 @@
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]}
Home |
Main Index |
Thread Index |
Old Index