Commit 9f3c745e authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.26

parent 20734fca
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 25
SUBLEVEL = 26
all: Version zImage
......
......@@ -101,7 +101,7 @@ if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
fi
bool 'Other ISA cards' CONFIG_NET_ISA n
if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE y
bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE n
bool 'Cabletron E21xx support (not recommended)' CONFIG_E2100 n
bool 'DEPCA support' CONFIG_DEPCA n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
......@@ -109,7 +109,7 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'AT1700 support' CONFIG_AT1700 n
fi
bool 'HP PCLAN support' CONFIG_HPLAN n
bool 'NE2000/NE1000 support' CONFIG_NE2000 n
bool 'NE2000/NE1000 support' CONFIG_NE2000 y
fi
bool 'EISA and on board controllers' CONFIG_NET_EISA n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
......@@ -133,6 +133,15 @@ comment 'CD-ROM drivers'
bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n
bool 'Mitsumi CDROM driver support' CONFIG_MCD n
bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n
if [ "$CONFIG_SBPCD" = "y" ]; then
bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
if [ "$CONFIG_SBPCD2" = "y" ]; then
bool 'Matsushita/Panasonic third CDROM controller support' CONFIG_SBPCD3 n
if [ "$CONFIG_SBPCD3" = "y" ]; then
bool 'Matsushita/Panasonic fourth CDROM controller support' CONFIG_SBPCD4 n
fi
fi
fi
comment 'Filesystems'
......
......@@ -39,6 +39,21 @@ OBJS := $(OBJS) sbpcd.o
SRCS := $(SRCS) sbpcd.c
endif #CONFIG_SBPCD
ifdef CONFIG_SBPCD2
OBJS := $(OBJS) sbpcd2.o
SRCS := $(SRCS) sbpcd2.c
endif #CONFIG_SBPCD2
ifdef CONFIG_SBPCD3
OBJS := $(OBJS) sbpcd3.o
SRCS := $(SRCS) sbpcd3.c
endif #CONFIG_SBPCD3
ifdef CONFIG_SBPCD4
OBJS := $(OBJS) sbpcd4.o
SRCS := $(SRCS) sbpcd4.c
endif #CONFIG_SBPCD4
ifdef CONFIG_BLK_DEV_HD
OBJS := $(OBJS) hd.o
SRCS := $(SRCS) hd.c
......
This README belongs to release 2.1 of the SoundBlaster Pro (Matsushita,
This README belongs to release 2.2 of the SoundBlaster Pro (Matsushita,
Kotobuki, Panasonic, CreativeLabs) CD-ROM driver for Linux.
The driver is able to drive the whole family of IDE-style
......
......@@ -194,12 +194,36 @@ static void floppy_off(unsigned int nr);
#elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR)
#define DEVICE_NAME "Matsushita CD-ROM"
#define DEVICE_NAME "Matsushita CD-ROM controller #1"
#define DEVICE_REQUEST do_sbpcd_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == MATSUSHITA_CDROM2_MAJOR)
#define DEVICE_NAME "Matsushita CD-ROM controller #2"
#define DEVICE_REQUEST do_sbpcd2_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == MATSUSHITA_CDROM3_MAJOR)
#define DEVICE_NAME "Matsushita CD-ROM controller #3"
#define DEVICE_REQUEST do_sbpcd3_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == MATSUSHITA_CDROM4_MAJOR)
#define DEVICE_NAME "Matsushita CD-ROM controller #4"
#define DEVICE_REQUEST do_sbpcd4_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#else
#error "unknown blk device"
......
......@@ -158,8 +158,8 @@ void mcd_setup(char *str, int *ints)
}
int
check_mcd_media_change(int full_dev, int flag)
static int
check_mcd_change(dev_t full_dev)
{
int retval, target;
......@@ -175,10 +175,7 @@ check_mcd_media_change(int full_dev, int flag)
}
retval = mcdDiskChanged;
if (!flag)
{
mcdDiskChanged = 0;
}
mcdDiskChanged = 0;
return retval;
}
......@@ -1082,7 +1079,10 @@ static struct file_operations mcd_fops = {
NULL, /* mmap */
mcd_open, /* open */
mcd_release, /* release */
NULL /* fsync */
NULL, /* fsync */
NULL, /* fasync */
check_mcd_change, /* media change */
NULL /* revalidate */
};
......
This diff is collapsed.
......@@ -594,6 +594,9 @@ int is_ignored(int sig)
static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
{
if (!tty)
return;
tty->icanon = (L_ICANON(tty) != 0);
if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) ||
I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) ||
......@@ -661,6 +664,9 @@ static void n_tty_close(struct tty_struct *tty)
static int n_tty_open(struct tty_struct *tty)
{
if (!tty)
return -EINVAL;
if (!tty->read_buf) {
tty->read_buf = (unsigned char *)
get_free_page(intr_count ? GFP_ATOMIC : GFP_KERNEL);
......
......@@ -845,7 +845,7 @@ static int startup(struct async_struct * info)
if (!info->xmit_buf) {
info->xmit_buf = (unsigned char *) get_free_page(GFP_KERNEL);
if (!info->xmit_buf)
return ENOMEM;
return -ENOMEM;
}
save_flags(flags); cli();
......@@ -871,7 +871,7 @@ static int startup(struct async_struct * info)
* here.
*/
if (serial_inp(info, UART_LSR) == 0xff) {
restore_flags(flags);
restore_flags(flags);
if (suser()) {
if (info->tty)
set_bit(TTY_IO_ERROR, &info->tty->flags);
......@@ -1802,11 +1802,9 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
}
if (info->blocked_open) {
if (info->close_delay) {
tty->count++; /* avoid race condition */
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + info->close_delay;
schedule();
tty->count--;
}
wake_up_interruptible(&info->open_wait);
}
......@@ -2156,9 +2154,15 @@ static void autoconfig(struct async_struct * info)
/*
* Do a simple existence test first; if we fail this, there's
* no point trying anything else.
*
* 0x80 is used as a nonsense port to prevent against false
* positives due to ISA bus float. The assumption is that
* 0x80 is a non-existent port; which should be safe since
* include/asm/io.h also makes this assumption.
*/
scratch = serial_inp(info, UART_IER);
serial_outp(info, UART_IER, 0);
outb(0xff, 0x080);
scratch2 = serial_inp(info, UART_IER);
serial_outp(info, UART_IER, scratch);
if (scratch2) {
......@@ -2358,3 +2362,75 @@ long rs_init(long kmem_start)
return kmem_start;
}
/*
* register_serial and unregister_serial allows for serial ports to be
* configured at run-time, to support PCMCIA modems.
*/
int register_serial(struct serial_struct *req)
{
int i;
unsigned long flags;
struct async_struct *info;
save_flags(flags);
cli();
for (i = 0; i < NR_PORTS; i++) {
if (rs_table[i].port == req->port)
break;
}
if (i == NR_PORTS) {
for (i = 0; i < NR_PORTS; i++)
if ((rs_table[i].type == PORT_UNKNOWN) &&
(rs_table[i].count == 0))
break;
}
if (i == NR_PORTS) {
restore_flags(flags);
return -1;
}
info = &rs_table[i];
if (rs_table[i].count) {
restore_flags(flags);
printk("Couldn't configure serial #%d (port=%d,irq=%d): "
"device already open\n", i, req->port, req->irq);
return -1;
}
info->irq = req->irq;
info->port = req->port;
autoconfig(info);
if (info->type == PORT_UNKNOWN) {
restore_flags(flags);
printk("register_serial(): autoconfig failed\n");
return -1;
}
printk("tty%02d at 0x%04x (irq = %d)", info->line,
info->port, info->irq);
switch (info->type) {
case PORT_8250:
printk(" is a 8250\n"); break;
case PORT_16450:
printk(" is a 16450\n"); break;
case PORT_16550:
printk(" is a 16550\n"); break;
case PORT_16550A:
printk(" is a 16550A\n"); break;
default:
printk("\n"); break;
}
restore_flags(flags);
return info->line;
}
void unregister_serial(int line)
{
unsigned long flags;
struct async_struct *info = &rs_table[line];
save_flags(flags);
cli();
if (info->tty)
tty_hangup(info->tty);
info->type = PORT_UNKNOWN;
printk("tty%02d unloaded\n", info->line);
restore_flags(flags);
}
......@@ -160,7 +160,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc)
/* Set the discipline of a tty line. */
static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
{
int retval;
int retval = 0;
struct tty_ldisc o_ldisc;
if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS) ||
......@@ -178,11 +178,9 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
/* Now set up the new line discipline. */
tty->ldisc = ldiscs[ldisc];
tty->termios->c_line = ldisc;
if (tty->ldisc.open) {
if (tty->ldisc.open)
retval = (tty->ldisc.open)(tty);
if (retval >= 0)
return retval;
if (retval < 0) {
tty->ldisc = o_ldisc;
tty->termios->c_line = tty->ldisc.num;
if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) {
......@@ -197,9 +195,10 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
tty_name(tty), r);
}
}
return retval;
}
return 0;
if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc)
tty->driver.set_ldisc(tty);
return retval;
}
/*
......@@ -731,12 +730,12 @@ static int init_dev(dev_t device, struct tty_struct **ret_tty)
tp_loc = &driver->termios[idx];
ltp_loc = &driver->termios_locked[idx];
repeat:
retval = -EAGAIN;
if (driver->type == TTY_DRIVER_TYPE_PTY &&
driver->subtype == PTY_TYPE_MASTER &&
*tty_loc && (*tty_loc)->count)
goto end_init;
repeat:
retval = -ENOMEM;
if (!*tty_loc && !tty) {
if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL)))
......@@ -813,13 +812,18 @@ static int init_dev(dev_t device, struct tty_struct **ret_tty)
tty->termios_locked = *ltp_loc;
*tty_loc = tty;
(*driver->refcount)++;
(*tty_loc)->count++;
if (tty->ldisc.open) {
retval = (tty->ldisc.open)(tty);
if (retval < 0)
if (retval < 0) {
(*tty_loc)->count--;
tty = NULL;
goto end_init;
}
}
tty = NULL;
}
} else
(*tty_loc)->count++;
if (driver->type == TTY_DRIVER_TYPE_PTY) {
if (!*o_tp_loc) {
*o_tp_loc = o_tp;
......@@ -836,19 +840,19 @@ static int init_dev(dev_t device, struct tty_struct **ret_tty)
(*driver->other->refcount)++;
if (o_tty->ldisc.open) {
retval = (o_tty->ldisc.open)(o_tty);
if (retval < 0)
if (retval < 0) {
(*tty_loc)->count--;
o_tty = NULL;
goto end_init;
}
}
o_tty = NULL;
}
(*tty_loc)->link = *o_tty_loc;
(*o_tty_loc)->link = *tty_loc;
if (driver->subtype == PTY_TYPE_MASTER)
(*o_tty_loc)->count++;
}
(*tty_loc)->count++;
(*tty_loc)->driver = *driver;
if (driver->type == TTY_DRIVER_TYPE_PTY &&
driver->subtype == PTY_TYPE_MASTER)
(*o_tty_loc)->count++;
*ret_tty = *tty_loc;
retval = 0;
end_init:
......
......@@ -15,19 +15,6 @@
#include <linux/fcntl.h>
#include <linux/errno.h>
#include <linux/config.h>
/*
* Ugly. We'll fix this once all the drivers use the f_ops->check_media_change()
* stuff instead..
*/
#ifdef CONFIG_MCD
extern int check_mcd_media_change(int, int);
#endif
#ifdef CONFIG_SBPCD
extern int check_sbpcd_media_change(int, int);
#endif
struct device_struct {
const char * name;
struct file_operations * fops;
......@@ -144,27 +131,6 @@ int check_disk_change(dev_t dev)
if (!fops->check_media_change(dev))
return 0;
}
#if 1 /* this will go soon.. */
else switch(MAJOR(dev)){
#if defined(CONFIG_MCD)
case MITSUMI_CDROM_MAJOR:
if (!check_mcd_media_change(dev, 0))
return 0;
break;
#endif
#if defined(CONFIG_SBPCD)
case MATSUSHITA_CDROM_MAJOR:
if (!check_sbpcd_media_change(dev, 0))
return 0;
break;
#endif
default:
return 0;
}
#endif /* will go away */
printk("VFS: Disk change detected on device %d/%d\n",
MAJOR(dev), MINOR(dev));
......
......@@ -30,9 +30,6 @@ extern int check_cdu31a_media_change(int, int);
#if defined(CONFIG_MCD)
extern int check_mcd_media_change(int, int);
#endif
#if defined (CONFIG_SBPCD)
extern int check_sbpcd_media_change(int, int);
#endif CONFIG_SBPCD
#ifdef LEAK_CHECK
static int check_malloc = 0;
......
......@@ -43,8 +43,9 @@
* 23 - mitsumi cdrom
* 24 - sony535 cdrom
* 25 - matsushita cdrom minors 0..3
* 26 -
* 27 - qic117 tape
* 26 - matsushita cdrom 2 minors 0..3
* 27 - qic117 tape matsushita cdrom 3 minors 0..3
* 28 - matsushita cdrom 4 minors 0..3
*/
#define UNNAMED_MAJOR 0
......@@ -72,6 +73,9 @@
#define MITSUMI_CDROM_MAJOR 23
#define CDU535_CDROM_MAJOR 24
#define MATSUSHITA_CDROM_MAJOR 25
#define MATSUSHITA_CDROM2_MAJOR 26
#define MATSUSHITA_CDROM3_MAJOR 27
#define MATSUSHITA_CDROM4_MAJOR 28
#define QIC117_TAPE_MAJOR 27
/*
......
......@@ -44,6 +44,7 @@ struct vm_area_struct {
*/
#define VM_GROWSDOWN 0x01
#define VM_GROWSUP 0x02
#define VM_SHM 0x04
/*
* These are the virtual MM functions - opening of an area, closing it (needed to
......
......@@ -3,18 +3,15 @@
*/
/*
* these definitions can get overridden by the kernel command line
* ("lilo boot option"). Examples:
* the definitions for the first controller can get overridden by
* the kernel command line ("lilo boot option").
* Examples:
* sbpcd=0x230,SoundBlaster
* or
* sbpcd=0x300,LaserMate
* or
* sbpcd=0x330,SPEA
*
* and, if you have a second CDROM controller board,
* sbpcd2=0x310,LaserMate
* and so on.
*
* These strings are case sensitive !!!
*/
......@@ -73,36 +70,6 @@
#define _LINUX_SBPCD_H
/*==========================================================================*/
/*==========================================================================*/
/*
* to fork and execute a function after some elapsed time:
* one "jifs" unit is 10 msec.
*/
#undef MY_TIMER
#undef SET_TIMER
#undef CLEAR_TIMER
#if !(SBPCD_ISSUE-1)
#define MY_TIMER SBPCD_TIMER
#endif
#if !(SBPCD_ISSUE-2)
#define MY_TIMER SBPCD2_TIMER
#endif
#if !(SBPCD_ISSUE-3)
#define MY_TIMER SBPCD3_TIMER
#endif
#if !(SBPCD_ISSUE-4)
#define MY_TIMER SBPCD4_TIMER
#endif
#define SET_TIMER(func, jifs) \
((timer_table[MY_TIMER].expires = jiffies + jifs), \
(timer_table[MY_TIMER].fn = func), \
(timer_active |= 1<<MY_TIMER))
#define CLEAR_TIMER timer_active &= ~(1<<MY_TIMER)
/*==========================================================================*/
/*==========================================================================*/
/*
......
......@@ -30,8 +30,6 @@
* TAPE_QIC02_TIMER timer for QIC-02 tape driver (it's not hardcoded)
*
* MCD_TIMER Mitsumi CD-ROM Timer
*
* SBPCD_TIMER SoundBlaster/Matsushita/Panasonic CD-ROM timer
*/
#define BLANK_TIMER 0
......@@ -50,8 +48,6 @@
#define HD_TIMER2 24
#define SBPCD_TIMER 25
struct timer_struct {
unsigned long expires;
void (*fn)(void);
......
......@@ -56,7 +56,14 @@
* void (*set_termios)(struct tty_struct *tty, struct termios * old);
*
* This routine allows the tty driver to be notified when
* device's termios settings have changed.
* device's termios settings have changed. Note that a
* well-designed tty driver should be prepared to accept the case
* where old == NULL, and try to do something rational.
*
* void (*set_ldisc)(struct tty_struct *tty);
*
* This routine allows the tty driver to be notified when the
* device's termios settings have changed.
*
* void (*throttle)(struct tty_struct * tty);
*
......@@ -131,6 +138,7 @@ struct tty_driver {
void (*start)(struct tty_struct *tty);
void (*hangup)(struct tty_struct *tty);
void (*flush_buffer)(struct tty_struct *tty);
void (*set_ldisc)(struct tty_struct *tty);
/*
* linked list pointers
......
......@@ -375,6 +375,34 @@ static int shm_map (struct shm_desc *shmd, int remap)
return 0;
}
/*
* This is really minimal support to make the shared mem stuff
* ve known by the general VM manager. It should add the vm_ops
* field so that 'munmap()' and friends work correctly on shared
* memory areas..
*/
static int add_vm_area(unsigned long addr, unsigned long len)
{
struct vm_area_struct * vma;
vma = (struct vm_area_struct * ) kmalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
if (!vma)
return -ENOMEM;
do_munmap(addr, len);
vma->vm_task = current;
vma->vm_start = addr;
vma->vm_end = addr + len;
vma->vm_page_prot = PAGE_SHARED;
vma->vm_flags = VM_SHM;
vma->vm_share = NULL;
vma->vm_inode = NULL;
vma->vm_offset = 0;
vma->vm_ops = NULL;
insert_vm_struct(current, vma);
merge_segments(current->mm->mmap, NULL, NULL);
return 0;
}
/*
* Fix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.
* raddr is needed to return addresses above 2Gig.
......@@ -448,6 +476,11 @@ int sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr)
shmd->end = addr + shp->shm_npages * PAGE_SIZE;
shmd->task = current;
if ((err = add_vm_area(shmd->start, shmd->end - shmd->start))) {
kfree(shmd);
return err;
}
shp->shm_nattch++; /* prevent destruction */
if (addr < current->mm->end_data) {
iput (current->executable);
......@@ -496,7 +529,7 @@ static void detach (struct shm_desc **shmdp)
printk("detach: shm segment (id=%d) attach list inconsistent\n",id);
found:
unmap_page_range (shmd->start, shp->shm_segsz); /* sleeps */
do_munmap(shmd->start, shp->shm_segsz);
kfree(shmd);
shp->shm_lpid = current->pid;
shp->shm_dtime = CURRENT_TIME;
......@@ -543,6 +576,8 @@ int shm_fork (struct task_struct *p1, struct task_struct *p2)
struct shmid_ds *shp;
int id;
p2->semun = NULL;
p2->shm = NULL;
if (!p1->shm)
return 0;
for (shmd = p1->shm; shmd; shmd = shmd->task_next) {
......
......@@ -147,7 +147,7 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * p)
return 1;
dup_mmap(p); /* wrong.. */
}
return 0;
return shm_fork(current, p);
}
static void copy_fs(unsigned long clone_flags, struct task_struct * p)
......@@ -243,8 +243,7 @@ asmlinkage int sys_fork(struct pt_regs regs)
p->tss.io_bitmap[i] = ~0;
if (last_task_used_math == current)
__asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387));
p->semun = NULL; p->shm = NULL;
if (copy_mm(clone_flags, p) || shm_fork(current, p))
if (copy_mm(clone_flags, p))
goto bad_fork_cleanup;
copy_files(clone_flags, p);
copy_fs(clone_flags, p);
......
......@@ -423,6 +423,7 @@ void merge_segments(struct vm_area_struct *mpnt,
prev->vm_inode != mpnt->vm_inode ||
prev->vm_end != mpnt->vm_start ||
!mp ||
prev->vm_flags != mpnt->vm_flags ||
prev->vm_share != mpnt->vm_share || /* ?? */
prev->vm_next != mpnt) /* !!! */
continue;
......
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