Programatorsky orisek?

Jan Marek jmarek na jcu.cz
Čtvrtek Listopad 1 17:37:01 CET 2001


Dobry den,

On Thu, Nov 01, 2001 at 02:10:35PM +0100, Michal Ludvig wrote:
> Jan Marek wrote:
> 
> >A ted prijde ta zahada: Podle toho, co mi kernel vypisuje, se
> >projde CELA funkce yenta_config_init() (posledni hlaska je:
> >- after last cb_writel), ale uz se nevypise hlaska
> >"yenta_config_init OK!"!!!??? Jak to? To vypada, jako by se
> >neprovedl navrat z funkce yenta_config_init()??? 
> 
> 
> Je to tedy jen taovy vystrel do tmy, ale urcite ty vypisy pochazeji z 
> funkce yenta_config_init() volane z yenta_init(). Ja jsem kuprikladu 
> nasel volani yenta_config_init() i z funkce yenta_open() u ktere se 
> pise, ze inicializuje radic karet. Zkusil bych dat printk() jeste do 
> obou volajicich funkci. Ale mozna jenom placam nesmysly ;-)

No, tak jsem si jeste okomentoval onu funkci yenta_open(). Myslel
jsem si, ze bude dulezitejsi yenta_init(), ale neni to tak.
Proste jste trefil hrebicek na hlavicku ;-))).

Je zajimave, ze ted jsem to prelozil, nabootoval jsem do single
rezimu a tam se mi inicializace PCMCIA podarila!!! Pokud jsem
ovsem inicializoval PCMCIA pri rozbehnutych sluzbach, tak mi to
kompletne zatuhlo stejne jako predtim... :-(. Problem bude zrejme
tady:

--- part of function yenta_open() from file yenta.c
	/* Get the PCMCIA kernel thread to complete the
	   initialisation later. We can't do this here,
	   because, er, because Linus says so :)
	*/
	socket->tq_task.routine = yenta_open_bh;
	socket->tq_task.data = socket;
	printk("yenta_open: after socket->tq...\n");

	MOD_INC_USE_COUNT;
	schedule_task(&socket->tq_task);
	printk("yenta_open: after schedule_task()\n");

	return 0;
}
--- end of part of function yenta_open()

Co k tomu dodat: "initialization later" funguje jen kdyz mam
notebook v single rezimu, jinak se tam asi cosi po... a
inicializace se proste nedokonci. Posledni hlaska pred umrtim
byla:
yenta_open: after schedule_task(), takze tohle se podarilo, dale
jsem nezkoumal...

BTW: V single rezimu mi to tou funkci yenta_config_init() proslo
dvakrat vc. vypisu ;-) Dokonce i pri odloudovani driveru ;-)

> 
> >Zdravi
> >Honza Marek
> 
> Michal Ludvig
> -- 
> * Cray is the only computer that runs
> *  an endless loop in just 4 hours.

Tak v tom pripade by asi s initialization later PCMCIA driveru
nemel sebemensi problem: mozna, ze by mu ale trvala ty 4 hodiny
;-)))))

Jdu napsat dalsi report do l-k a pak uz domu z prace ;-)))

Zdravi
Honza Marek
-- 
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080


Další informace o konferenci Linux