Skip to contentSkip to conversation

Linux distribution versions

DISCUSSION Rabeeh Khoury 2 participants 4 messages Apr 30, 2002 SCSI

lore
Share & tools
lore
#0 lore raw

Hi List,

A Linux-SCSI newbie question -

If I have developed a working SCSI driver, and rapidly tested it under a certain distribution (say RedHat 7.2), will it work with other distributions (say Mandrake 8.0 ) ?

What is the distinguisher between SCSI subsystems (and maybe other parts in the kernel) that prevents or makes it possible to a certain SCSI driver to work ?

Thank you,
Rabeeh

Signature · 7 lines
This message may contain confidential, proprietary or legally privileged
information. The information is intended only for the use of the individual
or entity named above. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
telephone, or by e-mail and delete the message from your computer.
#1 lore raw
Quoted 3 lines · Rabeeh Khoury

Hi List,

A Linux-SCSI newbie question -

The tone of the question is giving an impression of "I want to publish binary-only driver".. maybe it is just my ears, nevertheless...

I suggest Linux-Kernel Mailing List FAQ items:

    http://www.tux.org/lkml/#s8-7
    http://www.tux.org/lkml/#s10-12

There is no item fully covering this particular topic, thus I will
Cc: the FAQ maintainer, who could adapt this text into a topic of its own...

Quoted 3 lines

If I have developed a working SCSI driver, and rapidly tested it under a certain distribution (say RedHat 7.2), will it work with other distributions (say Mandrake 8.0 ) ?

There are minor detail changes in between each kernel version (even in stable series, see LKML-faq), and depending on what configuration options are used (basically SMP or not), certain things like spinlocks may or may not reserve space in structures, and may or may not need to be called (are even optimized away in non-SMP systems), meaning that binary compiled for SMP MIGHT NOT work at non-SMP kernel. (And vice versa.)

Also different vendors tend to inject different things into their kernel patch-sets, which again may subtly change data layouts, etc. In stable kernel series great pains are suffered at maintenance so that data layouts of in-kernel APIs (and API calls themselves) are not changed. Nevertheless something may change making binary drivers to fail in mysterious ways.

Subtle memory things may appear with i386-PAE mode (large memory machines which can't map all of RAM into the kernel at the same time.)

Quoted 3 lines

What is the distinguisher between SCSI subsystems (and maybe other parts in the kernel) that prevents or makes it possible to a certain SCSI driver to work ?

The problems that are encountered are most likely very general, e.g. things said above will match.

Quoted 2 lines

Thank you,
Rabeeh

Aiming to publish BINARY driver modules is (in general) a support nightmare.

Publishing the driver is source (see LKML FAQ items about compile and linking) will make the driver publication a lot more simpler.

Supplying obfuscated(*) lowlevel driver code with clean upper layers will give change to fix problems, like spinlocks, memory management call goofups etc. ( (*) Obfuscation meaning "write this decimal value at that register, no explanatory comments" -- NOT "here is .o file with some compiled i386 object code" )

Others than the driver author might not know what exactly is wrong in low-level, but things at more general levels may even get ported onwards, when kernel introduces new APIs for e.g. memory management at i386-PAE mode, etc. .. and the driver works as is at a system with little-endian processors.

/Matti Aarnio

#2 lore raw

Hi,

Thank you for the detailed response.

Matti Aarnio wrote

Quoted 5 lines

The tone of the question is giving an impression of "I want to publish binary-only driver".. maybe it is just my ears, nevertheless...

Well, it's just your ears :)

The reason for the question is that testing a driver under so much distributions is not a simple task.

Think of the following distributions - RedHat 6.x / 7.x , Caldera , Mandrake , SuSe and lots others ; and add to that testing under i386 / ppc / mips / sparc etc ....

Regards,
Rabeeh

#3 lore raw
Quoted 8 lines · Rabeeh Khoury

Hi,

Thank you for the detailed response.

Matti Aarnio wrote

Quoted 3 lines

The tone of the question is giving an impression of "I want to publish binary-only driver".. maybe it is just my ears, nevertheless...

Quoted 8 lines

Well, it's just your ears :)

The reason for the question is that testing a driver under so much distributions is not a simple task.

Think of the following distributions - RedHat 6.x / 7.x , Caldera ,
Mandrake , SuSe and lots others ; and add to that testing
under i386 / ppc / mips / sparc etc ....

No need to go quite that widely, I think.

The configuration set for i386 is:
SMP on/off
PAE on/off

That is, four versions. Use the "new error handler" API, and the driver should work at 2.2 and at 2.5 series kernels
too. (Aside of current 2.4, that is.)

Other processors don't come in this many system architecture flavours. Essentially getting the four versions of i386, and one big-endian (e.g. UltraSPARC) to work will most likely produce working driver at all systems, and handle 64 bit ones as well. It isn't quite the same as being tested at all systems, but after those five the surprises are very unlikely.

Quoted 2 lines

Regards,
Rabeeh

/Matti Aarnio