HEADSUP!!! USB MFC committed..

Barry Bouwsma freebsd-misuser at remove-NOSPAM-to-reply.NOSPAM.dyndns.dk
Wed Jun 9 20:44:59 GMT 2004


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



More information about the freebsd-stable mailing list