Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 2004 22:44:42 +0200 (CEST)
From:      Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk>
To:        stable@freebsd.org
Subject:   Re: HEADSUP!!! USB MFC committed..
Message-ID:  <200406092044.i59KigE51622@Mail.NOSPAM.DynDNS.dK>
References:  <200404070340.i373exE00357@NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk> <Pine.BSF.4.21.0404062125150.40892-100000@InterJet.elischer.org> <200406081008.i58A8VR01792@Mail.NOSPAM.DynDNS.dK> <20040608201057.GB43208@hal9000.halplant.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew J Caines said thusly:

> Any chance these changes might fix the urio/rioutil problem I reported[1]?

Probably not (not having looked at the urio source to verify it's
independent of umass).


> From what I can tell these are addressed to umass issues, so I suspect
> not, but since something broke in 4.x and not in 5.x, I'm optimistic it'll
> work again in 4.x.

The nice thing about the merge that started this thread, is that
it made it much easier to substitute the code from -current in
place of that in 4.x, as you could tell from the first diff that
I posted.

It might be worth a try to simply copy the -current src/sys/dev/usb/urio.c
into your 4.x source tree (assuming it's recent enough to include the
MFC as per Subject: header), and fix where it breaks your kernel/
module build.  Giant locking and related headers were the only
minor stumbling stones I encountered, and I have no idea what I'm
doing.

I'm afraid I have no such hardware to be able to build/test such
a diff myself.  However, looking at the diff between -current and
4.10-ish, there's just two lines added/removed from urio.c:

@@ -115,16 +115,16 @@
 d_write_t uriowrite;
 d_ioctl_t urioioctl;
-#define URIO_CDEV_MAJOR        143
 Static struct cdevsw urio_cdevsw = {
+       .d_version =    D_VERSION,
+       .d_flags =      D_NEEDGIANT,
        .d_open =       urioopen,
        .d_close =      urioclose,
        .d_read =       urioread,
        .d_write =      uriowrite,
        .d_ioctl =      urioioctl,
        .d_name =       "urio",
-       .d_maj =        URIO_CDEV_MAJOR,
 #if __FreeBSD_version < 500014
        .d_bmaj =       -1
 #endif

D_NEEDGIANT is inapplicable to 4.x; I don't see that the other
lines would make much difference, but nevertheless, it looks like
you could substitute the source with minor difficulties.

Beyond this, you'd need to grep around in the source to verify
that d_maj is properly set.  (And that d_bmaj isn't needed in
-stable.)


Sorry I can't help here...  Anyway, this advice should be relevant
to all the usb devices, in case others are having problems.
barry bouwsma



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406092044.i59KigE51622>