Commit 01928531 authored by Linus Torvalds's avatar Linus Torvalds

Import 0.99.14l

parent 4fc7833c
VERSION = 0.99 VERSION = 0.99
PATCHLEVEL = 14 PATCHLEVEL = 14
ALPHA = k ALPHA = l
all: Version zImage all: Version zImage
...@@ -210,6 +210,9 @@ lib: dummy ...@@ -210,6 +210,9 @@ lib: dummy
mm: dummy mm: dummy
$(MAKE) linuxsubdirs SUBDIRS=mm $(MAKE) linuxsubdirs SUBDIRS=mm
ipc: dummy
$(MAKE) linuxsubdirs SUBDIRS=ipc
kernel: dummy kernel: dummy
$(MAKE) linuxsubdirs SUBDIRS=kernel $(MAKE) linuxsubdirs SUBDIRS=kernel
......
/* /*
* linux/kernel/chr_drv/tty_ioctl.c * linux/kernel/drivers/char/tty_ioctl.c
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
* *
* Modified by Fred N. van Kempen, 01/29/93, to add line disciplines * Modified by Fred N. van Kempen, 01/29/93, to add line disciplines
* which can be dynamically activated and de-activated by the line * which can be dynamically activated and de-activated by the line
...@@ -406,6 +406,25 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc) ...@@ -406,6 +406,25 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
return 0; return 0;
} }
static int inq_canon(struct tty_struct * tty)
{
int nr, head, tail;
if (!tty->secondary.data)
return 0;
head = tty->secondary.head;
tail = tty->secondary.tail;
nr = (head - tail) & (TTY_BUF_SIZE-1);
/* Skip EOF-chars.. */
if (EOF_CHAR(tty) == __DISABLED_CHAR)
return nr;
while (head != tail) {
if (tty->secondary.buf[tail] == EOF_CHAR(tty))
nr--;
INC(tail);
}
return nr;
}
int tty_ioctl(struct inode * inode, struct file * file, int tty_ioctl(struct inode * inode, struct file * file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
...@@ -557,8 +576,9 @@ int tty_ioctl(struct inode * inode, struct file * file, ...@@ -557,8 +576,9 @@ int tty_ioctl(struct inode * inode, struct file * file,
retval = verify_area(VERIFY_WRITE, (void *) arg,4); retval = verify_area(VERIFY_WRITE, (void *) arg,4);
if (retval) if (retval)
return retval; return retval;
if (L_CANON(tty) && !tty->secondary.data) if (L_CANON(tty))
put_fs_long(0, (unsigned long *) arg); put_fs_long(inq_canon(tty),
(unsigned long *) arg);
else else
put_fs_long(CHARS(&tty->secondary), put_fs_long(CHARS(&tty->secondary),
(unsigned long *) arg); (unsigned long *) arg);
......
...@@ -302,20 +302,6 @@ static inline unsigned char xchgb(unsigned char reg, ...@@ -302,20 +302,6 @@ static inline unsigned char xchgb(unsigned char reg,
return reg; return reg;
} }
static inline void outl(unsigned int value, unsigned short port)
{
__asm__ __volatile__ ("outl %%al,%%dx"
: :"a" (value),"d" ((unsigned short) port));
}
static inline unsigned int inl(unsigned short port)
{
unsigned int _v;
__asm__ __volatile__ ("inl %%dx,%%eax"
:"=a" (_v):"d" ((unsigned short) port),"0" (0));
return _v;
}
#if ULTRASTOR_DEBUG & (UD_COMMAND | UD_ABORT) #if ULTRASTOR_DEBUG & (UD_COMMAND | UD_ABORT)
static void log_ultrastor_abort(register struct ultrastor_config *config, static void log_ultrastor_abort(register struct ultrastor_config *config,
......
...@@ -357,6 +357,7 @@ icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt, ...@@ -357,6 +357,7 @@ icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt,
unsigned long saddr, int redo, struct inet_protocol *protocol) unsigned long saddr, int redo, struct inet_protocol *protocol)
{ {
struct icmphdr *icmph; struct icmphdr *icmph;
unsigned char *buff;
/* Drop broadcast packets. */ /* Drop broadcast packets. */
if (chk_addr(daddr) == IS_BROADCAST) { if (chk_addr(daddr) == IS_BROADCAST) {
...@@ -367,10 +368,8 @@ icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt, ...@@ -367,10 +368,8 @@ icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt,
return(0); return(0);
} }
/* Skip IP-Header */ buff = skb1->h.raw;
len -= skb1->h.iph->ihl << 2; icmph = (struct icmphdr *) buff;
skb1->h.raw += skb1->h.iph->ihl << 2;
icmph = (struct icmphdr *) skb1->h.raw;
/* Validate the packet first */ /* Validate the packet first */
if (ip_compute_csum((unsigned char *) icmph, len)) { if (ip_compute_csum((unsigned char *) icmph, len)) {
......
...@@ -1267,6 +1267,7 @@ ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) ...@@ -1267,6 +1267,7 @@ ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
} }
/* Point into the IP datagram, just past the header. */ /* Point into the IP datagram, just past the header. */
skb->h.raw += iph->ihl*4;
hash = iph->protocol & (MAX_INET_PROTOS -1); hash = iph->protocol & (MAX_INET_PROTOS -1);
for (ipprot = (struct inet_protocol *)inet_protos[hash]; for (ipprot = (struct inet_protocol *)inet_protos[hash];
ipprot != NULL; ipprot != NULL;
...@@ -1305,7 +1306,7 @@ ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) ...@@ -1305,7 +1306,7 @@ ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
* check the protocol handler's return values here... * check the protocol handler's return values here...
*/ */
ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr,
ntohs(iph->tot_len), (ntohs(iph->tot_len) - (iph->ihl * 4)),
iph->saddr, 0, ipprot); iph->saddr, 0, ipprot);
} }
......
...@@ -2934,9 +2934,6 @@ tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, ...@@ -2934,9 +2934,6 @@ tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
DPRINTF((DBG_TCP, "tcp.c: tcp_rcv dev = NULL\n")); DPRINTF((DBG_TCP, "tcp.c: tcp_rcv dev = NULL\n"));
return(0); return(0);
} }
/* Skip IP-Header */
len -= skb->h.iph->ihl << 2;
skb->h.raw += skb->h.iph->ihl << 2;
th = skb->h.th; th = skb->h.th;
/* Find the socket. */ /* Find the socket. */
......
...@@ -550,9 +550,6 @@ udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, ...@@ -550,9 +550,6 @@ udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
struct sock *sk; struct sock *sk;
struct udphdr *uh; struct udphdr *uh;
/* Skip IP-Header */
len -= skb->h.iph->ihl << 2;
skb->h.raw += skb->h.iph->ihl << 2;
uh = (struct udphdr *) skb->h.uh; uh = (struct udphdr *) skb->h.uh;
sk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr); sk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr);
if (sk == NULL) if (sk == NULL)
......
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