diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla2x00.c linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla2x00.c --- linux-2.4.19/drivers/scsi/qla2xxx/qla2x00.c 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla2x00.c 2003-04-02 09:32:26.000000000 +0200 @@ -33,9 +33,7 @@ * Include files */ #include -#if defined(MODULE) #include -#endif #if !defined(LINUX_VERSION_CODE) #include @@ -105,9 +103,9 @@ * options would be SIGPWR, I suppose. */ #define SHUTDOWN_SIGS (sigmask(SIGHUP)) -#include "sd.h" -#include "scsi.h" -#include "hosts.h" +#include "../sd.h" +#include "../scsi.h" +#include "../hosts.h" #ifdef __VMWARE__ #include "vmklinux_dist.h" #endif @@ -262,6 +260,7 @@ #if STOP_ON_ERROR static void qla2x00_panic(char *, struct Scsi_Host *host); #endif +static void qla2x00_print_scsi_cmd(Scsi_Cmnd *cmd); #if 0 @@ -269,7 +268,7 @@ #endif STATIC void qla2x00_mem_free(scsi_qla_host_t *ha); -void qla2x00_do_dpc(void *p); +STATIC void qla2x00_do_dpc(void *p); static inline void qla2x00_callback(scsi_qla_host_t *ha, Scsi_Cmnd *cmd); @@ -337,14 +336,14 @@ STATIC void qla2x00_reset_chip(scsi_qla_host_t *ha); STATIC void qla2x00_display_fc_names(scsi_qla_host_t *ha); -void qla2x00_dump_requests(scsi_qla_host_t *ha); +static void qla2x00_dump_requests(scsi_qla_host_t *ha); static void qla2x00_get_properties(scsi_qla_host_t *ha, char *string); STATIC uint8_t qla2x00_find_propname(scsi_qla_host_t *ha, char *propname, char *propstr, char *db, int siz); static int qla2x00_get_prop_16chars(scsi_qla_host_t *ha, char *propname, char *propval, char *cmdline); static char *qla2x00_get_line(char *str, char *line); -void qla2x00_check_fabric_devices(scsi_qla_host_t *ha); +static void qla2x00_check_fabric_devices(scsi_qla_host_t *ha); #if defined(FC_IP_SUPPORT) /* General support routines */ @@ -418,16 +417,16 @@ STATIC uint8_t qla2x00_64bit_start_scsi(srb_t *sp); /* Routines for Failover */ -os_tgt_t *qla2x00_tgt_alloc(scsi_qla_host_t *ha, uint16_t t); +static os_tgt_t *qla2x00_tgt_alloc(scsi_qla_host_t *ha, uint16_t t); #if APIDEV static int apidev_init(struct Scsi_Host*); static int apidev_cleanup(void); #endif -void qla2x00_tgt_free(scsi_qla_host_t *ha, uint16_t t); -os_lun_t *qla2x00_lun_alloc(scsi_qla_host_t *ha, uint16_t t, uint16_t l); +static void qla2x00_tgt_free(scsi_qla_host_t *ha, uint16_t t); +static os_lun_t *qla2x00_lun_alloc(scsi_qla_host_t *ha, uint16_t t, uint16_t l); static void qla2x00_lun_free(scsi_qla_host_t *ha, uint16_t t, uint16_t l); -void qla2x00_next(scsi_qla_host_t *vis_ha); +static void qla2x00_next(scsi_qla_host_t *vis_ha); static int qla2x00_build_fcport_list(scsi_qla_host_t *ha); static void qla2x00_config_os(scsi_qla_host_t *ha); static uint16_t qla2x00_fcport_bind(scsi_qla_host_t *ha, fc_port_t *fcport); @@ -441,19 +440,19 @@ STATIC int qla2x00_device_reset(scsi_qla_host_t *, uint16_t, uint16_t); static inline int qla2x00_is_wwn_zero(uint8_t *wwn); -void qla2x00_get_lun_mask_from_config(scsi_qla_host_t *ha, fc_port_t *port, +static void qla2x00_get_lun_mask_from_config(scsi_qla_host_t *ha, fc_port_t *port, uint16_t tgt, uint16_t dev_no); -void +static void qla2x00_print_q_info(os_lun_t *q); #if QLA2X_PERFORMANCE -void qla2x00_done_tasklet(long p); +static void qla2x00_done_tasklet(long p); #endif STATIC void qla2x00_failover_cleanup(srb_t *); void qla2x00_flush_failover_q(scsi_qla_host_t *, os_lun_t *); -void qla2x00_chg_endian(uint8_t buf[], size_t size); +static void qla2x00_chg_endian(uint8_t buf[], size_t size); STATIC uint8_t qla2x00_check_sense(Scsi_Cmnd *cp, os_lun_t *); STATIC uint8_t @@ -494,8 +493,8 @@ STATIC void qla2x00_sleep_done (struct semaphore * sem); #endif -uint8_t qla2x00_allocate_sp_pool( scsi_qla_host_t *ha); -void qla2x00_free_sp_pool(scsi_qla_host_t *ha ); +STATIC uint8_t qla2x00_allocate_sp_pool( scsi_qla_host_t *ha); +STATIC void qla2x00_free_sp_pool(scsi_qla_host_t *ha ); STATIC srb_t * qla2x00_get_new_sp (scsi_qla_host_t *ha); STATIC uint8_t qla2x00_check_tgt_status(scsi_qla_host_t *ha, Scsi_Cmnd *cmd); STATIC uint8_t qla2x00_check_port_status(scsi_qla_host_t *ha, @@ -636,7 +635,7 @@ /* Debug print buffer */ -char debug_buff[LINESIZE*3]; +static char debug_buff[LINESIZE*3]; /* * insmod needs to find the variable and make it point to something @@ -799,8 +798,6 @@ #include "qla_debug.h" -uint8_t copyright[48] = "Copyright 1999-2003, QLogic Corporation"; - /****************************************************************************/ /* LINUX - Loadable Module Functions. */ /****************************************************************************/ @@ -996,7 +993,7 @@ * * Returns: *************************************************************************/ -int +static int qla2x00_set_info(char *buffer, int length, struct Scsi_Host *HBAptr) { return (-ENOSYS); /* Currently this is a no-op */ @@ -1075,7 +1072,7 @@ * < 0: error. errno value. * >= 0: sizeof data returned. *************************************************************************/ -int +static int qla2x00_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout) { @@ -1645,7 +1642,7 @@ * None. * Note:Need to add the support for if( sp->state == SRB_FAILOVER_STATE). **************************************************************************/ -void +static void qla2x00_cmd_timeout(srb_t *sp) { int t, l; @@ -1883,7 +1880,7 @@ * Returns: * num - number of host adapters found. **************************************************************************/ -int +static int qla2x00_detect(Scsi_Host_Template *template) { device_reg_t *reg; @@ -2480,7 +2477,7 @@ * Returns: * 0 - Always returns good status **************************************************************************/ -int +static int qla2x00_release(struct Scsi_Host *host) { scsi_qla_host_t *ha = (scsi_qla_host_t *) host->hostdata; @@ -2608,7 +2605,7 @@ * Returns: * Return a text string describing the driver. **************************************************************************/ -const char * +static const char * qla2x00_info(struct Scsi_Host *host) { static char qla2x00_buffer[255]; @@ -2809,7 +2806,7 @@ * interrupt handler may call this routine as part of request-completion * handling). **************************************************************************/ -int +static int qla2x00_queuecommand(Scsi_Cmnd *cmd, void (*fn)(Scsi_Cmnd *)) { fc_port_t *fcport; @@ -3116,7 +3113,7 @@ * * Note: **************************************************************************/ -int +static int qla2xxx_eh_abort(Scsi_Cmnd *cmd) { int i; @@ -3477,7 +3474,7 @@ * SUCCESS/FAILURE (defined as macro in scsi.h). * **************************************************************************/ -int +static int qla2xxx_eh_device_reset(Scsi_Cmnd *cmd) { int return_status = SUCCESS; @@ -3686,7 +3683,7 @@ * SUCCESS/FAILURE (defined as macro in scsi.h). * **************************************************************************/ -int +static int qla2xxx_eh_bus_reset(Scsi_Cmnd *cmd) { int return_status = SUCCESS; @@ -3831,7 +3828,7 @@ * * Note: **************************************************************************/ -int +static int qla2xxx_eh_host_reset(Scsi_Cmnd *cmd) { int return_status = SUCCESS; @@ -4002,7 +3999,7 @@ * Description: * Return the disk geometry for the given SCSI device. **************************************************************************/ -int +static int qla2x00_biosparam(Disk *disk, kdev_t dev, int geom[]) { int heads, sectors, cylinders; @@ -4031,7 +4028,7 @@ * * Context: Interrupt **************************************************************************/ -void +static void qla2x00_intr_handler(int irq, void *dev_id, struct pt_regs *regs) { unsigned long flags = 0; @@ -4137,7 +4134,7 @@ * p -- pointer to hba struct * */ -void +static void qla2x00_done_tasklet(long p) { scsi_qla_host_t *ha = (scsi_qla_host_t *) p; @@ -4169,7 +4166,7 @@ * the timer routine detects a event it will one of the task * bits then wake us up. **************************************************************************/ -void +static void qla2x00_do_dpc(void *p) { #ifndef __VMWARE__ @@ -4680,7 +4677,7 @@ * as the default queue depth. Otherwise, we use either 4 or 8 as the * default queue depth (dependent on the number of hardware SCBs). **************************************************************************/ -void +static void qla2x00_device_queue_depth(scsi_qla_host_t *p, Scsi_Device *device) { int default_depth = 16; @@ -7957,7 +7954,7 @@ * Returns: * 0 = success */ -int +static int qla2x00_restart_isp(scsi_qla_host_t *ha) { uint8_t status = 0; @@ -12022,7 +12019,7 @@ * This routine will wait for fabric devices for * the reset delay. */ -void qla2x00_check_fabric_devices(scsi_qla_host_t *ha) +static void qla2x00_check_fabric_devices(scsi_qla_host_t *ha) { uint16_t fw_state; @@ -15016,7 +15013,7 @@ * Context: * Kernel context. */ -os_tgt_t * +static os_tgt_t * qla2x00_tgt_alloc(scsi_qla_host_t *ha, uint16_t t) { os_tgt_t *tq; @@ -15072,7 +15069,7 @@ * Context: * Kernel context. */ -void +static void qla2x00_tgt_free(scsi_qla_host_t *ha, uint16_t t) { os_tgt_t *tq; @@ -15121,7 +15118,7 @@ * Context: * Kernel context. */ -os_lun_t * +static os_lun_t * qla2x00_lun_alloc(scsi_qla_host_t *ha, uint16_t t, uint16_t l) { os_lun_t *lq; @@ -15245,7 +15242,7 @@ * * Note: This routine will always try to start I/O from visible HBA. */ -void +static void qla2x00_next(scsi_qla_host_t *vis_ha) { scsi_qla_host_t *dest_ha; @@ -15532,7 +15529,7 @@ * Context: * Kernel context. */ -int +static int qla2x00_get_prop_xstr(scsi_qla_host_t *ha, char *propname, uint8_t *propval, int size) { @@ -15585,7 +15582,7 @@ * Context: * Kernel context. */ -void +static void qla2x00_chg_endian(uint8_t buf[], size_t size) { uint8_t byte; @@ -15614,7 +15611,7 @@ * * Note: Sets the ref_count for non Null sp to one. */ -uint8_t +static uint8_t qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) { srb_t *sp; @@ -15673,7 +15670,7 @@ * This routine frees all adapter allocated memory. * */ -void +static void qla2x00_free_sp_pool( scsi_qla_host_t *ha) { struct list_head *list, *temp; @@ -16402,7 +16399,7 @@ * Declarations for load module */ static Scsi_Host_Template driver_template = QLA2100_LINUX_TEMPLATE; -#include "scsi_module.c" +#include "../scsi_module.c" /****************************************************************************/ /* Driver Debug Functions. */ @@ -16440,7 +16437,7 @@ * Input * cmd : Scsi_Cmnd **************************************************************************/ -void +static void qla2x00_print_scsi_cmd(Scsi_Cmnd * cmd) { struct scsi_qla_host *ha; @@ -16495,7 +16492,7 @@ * Input * q: lun queue */ -void +static void qla2x00_print_q_info(struct os_lun *q) { printk("Queue info: flags=0x%lx\n", q->q_flag); @@ -16643,7 +16640,7 @@ * qla2x00_dump_requests * **************************************************************************/ -void +static void qla2x00_dump_requests(scsi_qla_host_t *ha) { @@ -16980,7 +16977,7 @@ * kmem_zalloc * Allocate and zero out the block of memory */ -inline void * +static inline void * kmem_zalloc( int siz, int code, int id) { uint8_t *bp; diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla2x00.h linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla2x00.h --- linux-2.4.19/drivers/scsi/qla2xxx/qla2x00.h 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla2x00.h 2003-04-02 09:27:16.000000000 +0200 @@ -2782,7 +2782,7 @@ } #endif -void qla2x00_device_queue_depth(scsi_qla_host_t *, Scsi_Device *); +static void qla2x00_device_queue_depth(scsi_qla_host_t *, Scsi_Device *); #endif #if defined(__386__) @@ -2794,19 +2794,19 @@ /* * Linux - SCSI Driver Interface Function Prototypes. */ -int qla2x00_ioctl(Scsi_Device *, int , void *); -int qla2x00_proc_info ( char *, char **, off_t, int, int, int); -const char * qla2x00_info(struct Scsi_Host *host); -int qla2x00_detect(Scsi_Host_Template *); -int qla2x00_release(struct Scsi_Host *); -const char * qla2x00_info(struct Scsi_Host *); -int qla2x00_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); +static int qla2x00_ioctl(Scsi_Device *, int , void *); +static int qla2x00_proc_info ( char *, char **, off_t, int, int, int); +static const char * qla2x00_info(struct Scsi_Host *host); +static int qla2x00_detect(Scsi_Host_Template *); +static int qla2x00_release(struct Scsi_Host *); +static const char * qla2x00_info(struct Scsi_Host *); +static int qla2x00_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); int qla2x00_abort(Scsi_Cmnd *); int qla2x00_reset(Scsi_Cmnd *, unsigned int); -int qla2x00_biosparam(Disk *, kdev_t, int[]); -void qla2x00_intr_handler(int, void *, struct pt_regs *); +static int qla2x00_biosparam(Disk *, kdev_t, int[]); +static void qla2x00_intr_handler(int, void *, struct pt_regs *); #if !defined(MODULE) -static int __init qla2100_setup (char *s); +static int __init qla2x00_setup (char *s); #else void qla2x00_setup(char *s); #endif diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla2x00_ioctl.c linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla2x00_ioctl.c --- linux-2.4.19/drivers/scsi/qla2xxx/qla2x00_ioctl.c 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla2x00_ioctl.c 2003-04-02 09:33:15.000000000 +0200 @@ -39,12 +39,12 @@ #if defined(INTAPI) #include "inioct.h" /* from qla_inioct.c */ -extern int qla2x00_read_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); -extern int qla2x00_update_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); -extern int qla2x00_write_nvram_word(scsi_qla_host_t *, uint8_t, uint16_t); -extern int qla2x00_send_loopback(scsi_qla_host_t *, EXT_IOCTL *, int); -extern int qla2x00_read_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); -extern int qla2x00_update_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_read_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_update_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_write_nvram_word(scsi_qla_host_t *, uint8_t, uint16_t); +static int qla2x00_send_loopback(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_read_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_update_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); #endif @@ -239,7 +239,7 @@ * ret != 0 Failed; detailed status copied to EXT_IOCTL structure * if possible *************************************************************************/ -int +STATIC int qla2x00_ioctl(Scsi_Device *dev, int cmd, void *arg) { int mode = 0; diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla_fo.cfg linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_fo.cfg --- linux-2.4.19/drivers/scsi/qla2xxx/qla_fo.cfg 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_fo.cfg 2003-04-02 09:27:16.000000000 +0200 @@ -20,9 +20,9 @@ /* * QLogic ISP2x00 Multi-path LUN Support Driver */ -int MaxPathsPerDevice = 0; -int MaxRetriesPerPath =0 ; -int MaxRetriesPerIo =0; +static int MaxPathsPerDevice = 0; +static int MaxRetriesPerPath =0 ; +static int MaxRetriesPerIo =0; #if defined(MODULE) /* insmod qla2100 ql2xopts= */ MODULE_PARM(MaxPathsPerDevice, "i"); diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla_gbl.h linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_gbl.h --- linux-2.4.19/drivers/scsi/qla2xxx/qla_gbl.h 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_gbl.h 2003-04-02 09:27:16.000000000 +0200 @@ -38,7 +38,7 @@ /* * Global Function Prototypes in qla2x00.c source file. */ -extern int qla2x00_get_prop_xstr(scsi_qla_host_t *, char *, uint8_t *, int); +static int qla2x00_get_prop_xstr(scsi_qla_host_t *, char *, uint8_t *, int); extern void qla2x00_formatted_print(char *, uint64_t , uint8_t, uint8_t); extern void qla2x00_formatted_dump_buffer(char *, uint8_t *, uint8_t , diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla_inioct.c linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_inioct.c --- linux-2.4.19/drivers/scsi/qla2xxx/qla_inioct.c 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_inioct.c 2003-04-02 09:34:01.000000000 +0200 @@ -19,17 +19,17 @@ #include "inioct.h" -extern int qla2x00_loopback_test(scsi_qla_host_t *ha, INT_LOOPBACK_REQ *req, +static int qla2x00_loopback_test(scsi_qla_host_t *ha, INT_LOOPBACK_REQ *req, uint16_t *ret_mb); -int qla2x00_read_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); -int qla2x00_update_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); -int qla2x00_write_nvram_word(scsi_qla_host_t *, uint8_t, uint16_t); -int qla2x00_send_loopback(scsi_qla_host_t *, EXT_IOCTL *, int); -int qla2x00_read_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); -int qla2x00_update_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_read_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_update_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_write_nvram_word(scsi_qla_host_t *, uint8_t, uint16_t); +static int qla2x00_send_loopback(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_read_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_update_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); -int +static int qla2x00_read_nvram(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) { uint8_t *usr_temp, *kernel_tmp; @@ -83,7 +83,7 @@ * Context: * Kernel context. */ -int +static int qla2x00_update_nvram(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) { uint8_t i, cnt; @@ -157,7 +157,7 @@ return 0; } -int +static int qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint8_t addr, uint16_t data) { int count; @@ -233,7 +233,7 @@ return 0; } -int +static int qla2x00_send_loopback(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) { int status; diff -urN linux-2.4.19/drivers/scsi/qla2xxx/qla_mbx.c linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_mbx.c --- linux-2.4.19/drivers/scsi/qla2xxx/qla_mbx.c 2003-04-02 09:26:58.000000000 +0200 +++ linux-2.4.19.SuSE/drivers/scsi/qla2xxx/qla_mbx.c 2003-04-02 09:27:16.000000000 +0200 @@ -93,7 +93,7 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *, uint8_t *, uint8_t *); #if defined(INTAPI) -int +static int qla2x00_loopback_test(scsi_qla_host_t *, INT_LOOPBACK_REQ *, uint16_t *); #endif