diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-05-23 17:41:35 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-27 16:05:10 -0400 |
commit | 70c8d897763e19405a160de729e62a0e727150d2 (patch) | |
tree | 98b504042cd6dc9c893e18327e1b75b34bc4b85f /drivers | |
parent | d7dea2cf80f0c9eea795b4012e4c86205dda9882 (diff) |
[SCSI] advansys: cleanups
- remove the unneeded advansys.h
- remove the unused advansys_setup()
- make needlessly global functions static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/advansys.c | 101 | ||||
-rw-r--r-- | drivers/scsi/advansys.h | 36 |
2 files changed, 8 insertions, 129 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 9b3303b64113..2b6689709e53 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -798,7 +798,6 @@ | |||
798 | #include <scsi/scsi_tcq.h> | 798 | #include <scsi/scsi_tcq.h> |
799 | #include <scsi/scsi.h> | 799 | #include <scsi/scsi.h> |
800 | #include <scsi/scsi_host.h> | 800 | #include <scsi/scsi_host.h> |
801 | #include "advansys.h" | ||
802 | #ifdef CONFIG_PCI | 801 | #ifdef CONFIG_PCI |
803 | #include <linux/pci.h> | 802 | #include <linux/pci.h> |
804 | #endif /* CONFIG_PCI */ | 803 | #endif /* CONFIG_PCI */ |
@@ -2014,7 +2013,7 @@ STATIC int AscSgListToQueue(int); | |||
2014 | STATIC void AscEnableIsaDma(uchar); | 2013 | STATIC void AscEnableIsaDma(uchar); |
2015 | #endif /* CONFIG_ISA */ | 2014 | #endif /* CONFIG_ISA */ |
2016 | STATIC ASC_DCNT AscGetMaxDmaCount(ushort); | 2015 | STATIC ASC_DCNT AscGetMaxDmaCount(ushort); |
2017 | 2016 | static const char *advansys_info(struct Scsi_Host *shp); | |
2018 | 2017 | ||
2019 | /* | 2018 | /* |
2020 | * --- Adv Library Constants and Macros | 2019 | * --- Adv Library Constants and Macros |
@@ -3970,10 +3969,6 @@ STATIC ushort asc_bus[ASC_NUM_BUS] __initdata = { | |||
3970 | ASC_IS_PCI, | 3969 | ASC_IS_PCI, |
3971 | }; | 3970 | }; |
3972 | 3971 | ||
3973 | /* | ||
3974 | * Used with the LILO 'advansys' option to eliminate or | ||
3975 | * limit I/O port probing at boot time, cf. advansys_setup(). | ||
3976 | */ | ||
3977 | STATIC int asc_iopflag = ASC_FALSE; | 3972 | STATIC int asc_iopflag = ASC_FALSE; |
3978 | STATIC int asc_ioport[ASC_NUM_IOPORT_PROBE] = { 0, 0, 0, 0 }; | 3973 | STATIC int asc_ioport[ASC_NUM_IOPORT_PROBE] = { 0, 0, 0, 0 }; |
3979 | 3974 | ||
@@ -4055,10 +4050,6 @@ STATIC void asc_prt_hex(char *f, uchar *, int); | |||
4055 | #endif /* ADVANSYS_DEBUG */ | 4050 | #endif /* ADVANSYS_DEBUG */ |
4056 | 4051 | ||
4057 | 4052 | ||
4058 | /* | ||
4059 | * --- Linux 'struct scsi_host_template' and advansys_setup() Functions | ||
4060 | */ | ||
4061 | |||
4062 | #ifdef CONFIG_PROC_FS | 4053 | #ifdef CONFIG_PROC_FS |
4063 | /* | 4054 | /* |
4064 | * advansys_proc_info() - /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)] | 4055 | * advansys_proc_info() - /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)] |
@@ -4080,7 +4071,7 @@ STATIC void asc_prt_hex(char *f, uchar *, int); | |||
4080 | * if 'prtbuf' is too small it will not be overwritten. Instead the | 4071 | * if 'prtbuf' is too small it will not be overwritten. Instead the |
4081 | * user just won't get all the available statistics. | 4072 | * user just won't get all the available statistics. |
4082 | */ | 4073 | */ |
4083 | int | 4074 | static int |
4084 | advansys_proc_info(struct Scsi_Host *shost, char *buffer, char **start, | 4075 | advansys_proc_info(struct Scsi_Host *shost, char *buffer, char **start, |
4085 | off_t offset, int length, int inout) | 4076 | off_t offset, int length, int inout) |
4086 | { | 4077 | { |
@@ -4296,7 +4287,7 @@ advansys_proc_info(struct Scsi_Host *shost, char *buffer, char **start, | |||
4296 | * it must not call SCSI mid-level functions including scsi_malloc() | 4287 | * it must not call SCSI mid-level functions including scsi_malloc() |
4297 | * and scsi_free(). | 4288 | * and scsi_free(). |
4298 | */ | 4289 | */ |
4299 | int __init | 4290 | static int __init |
4300 | advansys_detect(struct scsi_host_template *tpnt) | 4291 | advansys_detect(struct scsi_host_template *tpnt) |
4301 | { | 4292 | { |
4302 | static int detect_called = ASC_FALSE; | 4293 | static int detect_called = ASC_FALSE; |
@@ -5428,7 +5419,7 @@ advansys_detect(struct scsi_host_template *tpnt) | |||
5428 | * | 5419 | * |
5429 | * Release resources allocated for a single AdvanSys adapter. | 5420 | * Release resources allocated for a single AdvanSys adapter. |
5430 | */ | 5421 | */ |
5431 | int | 5422 | static int |
5432 | advansys_release(struct Scsi_Host *shp) | 5423 | advansys_release(struct Scsi_Host *shp) |
5433 | { | 5424 | { |
5434 | asc_board_t *boardp; | 5425 | asc_board_t *boardp; |
@@ -5475,7 +5466,7 @@ advansys_release(struct Scsi_Host *shp) | |||
5475 | * Note: The information line should not exceed ASC_INFO_SIZE bytes, | 5466 | * Note: The information line should not exceed ASC_INFO_SIZE bytes, |
5476 | * otherwise the static 'info' array will be overrun. | 5467 | * otherwise the static 'info' array will be overrun. |
5477 | */ | 5468 | */ |
5478 | const char * | 5469 | static const char * |
5479 | advansys_info(struct Scsi_Host *shp) | 5470 | advansys_info(struct Scsi_Host *shp) |
5480 | { | 5471 | { |
5481 | static char info[ASC_INFO_SIZE]; | 5472 | static char info[ASC_INFO_SIZE]; |
@@ -5568,7 +5559,7 @@ advansys_info(struct Scsi_Host *shp) | |||
5568 | * This function always returns 0. Command return status is saved | 5559 | * This function always returns 0. Command return status is saved |
5569 | * in the 'scp' result field. | 5560 | * in the 'scp' result field. |
5570 | */ | 5561 | */ |
5571 | int | 5562 | static int |
5572 | advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) | 5563 | advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) |
5573 | { | 5564 | { |
5574 | struct Scsi_Host *shp; | 5565 | struct Scsi_Host *shp; |
@@ -5656,7 +5647,7 @@ advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) | |||
5656 | * sleeping is allowed and no locking other than for host structures is | 5647 | * sleeping is allowed and no locking other than for host structures is |
5657 | * required. Returns SUCCESS or FAILED. | 5648 | * required. Returns SUCCESS or FAILED. |
5658 | */ | 5649 | */ |
5659 | int | 5650 | static int |
5660 | advansys_reset(struct scsi_cmnd *scp) | 5651 | advansys_reset(struct scsi_cmnd *scp) |
5661 | { | 5652 | { |
5662 | struct Scsi_Host *shp; | 5653 | struct Scsi_Host *shp; |
@@ -5841,7 +5832,7 @@ advansys_reset(struct scsi_cmnd *scp) | |||
5841 | * ip[1]: sectors | 5832 | * ip[1]: sectors |
5842 | * ip[2]: cylinders | 5833 | * ip[2]: cylinders |
5843 | */ | 5834 | */ |
5844 | int | 5835 | static int |
5845 | advansys_biosparam(struct scsi_device *sdev, struct block_device *bdev, | 5836 | advansys_biosparam(struct scsi_device *sdev, struct block_device *bdev, |
5846 | sector_t capacity, int ip[]) | 5837 | sector_t capacity, int ip[]) |
5847 | { | 5838 | { |
@@ -5875,82 +5866,6 @@ advansys_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
5875 | } | 5866 | } |
5876 | 5867 | ||
5877 | /* | 5868 | /* |
5878 | * advansys_setup() | ||
5879 | * | ||
5880 | * This function is called from init/main.c at boot time. | ||
5881 | * It it passed LILO parameters that can be set from the | ||
5882 | * LILO command line or in /etc/lilo.conf. | ||
5883 | * | ||
5884 | * It is used by the AdvanSys driver to either disable I/O | ||
5885 | * port scanning or to limit scanning to 1 - 4 I/O ports. | ||
5886 | * Regardless of the option setting EISA and PCI boards | ||
5887 | * will still be searched for and detected. This option | ||
5888 | * only affects searching for ISA and VL boards. | ||
5889 | * | ||
5890 | * If ADVANSYS_DEBUG is defined the driver debug level may | ||
5891 | * be set using the 5th (ASC_NUM_IOPORT_PROBE + 1) I/O Port. | ||
5892 | * | ||
5893 | * Examples: | ||
5894 | * 1. Eliminate I/O port scanning: | ||
5895 | * boot: linux advansys= | ||
5896 | * or | ||
5897 | * boot: linux advansys=0x0 | ||
5898 | * 2. Limit I/O port scanning to one I/O port: | ||
5899 | * boot: linux advansys=0x110 | ||
5900 | * 3. Limit I/O port scanning to four I/O ports: | ||
5901 | * boot: linux advansys=0x110,0x210,0x230,0x330 | ||
5902 | * 4. If ADVANSYS_DEBUG, limit I/O port scanning to four I/O ports and | ||
5903 | * set the driver debug level to 2. | ||
5904 | * boot: linux advansys=0x110,0x210,0x230,0x330,0xdeb2 | ||
5905 | * | ||
5906 | * ints[0] - number of arguments | ||
5907 | * ints[1] - first argument | ||
5908 | * ints[2] - second argument | ||
5909 | * ... | ||
5910 | */ | ||
5911 | void __init | ||
5912 | advansys_setup(char *str, int *ints) | ||
5913 | { | ||
5914 | int i; | ||
5915 | |||
5916 | if (asc_iopflag == ASC_TRUE) { | ||
5917 | printk("AdvanSys SCSI: 'advansys' LILO option may appear only once\n"); | ||
5918 | return; | ||
5919 | } | ||
5920 | |||
5921 | asc_iopflag = ASC_TRUE; | ||
5922 | |||
5923 | if (ints[0] > ASC_NUM_IOPORT_PROBE) { | ||
5924 | #ifdef ADVANSYS_DEBUG | ||
5925 | if ((ints[0] == ASC_NUM_IOPORT_PROBE + 1) && | ||
5926 | (ints[ASC_NUM_IOPORT_PROBE + 1] >> 4 == 0xdeb)) { | ||
5927 | asc_dbglvl = ints[ASC_NUM_IOPORT_PROBE + 1] & 0xf; | ||
5928 | } else { | ||
5929 | #endif /* ADVANSYS_DEBUG */ | ||
5930 | printk("AdvanSys SCSI: only %d I/O ports accepted\n", | ||
5931 | ASC_NUM_IOPORT_PROBE); | ||
5932 | #ifdef ADVANSYS_DEBUG | ||
5933 | } | ||
5934 | #endif /* ADVANSYS_DEBUG */ | ||
5935 | } | ||
5936 | |||
5937 | #ifdef ADVANSYS_DEBUG | ||
5938 | ASC_DBG1(1, "advansys_setup: ints[0] %d\n", ints[0]); | ||
5939 | for (i = 1; i < ints[0]; i++) { | ||
5940 | ASC_DBG2(1, " ints[%d] 0x%x", i, ints[i]); | ||
5941 | } | ||
5942 | ASC_DBG(1, "\n"); | ||
5943 | #endif /* ADVANSYS_DEBUG */ | ||
5944 | |||
5945 | for (i = 1; i <= ints[0] && i <= ASC_NUM_IOPORT_PROBE; i++) { | ||
5946 | asc_ioport[i-1] = ints[i]; | ||
5947 | ASC_DBG2(1, "advansys_setup: asc_ioport[%d] 0x%x\n", | ||
5948 | i - 1, asc_ioport[i-1]); | ||
5949 | } | ||
5950 | } | ||
5951 | |||
5952 | |||
5953 | /* | ||
5954 | * --- Loadable Driver Support | 5869 | * --- Loadable Driver Support |
5955 | */ | 5870 | */ |
5956 | 5871 | ||
diff --git a/drivers/scsi/advansys.h b/drivers/scsi/advansys.h deleted file mode 100644 index 8ee7fb16a725..000000000000 --- a/drivers/scsi/advansys.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * advansys.h - Linux Host Driver for AdvanSys SCSI Adapters | ||
3 | * | ||
4 | * Copyright (c) 1995-2000 Advanced System Products, Inc. | ||
5 | * Copyright (c) 2000-2001 ConnectCom Solutions, Inc. | ||
6 | * All Rights Reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that redistributions of source | ||
10 | * code retain the above copyright notice and this comment without | ||
11 | * modification. | ||
12 | * | ||
13 | * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys) | ||
14 | * changed its name to ConnectCom Solutions, Inc. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef _ADVANSYS_H | ||
19 | #define _ADVANSYS_H | ||
20 | |||
21 | /* | ||
22 | * struct scsi_host_template function prototypes. | ||
23 | */ | ||
24 | int advansys_detect(struct scsi_host_template *); | ||
25 | int advansys_release(struct Scsi_Host *); | ||
26 | const char *advansys_info(struct Scsi_Host *); | ||
27 | int advansys_queuecommand(struct scsi_cmnd *, void (* done)(struct scsi_cmnd *)); | ||
28 | int advansys_reset(struct scsi_cmnd *); | ||
29 | int advansys_biosparam(struct scsi_device *, struct block_device *, | ||
30 | sector_t, int[]); | ||
31 | static int advansys_slave_configure(struct scsi_device *); | ||
32 | |||
33 | /* init/main.c setup function */ | ||
34 | void advansys_setup(char *, int *); | ||
35 | |||
36 | #endif /* _ADVANSYS_H */ | ||