2.4.0-test11pre2 ram size detect incorrect
I am happy to report that I finally got a 2.4.x kernel booted and running. To get the kernel booting without an oops, I had to use the kernel option "mem=64M" (I have 64 megabytes of ram installed). Aparently, without this option the kernel was detecting an absurdly large amount of installed memory, and thus dereferenced a null pointer. Should i help find out how to get the kernel to recognize the proper amount of memory in my computer without the kernel option? What information should i make available? I am new to actual linux development, and do not know if this is something i should help fix or if it is just something that requires the kernel option. regards to the kernel-hackers, eric shattow [[EMAIL PROTECTED]] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
"H. Peter Anvin" <[EMAIL PROTECTED]> writes: > "Eric W. Biederman" wrote: > > > > Hmm. You must mean similiar to milo. > > > > Have fun. With linuxBIOS I'm working exactly the other way. Killing > > off the BIOS. And letting the initial firmware be just a boot loader. > > The reduction is complexity should make it more reliable. > > > > ... except that you have to handle every single motherboard architecture > out there now. Agreed that is a bit of a risk. Mostly you just have to handle the chipset of the boards and there are a finite number of them. Only time will tell if this is truly feasible. I think it is certainly work a try. And I don't have to handle every single one just all of the ones I need it to run on :) With the my kexec patch I'm just getting the infrastructure ready, and that is functionality that can be used independently of linuxBIOS. If booting linux from linux would help with what you are doing I love to work together on that. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] CDROMPLAYTRKIND translation in sr_ioctl.c for idescsi
On Sat, Nov 11 2000, Daniel R Risacher wrote: > Summary: > > Many audio-cdrom-playing programs don't work correctly with ATAPI > CDROM drives under ide-scsi translation, because ATAPI doesn't support > the PLAYAUDIO_TI command. The ide-cd driver handles this by > transforming CDROMPLAYTRKIND ioctls into something that the ATAPI > drive will understand, but this mechanism is bypassed when using > ide-scsi translation. Yup > This patch creates a new kernel option, > CONFIG_SCSI_IDESCSI_WORKAROUND, that is available whenever ide-scsi > translation is enabled. Enabling this new option includes a > tranlation mechanism into the SCSI CDROM (sr) driver similar to the > mechanism in the ide-cd driver. > > Hopefully this will make life much easier for those of us who use > ide-scsi for CDROM drives. It is essentially the same thing as the > patch I posted for 2.2.12 on 19 Oct 1999, but updated for 2.4.0-test9. > This probably isn't the most elegant solution, but maybe it'll help > some people out until Jens figures out something better. I would take this patch, if you made it a fall back path when PLAYAUDIO_TI fails with 05/20/00 sense. That makes a lot more sense to me (pun intended) than a config option. What do you think, will you do that? For 2.5 the CD-ROM setup will be feature based. This is all supported by newer drives, but it should be possible to make pseudo feature profiles for older drives. This has the advantage that we always 'know' what is supported and what is not -- no more trial and error. -- * Jens Axboe <[EMAIL PROTECTED]> * SuSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Addition to ECN documentation in Configure.help
Here is a little patchlet which adds to the new documentation for CONFIG_INET_ECN in Configure.help. This patch applies to 2.4.0-test11-pre3. Steven diff -urN linux/Documentation/Configure.help.orig \ linux/Documentation/Configure.help --- linux/Documentation/Configure.help.orig Sat Nov 11 21:41:55 2000 +++ linux/Documentation/Configure.help Sat Nov 11 22:50:31 2000 @@ -2067,6 +2067,14 @@ writing) you will have to disable this option, either by saying N now or by using the sysctl. + ECN may be disabled with: + echo 0 > /proc/sys/net/ipv4/tcp_ecn + + ECN may be re-enabled with: + echo 1 > /proc/sys/net/ipv4/tcp_ecn + + Explicit Congestion Notification is more fully documented in RFC2481. + If in doubt, say N. SYN flood protection - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Where is it written?
On Sat, 11 Nov 2000 23:36:42 -0600 (CST), Peter Samuelson <[EMAIL PROTECTED]> wrote: >You mean trivial changes to understand the ELF magic number for a >riscoid-ABI x86 object. (You wouldn't lie to the linker and call them >SysV objects, now, would you?) Also gdb and libbfd need to know about >stack frames. Admittedly none of this is strictly necessary just to >link and boot a kernel. Any ABI change needs to be externalised for modules. Otherwise symbol versions will not detect that the kernel was compiled with -mregparm=3 but the module was compiled with parameters on stack. Good thing this is 2.5 material. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: /net/ip_vs.h in stock kernels
Jeff V. Merkey said once upon a time (Fri, 10 Nov 2000): > > I noticed that the ip_vs.h include is not in the main kernel tree or ip > virtual switch support while I was attempting to buid the pirahnna web > server. Is this module a patch located somewhere else on > ftp.kernel.org. Jeff, Red Hat started included the IPVS patches from http://www.linuxvirtualserver.org/ starting with RH6.1 (I believe). You can find the patch they use in the kernel src.rpm, or go get the patch from the URL listed above. Dax - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Where is it written?
[H. Peter Anvin <[EMAIL PROTECTED]>] > but the Alpha is a *much* more recent ABI... the x86 ABI really dates > back to the 16-bit 8086-series CPUs. Oh, right. Xenix. I'd forgotten. > We might try again in 2.5 since we now have increased the minimum gcc > version for kernel compiles. Binutils needs no change. You mean trivial changes to understand the ELF magic number for a riscoid-ABI x86 object. (You wouldn't lie to the linker and call them SysV objects, now, would you?) Also gdb and libbfd need to know about stack frames. Admittedly none of this is strictly necessary just to link and boot a kernel. Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Where is it written?
Peter Samuelson wrote: > > [Peter Anvin] > > At the time the original x86 ABI was created, a lot of C code was > > still K&R, and thus prototypes didn't exist... > > True enough. That does explain a lot. But what about the Alpha? From > reading gcc source awhile back I seem to remember that most if not all > parameters are passed in registers. How does *that* work with varargs > and no prototypes? Or does it? > It doesn't, but the Alpha is a *much* more recent ABI... the x86 ABI really dates back to the 16-bit 8086-series CPUs. > > I don't think we want to introduce a new ABI in user space at this > > time. If we ever have to major-rev the ABI (libc.so.7), then we > > should consider this. > > Ah, but kernel-side? My point was that if gcc (and binutils) is > flexible enough to let you pick an ABI at runtime, perhaps a RISCoid > ABI for x86 could coexist with the SysV one, to be used initially for > self-contained code like the kernel. (And later, a possible transition > in userspace.) We tried once; at that point the register-based ABI support in gcc was too buggy to be useful. We might try again in 2.5 since we now have increased the minimum gcc version for kernel compiles. Binutils needs no change. -hpa -- <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Where is it written?
[Peter Anvin] > At the time the original x86 ABI was created, a lot of C code was > still K&R, and thus prototypes didn't exist... True enough. That does explain a lot. But what about the Alpha? From reading gcc source awhile back I seem to remember that most if not all parameters are passed in registers. How does *that* work with varargs and no prototypes? Or does it? > I don't think we want to introduce a new ABI in user space at this > time. If we ever have to major-rev the ABI (libc.so.7), then we > should consider this. Ah, but kernel-side? My point was that if gcc (and binutils) is flexible enough to let you pick an ABI at runtime, perhaps a RISCoid ABI for x86 could coexist with the SysV one, to be used initially for self-contained code like the kernel. (And later, a possible transition in userspace.) Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: sendmail fails to deliver mail with attachments in /var/spool/mqueue
On Sat, 11 Nov 2000, Jeff V. Merkey wrote: >On Sat, Nov 11, 2000 at 01:40:42PM +, Henning P. Schmiedehausen wrote: >> [EMAIL PROTECTED] (Jeff V. Merkey) writes: >> >> >> >We got to the bottom of the sendmail problem. The line: >> >> > -O QueueLA=20 >> >> >and >> >> > -O RefuseLA=18 >> >> >Need to be cranked up in sendmail.cf to something high since the >> >background VM on a very busy Linux box seems to exceed this which causes >> >large emails to get stuck in the /var/spool/mqueue directory for long >> >periods of time. Since vger is getting hammered with FTP all the time, >> >and is rarely idle. This also explains what Richard was seeing with VM >> >thrashing in a box with low memory. >> >> So what? This is written in the documentation of the program? You do read >> documentation, do you? >> >> >The problem of dropping connections on 2.4 was related to the O RefuseLA >> >settings. The defaults in the RedHat, Suse, and OpenLinux RPMs are >> >clearly set too low for modern Linux kernels. You may want them cranked >> >up to 100 or something if you want sendmail to always work. >> >> These settings are for single user / small user numbers boxes. >> >> If you're using an out of the vendor box distribution configuration >> for a high traffic server, you're nuts. Or ignorant. Or dumb. Or your >> consultant is an idiot. >> >> Regards >> Henning > > >I guess all customers are idiots then, since about 100+ people who were >using our release downloaded it, and had these problems with sendmail. This >disconnect of yours is about what I would expect from someone in a University. >Some of us don't have the luxury of being able to pontificate in a Univ >environment -- we have to make a living from Linux -- and provide payroll >for the people on this list who actually do the core work on Linux. > >If there were not a commercialization effort around Linux, it would still >be unknown, like TMOK or a lot of other kernels sitting in universities >somewhere not being deployed. It's the commercialization effort that made >Linux a household word. NT and NetWare servers don't stop forwarding >emails when the load average gets too high -- they just work out of the >box, and hopefully, no so will Linux (our distribution does now since >this problem in fixed). > >Now we know that sendmail has problems on Linux based on the this load >average interpretation, which we would not have known if someone had >not raised the issue. This is not a problem with sendmail on Linux. The same thing will happen on ANY uni-processor system (multi-processor too, but not as severe). I run sendmail on an SGI Indy (yes, that no-longer-manufactured thing) and it is necessary to set the load average on it to 75 or so. As high as 150 is not unreasonable either. This system handles 10's of thousands of mail messages per day. This is only a matter of tuning sendmail to do what you want, when you want. It is also reasonably well documented in the sendmail distribution. You do have to monitor the system to determine what "high" really is. In the case of the NT servers, I have seen them choke (and crash) since they DON'T seem to throttle very well. BTW, After I read the sendmail documentation, and observed the system for a while, I decided to count the sendmail "loadaverage" as really being the average number of simultaneous connections (sendmail processes/threads). This leads to the choice of "how many do I want active, and how many do I want to suspended, and when do I want to refuse connection". THEN I add the number of other active processes to the proposed limits. -- - Jesse I Pollard, II Email: [EMAIL PROTECTED] Any opinions expressed are solely my own. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: 2.4.0-test10 oops
Jan Dvorak said: > > Hi, > > attached oops came from writing to vfat fs. This problem was brought up a couple of times before as referenced here http://www.uwsg.indiana.edu/hypermail/linux/kernel/0010.3/0652.html http://www.uwsg.indiana.edu/hypermail/linux/kernel/0006.1/1754.html http://www.uwsg.indiana.edu/hypermail/linux/kernel/0003.3/0594.html but I've never seen a solution as of yet. In my own experiences, the bug didn't occur as frequently and reproducably as it did when I moved to the 2.4.0-test series yet it appears to be a long-standing issue. I use Netscape Messenger to read my mail with the actual mail files stored on a vfat partition. The problem seems to occur when messages are copied to the vfat partition after being downloaded from the mail server. As noted in one of the above articles, it appears to be a problem with the truncate function and Netscape uses this function to use it to increase the size of its .summary files. My kernel is OOPSing almost daily because of this problem. I'm no kernel hacker so I'm hoping someone out there who is will take notice of this problem. I've got the output of my own ksymoops run from 2.4.0-test10 as well if anyone takes interest. -- Ben Chu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] show_task() and thread_saved_pc() fix for x86
On Sat, 11 Nov 2000, Alexander Viro wrote: > I would probably turn it into > unsigned long *ebp = *((unsigned long **)t->esp); ebp++; /* We want return address, not the previous frame pointer */ > /* Bits 0,1 and 13..31 must be shared with the stack base */ > if (((unsigned long)ebp ^ (unsigned long)t) & ~(2*PAGE_SIZE-4)) > return 0; > > return *ebp; Sorry. Cheers, Al - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
2.4.0-test11-pre3
Drivers, drivers, drivers. IrDA and ISDN. PPC. The most interesting part is probably the exclusive wait-queue patch. David Miller noticed that exclusivity doesn't nest correctly the way we used to do it: being on multiple wait-queues would potentially cause lost wake-up events if a non-exclusive waiter got mistaken for an exclusive one because the exclusive bit was a per-process thing. Moving the exclusivity bit from the process into the wait-queue cleaned up the interfaces and also made it nest properly. No known uses were actually buggy, but at least one case was apparently ok only by pure luck. Linus - - pre3: - James Simmons: vgacon "printk()" deadlock with global irq lock. - don't poke blanked console on console output - Ching-Ling: get channels right on ALI audio driver - Dag Brattli and Jean Tourrilhes: big IrDA update - Paul Mackerras: PPC updates - Randy Dunlap: USB ID table support, LEDs with usbkbd, belkin serial converter. - Jeff Garzik: pcnet32 and lance net driver fix/cleanup - Mikael Pettersson: clean up x86 ELF_PLATFORM - Bartlomiej Zolnierkiewicz: sound and drm driver init fixes and cleanups - Al Viro: Jeff missed some kmap()'s. sysctl cleanup - Kai Germaschewski: ISDN updates - Alan Cox: SCSI driver NULL ptr checks - David Miller: networking updates, exclusive waitqueues nest properly, SMP i_shared_lock/page_table_lock lock order fix. - pre2: - Stephen Rothwell: directory notify could return with the lock held - Richard Henderson: CLOCKS_PER_SEC on alpha. - Jeff Garzik: ramfs and highmem: kmap() the page to clear it - Asit Mallick: enable the APIC in the official order - Neil Brown: avoid rd deadlock on io_request_lock by using a private rd-request function. This also avoids unnecessary request merging at this level. - Ben LaHaise: vmalloc threadign and overflow fix - Randy Dunlap: USB updates (plusb driver). PCI cacheline size. - Neil Brown: fix a raid1 on top of lvm bug that crept in in pre1 - Alan Cox: various (Athlon mmx copy, NULL ptr checks for scsi_register etc). - Al Viro: fix /proc permission check security hole. - Can-Ru Yeou: SiS301 fbcon driver - Andrew Morton: NMI oopser and kernel page fault punch through both console_lock and timerlist_lock to make sure it prints out.. - Jeff Garzik: clean up "kmap()" return type (it returns a kernel virtual address, ie a "void *"). - Jeff Garzik: network driver docs, various one-liners. - David Miller: add generic "special" flag to page flags, to be used by architectures as they see fit. Like keeping track of cache coherency issues. - David Miller: sparc64 updates, make sparc32 boot again - Davdi Millner: spel "synchronous" correctly - David Miller: networking - fix some bridge issues, and correct IPv6 sysctl entries. - Dan Aloni: make fork.c use proper macro rather than doing get_exec_domain() by hand. - pre1: - me: make PCMCIA work even in the absense of PCI irq's - me: add irq mapping capabilities for Cyrix southbridges - me: make IBMMCA compile right as a module - me: uhhuh. Major atomic-PTE SMP race boo-boo. Fixed. - Andrea Arkangeli: don't allow people to set security-conscious bits in mxcsr through ptrace SETFPXREGS. - Jürgen Fischer: aha152x update - Andrew Morton, Trond Myklebust: file locking fixes - me: TLB invalidate race with highmem - Paul Fulghum: synclink/n_hdlc driver updates - David Miller: export sysctl_jiffies, and have the proper no-sysctl version handy - Neil Brown: RAID driver deadlock and nsfd read access to execute-only files fix - Keith Owens: clean up module information passing, remove "get_module_symbol()". - Jeff Garzik: network (and other) driver fixes and cleanups - Andrea Arkangeli: scheduler cleanup. - Ching-Ling Li: fix ALi sound driver memory leak - Anton Altaparmakov: upcase fix for NTFS - Thomas Woller: CS4281 audio update - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] show_task() and thread_saved_pc() fix for x86
On Sat, 11 Nov 2000, Linus Torvalds wrote: > On Fri, 10 Nov 2000, Alexander Viro wrote: > > diff -urN rc11-2/include/asm-i386/processor.h >rc11-2-show_task/include/asm-i386/processor.h > > --- rc11-2/include/asm-i386/processor.h Fri Nov 10 09:14:04 2000 > > +++ rc11-2-show_task/include/asm-i386/processor.h Fri Nov 10 16:08:15 2000 > > @@ -412,7 +412,7 @@ > > */ > > extern inline unsigned long thread_saved_pc(struct thread_struct *t) > > { > > - return ((unsigned long *)t->esp)[3]; > > + return ((unsigned long **)t->esp)[0][1]; > > } > > The above needs to get verified: it should be something like > > unsigned long *ebp = *((unsigned long **)t->esp); > > if ((void *) ebp < (void *) t) > return 0; > if ((void *) ebp >= (void *) t + 2*PAGE_SIZE) > return 0; > if (3 & (unsigned long)ebp) > return 0; > return *ebp; > > because otherwise I guarantee that we'll eventually have a bug with a > invalid pointer reference in the debugging code and that would be bad. I would probably turn it into unsigned long *ebp = *((unsigned long **)t->esp); /* Bits 0,1 and 13..31 must be shared with the stack base */ if (((unsigned long)ebp ^ (unsigned long)t) & ~(2*PAGE_SIZE-4)) return 0; return *ebp; Comments? Alternative variant: just let schedule() store its return address in the task_struct. Yeah, it's couple of tacts per schedule(). And much saner code, without second-guessing the compiler. OTOH, the value is used only by Alt-SysRq-T, so... Hell knows. Cheers, Al - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: The IrDA patches !!! (was Re: [RANT] Linux-IrDA status)
On Sat, Nov 11, 2000 at 06:43:26PM -0800, Linus Torvalds wrote: > > > Ok, thanks to the work of Jean, everything seems to be applied now. > > I'll make a test3 one of these days (probably tomorrow), please verify > that everything looks happy. > > Linus Linus, Sorry to bother you again, but a important note... I sent you the whole serie of patches. Then Dag sent it to you again today. The patches were the same *except* for #14. Dag did replace the original #14 patch that you didn't like with a cleaner version (using empty packet to trigger speed changes). I'm sorry for the confusion. But don't worry, we will adjust for whatever you put in test3 and work from there, so please don't do anything ;-) And yes, I'll put it to the usual tests... And thanks again for taking the time to go through the patches so quickly. We do appreciate your great work ;-) Have fun ;-) Jean - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[PATCH] CDROMPLAYTRKIND translation in sr_ioctl.c for idescsi
Summary: Many audio-cdrom-playing programs don't work correctly with ATAPI CDROM drives under ide-scsi translation, because ATAPI doesn't support the PLAYAUDIO_TI command. The ide-cd driver handles this by transforming CDROMPLAYTRKIND ioctls into something that the ATAPI drive will understand, but this mechanism is bypassed when using ide-scsi translation. This patch creates a new kernel option, CONFIG_SCSI_IDESCSI_WORKAROUND, that is available whenever ide-scsi translation is enabled. Enabling this new option includes a tranlation mechanism into the SCSI CDROM (sr) driver similar to the mechanism in the ide-cd driver. Hopefully this will make life much easier for those of us who use ide-scsi for CDROM drives. It is essentially the same thing as the patch I posted for 2.2.12 on 19 Oct 1999, but updated for 2.4.0-test9. This probably isn't the most elegant solution, but maybe it'll help some people out until Jens figures out something better. Daniel Risacher --- linux/Documentation/Configure.help.old Fri Sep 22 20:11:37 2000 +++ linux/Documentation/Configure.help Sat Nov 11 19:02:05 2000 @@ -588,6 +588,20 @@ If unsure, say N. +IDE-SCSI workaround +CONFIG_SCSI_IDESCSI_WORKAROUND + + This will enable the SCSI CDROM driver to work around a limitation of + the ATAPI specification. The ATAPI spec does not support the + play-track-index command, which means that many programs that play + audio CD's will not work correctly when using SCSI emulation. + + With this option, the SCSI CDROM driver translates play-track-index + commands into play-minute-second-frame commands, in a way similar to + the IDE CDROM driver. + + If unsure, say Y. + CMD640 chipset bugfix/support CONFIG_BLK_DEV_CMD640 The CMD-Technologies CMD640 IDE chip is used on many common 486 and --- linux/drivers/ide/Config.in.old Sat Nov 11 21:35:01 2000 +++ linux/drivers/ide/Config.in Sat Nov 11 19:56:31 2000 @@ -31,6 +31,9 @@ dep_tristate ' Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI + if [ "$CONFIG_BLK_DEV_IDESCSI" != "n" ]; then +bool ' Enable IDE-SCSI workaround in SCSI CDROM driver' +CONFIG_SCSI_IDESCSI_WORKAROUND + fi comment 'IDE chipset support/bugfixes' if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then --- linux/drivers/scsi/sr_ioctl.c.old Sat Nov 11 19:48:17 2000 +++ linux/drivers/scsi/sr_ioctl.c Sat Nov 11 21:25:46 2000 @@ -1,3 +1,4 @@ +#include #include #include #include @@ -30,6 +31,53 @@ /* In fact, it is very slow if it has to spin up first */ #define IOCTL_TIMEOUT 30*HZ +#ifdef CONFIG_SCSI_IDESCSI_WORKAROUND +/* ATAPI drives don't have a SCMD_PLAYAUDIO_TI command. When these drives + are emulating a SCSI device via the idescsi module, they need to have + CDROMPLAYTRKIND commands translated into CDROMPLAYMSF commands for them */ + +static int +sr_fake_playtrkind(struct cdrom_device_info *cdi, unsigned int cmd, void* arg) +{ +struct cdrom_ti* ti = (struct cdrom_ti*)arg; +u_char sr_cmd[10]; +struct cdrom_tocentry trk0_te, trk1_te; +int ntracks; +struct cdrom_tochdr tochdr; +sr_audio_ioctl(cdi, CDROMREADTOCHDR, &tochdr); +ntracks = tochdr.cdth_trk1 - tochdr.cdth_trk0 + 1; + +if (ti->cdti_trk1 == ntracks) +ti->cdti_trk1 = CDROM_LEADOUT; +else +ti->cdti_trk1 ++; + +trk0_te.cdte_track = ti->cdti_trk0; +trk0_te.cdte_format = CDROM_MSF; +trk1_te.cdte_track = ti->cdti_trk1; +trk1_te.cdte_format = CDROM_MSF; + +sr_audio_ioctl(cdi, CDROMREADTOCENTRY, &trk0_te); +sr_audio_ioctl(cdi, CDROMREADTOCENTRY, &trk1_te); + +sr_cmd[0] = GPCMD_PLAY_AUDIO_MSF; +sr_cmd[3] = trk0_te.cdte_addr.msf.minute; +sr_cmd[4] = trk0_te.cdte_addr.msf.second; +sr_cmd[5] = trk0_te.cdte_addr.msf.frame; +sr_cmd[6] = trk1_te.cdte_addr.msf.minute; +sr_cmd[7] = trk1_te.cdte_addr.msf.second; +sr_cmd[8] = trk1_te.cdte_addr.msf.frame; +printk ("Playing MSF %d %d %d to %d %d %d\n", +sr_cmd[3], +sr_cmd[4], +sr_cmd[5], +sr_cmd[6], +sr_cmd[7], +sr_cmd[8]); +return sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE); +} +#endif + /* We do our own retries because we want to know what the specific error code is. Normally the UNIT_ATTENTION code will automatically clear after one error */ @@ -332,6 +380,9 @@ } case CDROMPLAYTRKIND: { +#ifdef CONFIG_SCSI_IDESCSI_WORKAROUND + result = sr_fake_playtrkind(cdi, cmd, arg); +#else struct cdrom_ti* ti = (struct cdrom_ti*)arg; sr_cmd[0] = GPCMD_PLAYAUDIO_TI; @@ -342,9 +393,9 @@ sr_cmd[8] = ti->cdti_ind1; result = sr_do_ioctl(targe
Re: [PATCH] show_task() and thread_saved_pc() fix for x86
On Fri, 10 Nov 2000, Alexander Viro wrote: > diff -urN rc11-2/include/asm-i386/processor.h >rc11-2-show_task/include/asm-i386/processor.h > --- rc11-2/include/asm-i386/processor.h Fri Nov 10 09:14:04 2000 > +++ rc11-2-show_task/include/asm-i386/processor.h Fri Nov 10 16:08:15 2000 > @@ -412,7 +412,7 @@ > */ > extern inline unsigned long thread_saved_pc(struct thread_struct *t) > { > - return ((unsigned long *)t->esp)[3]; > + return ((unsigned long **)t->esp)[0][1]; > } The above needs to get verified: it should be something like unsigned long *ebp = *((unsigned long **)t->esp); if ((void *) ebp < (void *) t) return 0; if ((void *) ebp >= (void *) t + 2*PAGE_SIZE) return 0; if (3 & (unsigned long)ebp) return 0; return *ebp; because otherwise I guarantee that we'll eventually have a bug with a invalid pointer reference in the debugging code and that would be bad. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: The IrDA patches !!! (was Re: [RANT] Linux-IrDA status)
Ok, thanks to the work of Jean, everything seems to be applied now. I'll make a test3 one of these days (probably tomorrow), please verify that everything looks happy. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] wakeup_bdflush related fixes and nfsd optimizations fortest10
On Sat, 11 Nov 2000, Ying Chen/Almaden/IBM wrote: > > This patch includes two sets of things against test10: > First, there are several places where schedule() is called after > wakeup_bdflush(1) is called. This is completely unnecessary Fair enough. > Second, (I have posted this to the kernel mailing list, but I forgot to cc > to Linus.) I made some optimizations on racache in nfsd in test10. ..but this would need a lot more testing/feedback, especially from the nfs client maintainers (I see that Neil Brown did some querying already, I think more is in order). Also, I'd _really_ like those lists to be real lists instead of duplicating code. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: 2.4.0-test11pre2-ac1 and previous problem
On Sun, 12 Nov 2000 12:32:55 +1100, Andrew Morton <[EMAIL PROTECTED]> wrote: >> > > NMI Watchdog detected LOCKUP on CPU3, registers: >That's a pretty wierd trace. You seem to have addresses related >to the `apm' kernel thread on mysqld's stack. Normal unfortunately. Firstly the ix86 oops code just scans the stack and prints anything that looks like it might be a kernel address. It makes no attempt to confirm that these really are return addresses, so an ix86 oops trace gets lots of false positives. Secondly that trace was converted by klogd (symbols in call trace line instead of numbers) not by ksymoops, I do not trust the klogd algorithm at all. Between the false positives and the very real possibility of klogd having got it wrong, you have to take any ix86 oops with a pinch of salt. Statrting klogd as "klogd -x" in /etc/rc.d/init.d/syslog will get rid of one source of error. Using the kdb patch[*] will give you a much better debug environment for NMI lockups. kdb gives an accurate back trace because it understands ix86 stack frames as well as the out of line lock handlers, at the expense of some very ugly code. [*]ftp://oss.sgi.com/projects/kdb/download/ix86/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] patch-2.4.0-test10-irda24 (resend)
On Sun, 12 Nov 2000, Dag Brattli wrote: > > (resending in case it got lost, didn't show up on linux-kernel) Didn't get lost, but I think the linux-kernel size filter killed it from the kernel list. Everything applied. Thanks, Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: What protects f_pos?
[EMAIL PROTECTED] writes: > This looks like it's a bug to me although if you have multiple > threads hitting a file descriptor at the same time, you're pretty much > asking for trouble. Yes, I haven't been able to come up with an example that might trigger this that wasn't dubious to begin with. I'll raise this again at a convenient time during 2.5. David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: 2.4.0-test11pre2-ac1 and previous problem
Jasper Spaans wrote: > > On Sat, Nov 11, 2000 at 11:25:00AM +1100, Andrew Morton wrote: > > > > NMI Watchdog detected LOCKUP on CPU3, registers: > > > Oh no. Another one. Could you please try this attached > > patch (against test11-pre2) and see if the diagnostics > > come out? > > And yet another one... I applied your patch, and ran my oopses through > ksymoops, results attached. > > Kernel: 2.4.0-test11-pre2 + reiserfs-3.6.18 > 2 * P-II 350, 256 MB RAM, no special hardware, AFAIK. > > Of course, more details are available. That's a pretty wierd trace. You seem to have addresses related to the `apm' kernel thread on mysqld's stack. Are you saying that your machine is getting NMI lockups but it is not usually able to print the register and stack dumps? (ie: a printk deadlock)? Do they go away if you disable APM? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: sendfile(2) fails for devices?
In article <[EMAIL PROTECTED]>, Jeff Garzik <[EMAIL PROTECTED]> wrote: >sendfile(2) fails with -EINVAL every time I try to read from a device >file. > >This sounds like a bug... is it? (the man page doesn't mention such a >restriction) sendfile() on purpose only works on things that use the page cache. EINVAL is basically sendfiles way of saying "I would fall back on doing a read+write, so you might as well do it yourself in user space because it might actually be more efficient that way". >I am using kernel 2.4.0-test11-pre2. All other tests with sendfile(2) >succeed: file->file, file->STDOUT, STDIN->file... Yes, as long as STDIN is a file ;) sendfile() wants the source to be in the page cache, because the whole point of sendfile() was to avoid a copy. The current device model does _not_ use the page cache. Now, arguably that's a bug - it also means that you cannot mmap() a block device - but as it could be easily documented (maybe it is, somewhere), I'll call it a bad feature for now. Now, if you want to add the code to do address spaces for block devices, I wouldn't be all that unhappy. I've wanted to see it for a while. I'm not likely to apply it for 2.4.x any more, but I'd love to have it early for 2.5.x. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
"Eric W. Biederman" wrote: > > Hmm. You must mean similiar to milo. > > Have fun. With linuxBIOS I'm working exactly the other way. Killing > off the BIOS. And letting the initial firmware be just a boot loader. > The reduction is complexity should make it more reliable. > ... except that you have to handle every single motherboard architecture out there now. -hpa -- <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
Adam Lazur <[EMAIL PROTECTED]> writes: > Eric W. Biederman ([EMAIL PROTECTED]) said: > > Michael Rothwell <[EMAIL PROTECTED]> writes: > > > This would rock. One place I can think of using it is with distro > > > installers. The installer boots a generic i386 kernel, and then installs > > > an optimized (i.e, PIII, etc.) kernel for run-time. > > > > This would rock? It already does. Of course the installers need > > to actually uses this. > > Actually, along the lines of what Scyld uses two kernel monte for with > their Beowulf2 distribution. > > They boot a network enabled kernel which pulls a kernel off of a server > and then uses two kernel monte to boot with that one. This allows you > to centrally admin your cluster with one server. Good stuff... Yep. You can also do this with etherboot flashed on one a nick card as well. I also intend to use my work for this functionality as well. FYI I work for linux networx which builds hardware for linux clusters. The fact that Scyld is using arp and a fixed network socket is a design decision I don't agree with. Truly slick will be when linuxBIOS is solid. Then you even get remote control of the BIOS, and remote booting all from within the BIOS. Only time will tell if it is worth the effort :) Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
Adam Lazur <[EMAIL PROTECTED]> writes: > Eric W. Biederman ([EMAIL PROTECTED]) said: > > I have recently developed a patch that allows linux to directly boot > > into another linux kernel. With the code freeze it appears > > inappropriate to submit it at this time. > > Aside from what looks to be support for SMP, how does this differ from > the two kernel monte stuff at http://scyld.com/software/monte.html ? I admit that LOBOS, two kernel monte, and the one by by Werner Almsberg. Were all related work that I looked at. And I acknowledge there were some good ideas I pilfered from all of them. There are a couple of differences. But the big one is I'm trying to do it right. In particular this means fixing the problem where the problem is. Additionally I'm killing backwards compatibility with a lot of short sited things. And multiplatform support is in the plan. So long term this should run on alpha, and x86, and sparc and everything else out there that linux supports. This means that you can have a multiplatform boot loader. There will have to be glue code out there to get started from different firmware on different machines but that is it. Additionally mine is the only one that has a real chance of booting a non-linux kernel. Gathering the non probable hardware information is hard. Currently mine implementation is the only one to not simply copy the boot parameters page that is give to the linux kernel. Unlike 2 kernel monte mine deliberately has no reliance upon a BIOS. There is another major difference as well. kexec is part of work on the linuxBIOS project. Where the goal is to have a very minimal firmware before booting into linux. And to use that initial linux kernel as the firmware hardware drivers. What this means is kexec is being developed from a point of view that needs it. If you don't have a BIOS kexec is a must. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
"H. Peter Anvin" <[EMAIL PROTECTED]> writes: > Followup to: <[EMAIL PROTECTED]> > By author:[EMAIL PROTECTED] (Eric W. Biederman) > In newsgroup: linux.dev.kernel > > > > > > > > The interface is designed to be simple and inflexible yet very > > > > powerful. To that end the code just takes an elf binary, and a > > > > command line. The started image also takes an environment generated > > > > by the kernel of all of the unprobeable hardware details. > > > > > > Isn't this what milo does on alpha? > > > > Similar milo uses kernel drivers in it's own framework. > > This has proved to be a major maintenance problem. Milo is nearly > > a kernel fork. > > > > The design is for the long term to get this incorporated into the > > kernel, and even if not a small kernel patch should be easier to > > maintain that a harness for calling kernel drivers. > > > > I'm working on something similiar in "Genesis". It pretty much is (or > rather, will be) a kernel *port*, not a fork; the port is such that it > can run on top of a simple BIOS extender and thus access the boot > media. Hmm. You must mean similiar to milo. Have fun. With linuxBIOS I'm working exactly the other way. Killing off the BIOS. And letting the initial firmware be just a boot loader. The reduction is complexity should make it more reliable. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
sendfile(2) fails for devices?
sendfile(2) fails with -EINVAL every time I try to read from a device file. This sounds like a bug... is it? (the man page doesn't mention such a restriction) I am using kernel 2.4.0-test11-pre2. All other tests with sendfile(2) succeed: file->file, file->STDOUT, STDIN->file... -- Jeff Garzik | Building 1024 | Would you like a Twinkie? MandrakeSoft| - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Where is it written?
Followup to: <[EMAIL PROTECTED]> By author:Peter Samuelson <[EMAIL PROTECTED]> In newsgroup: linux.dev.kernel > > [Andrea Arcangeli] > > Can you think at one case where it's better to push the parameter on > > the stack instead of passing them through the callee clobbered > > ebx/eax/edx? > > Well it's safer if you are lazy about prototyping varargs functions. > But of course by doing that you're treading on thin ice anyway, in > terms of type promotion and portability. So I guess it's much better > to say "varargs functions MUST be prototyped" and use the registers. > It definitely is now. At the time the original x86 ABI was created, a lot of C code was still K&R, and thus prototypes didn't exist... > > AIUI gcc can cope OK with multiple ABIs to be chosen at runtime, am I > right? IRIX, HP-UX and AIX all have both 32-bit and 64-bit ABIs. > I don't think we want to introduce a new ABI in user space at this time. If we ever have to major-rev the ABI (libc.so.7), then we should consider this. -hpa -- <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] show_task() and thread_saved_pc() fix for x86
On Fri, Nov 10, 2000 at 04:26:32PM -0500, Alexander Viro wrote: > * thread_saved_pc() on x86 returns (thread->esp)[3]. Bogus, since the > third word from the stack top has absolutely nothing to return address of > any kind. Correct value: (thread->esp)[0][1] - ebp is on top of the stack > and the rest is obvious. Current code gives completely bogus addresses - > try to say Alt-SysRq-T and watch the show. Reminds me that the Alpha implementation of get_wchan() looks to me like it doesn't handle all cases of schedule() being called from another scheduler function correctly. Some Alpha guru may want to take a look at it. I recently had to fix the mips / mips64 versions of get_wchan() - for the dozenth time. I'd really like to see a wchan field in task_struct to avoid get_wchan breaking every once in a while. Current implementation more than qualifies as a crazy hack ... Ralf - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Where is it written?
[Andrea Arcangeli] > Can you think at one case where it's better to push the parameter on > the stack instead of passing them through the callee clobbered > ebx/eax/edx? Well it's safer if you are lazy about prototyping varargs functions. But of course by doing that you're treading on thin ice anyway, in terms of type promotion and portability. So I guess it's much better to say "varargs functions MUST be prototyped" and use the registers. I'd say go for it -- set up a mailing list and flesh out a better x86 ABI. (Yes, this is the ubiquitous "someone besides me should..." suggestion, I'm afraid I would look pretty foolish trying to help design such.) One issue: ideally you want to use 64-bit regs on AMD Hammer for long longs, but then you leave out all legacy x68s. :( AIUI gcc can cope OK with multiple ABIs to be chosen at runtime, am I right? IRIX, HP-UX and AIX all have both 32-bit and 64-bit ABIs. Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Linux, T13 NCITS Standards Committee (offline replies only)
LKML: Yesterday/Today is a sad day, Linux lost a friend. The ATA/ATAPI T13 NCITS Standards Committee has lost our Chairman, Gene Milligan of Seagate. He was also on the T13 SCSI committee also to the time to address my concerns for changes to the standard as it relates to Linux. He always allow Linux to issue a position after Microsoft stated a point or took a position. As the Chair, he granted Linux, or me, the right to vote early on non-ballot issues and instant ballot voting rights at the second meeting Linux attended. Normally you have to attend two and at the third it is automatically granted, or option of the chair at the second meeting with paperwork filed. I would ask that the Open Source Community send a note or card to his widow via Seagate Corporation. I think it is important that we acknowledge friends that the OSC/LKML did not know it had. Please contact me or Gerry at Seagate offline to a mailing address. I have lost a friend, thus Linux has also. Regards, -- Andre Hedrick CTO Timpanogas Research Group EVP Linux Development, TRG Linux ATA Development - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[PATCH] [drivers/sound] ld2() moved to include
Hi This is cleanup patch... 9 sound drivers use the same logarithm base 2 inline... so patch moves it to drivers/sound/ld2.h BTW: drivers/usb/devio.c and audio.c also uses this ld2() inline Regards -- Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> diff -uNr linux-240t11p2/drivers/sound/cmpci.c linux/drivers/sound/cmpci.c --- linux-240t11p2/drivers/sound/cmpci.cTue Oct 3 14:27:47 2000 +++ linux/drivers/sound/cmpci.c Fri Nov 10 22:50:44 2000 @@ -120,6 +120,7 @@ #include #include "dm.h" +#include "ld2.h" /* - */ @@ -315,31 +316,6 @@ static unsigned long wavetable_mem = 0; /* - */ - -extern __inline__ unsigned ld2(unsigned int x) -{ - unsigned r = 0; - - if (x >= 0x1) { - x >>= 16; - r += 16; - } - if (x >= 0x100) { - x >>= 8; - r += 8; - } - if (x >= 0x10) { - x >>= 4; - r += 4; - } - if (x >= 4) { - x >>= 2; - r += 2; - } - if (x >= 2) - r++; - return r; -} /* * hweightN: returns the hamming weight (i.e. the number diff -uNr linux-240t11p2/drivers/sound/cs46xx.c linux/drivers/sound/cs46xx.c --- linux-240t11p2/drivers/sound/cs46xx.c Tue Oct 3 14:27:47 2000 +++ linux/drivers/sound/cs46xx.cFri Nov 10 22:48:09 2000 @@ -50,6 +50,7 @@ #include #include "cs461x.h" +#include "ld2.h" #define ADC_RUNNING1 #define DAC_RUNNING2 @@ -225,32 +226,6 @@ static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); static loff_t cs_llseek(struct file *file, loff_t offset, int origin); - -extern __inline__ unsigned ld2(unsigned int x) -{ - unsigned r = 0; - - if (x >= 0x1) { - x >>= 16; - r += 16; - } - if (x >= 0x100) { - x >>= 8; - r += 8; - } - if (x >= 0x10) { - x >>= 4; - r += 4; - } - if (x >= 4) { - x >>= 2; - r += 2; - } - if (x >= 2) - r++; - return r; -} - /* * common I/O routines diff -uNr linux-240t11p2/drivers/sound/es1370.c linux/drivers/sound/es1370.c --- linux-240t11p2/drivers/sound/es1370.c Tue Oct 31 02:02:21 2000 +++ linux/drivers/sound/es1370.cFri Nov 10 22:49:50 2000 @@ -158,6 +158,8 @@ #include #include +#include "ld2.h" + /* - */ #undef OSS_DOCUMENTED_MIXER_SEMANTICS @@ -386,33 +388,6 @@ * cross a page boundary and ensures dword alignment for the DMA engine */ static unsigned char bugbuf[16] __attribute__ ((aligned (16))); - -/* - */ - -extern inline unsigned ld2(unsigned int x) -{ - unsigned r = 0; - - if (x >= 0x1) { - x >>= 16; - r += 16; - } - if (x >= 0x100) { - x >>= 8; - r += 8; - } - if (x >= 0x10) { - x >>= 4; - r += 4; - } - if (x >= 4) { - x >>= 2; - r += 2; - } - if (x >= 2) - r++; - return r; -} /* - */ diff -uNr linux-240t11p2/drivers/sound/es1371.c linux/drivers/sound/es1371.c --- linux-240t11p2/drivers/sound/es1371.c Tue Oct 31 02:02:21 2000 +++ linux/drivers/sound/es1371.cFri Nov 10 22:49:28 2000 @@ -128,6 +128,8 @@ #include #include +#include "ld2.h" + /* - */ #undef OSS_DOCUMENTED_MIXER_SEMANTICS @@ -450,33 +452,6 @@ /* - */ static LIST_HEAD(devs); - -/* - */ - -extern inline unsigned ld2(unsigned int x) -{ - unsigned r = 0; - - if (x >= 0x1) { - x >>= 16; - r += 16; - } - if (x >= 0x100) { - x >>= 8; - r += 8; - } - if (x >= 0x10) { - x >>= 4; - r += 4; - } - if (x >= 4) { - x >>= 2; - r += 2; - } - if (x >= 2) - r++; - return r; -} /* - */ diff -uNr linux-240t11p2/drivers/sound/esssolo1.c linux/driv
Re: What protects f_pos?
From: David Wragg <[EMAIL PROTECTED]> Date:04 Nov 2000 22:16:18 + Since f_pos of struct file is a loff_t, on 32-bit architectures it needs a lock to make accesses atomic (or some more sophisticated form of protection). But looking in 2.4.0-test10, there doesn't seem to be any such lock. The llseek op is called with the Big Kernel Lock, but unlike in 2.2, the read and write ops are called without any locks held, and so generic_file_{read|write} make unprotected accesses to f_pos (through their ppos argument). This looks like it's a bug to me although if you have multiple threads hitting a file descriptor at the same time, you're pretty much asking for trouble. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[PATCH] drivers/char/drm gets __init/__exit
Hi Patch is against 2.4.0-test11-pre2... subject tells rest... Regards -- Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> diff -uNr linux-240t11p2/drivers/char/drm/ffb_drv.c linux/drivers/char/drm/ffb_drv.c --- linux-240t11p2/drivers/char/drm/ffb_drv.c Tue Oct 3 00:17:32 2000 +++ linux/drivers/char/drm/ffb_drv.cSat Nov 11 01:53:15 2000 @@ -244,7 +244,7 @@ }; } -static int ffb_init_one(int prom_node, int instance) +static int __init ffb_init_one(int prom_node, int instance) { struct linux_prom64_registers regs[2*PROMREG_MAX]; drm_device_t *dev; @@ -305,7 +305,7 @@ return 0; } -static int ffb_init_dev_table(void) +static int __init ffb_init_dev_table(void) { int root, node; int total = 0; @@ -324,7 +324,7 @@ return 0; } -int ffb_init(void) +int __init ffb_init(void) { int root, node, instance, ret; @@ -345,7 +345,7 @@ return 0; } -void ffb_cleanup(void) +void __exit ffb_cleanup(void) { int instance; diff -uNr linux-240t11p2/drivers/char/drm/gamma_drv.c linux/drivers/char/drm/gamma_drv.c --- linux-240t11p2/drivers/char/drm/gamma_drv.c Tue Oct 3 14:27:25 2000 +++ linux/drivers/char/drm/gamma_drv.c Sat Nov 11 01:51:14 2000 @@ -339,7 +339,7 @@ /* gamma_init is called via init_module at module load time, or via * linux/init/main.c (this is not currently supported). */ -static int gamma_init(void) +static int __init gamma_init(void) { int retcode; drm_device_t *dev = &gamma_device; @@ -380,7 +380,7 @@ /* gamma_cleanup is called via cleanup_module at module unload time. */ -static void gamma_cleanup(void) +static void __exit gamma_cleanup(void) { drm_device_t *dev = &gamma_device; diff -uNr linux-240t11p2/drivers/char/drm/i810_drv.c linux/drivers/char/drm/i810_drv.c --- linux-240t11p2/drivers/char/drm/i810_drv.c Fri Nov 10 14:28:42 2000 +++ linux/drivers/char/drm/i810_drv.c Sat Nov 11 01:49:53 2000 @@ -338,7 +338,7 @@ /* i810_init is called via init_module at module load time, or via * linux/init/main.c (this is not currently supported). */ -static int i810_init(void) +static int __init i810_init(void) { int retcode; drm_device_t *dev = &i810_device; @@ -397,7 +397,7 @@ /* i810_cleanup is called via cleanup_module at module unload time. */ -static void i810_cleanup(void) +static void __exit i810_cleanup(void) { drm_device_t *dev = &i810_device; diff -uNr linux-240t11p2/drivers/char/drm/mga_drv.c linux/drivers/char/drm/mga_drv.c --- linux-240t11p2/drivers/char/drm/mga_drv.c Fri Nov 10 14:28:42 2000 +++ linux/drivers/char/drm/mga_drv.cSat Nov 11 01:45:52 2000 @@ -338,7 +338,7 @@ /* mga_init is called via init_module at module load time, or via * linux/init/main.c (this is not currently supported). */ -static int mga_init(void) +static int __init mga_init(void) { int retcode; drm_device_t *dev = &mga_device; @@ -398,7 +398,7 @@ /* mga_cleanup is called via cleanup_module at module unload time. */ -static void mga_cleanup(void) +static void __exit mga_cleanup(void) { drm_device_t *dev = &mga_device; diff -uNr linux-240t11p2/drivers/char/drm/r128_drv.c linux/drivers/char/drm/r128_drv.c --- linux-240t11p2/drivers/char/drm/r128_drv.c Fri Nov 10 14:28:42 2000 +++ linux/drivers/char/drm/r128_drv.c Sat Nov 11 01:45:17 2000 @@ -323,7 +323,7 @@ /* r128_init is called via init_module at module load time, or via * linux/init/main.c (this is not currently supported). */ -static int r128_init(void) +static int __init r128_init(void) { int retcode; drm_device_t *dev = &r128_device; @@ -387,7 +387,7 @@ /* r128_cleanup is called via cleanup_module at module unload time. */ -static void r128_cleanup(void) +static void __exit r128_cleanup(void) { drm_device_t *dev = &r128_device; diff -uNr linux-240t11p2/drivers/char/drm/tdfx_drv.c linux/drivers/char/drm/tdfx_drv.c --- linux-240t11p2/drivers/char/drm/tdfx_drv.c Fri Nov 10 14:28:42 2000 +++ linux/drivers/char/drm/tdfx_drv.c Sat Nov 11 01:43:07 2000 @@ -298,7 +298,7 @@ /* tdfx_init is called via init_module at module load time, or via * linux/init/main.c (this is not currently supported). */ -static int tdfx_init(void) +static int __init tdfx_init(void) { int retcode; drm_device_t *dev = &tdfx_device; @@ -346,7 +346,7 @@ /* tdfx_cleanup is called via cleanup_module at module unload time. */ -static void tdfx_cleanup(void) +static void __exit tdfx_cleanup(void) { drm_device_t *dev = &tdfx_device;
[PATCH] drivers/md gets md__init/md__exit
Hi This patch against 2.4.0-test11-pre2 adds __init/__exit to drivers/md... obvious stuff. Also it makes modules function more consistent accros raidx.c files... Regards -- Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> diff -uNr linux-240t11p2/include/linux/raid/md_compatible.h linux/include/linux/raid/md_compatible.h --- linux-240t11p2/include/linux/raid/md_compatible.h Wed Nov 8 19:50:31 2000 +++ linux/include/linux/raid/md_compatible.hSat Nov 11 00:46:04 2000 @@ -109,6 +109,7 @@ #include #define md__init __init +#define md__exit __exit #define md__initdata __initdata #define md__initfunc(__arginit) __initfunc(__arginit) diff -uNr linux-240t11p2/drivers/md/linear.c linux/drivers/md/linear.c --- linux-240t11p2/drivers/md/linear.c Tue Oct 3 14:27:34 2000 +++ linux/drivers/md/linear.c Sat Nov 11 01:02:02 2000 @@ -190,24 +190,19 @@ status: linear_status, }; -#ifndef MODULE - void md__init linear_init (void) { register_md_personality (LINEAR, &linear_personality); } -#else - -int init_module (void) +#ifdef MODULE +int md__init init_module (void) { - return (register_md_personality (LINEAR, &linear_personality)); + return linear_init(); } -void cleanup_module (void) +void md__exit cleanup_module (void) { unregister_md_personality (LINEAR); } - #endif - diff -uNr linux-240t11p2/drivers/md/md.c linux/drivers/md/md.c --- linux-240t11p2/drivers/md/md.c Fri Nov 10 14:28:42 2000 +++ linux/drivers/md/md.c Sat Nov 11 00:50:07 2000 @@ -3553,7 +3553,7 @@ } __setup("raid=", raid_setup); #endif -static void md_geninit (void) +static void md__init md_geninit (void) { int i; @@ -3803,12 +3803,12 @@ #endif #ifdef MODULE -int init_module (void) +int md__init init_module (void) { return md_init(); } -static void free_device_names(void) +static void md__exit free_device_names(void) { while (device_names.next != &device_names) { struct list_head *tmp = device_names.next; @@ -3818,7 +3818,7 @@ } -void cleanup_module (void) +void md__exit cleanup_module (void) { struct gendisk **gendisk_ptr; diff -uNr linux-240t11p2/drivers/md/raid0.c linux/drivers/md/raid0.c --- linux-240t11p2/drivers/md/raid0.c Tue Oct 3 14:27:34 2000 +++ linux/drivers/md/raid0.cSat Nov 11 00:55:29 2000 @@ -333,24 +333,19 @@ status: raid0_status, }; -#ifndef MODULE - -void raid0_init (void) +void md__init raid0_init (void) { register_md_personality (RAID0, &raid0_personality); } -#else - -int init_module (void) +#ifdef MODULE +int md__init init_module (void) { - return (register_md_personality (RAID0, &raid0_personality)); + return raid0_init(); } -void cleanup_module (void) +void md__exit cleanup_module (void) { unregister_md_personality (RAID0); } - #endif - diff -uNr linux-240t11p2/drivers/md/raid1.c linux/drivers/md/raid1.c --- linux-240t11p2/drivers/md/raid1.c Fri Nov 10 14:28:42 2000 +++ linux/drivers/md/raid1.cSat Nov 11 00:54:06 2000 @@ -1882,18 +1882,18 @@ sync_request: raid1_sync_request }; -int raid1_init (void) +int md__init raid1_init (void) { return register_md_personality (RAID1, &raid1_personality); } #ifdef MODULE -int init_module (void) +int md__init init_module (void) { return raid1_init(); } -void cleanup_module (void) +void md__exit cleanup_module (void) { unregister_md_personality (RAID1); } diff -uNr linux-240t11p2/drivers/md/raid5.c linux/drivers/md/raid5.c --- linux-240t11p2/drivers/md/raid5.c Tue Oct 3 14:27:34 2000 +++ linux/drivers/md/raid5.cSat Nov 11 00:52:15 2000 @@ -2342,7 +2342,7 @@ sync_request: raid5_sync_request }; -int raid5_init (void) +int md__init raid5_init (void) { int err; @@ -2359,12 +2359,12 @@ } #ifdef MODULE -int init_module (void) +int md__init init_module (void) { return raid5_init(); } -void cleanup_module (void) +void md__exit cleanup_module (void) { unregister_md_personality (RAID5); } diff -uNr linux-240t11p2/drivers/md/xor.c linux/drivers/md/xor.c --- linux-240t11p2/drivers/md/xor.c Tue Oct 3 14:27:34 2000 +++ linux/drivers/md/xor.c Sat Nov 11 00:59:37 2000 @@ -2575,7 +2575,7 @@ */ #define SIZE (PAGE_SIZE-6*32) -static void xor_speed ( struct xor_block_template * func, +static void md__init xor_speed ( struct xor_block_template * func, struct buffer_head *b1, struct buffer_head *b2) { int speed; @@ -2650,7 +2650,7 @@ static struct buffer_head b1, b2; -void calibrate_xor_block(void) +void md__init calibrate_xor_block(void) { if (xor_block) return; @@ -2706,7 +2706,7 @@ #else /* __sparc_v9__ */ -void calibrate_xor_block
Re: Q: Linux rebooting directly into linux.
Eric W. Biederman ([EMAIL PROTECTED]) said: > Michael Rothwell <[EMAIL PROTECTED]> writes: > > This would rock. One place I can think of using it is with distro > > installers. The installer boots a generic i386 kernel, and then installs > > an optimized (i.e, PIII, etc.) kernel for run-time. > > This would rock? It already does. Of course the installers need > to actually uses this. Actually, along the lines of what Scyld uses two kernel monte for with their Beowulf2 distribution. They boot a network enabled kernel which pulls a kernel off of a server and then uses two kernel monte to boot with that one. This allows you to centrally admin your cluster with one server. Good stuff... .adam -- [ Adam Lazur, NOW Monkey <[EMAIL PROTECTED]> ] [ Progeny Linux Systems http://progeny.com ] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[PATCH] drivers/sound gets __init/__exit/__initdata
Hi Patch adds __init/__exit/__initdata tags to various sound drivers. I have reviewed it many times so it should be 100% safe... I have also documented changes so people know who they should shot ;) Patch against 2.4.0-test11-pre2. Please apply... BTW: Is drivers/sound/Hwmcode.h only in my tree? If not it can be dropped because we use 724hwmcode.h now... -- Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> diff -uNr linux-240t11p2/drivers/sound/724hwmcode.h linux/drivers/sound/724hwmcode.h --- linux-240t11p2/drivers/sound/724hwmcode.h Tue Oct 3 00:13:34 2000 +++ linux/drivers/sound/724hwmcode.hFri Nov 10 19:34:42 2000 @@ -9,7 +9,7 @@ #ifndef _HWMCODE_ #define _HWMCODE_ -static unsigned long int DspInst[] = { +static unsigned long int DspInst[] __initdata = { 0x0081, 0x01a4, 0x000a, 0x002f, 0x00080253, 0x01800317, 0x407b, 0x843f, 0x0001483c, 0x0001943c, 0x0005d83c, 0x1c3c, @@ -20,7 +20,7 @@ 0x, 0x, 0x, 0x }; -static unsigned long int CntrlInst[] = { +static unsigned long int CntrlInst[] __initdata = { 0x07, 0x240007, 0x0C0007, 0x1C0007, 0x060007, 0x72, 0x20, 0x030040, 0x007104, 0x004286, 0x030040, 0x000F0D, @@ -799,7 +799,7 @@ // 04/09?@creat // 04/12 stop nise fix // 06/21?@WorkingOff timming -static unsigned long int CntrlInst1E[] = { +static unsigned long int CntrlInst1E[] __initdata = { 0x07, 0x240007, 0x0C0007, 0x1C0007, 0x060007, 0x72, 0x20, 0x030040, 0x007104, 0x004286, 0x030040, 0x000F0D, diff -uNr linux-240t11p2/drivers/sound/cs4232.c linux/drivers/sound/cs4232.c --- linux-240t11p2/drivers/sound/cs4232.c Tue Oct 3 14:27:47 2000 +++ linux/drivers/sound/cs4232.cFri Nov 10 21:19:53 2000 @@ -40,6 +40,8 @@ * Christoph Hellwig Adapted to module_init/module_exit, * simple cleanups * Arnaldo C. de Melo got rid of attach_uart401 + * Bartlomiej Zolnierkiewicz + * Added some __init/__initdata/__exit */ #include @@ -67,7 +69,7 @@ static int synth_base = 0, synth_irq = 0; static int mpu_detected = 0; -int probe_cs4232_mpu(struct address_info *hw_config) +int __init probe_cs4232_mpu(struct address_info *hw_config) { /* * Just write down the config values. @@ -79,7 +81,7 @@ return 1; } -static unsigned char crystal_key[] = /* A 32 byte magic key sequence */ +static unsigned char crystal_key[] __initdata =/* A 32 byte magic key +sequence */ { 0x96, 0x35, 0x9a, 0xcd, 0xe6, 0xf3, 0x79, 0xbc, 0x5e, 0xaf, 0x57, 0x2b, 0x15, 0x8a, 0xc5, 0xe2, @@ -93,7 +95,7 @@ schedule_timeout(howlong); } -int probe_cs4232(struct address_info *hw_config) +int __init probe_cs4232(struct address_info *hw_config) { int i, n; int base = hw_config->io_base, irq = hw_config->irq; @@ -209,7 +211,7 @@ return 0; } -void attach_cs4232(struct address_info *hw_config) +void __init attach_cs4232(struct address_info *hw_config) { int base = hw_config->io_base, irq = hw_config->irq, @@ -268,7 +270,7 @@ } } -void unload_cs4232(struct address_info *hw_config) +void __exit unload_cs4232(struct address_info *hw_config) { int base = hw_config->io_base, irq = hw_config->irq; int dma1 = hw_config->dma, dma2 = hw_config->dma2; diff -uNr linux-240t11p2/drivers/sound/cs4281.c linux/drivers/sound/cs4281.c --- linux-240t11p2/drivers/sound/cs4281.c Fri Nov 10 14:28:44 2000 +++ linux/drivers/sound/cs4281.cFri Nov 10 21:20:46 2000 @@ -40,6 +40,7 @@ //libOSSm.so) // 10/11/00 trw - modified for 2.4.0-test9 kernel enhancements (NR_MAP removal) // 11/03/00 trw - fixed interrupt loss/stutter, added debug. +// 11/10/00 bkz - added __devinit to cs4281_hw_init() // // * @@ -655,7 +656,7 @@ //** // "Init4281()" -- Bring up the part. //** -static int cs4281_hw_init(struct cs4281_state *card) +static int __devinit cs4281_hw_init(struct cs4281_state *card) { u32 ac97_slotid; u32 temp1, temp2; diff -uNr linux-240t11p2/drivers/sound/cs461x_image.h linux/drivers/sound/cs461x_image.h --- linux-240t11p2/drivers/sound/cs461x_image.h Tue Oct 3 00:17:45 2000 +++ linux/drivers/sound/cs461x_image.h Fri Nov 10 20:14:31 2000 @@ -1,4 +1,4 @@ -struct BA1struct BA1Struct = { +struct BA1struct BA1Struct __initdata = { {{ 0x, 0x3000 },{ 0x0001, 0x3800 },{ 0x0002, 0x7000 }}, {0x0
[PATCH] mpu401 bugfix
Some mpu401 functions are used in many sound drivers thus they can't be marked __init. This patch should allow using these drivers as modules... -- Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- linux-240t11p2/drivers/sound/mpu401.c Tue Oct 3 00:17:48 2000 +++ linux/drivers/sound/mpu401.cFri Nov 10 21:34:28 2000 @@ -13,6 +13,7 @@ * * Thomas Sailer ioctl code reworked (vmalloc/vfree removed) * Alan Coxmodularisation, use normal request_irq, use dev_id + * Bartlomiej Zolnierkiewicz removed some __init to allow using many drivers */ #include @@ -908,7 +909,7 @@ static struct midi_operations mpu401_midi_operations[MAX_MIDI_DEV]; -static void __init mpu401_chk_version(int n, struct mpu_config *devc) +static void mpu401_chk_version(int n, struct mpu_config *devc) { int tmp; unsigned long flags; @@ -939,7 +940,7 @@ restore_flags(flags); } -void __init attach_mpu401(struct address_info *hw_config, struct module *owner) +void attach_mpu401(struct address_info *hw_config, struct module *owner) { unsigned long flags; char revision_char; @@ -1166,7 +1167,7 @@ } -int __init probe_mpu401(struct address_info *hw_config) +int probe_mpu401(struct address_info *hw_config) { int ok = 0; struct mpu_config tmp_devc; @@ -1662,7 +1663,7 @@ } } -static int __init mpu_timer_init(int midi_dev) +static int mpu_timer_init(int midi_dev) { struct mpu_config *devc; int n; @@ -1724,7 +1725,7 @@ MODULE_PARM(irq, "i"); MODULE_PARM(io, "i"); -int init_mpu401(void) +int __init init_mpu401(void) { /* Can be loaded either for module use or to provide functions to others */ @@ -1739,7 +1740,7 @@ return 0; } -void cleanup_mpu401(void) +void __exit cleanup_mpu401(void) { if (io != -1 && irq != -1) { /* Check for use by, for example, sscape driver */
[PATCH] Re: 2.4 test10 bug
On Wed, 8 Nov 2000, Eric Reischer wrote: > When cross compiling a PowerPC kernel on an i386 machine, got the following > error: > > binfmt_elf.c: In function 'create_elf_tables': > binfmt_elf.c:166: 'CLOCKS_PER_SEC' undeclared (first use in this function) > binfmt_elf.c:166: (Each undeclared identifier is reported only once > binfmt_elf.c:166: for each function it appears in.) > make[2]: *** [binfmt_elf.o] Error 1 This quick fix should help you: --- linux-240t10/include/asm-ppc/param.hSat Nov 25 18:49:06 1995 +++ linux/include/asm-ppc/param.h Sat Nov 11 17:18:50 2000 @@ -17,4 +17,8 @@ #define MAXHOSTNAMELEN 64 /* max length of hostname */ +#ifdef __KERNEL__ +# define CLOCKS_PER_SECHZ /* frequency at which times() counts */ +#endif + #endif -- Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
Eric W. Biederman ([EMAIL PROTECTED]) said: > I have recently developed a patch that allows linux to directly boot > into another linux kernel. With the code freeze it appears > inappropriate to submit it at this time. Aside from what looks to be support for SMP, how does this differ from the two kernel monte stuff at http://scyld.com/software/monte.html ? .adam -- [ Adam Lazur, NOW Monkey <[EMAIL PROTECTED]> ] [ Progeny Linux Systems http://progeny.com ] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
Lars Marowsky-Bree wrote: > And I am still very fond of the idea of crash dumping to a network server ;-) I second that. Serial can be slow, and has that pesky cable-length limit... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] SB Legacy/PnP in 2.4.0-test9
I wrote a small patch to the SoundBlaster driver to allow use of a legacy (non-PnP) card along with any PnP SB cards you may have, using an extra insmod option. If the option is not specified, the driver works as without the patch. The patch is created off the 2.4.0test9 kernel. Please tell me if something is out of place, either with the patch itself or with my posting of it. -- Dan Church [EMAIL PROTECTED] pnplegacy.diff --- linux/Documentation/sound/Soundblaster.old Mon Oct 29 00:54:12 2001 +++ linux/Documentation/sound/Soundblaster Mon Oct 29 00:56:57 2001 @@ -24,6 +24,9 @@ multiple=0 Set to disable detection of multiple Soundblaster cards. Consider it a bug if this option is needed, and send in a report. +pnplegacy=1Set this to be able to use a PnP card(s) along with a single + non-PnP (legacy) card. Above options for io, irq, etc. are + needed, and will apply only to the legacy card. reverse=1 Reverses the order of the search in the PnP table. uart401=1 Set to enable detection of mpu devices on some clones. isapnpjump=n Jumps to slot n in the driver's PnP table. Use the source, --- linux/drivers/sound/sb_card.old.c Sun Oct 28 21:35:20 2001 +++ linux/drivers/sound/sb_card.c Mon Oct 29 01:28:58 2001 @@ -50,6 +50,9 @@ * * 21-09-2000 Got rid of attach_sbmpu * Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> + * + * 28-10-2000 Added pnplegacy support + * Daniel Church <[EMAIL PROTECTED]> */ #include @@ -64,7 +67,7 @@ #include "sb.h" #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE -#define SB_CARDS_MAX 4 +#define SB_CARDS_MAX 5 #else #define SB_CARDS_MAX 1 #endif @@ -194,6 +197,7 @@ static int isapnp = 1; static int isapnpjump = 0; static int multiple= 1; +static int pnplegacy = 0; static int reverse = 0; static int uart401 = 0; @@ -203,6 +207,7 @@ #else static int isapnp = 0; static int multiple= 0; +static int pnplegacy = 0; #endif MODULE_DESCRIPTION("Soundblaster driver"); @@ -221,11 +226,13 @@ MODULE_PARM(isapnp,"i"); MODULE_PARM(isapnpjump,"i"); MODULE_PARM(multiple, "i"); +MODULE_PARM(pnplegacy, "i"); MODULE_PARM(reverse, "i"); MODULE_PARM(uart401, "i"); MODULE_PARM_DESC(isapnp, "When set to 0, Plug & Play support will be disabled"); MODULE_PARM_DESC(isapnpjump, "Jumps to a specific slot in the driver's PnP table. Use the source, Luke."); MODULE_PARM_DESC(multiple, "When set to 0, will not search for multiple cards"); +MODULE_PARM_DESC(pnplegacy,"When set to 1, will search for a legacy SB card along +with any PnP cards."); MODULE_PARM_DESC(reverse, "When set to 1, will reverse ISAPnP search order"); MODULE_PARM_DESC(uart401, "When set to 1, will attempt to detect and enable the mpu on some clones"); #endif @@ -659,7 +666,7 @@ /* Please remember that even with CONFIG_ISAPNP defined one * should still be able to disable PNP support for this * single driver! */ - if(isapnp && (sb_isapnp_probe(&cfg[card], &cfg_mpu[card], card) < 0) ) { + if((!pnplegacy||card>0) && isapnp && (sb_isapnp_probe(&cfg[card], +&cfg_mpu[card], card) < 0) ) { if(!sb_cards_num) { /* Found no ISAPnP cards, so check for a non-pnp * card and set the detection loop for 1 cycle @@ -674,7 +681,7 @@ } #endif - if(!isapnp) { + if(!isapnp || (pnplegacy&&card==0)) { cfg[card].io_base = io; cfg[card].irq = irq; cfg[card].dma = dma; @@ -695,15 +702,29 @@ card--; sb_cards_num--; continue; + } else if(pnplegacy && isapnp) { + printk(KERN_NOTICE "sb: No legacy SoundBlaster cards " +\ + "found. Continuing with PnP detection.\n"); + pnplegacy=0; + card--; + continue; } else return -ENODEV; } attach_sb_card(&cfg[card]); - if(cfg[card].slots[0]==-1) - return -ENODEV; + if(cfg[card].slots[0]==-1) { + if(card==0 && pnplegacy && isapnp) { + printk(KERN_NOTICE "sb: No legacy SoundBlaster cards " +\ + "found. Continuing with PnP detection.\n"); + pnplegacy=0; + card--; + continue; +
Re: opl3 under 2.4.0-test10
On Sat, 11 Nov 2000, Stephen Thomas wrote: > Mark Hindley wrote: > > I am trying to setup my ALS 110 soundcard under my build of kernel > > 2.4.0-test10. > > > > I have built in isapnp support and also the sb and opl3 drivers. > > > > However, even though I pass opl3=0x388 on the Kernel command line all > > I get is an isapnp panic. > > CONFIG_SOUND_YM3812=y > > and I'm passing "opl3=0x388" to the driver. However, if I query > what synth devices the driver supports, it only reports an > AWE32-0.4.4 (RAM512k) sample device. I expect it report an FM synth > device, too. I get the same (lack of) effect if I go via the > adlib_card code, by saying "adlib=0x388". My investigations so > far have shown that when opl3_detect() first tries to get the > signature of the OPL3 device, it gets 0xff from the inb() (line > 195 of drivers/sound/opl3.c in test11pre1), while the corresponding > code in 2.2.18pre19 gets 0x00. Can you try resetting CONFIG_SOUND_YM3812 to m rather than y. I had a similar problem and that is the workaround I came up with. I haven't gone back and tried to see why it happened; maybe I need to. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: linux-2.4.0-test11-pre2 compilation error: undefined reference to `bust_spinlocks'
"reiser.angus" <[EMAIL PROTECTED]> writes: > cannot make a success compilation of 2.4.0-test11pre2 with the same > .config than for a successfull 2.4.0-test10 compilation. > Same problem when apply patch-2.4.0test11pre2-ac1 from alan cox > > arch/i386/mm/mm.o: In function `do_page_fault': > arch/i386/mm/mm.o(.text+0x821): undefined reference to `bust_spinlocks' > make: *** [vmlinux] Erreur 1 apply this patch (if you look in the archive of lkml you'll see it was posted a day ago by Keith Owens : Index: 0-test11-pre2.1/arch/i386/kernel/traps.c --- 0-test11-pre2.1/arch/i386/kernel/traps.c Fri, 10 Nov 2000 13:10:37 +1100 kaos (linux-2.4/A/c/1_traps.c 1.1.2.2.1.1.2.1.2.3.1.2.3.1.1.2 644) +++ 0-test11-pre2.1(w)/arch/i386/kernel/traps.c Fri, 10 Nov 2000 16:06:48 +1100 kaos +(linux-2.4/A/c/1_traps.c 1.1.2.2.1.1.2.1.2.3.1.2.3.1.1.2 644) @@ -382,6 +382,18 @@ static void unknown_nmi_error(unsigned c printk("Do you have a strange power saving mode enabled?\n"); } +extern spinlock_t console_lock, timerlist_lock; +/* + * Unlock any spinlocks which will prevent us from getting the + * message out (timerlist_lock is acquired through the + * console unblank code) + */ +void bust_spinlocks(void) +{ + spin_lock_init(&console_lock); + spin_lock_init(&timerlist_lock); +} + #if CONFIG_X86_IO_APIC int nmi_watchdog = 1; @@ -394,19 +406,7 @@ static int __init setup_nmi_watchdog(cha __setup("nmi_watchdog=", setup_nmi_watchdog); -extern spinlock_t console_lock, timerlist_lock; static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED; - -/* - * Unlock any spinlocks which will prevent us from getting the - * message out (timerlist_lock is aquired through the - * console unblank code) - */ -void bust_spinlocks(void) -{ - spin_lock_init(&console_lock); - spin_lock_init(&timerlist_lock); -} inline void nmi_watchdog_tick(struct pt_regs * regs) { - -- MandrakeSoft Inc http://www.chmouel.org --Chmouel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: linux-2.4.0-test11-pre2 compilation error: undefined referenceto `bust_spinlocks'
On Sat, 11 Nov 2000, reiser.angus wrote: > cannot make a success compilation of 2.4.0-test11pre2 with the same > .config than for a successfull 2.4.0-test10 compilation. > Same problem when apply patch-2.4.0test11pre2-ac1 from alan cox > > arch/i386/mm/mm.o: In function `do_page_fault': > arch/i386/mm/mm.o(.text+0x821): undefined reference to `bust_spinlocks' > make: *** [vmlinux] Erreur 1 > > bash-2.04$ > > use egcs 1.1.2 This has been introduced and fixed by Andrew Morton ages ago -- here his email and patch with the fix: >From [EMAIL PROTECTED] Fri Nov 10 09:11:36 2000 Date: Fri, 10 Nov 2000 05:18:09 + From: Andrew Morton <[EMAIL PROTECTED]> To: John Kacur <[EMAIL PROTECTED]>, Linus Torvalds <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: [patch] Re: test11-pre2 compile error undefined reference to `bust_spinlocks' John Kacur wrote: > > When attempting to compile test11-pre2, I get the following compile > error. > > arch/i386/mm/mm.o: In function `do_page_fault': > arch/i386/mm/mm.o(.text+0x781): undefined reference to `bust_spinlocks' > make: *** [vmlinux] Error 1 It was inside an ifdef. Apologies. This patch against test11-pre2 moves it to fault.c. --- linux-2.4.0-test11-pre2/arch/i386/kernel/traps.cFri Nov 10 15:59:15 2000 +++ linux/arch/i386/kernel/traps.c Fri Nov 10 15:52:40 2000 @@ -63,6 +63,7 @@ struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, }; extern int console_loglevel; +extern void bust_spinlocks(void); static inline void console_silent(void) { @@ -394,19 +395,7 @@ __setup("nmi_watchdog=", setup_nmi_watchdog); -extern spinlock_t console_lock, timerlist_lock; static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED; - -/* - * Unlock any spinlocks which will prevent us from getting the - * message out (timerlist_lock is aquired through the - * console unblank code) - */ -void bust_spinlocks(void) -{ - spin_lock_init(&console_lock); - spin_lock_init(&timerlist_lock); -} inline void nmi_watchdog_tick(struct pt_regs * regs) { --- linux-2.4.0-test11-pre2/arch/i386/mm/fault.cFri Nov 10 15:59:15 2000 +++ linux/arch/i386/mm/fault.c Fri Nov 10 16:02:03 2000 @@ -24,7 +24,6 @@ #include extern void die(const char *,struct pt_regs *,long); -extern void bust_spinlocks(void); /* * Ugly, ugly, but the goto's result in better assembly.. @@ -76,6 +75,19 @@ bad_area: return 0; +} + +extern spinlock_t console_lock, timerlist_lock; + +/* + * Unlock any spinlocks which will prevent us from getting the + * message out (timerlist_lock is aquired through the + * console unblank code) + */ +void bust_spinlocks(void) +{ + spin_lock_init(&console_lock); + spin_lock_init(&timerlist_lock); } asmlinkage void do_invalid_op(struct pt_regs *, unsigned long); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
On 2000-11-10T19:12:29, "Theodore Y. Ts'o" <[EMAIL PROTECTED]> said: > Great! Are you thinking about putting the crash dumper and the raw > write disk routines in a separate text section, so they can be located > in pages which are write-protected from accidental modification in case > some kernel code goes wild? (Who me? Paranoid? :-) I would also suggest to have a little checksum over the relevant pages, to verify that the code is still correct and we are not going to crashdump all over our valuable data... And I am still very fond of the idea of crash dumping to a network server ;-) Sincerely, Lars Marowsky-Brée <[EMAIL PROTECTED]> Development HA -- Perfection is our goal, excellence will be tolerated. -- J. Yahl - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10)
Date: Fri, 3 Nov 2000 17:10:52 -0800 (PST) From: James Simmons <[EMAIL PROTECTED]> > * VGA Console can cause SMP deadlock when doing printk {CRITICAL} >(Keith Owens) Still not fixed :-( Here is the patch again. Keith give it a try and tell me if it solves your problems. Keith, have you had a chance to test the patch? Does it fix things? I note that it's apparently not in test11-pre2. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda23 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda23 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda23.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda23.diff : - o [CRITICA] Don't crash on malformed discovery frames o [CORRECT] Don't divide self->N1, because -1/2 = 0 o [CORRECT] Correctly transmit Ultra frames sent while doing discovery diff -urpN old-linux/include/net/irda/timer.h linux/include/net/irda/timer.h --- old-linux/include/net/irda/timer.h Thu Nov 9 13:36:27 2000 +++ linux/include/net/irda/timer.h Thu Nov 9 18:26:03 2000 @@ -76,6 +76,7 @@ inline void irlap_start_wd_timer(struct inline void irlap_start_backoff_timer(struct irlap_cb *self, int timeout); void irlap_start_mbusy_timer(struct irlap_cb *); +void irlap_stop_mbusy_timer(struct irlap_cb *); struct lsap_cb; struct lap_cb; diff -urpN old-linux/net/irda/irda_device.c linux/net/irda/irda_device.c --- old-linux/net/irda/irda_device.cThu Nov 9 17:09:30 2000 +++ linux/net/irda/irda_device.cThu Nov 9 18:26:03 2000 @@ -185,7 +185,7 @@ void irda_device_set_media_busy(struct n IRDA_DEBUG( 4, "Media busy!\n"); } else { self->media_busy = FALSE; - del_timer(&self->media_busy_timer); + irlap_stop_mbusy_timer(self); } } diff -urpN old-linux/net/irda/irlap_event.c linux/net/irda/irlap_event.c --- old-linux/net/irda/irlap_event.cThu Nov 9 18:16:46 2000 +++ linux/net/irda/irlap_event.cThu Nov 9 18:26:03 2000 @@ -305,6 +305,17 @@ void irlap_next_state(struct irlap_cb *s if ((state != LAP_XMIT_P) && (state != LAP_XMIT_S)) self->bytes_left = self->line_capacity; #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */ +#ifdef CONFIG_IRDA_ULTRA + /* Send any pending Ultra frames if any */ + /* The higher layers may have sent a few Ultra frames while we +* were doing discovery (either query or reply). Those frames +* have been queued, but were never sent. It is now time to +* send them... +* Jean II */ + if ((state == LAP_NDM) && (!skb_queue_empty(&self->txq_ultra))) + /* Force us to listen 500 ms before sending Ultra */ + irda_device_set_media_busy(self->netdev, TRUE); +#endif /* CONFIG_IRDA_ULTRA */ } /* @@ -1903,20 +1914,25 @@ static int irlap_state_nrm_s(struct irla /* * Wait until retry_count * n matches negotiated threshold/ * disconnect time (note 2 in IrLAP p. 82) +* +* Note : self->wd_timeout = (self->poll_timeout * 2), +* and self->final_timeout == self->poll_timeout, +* which explain why we use (self->retry_count * 2) here !!! +* Jean II */ IRDA_DEBUG(1, __FUNCTION__ "(), retry_count = %d\n", self->retry_count); - if ((self->retry_count < (self->N2/2)) && - (self->retry_count != self->N1/2)) { + if (((self->retry_count * 2) < self->N2) && + ((self->retry_count * 2) != self->N1)) { irlap_start_wd_timer(self, self->wd_timeout); - self->retry_count++; - } else if (self->retry_count == (self->N1/2)) { + self->retry_count++; + } else if ((self->retry_count * 2) == self->N1) { irlap_status_indication(self, STATUS_NO_ACTIVITY); irlap_start_wd_timer(self, self->wd_timeout); self->retry_count++; - } else if (self->retry_count >= self->N2/2) { + } else if ((self->retry_count * 2) >= self->N2) { irlap_apply_default_connection_parameters(self); /* Always switch state before calling upper layers */ diff -urpN old-linux/net/irda/irlap_frame.c linux/net/irda/irlap_frame.c --- old-linux/net/irda/irlap_frame.cThu Nov 9 18:16:46 2000 +++ linux/net/irda/irlap_frame.cThu Nov 9 18:26:03 2000 @@ -503,6 +503,12 @@ static void irlap_recv_discovery_xid_cmd * Check if last frame */ if (info->s == 0xff) { + /* Check if things are sane at this point... */ + if((discovery_info == NULL) || (skb->len < 3)) { + ERROR(__FUNCTION__ "(), discovery fra
linux-2.4.0-test11-pre2 compilation error: undefined reference to `bust_spinlocks'
cannot make a success compilation of 2.4.0-test11pre2 with the same .config than for a successfull 2.4.0-test10 compilation. Same problem when apply patch-2.4.0test11pre2-ac1 from alan cox arch/i386/mm/mm.o: In function `do_page_fault': arch/i386/mm/mm.o(.text+0x821): undefined reference to `bust_spinlocks' make: *** [vmlinux] Erreur 1 bash-2.04$ use egcs 1.1.2 I can provide .config i did not put it for size reasons. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda21 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda21 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda21.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda21.diff : - o [CORRECT] Replace ASSERT with proper test (non DEBUG compiles) o [CORRECT] Increase BOFs value and handle xbofs_delay as delay o [FEATURE] Cleanups o [OUPS ] Broken init of self->N1 (disable case) diff -urpN old-linux/include/net/irda/irda.h linux/include/net/irda/irda.h --- old-linux/include/net/irda/irda.h Thu Nov 9 17:52:56 2000 +++ linux/include/net/irda/irda.h Thu Nov 9 17:59:48 2000 @@ -176,12 +176,14 @@ typedef union { * (must not exceed 48 bytes, check with struct sk_buff) */ struct irda_skb_cb { - magic_t magic; /* Be sure that we can trust the information */ - __u32 speed; /* The Speed this frame should be sent with */ - __u16 mtt; /* Minimum turn around time */ - int xbofs; /* Number of xbofs required, used by SIR mode */ - __u8 line; /* Used by IrCOMM in IrLPT mode */ - void (*destructor)(struct sk_buff *skb); /* Used for flow control */ + magic_t magic; /* Be sure that we can trust the information */ + __u32 speed; /* The Speed this frame should be sent with */ + __u16 mtt; /* Minimum turn around time */ + __u16 xbofs; /* Number of xbofs required, used by SIR mode */ + void*context;/* May be used by drivers */ + void(*destructor)(struct sk_buff *skb); /* Used for flow control */ + __u16 xbofs_delay; /* Number of xbofs used for generating the mtt */ + __u8line;/* Used by IrCOMM in IrLPT mode */ }; /* Misc status information */ diff -urpN old-linux/include/net/irda/irlmp.h linux/include/net/irda/irlmp.h --- old-linux/include/net/irda/irlmp.h Thu Nov 9 17:52:56 2000 +++ linux/include/net/irda/irlmp.h Thu Nov 9 17:59:48 2000 @@ -252,9 +252,12 @@ static inline hashbin_t *irlmp_get_cache static inline int irlmp_get_lap_tx_queue_len(struct lsap_cb *self) { - ASSERT(self != NULL, return 0;); - ASSERT(self->lap != NULL, return 0;); - ASSERT(self->lap->irlap != NULL, return 0;); + if (self == NULL) + return 0; + if (self->lap == NULL) + return 0; + if (self->lap->irlap == NULL) + return 0; return IRLAP_GET_TX_QUEUE_LEN(self->lap->irlap); } diff -urpN old-linux/include/net/irda/qos.h linux/include/net/irda/qos.h --- old-linux/include/net/irda/qos.hThu Nov 9 17:52:56 2000 +++ linux/include/net/irda/qos.hThu Nov 9 17:59:48 2000 @@ -107,7 +107,3 @@ void irda_qos_bits_to_value(struct qos_i #endif - - - - diff -urpN old-linux/net/irda/irlan/irlan_client.c linux/net/irda/irlan/irlan_client.c --- old-linux/net/irda/irlan/irlan_client.c Thu Nov 9 17:32:39 2000 +++ linux/net/irda/irlan/irlan_client.c Thu Nov 9 17:59:48 2000 @@ -159,7 +159,7 @@ void irlan_client_discovery_indication(d /* Find instance */ self = (struct irlan_cb *) hashbin_get_first(irlan); -if (self) { + if (self) { ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_DEBUG(1, __FUNCTION__ "(), Found instance (%08x)!\n", diff -urpN old-linux/net/irda/irlan/irlan_common.c linux/net/irda/irlan/irlan_common.c --- old-linux/net/irda/irlan/irlan_common.c Thu Nov 9 17:41:49 2000 +++ linux/net/irda/irlan/irlan_common.c Thu Nov 9 17:59:48 2000 @@ -122,6 +122,7 @@ int __init irlan_init(void) struct irlan_cb *new; __u16 hints; + IRDA_DEBUG(0, __FUNCTION__ "()\n"); /* Allocate master structure */ irlan = hashbin_new(HB_LOCAL); if (irlan == NULL) { @@ -136,7 +137,7 @@ int __init irlan_init(void) hints = irlmp_service_to_hint(S_LAN); /* Register with IrLMP as a client */ - ckey = irlmp_register_client(hints, irlan_client_discovery_indication, + ckey = irlmp_register_client(hints, &irlan_client_discovery_indication, NULL, NULL); /* Register with IrLMP as a service */ diff -urpN old-linux/net/irda/irlap.c linux/net/irda/irlap.c --- old-linux/net/irda/irlap.c Thu Nov 9 17:52:56 2000 +++ linux/net/irda/irlap.c Thu Nov 9 17:59:48 2000 @@ -1011,7 +1011,7 @@ void irlap_apply_default_connection_para irda_device_set_media_busy(self->netdev, TRUE); /* Default value in NDM */ - self->bof
[patch] patch-2.4.0-test10-irda22 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda22 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda22.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda22.diff : - o [FEATURE] Cleaner module init o [FEATURE] Remove dependancy on irmanager o [FEATURE] Move remaining irmod.c content to irsyms.c o [FEATURE] Cleaner use of MOD_INC_USE_COUNT diff -urpN old-linux/net/irda/Makefile linux/net/irda/Makefile --- old-linux/net/irda/Makefile Sun Aug 6 11:23:41 2000 +++ linux/net/irda/Makefile Thu Nov 9 18:02:46 2000 @@ -17,7 +17,7 @@ O_OBJS := iriap.o iriap_event.o irlmp.o irlap.o irlap_event.o irlap_frame.o timer.o qos.o irqueue.o \ irttp.o irda_device.o irias_object.o crc.o wrapper.o af_irda.o \ discovery.o parameters.o -OX_OBJS := irmod.o +OX_OBJS := irsyms.o ifeq ($(CONFIG_IRDA),m) M_OBJS := $(O_TARGET) diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 17:57:45 2000 +++ linux/net/irda/af_irda.cThu Nov 9 17:59:48 2000 @@ -7,7 +7,7 @@ * Author:Dag Brattli <[EMAIL PROTECTED]> * Created at:Sun May 31 10:12:43 1998 * Modified at: Sat Dec 25 21:10:23 1999 - * Modified by: Dag Brattli <[EMAIL PROTECTED]> + * Modified by: Dag Brattli <[EMAIL PROTECTED]> * Sources: af_netroom.c, af_ax25.c, af_rose.c, af_x25.c etc. * * Copyright (c) 1999 Dag Brattli <[EMAIL PROTECTED]> @@ -43,10 +43,11 @@ / #include -#include +#include #include #include #include +#include #include #include #include @@ -81,6 +82,10 @@ static struct proto_ops irda_ultra_ops; #define IRDA_MAX_HEADER (TTP_MAX_HEADER) +#ifdef CONFIG_IRDA_DEBUG +__u32 irda_debug = IRDA_DEBUG_LEVEL; +#endif + /* * Function irda_data_indication (instance, sap, skb) * @@ -1124,8 +1129,7 @@ static int irda_create(struct socket *so self->daddr = DEV_ADDR_ANY; /* Until we get connected */ self->saddr = 0x0; /* so IrLMP assign us any link */ - /* Notify that we are using the irda module, so nobody removes it */ - irda_mod_inc_use_count(); + MOD_INC_USE_COUNT; return 0; } @@ -1169,10 +1173,8 @@ void irda_destroy_socket(struct irda_soc } #endif /* CONFIG_IRDA_ULTRA */ kfree(self); - - /* Notify that we are not using the irda module anymore */ - irda_mod_dec_use_count(); - + MOD_DEC_USE_COUNT; + return; } @@ -2369,25 +2371,44 @@ static struct notifier_block irda_dev_no }; /* + * Function irda_proc_modcount (inode, fill) + * + *Use by the proc file system functions to prevent the irda module + *being removed while the use is standing in the net/irda directory + */ +void irda_proc_modcount(struct inode *inode, int fill) +{ +#ifdef MODULE +#ifdef CONFIG_PROC_FS + if (fill) + MOD_INC_USE_COUNT; + else + MOD_DEC_USE_COUNT; +#endif /* CONFIG_PROC_FS */ +#endif /* MODULE */ +} + +/* * Function irda_proto_init (pro) * *Initialize IrDA protocol layer * */ -static int __init irda_proto_init(void) +int __init irda_proto_init(void) { - MESSAGE("IrDA (tm) Protocols for Linux-2.4 (Dag Brattli)\n"); + sock_register(&irda_family_ops); -sock_register(&irda_family_ops); - -irda_packet_type.type = htons(ETH_P_IRDA); - dev_add_pack(&irda_packet_type); - -register_netdevice_notifier(&irda_dev_notifier); - + irda_packet_type.type = htons(ETH_P_IRDA); +dev_add_pack(&irda_packet_type); + + register_netdevice_notifier(&irda_dev_notifier); + + irda_init(); +#ifdef MODULE + irda_device_init(); /* Called by init/main.c when non-modular */ +#endif return 0; } -module_init(irda_proto_init); /* * Function irda_proto_cleanup (void) @@ -2395,13 +2416,24 @@ module_init(irda_proto_init); *Remove IrDA protocol layer * */ -void __exit irda_proto_cleanup(void) +#ifdef MODULE +void irda_proto_cleanup(void) { irda_packet_type.type = htons(ETH_P_IRDA); - dev_remove_pack(&irda_packet_type); +dev_remove_pack(&irda_packet_type); - unregister_netdevice_notifier(&irda_dev_notifier); +unregister_netdevice_notifier(&irda_dev_notifier); sock_unregister(PF_IRDA); + irda_cleanup(); + +return; } +module_init(irda_proto_ini
[patch] patch-2.4.0-test10-irda19 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda19 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda19.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda19.diff : - o [CORRECT] Correctly handle interleaved discovery frames diff -urpN old-linux/net/irda/irlap_event.c linux/net/irda/irlap_event.c --- old-linux/net/irda/irlap_event.cThu Nov 9 17:52:56 2000 +++ linux/net/irda/irlap_event.cThu Nov 9 17:53:16 2000 @@ -407,6 +407,27 @@ static int irlap_state_ndm(struct irlap_ irlap_start_query_timer(self, QUERY_TIMEOUT*info->S); irlap_next_state(self, LAP_REPLY); } + else { + /* This is the final slot. How is it possible ? +* This would happen is both discoveries are just slightly +* offset (if they are in sync, all packets are lost). +* Most often, all the discovery requests will be received +* in QUERY state (see my comment there), except for the +* last frame that will come here. +* The big trouble when it happen is that active discovery +* doesn't happen, because nobody answer the discoveries +* frame of the other guy, so the log shows up empty. +* What should we do ? +* Not much. It's too late to answer those discovery frames, +* so we just pass the info to IrLMP who will put it in the +* log (and post an event). +* Jean II +*/ + IRDA_DEBUG(1, __FUNCTION__ "(), Receiving final discovery +request, missed the discovery slots :-(\n"); + + /* Last discovery request -> in the log */ + irlap_discovery_indication(self, info->discovery); + } break; #ifdef CONFIG_IRDA_ULTRA case SEND_UI_FRAME: @@ -494,11 +515,8 @@ static int irlap_state_query(struct irla break; case RECV_DISCOVERY_XID_CMD: /* Yes, it is possible to receive those frames in this mode. -* This would happen is both discoveries are just slightly -* offset (if they are in sync, all packets are lost). -* The big trouble when it happen is that passive discovery -* doesn't happen, because nobody answer the discoveries -* frame of the other guy, so the log shows up empty. +* Note that most often the last discovery request won't +* occur here but in NDM state (see my comment there). * What should we do ? * Not much. We are currently performing our own discovery, * therefore we can't answer those frames. We don't want @@ -509,10 +527,9 @@ static int irlap_state_query(struct irla ASSERT(info != NULL, return -1;); - IRDA_DEBUG(1, __FUNCTION__ "(), Receiving event %d, %s\n", - event, irlap_event[event]); + IRDA_DEBUG(1, __FUNCTION__ "(), Receiving discovery request (s = %d) +while performing discovery :-(\n", info->s); - /* Last discovery frame? */ + /* Last discovery request ? */ if (info->s == 0xff) irlap_discovery_indication(self, info->discovery); break; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda20 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda20 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda20.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda20.diff : - o [CORRECT] Close up LMP socket when receive a disconnect o [FEATURE] Cleanups diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 17:41:49 2000 +++ linux/net/irda/af_irda.cThu Nov 9 17:55:35 2000 @@ -114,7 +114,7 @@ static int irda_data_indication(void *in /* * Function irda_disconnect_indication (instance, sap, reason, skb) * - *Connection has been closed. Chech reason to find out why + *Connection has been closed. Check reason to find out why * */ static void irda_disconnect_indication(void *instance, void *sap, @@ -138,6 +138,27 @@ static void irda_disconnect_indication(v sk->state_change(sk); sk->dead = 1; } + + /* Close our TSAP. +* If we leave it open, IrLMP put it back into the list of +* unconnected LSAPs. The problem is that any incomming request +* can then be matched to this socket (and it will be, because +* it is at the head of the list). This would prevent any +* listening socket waiting on the same TSAP to get those requests. +* Some apps forget to close sockets, or hang to it a bit too long, +* so we may stay in this dead state long enough to be noticed... +* Note : all socket function do check sk->state, so we are safe... +* Jean II +*/ + irttp_close_tsap(self->tsap); + self->tsap = NULL; + + /* Note : once we are there, there is not much you want to do +* with the socket anymore, apart from closing it. +* For example, bind() and connect() won't reset sk->err, +* sk->shutdown and sk->dead to valid values... +* Jean II +*/ } /* @@ -1126,11 +1147,15 @@ void irda_destroy_socket(struct irda_soc irlmp_unregister_service(self->skey); /* Unregister with LM-IAS */ - if (self->ias_obj) + if (self->ias_obj) { irias_delete_object(self->ias_obj); + self->ias_obj = NULL; + } - if (self->iriap) + if (self->iriap) { iriap_close(self->iriap); + self->iriap = NULL; + } if (self->tsap) { irttp_disconnect_request(self->tsap, NULL, P_NORMAL); @@ -1576,9 +1601,11 @@ static int irda_shutdown(struct socket * sk->shutdown |= SEND_SHUTDOWN; sk->state_change(sk); - if (self->iriap) + if (self->iriap) { iriap_close(self->iriap); - + self->iriap = NULL; + } + if (self->tsap) { irttp_disconnect_request(self->tsap, NULL, P_NORMAL); irttp_close_tsap(self->tsap); diff -urpN old-linux/net/irda/irlmp.c linux/net/irda/irlmp.c --- old-linux/net/irda/irlmp.c Thu Nov 9 17:52:56 2000 +++ linux/net/irda/irlmp.c Thu Nov 9 17:55:35 2000 @@ -284,7 +284,7 @@ void irlmp_register_link(struct irlap_cb init_timer(&lap->idle_timer); /* -* Insert into queue of unconnected LSAPs +* Insert into queue of LMP links */ hashbin_insert(irlmp->links, (irda_queue_t *) lap, lap->saddr, NULL); diff -urpN old-linux/net/irda/irlmp_frame.c linux/net/irda/irlmp_frame.c --- old-linux/net/irda/irlmp_frame.cThu Nov 9 17:39:46 2000 +++ linux/net/irda/irlmp_frame.cThu Nov 9 17:55:35 2000 @@ -127,9 +127,11 @@ void irlmp_link_data_indication(struct l irlmp->unconnected_lsaps); /* Maybe LSAP was already connected, so try one more time */ - if (!lsap) + if (!lsap) { + IRDA_DEBUG(1, __FUNCTION__ "(), incoming connection for LSAP +already connected\n"); lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, self->lsaps); + } } else lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, self->lsaps); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda18 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda18 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda18.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda18.diff : - o [CRITICA] Prevent out of bound access in QoS arrays o [CORRECT] Properly disable link broken warning when disc time = 3s o [FEATURE] Propagate link status indication to higher layers o [FEATURE] Allow to set max IrDA speed in sysctl o [FEATURE] Allow to set max IrDA inactive time in sysctl diff -urpN old-linux/include/net/irda/irda.h linux/include/net/irda/irda.h --- old-linux/include/net/irda/irda.h Thu Nov 9 13:27:10 2000 +++ linux/include/net/irda/irda.h Thu Nov 9 17:45:53 2000 @@ -242,6 +242,8 @@ typedef struct { void (*disconnect_indication)(void *instance, void *sap, LM_REASON reason, struct sk_buff *); void (*flow_indication)(void *instance, void *sap, LOCAL_FLOW flow); + void (*status_indication)(void *instance, + LINK_STATUS link, LOCK_STATUS lock); void *instance; /* Layer instance pointer */ char name[16]; /* Name of layer */ } notify_t; diff -urpN old-linux/include/net/irda/irlap.h linux/include/net/irda/irlap.h --- old-linux/include/net/irda/irlap.h Thu Nov 9 14:47:22 2000 +++ linux/include/net/irda/irlap.h Thu Nov 9 17:45:53 2000 @@ -214,7 +214,7 @@ void irlap_unitdata_indication(struct ir void irlap_disconnect_request(struct irlap_cb *); void irlap_disconnect_indication(struct irlap_cb *, LAP_REASON reason); -void irlap_status_indication(int quality_of_link); +void irlap_status_indication(struct irlap_cb *, int quality_of_link); void irlap_test_request(__u8 *info, int len); diff -urpN old-linux/include/net/irda/irlmp.h linux/include/net/irda/irlmp.h --- old-linux/include/net/irda/irlmp.h Thu Nov 9 17:41:49 2000 +++ linux/include/net/irda/irlmp.h Thu Nov 9 17:45:53 2000 @@ -233,7 +233,7 @@ void irlmp_connless_data_indication(stru #endif /* CONFIG_IRDA_ULTRA */ void irlmp_status_request(void); -void irlmp_status_indication(LINK_STATUS link, LOCK_STATUS lock); +void irlmp_status_indication(struct lap_cb *, LINK_STATUS link, LOCK_STATUS lock); int irlmp_slsap_inuse(__u8 slsap); __u8 irlmp_find_free_slsap(void); diff -urpN old-linux/include/net/irda/irttp.h linux/include/net/irda/irttp.h --- old-linux/include/net/irda/irttp.h Thu Nov 9 14:47:22 2000 +++ linux/include/net/irda/irttp.h Thu Nov 9 17:45:53 2000 @@ -129,6 +129,8 @@ int irttp_connect_response(struct tsap_c int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *skb, int priority); void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow); +void irttp_status_indication(void *instance, +LINK_STATUS link, LOCK_STATUS lock); struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance); static __inline __u32 irttp_get_saddr(struct tsap_cb *self) diff -urpN old-linux/include/net/irda/qos.h linux/include/net/irda/qos.h --- old-linux/include/net/irda/qos.hTue Oct 31 11:18:17 2000 +++ linux/include/net/irda/qos.hThu Nov 9 17:45:53 2000 @@ -86,6 +86,9 @@ struct qos_info { #endif }; +extern int sysctl_max_baud_rate; +extern int sysctl_max_inactive_time; + extern __u32 baud_rates[]; extern __u32 data_sizes[]; extern __u32 min_turn_times[]; @@ -100,10 +103,6 @@ __u32 irlap_requested_line_capacity(stru __u32 irlap_min_turn_time_in_bytes(__u32 speed, __u32 min_turn_time); int msb_index(__u16 byte); -int value_index(__u32 value, __u32 *array); -__u32 byte_value(__u8 byte, __u32 *array); -__u32 index_value(int index, __u32 *array); - void irda_qos_bits_to_value(struct qos_info *qos); #endif diff -urpN old-linux/net/irda/irlap.c linux/net/irda/irlap.c --- old-linux/net/irda/irlap.c Thu Nov 9 16:08:25 2000 +++ linux/net/irda/irlap.c Thu Nov 9 17:45:53 2000 @@ -617,7 +617,7 @@ void irlap_discovery_indication(struct i * * */ -void irlap_status_indication(int quality_of_link) +void irlap_status_indication(struct irlap_cb *self, int quality_of_link) { switch (quality_of_link) { case STATUS_NO_ACTIVITY: @@ -629,7 +629,8 @@ void irlap_status_indication(int quality default: break; } - irlmp_status_indication(quality_of_link, LOCK_NO_CHANGE); + irlmp_status_indication(self->notify.instance, + quality_of_link, LOCK_NO_CHANGE); } /* @@
[patch] patch-2.4.0-test10-irda17 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda17 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda17.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda17.diff : - o [FEATURE] Removed unused discovery callback o [FEATURE] Give discovery and expery callback meaningful names diff -urpN old-linux/include/net/irda/irlmp.h linux/include/net/irda/irlmp.h --- old-linux/include/net/irda/irlmp.h Thu Nov 9 17:39:46 2000 +++ linux/include/net/irda/irlmp.h Thu Nov 9 17:40:01 2000 @@ -85,9 +85,8 @@ typedef struct { __u16 hint_mask; - DISCOVERY_CALLBACK1 callback1; /* Selective discovery */ - DISCOVERY_CALLBACK2 callback2; /* Whole discovery */ - DISCOVERY_CALLBACK1 callback3; /* Selective expiration */ + DISCOVERY_CALLBACK1 disco_callback; /* Selective discovery */ + DISCOVERY_CALLBACK1 expir_callback; /* Selective expiration */ void *priv;/* Used to identify client */ } irlmp_client_t; @@ -193,14 +192,12 @@ void irlmp_close_lsap( struct lsap_cb *s __u16 irlmp_service_to_hint(int service); __u32 irlmp_register_service(__u16 hints); int irlmp_unregister_service(__u32 handle); -__u32 irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 callback1, - DISCOVERY_CALLBACK2 callback2, - DISCOVERY_CALLBACK1 callback3, void *priv); +__u32 irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb, + DISCOVERY_CALLBACK1 expir_clb, void *priv); int irlmp_unregister_client(__u32 handle); int irlmp_update_client(__u32 handle, __u16 hint_mask, - DISCOVERY_CALLBACK1 callback1, - DISCOVERY_CALLBACK2 callback2, - DISCOVERY_CALLBACK1 callback3, void *priv); + DISCOVERY_CALLBACK1 disco_clb, + DISCOVERY_CALLBACK1 expir_clb, void *priv); void irlmp_register_link(struct irlap_cb *, __u32 saddr, notify_t *); void irlmp_unregister_link(__u32 saddr); diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 17:39:46 2000 +++ linux/net/irda/af_irda.cThu Nov 9 17:40:01 2000 @@ -1096,7 +1096,7 @@ static int irda_create(struct socket *so sk->protocol = protocol; /* Register as a client with IrLMP */ - self->ckey = irlmp_register_client(0, NULL, NULL, NULL, NULL); + self->ckey = irlmp_register_client(0, NULL, NULL, NULL); self->mask = 0x; self->rx_flow = self->tx_flow = FLOW_START; self->nslots = DISCOVERY_DEFAULT_SLOTS; @@ -2147,7 +2147,7 @@ static int irda_getsockopt(struct socket /* Tell IrLMP we want to be notified */ irlmp_update_client(self->ckey, self->mask, - irda_selective_discovery_indication, NULL, + irda_selective_discovery_indication, NULL, (void *) self); /* Do some discovery (and also return cached results) */ @@ -2179,8 +2179,7 @@ static int irda_getsockopt(struct socket "(), found immediately !\n"); /* Tell IrLMP that we have been notified */ - irlmp_update_client(self->ckey, self->mask, NULL, NULL, - NULL, NULL); + irlmp_update_client(self->ckey, self->mask, NULL, NULL, NULL); /* Check if the we got some results */ if (!self->cachediscovery) diff -urpN old-linux/net/irda/ircomm/ircomm_tty_attach.c linux/net/irda/ircomm/ircomm_tty_attach.c --- old-linux/net/irda/ircomm/ircomm_tty_attach.c Thu Nov 9 17:39:46 2000 +++ linux/net/irda/ircomm/ircomm_tty_attach.c Thu Nov 9 17:39:55 2000 @@ -236,8 +236,7 @@ static void ircomm_tty_ias_register(stru } self->skey = irlmp_register_service(hints); self->ckey = irlmp_register_client( - hints, ircomm_tty_discovery_indication, NULL, NULL, - (void *) self); + hints, ircomm_tty_discovery_indication, NULL, (void *) self); } /* diff -urpN old-linux/net/irda/irlan/irlan_common.c linux/net/irda/irlan/irlan_common.c --- old-linux/net/irda/irlan/irlan_common.c Thu Nov 9 17:39:46 2000 +++ linux/net/irda/irlan/irlan_common.c Thu Nov 9 17:39:55 2000 @@ -137,7 +137,7 @@ int __init irlan_init(void) /*
[patch] patch-2.4.0-test10-irda16 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda16 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda16.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda16.diff : - o [CRITICA] Add hashbin_remove_first for safe linked list removal o [CRITICA] Modify discovery to handle safely duplicate nodes o [CRITICA] Fix infinite loop in discovery_proc_read o [CORRECT] Handle interleaved discovery frames (not complete) o [FEATURE] Add discovery expiry callback o [FEATURE] Remove cruft in af_irda diff -urpN old-linux/include/net/irda/irlmp.h linux/include/net/irda/irlmp.h --- old-linux/include/net/irda/irlmp.h Thu Nov 9 14:47:22 2000 +++ linux/include/net/irda/irlmp.h Thu Nov 9 17:33:48 2000 @@ -85,8 +85,9 @@ typedef struct { __u16 hint_mask; - DISCOVERY_CALLBACK1 callback1; - DISCOVERY_CALLBACK2 callback2; + DISCOVERY_CALLBACK1 callback1; /* Selective discovery */ + DISCOVERY_CALLBACK2 callback2; /* Whole discovery */ + DISCOVERY_CALLBACK1 callback3; /* Selective expiration */ void *priv;/* Used to identify client */ } irlmp_client_t; @@ -193,10 +194,13 @@ __u16 irlmp_service_to_hint(int service) __u32 irlmp_register_service(__u16 hints); int irlmp_unregister_service(__u32 handle); __u32 irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 callback1, - DISCOVERY_CALLBACK2 callback2, void *priv); + DISCOVERY_CALLBACK2 callback2, + DISCOVERY_CALLBACK1 callback3, void *priv); int irlmp_unregister_client(__u32 handle); int irlmp_update_client(__u32 handle, __u16 hint_mask, - DISCOVERY_CALLBACK1, DISCOVERY_CALLBACK2, void *priv); + DISCOVERY_CALLBACK1 callback1, + DISCOVERY_CALLBACK2 callback2, + DISCOVERY_CALLBACK1 callback3, void *priv); void irlmp_register_link(struct irlap_cb *, __u32 saddr, notify_t *); void irlmp_unregister_link(__u32 saddr); @@ -218,6 +222,7 @@ void irlmp_discovery_request(int nslots) struct irda_device_info *irlmp_get_discoveries(int *pn, __u16 mask); void irlmp_do_discovery(int nslots); discovery_t *irlmp_get_discovery_response(void); +void irlmp_discovery_expiry(discovery_t *expiry); int irlmp_data_request(struct lsap_cb *, struct sk_buff *); void irlmp_data_indication(struct lsap_cb *, struct sk_buff *); diff -urpN old-linux/include/net/irda/irqueue.h linux/include/net/irda/irqueue.h --- old-linux/include/net/irda/irqueue.hThu Nov 9 14:47:22 2000 +++ linux/include/net/irda/irqueue.hThu Nov 9 17:33:48 2000 @@ -89,6 +89,7 @@ void hashbin_insert(hashbin_t* hashb void*hashbin_find(hashbin_t* hashbin, __u32 hashv, char* name); void*hashbin_remove(hashbin_t* hashbin, __u32 hashv, char* name); void*hashbin_remove_first(hashbin_t *hashbin); +void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry); irda_queue_t *hashbin_get_first(hashbin_t *hashbin); irda_queue_t *hashbin_get_next(hashbin_t *hashbin); diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 17:32:39 2000 +++ linux/net/irda/af_irda.cThu Nov 9 17:33:48 2000 @@ -366,33 +366,6 @@ static void irda_getvalue_confirm(int re wake_up_interruptible(&self->query_wait); } -#if 0 -/* Obsolete */ -/* - * Function irda_discovery_indication (log) - * - *Got a discovery log from IrLMP, wake up any process waiting for answer - * - */ -static void irda_discovery_indication(hashbin_t *log, void *priv) -{ - struct irda_sock *self; - - IRDA_DEBUG(2, __FUNCTION__ "()\n"); - - self = (struct irda_sock *) priv; - if (!self) { - WARNING(__FUNCTION__ "(), lost myself!\n"); - return; - } - - self->cachelog = log; - - /* Wake up process if its waiting for device to be discovered */ - wake_up_interruptible(&self->query_wait); -} -#endif - /* * Function irda_selective_discovery_indication (discovery) * @@ -1123,7 +1096,7 @@ static int irda_create(struct socket *so sk->protocol = protocol; /* Register as a client with IrLMP */ - self->ckey = irlmp_register_client(0, NULL, NULL, NULL); + self->ckey = irlmp_register_client(0, NULL, NULL, NULL, NULL); self->mask = 0x; self->rx_flow = self->tx_flow = FLOW_START; self->nslot
[patch] patch-2.4.0-test10-irda15 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda15 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda15.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda15.diff : - o [-OUPS ] Missing a bit for -> module init change o [CRITICA] IrLAN update (was broken - various things) diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 17:11:25 2000 +++ linux/net/irda/af_irda.cThu Nov 9 17:26:46 2000 @@ -2395,7 +2395,7 @@ module_init(irda_proto_init); *Remove IrDA protocol layer * */ -void irda_proto_cleanup(void) +void __exit irda_proto_cleanup(void) { irda_packet_type.type = htons(ETH_P_IRDA); dev_remove_pack(&irda_packet_type); @@ -2403,6 +2403,5 @@ void irda_proto_cleanup(void) unregister_netdevice_notifier(&irda_dev_notifier); sock_unregister(PF_IRDA); - } module_exit(irda_proto_cleanup); diff -urpN old-linux/net/irda/irlan/irlan_client.c linux/net/irda/irlan/irlan_client.c --- old-linux/net/irda/irlan/irlan_client.c Thu Nov 9 13:27:10 2000 +++ linux/net/irda/irlan/irlan_client.c Thu Nov 9 17:20:01 2000 @@ -104,8 +104,6 @@ void irlan_client_start_kick_timer(struc */ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) { - struct irmanager_event mgr_event; - IRDA_DEBUG(1, __FUNCTION__ "()\n"); ASSERT(self != NULL, return;); @@ -117,41 +115,24 @@ void irlan_client_wakeup(struct irlan_cb */ if ((self->client.state != IRLAN_IDLE) || (self->provider.access_type == ACCESS_DIRECT)) - return; + { + IRDA_DEBUG(0, __FUNCTION__ "(), already awake!\n"); + return; + } - /* saddr may have changed! */ + /* Address may have changed! */ self->saddr = saddr; - - /* Before we try to connect, we check if network device is up. If it -* is up, that means that the "user" really wants to connect. If not -* we notify the user about the possibility of an IrLAN connection -*/ - if (netif_running(&self->dev)) { - /* Open TSAPs */ - irlan_client_open_ctrl_tsap(self); - irlan_open_data_tsap(self); - - irlan_do_client_event(self, IRLAN_DISCOVERY_INDICATION, NULL); - } else if (self->notify_irmanager) { - /* -* Tell irmanager that the device can now be -* configured but only if the device was not taken -* down by the user -*/ - mgr_event.event = EVENT_IRLAN_START; - strcpy(mgr_event.devname, self->dev.name); - irmanager_notify(&mgr_event); - - /* -* We set this so that we only notify once, since if -* configuration of the network device fails, the user -* will have to sort it out first anyway. No need to -* try again. -*/ - self->notify_irmanager = FALSE; + + if (self->disconnect_reason == LM_USER_REQUEST) { + IRDA_DEBUG(0, __FUNCTION__ "(), still stopped by user\n"); + return; } - /* Restart watchdog timer */ - irlan_start_watchdog_timer(self, IRLAN_TIMEOUT); + + /* Open TSAPs */ + irlan_client_open_ctrl_tsap(self); + irlan_open_data_tsap(self); + + irlan_do_client_event(self, IRLAN_DISCOVERY_INDICATION, NULL); /* Start kick timer */ irlan_client_start_kick_timer(self, 2*HZ); @@ -176,29 +157,16 @@ void irlan_client_discovery_indication(d saddr = discovery->saddr; daddr = discovery->daddr; - /* -* Check if we already dealing with this provider. -*/ - self = (struct irlan_cb *) hashbin_find(irlan, daddr, NULL); - if (self) { + /* Find instance */ + self = (struct irlan_cb *) hashbin_get_first(irlan); +if (self) { ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_DEBUG(1, __FUNCTION__ "(), Found instance (%08x)!\n", daddr); irlan_client_wakeup(self, saddr, daddr); - - return; } - - /* -* We have no instance for daddr, so start a new one -*/ - IRDA_DEBUG(1, __FUNCTION__ "(), starting new instance!
[patch] patch-2.4.0-test10-irda14 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda14 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda14.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda14.diff : - o [CRITICA] Allow immediate driver speed change from within IrDA stack diff -urpN linux-2.4.0-test10-linus/net/irda/irlap.c linux-2.4.0-test10-irda/net/irda/irlap.c --- linux-2.4.0-test10-linus/net/irda/irlap.c Sat Nov 11 19:49:03 2000 +++ linux-2.4.0-test10-irda/net/irda/irlap.cFri Nov 10 00:07:48 2000 @@ -876,6 +876,8 @@ void irlap_flush_all_queues(struct irlap */ void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now) { + struct sk_buff *skb; + IRDA_DEBUG(0, __FUNCTION__ "(), setting speed to %d\n", speed); ASSERT(self != NULL, return;); @@ -884,8 +886,11 @@ void irlap_change_speed(struct irlap_cb self->speed = speed; /* Change speed now, or just piggyback speed on frames */ - if (now) - irda_device_change_speed(self->netdev, speed); + if (now) { + /* Send down empty frame to trigger speed change */ + skb = dev_alloc_skb(0); + irlap_queue_xmit(self, skb); + } } #ifdef CONFIG_IRDA_COMPRESSION diff -urpN linux-2.4.0-test10-linus/drivers/net/irda/irport.c linux-2.4.0-test10-irda/drivers/net/irda/irport.c --- linux-2.4.0-test10-linus/drivers/net/irda/irport.c Sat Nov 11 19:47:43 2000 +++ linux-2.4.0-test10-irda/drivers/net/irda/irport.c Sat Nov 11 20:06:31 2000 @@ -629,8 +629,16 @@ int irport_hard_xmit(struct sk_buff *skb netif_stop_queue(dev); /* Check if we need to change the speed */ - if ((speed = irda_get_speed(skb)) != self->io.speed) - self->new_speed = speed; + if ((speed = irda_get_speed(skb)) != self->io.speed) { + /* Check for empty frame */ + if (!skb->len) { + irda_task_execute(self, __irport_change_speed, + irport_change_speed_complete, + NULL, (void *) speed); + return 0; + } else + self->new_speed = speed; + } spin_lock_irqsave(&self->lock, flags); diff -urpN linux-2.4.0-test10-linus/drivers/net/irda/irtty.c linux-2.4.0-test10-irda/drivers/net/irda/irtty.c --- linux-2.4.0-test10-linus/drivers/net/irda/irtty.c Sat Nov 11 19:47:43 2000 +++ linux-2.4.0-test10-irda/drivers/net/irda/irtty.cSat Nov 11 20:06:25 2000 @@ -638,8 +638,16 @@ static int irtty_hard_xmit(struct sk_buf netif_stop_queue(dev); /* Check if we need to change the speed */ - if ((speed = irda_get_speed(skb)) != self->io.speed) - self->new_speed = speed; + if ((speed = irda_get_speed(skb)) != self->io.speed) { + /* Check for empty frame */ + if (!skb->len) { + irda_task_execute(self, irtty_change_speed, + irtty_change_speed_complete, + NULL, (void *) speed); + return 0; + } else + self->new_speed = speed; + } /* Init tx buffer*/ self->tx_buff.data = self->tx_buff.head; diff -urpN linux-2.4.0-test10-linus/drivers/net/irda/nsc-ircc.c linux-2.4.0-test10-irda/drivers/net/irda/nsc-ircc.c --- linux-2.4.0-test10-linus/drivers/net/irda/nsc-ircc.cSat Nov 11 19:47:43 2000 +++ linux-2.4.0-test10-irda/drivers/net/irda/nsc-ircc.c Sat Nov 11 20:02:20 2000 @@ -1076,9 +1075,15 @@ static int nsc_ircc_hard_xmit_sir(struct netif_stop_queue(dev); /* Check if we need to change the speed */ - if ((speed = irda_get_speed(skb)) != self->io.speed) - self->new_speed = speed; - + if ((speed = irda_get_speed(skb)) != self->io.speed) { + /* Check for empty frame */ + if (!skb->len) { + nsc_ircc_change_speed(self, speed); + return 0; + } else + self->new_speed = speed; + } + spin_lock_irqsave(&self->lock, flags); /* Save current bank */ @@ -1120,8 +1125,14 @@ static int nsc_ircc_hard_xmit_fir(struct netif_stop_queue(dev); /* Check if we need to change the speed */ - if ((speed = irda_get_speed(skb)) != self->io.speed) - se
[patch] patch-2.4.0-test10-irda13 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda13 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda13.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda13.diff : - o [CORRECT] More CONFIG_PROC_FS where needed o [CORRECT] Wait if receiving while discovery slot expired o [FEATURE] Cleanups diff -urpN old-linux/include/net/irda/irlan_common.h linux/include/net/irda/irlan_common.h --- old-linux/include/net/irda/irlan_common.h Thu Nov 9 14:47:22 2000 +++ linux/include/net/irda/irlan_common.h Thu Nov 9 17:09:43 2000 @@ -167,22 +167,20 @@ struct irlan_cb { struct net_device dev;/* Ethernet device structure*/ struct net_device_stats stats; - __u32 saddr; /* Source device address */ - __u32 daddr; /* Destination device address */ - int netdev_registered; - int notify_irmanager; + __u32 saddr; /* Source device address */ + __u32 daddr; /* Destination device address */ + int disconnect_reason; /* Why we got disconnected */ - int media;/* Media type */ - __u8 version[2]; /* IrLAN version */ + int media; /* Media type */ + __u8 version[2]; /* IrLAN version */ - struct tsap_cb *tsap_data; + struct tsap_cb *tsap_data; /* Data TSAP */ - int master; /* Master instance? */ - int use_udata; /* Use Unit Data transfers */ + int use_udata;/* Use Unit Data transfers */ - __u8 stsap_sel_data; /* Source data TSAP selector */ - __u8 dtsap_sel_data; /* Destination data TSAP selector */ - __u8 dtsap_sel_ctrl; /* Destination ctrl TSAP selector */ + __u8 stsap_sel_data; /* Source data TSAP selector */ + __u8 dtsap_sel_data; /* Destination data TSAP selector */ + __u8 dtsap_sel_ctrl; /* Destination ctrl TSAP selector */ struct irlan_client_cb client; /* Client specific fields */ struct irlan_provider_cb provider; /* Provider specific fields */ @@ -190,10 +188,11 @@ struct irlan_cb { __u32 max_sdu_size; __u8 max_header_size; + wait_queue_head_t open_wait; struct timer_list watchdog_timer; }; -struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr, int netdev); +struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr); void irlan_close(struct irlan_cb *self); void irlan_close_tsaps(struct irlan_cb *self); void irlan_mod_inc_use_count(void); diff -urpN old-linux/drivers/net/irda/w83977af_ir.c linux/drivers/net/irda/w83977af_ir.c --- old-linux/drivers/net/irda/w83977af_ir.cThu Nov 9 17:09:30 2000 +++ linux/drivers/net/irda/w83977af_ir.cThu Nov 9 17:09:43 2000 @@ -255,13 +255,12 @@ int w83977af_open(int i, unsigned int io dev->get_stats = w83977af_net_get_stats; rtnl_lock(); - err = register_netdev(dev); + err = register_netdevice(dev); rtnl_unlock(); if (err) { - ERROR(__FUNCTION__ "(), register_netdev() failed!\n"); + ERROR(__FUNCTION__ "(), register_netdevice() failed!\n"); return -1; } - MESSAGE("IrDA: Registered device %s\n", dev->name); return 0; diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 16:08:25 2000 +++ linux/net/irda/af_irda.cThu Nov 9 17:09:43 2000 @@ -2376,7 +2376,7 @@ static struct notifier_block irda_dev_no */ static int __init irda_proto_init(void) { - MESSAGE("IrDA (tm) Protocols for Linux-2.3 (Dag Brattli)\n"); + MESSAGE("IrDA (tm) Protocols for Linux-2.4 (Dag Brattli)\n"); sock_register(&irda_family_ops); @@ -2403,5 +2403,6 @@ void irda_proto_cleanup(void) unregister_netdevice_notifier(&irda_dev_notifier); sock_unregister(PF_IRDA); + } module_exit(irda_proto_cleanup); diff -urpN old-linux/net/irda/ircomm/ircomm_tty.c linux/net/irda/ircomm/ircomm_tty.c --- old-linux/net/irda/ircomm/ircomm_tty.c Thu Nov 9 17:09:30 2000 +++ linux/net/irda/ircomm/ircomm_tty.c Thu Nov 9 17:09:43 2000 @@ -69,9 +69,10 @@ static int ircomm_tty_control_indication struct sk_buff *skb); static void ircomm_tty_flow_indication(void *instance, void *sap, LOCAL_FLOW cmd); +#ifdef C
[patch] patch-2.4.0-test10-irda12 (Re: was: The IrDA patches)[patch] patch-2.4.0-test10-irda12 (Re: was: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda12.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda12.diff : - o [CORRECT] Remove memset of net_device (preserve device name) o [CORRECT] Correct structure member init for compressors o [CORRECT] Non module init of toshoboe and litelink drivers o [CORRECT] Add CONFIG_PROC_FS where needed o [FEATURE] Add MODULE_PARM_DESC there and there diff -urpN old-linux/drivers/net/irda/irport.c linux/drivers/net/irda/irport.c --- old-linux/drivers/net/irda/irport.c Tue Mar 21 11:17:28 2000 +++ linux/drivers/net/irda/irport.c Thu Nov 9 16:09:38 2000 @@ -999,7 +999,9 @@ static struct net_device_stats *irport_n #ifdef MODULE MODULE_PARM(io, "1-4i"); +MODULE_PARM_DESC(io, "Base I/O adresses"); MODULE_PARM(irq, "1-4i"); +MODULE_PARM_DESC(irq, "IRQ lines"); MODULE_AUTHOR("Dag Brattli <[EMAIL PROTECTED]>"); MODULE_DESCRIPTION("Half duplex serial driver for IrDA SIR mode"); diff -urpN old-linux/drivers/net/irda/irtty.c linux/drivers/net/irda/irtty.c --- old-linux/drivers/net/irda/irtty.c Thu Nov 9 14:47:22 2000 +++ linux/drivers/net/irda/irtty.c Thu Nov 9 16:09:38 2000 @@ -234,14 +234,6 @@ static int irtty_open(struct tty_struct return -ENOMEM; } -#if LINUX_VERSION_CODE >= 0x020362 /* 2.3.99-pre7 */ - /* dev_alloc doesn't clear the struct (Yuck !!!) */ - memset(((__u8*)dev)+IFNAMSIZ,0,sizeof(struct net_device)-IFNAMSIZ); -#else - /* dev_alloc doesn't clear the struct */ - memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*)); -#endif /* LINUX_VERSION_CODE >= 0x020362 */ - dev->priv = (void *) self; self->netdev = dev; @@ -1035,6 +1027,7 @@ MODULE_AUTHOR("Dag Brattli <[EMAIL PROTECTED] MODULE_DESCRIPTION("IrDA TTY device driver"); MODULE_PARM(qos_mtt_bits, "i"); +MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time"); /* * Function init_module (void) diff -urpN old-linux/drivers/net/irda/nsc-ircc.c linux/drivers/net/irda/nsc-ircc.c --- old-linux/drivers/net/irda/nsc-ircc.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/net/irda/nsc-ircc.c Thu Nov 9 16:09:38 2000 @@ -2029,10 +2029,15 @@ MODULE_AUTHOR("Dag Brattli <[EMAIL PROTECTED] MODULE_DESCRIPTION("NSC IrDA Device Driver"); MODULE_PARM(qos_mtt_bits, "i"); +MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time"); MODULE_PARM(io, "1-4i"); +MODULE_PARM_DESC(io, "Base I/O addresses"); MODULE_PARM(irq, "1-4i"); +MODULE_PARM_DESC(irq, "IRQ lines"); MODULE_PARM(dma, "1-4i"); +MODULE_PARM_DESC(dma, "DMA channels"); MODULE_PARM(dongle_id, "i"); +MODULE_PARM_DESC(dongle_id, "Type-id of used dongle"); int init_module(void) { diff -urpN old-linux/drivers/net/irda/smc-ircc.c linux/drivers/net/irda/smc-ircc.c --- old-linux/drivers/net/irda/smc-ircc.c Thu Nov 9 16:08:25 2000 +++ linux/drivers/net/irda/smc-ircc.c Thu Nov 9 16:09:38 2000 @@ -1039,7 +1039,9 @@ static int ircc_pmproc(struct pm_dev *de MODULE_AUTHOR("Thomas Davis <[EMAIL PROTECTED]>"); MODULE_DESCRIPTION("SMC IrCC controller driver"); MODULE_PARM(ircc_dma, "1i"); +MODULE_PARM_DESC(ircc_dma, "DMA channel"); MODULE_PARM(ircc_irq, "1i"); +MODULE_PARM_DESC(ircc_irq, "IRQ line"); int init_module(void) { diff -urpN old-linux/drivers/net/irda/toshoboe.c linux/drivers/net/irda/toshoboe.c --- old-linux/drivers/net/irda/toshoboe.c Sun Sep 17 09:45:07 2000 +++ linux/drivers/net/irda/toshoboe.c Thu Nov 9 16:09:38 2000 @@ -628,7 +628,10 @@ static int toshoboe_net_ioctl(struct net #ifdef MODULE +MODULE_DESCRIPTION("Toshiba OBOE IrDA Device Driver"); +MODULE_AUTHOR("James McKenzie <[EMAIL PROTECTED]>"); MODULE_PARM (max_baud, "i"); +MODULE_PARM_DESC(max_baus, "Maximum baud rate"); static int toshoboe_close (struct toshoboe_cb *self) diff -urpN old-linux/drivers/net/irda/w83977af_ir.c linux/drivers/net/irda/w83977af_ir.c --- old-linux/drivers/net/irda/w83977af_ir.cTue Mar 21 11:17:28 2000 +++ linux/drivers/net/irda/w83977af_ir.cThu Nov 9 16:09:38 2000 @@ -1366,9 +1366,11 @@ MODULE_AUTHOR("Dag Brattli <[EMAIL PROTECTED] MODULE_DESCRIPTION("Winbond W83977AF IrDA Device Driver"); MODULE_PARM(qos_mtt_bits, "i"); +MODULE_PARM_DESC(qos_mtt_bits, "Mimimum Turn Time"); MODULE_PARM(io, "1-4i"); -MODULE_PARM(io2, "1-4i"); +MODULE_PARM_DESC(io, "Base I/O addresses"); MODULE_PARM(irq, "1-4i"); +MODULE_PARM_DESC(irq, "IRQ lines"); /* * Function init_module (void) diff -urpN ol
[patch] patch-2.4.0-test10-irda11 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda11 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda11.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda11.diff : - o [CRITICA] Correct use of random number generator o [CRITICA] Fixed parameter parsing bug o [CRITICA] Fix packet lenght test in SMC driver o [CORRECT] Fix module initialisation code [not sure about this one] o [FEATURE] Setting device name update IAS diff -urpN old-linux/drivers/net/irda/smc-ircc.c linux/drivers/net/irda/smc-ircc.c --- old-linux/drivers/net/irda/smc-ircc.c Wed Jul 5 10:56:13 2000 +++ linux/drivers/net/irda/smc-ircc.c Thu Nov 9 14:52:26 2000 @@ -814,7 +814,7 @@ static void ircc_dma_receive_complete(st else len -= 4; - if ((len < 2) && (len > 2050)) { + if ((len < 2) || (len > 2050)) { WARNING(__FUNCTION__ "(), bogus len=%d\n", len); return; } diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 13:48:34 2000 +++ linux/net/irda/af_irda.cThu Nov 9 16:03:21 2000 @@ -2376,14 +2376,15 @@ static struct notifier_block irda_dev_no */ static int __init irda_proto_init(void) { + MESSAGE("IrDA (tm) Protocols for Linux-2.3 (Dag Brattli)\n"); + sock_register(&irda_family_ops); irda_packet_type.type = htons(ETH_P_IRDA); -dev_add_pack(&irda_packet_type); + dev_add_pack(&irda_packet_type); register_netdevice_notifier(&irda_dev_notifier); -irda_init(); return 0; } module_init(irda_proto_init); @@ -2394,18 +2395,13 @@ module_init(irda_proto_init); *Remove IrDA protocol layer * */ -#ifdef MODULE void irda_proto_cleanup(void) { irda_packet_type.type = htons(ETH_P_IRDA); -dev_remove_pack(&irda_packet_type); + dev_remove_pack(&irda_packet_type); -unregister_netdevice_notifier(&irda_dev_notifier); + unregister_netdevice_notifier(&irda_dev_notifier); sock_unregister(PF_IRDA); - irda_cleanup(); - -return; } module_exit(irda_proto_cleanup); -#endif /* MODULE */ diff -urpN old-linux/net/irda/irlap.c linux/net/irda/irlap.c --- old-linux/net/irda/irlap.c Thu Nov 9 14:51:15 2000 +++ linux/net/irda/irlap.c Thu Nov 9 14:52:26 2000 @@ -671,11 +671,16 @@ void irlap_reset_confirm(void) */ int irlap_generate_rand_time_slot(int S, int s) { + static int rand; int slot; ASSERT((S - s) > 0, return 0;); - slot = s + jiffies % (S-s); + rand += jiffies; + rand ^= (rand << 12); + rand ^= (rand >> 20); + + slot = s + rand % (S-s); ASSERT((slot >= s) || (slot < S), return 0;); diff -urpN old-linux/net/irda/irmod.c linux/net/irda/irmod.c --- old-linux/net/irda/irmod.c Thu Nov 9 14:47:22 2000 +++ linux/net/irda/irmod.c Thu Nov 9 16:05:08 2000 @@ -208,10 +208,11 @@ EXPORT_SYMBOL(irtty_unregister_dongle); EXPORT_SYMBOL(irtty_set_packet_mode); #endif -int __init irda_init(void) +static int __init irda_init(void) { - MESSAGE("IrDA (tm) Protocols for Linux-2.3 (Dag Brattli)\n"); - +#ifdef MODULE + irda_proto_init(NULL); /* Called by net/socket.c when non-modular */ +#endif irlmp_init(); irlap_init(); @@ -258,9 +259,10 @@ int __init irda_init(void) return 0; } -#ifdef MODULE -void irda_cleanup(void) +static void __exit irda_cleanup(void) { + irda_proto_cleanup(); + misc_deregister(&irda.dev); #ifdef CONFIG_SYSCTL @@ -281,7 +283,6 @@ void irda_cleanup(void) /* Remove middle layer */ irlmp_cleanup(); } -#endif /* MODULE */ /* * Function irda_unlock (lock) @@ -542,11 +543,10 @@ void irda_proc_modcount(struct inode *in #endif /* MODULE */ } -#ifdef MODULE MODULE_AUTHOR("Dag Brattli <[EMAIL PROTECTED]>"); MODULE_DESCRIPTION("The Linux IrDA Protocol Subsystem"); MODULE_PARM(irda_debug, "1l"); -module_exit(irda_proto_cleanup); -#endif /* MODULE */ +module_init(irda_init); +module_exit(irda_cleanup); diff -urpN old-linux/net/irda/irsysctl.c linux/net/irda/irsysctl.c --- old-linux/net/irda/irsysctl.c Mon Aug 30 10:26:28 1999 +++ linux/net/irda/irsysctl.c Thu Nov 9 14:52:26 2000 @@ -29,6 +29,7 @@ #include #include +#include #define NET_IRDA 412 /* Random number */ enum { DISCOVERY=1, DEVNAME, COMPRESSION, DEBUG, SLOTS, DISCOVERY_TIM
[patch] patch-2.4.0-test10-irda10 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda10 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda10.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda10.diff : - o [CRITICA] Update skb handling (Add skb_get() and kfree_skb()) diff -urpN old-linux/net/irda/irlap.c linux/net/irda/irlap.c --- old-linux/net/irda/irlap.c Thu Nov 9 14:47:22 2000 +++ linux/net/irda/irlap.c Thu Nov 9 14:47:40 2000 @@ -232,7 +232,8 @@ void irlap_connect_indication(struct irl ASSERT(self->magic == LAP_MAGIC, return;); irlap_init_qos_capabilities(self, NULL); /* No user QoS! */ - + + skb_get(skb); /*LEVEL4*/ irlmp_link_connect_indication(self->notify.instance, self->saddr, self->daddr, &self->qos_tx, skb); } @@ -248,6 +249,7 @@ void irlap_connect_response(struct irlap IRDA_DEBUG(4, __FUNCTION__ "()\n"); irlap_do_event(self, CONNECT_RESPONSE, skb, NULL); + kfree_skb(skb); } /* @@ -292,6 +294,7 @@ void irlap_connect_confirm(struct irlap_ ASSERT(self != NULL, return;); ASSERT(self->magic == LAP_MAGIC, return;); + skb_get(skb); /*LEVEL4*/ irlmp_link_connect_confirm(self->notify.instance, &self->qos_tx, skb); } @@ -310,6 +313,7 @@ void irlap_data_indication(struct irlap_ #ifdef CONFIG_IRDA_COMPRESSION if (self->qos_tx.compression.value) { + skb_get(skb); /*LEVEL4*/ skb = irlap_decompress_frame(self, skb); if (!skb) { IRDA_DEBUG(1, __FUNCTION__ "(), Decompress error!\n"); @@ -317,6 +321,7 @@ void irlap_data_indication(struct irlap_ } } #endif + skb_get(skb); /*LEVEL4*/ irlmp_link_data_indication(self->notify.instance, skb, unreliable); } @@ -373,6 +378,7 @@ void irlap_data_request(struct irlap_cb ASSERT(skb != NULL, return;); } irlap_do_event(self, SEND_I_CMD, skb, NULL); + kfree_skb(skb); } else skb_queue_tail(&self->txq, skb); } @@ -422,6 +428,7 @@ void irlap_unitdata_indication(struct ir /* Hide LAP header from IrLMP layer */ skb_pull(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); + skb_get(skb); /*LEVEL4*/ irlmp_link_unitdata_indication(self->notify.instance, skb); } #endif /* CONFIG_IRDA_ULTRA */ diff -urpN old-linux/net/irda/irlap_event.c linux/net/irda/irlap_event.c --- old-linux/net/irda/irlap_event.cThu Nov 9 14:47:22 2000 +++ linux/net/irda/irlap_event.cThu Nov 9 14:47:40 2000 @@ -230,7 +230,7 @@ void irlap_do_event(struct irlap_cb *sel if (!self || self->magic != LAP_MAGIC) return; - + IRDA_DEBUG(3, __FUNCTION__ "(), event = %s, state = %s\n", irlap_event[event], irlap_state[self->state]); @@ -252,6 +252,7 @@ void irlap_do_event(struct irlap_cb *sel while ((skb = skb_dequeue(&self->txq)) != NULL) { ret = (*state[self->state])(self, SEND_I_CMD, skb, NULL); + kfree_skb(skb); if (ret == -EPROTO) break; /* Try again later! */ } @@ -351,12 +352,11 @@ static int irlap_state_ndm(struct irlap_ self->caddr = info->caddr; irlap_next_state(self, LAP_CONN); - + irlap_connect_indication(self, skb); } else { IRDA_DEBUG(0, __FUNCTION__ "(), SNRM frame does not " "contain an I field!\n"); - dev_kfree_skb(skb); } break; case DISCOVERY_REQUEST: @@ -410,14 +410,13 @@ static int irlap_state_ndm(struct irlap_ irlap_start_query_timer(self, QUERY_TIMEOUT*info->S); irlap_next_state(self, LAP_REPLY); } - dev_kfree_skb(skb); break; #ifdef CONFIG_IRDA_ULTRA case SEND_UI_FRAME: /* Only allowed to repeat an operation twice */ for (i=0; ((i<2) && (self->media_busy == FALSE)); i++) { skb = skb_dequeue(&self->txq_ultra); - if (skb)
[patch] patch-2.4.0-test10-irda9 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda9 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda9.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda9.diff : o [CORRECT] Change queue_t to irda_queue_t (namespace pollution) diff -urpN old-linux/include/net/irda/discovery.h linux/include/net/irda/discovery.h --- old-linux/include/net/irda/discovery.h Thu Nov 9 13:45:18 2000 +++ linux/include/net/irda/discovery.h Thu Nov 9 14:44:44 2000 @@ -45,7 +45,7 @@ * The DISCOVERY structure is used for both discovery requests and responses */ typedef struct discovery_t { - queue_t q; /* Must be first! */ + irda_queue_t q; /* Must be first! */ __u32 saddr;/* Which link the device was discovered */ __u32 daddr;/* Remote device address */ diff -urpN old-linux/include/net/irda/ircomm_core.h linux/include/net/irda/ircomm_core.h --- old-linux/include/net/irda/ircomm_core.hTue Dec 21 10:17:31 1999 +++ linux/include/net/irda/ircomm_core.hThu Nov 9 14:44:44 2000 @@ -53,7 +53,7 @@ typedef struct { } call_t; struct ircomm_cb { - queue_t queue; + irda_queue_t queue; magic_t magic; notify_t notify; diff -urpN old-linux/include/net/irda/ircomm_tty.h linux/include/net/irda/ircomm_tty.h --- old-linux/include/net/irda/ircomm_tty.h Fri Jan 28 19:36:22 2000 +++ linux/include/net/irda/ircomm_tty.h Thu Nov 9 14:44:44 2000 @@ -48,7 +48,7 @@ * IrCOMM TTY driver state */ struct ircomm_tty_cb { - queue_t queue;/* Must be first */ + irda_queue_t queue;/* Must be first */ magic_t magic; int state;/* Connect state */ diff -urpN old-linux/include/net/irda/irda_device.h linux/include/net/irda/irda_device.h --- old-linux/include/net/irda/irda_device.hTue Oct 31 11:18:04 2000 +++ linux/include/net/irda/irda_device.hThu Nov 9 14:44:44 2000 @@ -79,7 +79,7 @@ struct irda_task; typedef int (*IRDA_TASK_CALLBACK) (struct irda_task *task); struct irda_task { - queue_t q; + irda_queue_t q; magic_t magic; IRDA_TASK_STATE state; @@ -111,7 +111,7 @@ typedef struct { /* Dongle registration info */ struct dongle_reg { - queue_t q; /* Must be first */ + irda_queue_t q; /* Must be first */ IRDA_DONGLE type; void (*open)(dongle_t *dongle, struct qos_info *qos); diff -urpN old-linux/include/net/irda/iriap.h linux/include/net/irda/iriap.h --- old-linux/include/net/irda/iriap.h Thu Jan 6 14:46:18 2000 +++ linux/include/net/irda/iriap.h Thu Nov 9 14:44:44 2000 @@ -58,7 +58,7 @@ typedef void (*CONFIRM_CALLBACK)(int res struct ias_value *value, void *priv); struct iriap_cb { - queue_t q; /* Must be first */ + irda_queue_t q; /* Must be first */ magic_t magic; /* Magic cookie */ int mode; /* Client or server */ diff -urpN old-linux/include/net/irda/irias_object.h linux/include/net/irda/irias_object.h --- old-linux/include/net/irda/irias_object.h Thu Nov 9 11:49:35 2000 +++ linux/include/net/irda/irias_object.h Thu Nov 9 14:44:44 2000 @@ -42,7 +42,7 @@ * LM-IAS Object */ struct ias_object { - queue_t q; /* Must be first! */ + irda_queue_t q; /* Must be first! */ magic_t magic; char *name; @@ -71,7 +71,7 @@ struct ias_value { * Attributes used by LM-IAS objects */ struct ias_attrib { - queue_t q; /* Must be first! */ + irda_queue_t q; /* Must be first! */ int magic; char *name; /* Attribute name */ diff -urpN old-linux/include/net/irda/irlan_common.h linux/include/net/irda/irlan_common.h --- old-linux/include/net/irda/irlan_common.h Tue Jul 11 11:12:24 2000 +++ linux/include/net/irda/irlan_common.h Thu Nov 9 14:44:44 2000 @@ -161,7 +161,7 @@ struct irlan_provider_cb { * IrLAN control block */ struct irlan_cb { - queue_t q; /* Must be first */ + irda_queue_t q; /* Must be first */ intmagic; struct net_device dev;/* Ethernet device structure*/ diff -urpN old-linux/include/net/irda/irlap.h linux/include/net/irda/irlap.h --- old-linux/include/net/irda/irlap.h Tue Oct 31 11:18:04 2000 +++ linux/include/net/irda/irlap.h Thu Nov 9 14:44:44 2000 @@ -81,7 +81,7 @@ #define irda_incomp (*self->decompressor.cp->incomp) struct irda_compre
[patch] patch-2.4.0-test10-irda8 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda8 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda8.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda8.diff : o [CRITICA] Preserve irda device name (better fix later on) o [CORRECT] Use timer_pending when possible diff -urpN linux/drivers/net/irda/irtty.c old-linux/drivers/net/irda/irtty.c --- linux/drivers/net/irda/irtty.c Thu Nov 9 14:29:59 2000 +++ old-linux/drivers/net/irda/irtty.c Thu Nov 9 13:48:34 2000 @@ -233,8 +233,14 @@ static int irtty_open(struct tty_struct ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); return -ENOMEM; } + +#if LINUX_VERSION_CODE >= 0x020362 /* 2.3.99-pre7 */ + /* dev_alloc doesn't clear the struct (Yuck !!!) */ + memset(((__u8*)dev)+IFNAMSIZ,0,sizeof(struct net_device)-IFNAMSIZ); +#else /* dev_alloc doesn't clear the struct */ memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*)); +#endif /* LINUX_VERSION_CODE >= 0x020362 */ dev->priv = (void *) self; self->netdev = dev; diff -urpN linux/net/irda/af_irda.c old-linux/net/irda/af_irda.c --- linux/net/irda/af_irda.cThu Nov 9 14:37:46 2000 +++ old-linux/net/irda/af_irda.cThu Nov 9 13:48:34 2000 @@ -2195,7 +2195,7 @@ static int irda_getsockopt(struct socket interruptible_sleep_on(&self->query_wait); /* If watchdog is still activated, kill it! */ - if(self->watchdog.prev != (struct timer_list *) NULL) + if(timer_pending(&(self->watchdog))) del_timer(&(self->watchdog)); IRDA_DEBUG(1, __FUNCTION__ diff -urpN linux/net/irda/irlmp_frame.c old-linux/net/irda/irlmp_frame.c --- linux/net/irda/irlmp_frame.cThu Nov 9 14:37:38 2000 +++ old-linux/net/irda/irlmp_frame.cThu Nov 9 13:48:34 2000 @@ -395,7 +395,7 @@ void irlmp_link_discovery_indication(str irlmp_add_discovery(irlmp->cachelog, discovery); /* If delay was activated, kill it! */ - if(disco_delay.prev != (struct timer_list *) NULL) + if(timer_pending(&disco_delay)) del_timer(&disco_delay); /* Set delay timer to expire in 0.5s. */ disco_delay.expires = jiffies + (DISCO_SMALL_DELAY * HZ/1000); @@ -422,7 +422,7 @@ void irlmp_link_discovery_confirm(struct irlmp_add_discovery_log(irlmp->cachelog, log); /* If delay was activated, kill it! */ - if(disco_delay.prev != (struct timer_list *) NULL) + if(timer_pending(&disco_delay)) del_timer(&disco_delay); /* Propagate event to the state machine */ diff -urpN linux/net/irda/timer.c old-linux/net/irda/timer.c --- linux/net/irda/timer.c Thu Nov 9 14:37:38 2000 +++ old-linux/net/irda/timer.c Thu Nov 9 13:48:34 2000 @@ -120,7 +120,7 @@ void irlmp_start_idle_timer(struct lap_c void irlmp_stop_idle_timer(struct lap_cb *self) { /* If timer is activated, kill it! */ - if(self->idle_timer.prev != (struct timer_list *) NULL) + if(timer_pending(&self->idle_timer)) del_timer(&self->idle_timer); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda7 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda7 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda7.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda7.diff : o [CRITICA] Do proper spinlock on the discovery log o [CRITICA] Safe concurent reading of discovery log o [FEATURE] Remove cruft in af_irda diff -urpN old-linux/include/net/irda/discovery.h linux/include/net/irda/discovery.h --- old-linux/include/net/irda/discovery.h Thu Nov 9 13:29:19 2000 +++ linux/include/net/irda/discovery.h Thu Nov 9 13:40:12 2000 @@ -65,5 +65,6 @@ typedef struct discovery_t { void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *discovery); void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log); void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force); +struct irda_device_info *irlmp_copy_discoveries(hashbin_t *log, int *pn, __u16 mask); #endif diff -urpN old-linux/include/net/irda/irlmp.h linux/include/net/irda/irlmp.h --- old-linux/include/net/irda/irlmp.h Thu Nov 9 13:27:10 2000 +++ linux/include/net/irda/irlmp.h Thu Nov 9 13:40:12 2000 @@ -175,10 +175,10 @@ struct irlmp_cb { hashbin_t *clients; hashbin_t *services; - hashbin_t *cachelog; - int running; + hashbin_t *cachelog;/* Current discovery log */ + spinlock_t log_lock;/* discovery log spinlock */ - spinlock_t lock; + int running; __u16_host_order hints; /* Hint bits */ }; @@ -215,6 +215,7 @@ int irlmp_disconnect_request(struct lsa void irlmp_discovery_confirm(hashbin_t *discovery_log); void irlmp_discovery_request(int nslots); +struct irda_device_info *irlmp_get_discoveries(int *pn, __u16 mask); void irlmp_do_discovery(int nslots); discovery_t *irlmp_get_discovery_response(void); diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 13:39:06 2000 +++ linux/net/irda/af_irda.cThu Nov 9 13:40:13 2000 @@ -320,65 +320,6 @@ static void irda_flow_indication(void *i } } -#if 0 -/* Now obsolete... */ -/* - * Function irda_getvalue_confirm (obj_id, value, priv) - * - *Got answer from remote LM-IAS - * - */ -static void irda_getvalue_confirm(int result, __u16 obj_id, - struct ias_value *value, void *priv) -{ - struct irda_sock *self; - - IRDA_DEBUG(2, __FUNCTION__ "()\n"); - - ASSERT(priv != NULL, return;); - self = (struct irda_sock *) priv; - - if (!self) { - WARNING(__FUNCTION__ "(), lost myself!\n"); - return; - } - - /* We probably don't need to make any more queries */ - iriap_close(self->iriap); - self->iriap = NULL; - - self->errno = result; - - /* Check if request succeeded */ - if (result != IAS_SUCCESS) { - IRDA_DEBUG(0, __FUNCTION__ "(), IAS query failed!\n"); - - /* Wake up any processes waiting for result */ - wake_up_interruptible(&self->ias_wait); - - return; - } - - switch (value->type) { - case IAS_INTEGER: - IRDA_DEBUG(4, __FUNCTION__ "() int=%d\n", value->t.integer); - - if (value->t.integer != -1) { - self->dtsap_sel = value->t.integer; - } else - self->dtsap_sel = 0; - break; - default: - IRDA_DEBUG(0, __FUNCTION__ "(), bad type!\n"); - break; - } - irias_delete_value(value); - - /* Wake up any processes waiting for result */ - wake_up_interruptible(&self->ias_wait); -} -#endif - /* * Function irda_getvalue_confirm (obj_id, value, priv) * @@ -425,6 +366,8 @@ static void irda_getvalue_confirm(int re wake_up_interruptible(&self->query_wait); } +#if 0 +/* Obsolete */ /* * Function irda_discovery_indication (log) * @@ -448,6 +391,7 @@ static void irda_discovery_indication(ha /* Wake up process if its waiting for device to be discovered */ wake_up_interruptible(&self->query_wait); } +#endif /* * Function irda_selective_discovery_indication (discovery) @@ -655,7 +599,7 @@ static int irda_find_lsap_sel(struct ird return -EADDRNOTAVAIL; } - /* +/* * Function irda_discover_daddr_and_lsap_sel (self, name) * *This try to find a device with the requested service. @@ -674,8 +618,10 @@ static int irda_find_lsap_sel(struct ird */ stati
[patch] patch-2.4.0-test10-irda6 (was: Re: The IrDA patches)[patch] patch-2.4.0-test10-irda6 (was: Re: The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda6.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda6.diff : o [CORRECT] Handle properly the MSG_EOR flag on SEQPACKET sockets idiff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 13:36:27 2000 +++ linux/net/irda/af_irda.cThu Nov 9 13:37:09 2000 @@ -1291,7 +1291,8 @@ static int irda_sendmsg(struct socket *s IRDA_DEBUG(4, __FUNCTION__ "(), len=%d\n", len); - if (msg->msg_flags & ~MSG_DONTWAIT) + /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ + if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR)) return -EINVAL; if (sk->shutdown & SEND_SHUTDOWN) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda5 (was: Re The IrDA patches)[patch] patch-2.4.0-test10-irda5 (was: Re The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda5.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda5.diff : o [CRITICA] Stop idle timer when reconnecting o [CORRECT] Pass dest address properly for IAS queries diff -urpN old-linux/include/linux/irda.h linux/include/linux/irda.h --- old-linux/include/linux/irda.h Thu Nov 9 12:00:52 2000 +++ linux/include/linux/irda.h Thu Nov 9 13:29:43 2000 @@ -88,7 +88,7 @@ enum { #define IRLMP_IAS_GET8 /* Get an attribute from local IAS */ #define IRLMP_IAS_DEL 9 /* Remove attribute from local IAS */ #define IRLMP_HINT_MASK_SET10 /* Set discovery filter */ -#define IRLMP_WAITDEVICE 11 /* Wait for a discovery */ +#define IRLMP_WAITDEVICE 11 /* Wait for a new discovery */ #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ @@ -97,6 +97,7 @@ enum { #define IAS_MAX_CLASSNAME 64 #define IAS_MAX_ATTRIBNAME 256 +/* Attribute type needed for struct irda_ias_set */ #define IAS_MISSING 0 #define IAS_INTEGER 1 #define IAS_OCT_SEQ 2 @@ -140,6 +141,7 @@ struct irda_ias_set { __u8 string[IAS_MAX_STRING]; } irda_attrib_string; } attribute; + __u32 daddr;/* Address of device (for some queries only) */ }; /* Some private IOCTL's (max 16) */ diff -urpN old-linux/include/net/irda/timer.h linux/include/net/irda/timer.h --- old-linux/include/net/irda/timer.h Mon Oct 25 20:49:42 1999 +++ linux/include/net/irda/timer.h Thu Nov 9 13:29:43 2000 @@ -82,6 +82,7 @@ struct lap_cb; inline void irlmp_start_watchdog_timer(struct lsap_cb *, int timeout); inline void irlmp_start_discovery_timer(struct irlmp_cb *, int timeout); inline void irlmp_start_idle_timer(struct lap_cb *, int timeout); +inline void irlmp_stop_idle_timer(struct lap_cb *self); #endif diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 13:29:19 2000 +++ linux/net/irda/af_irda.cThu Nov 9 13:29:43 2000 @@ -11,7 +11,7 @@ * Sources: af_netroom.c, af_ax25.c, af_rose.c, af_x25.c etc. * * Copyright (c) 1999 Dag Brattli <[EMAIL PROTECTED]> - * Copyright (c) 1999 Jean Tourrilhes <[EMAIL PROTECTED]> + * Copyright (c) 1999 Jean Tourrilhes <[EMAIL PROTECTED]> * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -2199,7 +2199,7 @@ static int irda_getsockopt(struct socket } else { /* We are not connected, we must specify a valid * destination address */ - daddr = ias_opt.attribute.irda_attrib_int; + daddr = ias_opt.daddr; if((!daddr) || (daddr == DEV_ADDR_ANY)) return -EINVAL; } diff -urpN old-linux/net/irda/irlmp_event.c linux/net/irda/irlmp_event.c --- old-linux/net/irda/irlmp_event.cFri Jan 7 11:51:56 2000 +++ linux/net/irda/irlmp_event.cThu Nov 9 13:29:43 2000 @@ -122,7 +122,7 @@ int irlmp_do_lsap_event(struct lsap_cb * ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); IRDA_DEBUG(4, __FUNCTION__ "(), EVENT = %s, STATE = %s\n", - irlmp_event[event], irlmp_state[ self->lsap_state]); + irlmp_event[event], irlsap_state[ self->lsap_state]); return (*lsap_state[self->lsap_state]) (self, event, skb); } @@ -393,6 +393,14 @@ static void irlmp_state_active(struct la irlmp_next_lap_state(self, LAP_STANDBY); self->refcount = 0; + /* In some case, at this point our side has already closed +* all lsaps, and we are waiting for the idle_timer to +* expire. If another device reconnect immediately, the +* idle timer will expire in the midle of the connection +* initialisation, screwing up things a lot... +* Therefore, we must stop the timer... */ + irlmp_stop_idle_timer(self); + /* * Inform all connected LSAP's using this link */ @@ -410,7 +418,8 @@ static void irlmp_state_active(struct la } break; default: - IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event); + IRD
[patch] patch-2.4.0-test10-irda4 (was: Re The IrDA patches)[patch] patch-2.4.0-test10-irda4 (was: Re The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda4.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda4.diff : o [CORRECT] Add delay in -> Propagate incoming discovery info o [FEATURE] Save time of first discovery -> determine if new or same diff -urpN old-linux/include/net/irda/discovery.h linux/include/net/irda/discovery.h --- old-linux/include/net/irda/discovery.h Thu Nov 9 13:04:53 2000 +++ linux/include/net/irda/discovery.h Thu Nov 9 13:06:02 2000 @@ -59,6 +59,7 @@ typedef struct discovery_t { intgen_addr_bit; /* Need to generate a new device address? */ intnslots; /* Number of slots to use when discovering */ unsigned long timestamp; /* Time discovered */ + unsigned long first_timestamp; /* First time discovered */ } discovery_t; void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *discovery); diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 13:04:53 2000 +++ linux/net/irda/af_irda.cThu Nov 9 13:12:46 2000 @@ -452,9 +452,11 @@ static void irda_discovery_indication(ha /* * Function irda_selective_discovery_indication (discovery) * - *Got a selective discovery indication from IrLMP (node matching hint - * bits), wake up any process waiting for answer + *Got a selective discovery indication from IrLMP. * + * IrLMP is telling us that this node is matching our hint bit + * filter. Check if it's a newly discovered node (or if node changed its + * hint bits), and then wake up any process waiting for answer... */ static void irda_selective_discovery_indication(discovery_t *discovery, void *priv) @@ -469,6 +471,16 @@ static void irda_selective_discovery_ind return; } + /* Check if node is discovered is a new one or an old one. +* We check when how long ago this node was discovered, with a +* coarse timeout (we may miss some discovery events or be delayed). +* Note : by doing this test here, we avoid waking up a process ;-) +*/ + if((jiffies - discovery->first_timestamp) > + (sysctl_discovery_timeout * HZ)) { + return; /* Too old, not interesting -> goodbye */ + } + /* Pass parameter to the caller */ self->cachediscovery = discovery; @@ -477,11 +489,12 @@ static void irda_selective_discovery_ind } /* - * Function irda_discovery_timeout (a) + * Function irda_discovery_timeout (priv) * - *Got a selective discovery indication from IrLMP (node matching hint - * bits), wake up any process waiting for answer + *Timeout in the selective discovery process * + * We were waiting for a node to be discovered, but nothing has come up + * so far. Wake up the user and tell him that we failed... */ static void irda_discovery_timeout(u_long priv) { @@ -2245,6 +2258,10 @@ static int irda_getsockopt(struct socket * come into range. When this device arrive, we just wake * up the caller, so that he has time to connect to it before * the device goes away... +* Note : once the node has been discovered for more than a +* few second, it won't trigger this function, unless it +* goes away and come back changes its hint bits (so we +* might call it IRLMP_WAITNEWDEVICE). */ /* Check that the user is passing us an int */ diff -urpN old-linux/net/irda/discovery.c linux/net/irda/discovery.c --- old-linux/net/irda/discovery.c Tue Dec 21 10:17:58 1999 +++ linux/net/irda/discovery.c Thu Nov 9 13:06:02 2000 @@ -43,12 +43,23 @@ * *Add a new discovery to the cachelog, and remove any old discoveries *from the same device + * + * Note : we try to preserve the time this device was *first* discovered + * (as opposed to the time of last discovery used for cleanup). This is + * used by clients waiting for discovery events to tell if the device + * discovered is "new" or just the same old one. They can't rely there + * on a binary flag (new/old), because not all discovery events are + * propagated to them, and they might not always listen, so they would + * miss some new devices popping up... */ void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *new) { discovery_t *discovery, *node; unsigned long
[patch] patch-2.4.0-test10-irda3 (was: Re The IrDA patches)[patch] patch-2.4.0-test10-irda3 (was: Re The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda3.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda3.diff : o [CORRECT] Move query/discovery/watchdog data in per socket struct o [CORRECT] Identify socket in discovery callback (priv arg) o [CORRECT] Handle LAP waiting for timeout o [-OUPS ] Remove extra printk diff -urpN old-linux/include/net/irda/discovery.h linux/include/net/irda/discovery.h --- old-linux/include/net/irda/discovery.h Thu Nov 9 13:24:13 2000 +++ linux/include/net/irda/discovery.h Thu Nov 9 13:24:28 2000 @@ -44,7 +44,7 @@ /* * The DISCOVERY structure is used for both discovery requests and responses */ -typedef struct { +typedef struct discovery_t { queue_t q; /* Must be first! */ __u32 saddr;/* Which link the device was discovered */ diff -urpN old-linux/include/net/irda/irda.h linux/include/net/irda/irda.h --- old-linux/include/net/irda/irda.h Thu Nov 9 13:24:13 2000 +++ linux/include/net/irda/irda.h Thu Nov 9 13:24:28 2000 @@ -110,8 +110,14 @@ if(!(expr)) { \ typedef enum { FLOW_STOP, FLOW_START } LOCAL_FLOW; +/* A few forward declarations (to make compiler happy) */ +struct tsap_cb;/* in */ +struct lsap_cb;/* in */ +struct iriap_cb; /* in */ +struct ias_value; /* in */ +struct discovery_t;/* in */ + /* IrDA Socket */ -struct tsap_cb; struct irda_sock { __u32 saddr; /* my local address */ __u32 daddr; /* peer address */ @@ -137,14 +143,18 @@ struct irda_sock { struct ias_object *ias_obj; /* Our service name + lsap in IAS */ struct iriap_cb *iriap; /* Used to query remote IAS */ - struct ias_value *ias_result; /* Used by getsockopt(IRLMP_IAS_QUERY) */ + struct ias_value *ias_result; /* Result of remote IAS query */ + + hashbin_t *cachelog;/* Result of discovery query */ + struct discovery_t *cachediscovery; /* Result of selective discovery query +*/ int nslots; /* Number of slots to use for discovery */ int errno;/* status of the IAS query */ struct sock *sk; - wait_queue_head_t ias_wait; /* Wait for LM-IAS answer */ + wait_queue_head_t query_wait; /* Wait for the answer to a query */ + struct timer_list watchdog; /* Timeout for discovery */ LOCAL_FLOW tx_flow; LOCAL_FLOW rx_flow; diff -urpN old-linux/include/net/irda/irlan_client.h linux/include/net/irda/irlan_client.h --- old-linux/include/net/irda/irlan_client.h Thu Nov 9 13:24:13 2000 +++ linux/include/net/irda/irlan_client.h Thu Nov 9 13:24:28 2000 @@ -34,7 +34,7 @@ #include void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout); -void irlan_client_discovery_indication(discovery_t *); +void irlan_client_discovery_indication(discovery_t *, void *); void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr); void irlan_client_open_ctrl_tsap( struct irlan_cb *self); diff -urpN old-linux/include/net/irda/irlmp.h linux/include/net/irda/irlmp.h --- old-linux/include/net/irda/irlmp.h Thu Nov 9 13:24:13 2000 +++ linux/include/net/irda/irlmp.h Thu Nov 9 13:24:28 2000 @@ -71,8 +71,8 @@ typedef enum { S_END, } SERVICE; -typedef void (*DISCOVERY_CALLBACK1) (discovery_t *); -typedef void (*DISCOVERY_CALLBACK2) (hashbin_t *); +typedef void (*DISCOVERY_CALLBACK1) (discovery_t *, void *); +typedef void (*DISCOVERY_CALLBACK2) (hashbin_t *, void *); typedef struct { queue_t queue; /* Must be first */ @@ -87,6 +87,7 @@ typedef struct { DISCOVERY_CALLBACK1 callback1; DISCOVERY_CALLBACK2 callback2; + void *priv;/* Used to identify client */ } irlmp_client_t; struct lap_cb; /* Forward decl. */ @@ -192,10 +193,10 @@ __u16 irlmp_service_to_hint(int service) __u32 irlmp_register_service(__u16 hints); int irlmp_unregister_service(__u32 handle); __u32 irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 callback1, - DISCOVERY_CALLBACK2 callback2); + DISCOVERY_CALLBACK2 callback2, void *priv); int irlmp_unregister_client(__u32 handle); int irlmp_update_client(__u32 handle, __u16 hint_mask, - DISCOVERY_CALLBACK1, DISCOVERY_CALLBACK2); + DISCOVERY_CALLBACK1, DISCOVERY_CALLBACK2, voi
Re: [patch] nfsd optimizations for test10
1/ Do you have any stats showing what sort of speedup this gives - I'm curious. I don't have the exact timing stats to show the improvements, but I do have some stats that I gathered when running SPEC SFS. Basically with the default racache scheme which only keeps 80 entries in the table (if I remember the # right), since SPEC SFS works on a lot of files, I can see that shortly after the SPEC SFS test gets started, the table is filled up, and nfsd_get_raparam() will never insert any other ra values to the table, i.e., the racache hit ratio is always 0 for the SPEC SFS runs, and yet each time when it's called, it scans the entire table once, i.e., 80 table entries. On the other hand, when hash table is used, on average, the old files can be removes and new entries can be added dynamically, so the hit ratio improves and even if there isn't a hit, the hash chain search is far more better than a table scan. On average, at most a few list walk will suffice. 2/ Was there a particular reason that you didn't use the include/linux/list.h list structures for the hash and lru chains? If not, I suggest that doing so would be a good idea. It should make the code clearer and more in-keeping with other code in the kernel. No there isn't. Oh, well, maybe there is... I used nfscache.c as the base when I built racache, which didn't use list.h. Having said that, I just did not try hard to make the kernel more consistant. 3/ It is easiest for (many of) us if you just include the patch in-line in your email messages rather than as an attachment. You can then be sure that EVERY mail reader can display it effectively, and Linus has said a number of times that he doesn't like attachments. 3a/ If you or your mailer insists on using attachments, please make sure that the mime-type of the attachment is correct - text/plain, not applications/x-unknown. Again, that makes it a lot easier to read your patch. No problem with this. I will do that for the future patches. 4/ I doubt that this is significant enough to go in before 2.4.0-final now, but it probably has a reasonable chance of getting in shortly afterwards. I really hope that this can go into 2.4, since the changes are really straight-forward and I've been testing and running this under a wide range of situations for a couple months in my own patched kernels. I probably should have sent it a bit earlier. Oh, well. NeilBrown knfsd maintainer. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] patch-2.4.0-test10-irda2 (was: Re The IrDA patches)[patch] patch-2.4.0-test10-irda2 (was: Re The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda2.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda2.diff : o [CORRECT] Propagate incoming discovery info o [CORRECT] Inform user in case of discarded frames o [FEATURE] Set hint mask filter for discovery o [FEATURE] WAITDEVICE ioctl for blocking discovery o [FEATURE] Discovery callback optimisation o [OUPS ] Extra printk diff -urpN old-linux/include/linux/irda.h linux/include/linux/irda.h --- old-linux/include/linux/irda.h Thu Nov 9 11:49:35 2000 +++ linux/include/linux/irda.h Thu Nov 9 11:50:18 2000 @@ -78,15 +78,17 @@ enum { #define SOL_IRLMP 266 /* Same as SOL_IRDA for now */ #define SOL_IRTTP 266 /* Same as SOL_IRDA for now */ -#define IRLMP_ENUMDEVICES1 -#define IRLMP_IAS_SET2 -#define IRLMP_IAS_QUERY 3 -#define IRLMP_HINTS_SET 4 +#define IRLMP_ENUMDEVICES1 /* Return discovery log */ +#define IRLMP_IAS_SET2 /* Set an attribute in local IAS */ +#define IRLMP_IAS_QUERY 3 /* Query remote IAS for attribute */ +#define IRLMP_HINTS_SET 4 /* Set hint bits advertised */ #define IRLMP_QOS_SET5 #define IRLMP_QOS_GET6 #define IRLMP_MAX_SDU_SIZE 7 -#define IRLMP_IAS_GET8 -#define IRLMP_IAS_DEL 9 +#define IRLMP_IAS_GET8 /* Get an attribute from local IAS */ +#define IRLMP_IAS_DEL 9 /* Remove attribute from local IAS */ +#define IRLMP_HINT_MASK_SET10 /* Set discovery filter */ +#define IRLMP_WAITDEVICE 11 /* Wait for a discovery */ #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cThu Nov 9 11:49:35 2000 +++ linux/net/irda/af_irda.cThu Nov 9 11:53:21 2000 @@ -81,6 +81,9 @@ static struct proto_ops irda_ultra_ops; static hashbin_t *cachelog = NULL; static DECLARE_WAIT_QUEUE_HEAD(discovery_wait); /* Wait for discovery */ +static discovery_t *cachediscovery = NULL; +static struct wait_queue *selective_discovery_wait = NULL; +static struct timer_list discovery_watchdog; /* to avoid blocking state */ #define IRDA_MAX_HEADER (TTP_MAX_HEADER) @@ -433,7 +436,7 @@ static void irda_getvalue_confirm(int re /* * Function irda_discovery_indication (log) * - *Got a discovery log from IrLMP, wake ut any process waiting for answer + *Got a discovery log from IrLMP, wake up any process waiting for answer * */ static void irda_discovery_indication(hashbin_t *log) @@ -447,6 +450,46 @@ static void irda_discovery_indication(ha } /* + * Function irda_selective_discovery_indication (discovery) + * + *Got a selective discovery indication from IrLMP (node matching hint + * bits), wake up any process waiting for answer + * + */ +static void irda_selective_discovery_indication(discovery_t *discovery) +{ + IRDA_DEBUG(2, __FUNCTION__ "()\n"); + + /* Pass parameter to the caller */ + cachediscovery = discovery; + + /* Wake up process if its waiting for device to be discovered */ + if(selective_discovery_wait != NULL) + wake_up_interruptible(&selective_discovery_wait); +} + +/* + * Function irda_discovery_timeout (a) + * + *Got a selective discovery indication from IrLMP (node matching hint + * bits), wake up any process waiting for answer + * + */ +static void irda_discovery_timeout(u_long priv) +{ + struct irda_sock *self; + + IRDA_DEBUG(2, __FUNCTION__ "()\n"); + + self = (struct irda_sock *) priv; + ASSERT(self != NULL, return;); + + /* Wake up process if its still waiting... */ + if(selective_discovery_wait != NULL) + wake_up_interruptible(&selective_discovery_wait); +} + +/* * Function irda_open_tsap (self) * *Open local Transport Service Access Point (TSAP) @@ -619,9 +662,12 @@ static int irda_discover_daddr_and_lsap_ irlmp_update_client(self->ckey, self->mask, NULL, irda_discovery_indication); - /* Do some discovery */ + /* Do some discovery (and also return cached discovery results) */ irlmp_discovery_request(self->nslots); + /* Tell IrLMP that we have been notified */ + irlmp_update_client(self->ckey, self->mask, NULL, NULL); + /* Check if t
[patch] patch-2.4.0-test10-irda1 (was: Re The IrDA patches)[patch] patch-2.4.0-test10-irda1 (was: Re The IrDA patches)
Linus, Here are the new IrDA patches for Linux-2.4.0-test10. Please apply them to your latest 2.4 code. If you decide to apply them, then I suggest you start with the first one (irda1.diff) and work your way to the last one (irda24.diff) since most of them are not commutative. The name of this patch is irda1.diff. (Many thanks to Jean Tourrilhes for splitting up the big patch) [FEATURE] : Add a new feature to the IrDA stack [CORRECT] : Fix to have the correct/expected behaviour [CRITICA] : Fix potential kernel crash [OUPS ] : Error that will be fixed in a later patch irda1.diff : o [CORRECT] Proper return code in case of IAS lookup failure o [CORRECT] Fix getname() to return proper length & data o [FEATURE] Add Kernel/User space tag to IAS attributes o [FEATURE] Add the ability to delete user space IAS attributes o [FEATURE] Auto discover dest address base on service name o [FEATURE] Allow query IAS outside a connection diff -urpN old-linux/include/linux/irda.h linux/include/linux/irda.h --- old-linux/include/linux/irda.h Thu Jan 6 14:46:18 2000 +++ linux/include/linux/irda.h Thu Nov 9 11:17:07 2000 @@ -86,6 +86,7 @@ enum { #define IRLMP_QOS_GET6 #define IRLMP_MAX_SDU_SIZE 7 #define IRLMP_IAS_GET8 +#define IRLMP_IAS_DEL 9 #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ @@ -93,6 +94,11 @@ enum { #define IAS_MAX_OCTET_STRING 1024 #define IAS_MAX_CLASSNAME 64 #define IAS_MAX_ATTRIBNAME 256 + +#define IAS_MISSING 0 +#define IAS_INTEGER 1 +#define IAS_OCT_SEQ 2 +#define IAS_STRING 3 #define LSAP_ANY 0xff diff -urpN old-linux/include/net/irda/irias_object.h linux/include/net/irda/irias_object.h --- old-linux/include/net/irda/irias_object.h Tue Dec 21 10:17:31 1999 +++ linux/include/net/irda/irias_object.h Thu Nov 9 11:17:07 2000 @@ -34,6 +34,10 @@ #define IAS_OCT_SEQ 2 #define IAS_STRING 3 +/* Object ownership of attributes (user or kernel) */ +#define IAS_KERNEL_ATTR0 +#define IAS_USER_ATTR 1 + /* * LM-IAS Object */ @@ -51,6 +55,7 @@ struct ias_object { */ struct ias_value { __u8type;/* Value description */ + __u8owner; /* Managed from user/kernel space */ int charset; /* Only used by string type */ int len; @@ -78,12 +83,15 @@ char *strdup(char *str); struct ias_object *irias_new_object(char *name, int id); void irias_insert_object(struct ias_object *obj); int irias_delete_object(struct ias_object *obj); +int irias_delete_attrib(struct ias_object *obj, struct ias_attrib *attrib); void __irias_delete_object(struct ias_object *obj); -void irias_add_integer_attrib(struct ias_object *obj, char *name, int value); -void irias_add_string_attrib(struct ias_object *obj, char *name, char *value); +void irias_add_integer_attrib(struct ias_object *obj, char *name, int value, + int user); +void irias_add_string_attrib(struct ias_object *obj, char *name, char *value, +int user); void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets, -int len); +int len, int user); int irias_object_change_attribute(char *obj_name, char *attrib_name, struct ias_value *new_value); struct ias_object *irias_find_object(char *name); diff -urpN old-linux/net/irda/af_irda.c linux/net/irda/af_irda.c --- old-linux/net/irda/af_irda.cFri Oct 27 10:56:41 2000 +++ linux/net/irda/af_irda.cThu Nov 9 11:17:07 2000 @@ -323,6 +323,8 @@ static void irda_flow_indication(void *i } } +#if 0 +/* Now obsolete... */ /* * Function irda_getvalue_confirm (obj_id, value, priv) * @@ -378,6 +380,55 @@ static void irda_getvalue_confirm(int re /* Wake up any processes waiting for result */ wake_up_interruptible(&self->ias_wait); } +#endif + +/* + * Function irda_getvalue_confirm (obj_id, value, priv) + * + *Got answer from remote LM-IAS, just pass object to requester... + * + * Note : duplicate from above, but we need our own version that + * doesn't touch the dtsap_sel and save the full value structure... + */ +static void irda_getvalue_confirm(int result, __u16 obj_id, + struct ias_value *value, void *priv) +{ + struct irda_sock *self; + + IRDA_DEBUG(2, __FUNCTION__ "()\n"); + + ASSERT(priv != NULL, return;); + self = (struct irda_sock *) priv; + + if (!self) { + WARNING(__FUNCTION__ "(), lost myself!\n"); + return; + } + + /* We probably don't need to make any more queries */ + iriap_close(self->iriap); + self->iriap = NULL; + + /* Check if request succeeded */ + if (result != IAS_SUCCESS) { + IRDA_DEBUG(1, __
Re: Q: Linux rebooting directly into linux.
Followup to: <[EMAIL PROTECTED]> By author:[EMAIL PROTECTED] (Eric W. Biederman) In newsgroup: linux.dev.kernel > > > > > > The interface is designed to be simple and inflexible yet very > > > powerful. To that end the code just takes an elf binary, and a > > > command line. The started image also takes an environment generated > > > by the kernel of all of the unprobeable hardware details. > > > > Isn't this what milo does on alpha? > > Similar milo uses kernel drivers in it's own framework. > This has proved to be a major maintenance problem. Milo is nearly > a kernel fork. > > The design is for the long term to get this incorporated into the > kernel, and even if not a small kernel patch should be easier to > maintain that a harness for calling kernel drivers. > I'm working on something similiar in "Genesis". It pretty much is (or rather, will be) a kernel *port*, not a fork; the port is such that it can run on top of a simple BIOS extender and thus access the boot media. -hpa -- <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
On Sat, Nov 11, 2000 at 10:57:20AM -0800, Robert Lynch wrote: > Andi Kleen wrote: > > > > On Sat, Nov 11, 2000 at 10:03:35AM -0800, Robert Lynch wrote: > > > sys_nfsservctl 80 1060 980 +1225.0 > > > dump_extended_fpu8 84 76 +950.00 > > > get_fpregs 36 372 336 +933.33 > > > schedule_tail 16 144 128 +800.00 > > > set_fpregs 36 272 236 +655.56 > > > tty_release 16 108 92 +575.00 > > > ext2_write_inode20 108 88 +440.00 > > > ... > > > > > > I have surpressed my momentary urge to post the whole thing, so > > > as not to arouse the legendary ire of this list. :) > > > > Ordering by byte delta is more useful than by Change to get the real > > pigs, because Change gives high values even for relatively small changes > > (like 8 -> 84) > > > > Also note that some of the output is bogus due to inaccurate nm output > > (bloat-o-meter relies on nm) > > > > -Andi > > Yer right, here's a biggie I missed: That is the slow path of the spinlocks needed for fine grained SMP locking. Not really surprising that that it bloated a bit, given all the locking work that went into 2.4. >From looking at my UP configuration (where vmlinux's text segment has bloated by about 500K between 2.2 and 2.4) there are no obvious big pigs, just lots of small stuff that adds together. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: opl3 under 2.4.0-test10
Mark Hindley wrote: > I am trying to setup my ALS 110 soundcard under my build of kernel > 2.4.0-test10. > > I have built in isapnp support and also the sb and opl3 drivers. > > However, even though I pass opl3=0x388 on the Kernel command line all > I get is an isapnp panic. I'm experiencing what superficially appears to be a related problem with an AWE64 card. I'm building the drivers non-modular (because I've yet to find any description of how to configure modular sound drivers for 2.4.0). I believe I'm making the appropriate configuration settings - from my .config: CONFIG_SOUND=y CONFIG_SOUND_OSS=y CONFIG_SOUND_TRACEINIT=y CONFIG_SOUND_DMAP=y CONFIG_SOUND_ADLIB=y CONFIG_SOUND_VMIDI=y CONFIG_SOUND_SB=y CONFIG_SOUND_AWE32_SYNTH=y CONFIG_SOUND_YM3812=y and I'm passing "opl3=0x388" to the driver. However, if I query what synth devices the driver supports, it only reports an AWE32-0.4.4 (RAM512k) sample device. I expect it report an FM synth device, too. I get the same (lack of) effect if I go via the adlib_card code, by saying "adlib=0x388". My investigations so far have shown that when opl3_detect() first tries to get the signature of the OPL3 device, it gets 0xff from the inb() (line 195 of drivers/sound/opl3.c in test11pre1), while the corresponding code in 2.2.18pre19 gets 0x00. Stephen Thomas - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
Tigran Aivazian <[EMAIL PROTECTED]> writes: > On Sat, 11 Nov 2000, Andrea Arcangeli wrote: > > > On Sat, Nov 11, 2000 at 02:51:21PM +, Tigran Aivazian wrote: > > > Yes, Andrea, I know that paging is disabled at the point of loading the > > > image but I was talking about the inability to boot (boot == complete > > > booting, i.e. at least reach start_kernel()) a kernel with very large > > > .data or .bss segments because of various reasons -- one of which, > > > probably,is the inadequacy of those pg0 and pg1 page tables set up in > > > head.S > > > > Ah ok, I thought you were talking about bootloader. > > > > About the initial pagetable setup on i386 port there's certainly a 3M limit on > > > the size of the kernel image, but it's trivial to enlarge it. BTW, exactly > for > > > that kernel size limit reasons in x86-64 I defined a 40Mbyte mapping where we > > currently have a 4M mapping and that's even simpler to enlarge since they're > 2M > > > PAE like pagetables. > > > > Basically as far as the kernel can get loaded in memory correctly we have > > no problem :) > > > > > (which Peter says is infinite?) or the ones on .text/.data/.bss (and what > > > exactly are they?)? See my question now? > > > > We sure hit the 3M limit on the .bss clearing right now. > > With respect to .bss issues we should clear it before we set up page tables. That way we have no hardlimit short of 4GB which. We also do stupid things like set segment registers before setting up a GDT. Yes we set them in setup.S but it is still a stupid non-obvious dependency. We we can do it in setup.S Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
Michael Rothwell <[EMAIL PROTECTED]> writes: > "Eric W. Biederman" wrote: > > > > I have recently developed a patch that allows linux to directly boot > > into another linux kernel. > > This would rock. One place I can think of using it is with distro > installers. The installer boots a generic i386 kernel, and then installs > an optimized (i.e, PIII, etc.) kernel for run-time. This would rock? It already does. Of course the installers need to actually uses this. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Q: Linux rebooting directly into linux.
Wakko Warner <[EMAIL PROTECTED]> writes: > > I have recently developed a patch that allows linux to directly boot > > into another linux kernel. With the code freeze it appears > > inappropriate to submit it at this time. > > > > Linus in principal do you have any trouble with this kind of > > functionality? > > > > The immediate applications of this code, are: > > - Clusters can network can network boot over arbitrary network > > interfaces, and the network driver only needs to be written and > > maintained in one place. > > - Multiplatform boot loaders can be written. > > - The Linux kernel can be included in a boot ROM and you can still > > boot other linux kernels. > > - Kernel developers can have a fast interface for booting into a > > development kernel. > > > > The interface is designed to be simple and inflexible yet very > > powerful. To that end the code just takes an elf binary, and a > > command line. The started image also takes an environment generated > > by the kernel of all of the unprobeable hardware details. > > Isn't this what milo does on alpha? Similar milo uses kernel drivers in it's own framework. This has proved to be a major maintenance problem. Milo is nearly a kernel fork. The design is for the long term to get this incorporated into the kernel, and even if not a small kernel patch should be easier to maintain that a harness for calling kernel drivers. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] nfsd optimizations for test10
On Friday November 10, [EMAIL PROTECTED] wrote: > Hi, > > I made some optimizations on racache in nfsd in test10. The idea is to > replace with existing fixed length table for readahead cache in NFSD with a > hash table. > The old racache is essentially ineffective in dealing with large # of > files, and yet eats CPU cycles in scanning the table (even though the table > is small), > the hash table-based is much more effective and fast. I have generated the > patch for test10 and tested it. > > (See attached file: nfshdiff)(See attached file: nfsdiff) > > > Ying Thanks for this. A couple of questions and comments: 1/ Do you have any stats showing what sort of speedup this gives - I'm curious. 2/ Was there a particular reason that you didn't use the include/linux/list.h list structures for the hash and lru chains? If not, I suggest that doing so would be a good idea. It should make the code clearer and more in-keeping with other code in the kernel. 3/ It is easiest for (many of) us if you just include the patch in-line in your email messages rather than as an attachment. You can then be sure that EVERY mail reader can display it effectively, and Linus has said a number of times that he doesn't like attachments. 3a/ If you or your mailer insists on using attachments, please make sure that the mime-type of the attachment is correct - text/plain, not applications/x-unknown. Again, that makes it a lot easier to read your patch. 4/ I doubt that this is significant enough to go in before 2.4.0-final now, but it probably has a reasonable chance of getting in shortly afterwards. NeilBrown knfsd maintainer. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
Tigran Aivazian wrote: > > On Fri, 10 Nov 2000, H. Peter Anvin wrote: > > > > > > On x86 machines there is a size limitation on booting. Though I thought > > > it was 1024K as the max, 900K should be fine. > > > > > > > No, there isn't. There used to be, but it has been fixed. > > > > Are you sure? I thought the fix was to build 2 page tables for 0-8M > instead of 1 page table for 0-4M. So, we still cannot boot a bzImage more > than 2.5M which roughly corresponds to 8M. Is this incorrect? Are you > saying I should be able to boot a bzImage corresponding to an ELF object > vmlinux of 4G or more? > > I tried it and it failed (a few weeks ago) so at least reasonably recently > what you are saying was not true. I will now check if it suddenly became > true now. > That wasn't the fix in question (there was a 1 MB *compressed* limit for a while), but you're right, for now the limit is 8 MB *uncompressed.* -hpa -- <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
Max Inux wrote: > > >gzip, actually. I can verify here "make bzImage" does the expected thing > >and it looks normal-sized to me. > > I believe there is zImage (gzip) and bzImage (bzip2). (Or is it compress > vs gzip, but then why bzImage vs gzImage?) > b is "big". They are both gzip compressed. zImage has a size limit which bzImage doesn't. zImage is pretty much obsolete. -hpa -- <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Tracing files that opens.
> Is there a nice way to trap on file open() and stat() ? a few months ago, I helped a friend in writing a generic syscall wrapper because he needed exactly this. You should take a look at the section "overloader" on http://bdolez.free.fr/ Regards, willy ___ Do You Yahoo!? -- Pour dialoguer en direct avec vos amis, Yahoo! Messenger : http://fr.messenger.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Tracing files that opens.
It seems that no one on that thread thought about using the Linux Trace Toolkit which would allow you to do exactly what is asked for. Plus, there's a basic hooking mechanism than enables you to hook onto any file-system events and then do what you want with that. In the case of trapping open() or stat() you'd only need to: 1) Patch the kernel with the LTT patch 2) Write a kernel module that uses the hooking interface to hook onto system call entries and filter those out as needed. Moreover, you could also hook onto file-system events which would give you greater detail about the file-system related system calls occurring. Eventually, I'd like to see item #1 disappear and the tracing patches admitted part of the kernel tree. Other OSes have had such a capability for a very long time. This, by itself, doesn't justify including it, but it certainly does go to show usefulness. Moreover, Alan has suggested that this might be a good way to implement C2 security into the kernel since all system entries are monitored. That said, here's an example module that could be a basis for trapping open() and stat(). Although, it could be used to monitor other events: #define MODULE #include #include int my_callback(uint8_t pmEventID, void* pmStruct) { trace_syscall_entry* syscall_event = (trace_syscall_entry*) pmStruct; printk("System call %d occured at address 0x%08X \n", syscall_event->syscall_id, syscall_event->address); } int init_module(void) { printk("callback initialized \n"); trace_register_callback(&my_callback, TRACE_EV_SYSCALL_ENTRY); return 0; } void cleanup_module(void) { trace_unregister_callback(&my_callback, TRACE_EV_SYSCALL_ENTRY); } The only "problem" here being that you can't specify "open" or "stat" as strings, but as their respective system call ID as seen in arch/i386/entry.S for the i386. Note the patches available now include support for the PowerPC. If anyone is interested in adding support for other architectures, feel free to dig in. You can find LTT and all relevant patches at: http://www.opersys.com/LTT Best regards Karim Michael Vines wrote: > > On Sat, 11 Nov 2000, Magnus Naeslund(b) wrote: > > > Is there a nice way to trap on file open() and stat() ? > > That way i could have nice file statistics. > > There was a thread about this a couple days ago. > > >http://x52.deja.com/threadmsg_ct.xp?AN=690272012.1&mhitnum=0&CONTEXT=973965178.1986985995 > > Michael > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > Please read the FAQ at http://www.tux.org/lkml/ -- === Karim Yaghmour [EMAIL PROTECTED] Operating System Consultant (Linux kernel, real-time and distributed systems) === - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
IDE DMA/lost interrupt problem with RAID0
Can anyone shed some light on this? I get "lost interrupt" or "timeout waiting for DMA" (and a subsequent reset) when reading software RAID0 (striped) partitions using IDE drives, iff I enable any of the following: % hdparm -c1 /dev/hda /dev/hdc (enable 32-bit I/O) % hdparm -m16 /dev/hda /dev/hdc (enable multiple sector I/O) % hdparm -d1 /dev/hda /dev/hdc (enable DMA) (If it's not evident, the lost interrupts happen when using PIO, the "timeout waiting ..." with DMA.) The RAID0 partitions use two identical hd partitions each, on hda and hdc, with 8k chunks. Doing "hdparm -t /dev/md0" (or md{1,2,3}) will invoke a reset, but "hdparm -t /dev/hda" (or /dev/hdc) does not. If I don't enable DMA, and don't use hdparm -c1 or -m16, I don't get the resets. A typical reset sequence (in /var/log/messages) is this for the DMA case: hda: timeout waiting for DMA hda: irq timeout: status=0x58 { DriveReady SeekComplete DataRequest } hda: status timeout: status=0xd0 { Busy } hda: DMA disabled hda: drive not ready for command ide0: reset: success and this for PIO: hda: lost interrupt hda: status error: status=0x58 { DriveReady SeekComplete DataRequest } hda: drive not ready for command hda: status timeout: status=0xd0 { Busy } hda: drive not ready for command ide0: unexpected interrupt, status=0x80, count=6 ide0: reset: success This behavior started with kernel 2.2.16; it didn't happen under 2.2.14 . Some hardware/software particulars: Disks (hda, hdc): Maxtor 52049U4 (20 GB, 7200 rpm, UDMA66) Motherboard/chipset: Tyan S1682D (Intel 440FX) IDE interface: Intel 82371SB PIIX3 (onboard) CPUs: dual Pentium II 266 MHz. Kernel: Built from Red Hat 7.0 kernel-source-2.2.16-22; SMP configured; built-in IDE and RAID (i.e., not modular) I don't seem to have this problem on another machine: Disks (hda, hdc): Maxtor 91366U4 (13.6 GB, 7200 rpm, UDMA66) Motherboard/chipset: Supermicro PIIISCA (Intel 820) IDE interface: Intel 82801AA (onboard) CPU: single Pentium III 666 MHz. Kernel: same binaries I get about 24% performance improvement (reading) from striping, 1.8x improvement with -c1 -m16, and 2.6x improvement with DMA (5.6x on the second machine!), so if anything has to be sacrificed, it will be striping. But does anyone have some insights on why RAID doesn't work with DMA or the hdparm tweaks? Please Cc any replies to me, since I'm not a list subscriber. Thanks -- Bruce Jerrick Portland, Oregon, USA email: [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: sendmail fails to deliver mail with attachments in /var/spool/mqueue
"Jeff V. Merkey" wrote: > NT and NetWare servers don't stop forwarding > emails when the load average gets too high -- they just work out of the > box, and hopefully, no so will Linux (our distribution does now since > this problem in fixed). Don't get me started on nt - saying it "just works" is a sign of genuine naivete - You could say nt "usually works, except for when it's down". Your sendmail issue with Linux was merely a tunable parameter, while the nt problems go much deeper, and nt often requires regular reboots in order to carry on. > Now we know that sendmail has problems on Linux based on the this load > average interpretation, which we would not have known if someone had > not raised the issue. It is good that you raised the issue - Cheers, jjs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Missing ACKs with Linux 2.2/2.4?
In article <[EMAIL PROTECTED]> you wrote: > The cobalt machines have now had a kernel upgrade (only to 2.2.14, thats > the most recent that Cobalt provide...), and the problem has > disappeared. Should we ignore "timestamp 0" if there are systems out there which will break on that. Or is timestamp 0 a legal value? Greetings Bernd - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Dual XEON - >>SLOW<< on SMP
On Tue, Nov 07, 2000 at 04:03:25PM -0700, "Jeff V. Merkey" <[EMAIL PROTECTED]> wrote: > > Marc Lehman verified that PII systems will generate tons of AGIs with > gcc. It is a bit late (just came back from the systems'00 fair), but Jeff Merkey just acknowledged that indeed he meant me with "Marc Lehman". I have no idea why he wrote such a thing, since I never mentioned something like that, nor did I verify anything like this (given that the sentence doesn't make much sense, either). Jeff, I never said such a thing and I would appreciate if you didn't put your words into my mouth. *puzzled* -- -==- | ==-- _ | ---==---(_)__ __ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / [EMAIL PROTECTED] |e| -=/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: sendmail fails to deliver mail with attachments in /var/spool/mqueue
[EMAIL PROTECTED] (Jeff V. Merkey) writes: >I guess all customers are idiots then, since about 100+ people who were >using our release downloaded it, and had these problems with sendmail. This >disconnect of yours is about what I would expect from someone in a University. >Some of us don't have the luxury of being able to pontificate in a Univ >environment -- we have to make a living from Linux -- and provide payroll >for the people on this list who actually do the core work on Linux. I earn a living with building and deploying Internet system on a variety of (Unix-based) platforms. Each one has its quirks and to build successful servers, you have to know about them. I never ever deployed a sendmail.cf as it came from the vendor or the source package. I adjust these config files to the customers' need. [...] >somewhere not being deployed. It's the commercialization effort that made >Linux a household word. NT and NetWare servers don't stop forwarding THERE IS NO SUCH EFFORT. This list is not your general-purpose Linux support list. If you need support for a distribution, get it from the vendor. If you make a distribution, that deploys a software, give this support or buy it from people who _know_ and sell it to your customers. But this list is not for your "I don't have a clue" efforts. Deploying a distribution is major grunt work that most customers will never see. I e.g. deploy a highly customized version of RedHat on the servers that I build. Most of my customers ask a second and a third time why I don't simply deploy the distribution out of the box like all the consultants that they had before. They stop asking when their old boxes are cracked open or fail under load and mine doesn't. If you deploy a general purpose distribution or OS for a very special application, then you simply use the wrong tool. >emails when the load average gets too high -- they just work out of the >box, and hopefully, no so will Linux (our distribution does now since >this problem in fixed). Your distribution will simply have "RefuseLA" and "QueueLA" higher than the sendmail defaults. This is not the solution to your problem but moves it simply to a different point. You simply don't understand, that a cluster mail system that handles 20,000,000 mailboxes and 200,000,000 mails per day must be configured different than the mail system on a high traffic web server, that simply sends out two mails per day from the logfile rotation. Both machines may have a load average way beyond a desktop system that peaks at 0.05 on normal usage. >Now we know that sendmail has problems on Linux based on the this load >average interpretation, which we would not have known if someone had >not raised the issue. Linux has no problem. Some sites that run Linux have a problem because they're misconfigured. And if you ship a distribution but want to load off the support for this distribution on Linux-Kernel, you're definitely in for a surprise. TANSTAAFL, you know. Regards Henning -- Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [EMAIL PROTECTED] Am Schwabachgrund 22 Fon.: 09131 / 50654-0 [EMAIL PROTECTED] D-91054 Buckenhof Fax.: 09131 / 50654-20 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
problems with sync_all_inode() in prune_icache() and kupdate()
Hi, I'm wondering if someone can tell me why sync_all_inodes() is called in prune_icache(). sync_all_inodes() can cause problems in some situations when memory is short and shrink_icache_memory() is called. For instance, when the system is really short of memory, do_try_to_free_pages() is invoked (either by application or kswapd) and shrink_icache_memory() is also invoked, but when prune_icache() is called, the first thing is does is to sync_all_inodes(). If the inode block is not in memory, it may have to bread the inode block in, so the kswapd() can block until the inode block is brought into memory. Not only that, since the system is short of memory, there may not even be memory available for the inode block. Even if there is, given that there is only a single kswapd thread who is doing sync_all_inodes(), if the dirty inode list if relatively long (like a tens of thousands as in something like SPEC SFS), it'll take practically forever for sync_all_inodes() to finish. To user, this looks like the system is hang (although it isn't really). It's just taking a looong time to do shrink_icache_memory! One solution to this is not to call sync_all_inodes() at all in prune_icache(), since other parts of the kernel, like kupdate() will also try to sync_inodes periodically anyway, but I don't know if this has other implications or not. I don't see a problem with this myself. In fact, I have been using this fix in my own test9 kernel, and I get much smoother kernel behavior when running high load SPEC SFS than using the default prune_icache(). Actually if sync_all_inodes() is called, SPEC SFS sometimes simply fails due to the long response time on the I/O requests. The similar theory goes with kupdate() daemon. That is, since there is only a single thread that does the inode and buffer flushing, under high load, kupdate() would not get a chance to call flush_dirty_buffers() until after sync_inodes() is completed. But sync_inodes() can take forever since inodes are flushed serially to disk. Imagine how long it might take if each inode flushing causes one read from disk! In my experience with SPEC SFS, sometimes, if kupdate() is invoked during the SPEC SFS run, it simply cannot finish sync_inode() until the entire benchmark run is finished! So, all the dirty buffers that flush_dirty_buffer(1) is supposed to flush would never be called during the benchmark run and system is constantly running in the bdflush() mode, which is really supposed to be called only in a panic mode! Again, the solution can be simple, one can create multiple dirty_buffer_flushing daemon threads that calls flush_dirty_buffer() without sync_super or sync_inode stuff. I have done so in my own test9 kernel, and the results with SPEC SFS is much more pleasant. Ying - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
Andi Kleen wrote: > > On Sat, Nov 11, 2000 at 10:03:35AM -0800, Robert Lynch wrote: > > sys_nfsservctl 80 1060 980 +1225.0 > > dump_extended_fpu8 84 76 +950.00 > > get_fpregs 36 372 336 +933.33 > > schedule_tail 16 144 128 +800.00 > > set_fpregs 36 272 236 +655.56 > > tty_release 16 108 92 +575.00 > > ext2_write_inode20 108 88 +440.00 > > ... > > > > I have surpressed my momentary urge to post the whole thing, so > > as not to arouse the legendary ire of this list. :) > > Ordering by byte delta is more useful than by Change to get the real > pigs, because Change gives high values even for relatively small changes > (like 8 -> 84) > > Also note that some of the output is bogus due to inaccurate nm output > (bloat-o-meter relies on nm) > > -Andi Yer right, here's a biggie I missed: stext_lock434429395 25051 +576.68 Bob L. -- Robert Lynch-Berkeley CA [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
On Sat, Nov 11, 2000 at 04:46:09PM +, Tigran Aivazian wrote: > I understand and agree with what you say except the number 4M. It is not > 4M but 8M, imho. See arch/i386/kernel/head.S You're reading 2.4.x, I was reading 2.2.x. Andrea - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
On Sat, Nov 11, 2000 at 10:03:35AM -0800, Robert Lynch wrote: > sys_nfsservctl 80 1060 980 +1225.0 > dump_extended_fpu8 84 76 +950.00 > get_fpregs 36 372 336 +933.33 > schedule_tail 16 144 128 +800.00 > set_fpregs 36 272 236 +655.56 > tty_release 16 108 92 +575.00 > ext2_write_inode20 108 88 +440.00 > ... > > I have surpressed my momentary urge to post the whole thing, so > as not to arouse the legendary ire of this list. :) Ordering by byte delta is more useful than by Change to get the real pigs, because Change gives high values even for relatively small changes (like 8 -> 84) Also note that some of the output is bogus due to inaccurate nm output (bloat-o-meter relies on nm) -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
Peter Samuelson wrote: > [Robert Lynch] wrote: > > I've been regularly building kernels in the testXX series, and > > they have been coming out ~ 600K; test10-final and test11-pre1: > > > > -rw-r--r--1 root root 610503 Oct 31 18:39 vmlinuz-t10 > > -rw-r--r--1 root root 610568 Nov 7 20:26 vmlinuz-t11p01 > > > > test11-pre2 comes out ~ 900K: > > > > -rw-r--r--1 root root 926345 Nov 10 10:16 vmlinuz-t11p02 > > Track it down yourself: > > 1) The sizes of your two 'vmlinux' files: do they differ wildly as well? Wildly; compare test11-pre1 and testll-pre2 sizes: -rwxr-xr-x1 root root 1789457 Nov 7 20:26 vmlinux-t11p01 -rwxr-xr-x1 root root 2625016 Nov 10 10:15 vmlinux-t11p02 > 2a) If no, check the make logs between the vmlinux link line and bzImage > creation. Compare the two and note any significant differences. > > 2b) If yes, write a perl script to compute symbol sizes from each > System.map file. (Symbol size == address of next symbol minus > address of this symbol.) Sort numerically, then compare old vs new > for symbols that have grown a lot, or large new symbols. > > Peter Whence Andi Kleen chipped in: > No need to write one: ftp.firstfloor.org:/pub/ak/perl/bloat-o-meter > > -Andi Running: perl bloat-o-meter /boot/vmlinux-t11p01 /boot/vmlinux-t11p02 > /tmp/bloat.out looking at the output, the large positive changes seem to be (doing it by eye, might have skipped and/or missed something): Symbol Old sizeNew sizeDelta Change (%) slabinfo_write_proc 8 340 332 +4150.0 show_buffers24 368 344 +1433.3 sys_nfsservctl 80 1060 980 +1225.0 dump_extended_fpu8 84 76 +950.00 get_fpregs 36 372 336 +933.33 schedule_tail 16 144 128 +800.00 set_fpregs 36 272 236 +655.56 tty_release 16 108 92 +575.00 ext2_write_inode20 108 88 +440.00 ... I have surpressed my momentary urge to post the whole thing, so as not to arouse the legendary ire of this list. :) Bob L. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Tracing files that opens.
On Sat, 11 Nov 2000, Magnus Naeslund(b) wrote: > Is there a nice way to trap on file open() and stat() ? > That way i could have nice file statistics. There was a thread about this a couple days ago. http://x52.deja.com/threadmsg_ct.xp?AN=690272012.1&mhitnum=0&CONTEXT=973965178.1986985995 Michael - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
RE: intel etherpro100 on 2.2.18p21 vs 2.2.18p17
We have the SUPER 370DL3 SuperMicro boards w/ the integrated Intel NIC, unfortunately a warm boot does not help. The problem also seems to happen when I turn on the alias ip feature in the kernel under network options. On Fri, 10 Nov 2000, Allen, David B wrote: > FWIW, I have a dual-proc SuperMicro motherboard P3DM3 with integrated > Adaptec SCSI and Intel 8255x built-in NIC. > > Sometimes on a cold boot I get the "kernel: eth0: card reports no RX > buffers" that repeats, but if I follow it with a warm boot the message > doesn't appear (even on subsequent warm boots). So this is definitely > reproducible, but it doesn't happen every time. > > I can't offer much more than that, but at least you know you're not the only > one experiencing this. > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 10, 2000 9:00 AM > To: [EMAIL PROTECTED] > Subject: intel etherpro100 on 2.2.18p21 vs 2.2.18p17 > > We have several Supermicro 370DL3 boards (scsi, built into epro100, dual > pentium iii) - which are giving the following ethernet card error on > 2.2.18p21, but not on 2.2.18p17. This error has happened on 3 out of 4 > boards with this configuration. > > Oct 18 12:17:34 db1 kernel: eth0: card reports no RX buffers. > The above message repeats itself and the ethernet card does not work. > > On bootup: > > Oct 18 12:17:34 db1 kernel: eepro100.c:v1.09j-t 9/29/99 Donald Becker > http://cesdis.gsfc.nasa.gov/linux/drivers/eepro10$ > Oct 18 12:17:34 db1 kernel: eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 > Modified by Andrey V. Savochkin <[EMAIL PROTECTED]$ > Oct 18 12:17:34 db1 kernel: eth0: Intel PCI EtherExpress Pro100 82557, > 00:30:48:21:2F:9E, I/O at 0xd400, IRQ 31. > Oct 18 12:17:34 db1 kernel: Board assembly 00-000, Physical > connectors present: RJ45 > Oct 18 12:17:34 db1 kernel: Primary interface chip i82555 PHY #1. > Oct 18 12:17:34 db1 kernel: General self-test: passed. > Oct 18 12:17:34 db1 kernel: Serial sub-system self-test: passed. > Oct 18 12:17:34 db1 kernel: Internal registers self-test: passed. > Oct 18 12:17:34 db1 kernel: ROM checksum self-test: passed (0x04f4518b). > Oct 18 12:17:34 db1 kernel: Receiver lock-up workaround activated. > > Oct 18 12:17:34 db1 kernel: eth0: card reports no RX buffers. > > > I believe this has been an ongoing issue for these intel nics? > > --Michael > > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[patch] wakeup_bdflush related fixes and nfsd optimizations for test10
Hi, This patch includes two sets of things against test10: First, there are several places where schedule() is called after wakeup_bdflush(1) is called. This is completely unnecessary, since wakeup_bdflush(1) already gave up the control, and when the control is returned to the calling thread who called wakeup_bdflush(1), it should just go on. Calling schedule() after wakeup_bdflush(1) will make the calling thread give up control again. This is a problem for some of those latency sensitive benchmarks (like SPEC SFS) and applications. Second, (I have posted this to the kernel mailing list, but I forgot to cc to Linus.) I made some optimizations on racache in nfsd in test10. The idea is to replace with existing fixed length table for readahead cache in NFSD with a hash table. The old racache is essentially ineffective in dealing with large # of files, and yet eats CPU cycles in scanning the table (even though the table is small), the hash table-based is much more effective and fast. I have generated the patch for test10 and tested it. (See attached file: a) Ying Chen [EMAIL PROTECTED] IBM Almaden Research Center a
Tracing files that opens.
Is there a nice way to trap on file open() and stat() ? That way i could have nice file statistics. Magnus -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Programmer/Networker [|] Magnus Naeslund PGP Key: http://www.genline.nu/mag_pgp.txt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: bzImage ~ 900K with i386 test11-pre2
Andrzej Krzysztofowicz wrote: > Except the simple boot loader. You cannot boot kernel >=1024KB directly > from floppy... That doesn't really matter much though... You have proceded beyond the 'simple' case. :) You can always use a tiny bootloader like hpa's syslinux. I am currently typing on a kernel booted from a standard 3 1/2" floppy: > [jgarzik@rum linux_2_4]$ make bzImage > [...] > System is 1612 kB > [jgarzik@rum g]$ dmesg|less > [...] > Memory: 124388k/131060k available (2876k kernel code, 6284k reserved, 367k data, >448k init, 0k highmem) (...with /dev/fd0u1722, 1.44M floppies becomes 1.722M floppies...) -- Jeff Garzik | Building 1024 | Would you like a Twinkie? MandrakeSoft| - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/