LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 12-09-2007, 01:18 PM   #1
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Rep: Reputation: 30
Compiling 2.6.23: implicit declaration of function ‘scsi_device_cancel’


This is the end message that I get after 'make modules'

drivers/scsi/rr174x/os_linux.c: In function ‘os_sd_changed’:
drivers/scsi/rr174x/os_linux.c:315: error: implicit declaration of function ‘scsi_device_cancel’
make[3]: *** [drivers/scsi/rr174x/os_linux.o] Error 1
make[2]: *** [drivers/scsi/rr174x] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2

and this is an excerpt from my config file

edhe@hebrews:~$ less /usr/local/linux-2.6.23/.config | grep DRIVER
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_WAN_ROUTER_DRIVERS=m
CONFIG_ATM_DRIVERS=y
CONFIG_RAW_DRIVER=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
CONFIG_V4L_USB_DRIVERS=y
CONFIG_DVB_CAPTURE_DRIVERS=y

edhe@hebrews:~$ less /usr/local/linux-2.6.23/.config | grep SCSI
CONFIG_CISS_SCSI_TAPE=y
# CONFIG_BLK_DEV_IDESCSI is not set
# SCSI device support
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=m
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y
# SCSI support type (disk, tape, CD-ROM)
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m
# SCSI Transports
CONFIG_SCSI_SPI_ATTRS=m
CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_ISCSI_ATTRS=m
CONFIG_SCSI_SAS_ATTRS=m
# CONFIG_SCSI_SAS_LIBSAS is not set
CONFIG_SCSI_LOWLEVEL=y
CONFIG_SCSI_RR174X=m
# CONFIG_ISCSI_TCP is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
CONFIG_SCSI_EATA=m
# CONFIG_SCSI_EATA_TAGGED_QUEUE is not set
# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set
CONFIG_SCSI_EATA_MAX_TAGS=16
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
CONFIG_SCSI_DC390T=m
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
CONFIG_I2O_SCSI=m
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 
Old 12-09-2007, 02:41 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 63
If you do not need the RR174X module then set it to =n in your config and the error will go away plus why are you doing the compilation without the make-kpkg program it is an easy way to get a .deb file that you can install with dpkg -i linux-image-??????.deb.
 
Old 12-09-2007, 05:26 PM   #3
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Original Poster
Rep: Reputation: 30
I will look into the make-kpkg. Thank You. I however do need the RR174X module - this being the reason why I am working with the 2.6.23 kernel. My present kernel, 2.6.18, doesn't recognize the High Point RocketRaid Controller.
 
Old 12-09-2007, 06:34 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 63
That sucks then its always the one you need that does not compile. BTW where are you getting that option for it from have you patched your kernel?? Because looking at my .config for a 64bit kernel it does not appear anywhere in it but looking at the section in menuconfig I see the CONFIG_SCSI_HPTIOP is for the Rocket Raid 3xxx series perhaps it may be worth looking at if you have similar. Other than this I would suggest email the author of the module his/her email should be in the comments of the module source file.

# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set

Edit: The proper name for the make-kpkg program for installation if you want it is the kernel-package package.

Last edited by HappyTux; 12-09-2007 at 06:36 PM.
 
Old 12-10-2007, 02:16 PM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by fof3 View Post
I will look into the make-kpkg. Thank You. I however do need the RR174X module - this being the reason why I am working with the 2.6.23 kernel. My present kernel, 2.6.18, doesn't recognize the High Point RocketRaid Controller.
You’re not making any sense. No vanilla kernel has support for rr174x. In order to get that particular module, you have to download sources from here. With those patches, you can chose either to patch your kernel source, or compile an out-of-tree module. Regardless, there is nothing in the instructions about the using kernel 2.6.23 or greater.

Anyway, it seems you must use a kernel with a version less than 2.6.23 (unless you want to do more patching). The mentioned function has been removed from 2.6.22 to 2.6.23.

Solution:
  1. Use the patch on a kernel with version 2.6.22 or less.
  2. If you still want to use the 2.6.23, apply this patch in reverse to the kernel sources. Here is a copy-pastable (and forward) version:
    Code:
    diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
    index 64c8595..4c1e313 100644
    --- a/drivers/scsi/scsi.c
    +++ b/drivers/scsi/scsi.c
    @@ -1016,6 +1016,52 @@ struct scsi_device *scsi_device_lookup(struct Scsi_Host *shost,
     }
     EXPORT_SYMBOL(scsi_device_lookup);
     
    +/**
    + * scsi_device_cancel - cancel outstanding IO to this device
    + * @sdev:	Pointer to struct scsi_device
    + * @recovery:	Boolean instructing function to recover device or not.
    + *
    + **/
    +int scsi_device_cancel(struct scsi_device *sdev, int recovery)
    +{
    +	struct scsi_cmnd *scmd;
    +	LIST_HEAD(active_list);
    +	struct list_head *lh, *lh_sf;
    +	unsigned long flags;
    +
    +	scsi_device_set_state(sdev, SDEV_CANCEL);
    +
    +	spin_lock_irqsave(&sdev->list_lock, flags);
    +	list_for_each_entry(scmd, &sdev->cmd_list, list) {
    +		if (scmd->request) {
    +			/*
    +			 * If we are unable to remove the timer, it means
    +			 * that the command has already timed out or
    +			 * finished.
    +			 */
    +			if (!scsi_delete_timer(scmd))
    +				continue;
    +			list_add_tail(&scmd->eh_entry, &active_list);
    +		}
    +	}
    +	spin_unlock_irqrestore(&sdev->list_lock, flags);
    +
    +	if (!list_empty(&active_list)) {
    +		list_for_each_safe(lh, lh_sf, &active_list) {
    +			scmd = list_entry(lh, struct scsi_cmnd, eh_entry);
    +			list_del_init(lh);
    +			if (recovery &&
    +			    !scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD)) {
    +				scmd->result = (DID_ABORT << 16);
    +				scsi_finish_command(scmd);
    +			}
    +		}
    +	}
    +
    +	return 0;
    +}
    +EXPORT_SYMBOL(scsi_device_cancel);
    +
     MODULE_DESCRIPTION("SCSI core");
     MODULE_LICENSE("GPL");
     
    diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
    index d5057bc..6fe1cf6 100644
    --- a/include/scsi/scsi_device.h
    +++ b/include/scsi/scsi_device.h
    @@ -209,6 +209,7 @@ extern struct scsi_device *__scsi_add_device(struct Scsi_Host *,
     extern int scsi_add_device(struct Scsi_Host *host, uint channel,
     			   uint target, uint lun);
     extern void scsi_remove_device(struct scsi_device *);
    +extern int scsi_device_cancel(struct scsi_device *, int);
     
     extern int scsi_device_get(struct scsi_device *);
     extern void scsi_device_put(struct scsi_device *);
    Note that this is only a quick-fix and won’t necessarily work with newer kernels. The appropriate fix would be from the vendor.

Last edited by osor; 12-10-2007 at 04:51 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
warning: implicit declaration of function liguorir Linux - Software 5 10-22-2012 03:20 PM
warning: implicit declaration of function `snprintf' BiThian Programming 13 10-06-2011 04:26 PM
error:implicit declaration of function ‘get_filesystem_list’ swift_a2002 Programming 1 05-15-2007 03:27 AM
warning: incompatible implicit declaration of built-in function ‘exit’ xzotech Programming 1 08-14-2005 05:43 AM
implicit declaration of function 'getdelim' MicahCarrick Programming 2 05-02-2005 11:03 AM


All times are GMT -5. The time now is 01:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration