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

Re: sonic_init: failed, status=0



On Sun, Jun 29, 2014 at 1:41 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
>
> 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.
>

Good point
> 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.
Those are hard to get, but it would solve everything. I'm tempted to
find the smc9194 driver and rewrite it, as half of the reason I got
into m68k was that it would force me to work outside my comfort zone
(building an Ethernet driver would certainly qualify).
Before I make moves on the driver, do you know off the top of your
head the reason that there is no DMA in the smc9194 driver?

And thanks again. At this point I think I owe both you and TG a beer.


Reply to: