Bug 140421 - "external" scsi driver modules not compilable with a content of .../build
Summary: "external" scsi driver modules not compilable with a content of .../build
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
: 140491 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-22 20:49 UTC by Michal Jaegermann
Modified: 2015-01-04 22:12 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-07-15 21:06:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2004-11-22 20:49:51 UTC
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
like:

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 19:50:25 UTC
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 20:44:54 UTC
> ... 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 20:47:33 UTC
*** Bug 140491 has been marked as a duplicate of this bug. ***

Comment 4 Dave Jones 2005-07-15 21:06:27 UTC
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 21:17:42 UTC
[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
kudzu


Thank you.


Comment 6 Michal Jaegermann 2005-07-15 22:25:59 UTC
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.