static int sleep_timeout; /* max # of ticks to sleep */
static DECLARE_WAIT_QUEUE_HEAD(waitq);
static void sleep_timer(unsigned long data);
static int sleep_timeout; /* max # of ticks to sleep */
static DECLARE_WAIT_QUEUE_HEAD(waitq);
static void sleep_timer(unsigned long data);
-static struct timer_list delay_timer = TIMER_INITIALIZER(sleep_timer, 0, 0);
+static DEFINE_TIMER(delay_timer, sleep_timer, 0, 0);
/* Wait for command execution status. Choice between busy waiting
and sleeping. Return value <0 indicates timeout. */
/* Wait for command execution status. Choice between busy waiting
and sleeping. Return value <0 indicates timeout. */
/* Facilities for asynchronous operation */
/* Read status/data availability flags FL_STEN and FL_DTEN */
/* Facilities for asynchronous operation */
/* Read status/data availability flags FL_STEN and FL_DTEN */
{
return inb(STATUS_PORT) & FL_STDT;
}
/* Fetch status that has previously been waited for. <0 means not available */
{
return inb(STATUS_PORT) & FL_STDT;
}
/* Fetch status that has previously been waited for. <0 means not available */
/* Send a simple command and wait for response. Command codes < COMFETCH
are quick response commands */
/* Send a simple command and wait for response. Command codes < COMFETCH
are quick response commands */
/* Send a command with parameters. Don't wait for the response,
* which consists of data blocks read from the CD. */
/* Send a command with parameters. Don't wait for the response,
* which consists of data blocks read from the CD. */
{
DEBUG((DEBUG_CONV, "bin2bcd %02d", *p));
*p = (*p % 10) | ((*p / 10) << 4);
{
DEBUG((DEBUG_CONV, "bin2bcd %02d", *p));
*p = (*p % 10) | ((*p / 10) << 4);
{
DEBUG((DEBUG_CONV, "bcd2bin %x%02x", bcd));
return (bcd >> 4) * 10 + (bcd & 0x0f);
{
DEBUG((DEBUG_CONV, "bcd2bin %x%02x", bcd));
return (bcd >> 4) * 10 + (bcd & 0x0f);
static volatile int buf_bn[N_BUFS], next_bn;
static volatile int buf_in = 0, buf_out = NOBUF;
static volatile int buf_bn[N_BUFS], next_bn;
static volatile int buf_in = 0, buf_out = NOBUF;