LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-31-2004, 01:46 AM   #1
bcj
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
Unhappy Urgent help needed to install old PCI card under kernel 2.4.20-8smp


Dear All,

Need some urgent help in installing a very old PCI card under Linux (RH) kernel 2.4.20-8smp. Can anyone help ?

Problem is as follows. We have a high speed data acquisition system based on a 16
bit 4 port PCI card purchased 7-8 years back. One of our colleagues wrote the device
driver (a pretty good one at that) as none was available and compiled it for RH6 prevailing
kernel. The system has worked fine since then.

Recently, I wanted to move the system to 2.4.20-8 kernel and encountered some problems.
First, I discovered that "remap_page_range" function's prototype had changed from 3 arguments to 4.
This was simple to fix and the source code compiled after suitable modification and the
card worked has worked fine last three months.

Now, I need to move to an SMP kernel (2.4.20-8smp) and I find that a compilation for this
results in a large number of warnings and error messages. Not being an expert on Linux,
it is quite . Can you guys help and tell me what I am doing wrong ?

The compile line and the errors are listed below. The source of the driver does not
fit in the allowable message length, but I can send it if required , separately.

Thanks,

B C Joshi

--
---------------------------------------------------------------------------------------------------------------
------
I am compiling using
---------------------------------------------------------------------------------------------------------------
------
gcc -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
-mcpu=i686 -c pcidev24.rh9.c
---------------------------------------------------------------------------------------------------------------
-------
I get the following error messages
-----------------------------------------------------------------------------------------------------------------------
./compile_module pcidev24.rh9smp.c
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from pcidev24.rh9smp.c:33:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from /usr/include/linux/sched.h:14,
from pcidev24.rh9smp.c:33:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from /usr/include/linux/sched.h:16,
from pcidev24.rh9smp.c:33:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from pcidev24.rh9smp.c:33:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from pcidev24.rh9smp.c:33:
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:44:25: asm/uaccess.h: No such file or directory
pcidev24.rh9smp.c: In function `setup_dma':
pcidev24.rh9smp.c:261: warning: implicit declaration of function `virt_to_phys'
pcidev24.rh9smp.c: In function `take_new_task':
pcidev24.rh9smp.c:299: warning: implicit declaration of function `printk'
pcidev24.rh9smp.c: In function `dev_irq_server':
pcidev24.rh9smp.c:519: warning: implicit declaration of function `do_gettimeofday'
pcidev24.rh9smp.c: In function `dev_open':
pcidev24.rh9smp.c:961: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:969: dereferencing pointer to incomplete type
pcidev24.rh9smp.c: In function `dev_release':
pcidev24.rh9smp.c:999: dereferencing pointer to incomplete type
pcidev24.rh9smp.c: In function `dev_read':
pcidev24.rh9smp.c:1026: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1030: warning: implicit declaration of function `verify_area'
pcidev24.rh9smp.c:1030: `VERIFY_WRITE' undeclared (first use in this function)
pcidev24.rh9smp.c:1030: (Each undeclared identifier is reported only once
pcidev24.rh9smp.c:1030: for each function it appears in.)
pcidev24.rh9smp.c:1045: warning: implicit declaration of function `copy_to_user'
pcidev24.rh9smp.c: In function `dev_write':
pcidev24.rh9smp.c:1076: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1085: `VERIFY_READ' undeclared (first use in this function)
pcidev24.rh9smp.c:1095: warning: implicit declaration of function `copy_from_user'
pcidev24.rh9smp.c: In function `gmrt_corr_transfer':
pcidev24.rh9smp.c:1145: `VERIFY_READ' undeclared (first use in this function)
pcidev24.rh9smp.c:1148: `VERIFY_WRITE' undeclared (first use in this function)
pcidev24.rh9smp.c: In function `dev_ioctl':
pcidev24.rh9smp.c:1216: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1232: `VERIFY_READ' undeclared (first use in this function)
pcidev24.rh9smp.c:1232: `VERIFY_WRITE' undeclared (first use in this function)
pcidev24.rh9smp.c:1269: warning: implicit declaration of function `pci_read_config_dword'
pcidev24.rh9smp.c:1321: `ENOIOCTLCMD' undeclared (first use in this function)
pcidev24.rh9smp.c: At top level:
pcidev24.rh9smp.c:1325: warning: `struct vm_area_struct' declared inside parameter list
pcidev24.rh9smp.c:1325: warning: its scope is only this definition or declaration, which is probably not what y
ou want
pcidev24.rh9smp.c: In function `dev_mmap':
pcidev24.rh9smp.c:1331: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1340: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1340: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1344: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1346: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1347: warning: implicit declaration of function `remap_page_range'
pcidev24.rh9smp.c:1348: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1354: dereferencing pointer to incomplete type
pcidev24.rh9smp.c: At top level:
pcidev24.rh9smp.c:1404: variable `dev_fops' has initializer but incomplete type
pcidev24.rh9smp.c:1406: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1406: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1407: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1407: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1408: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1408: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1409: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1409: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1410: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1410: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1411: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1411: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1412: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1412: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1413: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1413: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1414: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1414: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1415: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1415: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1416: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1416: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1417: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1417: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1418: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1418: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1419: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1419: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1420: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1420: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1421: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1421: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1422: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1422: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1424: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1424: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c: In function `free_resources':
pcidev24.rh9smp.c:1433: warning: implicit declaration of function `kfree'
pcidev24.rh9smp.c:1440: warning: implicit declaration of function `free_irq'
pcidev24.rh9smp.c:1448: warning: implicit declaration of function `iounmap'
pcidev24.rh9smp.c:1454: warning: implicit declaration of function `unregister_chrdev'
pcidev24.rh9smp.c: In function `init_module':
pcidev24.rh9smp.c:1472: warning: implicit declaration of function `pci_present'
pcidev24.rh9smp.c:1477: warning: implicit declaration of function `pci_find_device'
pcidev24.rh9smp.c:1477: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1481: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1497: warning: implicit declaration of function `sprintf'
pcidev24.rh9smp.c:1498: warning: implicit declaration of function `pci_read_config_byte'
pcidev24.rh9smp.c:1505: warning: implicit declaration of function `register_chrdev'
pcidev24.rh9smp.c:1511: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1513: warning: implicit declaration of function `pci_write_config_byte'
pcidev24.rh9smp.c:1514: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1518: warning: implicit declaration of function `pci_read_config_word'
pcidev24.rh9smp.c:1520: warning: implicit declaration of function `pci_write_config_word'
pcidev24.rh9smp.c:1525: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1529: warning: implicit declaration of function `pci_write_config_dword'
pcidev24.rh9smp.c:1543: warning: implicit declaration of function `ioremap_nocache'
pcidev24.rh9smp.c:1543: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1544: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1545: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1572: warning: implicit declaration of function `request_irq'
pcidev24.rh9smp.c:1580: warning: implicit declaration of function `kmalloc'
pcidev24.rh9smp.c:1580: `GFP_KERNEL' undeclared (first use in this function)
pcidev24.rh9smp.c:1580: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1581: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1587: warning: assignment makes pointer from integer without a cast
/usr/include/asm/irq.h: At top level:
pcidev24.rh9smp.c:1404: storage size of `dev_fops' isn't known

-------------------------------------------------------------------------------


Can Anyone help please ?


B C Joshi
 
Old 06-03-2004, 04:04 AM   #2
bcj
LQ Newbie
 
Registered: May 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Hi all,

Is there no one out there who can help me ?

B C Joshi
 
Old 06-15-2004, 12:14 AM   #3
bcj
LQ Newbie
 
Registered: May 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Very disappointing

No help at all

B C Joshi
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I install a new PCI card or swap one out in Mandrake? CyberLord_7 Mandriva 4 04-21-2004 08:55 AM
Dynalink IS64PH PCI ISDN card with 2.4.20 kernel eoin_too Linux - Hardware 0 03-01-2004 06:05 AM
Is it hard to install wireless pci card? lonny Linux - Hardware 8 12-03-2003 03:13 PM
Urgent help needed - Wireless card not recognized during boot kmahesh Linux - Wireless Networking 3 05-07-2003 08:33 AM
install unsupported pci sound card .... rickdom Linux - General 2 04-16-2002 01:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration