git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
cdrom
/
mcd.c
diff --git
a/drivers/cdrom/mcd.c
b/drivers/cdrom/mcd.c
index
4cb0fb4
..
55db09b
100644
(file)
--- a/
drivers/cdrom/mcd.c
+++ b/
drivers/cdrom/mcd.c
@@
-103,7
+103,6
@@
#include <asm/uaccess.h>
#include <linux/blkdev.h>
#include <asm/uaccess.h>
#include <linux/blkdev.h>
-#define mcd_port mcd /* for compatible parameter passing with "insmod" */
#include "mcd.h"
/* I added A flag to drop to 1x speed if too many errors 0 = 1X ; 1 = 2X */
#include "mcd.h"
/* I added A flag to drop to 1x speed if too many errors 0 = 1X ; 1 = 2X */
@@
-157,7
+156,6
@@
int mitsumi_bug_93_wait;
static short mcd_port = CONFIG_MCD_BASE; /* used as "mcd" by "insmod" */
static int mcd_irq = CONFIG_MCD_IRQ; /* must directly follow mcd_port */
static short mcd_port = CONFIG_MCD_BASE; /* used as "mcd" by "insmod" */
static int mcd_irq = CONFIG_MCD_IRQ; /* must directly follow mcd_port */
-MODULE_PARM(mcd, "1-2i");
static int McdTimeout, McdTries;
static DECLARE_WAIT_QUEUE_HEAD(mcd_waitq);
static int McdTimeout, McdTries;
static DECLARE_WAIT_QUEUE_HEAD(mcd_waitq);
@@
-189,7
+187,7
@@
static int mcd_open(struct cdrom_device_info *cdi, int purpose);
static void mcd_release(struct cdrom_device_info *cdi);
static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr);
static int mcd_tray_move(struct cdrom_device_info *cdi, int position);
static void mcd_release(struct cdrom_device_info *cdi);
static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr);
static int mcd_tray_move(struct cdrom_device_info *cdi, int position);
-static
spinlock_t mcd_spinlock = SPIN_LOCK_UNLOCKED
;
+static
DEFINE_SPINLOCK(mcd_spinlock)
;
static int mcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
void *arg);
static int mcd_drive_status(struct cdrom_device_info *cdi, int slot_nr);
static int mcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
void *arg);
static int mcd_drive_status(struct cdrom_device_info *cdi, int slot_nr);
@@
-246,7
+244,6
@@
static struct block_device_operations mcd_bdops =
static struct gendisk *mcd_gendisk;
static struct gendisk *mcd_gendisk;
-#ifndef MODULE
static int __init mcd_setup(char *str)
{
int ints[9];
static int __init mcd_setup(char *str)
{
int ints[9];
@@
-265,7
+262,14
@@
static int __init mcd_setup(char *str)
__setup("mcd=", mcd_setup);
__setup("mcd=", mcd_setup);
-#endif /* MODULE */
+#ifdef MODULE
+static int __init param_set_mcd(const char *val, struct kernel_param *kp)
+{
+ mcd_setup(val);
+ return 0;
+}
+module_param_call(mcd, param_set_mcd, NULL, NULL, 0);
+#endif
static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr)
{
static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr)
{
@@
-1021,10
+1025,9
@@
static int mcd_open(struct cdrom_device_info *cdi, int purpose)
st = statusCmd(); /* check drive status */
if (st == -1)
goto err_out; /* drive doesn't respond */
st = statusCmd(); /* check drive status */
if (st == -1)
goto err_out; /* drive doesn't respond */
- if ((st & MST_READY) == 0) { /* no disk? wait a sec... */
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ);
- }
+ if ((st & MST_READY) == 0) /* no disk? wait a sec... */
+ msleep(1000);
+
} while (((st & MST_READY) == 0) && count++ < MCD_RETRY_ATTEMPTS);
if (updateToc() < 0)
} while (((st & MST_READY) == 0) && count++ < MCD_RETRY_ATTEMPTS);
if (updateToc() < 0)