Commit 408dea0e authored by Adrian Bunk's avatar Adrian Bunk Committed by James Bottomley

[PATCH] kill scsi_syms.c

The patch below removes scsi_syms.c and moves the EXPORT_SYMBOL's to the
files where the actual functions are.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 25ba664f
......@@ -363,8 +363,8 @@ and Adaptec have their own coding conventions.
Mid level supplied functions
============================
These functions are supplied by the SCSI mid level for use by LLDs.
The names (i.e. entry points) of these functions are exported (mainly in
scsi_syms.c) so an LLD that is a module can access them. The kernel will
The names (i.e. entry points) of these functions are exported
so an LLD that is a module can access them. The kernel will
arrange for the SCSI mid level to be loaded and initialized before any LLD
is initialized. The functions below are listed alphabetically and their
names all start with "scsi_".
......
......@@ -143,7 +143,7 @@ obj-$(CONFIG_CHR_DEV_SG) += sg.o
scsi_mod-y += scsi.o hosts.o scsi_ioctl.o constants.o \
scsicam.o scsi_error.o scsi_lib.o \
scsi_scan.o scsi_syms.o scsi_sysfs.o \
scsi_scan.o scsi_sysfs.o \
scsi_devinfo.o
scsi_mod-$(CONFIG_SYSCTL) += scsi_sysctl.o
scsi_mod-$(CONFIG_SCSI_PROC_FS) += scsi_proc.o
......
......@@ -352,6 +352,7 @@ void __scsi_print_command(unsigned char *command)
printk(" %02x", command[k]);
printk("\n");
}
EXPORT_SYMBOL(__scsi_print_command);
/* This function (perhaps with the addition of peripheral device type)
* is more approriate than __scsi_print_command(). Perhaps that static
......@@ -403,6 +404,7 @@ scsi_print_status(unsigned char scsi_status) {
printk(KERN_INFO "0x%0x", scsi_status);
#endif
}
EXPORT_SYMBOL(scsi_print_status);
#ifdef CONFIG_SCSI_CONSTANTS
......@@ -1106,6 +1108,7 @@ scsi_sense_key_string(unsigned char key) {
#endif
return NULL;
}
EXPORT_SYMBOL(scsi_sense_key_string);
/*
* Get additional sense code string or NULL if not available.
......@@ -1128,6 +1131,7 @@ scsi_extd_sense_format(unsigned char asc, unsigned char ascq) {
#endif
return NULL;
}
EXPORT_SYMBOL(scsi_extd_sense_format);
/* Print extended sense information; no leadin, no linefeed */
static void
......@@ -1256,12 +1260,14 @@ void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
print_sense_internal(devclass, cmd->sense_buffer,
SCSI_SENSE_BUFFERSIZE, cmd->request);
}
EXPORT_SYMBOL(scsi_print_sense);
void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq)
{
print_sense_internal(devclass, sreq->sr_sense_buffer,
SCSI_SENSE_BUFFERSIZE, sreq->sr_request);
}
EXPORT_SYMBOL(scsi_print_req_sense);
#ifdef CONFIG_SCSI_CONSTANTS
static const char *one_byte_msgs[] = {
......@@ -1340,6 +1346,7 @@ int scsi_print_msg (const unsigned char *msg)
printk("reserved");
return len;
}
EXPORT_SYMBOL(scsi_print_msg);
#else /* ifndef CONFIG_SCSI_CONSTANTS */
......@@ -1367,6 +1374,7 @@ int scsi_print_msg (const unsigned char *msg)
printk("%02x ", msg[0]);
return len;
}
EXPORT_SYMBOL(scsi_print_msg);
#endif /* ! CONFIG_SCSI_CONSTANTS */
void scsi_print_command(struct scsi_cmnd *cmd)
......@@ -1379,6 +1387,7 @@ void scsi_print_command(struct scsi_cmnd *cmd)
printk(KERN_INFO " command: ");
scsi_print_cdb(cmd->cmnd, cmd->cmd_len, 0);
}
EXPORT_SYMBOL(scsi_print_command);
#ifdef CONFIG_SCSI_CONSTANTS
......
......@@ -86,6 +86,7 @@ void scsi_remove_host(struct Scsi_Host *shost)
class_device_unregister(&shost->transport_classdev);
device_del(&shost->shost_gendev);
}
EXPORT_SYMBOL(scsi_remove_host);
/**
* scsi_add_host - add a scsi host
......@@ -150,6 +151,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
out:
return error;
}
EXPORT_SYMBOL(scsi_add_host);
static void scsi_host_dev_release(struct device *dev)
{
......@@ -306,6 +308,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
kfree(shost);
return NULL;
}
EXPORT_SYMBOL(scsi_host_alloc);
struct Scsi_Host *scsi_register(struct scsi_host_template *sht, int privsize)
{
......@@ -321,12 +324,14 @@ struct Scsi_Host *scsi_register(struct scsi_host_template *sht, int privsize)
list_add_tail(&shost->sht_legacy_list, &sht->legacy_hosts);
return shost;
}
EXPORT_SYMBOL(scsi_register);
void scsi_unregister(struct Scsi_Host *shost)
{
list_del(&shost->sht_legacy_list);
scsi_host_put(shost);
}
EXPORT_SYMBOL(scsi_unregister);
/**
* scsi_host_lookup - get a reference to a Scsi_Host by host no
......@@ -354,6 +359,7 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
return shost;
}
EXPORT_SYMBOL(scsi_host_lookup);
/**
* scsi_host_get - inc a Scsi_Host ref count
......@@ -366,6 +372,7 @@ struct Scsi_Host *scsi_host_get(struct Scsi_Host *shost)
return NULL;
return shost;
}
EXPORT_SYMBOL(scsi_host_get);
/**
* scsi_host_put - dec a Scsi_Host ref count
......@@ -375,6 +382,7 @@ void scsi_host_put(struct Scsi_Host *shost)
{
put_device(&shost->shost_gendev);
}
EXPORT_SYMBOL(scsi_host_put);
int scsi_init_hosts(void)
{
......
......@@ -98,6 +98,9 @@ static unsigned long serial_number;
* After the system is up, you may enable logging via the /proc interface.
*/
unsigned int scsi_logging_level;
#if defined(CONFIG_SCSI_LOGGING)
EXPORT_SYMBOL(scsi_logging_level);
#endif
const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = {
"Direct-Access ",
......@@ -115,6 +118,7 @@ const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = {
"RAID ",
"Enclosure ",
};
EXPORT_SYMBOL(scsi_device_types);
/*
* Function: scsi_allocate_request
......@@ -147,6 +151,7 @@ struct scsi_request *scsi_allocate_request(struct scsi_device *sdev,
return sreq;
}
EXPORT_SYMBOL(scsi_allocate_request);
void __scsi_release_request(struct scsi_request *sreq)
{
......@@ -187,6 +192,7 @@ void scsi_release_request(struct scsi_request *sreq)
__scsi_release_request(sreq);
kfree(sreq);
}
EXPORT_SYMBOL(scsi_release_request);
struct scsi_host_cmd_pool {
kmem_cache_t *slab;
......@@ -269,6 +275,7 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
return cmd;
}
EXPORT_SYMBOL(scsi_get_command);
/*
* Function: scsi_put_command()
......@@ -305,6 +312,7 @@ void scsi_put_command(struct scsi_cmnd *cmd)
put_device(&sdev->sdev_gendev);
}
EXPORT_SYMBOL(scsi_put_command);
/*
* Function: scsi_setup_command_freelist()
......@@ -961,6 +969,7 @@ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags)
spin_unlock(sdev->request_queue->queue_lock);
spin_unlock_irqrestore(&device_request_lock, flags);
}
EXPORT_SYMBOL(scsi_adjust_queue_depth);
/*
* Function: scsi_track_queue_full()
......@@ -1011,6 +1020,7 @@ int scsi_track_queue_full(struct scsi_device *sdev, int depth)
scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
return depth;
}
EXPORT_SYMBOL(scsi_track_queue_full);
/**
* scsi_device_get - get an addition reference to a scsi_device
......@@ -1177,6 +1187,7 @@ int scsi_device_cancel(struct scsi_device *sdev, int recovery)
return 0;
}
EXPORT_SYMBOL(scsi_device_cancel);
#ifdef CONFIG_HOTPLUG_CPU
static int scsi_cpu_notify(struct notifier_block *self,
......
......@@ -125,6 +125,7 @@ void scsi_add_timer(struct scsi_cmnd *scmd, int timeout,
add_timer(&scmd->eh_timeout);
}
EXPORT_SYMBOL(scsi_add_timer);
/**
* scsi_delete_timer - Delete/cancel timer for a given function.
......@@ -152,6 +153,7 @@ int scsi_delete_timer(struct scsi_cmnd *scmd)
return rtn;
}
EXPORT_SYMBOL(scsi_delete_timer);
/**
* scsi_times_out - Timeout function for normal scsi commands.
......@@ -214,6 +216,7 @@ int scsi_block_when_processing_errors(struct scsi_device *sdev)
return online;
}
EXPORT_SYMBOL(scsi_block_when_processing_errors);
#ifdef CONFIG_SCSI_LOGGING
/**
......@@ -1752,6 +1755,7 @@ void scsi_report_bus_reset(struct Scsi_Host *shost, int channel)
}
}
}
EXPORT_SYMBOL(scsi_report_bus_reset);
/*
* Function: scsi_report_device_reset()
......@@ -1787,6 +1791,7 @@ void scsi_report_device_reset(struct Scsi_Host *shost, int channel, int target)
}
}
}
EXPORT_SYMBOL(scsi_report_device_reset);
static void
scsi_reset_provider_done_command(struct scsi_cmnd *scmd)
......@@ -1866,6 +1871,7 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
scsi_next_command(scmd);
return rtn;
}
EXPORT_SYMBOL(scsi_reset_provider);
/**
* scsi_normalize_sense - normalize main elements from either fixed or
......
......@@ -173,6 +173,7 @@ int scsi_set_medium_removal(struct scsi_device *sdev, char state)
sdev->locked = (state == SCSI_REMOVAL_PREVENT);
return ret;
}
EXPORT_SYMBOL(scsi_set_medium_removal);
/*
* This interface is deprecated - users should use the scsi generic (sg)
......@@ -354,6 +355,7 @@ int scsi_ioctl_send_command(struct scsi_device *sdev,
kfree(buf);
return result;
}
EXPORT_SYMBOL(scsi_ioctl_send_command);
/*
* The scsi_ioctl_get_pci() function places into arg the value
......@@ -463,6 +465,7 @@ int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
}
return -EINVAL;
}
EXPORT_SYMBOL(scsi_ioctl);
/*
* the scsi_nonblock_ioctl() function is designed for ioctls which may
......
......@@ -233,7 +233,8 @@ void scsi_do_req(struct scsi_request *sreq, const void *cmnd,
*/
scsi_insert_special_req(sreq, 1);
}
EXPORT_SYMBOL(scsi_do_req);
static void scsi_wait_done(struct scsi_cmnd *cmd)
{
struct request *req = cmd->request;
......@@ -267,6 +268,7 @@ void scsi_wait_req(struct scsi_request *sreq, const void *cmnd, void *buffer,
__scsi_release_request(sreq);
}
EXPORT_SYMBOL(scsi_wait_req);
/*
* Function: scsi_init_cmd_errh()
......@@ -885,6 +887,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
cmd = scsi_end_request(cmd, 0, block_bytes, 1);
}
}
EXPORT_SYMBOL(scsi_io_completion);
/*
* Function: scsi_init_io()
......@@ -1345,6 +1348,7 @@ u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost)
return bounce_limit;
}
EXPORT_SYMBOL(scsi_calculate_bounce_limit);
struct request_queue *scsi_alloc_queue(struct scsi_device *sdev)
{
......@@ -1394,6 +1398,7 @@ void scsi_block_requests(struct Scsi_Host *shost)
{
shost->host_self_blocked = 1;
}
EXPORT_SYMBOL(scsi_block_requests);
/*
* Function: scsi_unblock_requests()
......@@ -1420,6 +1425,7 @@ void scsi_unblock_requests(struct Scsi_Host *shost)
shost->host_self_blocked = 0;
scsi_run_host_queues(shost);
}
EXPORT_SYMBOL(scsi_unblock_requests);
int __init scsi_init_queue(void)
{
......@@ -1554,6 +1560,7 @@ __scsi_mode_sense(struct scsi_request *sreq, int dbd, int modepage,
return sreq->sr_result;
}
EXPORT_SYMBOL(__scsi_mode_sense);
/**
* scsi_mode_sense - issue a mode sense, falling back from 10 to
......@@ -1588,6 +1595,7 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage,
return ret;
}
EXPORT_SYMBOL(scsi_mode_sense);
int
scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries)
......
......@@ -1096,6 +1096,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
return sdev;
}
EXPORT_SYMBOL(__scsi_add_device);
void scsi_rescan_device(struct device *dev)
{
......@@ -1239,6 +1240,7 @@ void scsi_scan_host(struct Scsi_Host *shost)
scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
SCAN_WILD_CARD, 0);
}
EXPORT_SYMBOL(scsi_scan_host);
void scsi_forget_host(struct Scsi_Host *shost)
{
......@@ -1293,6 +1295,7 @@ struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost)
}
return sdev;
}
EXPORT_SYMBOL(scsi_get_host_dev);
/*
* Function: scsi_free_host_dev()
......@@ -1317,3 +1320,5 @@ void scsi_free_host_dev(struct scsi_device *sdev)
sdev->host->transportt->device_destroy(sdev);
put_device(&sdev->sdev_gendev);
}
EXPORT_SYMBOL(scsi_free_host_dev);
/*
* We should not even be trying to compile this if we are not doing
* a module.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <scsi/scsi.h>
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_driver.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/scsi_request.h>
#include <scsi/scsicam.h>
#include "scsi_logging.h"
/*
* This source file contains the symbol table used by scsi loadable
* modules.
*/
EXPORT_SYMBOL(scsi_register_driver);
EXPORT_SYMBOL(scsi_register_interface);
EXPORT_SYMBOL(scsi_host_alloc);
EXPORT_SYMBOL(scsi_add_host);
EXPORT_SYMBOL(scsi_scan_host);
EXPORT_SYMBOL(scsi_remove_host);
EXPORT_SYMBOL(scsi_host_get);
EXPORT_SYMBOL(scsi_host_put);
EXPORT_SYMBOL(scsi_host_lookup);
EXPORT_SYMBOL(scsi_register);
EXPORT_SYMBOL(scsi_unregister);
EXPORT_SYMBOL(scsicam_bios_param);
EXPORT_SYMBOL(scsi_partsize);
EXPORT_SYMBOL(scsi_bios_ptable);
EXPORT_SYMBOL(scsi_ioctl);
EXPORT_SYMBOL(scsi_print_command);
EXPORT_SYMBOL(__scsi_print_command);
EXPORT_SYMBOL(scsi_print_sense);
EXPORT_SYMBOL(scsi_print_req_sense);
EXPORT_SYMBOL(scsi_print_msg);
EXPORT_SYMBOL(scsi_print_status);
EXPORT_SYMBOL(scsi_sense_key_string);
EXPORT_SYMBOL(scsi_extd_sense_format);
EXPORT_SYMBOL(scsi_block_when_processing_errors);
EXPORT_SYMBOL(scsi_ioctl_send_command);
EXPORT_SYMBOL(scsi_set_medium_removal);
#if defined(CONFIG_SCSI_LOGGING) /* { */
EXPORT_SYMBOL(scsi_logging_level);
#endif
EXPORT_SYMBOL(scsi_allocate_request);
EXPORT_SYMBOL(scsi_release_request);
EXPORT_SYMBOL(scsi_wait_req);
EXPORT_SYMBOL(scsi_do_req);
EXPORT_SYMBOL(scsi_get_command);
EXPORT_SYMBOL(scsi_put_command);
EXPORT_SYMBOL(scsi_report_bus_reset);
EXPORT_SYMBOL(scsi_report_device_reset);
EXPORT_SYMBOL(scsi_block_requests);
EXPORT_SYMBOL(scsi_unblock_requests);
EXPORT_SYMBOL(scsi_adjust_queue_depth);
EXPORT_SYMBOL(scsi_track_queue_full);
EXPORT_SYMBOL(scsi_get_host_dev);
EXPORT_SYMBOL(scsi_free_host_dev);
EXPORT_SYMBOL(scsi_io_completion);
EXPORT_SYMBOL(__scsi_add_device);
EXPORT_SYMBOL(scsi_remove_device);
EXPORT_SYMBOL(scsi_device_cancel);
EXPORT_SYMBOL(__scsi_mode_sense);
EXPORT_SYMBOL(scsi_mode_sense);
/*
* This symbol is for the highlevel drivers (e.g. sg) only.
*/
EXPORT_SYMBOL(scsi_reset_provider);
EXPORT_SYMBOL(scsi_device_types);
/*
* This is for st to find the bounce limit
*/
EXPORT_SYMBOL(scsi_calculate_bounce_limit);
/*
* Externalize timers so that HBAs can safely start/restart commands.
*/
EXPORT_SYMBOL(scsi_add_timer);
EXPORT_SYMBOL(scsi_delete_timer);
......@@ -611,6 +611,7 @@ void scsi_remove_device(struct scsi_device *sdev)
out:
up(&shost->scan_mutex);
}
EXPORT_SYMBOL(scsi_remove_device);
int scsi_register_driver(struct device_driver *drv)
{
......@@ -618,6 +619,7 @@ int scsi_register_driver(struct device_driver *drv)
return driver_register(drv);
}
EXPORT_SYMBOL(scsi_register_driver);
int scsi_register_interface(struct class_interface *intf)
{
......@@ -625,6 +627,7 @@ int scsi_register_interface(struct class_interface *intf)
return class_interface_register(intf);
}
EXPORT_SYMBOL(scsi_register_interface);
static struct class_device_attribute *class_attr_overridden(
......
......@@ -41,6 +41,7 @@ unsigned char *scsi_bios_ptable(struct block_device *dev)
}
return res;
}
EXPORT_SYMBOL(scsi_bios_ptable);
/*
* Function : int scsicam_bios_param (struct block_device *bdev, ector_t capacity, int *ip)
......@@ -94,6 +95,7 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
return 0;
}
EXPORT_SYMBOL(scsicam_bios_param);
/*
* Function : static int scsi_partsize(unsigned char *buf, unsigned long
......@@ -175,6 +177,7 @@ int scsi_partsize(unsigned char *buf, unsigned long capacity,
}
return -1;
}
EXPORT_SYMBOL(scsi_partsize);
/*
* Function : static int setsize(unsigned long capacity,unsigned int *cyls,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment