From: Chiaki <ishikawa@yk.rim.or.jp>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: TMSCSIM [2.6]
Date: Fri, 28 Nov 2003 04:13:29 +0900 [thread overview]
Message-ID: <3FC64CD9.8040505@yk.rim.or.jp> (raw)
In-Reply-To: <Pine.LNX.4.44.0311252311360.14624-100000@poirot.grange>
[-- Attachment #1: Type: text/plain, Size: 8310 bytes --]
Hi,
Here is the record of messages shown during boot using
serial console when the module loading of tmscsim fails
under 2.6.0-test10.
(Sorry, I am still using gcc 3.3. One step at a time.)
It seems that the system triggered a bug detection code in the
dma-mapping code.
LUN 1 connected to dc390 is now being scanned
as far as the message is correct, but maybe during the scan
and handling of CDROM, the system crashed?
The reason I suspect this is that I don't see the "lun 1"
message line, following the
"Type: CD-ROM ANSI SCSI revision: 02"
line in the log. For "lun 0",
"Attached scsi removable disk sdc at scsi1, channel 0, id 5, lun 0
Attached scsi generic sg2 at scsi1, channel 0, id 5, lun 0, type 7"
followed immediately after the detection.
I wonder if anyone has SCSI CDROM driver as a module,
namely sr_mod, up and running under 2.6.0-testXX series.
From the log, I excerpted interesting part and show it below here. The
full log is attached together with my config.
--- except from the log starts here
Loading modules...
hpfs
warning: process `update' used the obsolete bdflush system call
Fix your initscripts?
nls_cp437
sg
Attached scsi generic sg0 at scsi0, channel 0, id 4, lun 0, type 0
Attached scsi generic sg1 at scsi0, channel 0, id 6, lun 0, type 0
sr_mod
tmscsim
PCI: Found IRQ 11 for device 0000:00:0d.0
PCI: Sharing IRQ 11 with 0000:00:0f.0
DC390: 1 adapters found
scsi1 : Tekram DC390/AM53C974 V2.0f 2000-12-20
DC390: Target 5: Sync transfer 5.0 MHz, Offset 8
Vendor: MATSHITA Model: PD-1 LF-1000 Rev: A111
Type: Optical Device ANSI SCSI revision: 02
Attached scsi removable disk sdc at scsi1, channel 0, id 5, lun 0
Attached scsi generic sg2 at scsi1, channel 0, id 5, lun 0, type 7
Vendor: MATSHITA Model: PD-1 LF-1000 Rev: A111
Type: CD-ROM ANSI SCSI revision: 02
------------[ cut here ]------------
kernel BUG at include/asm/dma-mapping.h:40!
invalid operand: 0000 [#1]
CPU: 0
EIP: 0060:[<f09445c1>] Not tainted
EFLAGS: 00010046
EIP is at dc390_pci_map+0xc1/0x140 [tmscsim]
eax: 00000000 ebx: 00000000 ecx: c0404e00 edx: 00000000
esi: ef62a2f0 edi: 00000001 ebp: c03a5e4c esp: c03a5e3c
ds: 007b es: 007b ss: 0068
Process swapper (pid: 0, threadinfo=c03a4000 task=c0338680)
Stack: 00000000 ef62a2f0 efc61940 efc99380 c03a5e8c f09451d1 ef62a2f0
ef62a2f0
efc99380 efc99380 c03a5ea4 f09451d1 ef62a2f0 982b34e5 0000001e
00000001
cc000092 ef62a2f0 efc61940 ef62a208 c03a5ec4 f0946e36 ef62a208
efc99380
Call Trace:
[<f09451d1>] dc390_StartSCSI+0x41/0x330 [tmscsim]
[<f09451d1>] dc390_StartSCSI+0x41/0x330 [tmscsim]
[<f0946e36>] dc390_SRBdone+0x306/0x5b0 [tmscsim]
[<f09472f3>] dc390_RequestSense+0x53/0x90 [tmscsim]
[<f0946714>] dc390_Disconnect+0x104/0x160 [tmscsim]
[<f094574d>] do_DC390_Interrupt+0x28d/0x350 [tmscsim]
[<c0113f4c>] timer_interrupt+0x8c/0x260
[<c025dc88>] scsi_softirq+0xe8/0x240
[<c010da4b>] handle_IRQ_event+0x3b/0x70
[<c010e060>] do_IRQ+0x140/0x390
[<c0105000>] _stext+0x0/0xf0
[<c010c0ec>] common_interrupt+0x18/0x20
[<c0105000>] _stext+0x0/0xf0
[<c0108ea6>] default_idle+0x26/0x30
[<c0108f24>] cpu_idle+0x34/0x40
[<c03a6797>] start_kernel+0x1e7/0x270
[<c03a6480>] unknown_bootoption+0x0/0x100
Code: 0f 0b 28 00 77 9d 94 f0 eb c5 0f 0b 25 00 77 9d 94 f0 eb a8
<0>Kernel panic: Fatal exception in interrupt
In interrupt handler - not syncing
<6>SysRq : Emergency Sync
SysRq : Resetting
--- except from the log ends
dma_mapping_on:40 is the following line.
31 static inline int
32 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
33 enum dma_data_direction direction)
34 {
35 int i;
36
37 BUG_ON(direction == DMA_NONE);
38
39 for (i = 0; i < nents; i++ ) {
=> 40 BUG_ON(!sg[i].page);
41
42 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
43 }
44
45 flush_write_buffers();
46 return nents;
47 }
PS: Note on serial console setup with loadlin.
I studied the excellent guide posted to linux-kernel in August
regarding how to set up the serial console.
However, I am using LOADLIN and this boot utiltiy seems to
require a certain modification to the setup mentioned in the post.
(The post assumed "lilo").
--- quote from the post and my comment ---
> Your need a NULL modem serial cable available
> from any computer store.
>
> Install uucp - I use on the HOST :
>
> uucp-1.06.1-33.7.2.
>
> Also , LILO is broken on some machines and ignores
> serial input so make sure you use at least
>
> lilo-21.6-71
>
> On the TARGET
>
> 1. Connect the serial ports together ( COM1->COM1 ) with
> the serial cable .
>
> 2. Modify LILO to use serial line on the TARGET
> add to lilo.conf:
> append="console=ttyS0,9600n8 console=tty0 "
> serial=0,9600N8
>
> Run lilo
CI's comment starts here: I needed to change this part for loadlin
and kernel 2.4.22 as follows. [I tested the serial
console setup under 2.4.22 and it took me a long time to set this up.]
I needed to omit console=tty0 portion for testing the setup under 2.4.22.
If the second console= part is present, the initial portion shown
on the screen namely,
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
... omitted ..
disappeared somewhere and not seen on the CRT of the original PC
nor on the serial console screen. They simply disappeared and
so the setup was useless! (All I got was the login prompt: after a while.)
Under 2.4.22, if I remove the later command options, and use a command
line like this, (omitting console=tty0 serial=0,9600N8. serial=
... must be a command option to "lilo" itself.)
loadlin lin2422.ip6 root=/dev/sda6 ro vga=3 scsihosts=sym53c8xx:tmscsim
console=ttyS0,9600n8
I DID get a partial portion of the messages originally shown on the
original PC on the serial console, but only partially. ONLY the
messages AFTER `init' starts are shown on serial console. So
"BIOS-provided ..." message lines and those many lines that follow
until `init' starts are not shown. Why? I have no idea.
The second best solution for me then is to add
"kern.*[tab]/dev/console" and hope that syslogd will pickup kernel
messages and show it explicitly under /dev/console which is now turned
into /dev/ttyS0 in the step 4 below. (But this may not work well if
the system gets hung BEFORE `init' starts and syslogd is active.
Also, even if such messages like "BIOS -provided ..." are shown using
syslogd, then they are shown AFTER init starts and syslogd daemon
starts. So their position in the recorded message on the serial
console is a little strange.)
However, it turns out 2.6.0-test10 handles the kernel message
output to serial console in a slightly different manner, and
"BIOS-provided ..." messages and all lines that follow are dumped to serial
console immediately without any problem after
my setup [ step 4 below included ].
Again I have no idea why, but as you can see in
the attached log, the serial console for message dumping purposes
seems to work just fine with 2.6.0-test10. (In any case,
/etc/syslog.conf DID have kern.* /dev/ttyS0 for the log.)
> 3. Add to /etc/inittab on the HOST
>
> S0:s12345:respawn:/sbin/agetty 9600 ttyS0
>
> 4. To see ALL THE CONSOLE MESSAGES during boot on the TARGET
>
> mv /dev/console /dev/console.org
> ln /dev/ttyS0 /dev/console
CI's comment: This had to be done AFTER disabling devfs and rebooting
2.4.22 on my PC.
(for obvious reasons to those who use devfs. /dev directory
after devfsd is invoked is a "virtual directory" and mv and other
modifications are NOT allowed.)
> 5. Start uucp on the HOST:
>
> cu -l /dev/ttyS0 -s 9600
>
My second PC is a window98 PC. I disabled the TTY ports
on that PC long time ago, and so it took me a while
to enable the tty ports, and configure it under win98.
Hyperterminal happily tries to open non-functioning com1 and
com2 ports and simply crashed under that platform and so
it took me a while to figure out that the tty ports were not
configured at all!
> 6. Boot your target
>
> ///
>
> John Donnelly AT HP DOT com
--- end quote ---
Hope this helps.
Ishikawa, Chiaki
[-- Attachment #2: bug-log.zip --]
[-- Type: application/zip, Size: 11337 bytes --]
next prev parent reply other threads:[~2003-11-27 19:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0311242223130.2874-200000@poirot.grange>
2003-11-24 22:33 ` TMSCSIM [2.6] (was: Re: [PATCH] Re: AMD 53c974 SCSI driver in 2.6) Guennadi Liakhovetski
2003-11-25 20:58 ` TMSCSIM [2.6] Chiaki
2003-11-25 21:16 ` Chiaki
2003-11-25 22:26 ` Guennadi Liakhovetski
2003-11-25 22:44 ` Chiaki
2003-11-27 19:13 ` Chiaki [this message]
2003-11-27 22:05 ` Guennadi Liakhovetski
2003-11-28 1:41 ` Chiaki
2003-11-28 7:33 ` Guennadi Liakhovetski
2003-11-29 1:55 ` Chiaki
2003-11-29 9:46 ` Guennadi Liakhovetski
2003-11-29 9:58 ` Guennadi Liakhovetski
2003-11-29 13:06 ` Matthias Andree
2003-11-29 20:37 ` Guennadi Liakhovetski
2003-11-29 18:11 ` Kurt Garloff
2003-11-29 18:36 ` James Bottomley
2003-11-29 21:19 ` Guennadi Liakhovetski
2003-11-30 5:27 ` Chiaki
2003-11-28 20:25 ` Guennadi Liakhovetski
2003-11-29 11:03 ` Thorsten Leemhuis
2003-11-29 12:43 ` Thorsten Leemhuis
2003-11-27 22:43 ` TMSCSIM [2.6] (cards) Guennadi Liakhovetski
2003-11-28 1:45 ` Chiaki
2003-11-29 18:14 ` Kurt Garloff
[not found] <1069954227.1667.1.camel@work.thl.home>
2003-11-28 9:05 ` TMSCSIM [2.6] Guennadi Liakhovetski
2003-11-22 23:27 TMSCSIM [2.6] (was: Re: [PATCH] Re: AMD 53c974 SCSI driver in 2.6) Guennadi Liakhovetski
2003-11-23 20:26 ` TMSCSIM [2.6] Matthias Andree
2003-11-23 20:53 ` Guennadi Liakhovetski
2003-11-23 23:29 ` Kurt Garloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FC64CD9.8040505@yk.rim.or.jp \
--to=ishikawa@yk.rim.or.jp \
--cc=g.liakhovetski@gmx.de \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox