https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082008-05-19T18:53:00ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #1010: USB patcheshttps://bugs.dragonflybsd.org/issues/1010?journal_id=46462008-05-19T18:53:00Zhasso
<ul></ul><p>Yes, but it seems that you didn't care about changes we have made locally <br />or brought in from other BSD's? I just checked quickly the change I <br />remember doing for sure - <br /><a class="external" href="http://www.dragonflybsd.org/cvsweb/src/sys/bus/usb/uhub.c.diff?r1=1.19&r2=1.20&f=h">http://www.dragonflybsd.org/cvsweb/src/sys/bus/usb/uhub.c.diff?r1=1.19&r2=1.20&f=h</a></p>
<p>So, before it goes in, it should be <em>very</em> carefully audited, please.</p>
<p>And please stay away from USB serial stuff while going to sync device <br />drivers. These are in much better shape in DragonFly than in FreeBSD. I <br />wouldn't mind at all (no, I'd love to see that, really) if someone would <br />sync ucom(4) itself with FreeBSD, but it would require to merge changes <br />from tty(4) as well I'm not familiar at all.</p>
<p>It's a diff between synchronized DragonFly (ie. the first patch applied) <br />and FreeBSD current?</p>
<p>Good work, anyway.</p> DragonFlyBSD - Bug #1010: USB patcheshttps://bugs.dragonflybsd.org/issues/1010?journal_id=46492008-05-19T20:25:01Zmneumann
<ul></ul><p>Hasso Tepper wrote:<br /> > Michael Neumann wrote:<br /> >> A patch (usb.diff) that brings in all recent FreeBSD-current USB<br /> >> changes (no devices yet). Tested on two laptops and qemu. All three<br /> >> paniced before with the same message as in this thread:<br /> >><br /> >> <a class="external" href="http://leaf.dragonflybsd.org/mailarchive/kernel/2007-11/msg00034.html">http://leaf.dragonflybsd.org/mailarchive/kernel/2007-11/msg00034.html</a><br /> >><br /> >> This should be easily reproducable using qemu with -usb and -usbdevice<br /> >> options.<br /> >><br /> >> After the patches, all three boot up and I can use USB without<br /> >> problems. One problem is not yet fixed: When I boot with a USB device<br /> >> connected, it sometimes hangs.<br /> ><br /> > Yes, but it seems that you didn't care about changes we have made <br />locally<br /> > or brought in from other BSD's? I just checked quickly the change I<br /> > remember doing for sure -<br /> > <br /><a class="external" href="http://www.dragonflybsd.org/cvsweb/src/sys/bus/usb/uhub.c.diff?r1=1.19&r2=1.20&f=h">http://www.dragonflybsd.org/cvsweb/src/sys/bus/usb/uhub.c.diff?r1=1.19&r2=1.20&f=h</a><br /> ><br /> > So, before it goes in, it should be <em>very</em> carefully audited, please.</p>
<p>Yes, I just upgraded it to the FreeBSD code base, with the (possibly<br />wrong) assumption that the FreeBSD code base will pull in code from<br />other BSDs, so that we don't have to do it manually. I didn't want to<br />spend or duplicate too much effort.</p>
<p>If changes are done in the DragonFly USB version, it would be nice to<br />mark them as DragonFly-specific in the code, so that getting newer stuff<br />from FreeBSD into DragonFly would become easier and patching can be done<br />semi-automatically.</p>
<p>The correct way would be to ask FreeBSD to pull in those changes, so<br />that we can gain from it without much effort. On the other hand, it<br />would be great to refactor the FreeBSD code, but then we have to spend a<br />lot of time now and later (is it really worth for USB?).</p>
<pre><code>> And please stay away from USB serial stuff while going to sync device<br /> > drivers. These are in much better shape in DragonFly than in FreeBSD. I<br /> > wouldn't mind at all (no, I'd love to see that, really) if someone would<br /> > sync ucom(4) itself with FreeBSD, but it would require to merge changes<br /> > from tty(4) as well I'm not familiar at all.</code></pre>
<p>Okay :)</p>
<p>I'm just learning and this got me a bit deeper into DragonFly. And then,<br />the final goal is to be able to run DragonFly again on this laptop.</p>
<pre><code>>> The second diff (freebsd.usb.diff) is against FreeBSD-current as of<br /> >> yesterday.<br /> ><br /> > It's a diff between synchronized DragonFly (ie. the first patch applied)<br /> > and FreeBSD current?</code></pre>
<p>Exactly.</p>
<p>There are some open issues, like specifying a lock in bus_dma_create_tag<br />etc.</p>
<pre><code>> Good work, anyway.</code></pre>
<p>Your welcome (to test ;-)</p>
<p>Regards,</p>
<pre><code>Michael</code></pre> DragonFlyBSD - Bug #1010: USB patcheshttps://bugs.dragonflybsd.org/issues/1010?journal_id=46502008-05-19T22:16:02Zdillon
<ul></ul><p>Well, we made a lot of stability fixes to USB that FreeBSD never had,<br /> and still doesn't. We have to retain all of that work or we'd be going<br /> backwards. In particular we made changes that allow USB devices to be<br /> pulled and plugged in willy nilly without crashing the machine, and<br /> that's an important feature.</p>
<pre><code>I think a more careful examination and incremental commit of the patch<br /> is in order. I see some obvious improvements, but stuff is also missing.</code></pre>
<pre><code>That said, the patches are only 160K each, it should be possible to audit<br /> them.</code></pre>
<pre><code>-Matt</code></pre> DragonFlyBSD - Bug #1010: USB patcheshttps://bugs.dragonflybsd.org/issues/1010?journal_id=46512008-05-19T23:59:00Zdillon
<ul></ul><p>The best approach to this might be to audit and commit in small chunks,<br /> to reduce the remaining diff set size.</p>
<pre><code>Hey Michael, how would you like a commit bit? I'll send you some<br /> private email w/ details.</code></pre>
<pre><code>-Matt</code></pre>