[3386] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Race in AHA1542 detection

daemon@ATHENA.MIT.EDU (Keith Owens)
Mon Feb 23 08:26:18 1998

From: Keith Owens <kaos@ocs.com.au>
To: linux-scsi@vger.rutgers.edu
Date: 	Mon, 23 Feb 1998 23:56:32 +1100

2.1.88, gcc 2.7.2.3, libc 5.4.38.
SMP, ASUS P55T2D, dual P166, boot with pirq=0.
AHA1542C, external box only, not powered on.
ASUS SC-875, internal disks and CD-R.
Small patch to scan for SC875 before 1542, I do not want the internal
disks to change name when the external box is used.

Ever since the IO-APIC patches were added to the kernel and it is
booted with pirq=0, this message appears at boot time.

  aha1542.c: interrupt received, but no mail.

The kernel trace below shows the 1542 interrupt being processed on cpu
1 while cpu 0 is still in aha1542_detect, it has not finished detected
the card yet.  The boot message seems to be harmless but I have not
dared start any devices on the 1542, what other cli/io-apic races lurk
in the 1542 code?  Does this race need to be closed, say with a
spinlock in the SCSI device structure?

c01c1d27  setup_mailboxes +<13/e4> (6.31) cpu(0) pid(1)
c01c1043  aha1542_out +<13/e0> (1.17) cpu(0) pid(1)
c010cfa1  __global_save_flags +<d/40> (1.34) cpu(0) pid(1)
c010ce23  __global_cli +<f/13c> (96.23) cpu(0) pid(1)
c010cfe1  __global_restore_flags +<d/6c> (0.93) cpu(0) pid(1)
c010cf5d  __global_sti +<d/44> (45.28) cpu(0) pid(1)
c010cfa1  __global_save_flags +<d/40> (1.36) cpu(0) pid(1)
c010ce23  __global_cli +<f/13c> (2.99) cpu(0) pid(1)
c010d5ae  do_IRQ +<e/64> (2.77) cpu(1) pid(0)
c01c250f  aha1542_detect +<2a7/42c> (2.98) cpu(0) pid(1)
c010d4ac  do_ioapic_IRQ +<10/104> (2.62) cpu(1) pid(0)
c010d700  request_irq +<10/8c> (2.67) cpu(0) pid(1)
c0113afd  ack_APIC_irq +<d/28> (52.23) cpu(1) pid(0)
c012bd6f  kmalloc_wrapper +<f/3c> (1.30) cpu(0) pid(1)
c0128170  real_kmalloc +<10/188> (2.83) cpu(0) pid(1)
c012bad4  alloc_addr +<10/100> (2.56) cpu(0) pid(1)
c010d617  setup_x86_irq +<13/ec> (1.52) cpu(0) pid(1)
c010cfa1  __global_save_flags +<d/40> (1.07) cpu(0) pid(1)
c010ce23  __global_cli +<f/13c> (2.47) cpu(0) pid(1)
c010c871  set_8259A_irq_mask +<d/44> (1.42) cpu(0) pid(1)
c010c8b5  unmask_generic_irq +<d/48> (1.20) cpu(0) pid(1)
c0113105  enable_IO_APIC_irq +<11/3c> (1.04) cpu(0) pid(1)
c01130b5  io_apic_read +<d/24> (8.49) cpu(0) pid(1)
c01130d9  io_apic_write +<d/28> (1.27) cpu(0) pid(1)
c010cfe1  __global_restore_flags +<d/6c> (1.02) cpu(0) pid(1)
c010ce23  __global_cli +<f/13c> (1.88) cpu(0) pid(1)
c01c2551  aha1542_detect +<2e9/42c> (1.57) cpu(0) pid(1)
c011972a  request_dma +<e/50> (2.29) cpu(0) pid(1)
c01c25a1  aha1542_detect +<339/42c> (4.72) cpu(0) pid(1)
c01c2624  aha1542_detect +<3bc/42c> (0.87) cpu(0) pid(1)
c010cfe1  __global_restore_flags +<d/6c> (0.95) cpu(0) pid(1)
c010cf5d  __global_sti +<d/44> (1.49) cpu(0) pid(1)

**** Flags restored, cpu(0) is still in aha1542_detect and
**** aha1542_intr_handle starts running on cpu(1).

c01c262f  aha1542_detect +<3c7/42c> (2.71) cpu(0) pid(1)
c010d050  handle_IRQ_event +<10/60> (2.92) cpu(1) pid(0)
c01c2634  aha1542_detect +<3cc/42c> (5.07) cpu(0) pid(1)
c01c1437  aha1542_intr_handle +<13/2a8> (7.68) cpu(1) pid(0)
c0120300  request_region +<10/8c> (6.15) cpu(0) pid(1)
c010cfa1  __global_save_flags +<d/40> (3.10) cpu(1) pid(0)
c0120293  find_gap +<13/70> (3.25) cpu(0) pid(1)
c010ce23  __global_cli +<f/13c> (4.88) cpu(1) pid(0)
c010cfa1  __global_save_flags +<d/40> (4.36) cpu(0) pid(1)
c010cfe1  __global_restore_flags +<d/6c> (2.83) cpu(1) pid(0)
c010ce23  __global_cli +<f/13c> (2.68) cpu(0) pid(1)
c011ae8b  printk +<13/184> (2.29) cpu(1) pid(0)



home help back first fref pref prev next nref lref last post