summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2007-04-30 12:38:50 +0000
committersimokawa <simokawa@FreeBSD.org>2007-04-30 12:38:50 +0000
commit28a59d2af66983e458924f52236e0459b03075cf (patch)
tree45d30455ee2c794d785001be5de1119459e3d389 /sys/dev/firewire
parent48d173f859228ffcbd274502a824767b08a302a5 (diff)
downloadFreeBSD-src-28a59d2af66983e458924f52236e0459b03075cf.zip
FreeBSD-src-28a59d2af66983e458924f52236e0459b03075cf.tar.gz
MFp4: Add a sysctl knob to disable cycle master mode and add some comments.
MFC after: 1 week
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r--sys/dev/firewire/fwohci.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index b44862d..18d31b6 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -47,6 +47,7 @@
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/sockio.h>
+#include <sys/sysctl.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/conf.h>
@@ -76,6 +77,11 @@
#undef OHCI_DEBUG
+static int nocyclemaster = 0;
+SYSCTL_DECL(_hw_firewire);
+SYSCTL_INT(_hw_firewire, OID_AUTO, nocyclemaster, CTLFLAG_RW, &nocyclemaster, 0,
+ "Do not send cycle start packets");
+
static char dbcode[16][0x10]={"OUTM", "OUTL","INPM","INPL",
"STOR","LOAD","NOP ","STOP",};
@@ -1900,8 +1906,10 @@ busresetout:
/* Allow async. request to us */
OWRITE(sc, OHCI_AREQHI, 1 << 31);
/* XXX insecure ?? */
+ /* allow from all nodes */
OWRITE(sc, OHCI_PREQHI, 0x7fffffff);
OWRITE(sc, OHCI_PREQLO, 0xffffffff);
+ /* 0 to 4GB regison */
OWRITE(sc, OHCI_PREQUPPER, 0x10000);
/* Set ATRetries register */
OWRITE(sc, OHCI_ATRETRY, 1<<(13+16) | 0xfff);
@@ -1922,7 +1930,7 @@ busresetout:
/* cycle timer */
sc->cycle_lost = 0;
OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_CYC_LOST);
- if (node_id & OHCI_NODE_ROOT) {
+ if ((node_id & OHCI_NODE_ROOT) && !nocyclemaster) {
printf("CYCLEMASTER mode\n");
OWRITE(sc, OHCI_LNKCTL,
OHCI_CNTL_CYCMTR | OHCI_CNTL_CYCTIMER);
OpenPOWER on IntegriCloud