diff options
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/cdrom.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/cdu31a.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/cm206.c | 4 | ||||
-rw-r--r-- | drivers/cdrom/cm206.h | 4 | ||||
-rw-r--r-- | drivers/cdrom/gscd.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/mcd.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/mcdx.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/optcd.c | 10 | ||||
-rw-r--r-- | drivers/cdrom/optcd.h | 2 | ||||
-rw-r--r-- | drivers/cdrom/sbpcd.c | 56 | ||||
-rw-r--r-- | drivers/cdrom/sonycd535.c | 2 |
11 files changed, 65 insertions, 23 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index cafe72afd..af5834ca9 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -259,7 +259,7 @@ #include <linux/errno.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/cdrom.h> #include <linux/sysctl.h> #include <linux/proc_fs.h> diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 8b969818b..5f48b5099 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c @@ -164,7 +164,7 @@ #include <linux/ioport.h> #include <linux/devfs_fs_kernel.h> #include <linux/string.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c index 5f09347cf..ab8963fbb 100644 --- a/drivers/cdrom/cm206.c +++ b/drivers/cdrom/cm206.c @@ -190,7 +190,7 @@ History: #include <linux/devfs_fs_kernel.h> #include <linux/ioport.h> #include <linux/mm.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/init.h> /* #include <linux/ucdrom.h> */ @@ -1283,7 +1283,7 @@ static void cleanup(int level) case 1: kfree(cd); release_region(cm206_base, 16); - default: + default:; } } diff --git a/drivers/cdrom/cm206.h b/drivers/cdrom/cm206.h index e5ba8ff20..0ae51c1a0 100644 --- a/drivers/cdrom/cm206.h +++ b/drivers/cdrom/cm206.h @@ -166,6 +166,6 @@ y {x(interrupt), x(data_ready), x(fifo_overflow), x(data_error), #undef y #undef x -#endif STATISTICS +#endif /* STATISTICS */ -#endif LINUX_CM206_H +#endif /* LINUX_CM206_H */ diff --git a/drivers/cdrom/gscd.c b/drivers/cdrom/gscd.c index 0e8940117..af8e2e33d 100644 --- a/drivers/cdrom/gscd.c +++ b/drivers/cdrom/gscd.c @@ -50,7 +50,7 @@ #include <linux/module.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/errno.h> #include <linux/signal.h> #include <linux/sched.h> diff --git a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c index b064b2e22..13b48e1cf 100644 --- a/drivers/cdrom/mcd.c +++ b/drivers/cdrom/mcd.c @@ -1158,7 +1158,7 @@ static void cleanup(int level) return; } blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR)); - default: + default:; } } diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index 160261406..ad36f0135 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c @@ -66,7 +66,7 @@ static const char *mcdx_c_version #include <linux/cdrom.h> #include <linux/ioport.h> #include <linux/mm.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/init.h> #include <asm/io.h> #include <asm/uaccess.h> diff --git a/drivers/cdrom/optcd.c b/drivers/cdrom/optcd.c index f851cd074..233e8efd5 100644 --- a/drivers/cdrom/optcd.c +++ b/drivers/cdrom/optcd.c @@ -924,7 +924,7 @@ static int get_multi_disk_info(void) return -EIO; return 0; } -#endif MULTISESSION +#endif /* MULTISESSION */ static int update_toc(void) @@ -962,7 +962,7 @@ static int update_toc(void) #ifdef MULTISESSION if (disk_info.xa) get_multi_disk_info(); /* Here disk_info.multi is set */ -#endif MULTISESSION +#endif /* MULTISESSION */ if (disk_info.multi) printk(KERN_WARNING "optcd: Multisession support experimental, " "see linux/Documentation/cdrom/optcd\n"); @@ -1709,11 +1709,11 @@ static int cdrommultisession(unsigned long arg) disk_info.last_session.minute, disk_info.last_session.second, disk_info.last_session.frame); -#endif DEBUG_MULTIS +#endif /* DEBUG_MULTIS */ return 0; } -#endif MULTISESSION +#endif /* MULTISESSION */ static int cdromreset(void) @@ -2026,7 +2026,7 @@ static int optcd_setup(char *str) __setup("optcd=", optcd_setup); -#endif MODULE +#endif /* MODULE */ /* Test for presence of drive and initialize it. Called at boot time or during module initialisation. */ diff --git a/drivers/cdrom/optcd.h b/drivers/cdrom/optcd.h index 00dd3aed8..1911bb92e 100644 --- a/drivers/cdrom/optcd.h +++ b/drivers/cdrom/optcd.h @@ -49,4 +49,4 @@ #define N_BUFS 6 -#endif _LINUX_OPTCD_H +#endif /* _LINUX_OPTCD_H */ diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index 4cec5680d..7e3138854 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c @@ -322,6 +322,9 @@ * CD_AUDIO_COMPLETED state so workman (and other playes) can repeat play. * Andrew J. Kroll <ag784@freenet.buffalo.edu> Wed Jul 26 04:24:10 EDT 2000 * + * 4.64 Fix module parameters - were being completely ignored. + * Can also specify max_drives=N as a setup int to get rid of + * "ghost" drives on crap hardware (aren't they all?) Paul Gortmaker * * TODO * implement "read all subchannel data" (96 bytes per frame) @@ -336,6 +339,15 @@ * */ +/* + * Trying to merge requests breaks this driver horribly (as in it goes + * boom and apparently has done so since 2.3.41). As it is a legacy + * driver for a horribly slow double speed CD on a hideous interface + * designed for polled operation, I won't loose any sleep in simply + * disallowing merging. Paul G. 02/2001 + */ +#define DONT_MERGE_REQUESTS + #ifndef SBPCD_ISSUE #define SBPCD_ISSUE 1 #endif SBPCD_ISSUE @@ -474,6 +486,7 @@ static int sbpcd[] = static int sbpcd[] = {CDROM_PORT, SBPRO}; /* probe with user's setup only */ #endif MODULE_PARM(sbpcd, "2i"); +MODULE_PARM(max_drives, "i"); #define NUM_PROBE (sizeof(sbpcd) / sizeof(int)) @@ -561,7 +574,6 @@ static int sbpcd_debug = 0 & ((1<<DBG_INF) | static int sbpcd_ioaddr = CDROM_PORT; /* default I/O base address */ static int sbpro_type = SBPRO; -static unsigned char setup_done; static unsigned char f_16bit; static unsigned char do_16bit; static int CDo_command, CDo_reset; @@ -578,15 +590,19 @@ static struct cdrom_read_audio read_audio; static unsigned char msgnum; static char msgbuf[80]; -static const char *str_sb = "SoundBlaster"; +static int max_drives = MAX_DRIVES; +#ifndef MODULE +static unsigned char setup_done; static const char *str_sb_l = "soundblaster"; -static const char *str_lm = "LaserMate"; -static const char *str_sp = "SPEA"; static const char *str_sp_l = "spea"; -static const char *str_ss = "SoundScape"; static const char *str_ss_l = "soundscape"; -static const char *str_t16 = "Teac16bit"; static const char *str_t16_l = "teac16bit"; +static const char *str_ss = "SoundScape"; +#endif +static const char *str_sb = "SoundBlaster"; +static const char *str_lm = "LaserMate"; +static const char *str_sp = "SPEA"; +static const char *str_t16 = "Teac16bit"; static const char *type; #if !(SBPCD_ISSUE-1) @@ -3739,7 +3755,7 @@ static int __init check_drives(void) msg(DBG_INI,"check_drives entered.\n"); ndrives=0; - for (j=0;j<MAX_DRIVES;j++) + for (j=0;j<max_drives;j++) { D_S[ndrives].drv_id=j; if (sbpro_type==1) D_S[ndrives].drv_sel=(j&0x01)<<1|(j&0x02)>>1; @@ -5540,6 +5556,7 @@ static int sbpcd_setup(char *s) int sbpcd_setup(char *s) #endif { +#ifndef MODULE int p[4]; (void)get_options(s, ARRAY_SIZE(p), p); setup_done++; @@ -5555,6 +5572,11 @@ int sbpcd_setup(char *s) else if (!strcmp(s,str_t16)) sbpro_type=3; else if (!strcmp(s,str_t16_l)) sbpro_type=3; if (p[0]>0) sbpcd_ioaddr=p[1]; + if (p[0]>2) max_drives=p[3]; +#else + sbpcd_ioaddr = sbpcd[0]; + sbpro_type = sbpcd[1]; +#endif CDo_command=sbpcd_ioaddr; CDi_info=sbpcd_ioaddr; @@ -5648,6 +5670,21 @@ static int __init config_spea(void) msg(DBG_SEQ,"found SoundScape interface at %04X.\n", sbpcd_ioaddr); return (0); } + +#ifdef DONT_MERGE_REQUESTS +static int dont_merge_requests_fn(request_queue_t *q, struct request *req, + struct request *next, int max_segments) +{ + return 0; +} + +static int dont_bh_merge_fn(request_queue_t *q, struct request *req, + struct buffer_head *bh, int max_segments) +{ + return 0; +} +#endif + /*==========================================================================*/ /* * Test for presence of drive and initialize it. @@ -5815,6 +5852,11 @@ int __init SBPCD_INIT(void) #endif MODULE } blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST); +#ifdef DONT_MERGE_REQUESTS + (BLK_DEFAULT_QUEUE(MAJOR_NR))->back_merge_fn = dont_bh_merge_fn; + (BLK_DEFAULT_QUEUE(MAJOR_NR))->front_merge_fn = dont_bh_merge_fn; + (BLK_DEFAULT_QUEUE(MAJOR_NR))->merge_requests_fn = dont_merge_requests_fn; +#endif blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0); read_ahead[MAJOR_NR] = buffers * (CD_FRAMESIZE / 512); diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index 15bcacd85..a66fb5651 100644 --- a/drivers/cdrom/sonycd535.c +++ b/drivers/cdrom/sonycd535.c @@ -122,7 +122,7 @@ #include <linux/hdreg.h> #include <linux/genhd.h> #include <linux/mm.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/init.h> #include <linux/devfs_fs_kernel.h> |