[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sonic_init: failed, status=0



On Sun, 29 Jun 2014, Jesse Osiecki wrote:

> >
> > The smc9194 driver at sourceforge will ignore cards that pass the 
> > macsonic probe test:
> >
> >         card_present = hwreg_present((void*)ONBOARD_SONIC_REGISTERS);
> >
> > So it seems that either your macsonic driver lacks this test or else 
> > hwreg_present() isn't working.
> 
> I'm on the 3.15 branch, and looking through the macsonic driver it does 
> have that test.

Right. So hwreg_present() probably isn't working. Or, if it is working, 
then the approach is flawed because

1) macsonic can't reliably detect it's cards this way, and

2) the old smc9194 driver will not detect your card

> Alternatively, the brute force method here, that still does some good, 
> would be for me to compile a new kernel without the macsonic driver 
> builtin, add in the old smc9194 driver (I'm going to guess with 
> modifications, there is a first for everything ;)

That's a lot of work. 15 years of kernel development mean that a network 
card driver from linux 2.2 will need a rewrite.

> and then make a new branch for this modified kernel on my github, and 
> link it in this mailing list conversation, so that the next guy can just 
> drop it into his install.

Forget github. If the people who wrote comm-slot support for smc9194 had 
pushed it upstream then you would not have to re-write it. Don't make the 
same mistake.

If you succeed in getting your rewritten smc9194 driver to work, it would 
be a waste to let the fruits of that effort languish in a forgotten repo 
where it will bit-rot.

Before undertaking that effort, I would:

1) confirm that the hwreg_present() test really doesn't work by trying a 
   known-good compiler (e.g. use the native compiler in debian/m68k under 
   aranym)

2) look for a more recent version of smc9194 on kernel.org (in linux-2.3, 
   2.4, etc) that might have comm-slot support. The history repos are 
   helpful:

   https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/
   https://git.kernel.org/cgit/linux/kernel/git/history/history.git/

But if I were you, I would try to get an actual Nat. Semi. SONIC card. The 
old smc9194 driver does not do DMA, it copies packets to and from the card 
one word at a time. The macsonic driver has DMA and does zero-copy I/O. It 
will be much faster and much less taxing on scarce CPU cycles.

-- 


Reply to: