* [PATCH] aha152x fix
@ 2002-07-16 21:10 Filip Van Raemdonck
2002-07-16 23:00 ` Alan Cox
0 siblings, 1 reply; 8+ messages in thread
From: Filip Van Raemdonck @ 2002-07-16 21:10 UTC (permalink / raw)
To: linux-kernel; +Cc: fischer, marcelo
Hi,
I upgraded from 2.4.19-pre7 to -rc1 and this resulted in my aha152x card not
working anymore. (The error was "trying software interrupt, lost")
Below is a patch which makes it work again. Note that this is just reverting
a minimal part of the last applied patch to aha152x.c; so this may only be
fixing the symptom and not the problem.
Can somebody confirm if this is correct or not, and give some more insight
into this behaviour?
Regards,
Filip
--- aha152x.c.orig Tue Jul 16 22:20:57 2002
+++ aha152x.c Tue Jul 16 21:43:51 2002
@@ -1366,11 +1366,13 @@
}
HOSTDATA(shpnt)->swint = 0;
printk(KERN_INFO "aha152x%d: trying software interrupt, ", HOSTNO);
SETPORT(DMACNTRL0, SWINT|INTEN);
+ spin_unlock_irq (&io_request_lock);
mdelay(1000);
+ spin_lock_irq (&io_request_lock);
free_irq(shpnt->irq, shpnt);
if (!HOSTDATA(shpnt)->swint) {
if (TESTHI(DMASTAT, INTSTAT)) {
printk("lost.\n");
--
"Microsoft shouldn't be broken up. It should be shut down."
-- Phil Agre on the ILOVEYOU virus.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] aha152x fix
2002-07-16 21:10 [PATCH] aha152x fix Filip Van Raemdonck
@ 2002-07-16 23:00 ` Alan Cox
2002-07-17 7:09 ` Filip Van Raemdonck
2002-07-17 8:02 ` Martin Diehl
0 siblings, 2 replies; 8+ messages in thread
From: Alan Cox @ 2002-07-16 23:00 UTC (permalink / raw)
To: Filip Van Raemdonck; +Cc: linux-kernel, fischer, Marcelo Tosatti
On Tue, 2002-07-16 at 22:10, Filip Van Raemdonck wrote:
> Hi,
>
> I upgraded from 2.4.19-pre7 to -rc1 and this resulted in my aha152x card not
> working anymore. (The error was "trying software interrupt, lost")
>
> Below is a patch which makes it work again. Note that this is just reverting
> a minimal part of the last applied patch to aha152x.c; so this may only be
> fixing the symptom and not the problem.
>
> Can somebody confirm if this is correct or not, and give some more insight
> into this behaviour?
I've seen reports but not figured out what is going on yet. Are you
using an AHA152x or the PCMCIA version ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] aha152x fix
2002-07-16 23:00 ` Alan Cox
@ 2002-07-17 7:09 ` Filip Van Raemdonck
2002-07-17 8:02 ` Martin Diehl
1 sibling, 0 replies; 8+ messages in thread
From: Filip Van Raemdonck @ 2002-07-17 7:09 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, fischer, Marcelo Tosatti
Hello,
On Wed, Jul 17, 2002 at 12:00:30AM +0100, Alan Cox wrote:
> On Tue, 2002-07-16 at 22:10, Filip Van Raemdonck wrote:
> >
> > I upgraded from 2.4.19-pre7 to -rc1 and this resulted in my aha152x card not
> > working anymore. (The error was "trying software interrupt, lost")
> >
> > Below is a patch which makes it work again. Note that this is just reverting
> > a minimal part of the last applied patch to aha152x.c; so this may only be
> > fixing the symptom and not the problem.
>
> I've seen reports but not figured out what is going on yet. Are you
> using an AHA152x or the PCMCIA version ?
An ISA - non PNP - aha1515 if I'm not mistaken (I can't check the exact type
right now but I'm quite sure I'm right). Definitely not PCMCIA.
Regards,
Filip
--
<liiwi> www.benefon.fi is running Microsoft-IIS/4.0 on Solaris
<netgod> neat trick
<liiwi> hmms. how come I think that netcraft is on crack
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] aha152x fix
2002-07-16 23:00 ` Alan Cox
2002-07-17 7:09 ` Filip Van Raemdonck
@ 2002-07-17 8:02 ` Martin Diehl
2002-07-17 21:35 ` Filip Van Raemdonck
1 sibling, 1 reply; 8+ messages in thread
From: Martin Diehl @ 2002-07-17 8:02 UTC (permalink / raw)
To: Alan Cox; +Cc: Filip Van Raemdonck, linux-kernel, fischer, Marcelo Tosatti
On 17 Jul 2002, Alan Cox wrote:
> On Tue, 2002-07-16 at 22:10, Filip Van Raemdonck wrote:
> > Hi,
> >
> > I upgraded from 2.4.19-pre7 to -rc1 and this resulted in my aha152x card not
> > working anymore. (The error was "trying software interrupt, lost")
> >
> > Below is a patch which makes it work again. Note that this is just reverting
> > a minimal part of the last applied patch to aha152x.c; so this may only be
> > fixing the symptom and not the problem.
> >
> > Can somebody confirm if this is correct or not, and give some more insight
> > into this behaviour?
>
> I've seen reports but not figured out what is going on yet. Are you
AFAICT, the patch which went into 2.4.19-pre10 (looks like a 2.5 backport)
removed the release/re-acquire of the io_request_lock with interrupts off
around a mdelay(1000) while the scsi_host->detect method probes for
interrupts. The identical code (i.e. with the unlock/lock removed) works
with 2.5.
Apparently the io_request_lock policy was changed in 2.5 and
aha152x_detect() is called without io_request_lock taken - in contrast to
2.4. However, the aha152x_detect strategy depends on some status change
driven by interrupt completion which doesn't happen when the lock is still
acquired by the caller - hence the interrupt appears to be lost.
Well, I'm definetely not the one to judge what's really correct here, but
my impression is, if the detect() is called with io_request_lock held and
interrupts off it wouldn't be allowed to release it down there. OTOH it
was there before and the driver used to work this way - in contrast to the
2.4.19-pre10 and later 2.4 which isn't working at all.
> using an AHA152x or the PCMCIA version ?
I can confirm Filip's patch putting back in place the old unlock/lock
makes things working again. Tested with an AVA1505AE (ISA, configured to
non-pnp fixed irq/io) on UP box running SMP kernel.
Therefore if you ask me, my vote would be to put this back in for
2.4.19-final until we have a better solution.
Martin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] aha152x fix
2002-07-17 8:02 ` Martin Diehl
@ 2002-07-17 21:35 ` Filip Van Raemdonck
[not found] ` <20020718055204.GA10357@linux-buechse.de>
0 siblings, 1 reply; 8+ messages in thread
From: Filip Van Raemdonck @ 2002-07-17 21:35 UTC (permalink / raw)
To: Martin Diehl; +Cc: Alan Cox, linux-kernel, fischer, Marcelo Tosatti
On Wed, Jul 17, 2002 at 10:02:39AM +0200, Martin Diehl wrote:
>
> > On Tue, 2002-07-16 at 22:10, Filip Van Raemdonck wrote:
> > >
> > >
> > > Below is a patch which makes it work again. Note that this is just reverting
> > > a minimal part of the last applied patch to aha152x.c; so this may only be
> > > fixing the symptom and not the problem.
>
> I can confirm Filip's patch putting back in place the old unlock/lock
> makes things working again. Tested with an AVA1505AE (ISA, configured to
> non-pnp fixed irq/io) on UP box running SMP kernel.
Actually, I'm not sure if it works. I hadn't tried anything more than
loading the card module yesterday since it was getting late, but I am now
getting oopses and almost immediate hard hangs whenever I try to access
the hard drive on that card.
Or rather, whenever I load a driver that hooks into that device. I've had
it when I mounted sda1 (thus loading sd_mod), after rebooting when I tried
to use sg0 (equivalent to sda, also then loading sg module), and when I got
suspicious even when I only just modprobed sd_mod, not doing anything on
the drive yet.
Actually, hold on...
I just rmmodded the aha152x module and then modprobe sd_mod and all was/is
fine now, except that obviously I can't get to my harddrive now - sd_mod is
just an unused driver.
I'm pasting an oops below.
I'm not really certain if this problem is related to the other one, maybe
this is caused by some unrelated change which went into the last aha152x
patch. But that's hard to figure out, if I need my two line fix before I
can load the driver :-<
Regards,
Filip
Jul 17 23:12:10 lucretia kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jul 17 23:12:10 lucretia kernel: SCSI device sda: 2154176 512-byte hdwr sectors (1103 MB)
Jul 17 23:12:10 lucretia kernel: sda:<1>Unable to handle kernel NULL pointer dereference at virtual address 0000001b
Jul 17 23:12:10 lucretia kernel: printing eip:
Jul 17 23:12:10 lucretia kernel: c88f01b7
Jul 17 23:12:10 lucretia kernel: *pde = 00000000
Jul 17 23:12:10 lucretia kernel: Oops: 0000
Jul 17 23:12:10 lucretia kernel: CPU: 0
Jul 17 23:12:10 lucretia kernel: EIP: 0010:[rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-73289/96] Not tainted
Jul 17 23:12:10 lucretia kernel: EFLAGS: 00010002
Jul 17 23:12:10 lucretia kernel: eax: 00000000 ebx: c0cdb600 ecx: c0366000 edx: c2fb8dfc
Jul 17 23:12:10 lucretia kernel: esi: c3aab000 edi: c0cdb600 ebp: c0851c84 esp: c0851c78
Jul 17 23:12:10 lucretia kernel: ds: 0018 es: 0018 ss: 0018
Jul 17 23:12:10 lucretia kernel: Process modprobe (pid: 457, stackpage=c0851000)
Jul 17 23:12:10 lucretia kernel: Stack: 00000293 c380f3f8 c0cdb600 c0851ca0 c88f02c2 c0cdb600 00000000 00000000
Jul 17 23:12:10 lucretia kernel: 00000000 c88e1a94 c0851cc4 c88e154c c0cdb600 c88e1a94 c0cdb600 c380f3f8
Jul 17 23:12:10 lucretia kernel: c0cdb70c 00000000 c3aab000 c0851cf4 c88e7bed c0cdb600 c0cdb600 00000296
Jul 17 23:12:10 lucretia kernel: Call Trace: [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-73022/96] [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-132460/96] [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-133812/96] [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-132460/96] [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-107539/96]
Jul 17 23:12:10 lucretia kernel: [scsi_mod:scsi_hosts_Rfba6a71c+131632/65472080] [generic_unplug_device+34/52] [__run_task_queue+75/92] [block_sync_page+25/32] [__lock_page+145/192] [lock_page+23/28]
Jul 17 23:12:10 lucretia kernel: [read_cache_page+198/288] [read_dev_sector+49/172] [blkdev_readpage+0/24] [handle_ide_mess+41/392] [msdos_partition+126/732] [get_empty_inode+137/156]
Jul 17 23:12:10 lucretia kernel: [check_partition+265/388] [grok_partitions+193/260] [scsi_mod:scsi_hosts_Rfba6a71c+131632/65472080] [register_disk+37/44] [scsi_mod:scsi_hosts_Rfba6a71c+128360/65475352] [scsi_mod:scsi_hosts_Rfba6a71c+131704/65472008]
Jul 17 23:12:10 lucretia kernel: [scsi_mod:scsi_hosts_Rfba6a71c+131632/65472080] [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-127803/96] [scsi_mod:scsi_hosts_Rfba6a71c+131632/65472080] [rtc:__insmod_rtc_O/lib/modules/2.4.19-rc1/kernel/drivers/char/r+-127540/96] [scsi_mod:scsi_hosts_Rfba6a71c+131632/65472080] [scsi_mod:scsi_hosts_Rfba6a71c+129673/65474039]
Jul 17 23:12:10 lucretia kernel: [scsi_mod:scsi_hosts_Rfba6a71c+131632/65472080] [sys_init_module+1291/1444] [scsi_mod:scsi_hosts_Rfba6a71c+121840/65481872] [system_call+51/56]
Jul 17 23:12:10 lucretia kernel:
Jul 17 23:12:10 lucretia kernel: Code: 0f b6 50 1b 8b 14 95 bc 04 32 c0 2b 82 a0 00 00 00 69 c0 a3
--
Please don't send proprietary format documents, I can't (and don't want to)
open them. Appreciated are open-source formats like .txt or .rtf. Dvi, ps or
tex files are welcome.
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20020718222805.GA16641@linux-buechse.de>]
* Re: [PATCH] aha152x fix
[not found] <20020718222805.GA16641@linux-buechse.de>
@ 2002-07-19 17:09 ` Martin Diehl
0 siblings, 0 replies; 8+ messages in thread
From: Martin Diehl @ 2002-07-19 17:09 UTC (permalink / raw)
To: Juergen E. Fischer
Cc: Filip Van Raemdonck, Alan Cox, linux-kernel, fischer,
Marcelo Tosatti, Julian Bradfield
On Fri, 19 Jul 2002, Juergen E. Fischer wrote:
> > Due to NULL pointer dereferencing I'm getting an Oops - see below. This
> > was taken from the console with the aha152x running with debug enabled.
> > And yes, this should be completely unrelated to the detection problem.
>
> Following patch against 2.4.19-rc2 fixes that problem. The patch also
> includes a fix for a timeout problem with a tape drive (reported Julian
> Bradfield).
Works for me now. Device detection ok. Did some test scanning without any
problem. Since the Oops was 100% reproducible I'd say it's really fixed
now - Thanks.
Hopefully we can still get this into -final or the aha152x would be
unusable with 2.4.19 (that's why I still haven't shortened the CC-list)
Martin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-07-19 17:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-16 21:10 [PATCH] aha152x fix Filip Van Raemdonck
2002-07-16 23:00 ` Alan Cox
2002-07-17 7:09 ` Filip Van Raemdonck
2002-07-17 8:02 ` Martin Diehl
2002-07-17 21:35 ` Filip Van Raemdonck
[not found] ` <20020718055204.GA10357@linux-buechse.de>
2002-07-18 7:42 ` Filip Van Raemdonck
2002-07-18 12:34 ` Martin Diehl
[not found] <20020718222805.GA16641@linux-buechse.de>
2002-07-19 17:09 ` Martin Diehl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®