Bug 140421 - "external" scsi driver modules not compilable with a content of .../build
"external" scsi driver modules not compilable with a content of .../build
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
: 140491 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-11-22 15:49 EST by Michal Jaegermann
Modified: 2015-01-04 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-07-15 17:06:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2004-11-22 15:49:51 EST
Description of problem:

SCSI driver modules have this unfortunate habit that they do
'#include "scsi_module.c"'.  For example, in 
/usr/src/linux-2.6.9-1.6_FC2/drivers/scsi there is 58 .c file
with that line.  So one could reasonably expect that various
"external" drivers for such devices will repeat that pattern.

Here is the catch; if you will do for such driver something

make CFLAGS=... -C /lib/modules/$(uname -r)/build M=$(PWD) modules

with CFLAGS set as required, then on FC3 this fails because
"scsi_module.c" (really an include file) is nowhere to be found
while it truly should sit under ../build/driver/scsi/.

A driver _could_ supply its own copy of scsi_module.c but there
is no guarantee that this will not get later out of sync and,
besides, it is not likely to be there as so far such extra copy
was not ever needed.  Just to be sure we are talking here about
a GPL code.

I have no idea of other subsystems are doing a similar trickery.
Got hit on SCSI. :-)
Comment 1 Dave Jones 2005-07-15 15:50:25 EDT
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem.   Please update to this new kernel, and
report whether or not it fixes your problem.

If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.

Thank you.
Comment 2 Michal Jaegermann 2005-07-15 16:44:54 EDT
> ... may contain a fix for your problem.

No, not really.

In linux-2.6.12/drivers/scsi there are 58 files with

#include "scsi_module.c"

directive so no wonder that other drivers follow the same pattern;
but there is no scsi_module.c file in kernel-devel packages and
everything what was said in the original report still applies.
Comment 3 Michal Jaegermann 2005-07-15 16:47:33 EDT
*** Bug 140491 has been marked as a duplicate of this bug. ***
Comment 4 Dave Jones 2005-07-15 17:06:27 EDT
No out of tree modules should be using that file.
If you read the comment at the top..

 * Support for old-style host templates.
 * NOTE:  Do not use this for new drivers ever.

It's there purely so that some in-tree drivers which haven't seen any
maintainence in a long time continue to work.   Any out of tree drivers should
be a) using the correct APIs, and b) be striving toward upstream acceptance
[where (a) is a prerequisite]

It's not unfeasible that in at some point this file could go away entirely.
Out of tree drivers should not depend upon it being around.
Comment 5 Dave Jones 2005-07-15 17:17:42 EDT
[This comment has been added as a mass update for all FC4 kernel bugs.
 If you have migrated this bug from an FC3 bug today, ignore this comment.]

Please retest your problem with todays 2.6.12-1.1398_FC4 update.

If your problem involved being unable to boot, or some hardware not being
detected correctly, please make sure your /etc/modprobe.conf is correct *BEFORE*
installing any kernel updates.
If in doubt, you can recreate this file using..

mv /etc/sysconfig/hwconf /etc/sysconfig/hwconf.bak
mv /etc/modprobe.conf /etc/modprobe.conf.bak

Thank you.
Comment 6 Michal Jaegermann 2005-07-15 18:25:59 EDT
About comment #4.  In the particular case of a 3w-9xxx driver for cards which
require firmware loaded, and for which in-tree drivers does not seem to
be good enough, I indeed found a newer version of this driver which does
not include scsi_module.c.  How it works it remains to be seen. :-)

Note You need to log in before you can comment on or make changes to this bug.