Re: Loss of ed(4) in a RC1 booted in qemu

From: Bakul Shah <bakul_at_BitBlocks.com>
Date: Thu, 13 Oct 2005 09:28:26 -0700
> Le Thursday 13 October 2005 15:38, Joshua Coombs a écrit :
> > Welp, while I have no real help, I can point out this was reported by
> > another user on the stable list, QEMU + RC1 == no ed
> 
> well, I should have looked there before posting here ;-) (sorry for the 
> excellent Michel talon at lpthe.jussieu.fr : I should have seeen your post)
> 
> > I'm kinda dreading upgrading my 386... I'll pull down the generic
> > kernel and do a test boot to see if it's a QEMU thing or a reguression
> > in RC1
> 
> for me, it's definitely a qemu thing : I have two other machines upgraded to 
> 6.0 post-RC1, and both are working *fine* ; moreover one is a notebook with a
>  
> pcmcia ed(4), and this NIC works perfectly (the issue is therefore seen only 
> on qemu)

The same problem exists on -current as well.  This is due to
the /dev/ed related commit done on RELENG_6 branch on 10/8
(merge from an earlier 10/5 commit done on the HEAD branch.
This commit supports more ed devices but breaks qemu's ed
emulation).  qemu does not emulate a couple of ID registers
that ed_probe_RTL_80x9() seems to insist on reading.  I don't
know who is right -- at this point qemu needs to be one of
the standard test targets.

As shown below, I worked around the problem by always calling
nced_probe_Novell() as before (in /sys/dev/ed directory).
NOTE: THIS IS A QUICK WORKAROUND, NOT A REAL FIX.  I tried a
better fix but it didn't work in the few minutes I spent on
it (the idea was this: if ed_probe_RTL80x9 fails() with
ENXIO, release all resources that may have been allocated by
it and then call ed_probe_Novell()).

Index: if_ed_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ed/if_ed_pci.c,v
retrieving revision 1.47
diff -w -u -b -r1.47 if_ed_pci.c
--- if_ed_pci.c 5 Oct 2005 05:21:07 -0000       1.47
+++ if_ed_pci.c 12 Oct 2005 23:30:27 -0000
_at__at_ -84,9 +84,9 _at__at_
        int     flags = 0;
        int     error;
 
-       if (pci_get_devid(dev) == ED_RTL8029_PCI_ID)
-               error = ed_probe_RTL80x9(dev, PCIR_BAR(0), flags);
-       else
+       //if (pci_get_devid(dev) == ED_RTL8029_PCI_ID)
+               //error = ed_probe_RTL80x9(dev, PCIR_BAR(0), flags);
+       //else
                error = ed_probe_Novell(dev, PCIR_BAR(0), flags);
        if (error) {
                ed_release_resources(dev);
Received on Thu Oct 13 2005 - 14:28:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:45 UTC