Commit feb3aa0e authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.64

parent 46810eb7
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 63
SUBLEVEL = 64
ARCH = i386
......
......@@ -63,6 +63,7 @@ bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE
bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n
bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
bool 'EISA EATA support' CONFIG_SCSI_EATA n
#bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
fi
......
......@@ -11,6 +11,18 @@
* include/linux/cdrom.h). With this interface, CDROMs can be
* accessed and standard audio CDs can be played back normally.
*
* WARNING - All autoprobes have been removed from the driver.
* You MUST configure the CDU31A via a LILO config
* at boot time or in lilo.conf. I have the
* following in my lilo.conf:
*
* append="cdu31a=0x1f88,0,PAS"
*
* The first number is the I/O base address of the
* card. The second is the interrupt (0 means none).
* The third should be "PAS" if on a Pro-Audio
* spectrum, or nothing if on something else.
*
* This interface is (unfortunately) a polled interface. This is
* because most Sony interfaces are set up with DMA and interrupts
* disables. Some (like mine) do not even have the capability to
......@@ -73,6 +85,9 @@
* writer doesn't have a multi-session disk, this is all theoritical.
* Also, music operation will obviously only work on one session at a
* time.
*
* NOTE: At the current time, multi-session still doesn't work. Maybe
* I'll get a multi-session disk soon so I can play with it.
*
* Raw sector I/O
*
......@@ -195,6 +210,8 @@ static struct
0 means don't use) */
} cdu31a_addresses[] =
{
#if 0 /* No autoconfig any more. See Note at beginning
of this file. */
{ 0x340, 0 }, /* Standard configuration Sony Interface */
{ 0x1f88, 0 }, /* Fusion CD-16 */
{ 0x230, 0 }, /* SoundBlaster 16 card */
......@@ -203,6 +220,7 @@ static struct
{ 0x330, 0 }, /* Secondary standard Sony Interface */
{ 0x634, 0 }, /* Sound FX SC400 */
{ 0x654, 0 }, /* Sound FX SC400 */
#endif
{ 0 }
};
......@@ -253,6 +271,9 @@ static int sony_raw_data_mode = 1; /* 1 if data tracks, 0 if audio.
static unsigned int sony_usage = 0; /* How many processes have the
drive open. */
static int sony_pas_init = 0; /* Initialize the Pro-Audio
Spectrum card? */
static struct s_sony_session_toc *(ses_tocs[MAX_TRACKS]); /* Points to the
table of
contents. */
......@@ -2752,6 +2773,17 @@ cdu31a_setup(char *strings,
{
irq_used = ints[2];
}
if (*strings != '\0')
{
if (strcmp(strings, "PAS") == 0)
{
sony_pas_init = 1;
}
else
{
printk("CDU31A: Unknown interface type: %s\n", strings[3]);
}
}
}
static int cdu31a_block_size;
......@@ -2776,8 +2808,11 @@ cdu31a_init(unsigned long mem_start, unsigned long mem_end)
*
* The following turn on the CD-ROM interface for a Fusion CD-16.
*/
outb(0xbc, 0x9a01);
outb(0xe2, 0x9a01);
if (sony_pas_init)
{
outb(0xbc, 0x9a01);
outb(0xe2, 0x9a01);
}
drive_found = 0;
......
......@@ -113,6 +113,8 @@ static volatile unsigned char reply_expected = 0;
static volatile unsigned char acknowledge = 0;
static volatile unsigned char resend = 0;
extern void compute_shiftstate(void);
typedef void (*k_hand)(unsigned char value, char up_flag);
typedef void (k_handfn)(unsigned char value, char up_flag);
......@@ -129,12 +131,12 @@ static k_hand key_handler[16] = {
typedef void (*void_fnp)(void);
typedef void (void_fn)(void);
static void_fn enter, show_ptregs, send_intr, lastcons, caps_toggle,
static void_fn do_null, enter, show_ptregs, send_intr, lastcons, caps_toggle,
num, hold, scroll_forw, scroll_back, boot_it, caps_on, compose,
SAK, decr_console, incr_console;
static void_fnp spec_fn_table[] = {
NULL, enter, show_ptregs, show_mem,
do_null, enter, show_ptregs, show_mem,
show_state, send_intr, lastcons, caps_toggle,
num, hold, scroll_forw, scroll_back,
boot_it, caps_on, compose, SAK,
......@@ -541,7 +543,7 @@ static void keyboard_interrupt(int int_pt_regs)
} else {
/* maybe beep? */
/* we have at least to update shift_state */
#if 0 /* how? two almost equivalent choices follow */
#if 1 /* how? two almost equivalent choices follow */
compute_shiftstate();
#else
keysym = U(plain_map[keycode]);
......@@ -733,14 +735,17 @@ static void do_ignore(unsigned char value, char up_flag)
{
}
static void do_null()
{
compute_shiftstate();
}
static void do_spec(unsigned char value, char up_flag)
{
if (up_flag)
return;
if (value >= SIZE(spec_fn_table))
return;
if (!spec_fn_table[value])
return;
spec_fn_table[value]();
}
......
......@@ -132,6 +132,10 @@ SCSI_OBJS := $(SCSI_OBJS) ultrastor.o
SCSI_SRCS := $(SCSI_SRCS) ultrastor.c
endif
ifdef CONFIG_SCSI_EATA
SCSI_OBJS := $(SCSI_OBJS) eata.o
SCSI_SRCS := $(SCSI_SRCS) eata.c
endif
scsi.a: $(SCSI_OBJS)
......
......@@ -1010,6 +1010,7 @@ int buslogic_detect(Scsi_Host_Template *tpnt)
buslogic_printk("buslogic_detect:\n");
#endif
tpnt->can_queue = BUSLOGIC_MAILBOXES;
for (indx = 0; indx < ARRAY_SIZE(bases); indx++)
if (!check_region(bases[indx], 3)) {
shpnt = scsi_register(tpnt, sizeof (struct hostdata));
......
This diff is collapsed.
/*
* eata.h - used by low-level scsi driver for EISA EATA controllers.
*
*/
#ifndef _EISA_EATA_H
#define _EISA_EATA_H
#define EATA_VERSION "1.07.00"
int eata_detect(Scsi_Host_Template *);
int eata_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int eata_abort(Scsi_Cmnd *);
const char *eata_info(void);
int eata_reset(Scsi_Cmnd *);
int eata_bios_param(Disk *, int, int*);
#define EATA { NULL, /* Ptr for modules */ \
"EISA EATA 2.0A rev. " EATA_VERSION " by " \
"Dario_Ballabio@milano.europe.dg.com.",\
eata_detect, \
NULL, /* Release */ \
eata_info, \
NULL, \
eata_queuecommand, \
eata_abort, \
eata_reset, \
NULL, \
eata_bios_param, \
0, /* can_queue, reset by detect */ \
7, /* this_id, reset by detect */ \
0, /* sg_tablesize, reset by detect */ \
0, /* cmd_per_lun, reset by detect */ \
0, /* number of boards present */ \
0, /* unchecked isa dma */ \
ENABLE_CLUSTERING \
}
#endif
......@@ -87,6 +87,10 @@
#include "wd7000.h"
#endif
#ifdef CONFIG_SCSI_EATA
#include "eata.h"
#endif
#ifdef CONFIG_SCSI_DEBUG
#include "scsi_debug.h"
#endif
......@@ -170,6 +174,9 @@ static Scsi_Host_Template builtin_scsi_hosts[] =
#ifdef CONFIG_SCSI_7000FASST
WD7000,
#endif
#ifdef CONFIG_SCSI_EATA
EATA,
#endif
#ifdef CONFIG_SCSI_DEBUG
SCSI_DEBUG,
#endif
......
/*
* u14-34f.c - Low-level SCSI driver for UltraStor 14F/34F
*
* 28 Oct 1994 rev. 1.09 for linux 1.1.58
* 14 Nov 1994 rev. 1.10 for linux 1.1.63
*
* 28 Oct 1994 rev. 1.09 for linux 1.1.58 Final BETA release.
* 16 Jul 1994 rev. 1.00 for linux 1.1.29 Initial ALPHA release.
*
* This driver is a total replacement of the original UltraStor
* scsi driver, but it supports ONLY the 14F and 34F boards.
......@@ -26,9 +29,9 @@
*
* 14F - ISA first-party DMA HA with floppy support and WD1003 emulation.
* 24F - EISA Bus Master HA with floppy support and WD1003 emulation.
* 34F - VL-Bus Bus Master HA with floppy support (no WD1003 emulation).
* 34F - VL-Bus Bus Master HA (no WD1003 emulation).
*
* This code has been tested with up to two U14F on boards, using both
* This code has been tested with up to two U14F boards, using both
* firmware 28004-005/38004-004 (BIOS rev. 2.00) and the latest firmware
* 28004-006/38004-005 (BIOS rev. 2.01).
*
......@@ -69,7 +72,7 @@
* - adapter_status equal 0x96 or 0xa3 or 0x93 or 0x94;
* - adapter_status equal 0 and target_status equal 2 on for all targets
* in the next operation following the reset.
* This sequence takes a long time (>3 seconds), so in the mantime
* This sequence takes a long time (>3 seconds), so in the meantime
* the SD_TIMEOUT in sd.c could expire giving rise to scsi aborts
* (SD_TIMEOUT has been increased from 3 to 6 seconds in 1.1.31).
* Because of this I had to DISABLE_CLUSTERING and to work around the
......@@ -77,7 +80,7 @@
* so that the operations are retried without complains from the scsi.c
* code.
* Any reset of the scsi bus is going to kill tape operations, since
* no retry is allowed for tapes. Bus resest are more likely when the
* no retry is allowed for tapes. Bus resets are more likely when the
* scsi bus is under heavy load.
* Requests using scatter/gather have a maximum length of 16 x 1024 bytes
* when DISABLE_CLUSTERING is in effect, but unscattered requests could be
......@@ -136,13 +139,13 @@
#define DO_BUS_RESET /* Reset SCSI bus on error */
#define NO_DEBUG_DETECT
#define NO_DEBUG_INTERRUPT
#define DEBUG_STATISTICS
#define NO_DEBUG_STATISTICS
#define MAX_TARGET 8
#define MAX_IRQ 16
#define MAX_BOARDS 4
#define MAX_MAILBOXES 16
#define MAX_SGLIST U34F_MAX_SGLIST
#define MAX_SGLIST 33
#define MAX_CMD_PER_LUN 2
#define FALSE 0
......@@ -323,7 +326,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
sh[j]->base = bios_segment_table[config_1.bios_segment];
sh[j]->irq = irq;
sh[j]->this_id = config_2.ha_scsi_id;
sh[j]->hostt->can_queue = MAX_MAILBOXES;
sh[j]->can_queue = MAX_MAILBOXES;
sh[j]->hostt->cmd_per_lun = MAX_CMD_PER_LUN;
sys_mask = inb(sh[j]->io_port + REG_SYS_MASK);
lcl_mask = inb(sh[j]->io_port + REG_LCL_MASK);
......@@ -336,11 +339,13 @@ static inline int port_detect(ushort *port_base, unsigned int j,
if (sh[j]->base == 0) outb(CMD_ENA_INTR, sh[j]->io_port + REG_SYS_MASK);
#if defined (DO_BUS_RESET)
outb(lcl_mask | 0x40, sh[j]->io_port + REG_LCL_MASK);
lcl_mask = 0xc2;
#else
outb(lcl_mask & ~0x40, sh[j]->io_port + REG_LCL_MASK);
lcl_mask = 0x82;
#endif
outb(lcl_mask, sh[j]->io_port + REG_LCL_MASK);
/* Register the I/O space that we use */
snarf_region(sh[j]->io_port, REG_REGION);
......@@ -376,7 +381,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
"Mbox %d, CmdLun %d, C%d.\n", BN(j), sh[j]->io_port,
(int)sh[j]->base, sh[j]->irq,
sh[j]->dma_channel, sh[j]->sg_tablesize,
sh[j]->hostt->can_queue, sh[j]->hostt->cmd_per_lun,
sh[j]->can_queue, sh[j]->hostt->cmd_per_lun,
sh[j]->hostt->use_clustering);
return TRUE;
}
......@@ -447,9 +452,9 @@ int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
starting from last_cp_used */
i = HD(j)->last_cp_used + 1;
for(k = 0; k < sh[j]->hostt->can_queue; k++, i++) {
for(k = 0; k < sh[j]->can_queue; k++, i++) {
if (i >= sh[j]->hostt->can_queue) i = 0;
if (i >= sh[j]->can_queue) i = 0;
if (HD(j)->cp_stat[i] == FREE) {
HD(j)->last_cp_used = i;
......@@ -457,7 +462,7 @@ int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
}
}
if (k == sh[j]->hostt->can_queue) {
if (k == sh[j]->can_queue) {
printk("%s: qcomm, no free mailbox, reseting.\n", BN(j));
if (HD(j)->in_reset)
......@@ -542,7 +547,7 @@ int u14_34f_abort(Scsi_Cmnd *SCarg) {
printk("%s: abort, mbox %d, target %d, pid %ld.\n",
BN(j), i, SCarg->target, SCarg->pid);
if (i >= sh[j]->hostt->can_queue)
if (i >= sh[j]->can_queue)
panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j));
if (wait_on_busy(sh[j]->io_port)) {
......@@ -611,7 +616,7 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) {
for (k = 0; k < MAX_TARGET; k++) HD(j)->target_reset[k] = TRUE;
for (i = 0; i < sh[j]->hostt->can_queue; i++) {
for (i = 0; i < sh[j]->can_queue; i++) {
if (HD(j)->cp_stat[i] == FREE) continue;
......@@ -657,7 +662,7 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) {
cli();
printk("%s: reset, interrupts disabled, loops %d.\n", BN(j), limit);
for (i = 0; i < sh[j]->hostt->can_queue; i++) {
for (i = 0; i < sh[j]->can_queue; i++) {
/* Skip mailboxes already set free by interrupt */
if (HD(j)->cp_stat[i] != IN_RESET) continue;
......@@ -739,7 +744,7 @@ static void u14_34f_interrupt_handler(int irq) {
i = spp - HD(j)->cp;
if (i >= sh[j]->hostt->can_queue)
if (i >= sh[j]->can_queue)
panic("%s: ihdlr, invalid mscp address.\n", BN(j));
if (HD(j)->cp_stat[i] == LOCKED) {
......
......@@ -11,7 +11,7 @@ int u14_34f_abort(Scsi_Cmnd *);
int u14_34f_reset(Scsi_Cmnd *);
int u14_34f_biosparam(Disk *, int, int *);
#define U14_34F_VERSION "1.09.01"
#define U14_34F_VERSION "1.10.01"
#define ULTRASTOR_14_34F { \
NULL, \
......
......@@ -253,7 +253,7 @@ struct super_block *isofs_read_super(struct super_block *s,void *data,
case 2048: s -> u.isofs_sb.s_log_zone_size = 11; break;
default:
printk("Bad logical zone size %d\n", s -> u.isofs_sb.s_log_zone_size = 10);
printk("Bad logical zone size %ld\n", s -> u.isofs_sb.s_log_zone_size);
goto out;
}
......@@ -274,7 +274,7 @@ struct super_block *isofs_read_super(struct super_block *s,void *data,
printk("Max size:%ld Log zone size:%ld\n",
s->u.isofs_sb.s_max_size,
s->u.isofs_sb.s_log_zone_size);
1UL << s->u.isofs_sb.s_log_zone_size);
printk("First datazone:%ld Root inode number %d\n",
s->u.isofs_sb.s_firstdatazone >> s -> u.isofs_sb.s_log_zone_size,
isonum_733 (rootp->extent) << s -> u.isofs_sb.s_log_zone_size);
......
......@@ -49,7 +49,7 @@ struct rusage {
#ifdef notdef
#define RLIMIT_MEMLOCK 6 /* max locked-in-memory address space*/
#define RLIMIT_NPROC 7 /* max number of processes */
#define RLIMIT_OFILE 8 /* max number of open files */
#define RLIMIT_NOFILE 8 /* max number of open files */
#endif
#define RLIM_NLIMITS 6
......
......@@ -396,6 +396,7 @@ asmlinkage int sys_brk(unsigned long brk)
int freepages;
unsigned long rlim;
unsigned long newbrk, oldbrk;
struct vm_area_struct * vma;
if (brk < current->mm->end_code)
return current->mm->brk;
......@@ -421,6 +422,15 @@ asmlinkage int sys_brk(unsigned long brk)
if (brk - current->mm->end_code > rlim ||
brk >= current->mm->start_stack - 16384)
return current->mm->brk;
/*
* Check against existing mmap mappings.
*/
for (vma = current->mm->mmap; vma; vma = vma->vm_next) {
if (newbrk <= vma->vm_start)
break;
if (oldbrk < vma->vm_end)
return current->mm->brk;
}
/*
* stupid algorithm to decide if we have enough memory: while
* simple, it hopefully works in most obvious cases.. Easy to
......
......@@ -25,6 +25,7 @@
* Alan Cox : Use ttl/tos
* Alan Cox : Cleaned up old debugging
* Alan Cox : Use new kernel side addresses
* Arnt Gulbrandsen : Fixed MSG_DONTROUTE in raw sockets.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -157,7 +158,7 @@ static int raw_sendto(struct sock *sk, unsigned char *from,
* Check the flags. Only MSG_DONTROUTE is permitted.
*/
if (flags&MSG_DONTROUTE)
if (flags & ~MSG_DONTROUTE)
return(-EINVAL);
/*
* Get and verify the address.
......
......@@ -186,17 +186,6 @@ static int get_fd(struct inode *inode)
}
/*
* Reverses the action of get_fd() by releasing the file. it closes
* the descriptor, but makes sure it does nothing more. Called when
* an incomplete socket must be closed, along with sock_release().
*/
static inline void toss_fd(int fd)
{
sys_close(fd); /* the count protects us from iput */
}
/*
* Go from an inode to its socket slot.
*/
......@@ -743,7 +732,11 @@ static int sock_socketpair(int family, int type, int protocol, unsigned long uso
er=verify_area(VERIFY_WRITE, usockvec, 2 * sizeof(int));
if(er)
{
sys_close(fd1);
sys_close(fd2);
return er;
}
put_fs_long(fd1, &usockvec[0]);
put_fs_long(fd2, &usockvec[1]);
......
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