Commit feb3aa0e authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.64

parent 46810eb7
VERSION = 1 VERSION = 1
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 63 SUBLEVEL = 64
ARCH = i386 ARCH = i386
......
...@@ -63,6 +63,7 @@ bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE ...@@ -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 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n
bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST 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 #bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
fi fi
......
...@@ -11,6 +11,18 @@ ...@@ -11,6 +11,18 @@
* include/linux/cdrom.h). With this interface, CDROMs can be * include/linux/cdrom.h). With this interface, CDROMs can be
* accessed and standard audio CDs can be played back normally. * 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 * This interface is (unfortunately) a polled interface. This is
* because most Sony interfaces are set up with DMA and interrupts * because most Sony interfaces are set up with DMA and interrupts
* disables. Some (like mine) do not even have the capability to * disables. Some (like mine) do not even have the capability to
...@@ -73,6 +85,9 @@ ...@@ -73,6 +85,9 @@
* writer doesn't have a multi-session disk, this is all theoritical. * writer doesn't have a multi-session disk, this is all theoritical.
* Also, music operation will obviously only work on one session at a * Also, music operation will obviously only work on one session at a
* time. * 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 * Raw sector I/O
* *
...@@ -195,6 +210,8 @@ static struct ...@@ -195,6 +210,8 @@ static struct
0 means don't use) */ 0 means don't use) */
} cdu31a_addresses[] = } cdu31a_addresses[] =
{ {
#if 0 /* No autoconfig any more. See Note at beginning
of this file. */
{ 0x340, 0 }, /* Standard configuration Sony Interface */ { 0x340, 0 }, /* Standard configuration Sony Interface */
{ 0x1f88, 0 }, /* Fusion CD-16 */ { 0x1f88, 0 }, /* Fusion CD-16 */
{ 0x230, 0 }, /* SoundBlaster 16 card */ { 0x230, 0 }, /* SoundBlaster 16 card */
...@@ -203,6 +220,7 @@ static struct ...@@ -203,6 +220,7 @@ static struct
{ 0x330, 0 }, /* Secondary standard Sony Interface */ { 0x330, 0 }, /* Secondary standard Sony Interface */
{ 0x634, 0 }, /* Sound FX SC400 */ { 0x634, 0 }, /* Sound FX SC400 */
{ 0x654, 0 }, /* Sound FX SC400 */ { 0x654, 0 }, /* Sound FX SC400 */
#endif
{ 0 } { 0 }
}; };
...@@ -253,6 +271,9 @@ static int sony_raw_data_mode = 1; /* 1 if data tracks, 0 if audio. ...@@ -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 static unsigned int sony_usage = 0; /* How many processes have the
drive open. */ 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 static struct s_sony_session_toc *(ses_tocs[MAX_TRACKS]); /* Points to the
table of table of
contents. */ contents. */
...@@ -2752,6 +2773,17 @@ cdu31a_setup(char *strings, ...@@ -2752,6 +2773,17 @@ cdu31a_setup(char *strings,
{ {
irq_used = ints[2]; 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; static int cdu31a_block_size;
...@@ -2776,8 +2808,11 @@ cdu31a_init(unsigned long mem_start, unsigned long mem_end) ...@@ -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. * The following turn on the CD-ROM interface for a Fusion CD-16.
*/ */
outb(0xbc, 0x9a01); if (sony_pas_init)
outb(0xe2, 0x9a01); {
outb(0xbc, 0x9a01);
outb(0xe2, 0x9a01);
}
drive_found = 0; drive_found = 0;
......
...@@ -113,6 +113,8 @@ static volatile unsigned char reply_expected = 0; ...@@ -113,6 +113,8 @@ static volatile unsigned char reply_expected = 0;
static volatile unsigned char acknowledge = 0; static volatile unsigned char acknowledge = 0;
static volatile unsigned char resend = 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_hand)(unsigned char value, char up_flag);
typedef void (k_handfn)(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] = { ...@@ -129,12 +131,12 @@ static k_hand key_handler[16] = {
typedef void (*void_fnp)(void); typedef void (*void_fnp)(void);
typedef void (void_fn)(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, num, hold, scroll_forw, scroll_back, boot_it, caps_on, compose,
SAK, decr_console, incr_console; SAK, decr_console, incr_console;
static void_fnp spec_fn_table[] = { 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, show_state, send_intr, lastcons, caps_toggle,
num, hold, scroll_forw, scroll_back, num, hold, scroll_forw, scroll_back,
boot_it, caps_on, compose, SAK, boot_it, caps_on, compose, SAK,
...@@ -541,7 +543,7 @@ static void keyboard_interrupt(int int_pt_regs) ...@@ -541,7 +543,7 @@ static void keyboard_interrupt(int int_pt_regs)
} else { } else {
/* maybe beep? */ /* maybe beep? */
/* we have at least to update shift_state */ /* 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(); compute_shiftstate();
#else #else
keysym = U(plain_map[keycode]); keysym = U(plain_map[keycode]);
...@@ -733,14 +735,17 @@ static void do_ignore(unsigned char value, char up_flag) ...@@ -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) static void do_spec(unsigned char value, char up_flag)
{ {
if (up_flag) if (up_flag)
return; return;
if (value >= SIZE(spec_fn_table)) if (value >= SIZE(spec_fn_table))
return; return;
if (!spec_fn_table[value])
return;
spec_fn_table[value](); spec_fn_table[value]();
} }
......
...@@ -132,6 +132,10 @@ SCSI_OBJS := $(SCSI_OBJS) ultrastor.o ...@@ -132,6 +132,10 @@ SCSI_OBJS := $(SCSI_OBJS) ultrastor.o
SCSI_SRCS := $(SCSI_SRCS) ultrastor.c SCSI_SRCS := $(SCSI_SRCS) ultrastor.c
endif endif
ifdef CONFIG_SCSI_EATA
SCSI_OBJS := $(SCSI_OBJS) eata.o
SCSI_SRCS := $(SCSI_SRCS) eata.c
endif
scsi.a: $(SCSI_OBJS) scsi.a: $(SCSI_OBJS)
......
...@@ -1010,6 +1010,7 @@ int buslogic_detect(Scsi_Host_Template *tpnt) ...@@ -1010,6 +1010,7 @@ int buslogic_detect(Scsi_Host_Template *tpnt)
buslogic_printk("buslogic_detect:\n"); buslogic_printk("buslogic_detect:\n");
#endif #endif
tpnt->can_queue = BUSLOGIC_MAILBOXES;
for (indx = 0; indx < ARRAY_SIZE(bases); indx++) for (indx = 0; indx < ARRAY_SIZE(bases); indx++)
if (!check_region(bases[indx], 3)) { if (!check_region(bases[indx], 3)) {
shpnt = scsi_register(tpnt, sizeof (struct hostdata)); 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 @@ ...@@ -87,6 +87,10 @@
#include "wd7000.h" #include "wd7000.h"
#endif #endif
#ifdef CONFIG_SCSI_EATA
#include "eata.h"
#endif
#ifdef CONFIG_SCSI_DEBUG #ifdef CONFIG_SCSI_DEBUG
#include "scsi_debug.h" #include "scsi_debug.h"
#endif #endif
...@@ -170,6 +174,9 @@ static Scsi_Host_Template builtin_scsi_hosts[] = ...@@ -170,6 +174,9 @@ static Scsi_Host_Template builtin_scsi_hosts[] =
#ifdef CONFIG_SCSI_7000FASST #ifdef CONFIG_SCSI_7000FASST
WD7000, WD7000,
#endif #endif
#ifdef CONFIG_SCSI_EATA
EATA,
#endif
#ifdef CONFIG_SCSI_DEBUG #ifdef CONFIG_SCSI_DEBUG
SCSI_DEBUG, SCSI_DEBUG,
#endif #endif
......
/* /*
* u14-34f.c - Low-level SCSI driver for UltraStor 14F/34F * 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 * This driver is a total replacement of the original UltraStor
* scsi driver, but it supports ONLY the 14F and 34F boards. * scsi driver, but it supports ONLY the 14F and 34F boards.
...@@ -26,9 +29,9 @@ ...@@ -26,9 +29,9 @@
* *
* 14F - ISA first-party DMA HA with floppy support and WD1003 emulation. * 14F - ISA first-party DMA HA with floppy support and WD1003 emulation.
* 24F - EISA Bus Master 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 * firmware 28004-005/38004-004 (BIOS rev. 2.00) and the latest firmware
* 28004-006/38004-005 (BIOS rev. 2.01). * 28004-006/38004-005 (BIOS rev. 2.01).
* *
...@@ -69,7 +72,7 @@ ...@@ -69,7 +72,7 @@
* - adapter_status equal 0x96 or 0xa3 or 0x93 or 0x94; * - adapter_status equal 0x96 or 0xa3 or 0x93 or 0x94;
* - adapter_status equal 0 and target_status equal 2 on for all targets * - adapter_status equal 0 and target_status equal 2 on for all targets
* in the next operation following the reset. * 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 * 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). * (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 * Because of this I had to DISABLE_CLUSTERING and to work around the
...@@ -77,7 +80,7 @@ ...@@ -77,7 +80,7 @@
* so that the operations are retried without complains from the scsi.c * so that the operations are retried without complains from the scsi.c
* code. * code.
* Any reset of the scsi bus is going to kill tape operations, since * 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. * scsi bus is under heavy load.
* Requests using scatter/gather have a maximum length of 16 x 1024 bytes * Requests using scatter/gather have a maximum length of 16 x 1024 bytes
* when DISABLE_CLUSTERING is in effect, but unscattered requests could be * when DISABLE_CLUSTERING is in effect, but unscattered requests could be
...@@ -136,13 +139,13 @@ ...@@ -136,13 +139,13 @@
#define DO_BUS_RESET /* Reset SCSI bus on error */ #define DO_BUS_RESET /* Reset SCSI bus on error */
#define NO_DEBUG_DETECT #define NO_DEBUG_DETECT
#define NO_DEBUG_INTERRUPT #define NO_DEBUG_INTERRUPT
#define DEBUG_STATISTICS #define NO_DEBUG_STATISTICS
#define MAX_TARGET 8 #define MAX_TARGET 8
#define MAX_IRQ 16 #define MAX_IRQ 16
#define MAX_BOARDS 4 #define MAX_BOARDS 4
#define MAX_MAILBOXES 16 #define MAX_MAILBOXES 16
#define MAX_SGLIST U34F_MAX_SGLIST #define MAX_SGLIST 33
#define MAX_CMD_PER_LUN 2 #define MAX_CMD_PER_LUN 2
#define FALSE 0 #define FALSE 0
...@@ -323,7 +326,7 @@ static inline int port_detect(ushort *port_base, unsigned int j, ...@@ -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]->base = bios_segment_table[config_1.bios_segment];
sh[j]->irq = irq; sh[j]->irq = irq;
sh[j]->this_id = config_2.ha_scsi_id; 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; sh[j]->hostt->cmd_per_lun = MAX_CMD_PER_LUN;
sys_mask = inb(sh[j]->io_port + REG_SYS_MASK); sys_mask = inb(sh[j]->io_port + REG_SYS_MASK);
lcl_mask = inb(sh[j]->io_port + REG_LCL_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, ...@@ -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 (sh[j]->base == 0) outb(CMD_ENA_INTR, sh[j]->io_port + REG_SYS_MASK);
#if defined (DO_BUS_RESET) #if defined (DO_BUS_RESET)
outb(lcl_mask | 0x40, sh[j]->io_port + REG_LCL_MASK); lcl_mask = 0xc2;
#else #else
outb(lcl_mask & ~0x40, sh[j]->io_port + REG_LCL_MASK); lcl_mask = 0x82;
#endif #endif
outb(lcl_mask, sh[j]->io_port + REG_LCL_MASK);
/* Register the I/O space that we use */ /* Register the I/O space that we use */
snarf_region(sh[j]->io_port, REG_REGION); snarf_region(sh[j]->io_port, REG_REGION);
...@@ -376,7 +381,7 @@ static inline int port_detect(ushort *port_base, unsigned int j, ...@@ -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, "Mbox %d, CmdLun %d, C%d.\n", BN(j), sh[j]->io_port,
(int)sh[j]->base, sh[j]->irq, (int)sh[j]->base, sh[j]->irq,
sh[j]->dma_channel, sh[j]->sg_tablesize, 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); sh[j]->hostt->use_clustering);
return TRUE; return TRUE;
} }
...@@ -447,9 +452,9 @@ int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { ...@@ -447,9 +452,9 @@ int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
starting from last_cp_used */ starting from last_cp_used */
i = HD(j)->last_cp_used + 1; 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) { if (HD(j)->cp_stat[i] == FREE) {
HD(j)->last_cp_used = i; HD(j)->last_cp_used = i;
...@@ -457,7 +462,7 @@ int u14_34f_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { ...@@ -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)); printk("%s: qcomm, no free mailbox, reseting.\n", BN(j));
if (HD(j)->in_reset) if (HD(j)->in_reset)
...@@ -542,7 +547,7 @@ int u14_34f_abort(Scsi_Cmnd *SCarg) { ...@@ -542,7 +547,7 @@ int u14_34f_abort(Scsi_Cmnd *SCarg) {
printk("%s: abort, mbox %d, target %d, pid %ld.\n", printk("%s: abort, mbox %d, target %d, pid %ld.\n",
BN(j), i, SCarg->target, SCarg->pid); 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)); panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j));
if (wait_on_busy(sh[j]->io_port)) { if (wait_on_busy(sh[j]->io_port)) {
...@@ -611,7 +616,7 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) { ...@@ -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 (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; if (HD(j)->cp_stat[i] == FREE) continue;
...@@ -657,7 +662,7 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) { ...@@ -657,7 +662,7 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) {
cli(); cli();
printk("%s: reset, interrupts disabled, loops %d.\n", BN(j), limit); 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 */ /* Skip mailboxes already set free by interrupt */
if (HD(j)->cp_stat[i] != IN_RESET) continue; if (HD(j)->cp_stat[i] != IN_RESET) continue;
...@@ -739,7 +744,7 @@ static void u14_34f_interrupt_handler(int irq) { ...@@ -739,7 +744,7 @@ static void u14_34f_interrupt_handler(int irq) {
i = spp - HD(j)->cp; 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)); panic("%s: ihdlr, invalid mscp address.\n", BN(j));
if (HD(j)->cp_stat[i] == LOCKED) { if (HD(j)->cp_stat[i] == LOCKED) {
......
...@@ -11,7 +11,7 @@ int u14_34f_abort(Scsi_Cmnd *); ...@@ -11,7 +11,7 @@ int u14_34f_abort(Scsi_Cmnd *);
int u14_34f_reset(Scsi_Cmnd *); int u14_34f_reset(Scsi_Cmnd *);
int u14_34f_biosparam(Disk *, int, int *); 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 { \ #define ULTRASTOR_14_34F { \
NULL, \ NULL, \
......
...@@ -253,7 +253,7 @@ struct super_block *isofs_read_super(struct super_block *s,void *data, ...@@ -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; case 2048: s -> u.isofs_sb.s_log_zone_size = 11; break;
default: 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; goto out;
} }
...@@ -274,7 +274,7 @@ struct super_block *isofs_read_super(struct super_block *s,void *data, ...@@ -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", printk("Max size:%ld Log zone size:%ld\n",
s->u.isofs_sb.s_max_size, 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", printk("First datazone:%ld Root inode number %d\n",
s->u.isofs_sb.s_firstdatazone >> s -> u.isofs_sb.s_log_zone_size, 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); isonum_733 (rootp->extent) << s -> u.isofs_sb.s_log_zone_size);
......
...@@ -49,7 +49,7 @@ struct rusage { ...@@ -49,7 +49,7 @@ struct rusage {
#ifdef notdef #ifdef notdef
#define RLIMIT_MEMLOCK 6 /* max locked-in-memory address space*/ #define RLIMIT_MEMLOCK 6 /* max locked-in-memory address space*/
#define RLIMIT_NPROC 7 /* max number of processes */ #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 #endif
#define RLIM_NLIMITS 6 #define RLIM_NLIMITS 6
......
...@@ -396,6 +396,7 @@ asmlinkage int sys_brk(unsigned long brk) ...@@ -396,6 +396,7 @@ asmlinkage int sys_brk(unsigned long brk)
int freepages; int freepages;
unsigned long rlim; unsigned long rlim;
unsigned long newbrk, oldbrk; unsigned long newbrk, oldbrk;
struct vm_area_struct * vma;
if (brk < current->mm->end_code) if (brk < current->mm->end_code)
return current->mm->brk; return current->mm->brk;
...@@ -421,6 +422,15 @@ asmlinkage int sys_brk(unsigned long brk) ...@@ -421,6 +422,15 @@ asmlinkage int sys_brk(unsigned long brk)
if (brk - current->mm->end_code > rlim || if (brk - current->mm->end_code > rlim ||
brk >= current->mm->start_stack - 16384) brk >= current->mm->start_stack - 16384)
return current->mm->brk; 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 * stupid algorithm to decide if we have enough memory: while
* simple, it hopefully works in most obvious cases.. Easy to * simple, it hopefully works in most obvious cases.. Easy to
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* Alan Cox : Use ttl/tos * Alan Cox : Use ttl/tos
* Alan Cox : Cleaned up old debugging * Alan Cox : Cleaned up old debugging
* Alan Cox : Use new kernel side addresses * 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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, ...@@ -157,7 +158,7 @@ static int raw_sendto(struct sock *sk, unsigned char *from,
* Check the flags. Only MSG_DONTROUTE is permitted. * Check the flags. Only MSG_DONTROUTE is permitted.
*/ */
if (flags&MSG_DONTROUTE) if (flags & ~MSG_DONTROUTE)
return(-EINVAL); return(-EINVAL);
/* /*
* Get and verify the address. * Get and verify the address.
......
...@@ -186,17 +186,6 @@ static int get_fd(struct inode *inode) ...@@ -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. * 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 ...@@ -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)); er=verify_area(VERIFY_WRITE, usockvec, 2 * sizeof(int));
if(er) if(er)
{
sys_close(fd1);
sys_close(fd2);
return er; return er;
}
put_fs_long(fd1, &usockvec[0]); put_fs_long(fd1, &usockvec[0]);
put_fs_long(fd2, &usockvec[1]); 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