Bug 164484

Summary: dc395 driver problem while loading module; sleeping function called from invalid context
Product: [Fedora] Fedora Reporter: Emmanuel Kowalski <emmanuel.kowalski>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-29 22:46:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Emmanuel Kowalski 2005-07-28 06:53:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

Description of problem:
I compiled the Tekram dc395 SCSI driver for this kernel. After
trying to load it (modprobe dc395x), the computer froze and had to be
powered down.

The log contained some messages indicating the card was recognized
(see attachment) and ending with a debug message about sleeping 
function called from invalid context in highmem.c:5

Version-Release number of selected component (if applicable):
kernel-2.6.12-1.1398_FC4

How reproducible:
Didn't try

Steps to Reproduce:
1. Compile dc395x driver.
2. Add it to modules.
3. depmod -a
4. modprobe dc395x
  

Actual Results:  The computer froze; no response to ping, etc.

Expected Results:  The computer stays running and the cd-writer attached to the card is
available.

Additional info:

Messages in the log:

Jul 27 16:45:28 malbec kernel: SCSI subsystem initialized
Jul 27 16:45:28 malbec kernel: dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
Jul 27 16:45:28 malbec kernel: ACPI: PCI Interrupt 0000:02:0b.0[A] -> Link [LNKH] -> GSI 9 (level, low) -> IRQ 9
Jul 27 16:45:29 malbec kernel: dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
Jul 27 16:45:29 malbec kernel: dc395x:                AdaptMode=0x0f, Tags=4(16), DelayReset=1s
Jul 27 16:45:29 malbec kernel: dc395x: Connectors: int50  Termination: Auto Low High
Jul 27 16:45:29 malbec kernel: dc395x: Performing initial SCSI bus reset
Jul 27 16:45:29 malbec kernel: scsi0 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
Jul 27 16:45:30 malbec kernel: dc395x: Target 03:  Sync: 48ns Offset 15 (20.8 MB/s)
Jul 27 16:45:30 malbec kernel:   Vendor: YAMAHA    Model: CRW8824S          Rev: 1.00
Jul 27 16:45:30 malbec kernel:   Type:   CD-ROM                             ANSI SCSI revision: 02
Jul 27 16:45:31 malbec scsi.agent[20087]: cdrom at /devices/pci0000:00/0000:00:1e.0/0000:02:0b.0/host0/target0:0:3/0:0:3:0
Jul 27 16:45:32 malbec kernel: sr0: scsi3-mmc drive: 24x/16x writer cd/rw xa/form2 cdda tray
Jul 27 16:45:33 malbec kernel: Debug: sleeping function called from invalid context at arch/i386/mm/highmem.c:5
Jul 27 16:45:33 malbec kernel: in_atomic():0, irqs_disabled():1

Comment 1 Dan Carpenter 2005-07-28 09:52:18 UTC
The driver isn't supported by Fedora.  This bug should probably go upstream.

1)
arch/i386/mm/highmem.c:5 is kmap()

2)
kmap is called in build_srb()
1030                          srb->virt_map[i] = kmap(sl[i].page);

3)
build_srb() is called from dc395x_queue_command() and according to the comment
dc395x_queue_command() is called with:
1094   * Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
1095   *        and is expected to be held on return.

It really looks like no one has used this driver for a while.