From: Toby D. H. <tdhock@OCF.Berkeley.EDU> - 2006-09-26 07:51:56
|
Hey guys, This is my most recent version of the smc9194.c source file. Search for 1400 or 0xFD in order to find the additions (or diff I guess) added by Tobias. I'm currently using the driver as a loaded module, and it's working great. Also, I'm working on a write-up of the entire process, which I'll put up on my website and we'll probably eventually want to link to from the nubus-ppc website. Sincerely, Toby Dylan Hocking http://www.ocf.berkeley.edu/~tdhock On Tue, 26 Sep 2006, Raylynn Knight wrote: > You could see me the your modifications. I have some time now to work > on this and I can use your modifications plus the changes I made to the > m68k driver and perhaps we'll have support for most SMC based cards > then. I have a Farallon card in my PB 1400 also and can test the > Farallon PDS and Comm Slot II cards I have in a 6290. I can also see > about getting the modifications into the 2.6.18 driver. > > On Mon, 2006-09-25 at 22:24 -0700, Toby Dylan Hocking wrote: >> Wow, you were absolutely correct. It seems like now I've only got to do a >> little bit of system configuration and I'll have my system's internet >> connection all up and running. >> >> Thanks again for all the amazing help --- I obviously couldn't have made >> this work alone. >> >> Do you want me to send you my source file? >> >> Sincerely, >> Toby Dylan Hocking >> http://www.ocf.berkeley.edu/~tdhock >> >> On Mon, 25 Sep 2006, Tobias Netzel wrote: >> >>> OK, that means that the driver itself would work and that is has found >>> the chip and could read data from it correctly; it read the base >>> address the chip is configured for. However that base address is only >>> needed for computers that use port based I/O. >>> So the easiest way to get the driver fully working is to change >>> 0xFD000000 to "0xFD000000 + MAC9194_BASE". >>> MAC9194_BASE is 0x300 and that's the configuration the chip on your >>> board seems to be configured for - although that doesn't matter at all >>> in case of your special card. >>> But I think it would be better to work around changing generic driver >>> code by changing platform specific code. >>> >>> Tobias >>> >>> >>> Am 25.09.2006 um 17:06 schrieb Toby Dylan Hocking: >>> >>>> OK, I made those changes. I recompiled the kernel+modules (in >>>> retrospect I guess I didn't need to recompile the kernel) and >>>> installed the new module. >>>> >>>> When I try to insert the new module into the kernel, I get a similar >>>> error message: >>>> >>>> # insmod /lib/modules/2.4.31/kernel/drivers/net/smc9194.o >>>> SMC9194: You shouldn't use auto-probing with insmod! >>>> mac9194: PowerBook 1400 identified - probing for SMC919x in slot D >>>> address >>>> space >>>> SMC9194: IOADDR d30a7000 doesn't match configuration (300). Probably >>>> not a SMC chip. >>>> /lib/modules/2.4.31/kernel/drivers/net/smc9194.o: init_module: >>>> Input/output >>>> error >>>> Hint: insmod error can be caused by incorrect module parameters, >>>> including >>>> invalid IO or IRQ parameters. You may find more information in syslog >>>> or the >>>> output from dmesg >>>> >>>> Notice that I got a new error line! I'm not quite sure what "d30a7000 >>>> doesn't match configuration (300)" means, but I did a 'dp d30a7000' in >>>> MacsBug and nothing came up. I'm going to try to change the registers >>>> until it starts working. Again, guidance would be appreciated... >>>> thanks for everything so far. >>>> >>>> Sincerely, >>>> Toby Dylan Hocking >>>> http://www.ocf.berkeley.edu/~tdhock >>>> >>>> On Mon, 25 Sep 2006, Tobias Netzel wrote: >>>> >>>>> I think you need to change the base address. >>>>> Replace 0xFD000008 with 0xFD000000. >>>>> And add the following lines after the line that contains 0xFD000000. >>>>> "save_flags(flags); >>>>> cli(); >>>>> if (!hwreg_present((void *)iobase)) >>>>> return -ENODEV; >>>>> restore_flags(flags);" >>>>> >>>>> Finally add >>>>> "unsigned long flags;" >>>>> after the line saying "unsigned long iobase;" >>>>> >>>>> Tobias >>>>> >>>>> Am 25.09.2006 um 05:09 schrieb Toby Dylan Hocking: >>>>> >>>>>> OK, so I compiled the smc9194 support as a module and I checked >>>>>> /etc/modules.conf to find out that the object file is at >>>>>> /lib/modules/2.4.31/kernel/drivers/net/smc9194.o >>>>>> >>>>>> Then I tried to insert it into the kernel using >>>>>> >>>>>> # insmod /lib/modules/2.4.31/kernel/drivers/net/smc9194.o SMC9194: >>>>>> You shouldn't use auto-probing with insmod! mac9194: PowerBook 1400 >>>>>> identified - probing for SMC919x in slot D address space >>>>>> /lib/modules/2.4.31/kernel/drivers/net/smc9194.o: init_module: >>>>>> Input/output error Hint: insmod error can be caused by incorrect >>>>>> module parameters, including invalid IO or IRQ parameters. You may >>>>>> find more information in syslog or the output from dmesg >>>>>> >>>>>> Any ideas? I don't really know where to go from here... >>>>>> >>>>>> Sincerely, >>>>>> Toby Dylan Hocking >>>>>> http://www.ocf.berkeley.edu/~tdhock >>>>>> >>>>>> On Sun, 24 Sep 2006, Toby Dylan Hocking wrote: >>>>>> >>>>>>> Hey guys, >>>>>>> >>>>>>> OK, so I finally got Tobias' driver to compile, after messing around >>>>>>> with various source files. What I had to do was change the last 2 >>>>>>> lines of arch/ppc/platforms/nbpmac_id.h to >>>>>>> >>>>>>> #include <asm/bootx.h> >>>>>>> extern boot_infos_t *boot_infos; >>>>>>> >>>>>>> OK... so when I boot using the new kernel, I get one line related to >>>>>>> the driver... >>>>>>> >>>>>>> mac9194: Powerbook 1400 identified - probing for SMC919x in slot D >>>>>>> address space >>>>>>> >>>>>>> Good thing or bad thing? My ifconfig still shows no eth0 device, I'm >>>>>>> not sure how to set that up. I'll mess around and try to figure >>>>>>> something out, but I definitely need some more help. What >>>>>>> diagnostics >>>>>>> can I run to find out if the driver is working properly? >>>>>>> >>>>>>> Ray, yes, my card is the Farallon internal card... I briefly looked >>>>>>> at the smc9194.c source you attached, but it doesn't really mean >>>>>>> much >>>>>>> to me since I'm so new at kernel hacking. >>>>>>> >>>>>>> Sincerely, >>>>>>> Toby Dylan Hocking >>>>>>> http://www.ocf.berkeley.edu/~tdhock >>>>>>> >>>>>>> On Fri, 22 Sep 2006, tob...@t-... wrote: >>>>>>> >>>>>>>> This weekend I'm not at home and so I don't have the kernel sources >>>>>>>> around. >>>>>>>> So you have to find out where nbpmac_boot_infos is declared. It >>>>>>>> should be >>>>>>>> in "arch/ppc/platforms" in probably one of the files >>>>>>>> "nbpmac_setup.c", >>>>>>>> "pmac_setup.c" or "pmac_nubus.h". >>>>>>>> You should make the file that nbpmac_boot_infos is declared in >>>>>>>> include >>>>>>>> "asm/nbpmac_id.h" instead. >>>>>>>> All this needs some cleaning up. It's all because I wanted drivers >>>>>>>> to be >>>>>>>> able to find out what exact machine they are running on. >>>>>>>> Tobias >>>>>>>> -----Original Message----- >>>>>>>> Date: Fri, 22 Sep 2006 17:25:43 +0200 >>>>>>>> Subject: Re: [Nubus-pmac-users] SMC9194 support on PB1400? >>>>>>>> From: Toby Dylan Hocking <tdhock@OCF.Berkeley.EDU> >>>>>>>> To: For users of Linux on NuBus PowerMacs >>>>>>>> <nub...@li...> >>>>>>>> Hm. Adding those lines made the smc9194 driver compile fine, but >>>>>>>> now >>>>>>>> at >>>>>>>> the very end when I'm compiling the kernel to vmlinux, it complains >>>>>>>> about >>>>>>>> drivers/net/net.o(.sbss+0x54): multiple definition of >>>>>>>> `nbpmac_boot_infos' >>>>>>>> arch/ppc/platform.o(.sbss+0x28): first defined here >>>>>>>> I suppose I could try to find which source file for platform.o >>>>>>>> defines >>>>>>>> nbpmac_boot_infos, but I thought you would probably know what I >>>>>>>> should do >>>>>>>> to fix this right away... Any ideas?? >>>>>>>> Sincerely, >>>>>>>> Toby Dylan Hocking >>>>>>>> http://www.ocf.berkeley.edu/~tdhock >>>>>>>> On Fri, 22 Sep 2006, Tobias Netzel wrote: >>>>>>>>> You will have to add the following two lines to the end of >>>>>>>> nbpmac_id.h: >>>>>>>>> "#include <asm/bootx.h>" >>>>>>>>> "boot_infos_t *nbpmac_boot_infos;" >>>>>>>>> >>>>>>>>> I thought they weren't needed... >>>>>>>>> >>>>>>>>> Tobias >>>>>>>>> >>>>>>>>> Am 22.09.2006 um 09:47 schrieb Toby Dylan Hocking: >>>>>>>>> >>>>>>>>>> Alrighty then. I'm trying to compile the driver that Tobias sent >>>>>>>> me, >>>>>>>>>> but >>>>>>>>>> I'm getting a silly error. >>>>>>>>>> smc9194.c:87: error: syntax error before * token >>>>>>>>>> smc9194.c:87: warning: type defaults to `int' in declaration of >>>>>>>>>> `boot_infos' >>>>>>>>>> smc9194.c:87: warning: data definiteion has no type or storage >>>>>>>> class >>>>>>>>>> ... >>>>>>>>>> >>>>>>>>>> I know some C, but I'm unfamiliar with the details of the kernel >>>>>>>> here. >>>>>>>>>> I >>>>>>>>>> recognize that this is a badly declared/imported variable, but I >>>>>>>> don't >>>>>>>>>> know where boot_infos is ultimately declared, thus I'm not sure >>>>>>>> what >>>>>>>>>> to do >>>>>>>>>> for a fix. >>>>>>>>>> >>>>>>>>>> BTW, I added the EXPORT_SYMBOL line and I symbolically linked >>>>>>>>>> nbpmac_id.h >>>>>>>>>> to include/asm. >>>>>>>>>> >>>>>>>>>> Sorry for being so helpless here, but I'm new to kernel hacking, >>>>>>>> it's >>>>>>>>>> late, and I'm tired. I definitely need to learn a lot more about >>>>>>>>>> drivers >>>>>>>>>> before I would be of much use for porting this ... where did you >>>>>>>> guys >>>>>>>>>> learn all this stuff? >>>>>>>>>> >>>>>>>>>> Sincerely, >>>>>>>>>> Toby Dylan Hocking >>>>>>>>>> http://www.ocf.berkeley.edu/~tdhock >>>>>>>>>> >>>>>>>>>> On Fri, 22 Sep 2006, Raylynn Knight wrote: >>>>>>>>>> >>>>>>>>>>> On Thu, 2006-09-21 at 11:46 +0200, Tobias Netzel wrote: >>>>>>>>>>>> Hi Toby, >>>>>>>>>>>> >>>>>>>>>>>> I wrote a patch for the SMC9194 driver that might work with >>>>>>>>>>>> your >>>>>>>>>>>> card. >>>>>>>>>>>> It is attached to this email. >>>>>>>>>>>> Because your card doesn't have a NuBus ROM I had to implement >>>>>>>> some >>>>>>>>>>>> work-arounds. >>>>>>>>>>>> Please test it and feel free to modify it in order to make it >>>>>>>> work. >>>>>>>>>>>> You have to apply the patch using >>>>>>>>>>>> "patch drivers/net/smc9194.c {path to >>>>>>>>>>>> patchfile}/smc9191.patch". >>>>>>>>>>>> >>>>>>>>>>>> You will probably need to copy the file "nbpmac_id.h" from >>>>>>>>>>>> "arch/ppc/platforms" to "include/asm". >>>>>>>>>>>> You should as well add the line >>>>>>>>>>>> "EXPORT_SYMBOL(boot_infos);" >>>>>>>>>>>> at the end of the file "arch/ppc/platforms/nbpmac_setup.c" if >>>>>>>>>>>> it >>>>>>>>>>>> isn't >>>>>>>>>>>> already there. >>>>>>>>>>>> >>>>>>>>>>> 956a959,975 >>>>>>>>>>>> /* Probe for an SMC based card for the PowerBook 1400 >>>>>>>>>>> that >>>>>>>>>>> doesn't have a NuBus ROM */ >>>>>>>>>>>> if (boot_infos->machineID == MACHID_POWERBOOK1400) { >>>>>>>>>>>> unsigned long iobase; >>>>>>>>>>>> >>>>>>>>>>>> printk(KERN_INFO "mac9194: PowerBook 1400 >>>>>>>>>>> identified - >>>>>>>>>>> probing for SMC919x in slot D address space\n"); >>>>>>>>>>>> >>>>>>>>>>>> if ((dev = init_etherdev(dev, 0)) == NULL) >>>>>>>>>>>> return -ENOMEM; >>>>>>>>>>>> SET_MODULE_OWNER(dev); >>>>>>>>>>>> >>>>>>>>>>>> /* PowerBook 1400 expansion slot is mapped as >>>>>>>>>>> slot D */ >>>>>>>>>>>> iobase = (unsigned long)ioremap(0xFD000008, >>>>>>>>>>> 0x8); >>>>>>>>>>>> dev->irq = SLOT2IRQ(0xD); >>>>>>>>>>>> >>>>>>>>>>>> return smc_probe(dev, iobase); >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> For this part you'll most likely need to add MAC9194_BASE >>>>>>>>>>> defined as >>>>>>>>>>> 0x300 to the 0xFD000008 address you found. You should >>>>>>>> also >>>>>>>>>>> test >>>>>>>>>>> to make sure the register is present. For the SMC driver >>>>>>>> in >>>>>>>>>>> Mac68k Linux I have some of PDS cards with no ROM >>>>>>>> working, but >>>>>>>>>>> they have the register offset by 0x300. Also they all >>>>>>>> seem to >>>>>>>>>>> do 32 bit transfers just fine. >>>>>>>>>>> >>>>>>>>>>> See the driver from the mac68k 2.2.27 kernel (on >>>>>>>> sourceforge >>>>>>>> at >>>>>>>>>>> >>>>>>>>>>> >>>>>>>> http://linux-mac68k.cvs.sourceforge.net/linux-mac68k/linux-mac68k/ >>>>>>>>>>> drivers/net/smc9194.c?revision=1.4.2.8&view=markup) >>>>>>>>>>> which has support for CommSlot2 cards and some PDS cards >>>>>>>> that >>>>>>>>>>> don't use a NuBus ROM. The commslot_init and >>>>>>>>>>> romfree_init >>>>>>>>>>> functions should be ported to the 2.4.x driver. I just >>>>>>>> haven't >>>>>>>>>>> had the time to work on it! >>>>>>>>>>> >>>>>>>>>>> Is your card the Farallon card? If so I would hope that >>>>>>>>>>> Farallon maps all their brain-dead cards in at the same >>>>>>>>>>> address. >>>>>>>>>>> Then if you get your card working it may provide support >>>>>>>> for >>>>>>>>>>> the >>>>>>>>>>> SMC Chipset based Farallon PDS and CommSlot cards also. >>>>>>>>>>> >>>>>>>>>>> Ray >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>> ------------------------------------------------------------------- >>>>>>>> -- >>>>>>>> - >>>>>>>>>>> --- >>>>>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance >>>>>>>>>>> to >>>>>>>>>>> share your >>>>>>>>>>> opinions on IT & business topics through brief surveys -- and >>>>>>>> earn >>>>>>>>>>> cash >>>>>>>>>>> http://www.techsay.com/default.php? >>>>>>>>>>> page=join.php&p=sourceforge&CID=DEVDEV >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Nubus-pmac-users mailing list >>>>>>>>>>> Nub...@li... >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>> ------------------------------------------------------------------- >>>>>>>> -- >>>>>>>> -- >>>>>>>>>> -- >>>>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>>>>>> share your >>>>>>>>>> opinions on IT & business topics through brief surveys -- and >>>>>>>>>> earn >>>>>>>> cash >>>>>>>>>> http://www.techsay.com/default.php? >>>>>>>>>> page=join.php&p=sourceforge&CID=DEVDEV >>>>>>>>>> _______________________________________________ >>>>>>>>>> Nubus-pmac-users mailing list >>>>>>>>>> Nub...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> ------------------------------------------------------------------- >>>>>>>> -- >>>>>>>> ---- >>>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>>>> share >>>>>>>> your >>>>>>>>> opinions on IT & business topics through brief surveys -- and earn >>>>>>>> cash >>>>>>>>> >>>>>>>> http://www.techsay.com/default.php? >>>>>>>> page=join.php&p=sourceforge&CID=DEVDEV >>>>>>>>> _______________________________________________ >>>>>>>>> Nubus-pmac-users mailing list >>>>>>>>> Nub...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>>>>>>>> >>>>>>>> ------------------------------------------------------------------- >>>>>>>> -- >>>>>>>> ---- >>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>>>> share >>>>>>>> your >>>>>>>> opinions on IT & business topics through brief surveys -- and earn >>>>>>>> cash >>>>>>>> http://www.techsay.com/default.php? >>>>>>>> page=join.php&p=sourceforge&CID=DEVDEV >>>>>>>> _______________________________________________ >>>>>>>> Nubus-pmac-users mailing list >>>>>>>> Nub...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>>>>> --------------------------------------------------------------------- >>>>>> -- >>>>>> -- >>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>> share your >>>>>> opinions on IT & business topics through brief surveys -- and earn >>>>>> cash >>>>>> http://www.techsay.com/default.php? >>>>>> page=join.php&p=sourceforge&CID=DEVDEV_______________________________ >>>>>> __ >>>>>> ______________ >>>>>> Nubus-pmac-users mailing list >>>>>> Nub...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>>>> >>>>> >>>>> ---------------------------------------------------------------------- >>>>> --- >>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>> share your >>>>> opinions on IT & business topics through brief surveys -- and earn >>>>> cash >>>>> http://www.techsay.com/default.php? >>>>> page=join.php&p=sourceforge&CID=DEVDEV >>>>> _______________________________________________ >>>>> Nubus-pmac-users mailing list >>>>> Nub...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>>> ----------------------------------------------------------------------- >>>> -- >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>> share your >>>> opinions on IT & business topics through brief surveys -- and earn cash >>>> http://www.techsay.com/default.php? >>>> page=join.php&p=sourceforge&CID=DEVDEV_________________________________ >>>> ______________ >>>> Nubus-pmac-users mailing list >>>> Nub...@li... >>>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>> >>> >>> ------------------------------------------------------------------------- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share your >>> opinions on IT & business topics through brief surveys -- and earn cash >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> Nubus-pmac-users mailing list >>> Nub...@li... >>> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users >>> >> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Nubus-pmac-users mailing list >> Nub...@li... >> https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Nubus-pmac-users mailing list > Nub...@li... > https://lists.sourceforge.net/lists/listinfo/nubus-pmac-users > |