Commit 3793c9b9 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.2.5

parent 98c4b45f
VERSION = 1 VERSION = 1
PATCHLEVEL = 2 PATCHLEVEL = 2
SUBLEVEL = 4 SUBLEVEL = 5
ARCH = i386 ARCH = i386
......
...@@ -124,15 +124,15 @@ COMPILING the kernel: ...@@ -124,15 +124,15 @@ COMPILING the kernel:
floppy. floppy.
If you boot Linux from the hard drive, chances are you use LILO which If you boot Linux from the hard drive, chances are you use LILO which
uses the kernel image as specified in the file /etc/lilo/config. The uses the kernel image as specified in the file /etc/lilo.conf. The
kernel image file is usually /vmlinuz, or /zImage, or /etc/zImage. kernel image file is usually /vmlinuz, or /zImage, or /etc/zImage.
To use the new kernel, copy the new image over the old one (save a To use the new kernel, copy the new image over the old one (save a
backup of the original!). Then, you MUST RERUN LILO to update the backup of the original!). Then, you MUST RERUN LILO to update the
loading map!! If you don't, you won't be able to boot the new kernel loading map!! If you don't, you won't be able to boot the new kernel
image. image.
Reinstalling LILO is usually a matter of running /etc/lilo/install. Reinstalling LILO is usually a matter of running /sbin/lilo.
You may wish to edit /etc/lilo/config to specify an entry for your You may wish to edit /etc/lilo.conf to specify an entry for your
old kernel image (say, /vmlinux.old) in case the new one does not old kernel image (say, /vmlinux.old) in case the new one does not
work. See the LILO docs for more information. work. See the LILO docs for more information.
......
...@@ -169,18 +169,38 @@ static inline struct request * get_request(int n, int dev) ...@@ -169,18 +169,38 @@ static inline struct request * get_request(int n, int dev)
/* /*
* wait until a free request in the first N entries is available. * wait until a free request in the first N entries is available.
* NOTE: interrupts must be disabled on the way in, and will still
* be disabled on the way out.
*/ */
static inline struct request * get_request_wait(int n, int dev) static struct request * __get_request_wait(int n, int dev)
{ {
register struct request *req; register struct request *req;
struct wait_queue wait = { current, NULL };
while ((req = get_request(n, dev)) == NULL) { add_wait_queue(&wait_for_request, &wait);
for (;;) {
unplug_device(MAJOR(dev)+blk_dev); unplug_device(MAJOR(dev)+blk_dev);
sleep_on(&wait_for_request); current->state = TASK_UNINTERRUPTIBLE;
cli();
req = get_request(n, dev);
sti();
if (req)
break;
schedule();
} }
remove_wait_queue(&wait_for_request, &wait);
current->state = TASK_RUNNING;
return req;
}
static inline struct request * get_request_wait(int n, int dev)
{
register struct request *req;
cli();
req = get_request(n, dev);
sti();
if (req)
return req; return req;
return __get_request_wait(n, dev);
} }
/* RO fail safe mechanism */ /* RO fail safe mechanism */
...@@ -303,9 +323,7 @@ static void make_request(int major,int rw, struct buffer_head * bh) ...@@ -303,9 +323,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
*/ */
max_req = (rw == READ) ? NR_REQUEST : ((NR_REQUEST*2)/3); max_req = (rw == READ) ? NR_REQUEST : ((NR_REQUEST*2)/3);
/* big loop: look for a free request. */ /* look for a free request. */
repeat:
cli(); cli();
/* The scsi disk drivers and the IDE driver completely remove the request /* The scsi disk drivers and the IDE driver completely remove the request
...@@ -363,23 +381,17 @@ static void make_request(int major,int rw, struct buffer_head * bh) ...@@ -363,23 +381,17 @@ static void make_request(int major,int rw, struct buffer_head * bh)
/* find an unused request. */ /* find an unused request. */
req = get_request(max_req, bh->b_dev); req = get_request(max_req, bh->b_dev);
sti();
/* if no request available: if rw_ahead, forget it; otherwise try again. */ /* if no request available: if rw_ahead, forget it; otherwise try again blocking.. */
if (! req) { if (!req) {
if (rw_ahead) { if (rw_ahead) {
sti();
unlock_buffer(bh); unlock_buffer(bh);
return; return;
} }
unplug_device(major+blk_dev); req = __get_request_wait(max_req, bh->b_dev);
sleep_on(&wait_for_request);
sti();
goto repeat;
} }
/* we found a request. */
sti();
/* fill up the request-info, and add it to the queue */ /* fill up the request-info, and add it to the queue */
req->cmd = rw; req->cmd = rw;
req->errors = 0; req->errors = 0;
...@@ -410,9 +422,7 @@ void ll_rw_page(int rw, int dev, int page, char * buffer) ...@@ -410,9 +422,7 @@ void ll_rw_page(int rw, int dev, int page, char * buffer)
printk("Can't page to read-only device 0x%X\n",dev); printk("Can't page to read-only device 0x%X\n",dev);
return; return;
} }
cli();
req = get_request_wait(NR_REQUEST, dev); req = get_request_wait(NR_REQUEST, dev);
sti();
/* fill up the request-info, and add it to the queue */ /* fill up the request-info, and add it to the queue */
req->cmd = rw; req->cmd = rw;
req->errors = 0; req->errors = 0;
...@@ -533,9 +543,7 @@ void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf) ...@@ -533,9 +543,7 @@ void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf)
for (i=0; i<nb; i++, buf += buffersize) for (i=0; i<nb; i++, buf += buffersize)
{ {
cli();
req = get_request_wait(NR_REQUEST, dev); req = get_request_wait(NR_REQUEST, dev);
sti();
req->cmd = rw; req->cmd = rw;
req->errors = 0; req->errors = 0;
req->sector = (b[i] * buffersize) >> 9; req->sector = (b[i] * buffersize) >> 9;
......
Wed Apr 12 08:06:16 1995 Theodore Y. Ts'o <tytso@localhost>
* serial.c (do_serial_hangup, do_softint, check_modem_status,
rs_init): Hangups are now scheduled via a separate tqueue
structure in the async_struct structure, tqueue_hangup.
This task is pushed on to the tq_schedule queue, so that
it is processed syncronously by the scheduler.
Sat Feb 18 12:13:51 1995 Theodore Y. Ts'o (tytso@rt-11) Sat Feb 18 12:13:51 1995 Theodore Y. Ts'o (tytso@rt-11)
* tty_io.c (disassociate_ctty, tty_open, tty_ioctl): Clear * tty_io.c (disassociate_ctty, tty_open, tty_ioctl): Clear
......
...@@ -468,7 +468,8 @@ static _INLINE_ void check_modem_status(struct async_struct *info) ...@@ -468,7 +468,8 @@ static _INLINE_ void check_modem_status(struct async_struct *info)
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("scheduling hangup..."); printk("scheduling hangup...");
#endif #endif
rs_sched_event(info, RS_EVENT_HANGUP); queue_task_irq_off(&info->tqueue_hangup,
&tq_scheduler);
} }
} }
if (info->flags & ASYNC_CTS_FLOW) { if (info->flags & ASYNC_CTS_FLOW) {
...@@ -722,12 +723,6 @@ static void do_softint(void *private_) ...@@ -722,12 +723,6 @@ static void do_softint(void *private_)
if (!tty) if (!tty)
return; return;
if (clear_bit(RS_EVENT_HANGUP, &info->event)) {
tty_hangup(tty);
wake_up_interruptible(&info->open_wait);
info->flags &= ~(ASYNC_NORMAL_ACTIVE|
ASYNC_CALLOUT_ACTIVE);
}
if (clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { if (clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty->ldisc.write_wakeup) tty->ldisc.write_wakeup)
...@@ -736,6 +731,28 @@ static void do_softint(void *private_) ...@@ -736,6 +731,28 @@ static void do_softint(void *private_)
} }
} }
/*
* This routine is called from the scheduler tqueue when the interrupt
* routine has signalled that a hangup has occured. The path of
* hangup processing is:
*
* serial interrupt routine -> (scheduler tqueue) ->
* do_serial_hangup() -> tty->hangup() -> rs_hangup()
*
*/
static void do_serial_hangup(void *private_)
{
struct async_struct *info = (struct async_struct *) private_;
struct tty_struct *tty;
tty = info->tty;
if (!tty)
return;
tty_hangup(tty);
}
/* /*
* This subroutine is called when the RS_TIMER goes off. It is used * This subroutine is called when the RS_TIMER goes off. It is used
* by the serial driver to handle ports that do not have an interrupt * by the serial driver to handle ports that do not have an interrupt
...@@ -2615,6 +2632,8 @@ long rs_init(long kmem_start) ...@@ -2615,6 +2632,8 @@ long rs_init(long kmem_start)
info->blocked_open = 0; info->blocked_open = 0;
info->tqueue.routine = do_softint; info->tqueue.routine = do_softint;
info->tqueue.data = info; info->tqueue.data = info;
info->tqueue_hangup.routine = do_serial_hangup;
info->tqueue_hangup.data = info;
info->callout_termios =callout_driver.init_termios; info->callout_termios =callout_driver.init_termios;
info->normal_termios = serial_driver.init_termios; info->normal_termios = serial_driver.init_termios;
info->open_wait = 0; info->open_wait = 0;
......
...@@ -913,7 +913,7 @@ lance_rx(struct device *dev) ...@@ -913,7 +913,7 @@ lance_rx(struct device *dev)
lp->rx_ring[entry].base &= 0x03ffffff; lp->rx_ring[entry].base &= 0x03ffffff;
} else { } else {
/* Malloc up new buffer, compatible with net-2e. */ /* Malloc up new buffer, compatible with net-2e. */
short pkt_len = lp->rx_ring[entry].msg_length; short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4;
struct sk_buff *skb; struct sk_buff *skb;
skb = alloc_skb(pkt_len, GFP_ATOMIC); skb = alloc_skb(pkt_len, GFP_ATOMIC);
......
#define rw_bugfix
/* ne.c: A general non-shared-memory NS8390 ethernet driver for linux. */ /* ne.c: A general non-shared-memory NS8390 ethernet driver for linux. */
/* /*
Written 1992-94 by Donald Becker. Written 1992-94 by Donald Becker.
...@@ -375,6 +376,7 @@ ne_block_output(struct device *dev, int count, ...@@ -375,6 +376,7 @@ ne_block_output(struct device *dev, int count,
{ {
int retries = 0; int retries = 0;
int nic_base = NE_BASE; int nic_base = NE_BASE;
unsigned long flags;
/* Round the count up for word writes. Do we need to do this? /* Round the count up for word writes. Do we need to do this?
What effect will an odd byte count have on the 8390? What effect will an odd byte count have on the 8390?
...@@ -415,8 +417,13 @@ ne_block_output(struct device *dev, int count, ...@@ -415,8 +417,13 @@ ne_block_output(struct device *dev, int count,
race condition will munge the remote byte count values, and then race condition will munge the remote byte count values, and then
the ne2k will hang the machine by holding I/O CH RDY because it the ne2k will hang the machine by holding I/O CH RDY because it
expects more data. Hopefully fixes the lockups. -- Paul Gortmaker. expects more data. Hopefully fixes the lockups. -- Paul Gortmaker.
Use save_flags/cli/restore_flags rather than cli/sti to avoid risk
of accidentally enabling interrupts which were disabled when we
were entered. Dave Platt <dplatt@3do.com>
*/ */
save_flags(flags);
cli(); cli();
outb_p(count & 0xff, nic_base + EN0_RCNTLO); outb_p(count & 0xff, nic_base + EN0_RCNTLO);
outb_p(count >> 8, nic_base + EN0_RCNTHI); outb_p(count >> 8, nic_base + EN0_RCNTHI);
...@@ -429,7 +436,7 @@ ne_block_output(struct device *dev, int count, ...@@ -429,7 +436,7 @@ ne_block_output(struct device *dev, int count,
} else { } else {
outsb(NE_BASE + NE_DATAPORT, buf, count); outsb(NE_BASE + NE_DATAPORT, buf, count);
} }
sti(); restore_flags(flags);
#ifdef CONFIG_NE_SANITY #ifdef CONFIG_NE_SANITY
/* This was for the ALPHA version only, but enough people have /* This was for the ALPHA version only, but enough people have
......
...@@ -71,7 +71,7 @@ struct net_local ...@@ -71,7 +71,7 @@ struct net_local
extern int wavelan_probe(device *); /* See Space.c */ extern int wavelan_probe(device *); /* See Space.c */
static char *version = "wavelan.c:v6 22/2/95\n"; static char *version = "wavelan.c:v7 95/4/8\n";
/* /*
* Entry point forward declarations. * Entry point forward declarations.
...@@ -508,6 +508,9 @@ wavelan_hardware_reset(device *dev) ...@@ -508,6 +508,9 @@ wavelan_hardware_reset(device *dev)
ac_cfg_t cfg; ac_cfg_t cfg;
ac_ias_t ias; ac_ias_t ias;
if (wavelan_debug > 0)
printk("%s: ->wavelan_hardware_reset(dev=0x%x)\n", dev->name, (unsigned int)dev);
ioaddr = dev->base_addr; ioaddr = dev->base_addr;
lp = (net_local *)dev->priv; lp = (net_local *)dev->priv;
...@@ -565,7 +568,12 @@ wavelan_hardware_reset(device *dev) ...@@ -565,7 +568,12 @@ wavelan_hardware_reset(device *dev)
} }
if (i <= 0) if (i <= 0)
{
printk("%s: wavelan_hardware_reset(): iscp_busy timeout.\n", dev->name); printk("%s: wavelan_hardware_reset(): iscp_busy timeout.\n", dev->name);
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name);
return -1;
}
for (i = 15; i > 0; i--) for (i = 15; i > 0; i--)
{ {
...@@ -578,7 +586,12 @@ wavelan_hardware_reset(device *dev) ...@@ -578,7 +586,12 @@ wavelan_hardware_reset(device *dev)
} }
if (i <= 0) if (i <= 0)
{
printk("%s: wavelan_hardware_reset(): status: expected 0x%02x, got 0x%02x.\n", dev->name, SCB_ST_CX | SCB_ST_CNA, scb.scb_status); printk("%s: wavelan_hardware_reset(): status: expected 0x%02x, got 0x%02x.\n", dev->name, SCB_ST_CX | SCB_ST_CNA, scb.scb_status);
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name);
return -1;
}
wavelan_ack(dev); wavelan_ack(dev);
...@@ -588,12 +601,18 @@ wavelan_hardware_reset(device *dev) ...@@ -588,12 +601,18 @@ wavelan_hardware_reset(device *dev)
obram_write(ioaddr, OFFSET_CU, (unsigned char *)&cb, sizeof(cb)); obram_write(ioaddr, OFFSET_CU, (unsigned char *)&cb, sizeof(cb));
if (wavelan_synchronous_cmd(dev, "diag()") == -1) if (wavelan_synchronous_cmd(dev, "diag()") == -1)
{
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name);
return -1; return -1;
}
obram_read(ioaddr, OFFSET_CU, (unsigned char *)&cb, sizeof(cb)); obram_read(ioaddr, OFFSET_CU, (unsigned char *)&cb, sizeof(cb));
if (cb.ac_status & AC_SFLD_FAIL) if (cb.ac_status & AC_SFLD_FAIL)
{ {
printk("%s: wavelan_hardware_reset(): i82586 Self Test failed.\n", dev->name); printk("%s: wavelan_hardware_reset(): i82586 Self Test failed.\n", dev->name);
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name);
return -1; return -1;
} }
...@@ -654,7 +673,12 @@ wavelan_hardware_reset(device *dev) ...@@ -654,7 +673,12 @@ wavelan_hardware_reset(device *dev)
obram_write(ioaddr, OFFSET_CU, (unsigned char *)&cfg, sizeof(cfg)); obram_write(ioaddr, OFFSET_CU, (unsigned char *)&cfg, sizeof(cfg));
if (wavelan_synchronous_cmd(dev, "reset()-configure") == -1) if (wavelan_synchronous_cmd(dev, "reset()-configure") == -1)
{
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name);
return -1; return -1;
}
memset(&ias, 0x00, sizeof(ias)); memset(&ias, 0x00, sizeof(ias));
ias.ias_h.ac_command = AC_CFLD_EL | (AC_CFLD_CMD & acmd_ia_setup); ias.ias_h.ac_command = AC_CFLD_EL | (AC_CFLD_CMD & acmd_ia_setup);
...@@ -663,19 +687,24 @@ wavelan_hardware_reset(device *dev) ...@@ -663,19 +687,24 @@ wavelan_hardware_reset(device *dev)
obram_write(ioaddr, OFFSET_CU, (unsigned char *)&ias, sizeof(ias)); obram_write(ioaddr, OFFSET_CU, (unsigned char *)&ias, sizeof(ias));
if (wavelan_synchronous_cmd(dev, "reset()-address") == -1) if (wavelan_synchronous_cmd(dev, "reset()-address") == -1)
{
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name);
return -1; return -1;
}
wavelan_ints_on(dev); wavelan_ints_on(dev);
if (wavelan_debug > 4) if (wavelan_debug > 4)
{
wavelan_scb_show(ioaddr); wavelan_scb_show(ioaddr);
printk("%s: Initialized WaveLAN.\n", dev->name);
}
wavelan_ru_start(dev); wavelan_ru_start(dev);
wavelan_cu_start(dev); wavelan_cu_start(dev);
if (wavelan_debug > 0)
printk("%s: <-wavelan_hardware_reset(): 0\n", dev->name);
return 0; return 0;
} }
...@@ -708,6 +737,7 @@ int ...@@ -708,6 +737,7 @@ int
wavelan_probe(device *dev) wavelan_probe(device *dev)
{ {
int i; int i;
int r;
short base_addr; short base_addr;
static unsigned short iobase[] = static unsigned short iobase[] =
{ {
...@@ -721,10 +751,17 @@ wavelan_probe(device *dev) ...@@ -721,10 +751,17 @@ wavelan_probe(device *dev)
0x390, 0x390,
}; };
if (wavelan_debug > 0)
printk("%s: ->wavelan_probe(dev=0x%x (base_addr=0x%x))\n", dev->name, (unsigned int)dev, (unsigned int)dev->base_addr);
#if STRUCT_CHECK == 1 #if STRUCT_CHECK == 1
if (wavelan_struct_check() != (char *)0) if (wavelan_struct_check() != (char *)0)
{ {
printk("%s: structure/compiler botch: \"%s\"\n", dev->name, wavelan_struct_check()); printk("%s: structure/compiler botch: \"%s\"\n", dev->name, wavelan_struct_check());
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe(): ENODEV\n", dev->name);
return ENODEV; return ENODEV;
} }
#endif /* STRUCT_CHECK == 1 */ #endif /* STRUCT_CHECK == 1 */
...@@ -732,16 +769,25 @@ wavelan_probe(device *dev) ...@@ -732,16 +769,25 @@ wavelan_probe(device *dev)
base_addr = dev->base_addr; base_addr = dev->base_addr;
if (base_addr < 0) if (base_addr < 0)
{
/* /*
* Don't probe at all. * Don't probe at all.
*/ */
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe(): ENXIO\n", dev->name);
return ENXIO; return ENXIO;
}
if (base_addr > 0x100) if (base_addr > 0x100)
{
/* /*
* Check a single specified location. * Check a single specified location.
*/ */
return wavelan_probe1(dev, base_addr); r = wavelan_probe1(dev, base_addr);
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe(): %d\n", dev->name, r);
return r;
}
for (i = 0; i < nels(iobase); i++) for (i = 0; i < nels(iobase); i++)
{ {
...@@ -749,8 +795,15 @@ wavelan_probe(device *dev) ...@@ -749,8 +795,15 @@ wavelan_probe(device *dev)
continue; continue;
if (wavelan_probe1(dev, iobase[i]) == 0) if (wavelan_probe1(dev, iobase[i]) == 0)
{
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe(): 0\n", dev->name);
return 0; return 0;
} }
}
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe(): ENODEV\n", dev->name);
return ENODEV; return ENODEV;
} }
...@@ -764,6 +817,9 @@ wavelan_probe1(device *dev, unsigned short ioaddr) ...@@ -764,6 +817,9 @@ wavelan_probe1(device *dev, unsigned short ioaddr)
int i; int i;
net_local *lp; net_local *lp;
if (wavelan_debug > 0)
printk("%s: ->wavelan_probe1(dev=0x%x, ioaddr=0x%x)\n", dev->name, (unsigned int)dev, ioaddr);
wavelan_reset(ioaddr); wavelan_reset(ioaddr);
psa_read(ioaddr, HACR_DEFAULT, 0, (unsigned char *)&psa, sizeof(psa)); psa_read(ioaddr, HACR_DEFAULT, 0, (unsigned char *)&psa, sizeof(psa));
...@@ -780,13 +836,19 @@ wavelan_probe1(device *dev, unsigned short ioaddr) ...@@ -780,13 +836,19 @@ wavelan_probe1(device *dev, unsigned short ioaddr)
|| ||
psa.psa_univ_mac_addr[2] != SA_ADDR2 psa.psa_univ_mac_addr[2] != SA_ADDR2
) )
{
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe1(): ENODEV\n", dev->name);
return ENODEV; return ENODEV;
}
printk("%s: WaveLAN at %#x,", dev->name, ioaddr); printk("%s: WaveLAN at %#x,", dev->name, ioaddr);
if ((irq = wavelan_map_irq(ioaddr, psa.psa_int_req_no)) == -1) if ((irq = wavelan_map_irq(ioaddr, psa.psa_int_req_no)) == -1)
{ {
printk(" could not wavelan_map_irq(0x%x, %d).\n", ioaddr, psa.psa_int_req_no); printk(" could not wavelan_map_irq(0x%x, %d).\n", ioaddr, psa.psa_int_req_no);
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe1(): EAGAIN\n", dev->name);
return EAGAIN; return EAGAIN;
} }
...@@ -871,7 +933,7 @@ wavelan_probe1(device *dev, unsigned short ioaddr) ...@@ -871,7 +933,7 @@ wavelan_probe1(device *dev, unsigned short ioaddr)
printk("\n"); printk("\n");
if (wavelan_debug) if (wavelan_debug > 0)
printk(version); printk(version);
dev->priv = kmalloc(sizeof(net_local), GFP_KERNEL); dev->priv = kmalloc(sizeof(net_local), GFP_KERNEL);
...@@ -915,6 +977,9 @@ wavelan_probe1(device *dev, unsigned short ioaddr) ...@@ -915,6 +977,9 @@ wavelan_probe1(device *dev, unsigned short ioaddr)
dev->mtu = WAVELAN_MTU; dev->mtu = WAVELAN_MTU;
if (wavelan_debug > 0)
printk("%s: <-wavelan_probe1(): 0\n", dev->name);
return 0; return 0;
} }
...@@ -1074,12 +1139,21 @@ wavelan_open(device *dev) ...@@ -1074,12 +1139,21 @@ wavelan_open(device *dev)
{ {
unsigned short ioaddr; unsigned short ioaddr;
net_local *lp; net_local *lp;
unsigned long x;
int r;
if (wavelan_debug > 0)
printk("%s: ->wavelan_open(dev=0x%x)\n", dev->name, (unsigned int)dev);
ioaddr = dev->base_addr; ioaddr = dev->base_addr;
lp = (net_local *)dev->priv; lp = (net_local *)dev->priv;
if (dev->irq == 0) if (dev->irq == 0)
{
if (wavelan_debug > 0)
printk("%s: <-wavelan_open(): -ENXIO\n", dev->name);
return -ENXIO; return -ENXIO;
}
if if
( (
...@@ -1092,23 +1166,35 @@ wavelan_open(device *dev) ...@@ -1092,23 +1166,35 @@ wavelan_open(device *dev)
) )
{ {
irq2dev_map[dev->irq] = (device *)0; irq2dev_map[dev->irq] = (device *)0;
if (wavelan_debug > 0)
printk("%s: <-wavelan_open(): -EAGAIN\n", dev->name);
return -EAGAIN; return -EAGAIN;
} }
if (wavelan_hardware_reset(dev) == -1) x = wavelan_splhi();
if ((r = wavelan_hardware_reset(dev)) != -1)
{
dev->interrupt = 0;
dev->start = 1;
}
wavelan_splx(x);
if (r == -1)
{ {
free_irq(dev->irq); free_irq(dev->irq);
irq2dev_map[dev->irq] = (device *)0; irq2dev_map[dev->irq] = (device *)0;
if (wavelan_debug > 0)
printk("%s: <-wavelan_open(): -EAGAIN(2)\n", dev->name);
return -EAGAIN; return -EAGAIN;
} }
dev->interrupt = 0;
dev->start = 1;
#if defined(MODULE) #if defined(MODULE)
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
#endif /* defined(MODULE) */ #endif /* defined(MODULE) */
if (wavelan_debug > 0)
printk("%s: <-wavelan_open(): 0\n", dev->name);
return 0; return 0;
} }
...@@ -1438,7 +1524,7 @@ wavelan_receive(device *dev) ...@@ -1438,7 +1524,7 @@ wavelan_receive(device *dev)
} }
#endif /* 0 */ #endif /* 0 */
if (wavelan_debug > 0) if (wavelan_debug > 5)
{ {
unsigned char addr[WAVELAN_ADDR_SIZE]; unsigned char addr[WAVELAN_ADDR_SIZE];
unsigned short ltype; unsigned short ltype;
...@@ -1723,14 +1809,14 @@ wavelan_interrupt(int irq, struct pt_regs *regs) ...@@ -1723,14 +1809,14 @@ wavelan_interrupt(int irq, struct pt_regs *regs)
* This will clear it -- ignored for now. * This will clear it -- ignored for now.
*/ */
mmc_read(ioaddr, mmroff(0, mmr_dce_status), &dce_status, sizeof(dce_status)); mmc_read(ioaddr, mmroff(0, mmr_dce_status), &dce_status, sizeof(dce_status));
if (wavelan_debug > 4) if (wavelan_debug > 0)
printk("%s: warning: wavelan_interrupt(): unexpected mmc interrupt: status 0x%04x.\n", dev->name, dce_status); printk("%s: warning: wavelan_interrupt(): unexpected mmc interrupt: status 0x%04x.\n", dev->name, dce_status);
} }
if ((hasr & HASR_82586_INTR) == 0) if ((hasr & HASR_82586_INTR) == 0)
{ {
dev->interrupt = 0; dev->interrupt = 0;
if (wavelan_debug > 4) if (wavelan_debug > 0)
printk("%s: warning: wavelan_interrupt() but (hasr & HASR_82586_INTR) == 0.\n", dev->name); printk("%s: warning: wavelan_interrupt() but (hasr & HASR_82586_INTR) == 0.\n", dev->name);
return; return;
} }
...@@ -1746,7 +1832,7 @@ wavelan_interrupt(int irq, struct pt_regs *regs) ...@@ -1746,7 +1832,7 @@ wavelan_interrupt(int irq, struct pt_regs *regs)
set_chan_attn(ioaddr, lp->hacr); set_chan_attn(ioaddr, lp->hacr);
if (wavelan_debug > 4) if (wavelan_debug > 5)
printk("%s: interrupt, status 0x%04x.\n", dev->name, status); printk("%s: interrupt, status 0x%04x.\n", dev->name, status);
if ((status & SCB_ST_CX) == SCB_ST_CX) if ((status & SCB_ST_CX) == SCB_ST_CX)
...@@ -1804,6 +1890,9 @@ wavelan_close(device *dev) ...@@ -1804,6 +1890,9 @@ wavelan_close(device *dev)
net_local *lp; net_local *lp;
unsigned short scb_cmd; unsigned short scb_cmd;
if (wavelan_debug > 0)
printk("%s: ->wavelan_close(dev=0x%x)\n", dev->name, (unsigned int)dev);
ioaddr = dev->base_addr; ioaddr = dev->base_addr;
lp = (net_local *)dev->priv; lp = (net_local *)dev->priv;
...@@ -1831,6 +1920,9 @@ wavelan_close(device *dev) ...@@ -1831,6 +1920,9 @@ wavelan_close(device *dev)
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
#endif /* defined(MODULE) */ #endif /* defined(MODULE) */
if (wavelan_debug > 0)
printk("%s: <-wavelan_close(): 0\n", dev->name);
return 0; return 0;
} }
...@@ -1856,6 +1948,9 @@ wavelan_set_multicast_list(device *dev, int num_addrs, void *addrs) ...@@ -1856,6 +1948,9 @@ wavelan_set_multicast_list(device *dev, int num_addrs, void *addrs)
net_local *lp; net_local *lp;
unsigned long x; unsigned long x;
if (wavelan_debug > 0)
printk("%s: ->wavelan_set_multicast_list(dev=0x%x, num_addrs=%d, addrs=0x%x)\n", dev->name, (unsigned int)dev, num_addrs, (unsigned int)addrs);
lp = (net_local *)dev->priv; lp = (net_local *)dev->priv;
switch (num_addrs) switch (num_addrs)
...@@ -1888,6 +1983,9 @@ wavelan_set_multicast_list(device *dev, int num_addrs, void *addrs) ...@@ -1888,6 +1983,9 @@ wavelan_set_multicast_list(device *dev, int num_addrs, void *addrs)
*/ */
break; break;
} }
if (wavelan_debug > 0)
printk("%s: <-wavelan_set_multicast_list()\n", dev->name);
} }
/* /*
...@@ -2330,6 +2428,7 @@ wavelan_local_show(device *dev) ...@@ -2330,6 +2428,7 @@ wavelan_local_show(device *dev)
* Matthew Geier (matthew@cs.usyd.edu.au), * Matthew Geier (matthew@cs.usyd.edu.au),
* Remo di Giovanni (remo@cs.usyd.edu.au), * Remo di Giovanni (remo@cs.usyd.edu.au),
* Eckhard Grah (grah@wrcs1.urz.uni-wuppertal.de), * Eckhard Grah (grah@wrcs1.urz.uni-wuppertal.de),
* Vipul Gupta (vgupta@cs.binghamton.edu),
* Mark Hagan (mhagan@wtcpost.daytonoh.NCR.COM), * Mark Hagan (mhagan@wtcpost.daytonoh.NCR.COM),
* Tim Nicholson (tim@cs.usyd.edu.au), * Tim Nicholson (tim@cs.usyd.edu.au),
* Ian Parkin (ian@cs.usyd.edu.au), * Ian Parkin (ian@cs.usyd.edu.au),
......
...@@ -86,9 +86,11 @@ SCSI_OBJS := $(SCSI_OBJS) buslogic.o ...@@ -86,9 +86,11 @@ SCSI_OBJS := $(SCSI_OBJS) buslogic.o
SCSI_SRCS := $(SCSI_SRCS) buslogic.c SCSI_SRCS := $(SCSI_SRCS) buslogic.c
endif endif
SCSI_SRCS := $(SCSI_SRCS) eata_dma.c
ifdef CONFIG_SCSI_EATA_DMA ifdef CONFIG_SCSI_EATA_DMA
SCSI_OBJS := $(SCSI_OBJS) eata_dma.o SCSI_OBJS := $(SCSI_OBJS) eata_dma.o
SCSI_SRCS := $(SCSI_SRCS) eata_dma.c else
SCSI_MODULE_OBJS := $(SCSI_MODULE_OBJS) eata_dma.o
endif endif
ifdef CONFIG_SCSI_U14_34F ifdef CONFIG_SCSI_U14_34F
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Header file for eata_dma.c Linux EATA-DMA SCSI driver * * Header file for eata_dma.c Linux EATA-DMA SCSI driver *
* (c) 1993,94,95 Michael Neuffer * * (c) 1993,94,95 Michael Neuffer *
********************************************************* *********************************************************
* last change: 95/02/13 * * last change: 95/04/10 *
********************************************************/ ********************************************************/
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define VER_MAJOR 2 #define VER_MAJOR 2
#define VER_MINOR 3 #define VER_MINOR 3
#define VER_SUB "1a" #define VER_SUB "5r"
/************************************************************************ /************************************************************************
* Here you can configure your drives that are using a non-standard * * Here you can configure your drives that are using a non-standard *
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#define DBG_QUEUE 0 /* Trace command queueing. */ #define DBG_QUEUE 0 /* Trace command queueing. */
#define DBG_INTR 0 /* Trace interrupt service routine. */ #define DBG_INTR 0 /* Trace interrupt service routine. */
#define DBG_INTR2 0 /* Trace interrupt service routine. */ #define DBG_INTR2 0 /* Trace interrupt service routine. */
#define DBG_INTR3 0 /* Trace interrupt service routine. */
#define DBG_PROC 0 /* Debug proc-fs related statistics */ #define DBG_PROC 0 /* Debug proc-fs related statistics */
#define DBG_REGISTER 0 /* */ #define DBG_REGISTER 0 /* */
#define DBG_ABNORM 1 /* Debug abnormal actions (reset, abort)*/ #define DBG_ABNORM 1 /* Debug abnormal actions (reset, abort)*/
...@@ -125,13 +126,15 @@ int eata_release(struct Scsi_Host *); ...@@ -125,13 +126,15 @@ int eata_release(struct Scsi_Host *);
#define SG_SIZE 64 #define SG_SIZE 64
#define C_P_L_CURRENT_MAX 10 /* Until this limit in the mm is removed #define C_P_L_CURRENT_MAX 16 /* Until this limit in the mm is removed
* Kernels < 1.1.86 died horrible deaths * Kernels < 1.1.86 died horrible deaths
* if you used values >2. The memory management * if you used values >2. The memory management
* since pl1.1.86 seems to cope with up to 10 * since pl1.1.86 seems to cope with up to 10
* queued commands per device. * queued commands per device.
* Since 1.2.0 the memory management seems to
* have no more problems......
*/ */
#define C_P_L_DIV 4 /* 1 <= C_P_L_DIV <= 8 #define C_P_L_DIV 3 /* 1 <= C_P_L_DIV <= 8
* You can use this parameter to fine-tune * You can use this parameter to fine-tune
* the driver. Depending on the number of * the driver. Depending on the number of
* devices and their speed and ability to queue * devices and their speed and ability to queue
...@@ -201,6 +204,24 @@ int eata_release(struct Scsi_Host *); ...@@ -201,6 +204,24 @@ int eata_release(struct Scsi_Host *);
#define HA_SBUSY 0x80 /* drive busy */ #define HA_SBUSY 0x80 /* drive busy */
#define HA_SDRDY HA_SSC+HA_SREADY+HA_SDRQ #define HA_SDRDY HA_SSC+HA_SREADY+HA_SDRQ
#define HA_NO_ERROR 0x00
#define HA_ERR_SEL_TO 0x01
#define HA_ERR_CMD_TO 0x02
#define HA_ERR_RESET 0x03
#define HA_INIT_POWERUP 0x04
#define HA_UNX_BUSPHASE 0x05
#define HA_UNX_BUS_FREE 0x06
#define HA_BUS_PARITY 0x07
#define HA_SCSI_HUNG 0x08
#define HA_UNX_MSGRJCT 0x09
#define HA_RESET_STUCK 0x0a
#define HA_RSENSE_FAIL 0x0b
#define HA_PARITY_ERR 0x0c
#define HA_CP_ABORT_NA 0x0d
#define HA_CP_ABORTED 0x0e
#define HA_CP_RESET_NA 0x0f
#define HA_CP_RESET 0x10
/********************************************** /**********************************************
* Message definitions * * Message definitions *
**********************************************/ **********************************************/
......
...@@ -387,7 +387,8 @@ void scan_scsis (struct Scsi_Host * shpnt) ...@@ -387,7 +387,8 @@ void scan_scsis (struct Scsi_Host * shpnt)
if(SCpnt->result) { if(SCpnt->result) {
if ((driver_byte(SCpnt->result) & DRIVER_SENSE) && if (((driver_byte(SCpnt->result) & DRIVER_SENSE) ||
(status_byte(SCpnt->result) & CHECK_CONDITION)) &&
((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) { ((SCpnt->sense_buffer[0] & 0x70) >> 4) == 7) {
if (SCpnt->sense_buffer[2] &0xe0) if (SCpnt->sense_buffer[2] &0xe0)
continue; /* No devices here... */ continue; /* No devices here... */
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#define SEND_DIAGNOSTIC 0x1d #define SEND_DIAGNOSTIC 0x1d
#define ALLOW_MEDIUM_REMOVAL 0x1e #define ALLOW_MEDIUM_REMOVAL 0x1e
#define SET_WINDOW 0x24
#define READ_CAPACITY 0x25 #define READ_CAPACITY 0x25
#define READ_10 0x28 #define READ_10 0x28
#define WRITE_10 0x2a #define WRITE_10 0x2a
...@@ -65,16 +66,26 @@ ...@@ -65,16 +66,26 @@
#define SYNCHRONIZE_CACHE 0x35 #define SYNCHRONIZE_CACHE 0x35
#define LOCK_UNLOCK_CACHE 0x36 #define LOCK_UNLOCK_CACHE 0x36
#define READ_DEFECT_DATA 0x37 #define READ_DEFECT_DATA 0x37
#define MEDIUM_SCAN 0x38
#define COMPARE 0x39 #define COMPARE 0x39
#define COPY_VERIFY 0x3a #define COPY_VERIFY 0x3a
#define WRITE_BUFFER 0x3b #define WRITE_BUFFER 0x3b
#define READ_BUFFER 0x3c #define READ_BUFFER 0x3c
#define UPDATE_BLOCK 0x3d
#define READ_LONG 0x3e #define READ_LONG 0x3e
#define WRITE_LONG 0x3f
#define CHANGE_DEFINITION 0x40 #define CHANGE_DEFINITION 0x40
#define WRITE_SAME 0x41
#define LOG_SELECT 0x4c #define LOG_SELECT 0x4c
#define LOG_SENSE 0x4d #define LOG_SENSE 0x4d
#define MODE_SELECT_10 0x55 #define MODE_SELECT_10 0x55
#define MODE_SENSE_10 0x5a #define MODE_SENSE_10 0x5a
#define WRITE_12 0xaa
#define WRITE_VERIFY_12 0xae
#define SEARCH_HIGH_12 0xb0
#define SEARCH_EQUAL_12 0xb1
#define SEARCH_LOW_12 0xb2
#define SEND_VOLUME_TAG 0xb6
extern void scsi_make_blocked_list(void); extern void scsi_make_blocked_list(void);
extern volatile int in_scan_scsis; extern volatile int in_scan_scsis;
......
...@@ -358,8 +358,8 @@ static void do_sd_request (void) ...@@ -358,8 +358,8 @@ static void do_sd_request (void)
unsigned long flags; unsigned long flags;
int flag = 0; int flag = 0;
while (1==1){
save_flags(flags); save_flags(flags);
while (1==1){
cli(); cli();
if (CURRENT != NULL && CURRENT->dev == -1) { if (CURRENT != NULL && CURRENT->dev == -1) {
restore_flags(flags); restore_flags(flags);
...@@ -387,12 +387,10 @@ static void do_sd_request (void) ...@@ -387,12 +387,10 @@ static void do_sd_request (void)
/* /*
* The following restore_flags leads to latency problems. FIXME. * The following restore_flags leads to latency problems. FIXME.
* Using a "sti()" gets rid of the latency problems but causes
* race conditions and crashes.
*/ */
#if 0
restore_flags(flags); restore_flags(flags);
#else
sti();
#endif
/* This is a performance enhancement. We dig down into the request list and /* This is a performance enhancement. We dig down into the request list and
try and find a queueable request (i.e. device not busy, and host able to try and find a queueable request (i.e. device not busy, and host able to
...@@ -404,7 +402,6 @@ static void do_sd_request (void) ...@@ -404,7 +402,6 @@ static void do_sd_request (void)
if (!SCpnt && sd_template.nr_dev > 1){ if (!SCpnt && sd_template.nr_dev > 1){
struct request *req1; struct request *req1;
req1 = NULL; req1 = NULL;
save_flags(flags);
cli(); cli();
req = CURRENT; req = CURRENT;
while(req){ while(req){
......
...@@ -1063,8 +1063,7 @@ st_read(struct inode * inode, struct file * filp, char * buf, int count) ...@@ -1063,8 +1063,7 @@ st_read(struct inode * inode, struct file * filp, char * buf, int count)
SCpnt->request.dev = dev; SCpnt->request.dev = dev;
scsi_do_cmd (SCpnt, scsi_do_cmd (SCpnt,
(void *) cmd, (STp->buffer)->b_data, (void *) cmd, (STp->buffer)->b_data,
(STp->buffer)->buffer_size, bytes, st_sleep_done, ST_TIMEOUT, MAX_RETRIES);
st_sleep_done, ST_TIMEOUT, MAX_RETRIES);
/* this must be done with interrupts off */ /* this must be done with interrupts off */
......
...@@ -79,7 +79,7 @@ static int parse_options(char *options, struct iso9660_options * popt) ...@@ -79,7 +79,7 @@ static int parse_options(char *options, struct iso9660_options * popt)
popt->rock = 'y'; popt->rock = 'y';
popt->cruft = 'n'; popt->cruft = 'n';
popt->unhide = 'n'; popt->unhide = 'n';
popt->conversion = 'a'; popt->conversion = 'b'; /* default: no conversion */
popt->blocksize = 1024; popt->blocksize = 1024;
popt->mode = S_IRUGO; popt->mode = S_IRUGO;
popt->gid = 0; popt->gid = 0;
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* limits */ /* limits */
#define MAX_CHRDEV 32 #define MAX_CHRDEV 64
#define MAX_BLKDEV 32 #define MAX_BLKDEV 64
/* /*
* assignments * assignments
......
...@@ -140,6 +140,7 @@ struct async_struct { ...@@ -140,6 +140,7 @@ struct async_struct {
int xmit_tail; int xmit_tail;
int xmit_cnt; int xmit_cnt;
struct tq_struct tqueue; struct tq_struct tqueue;
struct tq_struct tqueue_hangup;
struct termios normal_termios; struct termios normal_termios;
struct termios callout_termios; struct termios callout_termios;
struct wait_queue *open_wait; struct wait_queue *open_wait;
...@@ -160,7 +161,6 @@ struct async_struct { ...@@ -160,7 +161,6 @@ struct async_struct {
* time, instead of at rs interrupt time. * time, instead of at rs interrupt time.
*/ */
#define RS_EVENT_WRITE_WAKEUP 0 #define RS_EVENT_WRITE_WAKEUP 0
#define RS_EVENT_HANGUP 1
/* /*
* Multiport serial configuration structure --- internal structure * Multiport serial configuration structure --- internal structure
......
...@@ -57,7 +57,7 @@ typedef struct tq_struct * task_queue; ...@@ -57,7 +57,7 @@ typedef struct tq_struct * task_queue;
#define DECLARE_TASK_QUEUE(q) task_queue q = &tq_last #define DECLARE_TASK_QUEUE(q) task_queue q = &tq_last
extern struct tq_struct tq_last; extern struct tq_struct tq_last;
extern task_queue tq_timer, tq_immediate; extern task_queue tq_timer, tq_immediate, tq_scheduler;
#ifdef INCLUDE_INLINE_FUNCS #ifdef INCLUDE_INLINE_FUNCS
struct tq_struct tq_last = { struct tq_struct tq_last = {
......
...@@ -41,8 +41,10 @@ ...@@ -41,8 +41,10 @@
#include <linux/tcp.h> #include <linux/tcp.h>
#include "../net/inet/protocol.h" #include "../net/inet/protocol.h"
#include "../net/inet/arp.h" #include "../net/inet/arp.h"
#if defined(CONFIG_PPP) || defined(CONFIG_SLIP)
#include "../drivers/net/slhc.h" #include "../drivers/net/slhc.h"
#endif #endif
#endif
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
#include <linux/pci.h> #include <linux/pci.h>
#endif #endif
...@@ -209,6 +211,7 @@ struct symbol_table symbol_table = { ...@@ -209,6 +211,7 @@ struct symbol_table symbol_table = {
X(del_timer), X(del_timer),
X(tq_timer), X(tq_timer),
X(tq_immediate), X(tq_immediate),
X(tq_scheduler),
X(tq_last), X(tq_last),
X(timer_active), X(timer_active),
X(timer_table), X(timer_table),
...@@ -273,11 +276,13 @@ struct symbol_table symbol_table = { ...@@ -273,11 +276,13 @@ struct symbol_table symbol_table = {
#ifdef CONFIG_INET #ifdef CONFIG_INET
X(inet_add_protocol), X(inet_add_protocol),
X(inet_del_protocol), X(inet_del_protocol),
#if defined(CONFIG_PPP) || defined(CONFIG_SLIP)
X(slhc_init), X(slhc_init),
X(slhc_free), X(slhc_free),
X(slhc_remember), X(slhc_remember),
X(slhc_compress), X(slhc_compress),
X(slhc_uncompress), X(slhc_uncompress),
#endif
#endif #endif
/* Device callback registration */ /* Device callback registration */
X(register_netdevice_notifier), X(register_netdevice_notifier),
...@@ -323,6 +328,8 @@ struct symbol_table symbol_table = { ...@@ -323,6 +328,8 @@ struct symbol_table symbol_table = {
X(scsi_register), X(scsi_register),
X(scsi_unregister), X(scsi_unregister),
X(scsicam_bios_param), X(scsicam_bios_param),
X(scsi_init_malloc),
X(scsi_init_free),
X(print_command), X(print_command),
#endif #endif
/* Added to make file system as module */ /* Added to make file system as module */
......
...@@ -45,6 +45,7 @@ int tickadj = 500/HZ; /* microsecs */ ...@@ -45,6 +45,7 @@ int tickadj = 500/HZ; /* microsecs */
DECLARE_TASK_QUEUE(tq_timer); DECLARE_TASK_QUEUE(tq_timer);
DECLARE_TASK_QUEUE(tq_immediate); DECLARE_TASK_QUEUE(tq_immediate);
DECLARE_TASK_QUEUE(tq_scheduler);
/* /*
* phase-lock loop variables * phase-lock loop variables
...@@ -119,6 +120,7 @@ asmlinkage void schedule(void) ...@@ -119,6 +120,7 @@ asmlinkage void schedule(void)
printk("Aiee: scheduling in interrupt\n"); printk("Aiee: scheduling in interrupt\n");
intr_count = 0; intr_count = 0;
} }
run_task_queue(&tq_scheduler);
cli(); cli();
ticks = itimer_ticks; ticks = itimer_ticks;
itimer_ticks = 0; itimer_ticks = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment