Commit 3448e1a6 authored by Linus Torvalds's avatar Linus Torvalds

Import 0.99.14x

parent 3ba1ba97
VERSION = 0.99
PATCHLEVEL = 14
ALPHA = w
ALPHA = x
all: Version zImage
......
......@@ -87,6 +87,7 @@ fi
*
bool 'Sony CDU31A CDROM driver support' CONFIG_CDU31A n
bool 'Mitsumi CDROM driver support' CONFIG_MCD n
bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n
*
* Filesystems
*
......
......@@ -34,6 +34,14 @@ OBJS := $(OBJS) mcd.o
SRCS := $(SRCS) mcd.c
endif
ifdef CONFIG_SBPCD
OBJS := $(OBJS) sbpcd.o
SRCS := $(SRCS) sbpcd.c
ifdef PATCHLEVEL
CFLAGS := $(CFLAGS) -DPATCHLEVEL=$(PATCHLEVEL)
endif
endif #CONFIG_SBPCD
ifdef CONFIG_BLK_DEV_HD
OBJS := $(OBJS) hd.o
SRCS := $(SRCS) hd.c
......
......@@ -189,6 +189,14 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR)
#define DEVICE_NAME "Matsushita CD-ROM"
#define DEVICE_REQUEST do_sbpcd_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#else
#error "unknown blk device"
......
......@@ -18,6 +18,10 @@
#include "blk.h"
#ifdef CONFIG_SBPCD
extern u_long sbpcd_init(u_long, u_long);
#endif CONFIG_SBPCD
/*
* The request-struct contains all necessary data
* to load a nr of sectors into memory
......@@ -485,6 +489,9 @@ long blk_dev_init(long mem_start, long mem_end)
#ifdef CONFIG_MCD
mem_start = mcd_init(mem_start,mem_end);
#endif
#ifdef CONFIG_SBPCD
mem_start = sbpcd_init(mem_start, mem_end);
#endif CONFIG_SBPCD
if (ramdisk_size)
mem_start += rd_init(mem_start, ramdisk_size*1024);
return mem_start;
......
This diff is collapsed.
......@@ -213,7 +213,7 @@ static int screen_size = 0;
#define VT102ID "\033[?6c"
static unsigned char * translations[] = {
/* 8-bit Latin-1 mapped to the PC charater set: '\0' means non-printable */
/* 8-bit Latin-1 mapped to the PC character set: '\0' means non-printable */
(unsigned char *)
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"\0\0\0\0\0\0\0\0\0\0\376\0\0\0\0\0"
......
......@@ -213,24 +213,9 @@ static int set_termios_2(struct tty_struct * tty, struct termios * termios)
wake_up_interruptible(&tty->link->secondary.proc_list);
}
#if 0
/* puting mpty's into echo mode is very bad, and I think under
some situations can cause the kernel to do nothing but
copy characters back and forth. -RAB */
/* This can no longer happen because a set_termios is redirected
to the pty slave. -- jrs */
if (IS_A_PTY_MASTER(channel)) tty->termios->c_lflag &= ~ECHO;
#endif
unset_locked_termios(tty->termios, &old_termios,
termios_locked[tty->line]);
#if 0
retval = tty_set_ldisc(tty, tty->termios->c_line);
if (retval)
return retval;
#endif
if (tty->set_termios)
(*tty->set_termios)(tty, &old_termios);
......
#
# Set any special options here. Most drivers will autoprobe/autoIRQ
# if you set the address or IRQ to zero, so we do that by default.
# Cards and options supported:
# This file is used for selecting non-standard netcard options, and
# need not be modified for typical use.
#
# Drivers are *not* selected in this file, but rather with files
# automatically generated during the top-level kernel configuration.
#
# Special options supported, indexed by their 'config' name:
#
# EI_DEBUG Set the debugging level for 8390-based boards
# CONFIG_WD80x3 The Western Digital (SMC) WD80x3 driver
# WD_SHMEM=xxx Forces the address of the shared memory
# WD_no_mapout Don't map out the shared memory (faster, but
......@@ -16,28 +19,37 @@
# rw_bugfix Patch an obscure bug with a version of the 8390.
# CONFIG_HPLAN The HP-LAN driver (for 8390-based boards only).
# rw_bugfix Fix the same obscure bug.
# CONFIG_EL1 The 3c501 driver (just joking, never released)
# CONFIG_EL2 The 3c503 EtherLink II driver
# EL2_AUI Default to the AUI port instead of the BNC port
# no_probe_nonshared_memory Don't probe for programmed-I/O boards.
# EL2MEMTEST Test shared memory at boot-time.
# CONFIG_EL3
# EL3_DEBUG Set the debugging message level.
# CONFIG_AT1500
# LANCE_DEBUG Set the debugging message level.
# DEFAULT_DMA Change the default DMA to other than 5.
# CONFIG_PLIP The Crynwr-protocol PL/IP driver
# INITIALTIMEOUTFACTOR Timing parameters.
# MAXTIMEOUTFACTOR
# D_LINK The D-Link DE-600 Portable Ethernet Adaptor.
# D_LINK_IO The D-Link I/O address (0x378 == default)
# D_LINK_IRQ The D-Link IRQ number to use (IRQ7 == default)
# D_LINK_IO The D-Link I/O address (0x378 == typical)
# D_LINK_IRQ The D-Link IRQ number to use (IRQ7 == typical)
# D_LINK_DEBUG Enable or disable D-Link debugging
#
OPTS = #-DEI8390=0 -DEI8390_IRQ=0
WD_OPTS = #-DWD_SHMEM=0
EL2_OPTS = #-UEL2_AUI
# The following options exist, but cannot be set in this file.
# lance.c
# LANCE_DMA Change the default DMA to other than DMA5.
# 8390.c
# NO_PINGPONG Disable ping-pong transmit buffers.
# Most drivers also have a *_DEBUG setting that may be adjusted.
# The 8390 drivers share the EI_DEBUG settting.
# General options for Space.c
OPTS = # -DETH0_ADDR=0x300 -DETH0_IRQ=11
WD_OPTS = #-DWD_SHMEM=0xDD000
EL2_OPTS = #-DEL2_AUI
NE_OPTS =
HP_OPTS =
PLIP_OPTS =
# The following are the only parameters that must be set in this file.
DL_OPTS = -DD_LINK_IO=0x378 -DD_LINK_IRQ=7 -UD_LINK_DEBUG
AT_OPTS = # -DLANCE_DMA=5
These drivers support all common 8390-based ethernet boards. Currently
"common" is defined as:
3Com Products:
* 3Com 3c503 Board loaned by Chance Reschke, USRA.edu (thanks!)
3Com 3c503/16 and excellent documentation provided by 3Com.
Clones-n-things
NE1000 Novell and Eagle are useless for documentation,
* NE2000 but copied the designs directly from NatSemi;->.
WD/SMC products
WD8003
* WD8013 Board loaned by Russ Nelson, Crynwr Software. Thanks!
* I've seen it work myself!
There is support for the following boards, but since I've only been
able to borrow a thinnet of an HP ethercard I've relied upon reports
from others:
HP LAN adaptors
** HP27245
** HP27247
** HP27250
Thanks are due to the dozens of alpha testers. Special thanks are due
to Chance Reschke <@usra.edu> and Russ Nelson <@crynwr.com> for
loaning me ethercards.
The following addresses are autoprobed, in this order:
wd.c: 0x300, 0x280, 0x380, 0x240
3c503: 0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2a0, 0x2e0
ne.c: 0x300, 0x280, 0x320, 0x340, 0x360
hp.c: 0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240
80x3 clones that are reported to work:
LANNET LEC-45
"NE2000" clones that are reported to work:
Alta Combo(NE2000 clone)
Aritsoft LANtastic AE-2 (NE2000 clone w/ extra memory)
Asante Etherpak 2001/2003
D-Link Ethernet II
LTC E-NET/16 P/N: 8300-200-002 (lipka@lip.hanse.de)
Network Solutions HE-203
SVEC 4 Dimension Ethernet
4-Dimension FD0490 EtherBoard16
Cabletron products:
E1010 No ID PROM and sketchy info from Ctron means you'll
E1010-x have to compile-in information about your board.
E2010
E2010-x
N.B. The E2100 will not work with Linux until Cabletron
releases the programming information!
Important defines
For Space.c
#define EI8390 0 /* The base address of your ethercard. */
#define EI8390_IRQ 0 /* and the interrupt you want to use. */
/* '0' means autoconfigure */
For 8390.c
#define EI_DEBUG 2 /* Use '0' for no messages. */
#define EL2 /* For the 3c503 driver. */
#define NE2000 /* For the NE1000/NE2000/Ctron driver. */
#define WD80x3 /* For the WD8003/WD8013 driver. */
#define HPLAN /* For the HP27xxx driver. */
For the individual drivers
EI8390 Define (probably in autoconf.h or config.site.h) this to the base
address of your ethernet card.
EI8390_IRQ Define (probably in autoconf.h or config.site.h) this to the
IRQ line of your ethernet card. Most drivers convert a IRQ2 to an
IRQ9 for you, so don't be surprised.
EI_DEBUG Set to the desired numeric debugging level. Use 3 or
greater when actively debugging a problem, '1' for a
casual interest in what's going on, and '0' for normal
use.
NO_PINGPONG
Define this if you don't want ping-pong transmit buffers.
EL2_AUI
Define for this if you are using the 3c503 and use the AUI/DIX
connector rather than the built-in thin-net transceiver.
WD_SHMEM
Define this to override the shared memory address used by the
WD driver. This should only be necessary for jumpered ethercards.
If you have a Cabletron ethercard you might want to look at ne.c:neprobe()
for info on how to enable more packet buffer space.
ETHERLINK1_IRQ
ETHERLINK1 Define these to the base address and IRQ of a 3c501 (NOT 3c503)
card. Refer to net/tcp/Space.c.
......@@ -17,7 +17,7 @@
/* Routines for the NatSemi-based designs (NE[12]000). */
static char *version =
"ne.c:v0.99-15 1/19/93 Donald Becker (becker@super.org)\n";
"ne.c:v0.99-14a 12/3/93 Donald Becker (becker@super.org)\n";
#include <linux/config.h>
#include <linux/kernel.h>
......@@ -123,10 +123,6 @@ static int neprobe1(int ioaddr, struct device *dev, int verbose)
printk("NE*000 ethercard probe at %#3x:", ioaddr);
/* First hard-reset the ethercard. */
i = inb_p(ioaddr + NE_RESET);
outb_p(i, ioaddr + NE_RESET);
/* Read the 16 bytes of station address prom, returning 1 for
an eight-bit interface and 2 for a 16-bit interface.
We must first initialize registers, similar to NS8390_init(eifdev, 0).
......@@ -162,8 +158,8 @@ static int neprobe1(int ioaddr, struct device *dev, int verbose)
/* We must set the 8390 for word mode, AND RESET IT. */
int tmp;
outb_p(0x49, ioaddr + EN0_DCFG);
tmp = inb_p(ioaddr + NE_RESET);
outb(tmp, ioaddr + NE_RESET);
tmp = inb_p(NE_BASE + NE_RESET);
outb(tmp, NE_BASE + NE_RESET);
/* Un-double the SA_prom values. */
for (i = 0; i < 16; i++)
SA_prom[i] = SA_prom[i+i];
......
......@@ -30,6 +30,9 @@ 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;
......@@ -288,6 +291,13 @@ struct super_block *isofs_read_super(struct super_block *s,void *data,
goto out;
}
#endif
#if defined(CONFIG_SBPCD)
if (MAJOR(s->s_dev) == MATSUSHITA_CDROM_MAJOR) {
if (check_sbpcd_media_change(s->s_dev,0))
goto out;
};
#endif CONFIG_SBPCD
return s;
out: /* Kick out for various error conditions */
brelse(bh);
......
......@@ -225,6 +225,7 @@ asmlinkage int sys_fchdir(unsigned int fd)
return -EACCES;
iput(current->pwd);
current->pwd = inode;
inode->i_count++;
return (0);
}
......
......@@ -42,7 +42,7 @@
* 22 - (at2disk)
* 23 - mitsumi cdrom
* 24 - sony535 cdrom
* 25 -
* 25 - matsushita cdrom minors 0..3
* 26 -
* 27 - qic117 tape
*/
......@@ -71,6 +71,7 @@
/* unused: 22 */
#define MITSUMI_CDROM_MAJOR 23
#define CDU535_CDROM_MAJOR 24
#define MATSUSHITA_CDROM_MAJOR 25
#define QIC117_TAPE_MAJOR 27
/*
......
This diff is collapsed.
......@@ -30,6 +30,8 @@
* 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
......@@ -48,6 +50,8 @@
#define HD_TIMER2 24
#define SBPCD_TIMER 25
struct timer_struct {
unsigned long expires;
void (*fn)(void);
......
......@@ -294,7 +294,7 @@ struct tty_ldisc {
unsigned int cmd, unsigned long arg);
int (*select)(struct tty_struct * tty, struct inode * inode,
struct file * file, int sel_type,
select_table *wait);
struct select_table_struct *wait);
/*
* The following routines are called from below.
*/
......
......@@ -91,6 +91,9 @@ extern void t128_setup(char *str, int *ints);
extern void generic_NCR5380_setup(char *str, int *intr);
extern void aha152x_setup(char *str, int *ints);
extern void sound_setup(char *str, int *ints);
#ifdef CONFIG_SBPCD
extern void sbpcd_setup(char *str, int *ints);
#endif CONFIG_SBPCD
#ifdef CONFIG_SYSVIPC
extern void ipc_init(void);
......@@ -198,6 +201,9 @@ struct {
#ifdef CONFIG_SOUND
{ "sound=", sound_setup },
#endif
#ifdef CONFIG_SBPCD
{ "sbpcd=", sbpcd_setup },
#endif CONFIG_SBPCD
{ 0, 0 }
};
......
......@@ -9,9 +9,11 @@
_register_chrdev
_unregister_chrdev
___verify_write
_wake_up_interruptible
_wp_works_ok
___verify_write
_current
_jiffies
_printk
......
......@@ -72,6 +72,8 @@
extern int last_retran;
extern void sort_send(struct sock *sk);
#define min(a,b) ((a)<(b)?(a):(b))
void
ip_print(struct iphdr *ip)
{
......@@ -1402,8 +1404,7 @@ ip_queue_xmit(struct sock *sk, struct device *dev,
}
}
sti();
reset_timer(sk, TIME_WRITE,
backoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
reset_timer(sk, TIME_WRITE, sk->rto);
} else {
skb->sk = sk;
}
......@@ -1423,14 +1424,16 @@ ip_queue_xmit(struct sock *sk, struct device *dev,
void
ip_retransmit(struct sock *sk, int all)
ip_do_retransmit(struct sock *sk, int all)
{
struct sk_buff * skb;
struct proto *prot;
struct device *dev;
int retransmits;
prot = sk->prot;
skb = sk->send_head;
retransmits = sk->retransmits;
while (skb != NULL) {
dev = skb->dev;
/* I know this can't happen but as it does.. */
......@@ -1469,7 +1472,7 @@ ip_retransmit(struct sock *sk, int all)
/* else dev->queue_xmit(skb, dev, SOPRI_NORMAL ); CANNOT HAVE SK=NULL HERE */
}
oops: sk->retransmits++;
oops: retransmits++;
sk->prot->retransmits ++;
if (!all) break;
......@@ -1477,43 +1480,37 @@ oops: sk->retransmits++;
if (sk->retransmits > sk->cong_window) break;
skb = (struct sk_buff *)skb->link3;
}
}
/*
* Increase the RTT time every time we retransmit.
* This will cause exponential back off on how hard we try to
* get through again. Once we get through, the rtt will settle
* back down reasonably quickly.
/*
* This is the normal code called for timeouts. It does the retransmission
* and then does backoff. ip_do_retransmit is separated out because
* tcp_ack needs to send stuff from the retransmit queue without
* initiating a backoff.
*/
sk->backoff++;
reset_timer(sk, TIME_WRITE, backoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
}
/* Backoff function - the subject of much research */
int backoff(int n)
void
ip_retransmit(struct sock *sk, int all)
{
/* Use binary exponential up to retry #4, and quadratic after that
* This yields the sequence
* 1, 2, 4, 8, 16, 25, 36, 49, 64, 81, 100 ...
*/
ip_do_retransmit(sk, all);
if(n<0)
{
printk("Backoff < 0!\n");
return 16; /* Make up a value */
}
/*
* Increase the timeout each time we retransmit. Note that
* we do not increase the rtt estimate. rto is initialized
* from rtt, but increases here. Jacobson (SIGCOMM 88) suggests
* that doubling rto each time is the least we can get away with.
* In KA9Q, Karns uses this for the first few times, and then
* goes to quadratic. netBSD doubles, but only goes up to *64,
* and clamps at 1 to 64 sec afterwards. Note that 120 sec is
* defined in the protocol as the maximum possible RTT. I guess
* we'll have to use something other than TCP to talk to the
* University of Mars.
*/
if(n <= 4)
return 1 << n; /* Binary exponential back off */
else
{
if(n<255)
return n * n; /* Quadratic back off */
else
{
printk("Overloaded backoff!\n");
return 255*255;
}
}
sk->retransmits++;
sk->backoff++;
sk->rto = min(sk->rto << 1, 120*HZ);
reset_timer(sk, TIME_WRITE, sk->rto);
}
/*
......
......@@ -843,13 +843,15 @@ inet_create(struct socket *sock, int protocol)
sk->copied_seq = 0;
sk->fin_seq = 0;
sk->proc = 0;
sk->rtt = TCP_WRITE_TIME;
sk->rtt = TCP_WRITE_TIME << 3;
sk->rto = TCP_WRITE_TIME;
sk->mdev = 0;
sk->backoff = 0;
sk->packets_out = 0;
sk->cong_window = 1; /* start with only sending one packet at a time. */
sk->exp_growth = 1; /* if set cong_window grow exponentially every time
we get an ack. */
sk->cong_count = 0;
sk->ssthresh = 0;
sk->max_window = 0;
sk->urginline = 0;
sk->intr = 0;
sk->linger = 0;
......
......@@ -79,7 +79,6 @@ struct sock {
destroy,
ack_timed,
no_check,
exp_growth,
zapped, /* In ax25 & ipx means not linked */
broadcast,
nonagle;
......@@ -103,14 +102,21 @@ struct sock {
unsigned short window;
unsigned short bytes_rcv;
unsigned short mtu;
unsigned short max_window;
unsigned short num;
volatile unsigned short cong_window;
volatile unsigned short cong_count;
volatile unsigned short ssthresh;
volatile unsigned short packets_out;
volatile unsigned short urg;
volatile unsigned short shutdown;
unsigned short mss;
volatile unsigned long rtt;
volatile unsigned long mdev;
volatile unsigned long rto;
/* currently backoff isn't used, but I'm maintaining it in case
* we want to go back to a backoff formula that needs it
*/
volatile unsigned short backoff;
volatile short err;
unsigned char protocol;
......
This diff is collapsed.
......@@ -157,10 +157,9 @@ net_timer (unsigned long data)
* So we need to check for that.
*/
if (sk->send_head) {
if (jiffies < (sk->send_head->when + backoff (sk->backoff)
* (2 * sk->mdev + sk->rtt))) {
reset_timer (sk, TIME_WRITE, (sk->send_head->when
+ backoff (sk->backoff) * (2 * sk->mdev + sk->rtt)) - jiffies);
if (jiffies < (sk->send_head->when + sk->rto)) {
reset_timer (sk, TIME_WRITE,
(sk->send_head->when + sk->rto - jiffies));
release_sock (sk);
break;
}
......
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