* [Bluez-users] itec CF dongle and PCMCIA reduction
From: Michal Semler (volny.cz) @ 2004-01-25 21:15 UTC (permalink / raw)
To: Bluez-users
Hi,
in one shop in Czech Republic, there they have very cheap BT CF card from
iTec.
This card has CF<->PCMCIA reduction.
Will this work with BlueZ?
Michal
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply
* Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - SOLVED
From: Andrew Morton @ 2004-01-25 21:11 UTC (permalink / raw)
To: Andi Kleen; +Cc: bunk, cova, eric, linux-kernel
In-Reply-To: <20040125174837.GB16962@colin2.muc.de>
Andi Kleen <ak@muc.de> wrote:
>
> > It seems use-funit-at-a-time breaks with distributions shipping a gcc
> > 3.3 that supports -funit-at-a-time.
>
> It works for me with the hammer branch gcc 3.3 with -funit-at-a-time.
>
> Are you sure the exception table sorting patch was properly applied?
I'd say so. There are no extable patches in current -mm.
> > Th patch below replaces use-funit-at-a-time.patch and uses
> > scripts/gcc-version.sh from add-config-for-mregparm-3-ng* to use
> > -funit-at-a-time only with gcc >= 3.4 .
>
> I disagree with that change.
Well there doesn't seem much doubt that -funit-at-a-time causes Fabio's
kernel to fail. Do we know exactly which compiler he is using?
^ permalink raw reply
* Re: Re: ice1712 driver broken in 2.6.1-mm kernels
From: Tommi Sakari Uimonen @ 2004-01-25 20:59 UTC (permalink / raw)
To: Torrey Hoffman; +Cc: ALSA Development
In-Reply-To: <Pine.OSF.4.58.0401230051410.447402@kosh.hut.fi>
> > The one problem is I still can't play different wave files
> > simultaneously through the two outputs.
> >
> > If I start "aplay -D maudio_spdif 12.wav &" and then try to do "aplay -D
> > plug:maudio_analog 11.wav" at the same time, the second one just blocks
> > until the first one is done.
> >
> > This is unfortunate, since I'd really like to be able to run two-room
> > sound from my computer into different amplifiers and speakers. I'm sure
> > there's a way to do it, since the hardware is capable of it...
Now after thinking this, I think ecasound is the right tool for this.
Create a device to .asoundrc: (with correct card number of course)
pcm.2496_4ch
{
type plug
ttable.0.0 1
ttable.1.1 1
ttable.2.8 1
ttable.3.9 1
slave.pcm {
type hw
card 0
device 0
}
}
Then use ecasound with this device, and take input from two sources and
send them to the appropriate channels, first input to channels 1&2, second
to channels 3&4.
I don't know the right way to do this, but I know that it can be done.
Since ecasound can split 4 channel wav to separate channels, I don't see
why it wouldn't join two stereo samples to one 4 channel sample.
Maybe you'll have to ask this from ecasound-list
http://www.eca.cx/mlists.html
Tommi
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply
* Re: TR: SiI2112 + Seagate + nFroce2: no DMA!
From: Emmanuel Hislen @ 2004-01-25 20:52 UTC (permalink / raw)
To: hrm; +Cc: linux-kernel
In-Reply-To: <IEEHKGFDFPBODOHJKGLIEEILCAAA.hislen@mindspring.com>
Hi again,
Here's a more complete report on this issue.
-1-
Going to Fedora Core 12.4.22-1.2115.nptl fixed the DMA issue. The
Seagate SATA drive (ST3160023AS) came up in DMA mode.
The speed however (hdparm -t) was 25MB/s, better but still unacceptable.
-2-
I got the latest Fedora Core: 2.4.22-1.2149.nptl
Interestingly enough I found out that this release comes with a sata_sil
module that is not even in 2.4.24, it was probably ported from 2.6.1 by
the Fedora team.
Anyway I believe this is just a RAID driver, it did not change anything
(same as -1-).
-3-
Now I decided to live dangerously and I tried tuning max_kb_per_request,
the default being 15:
/echo "max_kb_per_request:128" > /proc/ide/hde/settings/
On my first hdparm -t I got 55MB/s !!!
BUT the drive was still making a lot of noise after I got the results,
and every time I tried the command again (only waiting a couple seconds
before retrying after I got the results), the throughput went lower each
time. In 5 retries I was at 7 MB/s. The drive was very noisy, still busy
minutes after I was done torturing him.
Unfortunately this did not come as a surprise as I had found the
following thread on Google:
> Andre Hedrick wrote:
>
> />/
> />Seagate and Silicon Image are the only two player (well intel now)
> who did/
> />their own PHY. They did not use the Marvel pairs./
> />/
> />It is a function of possible ECC on the wire and the relation to the/
> />segments in the PIO or SG operations. It is a FIFO issue based on
> 512byte/
> />boundaries being breached on corner cases./
> />/
> />The data on the wire is in 8K units./
> />/
> />It is a 7.5K + 0.5K corner case./
> />/
> />max_kb_per_request:15 == 7.5K/
> />/
> />This prevents this corner case until I can code the proper special
> case SG/
> />table./
> />/
> />drive->id->hwconfig |= 0x6000;/
> />/
> />Is needed to fake the driver for device side cable detect./
> />There are several issues and I have not had time to keep up./
-3-
The same machine is now dual boot with Windows 2000 SP4. I installed
Sandra 2004, a software for benchmnarking, and I got the following
results regarding the SATA drive:
Buffered Read: 83 MB/s
Sequential Read: 48 MB/s
Random Read: 8 MB/s
Buffered write: 68 MB/s
Sequential write: 48 MB/s
Random write: 9 MB/s
I know, comparing results obtained with 2 different benchmarking
products is almost irrelevant, but it is enough for the big picture:
There is nothing wrong with the harsware (Seagate or Silicon Image), it
works just fine with the windows drivers/libraries ... Oops did I just
praise microsoft?
-4-
I compiled/installed a new linux kernel to replace the one from the
Fedora distrib with 2.4.24
Absolutely no difference, same as -1-: 25 MB/s
-5-
Now I tried kernel 2.6.1: it is worse, it dropped to 14 MB/s !?!?!
I've seem several similar reports about 2.6.
-6-
So at this point I am ready to give up, and to simply buy a PATA drive.
However, after doing all the above (which is reported in chronological
order), I booted the latest Fedora Core: 2.4.22-1.2149.nptl again, and
decided to give another try to:
echo "max_kb_per_request:128" > /proc/ide/hde/settings
Now I have consistent 55 MB/s and no horrible noise from the drive, and
I let this run for 4 hours without any issue. Even typing the "hdparm
-Tt" commands one after another results are consistent.
What the heck is going on here (not that I don't appreciate things
working, but I'd like to understand)??? I can see only the following
possibilities:
- I was lucky, and it all depends on when you change
"max_kb_per_request" due to some race condition.
- going to 2.6.1, I upgraded 2 packages:
quota-tools: went from 3.06 to 3.10
procps: went from 2.0.17 to 3.1.15
I really don't see how this would change anything, but who knows...
- running the Win2000 benchmark with Sandra somehow did something to the
drive and/or the SATA controller, and they are now friends. Fishy...
Does anybody knows where the default 15kb is coming from for this drive?
How can I change this permanently? I mean other than than a hack rc
script running at init time...
I understand 2.6.1 is not using /proc/ide/hde/settings, how do I change
max_kb_per_request with this kernel?
Anyway I will make several more attempts with max_kb_per_request set to
128, to make sure it is really OK before enforcing it with a script
(anyway this script would have to be kernel-version specific, to keep a
back door).
Hope I haven't been too long and boring. Comments/suggestions are welcome.
Thanks for your help!
Emmanuel.
Emmanuel Hislen wrote:
>
> -----Message d'origine-----
> De : Emmanuel Hislen [mailto:hislen@mindspring.com]
> Envoye : Saturday, January 24, 2004 1:27 AM
> A : Hugo Mills
> Cc : linux-kernel@vger.kernel.org
> Objet : RE: SiI2112 + Seagate + nFroce2: no DMA!
>
>
>
> Hi Hugo,
>
> I have re-installed my machine with Fedora Core 1 (thinking a newer
> version
> than RH9 would make the jump to 2.4.24 or 2.6 easier), and this fixed the
> DMA issue :-)
>
> Now my SATA drive is running stable in UDMA6.
>
> However, performance is still way below expectations.
>
> I got a huge improvement: my disc read speed (hdparm -t) went from 1.3
> to 25
> MB/sec.
> This is still slower than my PATA drive on my 3 years old AMD 900 PC
> running
> Redhat 9.0 (around 35 MB/sec).
>
> Could you please let me know what you are getting so I know what to
> expect?
>
>
> My next step is to try 2.4.24 or 2.6.1 as you suggested, but googling
> around
> a little bit before I do so I found out a few worrying things:
>
> - people have reported a drop in performance on SATA in some 2.6 based
> kernel (2.6.0-test9), with reported speeds around 20MB/sec. Apparently
> there
> is no more way to tune max_kb_per_req in 2.6??
> - I have found reports that both ide and libdata libraries are limiting
> max_kb_per_req to 15 Kb specifically for Seagate drives. So It looks
> like I
> can't even set it to 128 (I did not even try as I saw reports of memory
> corruption).
>
> So basically since you've got it to work I'd like to know:
>
> * what speed you get, and what is the RPM of your Seagate
> * what is your max_kb_per_req setting (I have 15K)
> * what is your accoustic management setting (I have 0)
>
>
> I could not fix the time on linux so I am sending this mail from WinXP
> (just
> kidding I lost my mails on the linux machine after re-installing :-).
>
>
> Thanks,
>
>
> Emmanuel.
>
>
>
> -----Message d'origine-----
> De : Hugo Ranger Mills [mailto:hrm@carfax.org.uk]De la part de Hugo
> Mills
> Envoye : Tuesday, January 20, 2004 12:58 AM
> A : manu
> Cc : linux-kernel@vger.kernel.org
> Objet : Re: SiI2112 + Seagate + nFroce2: no DMA!
>
>
> On Tue, Dec 31, 2002 at 09:55:59PM -0800, manu wrote:
>
> Incidentally, did you know that the date on your computer is very,
> very wrong?
>
>> I'm about to give up on my SATA drive as I can't get it to work properly.
>> So I thought I may try asking the experts before falling back to PATA.
>>
>> I have seen many mails reporting the same issue, some of them 6-month
>> old:
>>
>> - SATA drive comes up in pio mode, not in dma
>> - trying to turn on dma with hdparm is a nightmare: I/O errors, crash
>> with data corruption... I tried both:
>>
>> hddarm -d1 /dev/hde
>>
>> and:
>>
>> hdparm -u1 -c3 -d1 -X66 /dev/hde
>>
>> crash in both cases :-((
>>
>>
>> Here's my equipment:
>>
>>
>> ABIT AN7 motherboard (nForce2 chipset, SiI3112 SATA controller)
>> AMD Athlon XP 2600+ (+ 512 DDR / 400 MHz)
>> SATA HD Seagate Barracuda 160 Gb
>>
>> The SATA HD is my only drive. The only thing connected to my IDE
>> controllers is a DVD/CD combo.
>>
>> Running Linux Redhat 9.0
>> kernel 2.4.20-28.9
>
> ^^^^^^^^^^^^^^^^^^
> This is your problem. There have been a number of bug-fixes to the
> SiI drivers since 2.4.20. Try it again with a newer kernel -- such as
> 2.4.24.
>
>> I've been googling for days now and could not come accross a solution,
>> on the contrary I came under the impression that the combination of
>> SiI3112 +and Seagate was doomed.
>
>
> Not so. I have a SiI3112 controller and a 120GiB Seagate drive, and
> they work very well together. I'm using 2.6.1, although 2.4.23 also
> worked well for me.
>
> [snip]
>
>> Isn't there a solution??
>>
>> I am willing to try patches of experimental code. At this point I am
>> looking at reinstalling everything on a PATA drive anyway, so I have
>> nothing to loose.
>
>
> Try using 2.4.24 or 2.6.1.
>
> Hugo.
>
> --
> === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
> PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
> --- All hope abandon, Ye who press Enter here. ---
>
>
^ permalink raw reply
* Re: Is there a way to keep the 2.6 kjournald from writing to idle disks? (to allow spin-downs)
From: Micha Feigin @ 2004-01-25 20:52 UTC (permalink / raw)
To: linux-kernel
In-Reply-To: <40140B0A.90707@isg.de>
On Sun, Jan 25, 2004 at 07:29:30PM +0100, Lutz Vieweg wrote:
> Hi everyone,
>
> I run a server that usually doesn't have to do anything on the local
> filesystems,
> it just needs to answer some requests and perform some computations in RAM.
>
> So I use the "hdparm -S 123" parameter setting to keep the (IDE) system
> disk from
> spinning unneccessarily.
>
> Alas, since an upgrade to kernel 2.6 and ext3 filesystem, I cannot find a
> way to
> let the harddisk spin down - I found out that "kjournald" writes a few
> blocks every
> few seconds.
>
> As I wouldn't like to downgrade to ext2: Is there any way to keep the 2.6
> kjournald
> from writing to idle disks?
>
> I cannot see a good reason why kjournald would write when there are no
> dirty buffers -
> but still it does.
>
There are two things to do. First you should mount the disk with the
noatime option.
The other thing is ext3 which is updating its journal every 5
seconds. I was told that laptop-mode was imported into 2.6 by now (I
think that it is in the main stream). Check the kernel docs there
should be some mount option to state the dirty time for the ext3
journal. The method changed since 2.4 so I don't remember the 2.6
option since I don't use it yet, sorry.
>
> Regards,
>
> Lutz Vieweg
>
>
> BTW: I used the following script to find the source of the write operations,
> just start it in one terminal, do a "sync" in another, then say
> "hdparm -y /dev/hda"
> and you can see that immediately or a few seconds later kjournald will
> enter the
> "D" state and wake up when the disk has spun up.
>
> -------------------------------------------------------------------------------------
> #!/usr/bin/tclsh
>
> cd /proc
>
>
> set stat_arr {
> pid
> comm
> state
> ppid
> process_group,
> session
> tty_nr
> tty_pgrp
> flags
> min_flt
> cmin_flt
> maj_flt
> cmaj_flt
> utime
> stime
> cutime
> cstime
> priority
> nice
> num_threads
> it_real_value
> start_time
> vsize
> rss
> RLIMIT_RSS
> start_code
> end_code
> start_stack
> esp
> eip
> pending_signals
> blocked_sigs
> sigign
> sigcatch
> wchan
> nswap
> cnswap
> exit_signal
> task_cpu
> rt_priorit
> policy
> }
>
> proc scan_stat {_pids _dat} {
> upvar $_dat dat
> upvar $_pids pids
> global stat_arr
>
> set pids [lsort -integer [glob {[0-9]*}]]
>
> foreach pid $pids {
> set in [open "$pid/stat" "r"]
> set l [gets $in]
> close $in
>
> set a [split $l " "]
>
> foreach x $a n $stat_arr {
> set dat($pid,$n) $x
> }
> }
> }
>
> #puts [array get dat]
>
> array set dat {}
> set pids {}
>
> scan_stat pids dat
>
> while {1} {
> after 1000
>
> array set new_dat {}
> set new_pids {}
>
> scan_stat new_pids new_dat
>
> foreach pid $new_pids {
> if {$pid != [pid]} {
> if {![info exists dat($pid,pid)]} {
> puts "new process $pid $new_dat($pid,comm)"
> } else {
> set somechange 0
> foreach a $stat_arr {
> if {$new_dat($pid,$a) != $dat($pid,$a)} {
> puts "$pid $new_dat($pid,comm)
> attribute '$a' from
> $dat($pid,$a) to $new_dat($pid,$a)"
> set somechange 1
> }
> }
> if {$somechange} {
> puts ""
> }
> }
> }
> }
>
> array set dat {}
> array set dat [array get new_dat]
> set pids $new_pids
> }
> -------------------------------------------------------------------------------------
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply
* Re: Samba
From: caszonyi @ 2004-01-25 20:47 UTC (permalink / raw)
To: Josh Lamb; +Cc: linux-newbie
In-Reply-To: <001301c3e361$36718cd0$6afea8c0@FAMILY>
On Sun, 25 Jan 2004, Josh Lamb wrote:
> Hello,
>
> I recently switched to linux because I was curious what else was out there
> and was very annoyed with windows's mismanaged multitasking. So I went and
> bought Slackware after trying knoppix for a short while. I know Slack is
> sometimes not recommended for newbies, but I think it is the best way to
> learn linux because it really forced me to learn new things.
>
> My question: Can you recommend any books that deal more with networking, I
see on this page
http://www.tldp.org/guides.html
Network administrator guide and
System administrator guide
> am having troubles trying to set up a Samba server? I also want to be able
> to set up Apache and BIND? OH, and one more, does anyone have a good text on
> using a good linux server to serve a lot of thin clients?
>
> thanks for your time
>
on
http://www.tldp.org
you will find a lot of usefull documentation about linux
>
> end
>
--
"A mouse is a device used to point at
the xterm you want to type in".
Kim Alm on a.s.r.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply
* Re: Problems with IDE CF
From: Marcelo Tosatti @ 2004-01-25 20:36 UTC (permalink / raw)
To: Joe Schmo; +Cc: linux-kernel
In-Reply-To: <20040122185646.93559.qmail@web20723.mail.yahoo.com>
On Thu, 22 Jan 2004, Joe Schmo wrote:
> Hi,
> We recently encountered a problem very similar to an
> old post in majordomo forum. We boot up a linux image
> written on a RiData 128mb CF card on IDE interface
> (hda), the kernel dumps these error messages on the
> screen:
>
> hda: CF-ATA, ATA Disk drive
> ide: Assuming 33 MHz system bus speed for PIO modes,
> override with idebus=xx
> hda: set_drive_speed_status status=0x51 { DriveReady
> SeekComplete Error }
> hda: set_drive_speed_status error=0x04 { Drive Status
> Error }
> ...
> hda: dma_intr: status=0x51 { DriveReady SeekComplete
> Error }
> hda: dma_intr: error=0x04 { Drive Status Error }
> ...
> hda: DMA disabled
> ...
> hda: lost interrupt
> hda: lost interrupt
> hda: lost interrupt
Turn off DMA. SanDisk's SDCFB are known to have problems with DMA.
^ permalink raw reply
* Sun Sparc questions....
From: Mark Acierno @ 2004-01-25 20:45 UTC (permalink / raw)
To: linux-hams
I have two Suns that I have recently "acquired" one is a Sparc 20 the
other an ultrasparc 2 creator. I have gotten Debian linux up and
running on both but I have questions about using one (either) for
packet work.... after lurking here for the past few weeks it seems as
though most users here have PCs running linux. Is anyone here familiar
with the Sparcstation??
thanx
mark
n2uem
^ permalink raw reply
* Re: snd-intel8x0 and 2.6.2-rc1-mm3
From: Joshua Kwan @ 2004-01-25 20:42 UTC (permalink / raw)
To: linux-kernel
In-Reply-To: <20040125174647.087087b5@EozVul.WORKGROUP>
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
On Sun, Jan 25, 2004 at 05:46:47PM +0000, DaMouse Networks wrote:
> Hey all,
> I recently upgraded to 2.6.2-rc1-mm3 and now I can't here anything via the snd-intel8x0 module, it worked perfectly in 2.6.2-rc1 vanilla. I tested to see if it was a speaker glitch by hooking up another sound card which worked fine, any ideas?
There seem to be a number of issues with intel8x0 in ALSA 1.0.1, which
is included in 2.6.2-rc1-mm3. For now I've just reverted alsa-101.patch
in my local tree so I can use the old ALSA.
--
Joshua Kwan
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply
* Re: Troubles Compiling 2.6.1 on SuSE 9
From: Marco Rebsamen @ 2004-01-25 20:43 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
In-Reply-To: <20040125195500.GB5810@mars.ravnborg.org>
Am Sonntag, 25. Januar 2004 20:55 schrieben Sie:
> > I get many messages:
> > modprobe: modprobe: Can't open dependencies file /lib/
> > modules/2.4.21-99-default/modules.dep (no such file or dir.)
>
> Strange, you are building a 2.6 kernel.
> Did you execute this as root?
>
> Sam
originaly i read this on the Kernelmessages console (alt+F10)
but i also tried it as root.... the same...
i've never installed the default kernel. The athlond kernel was installed from
the beginning. If i make a symlink in this folder that points to the
modules.dep in the 2.6.1 dir. then it works. But i guess that isn't a clean
solution.....
fu*** suse or stupid user ?? :-P
^ permalink raw reply
* Re: [PATCH] aha1542: queuecommand: change panic() to return
From: Randy.Dunlap @ 2004-01-25 20:36 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
In-Reply-To: <1075059252.3909.11.camel@mulgrave>
On 25 Jan 2004 13:34:11 -0600 James Bottomley <James.Bottomley@steeleye.com> wrote:
| On Sun, 2004-01-25 at 00:00, Randy.Dunlap wrote:
| > cptr = (struct chain *) SCpnt->host_scribble;
| > if (cptr == NULL)
| > - panic("aha1542.c: unable to allocate DMA memory\n");
| > + return 1;
| > for (i = 0; i < SCpnt->use_sg; i++) {
| > if (sgpnt[i].length == 0 || SCpnt->use_sg > 16 ||
|
| This is really not right. If you look, the driver has already claimed a
| cdb for the command, so it will leak scarce resources in this error
| path.
|
| Also a better return might be SCSI_MLQUEUE_HOST_BUSY, since this would
| be a global resource shortage for all commands.
Ah, an opportunity to update scsi_mid_low_api.txt also... (queued for later).
OK, here's a corrected patch. Comments on it?
Thanks,
--
~Randy
From: Timmy Yee <shoujun@masterofpi.org>
Hi,
The aha1542 driver calls panic() if kmalloc() fails, which it shouldn't
do. This patch changes that by having the code return a nonzero value, so
it tells the SCSI mid-layer to retry the command, as suggested by Randy.
diffstat:=
drivers/scsi/aha1542.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff -Naurp ./drivers/scsi/aha1542.c~qcommand_err ./drivers/scsi/aha1542.c
--- ./drivers/scsi/aha1542.c~qcommand_err 2004-01-08 22:59:42.000000000 -0800
+++ ./drivers/scsi/aha1542.c 2004-01-25 12:31:07.000000000 -0800
@@ -707,8 +707,11 @@ static int aha1542_queuecommand(Scsi_Cmn
SCpnt->host_scribble = (unsigned char *) kmalloc(512, GFP_DMA);
sgpnt = (struct scatterlist *) SCpnt->request_buffer;
cptr = (struct chain *) SCpnt->host_scribble;
- if (cptr == NULL)
- panic("aha1542.c: unable to allocate DMA memory\n");
+ if (cptr == NULL) {
+ /* free the claimed mailbox slot */
+ HOSTDATA(SCpnt->device->host)->SCint[mbo] = NULL;
+ return SCSI_MLQUEUE_HOST_BUSY;
+ }
for (i = 0; i < SCpnt->use_sg; i++) {
if (sgpnt[i].length == 0 || SCpnt->use_sg > 16 ||
(((int) sgpnt[i].offset) & 1) || (sgpnt[i].length & 1)) {
^ permalink raw reply
* Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - SOLVED
From: John Stoffel @ 2004-01-25 20:37 UTC (permalink / raw)
To: Andi Kleen
Cc: John Stoffel, Valdis.Kletnieks, Adrian Bunk, Fabio Coatti,
Andrew Morton, Eric, linux-kernel
In-Reply-To: <20040125202557.GD16962@colin2.muc.de>
Andi> On Sun, Jan 25, 2004 at 03:21:04PM -0500, John Stoffel wrote:
>>
Andi> The latest bk tree (post 2.6.2rc1) has a full solution that
Andi> should cover all architectures.
>>
>> Can you post your patch please? I've been running into this too. I'm
>> compiling 2.6.2-rc1-mm3 right now after having commented out the
Andi> It should be in there already.
It's not in there, since my Makefile had the -funit-at-a-time stuff,
which I've now commented out. Still compiling, and waiting to do
areboot to test it out.
>> -funit-at-a-time in Makefile. I'm running gcc 3.3.3 on Debian with
>> the stable/unstable/testing branches.
Andi> Did you actually have problems?
Sure, the darn thing wouldn't boot, it kept Oopsing with the
test_wp_bit oops (that I just posted more details about).
More confirmation as I get it.
John
^ permalink raw reply
* Re: 2.4.25pre7 - cannot mount 128MB vfat fs on Minolta camera
From: Marc Mongenet @ 2004-01-25 20:36 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: linux-kernel
In-Reply-To: <87isiz3luw.fsf@devron.myhome.or.jp>
OGAWA Hirofumi wrote:
> Hi,
>
> Is this known problem? Any idea?
>
> Thanks.
>
> Marc Mongenet <Marc.Mongenet@freesurf.ch> writes:
Thanks for your help.
Note that the sd_mod reload trick from Måns Rullgård works (is it safe?).
The scsiadd trick from Philip Dodd works when the CD-ROM is not attached.
Sorry for not replying directly, I am not subscribed to lkml.
Marc Mongenet
^ permalink raw reply
* Re: 2.6.2-rc1-mm2 kernel oops
From: Sid Boyce @ 2004-01-25 20:34 UTC (permalink / raw)
To: linux-kernel; +Cc: John Stoffel
In-Reply-To: <16404.8968.349900.566999@gargle.gargle.HOWL>
John Stoffel wrote:
> Sid> Andrew Morton wrote:
> Sid> Sid Boyce <sboyce@xxxxxxxxxxxxxxxx> wrote:
>
>>>>I get this on bootup, Athlon XP2200+
>>>>=====================================
>>>>Linux version 2.6.2-rc1-mm2 (root@barrabas) (gcc version 3.3.1 (SuSE
>>>>...
>>>>EIP is at test_wp_bit+0x36/0x90
>
>
>>>oh crap, why does this thing keep breaking? Please send your .config
>>>over,
>>>thanks.
>
>
> Sid> Linus aslso asked if 2.6.2-rc1 work -- I shall build it
> Sid> shortly. I also get the same error with 2.6.2-rc1-mm3.
>
> It doesn't work for me here, I started with 2.6.2-rc1 and moved up
> through mm1 and mm3, all either hind on boot (after the uncompressing
> message) or crashed with the test_wp_bit Oops that seems to be going
> around.
>
> 2.6.1-mm4 is the last stable version that works for me.
>
> John
> John Stoffel - Senior Unix Systems Administrator - Lucent Technologies
> stoffel@lucent.com - http://www.lucent.com - 978-952-7548
>
See my previous post, I just commented out the line that Adrian Bunk
asked me to remove and it's now up and running.
Regards
Sid.
--
Sid Boyce .... Hamradio G3VBV and keen Flyer
Linux Only Shop.
^ permalink raw reply
* Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - SOLVED
From: Andi Kleen @ 2004-01-25 20:25 UTC (permalink / raw)
To: John Stoffel
Cc: Andi Kleen, Valdis.Kletnieks, Adrian Bunk, Fabio Coatti,
Andrew Morton, Eric, linux-kernel
In-Reply-To: <16404.9520.764788.21497@gargle.gargle.HOWL>
On Sun, Jan 25, 2004 at 03:21:04PM -0500, John Stoffel wrote:
>
> Andi> The latest bk tree (post 2.6.2rc1) has a full solution that
> Andi> should cover all architectures.
>
> Can you post your patch please? I've been running into this too. I'm
> compiling 2.6.2-rc1-mm3 right now after having commented out the
It should be in there already.
> -funit-at-a-time in Makefile. I'm running gcc 3.3.3 on Debian with
> the stable/unstable/testing branches.
Did you actually have problems?
-Andi
^ permalink raw reply
* Re: [RFC/PATCH] IMQ port to 2.6
From: Patrick McHardy @ 2004-01-25 20:23 UTC (permalink / raw)
To: David S. Miller; +Cc: sebek64, linux-kernel, netdev
In-Reply-To: <20040125.112542.10303353.davem@redhat.com>
David S. Miller wrote:
> From: sebek64@post.cz (Marcel Sebek)
> Date: Sun, 25 Jan 2004 16:24:19 +0100
>
> I have ported IMQ driver from 2.4 to 2.6.2-rc1.
>
> Original version was from http://trash.net/~kaber/imq/.
>
> Patrick, do you mind if I merge this 2.6.x port into my tree?
>
Please don't. The imq device is buggy, it crashes when used
for ingress and egress at the same time, additionally it's
unmaintained since one or two years. The lartc list is full
of bugreports. Some users that depend on the functionality
are working on a better implementation, I'd suggest to wait
until then.
Best regards,
Patrick
^ permalink raw reply
* Re: 2.6.2-rc1-mm2 kernel oops
From: Sid Boyce @ 2004-01-25 20:21 UTC (permalink / raw)
To: linux-kernel
> Adrian Bunk wrote:
> On Sun, Jan 25, 2004 at 03:14:51PM +0000, Sid Boyce wrote:
> >> Linus Torvalds wrote:
> > > > Problems with the exception table sorting?
> > > >
> > > > Does plain 2.6.2-rc1 work?
> >> 2.6.2-rc1 works fine.
>
> > Could you back out ("patch -p1 -R < ..." or manually remove the lines)
> > the patch below and retry 2.6.2-rc1-mm2?
>
>
>
> > TIA
> > Adrian
>
>
> > --- 25/Makefile~use-funit-at-a-time 2004-01-14 00:56:05.000000000 -0800
> > +++ 25-akpm/Makefile 2004-01-14 00:56:05.000000000 -0800
> > @@ -445,6 +445,10 @@ ifdef CONFIG_DEBUG_INFO
> > CFLAGS += -g
> > endif
>
> > +# Enable unit-at-a-time mode when possible. It shrinks the
> > +# kernel considerably.
> > +CFLAGS += $(call check_gcc,-funit-at-a-time,)
> > +
> > # warn about C99 declaration after statement
> > CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
I commented out the line below. 2.6.2-rc1-mm3 is now up and running,
thanks.
CFLAGS += $(call check_gcc,-funit-at-a-time,)
Regards
Sid.
--
Sid Boyce .... Hamradio G3VBV and keen Flyer
Linux Only Shop.
^ permalink raw reply
* Re: [RFC/PATCH] IMQ port to 2.6
From: Vladimir B. Savkin @ 2004-01-25 20:21 UTC (permalink / raw)
To: jamal; +Cc: linux-kernel, netdev
In-Reply-To: <1075058539.1747.92.camel@jzny.localdomain>
On Sun, Jan 25, 2004 at 02:22:19PM -0500, jamal wrote:
>
> There has been no real good reason as to why IMQ is needed to begin
> with. It may be easy to use and has been highly publized (which is
> always a dangerous thing in Linux).
>
> Maybe lets take a step back and see how people use it. How and why do
> you use IMQ? Is this because you couldnt use the ingress qdisc?
Think multiple clients connected via PPP. I want to shape traffic,
so ingress is out of question. I want different clients in a same
htb class, so using qdisc on each ppp interface is out of
question. It seems to me that IMQ is the only way to achieve my goals.
> Note, the abstraction to begin with is in the wrong place - it sure is
> an easy and nice looking hack. So is the current ingress qdisc, but we
> are laying that to rest with TC extensions.
>
>
~
:wq
With best regards,
Vladimir Savkin.
^ permalink raw reply
* Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - SOLVED
From: John Stoffel @ 2004-01-25 20:21 UTC (permalink / raw)
To: Andi Kleen
Cc: Valdis.Kletnieks, Adrian Bunk, Fabio Coatti, Andrew Morton, Eric,
linux-kernel
In-Reply-To: <20040125191232.GC16962@colin2.muc.de>
Andi> The latest bk tree (post 2.6.2rc1) has a full solution that
Andi> should cover all architectures.
Can you post your patch please? I've been running into this too. I'm
compiling 2.6.2-rc1-mm3 right now after having commented out the
-funit-at-a-time in Makefile. I'm running gcc 3.3.3 on Debian with
the stable/unstable/testing branches.
Of course I posted my email before I read the entire rest of the chain
of messages on this.
Thanks,
John
^ permalink raw reply
* Re: PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core
From: viro @ 2004-01-25 20:21 UTC (permalink / raw)
To: Linus Torvalds
Cc: Alan Stern, Greg KH, Kernel development list, Patrick Mochel
In-Reply-To: <Pine.LNX.4.58.0401251054340.18932@home.osdl.org>
On Sun, Jan 25, 2004 at 11:02:58AM -0800, Linus Torvalds wrote:
> The proper thing to do (and what we _have_ done) is to say "unloading of
> modules is not supported". It's a debugging feature, and you literally
> shouldn't do it unless you are actively developing that module.
>
> Sadly, some modules are broken. Old 16-bit PCMCIA in particular _depends_
> on unloading modules, since the old PCMCIA layer doesn't do hotplug: it
> literally thinks of module load/unload as the "plug/unplug" event.
>
> But it basically boils down to: don't think of module unload as a "normal
> event". It isn't. Getting it truly right is (a) too painful and (b) would
> be too slow, so we're not even going to try.
>
> (As an example of "too painful, too slow", think of something like a
> packet filter module. You'd literally have to increment the count in every
> part that gets a packet, and decrement the count at every point where it
> lets the packet go. And since it would have to be SMP-safe, it would have
> to be a locked cycle, or we'd have to have per-CPU counters - at which
> point you now also have to worry about things like preemption and
> sleeping, which just means that it would be a _lot_ of very fragile code).
Packet filter is hardly a normal module. For absolute majority of modules
it's nowhere near that bad.
HOWEVER, module unload is not the real problem. We have objects with
limited lifetimes. Always had, always will. Whether we remove pieces
of .text from the in-core kernel or not, we must be able to deal with
that. Even if methods themselves are present, they won't do you any
good when data structures belonging to object are destroyed.
If that is handled right, rmmod is trivial for 99% of modules. The
rest (including Rusty's stuff) can simply say "we can't be unloaded
at all" and be done with that.
Basically, "protect the module" is wrong - it should be "protect specific
object" and we need that anyway. We already have that for the largest
class of modules - 300-odd netdev ones. We have that for filesystems.
We have that for block devices. We have infrastructure for doing that
to character devices, ttys and ldiscs. Which leaves us with truly weird
stuff that doesn't work in such terms and yes, there your arguments
apply.
Frankly, I'm much more concerned about the stuff that _can't_ be disabled.
You can disable module unloading; hell, you can disable modules completely.
You can't disable ifdown(8). Which currently means very bad things for
stuff in /proc/sys/net/ipv4/{conf,neigh}/*. And all arguments re rmmod
deadlocks apply to that sort of situations...
^ permalink raw reply
* Re: 2.6.2-rc1-mm2 kernel oops
From: John Stoffel @ 2004-01-25 20:11 UTC (permalink / raw)
To: Sid Boyce; +Cc: linux-kernel
In-Reply-To: <4013D0AA.8060906@blueyonder.co.uk>
Sid> Andrew Morton wrote:
Sid> Sid Boyce <sboyce@xxxxxxxxxxxxxxxx> wrote:
>>>
>>> I get this on bootup, Athlon XP2200+
>>> =====================================
>>> Linux version 2.6.2-rc1-mm2 (root@barrabas) (gcc version 3.3.1 (SuSE
>>> ...
>>> EIP is at test_wp_bit+0x36/0x90
>> oh crap, why does this thing keep breaking? Please send your .config
>> over,
>> thanks.
Sid> Linus aslso asked if 2.6.2-rc1 work -- I shall build it
Sid> shortly. I also get the same error with 2.6.2-rc1-mm3.
It doesn't work for me here, I started with 2.6.2-rc1 and moved up
through mm1 and mm3, all either hind on boot (after the uncompressing
message) or crashed with the test_wp_bit Oops that seems to be going
around.
2.6.1-mm4 is the last stable version that works for me.
John
John Stoffel - Senior Unix Systems Administrator - Lucent Technologies
stoffel@lucent.com - http://www.lucent.com - 978-952-7548
^ permalink raw reply
* Re: 2.6.2-rc1-bk3 patch fails
From: Daniel Andersen @ 2004-01-25 20:06 UTC (permalink / raw)
To: Mike Keehan; +Cc: linux-kernel
In-Reply-To: <20040125194329.59773.qmail@web12304.mail.yahoo.com>
> Applying the above patch to 2.6.1 gets failure in:-
>
> . Makefile
> . arch/i386/kernel/cpu/mcheck/non-fatal.c
> . drivers/cdrom/cdrom.c
> . drivers/input/joydev.c
> . drivers/input/keyboard/atkbd.c
> . drivers/md/Kconfig
> . drivers/md/raid6.h (doesn't exist)
>
> I control C'd out of the rest. The BK snapshots on
> kernel.org aren't meant to be applied cumulatively,
> are they?
You must apply the 2.6.2-rc1 patch first. Then you can patch with -bk3.
Daniel Andersen
^ permalink raw reply
* [patch] udevd - cleanup and better timeout handling
From: Kay Sievers @ 2004-01-25 20:03 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
Here is the next revision for udevd:
o Small cleanups all over the place.
o Swich to the usual linked list format "list.h".
o Better timeout handling.
We store a timestamp in in every queued event, so we don't wait longer
than the timeout specified, if the hole in the list is not shrinking.
o ignore udevd target if klibc is used
The code is getting better, but we have still major flaws:
1. We are much too slow.
We want to exec the real udev in the background, but a 'remove'
is much much faster than a 'add', so we have a problem.
Question: is it neccessary to order events for different devpath's?
If no, we may wait_pid() for the exec only if we have another udev
working on the same devpath.
2. Which sequence is the first one?
The automatic exit of the daemon, if we have nothing to do, has the
disadvantage of not knowing if the first incoming seqnum is really
the first one.
So we need to delay the exec of the first exec a small amount of time,
to see if we get one with a smaller seqnum to exec before.
Or we simply never exit the daemon, and delay only the very first exec
after the start of the daemon.
Which way to go?
3. Switch away from ancient ipc to sockets?
We may want threads for this, but klibc doesn't support it.
Nevermind, the ipc stuff is also not supported :)
Any idea?
thanks,
Kay
[-- Attachment #2: 01-udevd.patch --]
[-- Type: text/plain, Size: 11477 bytes --]
diff -Nru a/Makefile b/Makefile
--- a/Makefile Sun Jan 25 20:57:21 2004
+++ b/Makefile Sun Jan 25 20:57:21 2004
@@ -147,17 +147,19 @@
-D__KLIBC__ -fno-builtin-printf
LIB_OBJS =
LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
+ UDEVD =
else
CRT0 =
LIBC =
CFLAGS += -I$(GCCINCDIR)
LIB_OBJS = -lc
LDFLAGS =
+ UDEVD = $(DAEMON) $(SENDER)
endif
CFLAGS += -I$(PWD)/libsysfs
-all: $(ROOT) $(DAEMON) $(SENDER)
+all: $(ROOT) $(UDEVD)
@extras="$(EXTRAS)" ; for target in $$extras ; do \
echo $$target ; \
$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
@@ -231,11 +233,11 @@
$(LD) $(LDFLAGS) -o $(ROOT) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
$(STRIPCMD) $(ROOT)
-$(DAEMON): $(ROOT) udevd.h udevd.o
+$(DAEMON): udevd.h udevd.o udevd.o logging.o
$(LD) $(LDFLAGS) -o $(DAEMON) $(CRT0) udevd.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
$(STRIPCMD) $(ROOT)
-$(SENDER): $(ROOT) udevd.h udevsend.o
+$(SENDER): udevd.h udevsend.o udevd.o logging.o
$(LD) $(LDFLAGS) -o $(SENDER) $(CRT0) udevsend.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
$(STRIPCMD) $(ROOT)
diff -Nru a/udevd.c b/udevd.c
--- a/udevd.c Sun Jan 25 20:57:21 2004
+++ b/udevd.c Sun Jan 25 20:57:21 2004
@@ -22,6 +22,7 @@
*
*/
+#include <stddef.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/wait.h>
@@ -32,29 +33,38 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <fcntl.h>
+#include "list.h"
#include "udev.h"
#include "udevd.h"
#include "logging.h"
#define BUFFER_SIZE 1024
-#define EVENT_TIMEOUT_SECONDS 10
-#define DAEMON_TIMEOUT_SECONDS 30
-
static int expect_seqnum = 0;
-static struct hotplug_msg *head = NULL;
+static int lock_file = -1;
+static char *lock_filename = ".udevd_lock";
+LIST_HEAD(msg_list);
-static void sig_alarmhandler(int signum)
+static void sig_handler(int signum)
{
dbg("caught signal %d", signum);
switch (signum) {
case SIGALRM:
dbg("event timeout reached");
break;
-
+ case SIGINT:
+ case SIGTERM:
+ case SIGKILL:
+ if (lock_file >= 0) {
+ close(lock_file);
+ unlink(lock_filename);
+ }
+ exit(20 + signum);
+ break;
default:
dbg("unhandled signal");
}
@@ -62,41 +72,32 @@
static void dump_queue(void)
{
- struct hotplug_msg *p;
- p = head;
+ struct hotplug_msg *msg;
- dbg("next expected sequence is %d", expect_seqnum);
- while(p != NULL) {
- dbg("sequence %d in queue", p->seqnum);
- p = p->next;
- }
+ list_for_each_entry(msg, &msg_list, list)
+ dbg("sequence %d in queue", msg->seqnum);
}
-static void dump_msg(struct hotplug_msg *pmsg)
+static void dump_msg(struct hotplug_msg *msg)
{
dbg("sequence %d, '%s', '%s', '%s'",
- pmsg->seqnum, pmsg->action, pmsg->devpath, pmsg->subsystem);
+ msg->seqnum, msg->action, msg->devpath, msg->subsystem);
}
-static int dispatch_msg(struct hotplug_msg *pmsg)
+static int dispatch_msg(struct hotplug_msg *msg)
{
pid_t pid;
- char *argv[3];
- extern char **environ;
- dump_msg(pmsg);
+ dump_msg(msg);
- setenv("ACTION", pmsg->action, 1);
- setenv("DEVPATH", pmsg->devpath, 1);
- argv[0] = DEFAULT_UDEV_EXEC;
- argv[1] = pmsg->subsystem;
- argv[2] = NULL;
+ setenv("ACTION", msg->action, 1);
+ setenv("DEVPATH", msg->devpath, 1);
pid = fork();
switch (pid) {
case 0:
/* child */
- execve(argv[0], argv, environ);
+ execl(UDEV_EXEC, "udev", msg->subsystem, NULL);
dbg("exec of child failed");
exit(1);
break;
@@ -104,108 +105,119 @@
dbg("fork of child failed");
return -1;
default:
- wait(0);
+ wait(NULL);
}
return 0;
}
-static void set_timer(int seconds)
+static void set_timeout(int seconds)
{
- signal(SIGALRM, sig_alarmhandler);
alarm(seconds);
+ dbg("set timeout in %d seconds", seconds);
}
static void check_queue(void)
{
- struct hotplug_msg *p;
- p = head;
-
- dump_queue();
- while(head != NULL && head->seqnum == expect_seqnum) {
- dispatch_msg(head);
+ struct hotplug_msg *msg;
+ struct hotplug_msg *tmp_msg;
+ time_t msg_age;
+
+recheck:
+ /* dispatch events until one is missing */
+ list_for_each_entry_safe(msg, tmp_msg, &msg_list, list) {
+ if (msg->seqnum != expect_seqnum)
+ break;
+ dispatch_msg(msg);
expect_seqnum++;
- p = head;
- head = head->next;
- free(p);
+ list_del_init(&msg->list);
+ free(msg);
+ }
+
+ /* recalculate timeout */
+ if (list_empty(&msg_list) == 0) {
+ msg_age = time(NULL) - msg->queue_time;
+ if (msg_age > EVENT_TIMEOUT_SECONDS-1) {
+ info("event %d, age %li seconds, skip event %d-%d",
+ msg->seqnum, msg_age, expect_seqnum, msg->seqnum-1);
+ expect_seqnum = msg->seqnum;
+ goto recheck;
+ }
+ set_timeout(EVENT_TIMEOUT_SECONDS - msg_age);
+ return;
}
- if (head != NULL)
- set_timer(EVENT_TIMEOUT_SECONDS);
- else
- set_timer(DAEMON_TIMEOUT_SECONDS);
+
+ /* queue is empty */
+ set_timeout(UDEVD_TIMEOUT_SECONDS);
}
-static void add_queue(struct hotplug_msg *pmsg)
+static int queue_msg(struct hotplug_msg *msg)
{
- struct hotplug_msg *pnewmsg;
- struct hotplug_msg *p;
- struct hotplug_msg *p1;
-
- p = head;
- p1 = NULL;
- pnewmsg = malloc(sizeof(struct hotplug_msg));
- *pnewmsg = *pmsg;
- pnewmsg->next = NULL;
- while(p != NULL && pmsg->seqnum > p->seqnum) {
- p1 = p;
- p = p->next;
- }
- pnewmsg->next = p;
- if (p1 == NULL) {
- head = pnewmsg;
- } else {
- p1->next = pnewmsg;
+ struct hotplug_msg *new_msg;
+ struct hotplug_msg *tmp_msg;
+
+ new_msg = malloc(sizeof(*new_msg));
+ if (new_msg == NULL) {
+ dbg("error malloc");
+ return -ENOMEM;
}
- dump_queue();
-}
+ memcpy(new_msg, msg, sizeof(*new_msg));
-static int lock_file = -1;
-static char *lock_filename = ".udevd_lock";
+ /* store timestamp of queuing */
+ new_msg->queue_time = time(NULL);
+
+ /* sort message by sequence number into list*/
+ list_for_each_entry(tmp_msg, &msg_list, list)
+ if (tmp_msg->seqnum > new_msg->seqnum)
+ break;
+ list_add_tail(&new_msg->list, &tmp_msg->list);
+
+ return 0;
+}
-static int process_queue(void)
+static void work(void)
{
+ struct hotplug_msg *msg;
int msgid;
key_t key;
- struct hotplug_msg *pmsg;
char buf[BUFFER_SIZE];
int ret;
- key = ftok(DEFAULT_UDEVD_EXEC, IPC_KEY_ID);
- pmsg = (struct hotplug_msg *) buf;
+ key = ftok(UDEVD_EXEC, IPC_KEY_ID);
+ msg = (struct hotplug_msg *) buf;
msgid = msgget(key, IPC_CREAT);
if (msgid == -1) {
dbg("open message queue error");
- return -1;
+ exit(1);
}
while (1) {
ret = msgrcv(msgid, (struct msgbuf *) buf, BUFFER_SIZE-4, HOTPLUGMSGTYPE, 0);
if (ret != -1) {
- dbg("current sequence %d, expected sequence %d", pmsg->seqnum, expect_seqnum);
-
- /* init expected sequence with value from first call */
+ /* init the expected sequence with value from first call */
if (expect_seqnum == 0) {
- expect_seqnum = pmsg->seqnum;
+ expect_seqnum = msg->seqnum;
dbg("init next expected sequence number to %d", expect_seqnum);
}
-
- if (pmsg->seqnum > expect_seqnum) {
- add_queue(pmsg);
- set_timer(EVENT_TIMEOUT_SECONDS);
- } else {
- if (pmsg->seqnum == expect_seqnum) {
- dispatch_msg(pmsg);
- expect_seqnum++;
- check_queue();
- } else {
- dbg("timeout event for unexpected sequence number %d", pmsg->seqnum);
- }
+ dbg("current sequence %d, expected sequence %d", msg->seqnum, expect_seqnum);
+ if (msg->seqnum == expect_seqnum) {
+ /* execute expected event */
+ dispatch_msg(msg);
+ expect_seqnum++;
+ check_queue();
+ dump_queue();
+ continue;
}
+ if (msg->seqnum > expect_seqnum) {
+ /* something missing, queue event*/
+ queue_msg(msg);
+ check_queue();
+ dump_queue();
+ continue;
+ }
+ dbg("too late for event with sequence %d, even skipped ", msg->seqnum);
} else {
if (errno == EINTR) {
- if (head != NULL) {
- /* event timeout, skip all missing, proceed with next queued event */
- info("timeout reached, skip events %d - %d", expect_seqnum, head->seqnum-1);
- expect_seqnum = head->seqnum;
- } else {
+ /* timeout */
+ if (list_empty(&msg_list)) {
info("we have nothing to do, so daemon exits...");
if (lock_file >= 0) {
close(lock_file);
@@ -214,31 +226,12 @@
exit(0);
}
check_queue();
- } else {
- dbg("ipc message receive error '%s'", strerror(errno));
+ dump_queue();
+ continue;
}
+ dbg("ipc message receive error '%s'", strerror(errno));
}
}
- return 0;
-}
-
-static void sig_handler(int signum)
-{
- dbg("caught signal %d", signum);
- switch (signum) {
- case SIGINT:
- case SIGTERM:
- case SIGKILL:
- if (lock_file >= 0) {
- close(lock_file);
- unlink(lock_filename);
- }
- exit(20 + signum);
- break;
-
- default:
- dbg("unhandled signal");
- }
}
static int one_and_only(void)
@@ -249,18 +242,18 @@
/* see if we can open */
if (lock_file < 0)
- return -EINVAL;
+ return -1;
/* see if we can lock */
if (lockf(lock_file, F_TLOCK, 0) < 0) {
close(lock_file);
unlink(lock_filename);
- return -EINVAL;
+ return -1;
}
snprintf(string, sizeof(string), "%d\n", getpid());
write(lock_file, string, strlen(string));
-
+
return 0;
}
@@ -274,11 +267,11 @@
signal(SIGINT, sig_handler);
signal(SIGTERM, sig_handler);
signal(SIGKILL, sig_handler);
+ signal(SIGALRM, sig_handler);
/* we exit if we have nothing to do, next event will start us again */
- set_timer(DAEMON_TIMEOUT_SECONDS);
+ set_timeout(UDEVD_TIMEOUT_SECONDS);
- /* main loop */
- process_queue();
- return 0;
+ work();
+ exit(0);
}
diff -Nru a/udevd.h b/udevd.h
--- a/udevd.h Sun Jan 25 20:57:21 2004
+++ b/udevd.h Sun Jan 25 20:57:21 2004
@@ -21,17 +21,22 @@
*
*/
-#define DEFAULT_UDEV_EXEC "./udev"
-#define DEFAULT_UDEVD_EXEC "./udevd"
+#include "list.h"
-#define IPC_KEY_ID 0
-#define HOTPLUGMSGTYPE 44
+#define UDEV_EXEC "./udev"
+#define UDEVD_EXEC "./udevd"
+#define UDEVD_TIMEOUT_SECONDS 60
+#define EVENT_TIMEOUT_SECONDS 5
+
+#define IPC_KEY_ID 0
+#define HOTPLUGMSGTYPE 44
struct hotplug_msg {
long mtype;
- struct hotplug_msg *next;
+ struct list_head list;
int seqnum;
+ time_t queue_time;
char action[8];
char devpath[128];
char subsystem[16];
diff -Nru a/udevsend.c b/udevsend.c
--- a/udevsend.c Sun Jan 25 20:57:21 2004
+++ b/udevsend.c Sun Jan 25 20:57:21 2004
@@ -64,6 +64,7 @@
static int build_hotplugmsg(struct hotplug_msg *msg, char *action,
char *devpath, char *subsystem, int seqnum)
{
+ memset(msg, 0x00, sizeof(msg));
msg->mtype = HOTPLUGMSGTYPE;
msg->seqnum = seqnum;
strncpy(msg->action, action, 8);
@@ -85,7 +86,8 @@
switch (child_pid) {
case 0:
/* daemon */
- execl(DEFAULT_UDEVD_EXEC, NULL);
+ setsid();
+ execl(UDEVD_EXEC, "udevd", NULL);
dbg("exec of daemon failed");
exit(1);
case -1:
@@ -99,7 +101,7 @@
dbg("fork of helper failed");
return -1;
default:
- wait(0);
+ wait(NULL);
}
return 0;
}
@@ -147,7 +149,7 @@
seq = atoi(seqnum);
/* create ipc message queue or get id of our existing one */
- key = ftok(DEFAULT_UDEVD_EXEC, IPC_KEY_ID);
+ key = ftok(UDEVD_EXEC, IPC_KEY_ID);
size = build_hotplugmsg(&message, action, devpath, subsystem, seq);
msgid = msgget(key, IPC_CREAT);
if (msgid == -1) {
@@ -165,7 +167,7 @@
/* get state of ipc queue */
tspec.tv_sec = 0;
tspec.tv_nsec = 10000000; /* 10 millisec */
- loop = 20;
+ loop = 30;
while (loop--) {
retval = msgctl(msgid, IPC_STAT, &msg_queue);
if (retval == -1) {
^ permalink raw reply
* packet/soundmodem questions
From: Douglas Cole @ 2004-01-25 19:59 UTC (permalink / raw)
To: linux-hams
Have been following the list for a while now and got interested in the
soundmodem thread...
I too would like to get soundmodem up and running so as to be able to run 1200
baud packet from my laptop (IBM thinkpad T23) and have done a small amount of
searching but have not found any documentation on soundmodem, or at least so
little that it leaves me wondering how to make things work...
So my question is, is there a website or a how-to/info page/man page that
would help a newcomer to Linux AX25 packet and soundmodem?
I finally figured out that you have to be running an X session as root to run
soundmodemconfig and so I think I got a config file created, but am not sure
what to do next as far as running as a regular user to allow me to connect to
another packet station etc.
I used to use the AEA "PCPackratt" software that came with my PK900 when I had
that but have since sold it a number of years back when my interest in packet
had waned, but now as I don't run M$ products at home anymore and this thread
had sparked my interest again I am at a loss as to whether or not there is a
similar program that gives the same functionality ?
FWIW I am running SuSE 8.2pro on the Thinkpad and it runs great.
Sorry if I am missing something obvious and tia for any help that comes my way
:^)
Douglas Cole N7BFS
Spokane IRLP node 3250 owner
AMSAT#26182 , K2 # 544
http://www.users.qwest.net/~cdoug3
Registered Linux user # 188922
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
^ permalink raw reply
* Re: [ANNOUNCE] Cooperative Linux
From: Karim Yaghmour @ 2004-01-25 20:01 UTC (permalink / raw)
To: Dan Aloni; +Cc: Linux Kernel List
In-Reply-To: <20040125193518.GA32013@callisto.yi.org>
Dan Aloni wrote:
> The bottom line is that it allows us to run Linux on an unmodified
> Windows 2000/XP system in a practical way (the user just launches
> an app), and it may eventually bring Linux to a large sector of desktop
> computer users who wouldn't even care about trying to install a
> dual boot system or boot a Linux live CD (like Knoppix).
>
> Screen-shots and further details at:
>
> http://www.colinux.org
Cool!
> Our motto is:
>
> "If Linux runs on every architecture, why should another
> operating system be in its way?"
Indeed.
> coLinux is similar to plex86 in a way that it implements a Linux-specific
> lightweight VM with I/O virtualization. However, it is designed to be
> mostly host-OS independent, so that with minimal porting efforts it
> would be possible to run it under Solaris, Linux itself, or any operating
> system that supports loading kernel drivers, under any architecture that
> uses an MMU. Unlike other virtualization methods, it doesn't base its
> implementation on exceptions that are caused by instructions.
Right, that's the way to go with an OS for which the source is available.
Have you looked at the work that's been going on with the Adeos nanokernel:
http://www.opersys.com/adeos/index.html
Some of the infrastructure required by all these virtualization solutions
is fairly similar.
Karim
--
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim@opersys.com || 1-866-677-4546
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.