Commit 2d8ead33 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.50

parent 83879d61
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 49
SUBLEVEL = 50
ARCH = i386
......
......@@ -25,7 +25,6 @@ bool 'Assume subnets are local' CONFIG_INET_SNARL y
bool 'Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
fi
bool 'The IPX protocol' CONFIG_IPX n
bool 'RPC connections to old BSD systems' CONFIG_I_AM_A_BROKEN_BSD_WEENIE n
#bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n
fi
......
......@@ -232,7 +232,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
|| major == SCSI_CDROM_MAJOR)
&& (req = blk_dev[major].current_request))
{
if (major == HD_MAJOR)
if (major == HD_MAJOR || major == FLOPPY_MAJOR)
req = req->next;
while (req) {
if (req->dev == bh->b_dev &&
......
......@@ -69,6 +69,7 @@ static XD_SIGNATURE xd_sigs[] = {
{ 0x0008,"06/24/88(C) Copyright 1988 Western Digital Corp.",xd_wd_init_controller,xd_wd_init_drive," Western Digital WDXT-GEN2" }, /* Dan Newcombe, newcombe@aa.csc.peachnet.edu */
{ 0x0015,"SEAGATE ST11 BIOS REVISION",xd_seagate_init_controller,xd_seagate_init_drive," Seagate ST11M/R" }, /* Salvador Abreu, spa@fct.unl.pt */
{ 0x0010,"ST11R BIOS",xd_seagate_init_controller,xd_seagate_init_drive," Seagate ST11M/R" }, /* Risto Kankkunen, risto.kankkunen@cs.helsinki.fi */
{ 0x0010,"ST11 BIOS V1.7",xd_seagate_init_controller,xd_seagate_init_drive," Seagate ST11R" }, /* Alan Hourihane, alanh@fairlite.demon.co.uk */
{ 0x1000,"(c)Copyright 1987 SMS",xd_omti_init_controller,xd_omti_init_drive,"n OMTI 5520" }, /* Dirk Melchers, dirk@merlin.nbg.sub.org */
};
static u_char *xd_bases[] =
......
......@@ -237,7 +237,9 @@ el_open(struct device *dev)
static int
el_start_xmit(struct sk_buff *skb, struct device *dev)
{
unsigned long flags;
save_flags(flags);
if (dev->tbusy) {
if (jiffies - dev->trans_start < 20) {
if (el_debug > 2)
......@@ -251,12 +253,14 @@ el_start_xmit(struct sk_buff *skb, struct device *dev)
#ifdef oldway
el_reset(dev);
#else
cli();
outb(TX_NORM, TX_CMD);
outb(RX_NORM, RX_CMD);
outb(AX_OFF, AX_CMD); /* Just trigger a false interrupt. */
#endif
outb(AX_RX, AX_CMD); /* Aux control, irq and receive enabled */
dev->tbusy = 0;
restore_flags(flags);
dev->trans_start = jiffies;
}
......@@ -269,9 +273,12 @@ el_start_xmit(struct sk_buff *skb, struct device *dev)
return 0;
/* Avoid timer-based retransmission conflicts. */
cli();
if (set_bit(0, (void*)&dev->tbusy) != 0)
{
printk("%s: Transmitter access conflict.\n", dev->name);
else {
restore_flags(flags);
} else {
int gp_start = 0x800 - (ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN);
unsigned char *buf = skb->data;
......@@ -283,6 +290,7 @@ el_start_xmit(struct sk_buff *skb, struct device *dev)
inb(TX_STATUS);
outb(0x00, RX_BUF_CLR); /* Set rx packet area to 0. */
outw(gp_start, GP_LOW);
restore_flags(flags);
outsb(DATAPORT,buf,skb->len);
outw(gp_start, GP_LOW);
outb(AX_XMIT, AX_CMD); /* Trigger xmit. */
......
This diff is collapsed.
......@@ -311,6 +311,7 @@ static void *addresses[] =
(void *) 0xd8000,
(void *) 0xe0000,
(void *) 0xf0000,
(void *) 0xeb800, /* VTech Platinum SMP */
};
#define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned ))
......
......@@ -156,6 +156,7 @@ static struct blist blacklist[] =
{"TEXEL","CD-ROM","1.06"}, /* causes failed REQUEST SENSE on lun 1 for seagate
* controller, which causes SCSI code to reset bus.*/
{"QUANTUM","LPS525S","3110"},/* Locks sometimes if polled for lun != 0 */
{"QUANTUM","PD1225S","3110"},/* Locks sometimes if polled for lun != 0 */
{NULL, NULL, NULL}};
static int blacklisted(unsigned char * response_data){
......
......@@ -11,6 +11,7 @@
* Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source.
* Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* Florian La Roche.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -59,5 +60,28 @@ struct arpreq {
#define ATF_PUBL 0x08 /* publish entry */
#define ATF_USETRAILERS 0x10 /* has requested trailers */
/*
* This structure defines an ethernet arp header.
*/
struct arphdr
{
unsigned short ar_hrd; /* format of hardware address */
unsigned short ar_pro; /* format of protocol address */
unsigned char ar_hln; /* length of hardware address */
unsigned char ar_pln; /* length of protocol address */
unsigned short ar_op; /* ARP opcode (command) */
#if 0
/*
* Ethernet looks like this : This bit is variable sized however...
*/
unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
unsigned char ar_sip[4]; /* sender IP address */
unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
unsigned char ar_tip[4]; /* target IP address */
#endif
};
#endif /* _LINUX_IF_ARP_H */
......@@ -245,6 +245,8 @@ void unmap_fixup(struct vm_area_struct *area,
/* Add end mapping -- leave beginning for below */
mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
if (!mpnt)
return;
*mpnt = *area;
mpnt->vm_offset += (end - area->vm_start);
mpnt->vm_start = end;
......@@ -256,6 +258,8 @@ void unmap_fixup(struct vm_area_struct *area,
/* construct whatever mapping is needed */
mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
if (!mpnt)
return;
*mpnt = *area;
insert_vm_struct(current, mpnt);
}
......
......@@ -30,6 +30,9 @@
* Alan Cox : Drop data when a device is downed.
* Alan Cox : Use init_timer().
* Alan Cox : Double lock fixes.
* Martin Seine : Move the arphdr structure
* to if_arp.h for compatibility
* with BSD based programs.
*/
#include <linux/types.h>
......@@ -86,29 +89,6 @@ struct arp_table
struct sk_buff_head skb; /* list of queued packets */
};
/*
* This structure defines an ethernet arp header.
*/
struct arphdr
{
unsigned short ar_hrd; /* format of hardware address */
unsigned short ar_pro; /* format of protocol address */
unsigned char ar_hln; /* length of hardware address */
unsigned char ar_pln; /* length of protocol address */
unsigned short ar_op; /* ARP opcode (command) */
#if 0
/*
* Ethernet looks like this : This bit is variable sized however...
*/
unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
unsigned char ar_sip[4]; /* sender IP address */
unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
unsigned char ar_tip[4]; /* target IP address */
#endif
};
/*
* Configurable Parameters (don't touch unless you know what you are doing
......
......@@ -87,10 +87,10 @@ register_8022_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct
proto->rcvfunc = rcvfunc;
proto->header_length = 3;
proto->datalink_header = p8022_datalink_header;
}
proto->next = p8022_list;
p8022_list = proto;
proto->next = p8022_list;
p8022_list = proto;
}
return proto;
}
......
......@@ -80,14 +80,12 @@
* Alan Cox : Window clamping
* Michael Riepe : Bug in tcp_check()
* Matt Dillon : More TCP improvements and RST bug fixes
* Matt Dillon : Yet more small nasties remove from the TCP code
* (Be very nice to this man if tcp finally works 100%) 8)
* Alan Cox : BSD accept sematics.
*
*
* To Fix:
* Possibly a problem with accept(). BSD accept never fails after
* it causes a select. Linux can - given the official select semantics I
* feel that _really_ its the BSD network programs that are bust (notably
* inetd, which hangs occasionally because of this).
*
* Fast path the code. Two things here - fix the window calculation
* so it doesn't iterate over the queue, also spot packets with no funny
* options arriving in order and process directly.
......@@ -224,6 +222,40 @@ int tcp_select_window(struct sock *sk)
return(new_window);
}
/*
* Find someone to 'accept'. Must be called with
* sk->inuse=1 or cli()
*/
static struct sk_buff *tcp_find_established(struct sock *s)
{
struct sk_buff *p=skb_peek(&s->receive_queue);
if(p==NULL)
return NULL;
do
{
if(p->sk->state>=TCP_ESTABLISHED)
return p;
p=p->next;
}
while(p!=skb_peek(&s->receive_queue));
return NULL;
}
static struct sk_buff *tcp_dequeue_established(struct sock *s)
{
struct sk_buff *skb;
unsigned long flags;
save_flags(flags);
cli();
skb=tcp_find_established(s);
if(skb!=NULL)
skb_unlink(skb); /* Take it off the queue */
restore_flags(flags);
return skb;
}
/*
* Enter the time wait state.
*/
......@@ -406,7 +438,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
printk("-select out");
if (skb_peek(&sk->receive_queue) != NULL)
{
if (sk->state == TCP_LISTEN || tcp_readable(sk))
if ((sk->state == TCP_LISTEN && tcp_find_established(sk)) || tcp_readable(sk))
{
release_sock(sk);
if(sk->debug)
......@@ -445,12 +477,11 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
}
/*
* FIXME:
* Hack so it will probably be able to write
* something if it says it's ok to write.
* This is now right thanks to a small fix
* by Matt Dillon.
*/
if (sk->prot->wspace(sk) >= sk->mss)
if (sk->prot->wspace(sk) >= sk->mtu+128+sk->prot->max_header)
{
release_sock(sk);
/* This should cause connect to work ok. */
......@@ -2523,15 +2554,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
if (sk->retransmits && sk->timeout == TIME_KEEPOPEN)
sk->retransmits = 0;
#if 0
/*
* Not quite clear why the +1 and -1 here, and why not +1 in next line
*/
if (after(ack, sk->sent_seq+1) || before(ack, sk->rcv_ack_seq-1))
#else
if (after(ack, sk->sent_seq) || before(ack, sk->rcv_ack_seq))
#endif
{
if(sk->debug)
printk("Ack ignored %lu %lu\n",ack,sk->sent_seq);
......@@ -2941,7 +2964,8 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
/*
* Incoming ACK to a FIN we sent in the case of our initiating the close.
*
* Move to FIN_WAIT2 to await a FIN from the other end.
* Move to FIN_WAIT2 to await a FIN from the other end. Set
* SEND_SHUTDOWN but not RCV_SHUTDOWN as data can still be coming in.
*/
if (sk->state == TCP_FIN_WAIT1)
......@@ -2952,13 +2976,15 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
if (sk->rcv_ack_seq == sk->write_seq)
{
flag |= 1;
#ifdef THIS_BIT_IS_WRONG
if (sk->acked_seq != sk->fin_seq)
{
tcp_time_wait(sk);
}
else
#endif
{
sk->shutdown = SHUTDOWN_MASK;
sk->shutdown |= SEND_SHUTDOWN;
tcp_set_state(sk,TCP_FIN_WAIT2);
}
}
......@@ -3065,7 +3091,7 @@ static int tcp_data(struct sk_buff *skb, struct sock *sk,
{
new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */
if(after(new_seq,sk->copied_seq+1)) /* If the right edge of this frame is after the last copied byte
if(after(new_seq,sk->/*copied*/acked_seq+1)) /* If the right edge of this frame is after the last copied byte
then it contains data we will never touch. We send an RST to
ensure the far end knows it never got to the application */
{
......@@ -3448,6 +3474,7 @@ static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th,
*/
reset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
/*sk->fin_seq = th->seq+1;*/
sk->shutdown|=SHUTDOWN_MASK;
tcp_set_state(sk,TCP_TIME_WAIT);
break;
case TCP_CLOSE:
......@@ -3490,7 +3517,7 @@ tcp_accept(struct sock *sk, int flags)
cli();
sk->inuse = 1;
while((skb = skb_dequeue(&sk->receive_queue)) == NULL)
while((skb = tcp_dequeue_established(sk)) == NULL)
{
if (flags & O_NONBLOCK)
{
......
......@@ -17,6 +17,7 @@
* top level.
* Alan Cox : Move address structures to/from user
* mode above the protocol layers.
* Rob Janssen : Allow 0 length sends
*
*
* This program is free software; you can redistribute it and/or
......@@ -924,8 +925,6 @@ static int sock_send(int fd, void * buff, int len, unsigned flags)
if(len<0)
return -EINVAL;
if(len==0)
return 0;
err=verify_area(VERIFY_READ, buff, len);
if(err)
return err;
......@@ -953,8 +952,6 @@ static int sock_sendto(int fd, void * buff, int len, unsigned flags,
if(len<0)
return -EINVAL;
if(len==0)
return 0;
err=verify_area(VERIFY_READ,buff,len);
if(err)
return err;
......
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