From bc86120a85ebf553180946e8854d1993f074e9f5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Apr 2005 12:28:34 -0700 Subject: [PATCH] SCSI GFP fixes Somebody forgot that | has higher priority than ?:. As the result, allocation is done with bogus flags - instead of GFP_ATOMIC + possibly GFP_DMA we always get GFP_DMA and no GFP_ATOMIC. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/scsi/scsi_error.c | 2 +- drivers/scsi/scsi_scan.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 1a135f38e78..2bf1ee2b47b 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -584,7 +584,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd) memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense)); - scsi_result = kmalloc(252, GFP_ATOMIC | (scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0); + scsi_result = kmalloc(252, GFP_ATOMIC | ((scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0)); if (unlikely(!scsi_result)) { diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 287d197a7c1..cca772624ae 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -801,7 +801,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, if (!sreq) goto out_free_sdev; result = kmalloc(256, GFP_ATOMIC | - (shost->unchecked_isa_dma) ? __GFP_DMA : 0); + ((shost->unchecked_isa_dma) ? __GFP_DMA : 0)); if (!result) goto out_free_sreq; -- cgit v1.2.3-70-g09d2 From 10158286e7b5347dce2285895c95419b9f6f8b63 Mon Sep 17 00:00:00 2001 From: Tom 'spot' Callaway Date: Sun, 24 Apr 2005 20:35:20 -0700 Subject: [SPARC]: module version cleanups Minor cleanups for sparc specific drivers (sunbmac, sunqe, sunlance, sunhme, esp) so that they have a full module version definition that is consistent with other upstream drivers. Signed-off-by: Tom 'spot' Callaway Signed-off-by: David S. Miller --- drivers/net/sunbmac.c | 13 +++++++++++-- drivers/net/sunhme.c | 16 +++++++++++----- drivers/net/sunlance.c | 17 +++++++++++++---- drivers/net/sunqe.c | 17 +++++++++++++---- drivers/scsi/esp.c | 5 +++++ 5 files changed, 53 insertions(+), 15 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 025dcd867ea..f88f5e32b71 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c @@ -37,8 +37,18 @@ #include "sunbmac.h" +#define DRV_NAME "sunbmac" +#define DRV_VERSION "2.0" +#define DRV_RELDATE "11/24/03" +#define DRV_AUTHOR "David S. Miller (davem@redhat.com)" + static char version[] __initdata = - "sunbmac.c:v2.0 24/Nov/03 David S. Miller (davem@redhat.com)\n"; + DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n"; + +MODULE_VERSION(DRV_VERSION); +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION("Sun BigMAC 100baseT ethernet driver"); +MODULE_LICENSE("GPL"); #undef DEBUG_PROBE #undef DEBUG_TX @@ -1321,4 +1331,3 @@ static void __exit bigmac_cleanup(void) module_init(bigmac_probe); module_exit(bigmac_cleanup); -MODULE_LICENSE("GPL"); diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index d837b3c3572..f02fe4119b2 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c @@ -13,9 +13,6 @@ * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50 */ -static char version[] = - "sunhme.c:v2.02 24/Aug/2003 David S. Miller (davem@redhat.com)\n"; - #include #include #include @@ -67,15 +64,24 @@ static char version[] = #include "sunhme.h" +#define DRV_NAME "sunhme" +#define DRV_VERSION "2.02" +#define DRV_RELDATE "8/24/03" +#define DRV_AUTHOR "David S. Miller (davem@redhat.com)" + +static char version[] = + DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n"; -#define DRV_NAME "sunhme" +MODULE_VERSION(DRV_VERSION); +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION("Sun HappyMealEthernet(HME) 10/100baseT ethernet driver"); +MODULE_LICENSE("GPL"); static int macaddr[6]; /* accept MAC address of the form macaddr=0x08,0x00,0x20,0x30,0x40,0x50 */ module_param_array(macaddr, int, NULL, 0); MODULE_PARM_DESC(macaddr, "Happy Meal MAC address to set"); -MODULE_LICENSE("GPL"); static struct happy_meal *root_happy_dev; diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 62d464c7ef5..b7d87d4690b 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c @@ -69,9 +69,6 @@ #undef DEBUG_DRIVER -static char version[] = - "sunlance.c:v2.02 24/Aug/03 Miguel de Icaza (miguel@nuclecu.unam.mx)\n"; - static char lancestr[] = "LANCE"; #include @@ -108,6 +105,19 @@ static char lancestr[] = "LANCE"; #include /* For tpe-link-test? setting */ #include +#define DRV_NAME "sunlance" +#define DRV_VERSION "2.02" +#define DRV_RELDATE "8/24/03" +#define DRV_AUTHOR "Miguel de Icaza (miguel@nuclecu.unam.mx)" + +static char version[] = + DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n"; + +MODULE_VERSION(DRV_VERSION); +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION("Sun Lance ethernet driver"); +MODULE_LICENSE("GPL"); + /* Define: 2^4 Tx buffers and 2^4 Rx buffers */ #ifndef LANCE_LOG_TX_BUFFERS #define LANCE_LOG_TX_BUFFERS 4 @@ -1611,4 +1621,3 @@ static void __exit sparc_lance_cleanup(void) module_init(sparc_lance_probe); module_exit(sparc_lance_cleanup); -MODULE_LICENSE("GPL"); diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 37ef1b82a6c..1f2323be60d 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c @@ -7,9 +7,6 @@ * Copyright (C) 1996, 1999, 2003 David S. Miller (davem@redhat.com) */ -static char version[] = - "sunqe.c:v3.0 8/24/03 David S. Miller (davem@redhat.com)\n"; - #include #include #include @@ -43,6 +40,19 @@ static char version[] = #include "sunqe.h" +#define DRV_NAME "sunqe" +#define DRV_VERSION "3.0" +#define DRV_RELDATE "8/24/03" +#define DRV_AUTHOR "David S. Miller (davem@redhat.com)" + +static char version[] = + DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n"; + +MODULE_VERSION(DRV_VERSION); +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION("Sun QuadEthernet 10baseT SBUS card driver"); +MODULE_LICENSE("GPL"); + static struct sunqec *root_qec_dev; static void qe_set_multicast(struct net_device *dev); @@ -1040,4 +1050,3 @@ static void __exit qec_cleanup(void) module_init(qec_probe); module_exit(qec_cleanup); -MODULE_LICENSE("GPL"); diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index d8ab73b6803..891f97f7881 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c @@ -49,6 +49,8 @@ #include #include +#define DRV_VERSION "1.101" + #define DEBUG_ESP /* #define DEBUG_ESP_HME */ /* #define DEBUG_ESP_DATA */ @@ -4398,5 +4400,8 @@ static struct scsi_host_template driver_template = { #include "scsi_module.c" +MODULE_DESCRIPTION("EnhancedScsiProcessor Sun SCSI driver"); +MODULE_AUTHOR("David S. Miller (davem@redhat.com)"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); -- cgit v1.2.3-70-g09d2 From 0f73832fd8fc42dd7cc73487147f5d5b8f8d2cf0 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Apr 2005 07:43:42 -0700 Subject: [PATCH] drivers/scsi NULL noise removal NULL noise in sbus scsi drivers got missed Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/scsi/esp.c | 6 +++--- drivers/scsi/pluto.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index 891f97f7881..f6900538be9 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c @@ -1147,7 +1147,7 @@ static int __init esp_detect(struct scsi_host_template *tpnt) static struct sbus_dev esp_dev; int esps_in_use = 0; - espchain = 0; + espchain = NULL; if (sun4_esp_physaddr) { memset (&esp_dev, 0, sizeof(esp_dev)); @@ -2513,7 +2513,7 @@ static inline void esp_reconnect(struct esp *esp, struct scsi_cmnd *sp) ESPLOG(("esp%d: Weird, being reselected but disconnected " "command queue is empty.\n", esp->esp_id)); esp->snip = 0; - esp->current_SC = 0; + esp->current_SC = NULL; sp->SCp.phase = not_issued; append_SC(&esp->issue_SC, sp); } @@ -4148,7 +4148,7 @@ static int esp_work_bus(struct esp *esp) } static espfunc_t isvc_vector[] = { - 0, + NULL, esp_do_phase_determine, esp_do_resetbus, esp_finish_reset, diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c index 7bb0a2e5674..c01b7191fcf 100644 --- a/drivers/scsi/pluto.c +++ b/drivers/scsi/pluto.c @@ -45,7 +45,7 @@ static struct ctrl_inquiry { Scsi_Cmnd cmd; char inquiry[256]; fc_channel *fc; -} *fcs __initdata = { 0 }; +} *fcs __initdata; static int fcscount __initdata = 0; static atomic_t fcss __initdata = ATOMIC_INIT(0); DECLARE_MUTEX_LOCKED(fc_sem); -- cgit v1.2.3-70-g09d2 From 766f2fa170e65948053b06c6106c8dc8526c3e14 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Apr 2005 07:43:43 -0700 Subject: [PATCH] qla trivial iomem annotation Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/scsi/qla2xxx/qla_sup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 0e75fbb77b6..32583bbb487 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -85,7 +85,7 @@ qla2x00_unlock_nvram_access(scsi_qla_host_t *ha) void qla2x00_release_nvram_protection(scsi_qla_host_t *ha) { - device_reg_t *reg; + device_reg_t __iomem *reg; uint32_t word; reg = ha->iobase; -- cgit v1.2.3-70-g09d2 From 036d618434516103adb4d36db28a57968d2f2e7b Mon Sep 17 00:00:00 2001 From: Mark Haverkamp Date: Tue, 26 Apr 2005 22:54:58 -0700 Subject: [SCSI] aacraid: Fix adapter open error This fixes an error on the device open code that allows a non-existent device to be opened causing later panic problems. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley --- drivers/scsi/aacraid/linit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index c9b82687ba1..242fa77513f 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -450,7 +450,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file) } } - return 0; + return err; } /** -- cgit v1.2.3-70-g09d2 From 69aa3f71580990f39e387d96ed1001d2f5fb04b1 Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Sun, 1 May 2005 08:58:35 -0700 Subject: [PATCH] ultrastor build fix Fix a typo. James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/ultrastor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c index a00095cc74c..97f4d9112b4 100644 --- a/drivers/scsi/ultrastor.c +++ b/drivers/scsi/ultrastor.c @@ -945,7 +945,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt) config.mscp[mscp_index].SCint, SCpnt); #endif if (config.mscp[mscp_index].SCint == 0) - return FAILURE; + return FAILED; if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); config.mscp[mscp_index].SCint = NULL; -- cgit v1.2.3-70-g09d2 From 408b664a7d394a5e4315fbd14aca49b042cb2b08 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 1 May 2005 08:59:29 -0700 Subject: [PATCH] make lots of things static Another large rollup of various patches from Adrian which make things static where they were needlessly exported. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/cpu/mtrr/generic.c | 4 ++-- arch/x86_64/kernel/early_printk.c | 2 +- drivers/char/agp/ali-agp.c | 4 ++-- drivers/char/agp/amd-k7-agp.c | 2 +- drivers/char/agp/amd64-agp.c | 2 +- drivers/char/agp/ati-agp.c | 2 +- drivers/char/agp/backend.c | 4 ++-- drivers/char/agp/efficeon-agp.c | 2 +- drivers/char/agp/frontend.c | 6 +++--- drivers/char/agp/nvidia-agp.c | 2 +- drivers/char/agp/sis-agp.c | 2 +- drivers/char/agp/sworks-agp.c | 2 +- drivers/char/agp/via-agp.c | 4 ++-- drivers/char/rio/rio_linux.c | 2 +- drivers/char/stallion.c | 4 ++-- drivers/isdn/capi/capi.c | 10 +++++----- drivers/isdn/capi/kcapi_proc.c | 10 +++++----- drivers/isdn/divert/isdn_divert.c | 10 +++++----- drivers/media/video/bttv-driver.c | 6 +++--- drivers/media/video/cx88/cx88-core.c | 5 ++--- drivers/media/video/cx88/cx88-dvb.c | 4 ++-- drivers/media/video/cx88/cx88-i2c.c | 4 ++-- drivers/media/video/cx88/cx88-vbi.c | 6 +++--- drivers/media/video/cx88/cx88-video.c | 12 ++++++------ drivers/media/video/cx88/cx88.h | 4 ---- drivers/media/video/saa7134/saa7134-dvb.c | 2 +- drivers/scsi/pas16.c | 6 +++--- drivers/serial/8250.c | 2 +- drivers/serial/jsm/jsm.h | 1 - drivers/serial/jsm/jsm_neo.c | 2 +- drivers/serial/jsm/jsm_tty.c | 4 +++- include/linux/sched.h | 1 - kernel/exit.c | 4 +++- 33 files changed, 67 insertions(+), 70 deletions(-) (limited to 'drivers/scsi') diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 9f7a7ea6388..f468a979e9a 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c @@ -124,8 +124,8 @@ int generic_get_free_region(unsigned long base, unsigned long size) return -ENOSPC; } -void generic_get_mtrr(unsigned int reg, unsigned long *base, - unsigned int *size, mtrr_type * type) +static void generic_get_mtrr(unsigned int reg, unsigned long *base, + unsigned int *size, mtrr_type * type) { unsigned int mask_lo, mask_hi, base_lo, base_hi; diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 750bcd0655d..e3a19e8ebbf 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c @@ -60,7 +60,7 @@ static struct console early_vga_console = { /* Serial functions loosely based on a similar package from Klaus P. Gerlicher */ -int early_serial_base = 0x3f8; /* ttyS0 */ +static int early_serial_base = 0x3f8; /* ttyS0 */ #define XMTRDY 0x20 diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c index c86a22c5499..0212febda65 100644 --- a/drivers/char/agp/ali-agp.c +++ b/drivers/char/agp/ali-agp.c @@ -192,7 +192,7 @@ static struct aper_size_info_32 ali_generic_sizes[7] = {4, 1024, 0, 3} }; -struct agp_bridge_driver ali_generic_bridge = { +static struct agp_bridge_driver ali_generic_bridge = { .owner = THIS_MODULE, .aperture_sizes = ali_generic_sizes, .size_type = U32_APER_SIZE, @@ -215,7 +215,7 @@ struct agp_bridge_driver ali_generic_bridge = { .agp_destroy_page = ali_destroy_page, }; -struct agp_bridge_driver ali_m1541_bridge = { +static struct agp_bridge_driver ali_m1541_bridge = { .owner = THIS_MODULE, .aperture_sizes = ali_generic_sizes, .size_type = U32_APER_SIZE, diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index f1ea87ea6b6..e62a3c2c44a 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c @@ -358,7 +358,7 @@ static struct gatt_mask amd_irongate_masks[] = {.mask = 1, .type = 0} }; -struct agp_bridge_driver amd_irongate_driver = { +static struct agp_bridge_driver amd_irongate_driver = { .owner = THIS_MODULE, .aperture_sizes = amd_irongate_sizes, .size_type = LVL2_APER_SIZE, diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 905f0629c44..399c042f68f 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c @@ -243,7 +243,7 @@ static void amd64_cleanup(void) } -struct agp_bridge_driver amd_8151_driver = { +static struct agp_bridge_driver amd_8151_driver = { .owner = THIS_MODULE, .aperture_sizes = amd_8151_sizes, .size_type = U32_APER_SIZE, diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index 757dde006fc..a65f8827c28 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c @@ -393,7 +393,7 @@ static int ati_free_gatt_table(struct agp_bridge_data *bridge) return 0; } -struct agp_bridge_driver ati_generic_bridge = { +static struct agp_bridge_driver ati_generic_bridge = { .owner = THIS_MODULE, .aperture_sizes = ati_generic_sizes, .size_type = LVL2_APER_SIZE, diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index c3442f3c648..2f3dfb63bdc 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c @@ -97,7 +97,7 @@ void agp_backend_release(struct agp_bridge_data *bridge) EXPORT_SYMBOL(agp_backend_release); -struct { int mem, agp; } maxes_table[] = { +static struct { int mem, agp; } maxes_table[] = { {0, 0}, {32, 4}, {64, 28}, @@ -322,7 +322,7 @@ static int __init agp_init(void) return 0; } -void __exit agp_exit(void) +static void __exit agp_exit(void) { } diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 2a87cecdc91..1383c3165ea 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c @@ -303,7 +303,7 @@ static int efficeon_remove_memory(struct agp_memory * mem, off_t pg_start, int t } -struct agp_bridge_driver efficeon_driver = { +static struct agp_bridge_driver efficeon_driver = { .owner = THIS_MODULE, .aperture_sizes = efficeon_generic_sizes, .size_type = LVL2_APER_SIZE, diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index f633623ac80..3dfb6648547 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -235,7 +235,7 @@ static void agp_insert_into_pool(struct agp_memory * temp) /* File private list routines */ -struct agp_file_private *agp_find_private(pid_t pid) +static struct agp_file_private *agp_find_private(pid_t pid) { struct agp_file_private *curr; @@ -250,7 +250,7 @@ struct agp_file_private *agp_find_private(pid_t pid) return NULL; } -void agp_insert_file_private(struct agp_file_private * priv) +static void agp_insert_file_private(struct agp_file_private * priv) { struct agp_file_private *prev; @@ -262,7 +262,7 @@ void agp_insert_file_private(struct agp_file_private * priv) agp_fe.file_priv_list = priv; } -void agp_remove_file_private(struct agp_file_private * priv) +static void agp_remove_file_private(struct agp_file_private * priv) { struct agp_file_private *next; struct agp_file_private *prev; diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 4f7a3e8bc91..80dafa3030b 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c @@ -288,7 +288,7 @@ static struct gatt_mask nvidia_generic_masks[] = }; -struct agp_bridge_driver nvidia_driver = { +static struct agp_bridge_driver nvidia_driver = { .owner = THIS_MODULE, .aperture_sizes = nvidia_generic_sizes, .size_type = U8_APER_SIZE, diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index cfccacb2a64..ebc05554045 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c @@ -119,7 +119,7 @@ static struct aper_size_info_8 sis_generic_sizes[7] = {4, 1024, 0, 3} }; -struct agp_bridge_driver sis_driver = { +static struct agp_bridge_driver sis_driver = { .owner = THIS_MODULE, .aperture_sizes = sis_generic_sizes, .size_type = U8_APER_SIZE, diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index bb338d9134e..10c23302dd8 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c @@ -409,7 +409,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode) agp_device_command(command, 0); } -struct agp_bridge_driver sworks_driver = { +static struct agp_bridge_driver sworks_driver = { .owner = THIS_MODULE, .aperture_sizes = serverworks_sizes, .size_type = LVL2_APER_SIZE, diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index e1451dd9b6a..c847df575cf 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c @@ -170,7 +170,7 @@ static void via_tlbflush_agp3(struct agp_memory *mem) } -struct agp_bridge_driver via_agp3_driver = { +static struct agp_bridge_driver via_agp3_driver = { .owner = THIS_MODULE, .aperture_sizes = agp3_generic_sizes, .size_type = U8_APER_SIZE, @@ -193,7 +193,7 @@ struct agp_bridge_driver via_agp3_driver = { .agp_destroy_page = agp_generic_destroy_page, }; -struct agp_bridge_driver via_driver = { +static struct agp_bridge_driver via_driver = { .owner = THIS_MODULE, .aperture_sizes = via_generic_sizes, .size_type = U8_APER_SIZE, diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index a91ae271cf0..763893e289b 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c @@ -221,7 +221,7 @@ static int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000}; /* Set the mask to all-ones. This alas, only supports 32 interrupts. Some architectures may need more. -- Changed to LONG to support up to 64 bits on 64bit architectures. -- REW 20/06/99 */ -long rio_irqmask = -1; +static long rio_irqmask = -1; MODULE_AUTHOR("Rogier Wolff , Patrick van de Lageweg "); MODULE_DESCRIPTION("RIO driver"); diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index de166608c59..b8899f560b5 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -466,7 +466,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp); static unsigned long stl_atol(char *str); -int stl_init(void); +static int stl_init(void); static int stl_open(struct tty_struct *tty, struct file *filp); static void stl_close(struct tty_struct *tty, struct file *filp); static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count); @@ -3063,7 +3063,7 @@ static struct tty_operations stl_ops = { /*****************************************************************************/ -int __init stl_init(void) +static int __init stl_init(void) { int i; printk(KERN_INFO "%s: version %s\n", stl_drvtitle, stl_drvversion); diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 06163538bb2..12dee8e9fbb 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -60,12 +60,12 @@ MODULE_LICENSE("GPL"); static struct class_simple *capi_class; -int capi_major = 68; /* allocated */ +static int capi_major = 68; /* allocated */ #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #define CAPINC_NR_PORTS 32 #define CAPINC_MAX_PORTS 256 -int capi_ttymajor = 191; -int capi_ttyminors = CAPINC_NR_PORTS; +static int capi_ttymajor = 191; +static int capi_ttyminors = CAPINC_NR_PORTS; #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ module_param_named(major, capi_major, uint, 0); @@ -268,7 +268,7 @@ static void capiminor_free(struct capiminor *mp) kfree(mp); } -struct capiminor *capiminor_find(unsigned int minor) +static struct capiminor *capiminor_find(unsigned int minor) { struct list_head *l; struct capiminor *p = NULL; @@ -1166,7 +1166,7 @@ static int capinc_tty_write_room(struct tty_struct *tty) return room; } -int capinc_tty_chars_in_buffer(struct tty_struct *tty) +static int capinc_tty_chars_in_buffer(struct tty_struct *tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; if (!mp || !mp->nccip) { diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c index 16dc5418ff4..2cc8b27e4c3 100644 --- a/drivers/isdn/capi/kcapi_proc.c +++ b/drivers/isdn/capi/kcapi_proc.c @@ -89,14 +89,14 @@ static int contrstats_show(struct seq_file *seq, void *v) return 0; } -struct seq_operations seq_controller_ops = { +static struct seq_operations seq_controller_ops = { .start = controller_start, .next = controller_next, .stop = controller_stop, .show = controller_show, }; -struct seq_operations seq_contrstats_ops = { +static struct seq_operations seq_contrstats_ops = { .start = controller_start, .next = controller_next, .stop = controller_stop, @@ -192,14 +192,14 @@ applstats_show(struct seq_file *seq, void *v) return 0; } -struct seq_operations seq_applications_ops = { +static struct seq_operations seq_applications_ops = { .start = applications_start, .next = applications_next, .stop = applications_stop, .show = applications_show, }; -struct seq_operations seq_applstats_ops = { +static struct seq_operations seq_applstats_ops = { .start = applications_start, .next = applications_next, .stop = applications_stop, @@ -287,7 +287,7 @@ static int capi_driver_show(struct seq_file *seq, void *v) return 0; } -struct seq_operations seq_capi_driver_ops = { +static struct seq_operations seq_capi_driver_ops = { .start = capi_driver_start, .next = capi_driver_next, .stop = capi_driver_stop, diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 1eb112213f0..0bfd698726a 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c @@ -383,7 +383,7 @@ divert_rule *getruleptr(int idx) /*************************************************/ /* called from common module on an incoming call */ /*************************************************/ -int isdn_divert_icall(isdn_ctrl *ic) +static int isdn_divert_icall(isdn_ctrl *ic) { int retval = 0; unsigned long flags; struct call_struc *cs = NULL; @@ -552,7 +552,7 @@ void deleteprocs(void) /****************************************************/ /* put a address including address type into buffer */ /****************************************************/ -int put_address(char *st, u_char *p, int len) +static int put_address(char *st, u_char *p, int len) { u_char retval = 0; u_char adr_typ = 0; /* network standard */ @@ -595,7 +595,7 @@ int put_address(char *st, u_char *p, int len) /*************************************/ /* report a succesfull interrogation */ /*************************************/ -int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) +static int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) { char *src = ic->parm.dss1_io.data; int restlen = ic->parm.dss1_io.datalen; int cnt = 1; @@ -689,7 +689,7 @@ int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) /*********************************************/ /* callback for protocol specific extensions */ /*********************************************/ -int prot_stat_callback(isdn_ctrl *ic) +static int prot_stat_callback(isdn_ctrl *ic) { struct call_struc *cs, *cs1; int i; unsigned long flags; @@ -781,7 +781,7 @@ int prot_stat_callback(isdn_ctrl *ic) /***************************/ /* status callback from HL */ /***************************/ -int isdn_divert_stat_callback(isdn_ctrl *ic) +static int isdn_divert_stat_callback(isdn_ctrl *ic) { struct call_struc *cs, *cs1; unsigned long flags; int retval; diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c index c13f222fe6b..033cc5498f2 100644 --- a/drivers/media/video/bttv-driver.c +++ b/drivers/media/video/bttv-driver.c @@ -3169,7 +3169,7 @@ static struct video_device radio_template = /* ----------------------------------------------------------------------- */ /* some debug code */ -int bttv_risc_decode(u32 risc) +static int bttv_risc_decode(u32 risc) { static char *instr[16] = { [ BT848_RISC_WRITE >> 28 ] = "write", @@ -3206,8 +3206,8 @@ int bttv_risc_decode(u32 risc) return incr[risc >> 28] ? incr[risc >> 28] : 1; } -void bttv_risc_disasm(struct bttv *btv, - struct btcx_riscmem *risc) +static void bttv_risc_disasm(struct bttv *btv, + struct btcx_riscmem *risc) { unsigned int i,j,n; diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 26a6138015c..1ff79b5a883 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c @@ -429,7 +429,7 @@ int cx88_sram_channel_setup(struct cx88_core *core, /* ------------------------------------------------------------------ */ /* debug helper code */ -int cx88_risc_decode(u32 risc) +static int cx88_risc_decode(u32 risc) { static char *instr[16] = { [ RISC_SYNC >> 28 ] = "sync", @@ -542,7 +542,7 @@ void cx88_sram_channel_dump(struct cx88_core *core, core->name,cx_read(ch->cnt2_reg)); } -char *cx88_pci_irqs[32] = { +static char *cx88_pci_irqs[32] = { "vid", "aud", "ts", "vip", "hst", "5", "6", "tm1", "src_dma", "dst_dma", "risc_rd_err", "risc_wr_err", "brdg_err", "src_dma_err", "dst_dma_err", "ipb_dma_err", @@ -1206,7 +1206,6 @@ void cx88_core_put(struct cx88_core *core, struct pci_dev *pci) /* ------------------------------------------------------------------ */ EXPORT_SYMBOL(cx88_print_ioctl); -EXPORT_SYMBOL(cx88_pci_irqs); EXPORT_SYMBOL(cx88_vid_irqs); EXPORT_SYMBOL(cx88_mpeg_irqs); EXPORT_SYMBOL(cx88_print_irqbits); diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 1ca37315066..9d15d3d5a2b 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c @@ -91,7 +91,7 @@ static void dvb_buf_release(struct videobuf_queue *q, struct videobuf_buffer *vb cx88_free_buffer(dev->pci, (struct cx88_buffer*)vb); } -struct videobuf_queue_ops dvb_qops = { +static struct videobuf_queue_ops dvb_qops = { .buf_setup = dvb_buf_setup, .buf_prepare = dvb_buf_prepare, .buf_queue = dvb_buf_queue, @@ -191,7 +191,7 @@ static int or51132_set_ts_param(struct dvb_frontend* fe, return 0; } -struct or51132_config pchdtv_hd3000 = { +static struct or51132_config pchdtv_hd3000 = { .demod_address = 0x15, .pll_address = 0x61, .pll_desc = &dvb_pll_thomson_dtt7610, diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 60800172c02..0725b1288f4 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c @@ -45,7 +45,7 @@ MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time"); /* ----------------------------------------------------------------------- */ -void cx8800_bit_setscl(void *data, int state) +static void cx8800_bit_setscl(void *data, int state) { struct cx88_core *core = data; @@ -57,7 +57,7 @@ void cx8800_bit_setscl(void *data, int state) cx_read(MO_I2C); } -void cx8800_bit_setsda(void *data, int state) +static void cx8800_bit_setsda(void *data, int state) { struct cx88_core *core = data; diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c index 471e508b074..0584ff47638 100644 --- a/drivers/media/video/cx88/cx88-vbi.c +++ b/drivers/media/video/cx88/cx88-vbi.c @@ -46,9 +46,9 @@ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f) } } -int cx8800_start_vbi_dma(struct cx8800_dev *dev, - struct cx88_dmaqueue *q, - struct cx88_buffer *buf) +static int cx8800_start_vbi_dma(struct cx8800_dev *dev, + struct cx88_dmaqueue *q, + struct cx88_buffer *buf) { struct cx88_core *core = dev->core; diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 701f594e181..d1f5c92f0ce 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -325,7 +325,7 @@ static struct cx88_ctrl cx8800_ctls[] = { .shift = 0, } }; -const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls); +static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls); /* ------------------------------------------------------------------- */ /* resource management */ @@ -665,7 +665,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) cx88_free_buffer(fh->dev->pci,buf); } -struct videobuf_queue_ops cx8800_video_qops = { +static struct videobuf_queue_ops cx8800_video_qops = { .buf_setup = buffer_setup, .buf_prepare = buffer_prepare, .buf_queue = buffer_queue, @@ -1924,7 +1924,7 @@ static struct file_operations video_fops = .llseek = no_llseek, }; -struct video_device cx8800_video_template = +static struct video_device cx8800_video_template = { .name = "cx8800-video", .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES, @@ -1933,7 +1933,7 @@ struct video_device cx8800_video_template = .minor = -1, }; -struct video_device cx8800_vbi_template = +static struct video_device cx8800_vbi_template = { .name = "cx8800-vbi", .type = VID_TYPE_TELETEXT|VID_TYPE_TUNER, @@ -1951,7 +1951,7 @@ static struct file_operations radio_fops = .llseek = no_llseek, }; -struct video_device cx8800_radio_template = +static struct video_device cx8800_radio_template = { .name = "cx8800-radio", .type = VID_TYPE_TUNER, @@ -2226,7 +2226,7 @@ static int cx8800_resume(struct pci_dev *pci_dev) /* ----------------------------------------------------------- */ -struct pci_device_id cx8800_pci_tbl[] = { +static struct pci_device_id cx8800_pci_tbl[] = { { .vendor = 0x14f1, .device = 0x8800, diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index b351d9eae61..88eaaaba5ad 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h @@ -420,7 +420,6 @@ struct cx8802_dev { /* ----------------------------------------------------------- */ /* cx88-core.c */ -extern char *cx88_pci_irqs[32]; extern char *cx88_vid_irqs[32]; extern char *cx88_mpeg_irqs[32]; extern void cx88_print_irqbits(char *name, char *tag, char **strings, @@ -472,9 +471,6 @@ extern void cx88_core_put(struct cx88_core *core, /* cx88-vbi.c */ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f); -int cx8800_start_vbi_dma(struct cx8800_dev *dev, - struct cx88_dmaqueue *q, - struct cx88_buffer *buf); int cx8800_stop_vbi_dma(struct cx8800_dev *dev); int cx8800_restart_vbi_queue(struct cx8800_dev *dev, struct cx88_dmaqueue *q); diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index dd4a6c8ee65..c2873ae029f 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -172,7 +172,7 @@ static int fe_request_firmware(struct dvb_frontend* fe, return request_firmware(fw, name, &dev->pci->dev); } -struct tda1004x_config medion_cardbus = { +static struct tda1004x_config medion_cardbus = { .demod_address = 0x08, /* not sure this is correct */ .invert = 0, .invert_oclk = 0, diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index e70dedb0d0a..7976947c032 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c @@ -137,7 +137,7 @@ static unsigned short pas16_addr = 0; static int pas16_irq = 0; -int scsi_irq_translate[] = +static const int scsi_irq_translate[] = { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 }; /* The default_irqs array contains values used to set the irq into the @@ -145,7 +145,7 @@ int scsi_irq_translate[] = * irq jumpers on the board). The first value in the array will be * assigned to logical board 0, the next to board 1, etc. */ -int default_irqs[] __initdata = +static int default_irqs[] __initdata = { PAS16_DEFAULT_BOARD_1_IRQ, PAS16_DEFAULT_BOARD_2_IRQ, PAS16_DEFAULT_BOARD_3_IRQ, @@ -177,7 +177,7 @@ static struct base { #define NO_BASES (sizeof (bases) / sizeof (struct base)) -unsigned short pas16_offset[ 8 ] = +static const unsigned short pas16_offset[ 8 ] = { 0x1c00, /* OUTPUT_DATA_REG */ 0x1c01, /* INITIATOR_COMMAND_REG */ diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 218b69372c0..0d9358608fd 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -51,7 +51,7 @@ * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option * is unsafe when used on edge-triggered interrupts. */ -unsigned int share_irqs = SERIAL8250_SHARE_IRQS; +static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; /* * Debugging. diff --git a/drivers/serial/jsm/jsm.h b/drivers/serial/jsm/jsm.h index e0717611c94..777829fa330 100644 --- a/drivers/serial/jsm/jsm.h +++ b/drivers/serial/jsm/jsm.h @@ -393,7 +393,6 @@ int jsm_tty_init(struct jsm_board *); int jsm_uart_port_init(struct jsm_board *); int jsm_remove_uart_port(struct jsm_board *); void jsm_input(struct jsm_channel *ch); -void jsm_carrier(struct jsm_channel *ch); void jsm_check_queue_flow_control(struct jsm_channel *ch); #endif diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c index 9b79c1ff6c7..3a11a69feb4 100644 --- a/drivers/serial/jsm/jsm_neo.c +++ b/drivers/serial/jsm/jsm_neo.c @@ -688,7 +688,7 @@ static void neo_flush_uart_read(struct jsm_channel *ch) /* * No locks are assumed to be held when calling this function. */ -void neo_clear_break(struct jsm_channel *ch, int force) +static void neo_clear_break(struct jsm_channel *ch, int force) { unsigned long lock_flags; diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 24fe76c2883..98de2258fd0 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c @@ -31,6 +31,8 @@ #include "jsm.h" +static void jsm_carrier(struct jsm_channel *ch); + static inline int jsm_get_mstat(struct jsm_channel *ch) { unsigned char mstat; @@ -755,7 +757,7 @@ void jsm_input(struct jsm_channel *ch) jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, "finish\n"); } -void jsm_carrier(struct jsm_channel *ch) +static void jsm_carrier(struct jsm_channel *ch) { struct jsm_board *bd; diff --git a/include/linux/sched.h b/include/linux/sched.h index 8960f99ea12..5f868a58858 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1012,7 +1012,6 @@ extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct extern void flush_thread(void); extern void exit_thread(void); -extern void exit_mm(struct task_struct *); extern void exit_files(struct task_struct *); extern void exit_signal(struct task_struct *); extern void __exit_signal(struct task_struct *); diff --git a/kernel/exit.c b/kernel/exit.c index 419d9d3c4c4..7be283d9898 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -39,6 +39,8 @@ extern struct task_struct *child_reaper; int getrusage(struct task_struct *, int, struct rusage __user *); +static void exit_mm(struct task_struct * tsk); + static void __unhash_process(struct task_struct *p) { nr_threads--; @@ -474,7 +476,7 @@ EXPORT_SYMBOL_GPL(exit_fs); * Turn us into a lazy TLB process if we * aren't already.. */ -void exit_mm(struct task_struct * tsk) +static void exit_mm(struct task_struct * tsk) { struct mm_struct *mm = tsk->mm; -- cgit v1.2.3-70-g09d2 From 69b528936b702d4c13ffa0d14215a029dc754e50 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Sun, 1 May 2005 14:47:15 -0500 Subject: [SCSI] call correct scsi_done function in scsi_dispatch_cmd scsi_dispatch_cmd currently calls scsi_done when the device is in the SDEV_DEL state, but at this point the command has not had a timer added to it (this is done a couple lines down) so scsi_done just returns and the command is lost. The attached patch made against 2.6.12-rc3 calls __scsi_done in this case so the comamnd will be returned upwards. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 05d2bd075fd..184bcaeaf81 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -542,7 +542,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd) * that the device is no longer present */ cmd->result = DID_NO_CONNECT << 16; atomic_inc(&cmd->device->iorequest_cnt); - scsi_done(cmd); + __scsi_done(cmd); /* return 0 (because the command has been processed) */ goto out; } -- cgit v1.2.3-70-g09d2 From a553260618d88c4790daec7975c88f3db1080b5b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 4 May 2005 05:39:42 +0100 Subject: [PATCH] ISA DMA Kconfig fixes - part 3 Drivers that expect ISA DMA API are marked as such in Kconfig. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 4 ++-- drivers/mmc/Kconfig | 2 +- drivers/net/Kconfig | 10 +++++----- drivers/net/appletalk/Kconfig | 2 +- drivers/net/hamradio/Kconfig | 4 ++-- drivers/net/wan/Kconfig | 6 +++--- drivers/scsi/Kconfig | 12 ++++++------ 8 files changed, 21 insertions(+), 21 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index e43e0232896..b594768b024 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -105,7 +105,7 @@ config ATARI_SLM config BLK_DEV_XD tristate "XT hard disk support" - depends on ISA + depends on ISA && ISA_DMA_API help Very old 8 bit hard disk controllers used in the IBM XT computer will be supported if you say Y here. diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index e162dab64ff..2d5a19f6378 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -153,7 +153,7 @@ config DIGIEPCA config ESPSERIAL tristate "Hayes ESP serial port support" - depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP && ISA_DMA_API help This is a driver which supports Hayes ESP serial ports. Both single port cards and multiport cards are supported. Make sure to read @@ -195,7 +195,7 @@ config ISI config SYNCLINK tristate "Microgate SyncLink card support" - depends on SERIAL_NONSTANDARD && PCI + depends on SERIAL_NONSTANDARD && PCI && ISA_DMA_API help Provides support for the SyncLink ISA and PCI multiprotocol serial adapters. These adapters support asynchronous and HDLC bit diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 72f2b466b81..2e70d74fbde 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -51,7 +51,7 @@ config MMC_PXA config MMC_WBSD tristate "Winbond W83L51xD SD/MMC Card Interface support" - depends on MMC && ISA + depends on MMC && ISA && ISA_DMA_API help This selects the Winbond(R) W83L51xD Secure digital and Multimedia card Interface. diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 68242bda4b9..3a0a55b62aa 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -589,7 +589,7 @@ config EL2 config ELPLUS tristate "3c505 \"EtherLink Plus\" support" - depends on NET_VENDOR_3COM && ISA + depends on NET_VENDOR_3COM && ISA && ISA_DMA_API ---help--- Information about this network (Ethernet) card can be found in . If you have a card of @@ -630,7 +630,7 @@ config EL3 config 3C515 tristate "3c515 ISA \"Fast EtherLink\"" - depends on NET_VENDOR_3COM && (ISA || EISA) + depends on NET_VENDOR_3COM && (ISA || EISA) && ISA_DMA_API help If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet network card, say Y and read the Ethernet-HOWTO, available from @@ -708,7 +708,7 @@ config TYPHOON config LANCE tristate "AMD LANCE and PCnet (AT1500 and NE2100) support" - depends on NET_ETHERNET && ISA + depends on NET_ETHERNET && ISA && ISA_DMA_API help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from @@ -864,7 +864,7 @@ config NI52 config NI65 tristate "NI6510 support" - depends on NET_VENDOR_RACAL && ISA + depends on NET_VENDOR_RACAL && ISA && ISA_DMA_API help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from @@ -1072,7 +1072,7 @@ config NE2000 config ZNET tristate "Zenith Z-Note support (EXPERIMENTAL)" - depends on NET_ISA && EXPERIMENTAL + depends on NET_ISA && EXPERIMENTAL && ISA_DMA_API help The Zenith Z-Note notebook computer has a built-in network (Ethernet) card, and this is the Linux driver for it. Note that the diff --git a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig index 60b19679ca5..69c488d933a 100644 --- a/drivers/net/appletalk/Kconfig +++ b/drivers/net/appletalk/Kconfig @@ -13,7 +13,7 @@ config DEV_APPLETALK config LTPC tristate "Apple/Farallon LocalTalk PC support" - depends on DEV_APPLETALK && (ISA || EISA) + depends on DEV_APPLETALK && (ISA || EISA) && ISA_DMA_API help This allows you to use the AppleTalk PC card to connect to LocalTalk networks. The card is also known as the Farallon PhoneNet PC card. diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig index 34068f81d45..7cdebe1a0b6 100644 --- a/drivers/net/hamradio/Kconfig +++ b/drivers/net/hamradio/Kconfig @@ -45,7 +45,7 @@ config BPQETHER config DMASCC tristate "High-speed (DMA) SCC driver for AX.25" - depends on ISA && AX25 && BROKEN_ON_SMP + depends on ISA && AX25 && BROKEN_ON_SMP && ISA_DMA_API ---help--- This is a driver for high-speed SCC boards, i.e. those supporting DMA on one port. You usually use those boards to connect your @@ -78,7 +78,7 @@ config DMASCC config SCC tristate "Z8530 SCC driver" - depends on ISA && AX25 + depends on ISA && AX25 && ISA_DMA_API ---help--- These cards are used to connect your Linux box to an amateur radio in order to communicate with other computers. If you want to use diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig index 35791934a60..66b94668ddd 100644 --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig @@ -26,7 +26,7 @@ config WAN # There is no way to detect a comtrol sv11 - force it modular for now. config HOSTESS_SV11 tristate "Comtrol Hostess SV-11 support" - depends on WAN && ISA && m + depends on WAN && ISA && m && ISA_DMA_API help Driver for Comtrol Hostess SV-11 network card which operates on low speed synchronous serial links at up to @@ -38,7 +38,7 @@ config HOSTESS_SV11 # The COSA/SRP driver has not been tested as non-modular yet. config COSA tristate "COSA/SRP sync serial boards support" - depends on WAN && ISA && m + depends on WAN && ISA && m && ISA_DMA_API ---help--- Driver for COSA and SRP synchronous serial boards. @@ -127,7 +127,7 @@ config LANMEDIA # There is no way to detect a Sealevel board. Force it modular config SEALEVEL_4021 tristate "Sealevel Systems 4021 support" - depends on WAN && ISA && m + depends on WAN && ISA && m && ISA_DMA_API help This is a driver for the Sealevel Systems ACB 56 serial I/O adapter. diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 750b11cefd9..1811cb24031 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -260,7 +260,7 @@ config SCSI_3W_9XXX config SCSI_7000FASST tristate "7000FASST SCSI support" - depends on ISA && SCSI + depends on ISA && SCSI && ISA_DMA_API help This driver supports the Western Digital 7000 SCSI host adapter family. Some information is in the source: @@ -295,7 +295,7 @@ config SCSI_AHA152X config SCSI_AHA1542 tristate "Adaptec AHA1542 support" - depends on ISA && SCSI + depends on ISA && SCSI && ISA_DMA_API ---help--- This is support for a SCSI host adapter. It is explained in section 3.4 of the SCSI-HOWTO, available from @@ -515,7 +515,7 @@ config SCSI_SATA_VITESSE config SCSI_BUSLOGIC tristate "BusLogic SCSI support" - depends on (PCI || ISA || MCA) && SCSI && (BROKEN || !SPARC64) + depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API ---help--- This is support for BusLogic MultiMaster and FlashPoint SCSI Host Adapters. Consult the SCSI-HOWTO, available from @@ -571,7 +571,7 @@ config SCSI_DTC3280 config SCSI_EATA tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support" - depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64) + depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API ---help--- This driver supports all EATA/DMA-compliant SCSI host adapters. DPT ISA and all EISA I/O addresses are probed looking for the "EATA" @@ -665,7 +665,7 @@ config SCSI_FD_MCS config SCSI_GDTH tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" - depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64) + depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API ---help--- Formerly called GDT SCSI Disk Array Controller Support. @@ -1416,7 +1416,7 @@ config SCSI_T128 config SCSI_U14_34F tristate "UltraStor 14F/34F support" - depends on ISA && SCSI + depends on ISA && SCSI && ISA_DMA_API ---help--- This is support for the UltraStor 14F and 34F SCSI-2 host adapters. The source at contains some -- cgit v1.2.3-70-g09d2 From 949bf797595fc99d4cadf9a294fe6fd32a4474e6 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 1 May 2005 18:58:15 -0500 Subject: [SCSI] fix command retries in spi_transport class The premise is that domain validation is likely to trigger errors which it wants to know about, so the only time it should be retrying them is when it gets a unit attention (likely as the result of a previous bus or device reset). Ironically, the previous coding retried three times in all cases except those of unit attention. The attached fixes this to do the right thing. Signed-off-by: James Bottomley --- drivers/scsi/scsi_transport_spi.c | 49 +++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 15 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 303d7656f71..28966d05435 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include "scsi_priv.h" @@ -41,6 +42,11 @@ #define SPI_MAX_ECHO_BUFFER_SIZE 4096 +#define DV_LOOPS 3 +#define DV_TIMEOUT (10*HZ) +#define DV_RETRIES 3 /* should only need at most + * two cc/ua clears */ + /* Private data accessors (keep these out of the header file) */ #define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) #define spi_dv_sem(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_sem) @@ -100,6 +106,29 @@ static int sprint_frac(char *dest, int value, int denom) return result; } +/* Modification of scsi_wait_req that will clear UNIT ATTENTION conditions + * resulting from (likely) bus and device resets */ +static void spi_wait_req(struct scsi_request *sreq, const void *cmd, + void *buffer, unsigned bufflen) +{ + int i; + + for(i = 0; i < DV_RETRIES; i++) { + sreq->sr_request->flags |= REQ_FAILFAST; + + scsi_wait_req(sreq, cmd, buffer, bufflen, + DV_TIMEOUT, /* retries */ 1); + if (sreq->sr_result & DRIVER_SENSE) { + struct scsi_sense_hdr sshdr; + + if (scsi_request_normalize_sense(sreq, &sshdr) + && sshdr.sense_key == UNIT_ATTENTION) + continue; + } + break; + } +} + static struct { enum spi_signal_type value; char *name; @@ -378,11 +407,6 @@ static CLASS_DEVICE_ATTR(signalling, S_IRUGO | S_IWUSR, if(i->f->set_##x) \ i->f->set_##x(sdev->sdev_target, y) -#define DV_LOOPS 3 -#define DV_TIMEOUT (10*HZ) -#define DV_RETRIES 3 /* should only need at most - * two cc/ua clears */ - enum spi_compare_returns { SPI_COMPARE_SUCCESS, SPI_COMPARE_FAILURE, @@ -446,8 +470,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer, for (r = 0; r < retries; r++) { sreq->sr_cmd_len = 0; /* wait_req to fill in */ sreq->sr_data_direction = DMA_TO_DEVICE; - scsi_wait_req(sreq, spi_write_buffer, buffer, len, - DV_TIMEOUT, DV_RETRIES); + spi_wait_req(sreq, spi_write_buffer, buffer, len); if(sreq->sr_result || !scsi_device_online(sdev)) { struct scsi_sense_hdr sshdr; @@ -471,8 +494,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer, memset(ptr, 0, len); sreq->sr_cmd_len = 0; /* wait_req to fill in */ sreq->sr_data_direction = DMA_FROM_DEVICE; - scsi_wait_req(sreq, spi_read_buffer, ptr, len, - DV_TIMEOUT, DV_RETRIES); + spi_wait_req(sreq, spi_read_buffer, ptr, len); scsi_device_set_state(sdev, SDEV_QUIESCE); if (memcmp(buffer, ptr, len) != 0) @@ -500,8 +522,7 @@ spi_dv_device_compare_inquiry(struct scsi_request *sreq, u8 *buffer, memset(ptr, 0, len); - scsi_wait_req(sreq, spi_inquiry, ptr, len, - DV_TIMEOUT, DV_RETRIES); + spi_wait_req(sreq, spi_inquiry, ptr, len); if(sreq->sr_result || !scsi_device_online(sdev)) { scsi_device_set_state(sdev, SDEV_QUIESCE); @@ -593,8 +614,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer) * (reservation conflict, device not ready, etc) just * skip the write tests */ for (l = 0; ; l++) { - scsi_wait_req(sreq, spi_test_unit_ready, NULL, 0, - DV_TIMEOUT, DV_RETRIES); + spi_wait_req(sreq, spi_test_unit_ready, NULL, 0); if(sreq->sr_result) { if(l >= 3) @@ -608,8 +628,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer) sreq->sr_cmd_len = 0; sreq->sr_data_direction = DMA_FROM_DEVICE; - scsi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4, - DV_TIMEOUT, DV_RETRIES); + spi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4); if (sreq->sr_result) /* Device has no echo buffer */ -- cgit v1.2.3-70-g09d2 From cad359c68455d6870d053184bbb0ae208e207eef Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 5 May 2005 16:16:18 -0700 Subject: [PATCH] fix NCR53C9x.c compile warning drivers/scsi/NCR53C9x.c: In function `esp_do_data': drivers/scsi/NCR53C9x.c:1838: warning: unused variable `flags' Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/NCR53C9x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c index 3c86655a5f3..74b93564a25 100644 --- a/drivers/scsi/NCR53C9x.c +++ b/drivers/scsi/NCR53C9x.c @@ -1824,7 +1824,10 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs) /* loop */ while (hmuch) { int j, fifo_stuck = 0, newphase; - unsigned long flags, timeout; + unsigned long timeout; +#if 0 + unsigned long flags; +#endif #if 0 if ( i % 10 ) ESPDATA(("\r")); -- cgit v1.2.3-70-g09d2 From b6f0b0d016a254ff583fec26f2c9e21c1ae2fdf3 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 5 May 2005 16:16:22 -0700 Subject: [PATCH] drivers/scsi/sym53c416.c: fix a wrong check The Coverity checker found that this for loop was wrong. This patch changes it to what seems to be intended. Signed-off-by: Adrian Bunk Cc: James Bottomley Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/sym53c416.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c index f26c3a29e63..ebfddd40ce6 100644 --- a/drivers/scsi/sym53c416.c +++ b/drivers/scsi/sym53c416.c @@ -809,7 +809,7 @@ static int sym53c416_host_reset(Scsi_Cmnd *SCpnt) /* printk("sym53c416_reset\n"); */ base = SCpnt->device->host->io_port; /* search scsi_id - fixme, we shouldnt need to iterate for this! */ - for(i = 0; i < host_index && scsi_id != -1; i++) + for(i = 0; i < host_index && scsi_id == -1; i++) if(hosts[i].base == base) scsi_id = hosts[i].scsi_id; outb(RESET_CHIP, base + COMMAND_REG); -- cgit v1.2.3-70-g09d2 From e4862fedbc37a2c242824b100101f8e6e8488748 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 6 May 2005 13:14:48 -0500 Subject: [SCSI] correct the sym2 period setting routines There's a slight bug in the routines in that if the period requires dt, then the routine will unconditionally set it. DT may only be set if Wide is also set, so this turns back on the wide bit. For domain validation to work correctly, we need to observe the wide bit absolutely. Acked by: Matthew Wilcox Signed-off-by: James Bottomley --- drivers/scsi/sym53c8xx_2/sym_glue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 5ff83d214f1..5b07c6ec3ec 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -2038,8 +2038,9 @@ static void sym2_set_period(struct scsi_target *starget, int period) struct sym_hcb *np = sym_get_hcb(shost); struct sym_tcb *tp = &np->target[starget->id]; - /* have to have DT for these transfers */ - if (period <= np->minsync) + /* have to have DT for these transfers, but DT will also + * set width, so check that this is allowed */ + if (period <= np->minsync && spi_width(starget)) tp->tgoal.dt = 1; tp->tgoal.period = period; -- cgit v1.2.3-70-g09d2