Commit cbb79dc1 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.22

parent 466add5a
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 21
SUBLEVEL = 22
all: Version zImage
......
......@@ -70,10 +70,10 @@ comment 'Network device support'
bool 'Network device support?' CONFIG_NETDEVICES y
if [ "$CONFIG_NETDEVICES" = "n" ]; then
comment 'Skipping ethercard configuration options...'
comment 'Skipping network driver configuration options...'
else
bool 'Dummy net driver support' CONFIG_DUMMY y
bool 'Dummy net driver support' CONFIG_DUMMY n
bool 'SLIP (serial line) support' CONFIG_SLIP n
if [ "$CONFIG_SLIP" = "y" ]; then
bool ' CSLIP compressed headers' SL_COMPRESSED y
......@@ -81,29 +81,49 @@ if [ "$CONFIG_SLIP" = "y" ]; then
fi
bool 'PPP (point-to-point) support' CONFIG_PPP n
bool 'Load balancing support (experimental)' CONFIG_SLAVE_BALANCING n
bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
bool 'WD80*3 support' CONFIG_WD80x3 n
bool 'SMC Ultra support' CONFIG_ULTRA n
fi
bool '3COM cards' CONFIG_NET_VENDOR_3COM y
if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
bool '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool '3c505 support' CONFIG_ELPLUS n
bool '3c507 support' CONFIG_EL16 n
fi
bool '3c509/3c579 support' CONFIG_EL3 y
fi
bool 'Other ISA cards' CONFIG_NET_ISA n
if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE y
bool 'Cabletron E21xx support (not recommended)' CONFIG_E2100 n
bool 'DEPCA support' CONFIG_DEPCA n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool 'EtherExpress support' CONFIG_EEXPRESS n
fi
bool 'HP PCLAN support' CONFIG_HPLAN n
bool 'NE2000/NE1000 support' CONFIG_NE2000 n
fi
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'NE2000/NE1000 support' CONFIG_NE2000 n
bool 'WD80*3 support' CONFIG_WD80x3 n
bool 'SMC Ultra support' CONFIG_ULTRA n
bool '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 n
#bool '3c505 support' CONFIG_ELPLUS n
#bool '3c507 support' CONFIG_EL16 n
bool '3c509/3c579 support' CONFIG_EL3 y
bool 'HP PCLAN support' CONFIG_HPLAN n
bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE n
bool 'AT1700 support' CONFIG_AT1700 n
#bool 'Zenith Z-Note support' CONFIG_ZNET n
#bool 'EtherExpress support' CONFIG_EEXPRESS n
#bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
bool 'DEPCA support' CONFIG_DEPCA n
bool 'EISA and on board controllers' CONFIG_NET_EISA n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
bool 'AT1700 support' CONFIG_AT1700 n
fi
bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
#bool 'NI52EE support' CONFIG_NI52 n
#bool 'NI65EE support' CONFIG_NI65 n
#bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
#bool 'Cabletron E21xx support (not recommended)' CONFIG_E2100 n
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
if [ "$CONFIG_NET_POCKET" = "y" ]; then
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
bool 'Zenith Z-Note support' CONFIG_ZNET n
fi
fi
fi
......
......@@ -655,8 +655,10 @@ static void hd_geninit(void)
hd_info[drive].ctl = *(8+BIOS);
hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
hd_info[drive].sect = *(14+BIOS);
#ifdef does_not_work_for_everybody_with_scsi_but_helps_ibm_vp
if (hd_info[drive].cyl && NR_HD == drive)
NR_HD++;
#endif
BIOS += 16;
}
......
......@@ -133,6 +133,8 @@ static struct {
/* mode flags */
unsigned long vc_charset : 1; /* Character set G0 / G1 */
unsigned long vc_s_charset : 1; /* Saved character set */
unsigned long vc_disp_ctrl : 1; /* Display chars < 32? */
unsigned long vc_toggle_meta : 1; /* Toggle high bit? */
unsigned long vc_decscnm : 1; /* Screen Mode */
unsigned long vc_decom : 1; /* Origin Mode */
unsigned long vc_decawm : 1; /* Autowrap Mode */
......@@ -185,6 +187,8 @@ static int console_blanked = 0;
#define video_mem_start (vc_cons[currcons].vc_video_mem_start)
#define video_mem_end (vc_cons[currcons].vc_video_mem_end)
#define video_erase_char (vc_cons[currcons].vc_video_erase_char)
#define disp_ctrl (vc_cons[currcons].vc_disp_ctrl)
#define toggle_meta (vc_cons[currcons].vc_toggle_meta)
#define decscnm (vc_cons[currcons].vc_decscnm)
#define decom (vc_cons[currcons].vc_decom)
#define decawm (vc_cons[currcons].vc_decawm)
......@@ -682,6 +686,33 @@ static void csi_m(int currcons)
case 7:
reverse = 1;
break;
case 10: /* ANSI X3.64-1979 (SCO-ish?)
* Select primary font, don't display
* control chars if defined, don't set
* bit 8 on output.
*/
translate = (charset == 0
? G0_charset
: G1_charset);
disp_ctrl = 0;
toggle_meta = 0;
break;
case 11: /* ANSI X3.64-1979 (SCO-ish?)
* Select first alternate font, let's
* chars < 32 be displayed as ROM chars.
*/
translate = NULL_TRANS;
disp_ctrl = 1;
toggle_meta = 0;
break;
case 12: /* ANSI X3.64-1979 (SCO-ish?)
* Select second alternate font, toggle
* high bit before displaying as ROM char.
*/
translate = NULL_TRANS;
disp_ctrl = 1;
toggle_meta = 1;
break;
case 21:
case 22:
intensity = 1;
......@@ -695,8 +726,21 @@ static void csi_m(int currcons)
case 27:
reverse = 0;
break;
case 39:
case 38: /* ANSI X3.64-1979 (SCO-ish?)
* Enables underscore, white foreground
* with white underscore (Linux - use
* default foreground).
*/
color = (def_color & 0x0f) | background;
underline = 1;
break;
case 39: /* ANSI X3.64-1979 (SCO-ish?)
* Disable underline option.
* Reset colour to default? It did this
* before...
*/
color = (def_color & 0x0f) | background;
underline = 0;
break;
case 49:
color = (def_color & 0xf0) | foreground;
......@@ -957,6 +1001,9 @@ static void reset_terminal(int currcons, int do_clear)
charset = 0;
need_wrap = 0;
disp_ctrl = 0;
toggle_meta = 0;
decscnm = 0;
decom = 0;
decawm = 1;
......@@ -1026,7 +1073,11 @@ static int con_write(struct tty_struct * tty, int from_user,
while (!tty->stopped && count) {
c = from_user ? get_fs_byte(buf) : *buf;
buf++; n++; count--;
if (vc_state == ESnormal && translate[c]) {
if (vc_state == ESnormal
&& (c >= 32 || (disp_ctrl && (c&0x7f) != 27))
&& (toggle_meta ? translate[c|0x80] : translate[c])) {
if (toggle_meta)
c |= 0x80;
if (need_wrap) {
cr(currcons);
lf(currcons);
......
This diff is collapsed.
/*****************************************************************
*
* defines for 3Com Etherlink Plus adapter
*
*****************************************************************/
/*
* I/O register offsets
*/
#define PORT_COMMAND 0x00 /* read/write */
#define PORT_STATUS 0x02 /* read only */
#define PORT_AUXDMA 0x02 /* write only */
#define PORT_DATA 0x04 /* read/write */
#define PORT_CONTROL 0x06 /* read/write */
/*
* host control registers bits
*/
#define CONTROL_ATTN 0x80 /* attention */
#define CONTROL_FLSH 0x40 /* flush data register */
#define CONTROL_DMAE 0x20 /* DMA enable */
#define CONTROL_DIR 0x10 /* direction */
#define CONTROL_TCEN 0x08 /* terminal count interrupt enable */
#define CONTROL_CMDE 0x04 /* command register interrupt enable */
#define CONTROL_HSF2 0x02 /* host status flag 2 */
#define CONTROL_HSF1 0x01 /* host status flag 1 */
/*
* combinations of HSF flags used for PCB transmission
*/
#define HSF_PCB_ACK (CONTROL_HSF1)
#define HSF_PCB_NAK (CONTROL_HSF2)
#define HSF_PCB_END (CONTROL_HSF2|CONTROL_HSF1)
#define HSF_PCB_MASK (CONTROL_HSF2|CONTROL_HSF1)
/*
* host status register bits
*/
#define STATUS_HRDY 0x80 /* data register ready */
#define STATUS_HCRE 0x40 /* command register empty */
#define STATUS_ACRF 0x20 /* adapter command register full */
#define STATUS_DIR 0x10 /* direction */
#define STATUS_DONE 0x08 /* DMA done */
#define STATUS_ASF3 0x04 /* adapter status flag 3 */
#define STATUS_ASF2 0x02 /* adapter status flag 2 */
#define STATUS_ASF1 0x01 /* adapter status flag 1 */
/*
* combinations of ASF flags used for PCB reception
*/
#define ASF_PCB_ACK (STATUS_ASF1)
#define ASF_PCB_NAK (STATUS_ASF2)
#define ASF_PCB_END (STATUS_ASF2|STATUS_ASF1)
#define ASF_PCB_MASK (STATUS_ASF2|STATUS_ASF1)
/*
* host aux DMA register bits
*/
#define AUXDMA_BRST 0x01 /* DMA burst */
/*
* maximum amount of data data allowed in a PCB
*/
#define MAX_PCB_DATA 62
/*****************************************************************
*
* timeout value
* this is a rough value used for loops to stop them from
* locking up the whole machine in the case of failure or
* error conditions
*
*****************************************************************/
#define TIMEOUT 10000
/*****************************************************************
*
* PCB commands
*
*****************************************************************/
enum {
/*
* host PCB commands
*/
CMD_CONFIGURE_ADAPTER_MEMORY = 0x01,
CMD_CONFIGURE_82586 = 0x02,
CMD_STATION_ADDRESS = 0x03,
CMD_DMA_DOWNLOAD = 0x04,
CMD_DMA_UPLOAD = 0x05,
CMD_PIO_DOWNLOAD = 0x06,
CMD_PIO_UPLOAD = 0x07,
CMD_RECEIVE_PACKET = 0x08,
CMD_TRANSMIT_PACKET = 0x09,
CMD_NETWORK_STATISTICS = 0x0a,
CMD_LOAD_MULTICAST_LIST = 0x0b,
CMD_CLEAR_PROGRAM = 0x0c,
CMD_DOWNLOAD_PROGRAM = 0x0d,
CMD_EXECUTE_PROGRAM = 0x0e,
CMD_SELF_TEST = 0x0f,
CMD_SET_STATION_ADDRESS = 0x10,
CMD_ADAPTER_INFO = 0x11,
/*
* adapter PCB commands
*/
CMD_CONFIGURE_ADAPTER_RESPONSE = 0x31,
CMD_CONFIGURE_82586_RESPONSE = 0x32,
CMD_ADDRESS_RESPONSE = 0x33,
CMD_DOWNLOAD_DATA_REQUEST = 0x34,
CMD_UPLOAD_DATA_REQUEST = 0x35,
CMD_RECEIVE_PACKET_COMPLETE = 0x38,
CMD_TRANSMIT_PACKET_COMPLETE = 0x39,
CMD_NETWORK_STATISTICS_RESPONSE = 0x3a,
CMD_LOAD_MULTICAST_RESPONSE = 0x3b,
CMD_CLEAR_PROGRAM_RESPONSE = 0x3c,
CMD_DOWNLOAD_PROGRAM_RESPONSE = 0x3d,
CMD_EXECUTE_RESPONSE = 0x3e,
CMD_SELF_TEST_RESPONSE = 0x3f,
CMD_SET_ADDRESS_RESPONSE = 0x40,
CMD_ADAPTER_INFO_RESPONSE = 0x41
};
......@@ -94,7 +94,9 @@ int el3_probe(struct device *dev)
/* First check for a board on the EISA bus. */
if (EISA_bus) {
for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) {
static int eisa_addr;
for (ioaddr=0x1000 ; ioaddr < 0x9000; ioaddr += 0x1000) {
eisa_addr = ioaddr;
/* Check the standard EISA ID register for an encoded '3Com'. */
if (inw(ioaddr + 0xC80) != 0x6d50)
continue;
......
/* ac3200.c: A driver for the Ansel Communications EISA ethernet adaptor. */
/*
Written 1993, 1994 by Donald Becker.
Copyright 1993 United States Government as represented by the Director,
National Security Agency. This software may only be used and distributed
according to the terms of the GNU Public License as modified by SRC,
incorporated herein by reference.
The author may be reached as becker@cesdis.gsfc.nasa.gov, or
C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
This is driver for the Ansel Communications Model 3200 EISA Ethernet LAN
Adapter. The programming information is from the users manual, as related
by glee@ardnassak.math.clemson.edu.
*/
static char *version =
"ac3200.c:v0.03 2/6/94 Donald Becker (becker@super.org)\n";
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <asm/system.h>
#include <asm/io.h>
#include <linux/netdevice.h>
#include "8390.h"
/* Offsets from the base address. */
#define AC_NIC_BASE 0x00
#define AC_SA_PROM 0x16 /* The station address PROM. */
#define AC_ADDR0 0x00 /* Prefix station address values. */
#define AC_ADDR1 0x40 /* !!!!These are just guesses!!!! */
#define AC_ADDR2 0x90
#define AC_ID_PORT 0xC80
#define AC_EISA_ID 0x0110d305
#define AC_RESET_PORT 0xC84
#define AC_RESET 0x00
#define AC_ENABLE 0x01
#define AC_CONFIG 0xC90 /* The configuration port. */
/* Decoding of the configuration register. */
static unsigned char config2irqmap[8] = {15, 12, 11, 10, 9, 7, 5, 3};
static int addrmap[8] =
{0xFF0000, 0xFE0000, 0xFD0000, 0xFFF0000, 0xFFE0000, 0xFFC0000, 0xD0000, 0 };
static char *port_name[4] = { "10baseT", "invalid", "AUI", "10base2"};
#define config2irq(configval) config2irqmap[((configval) >> 3) & 7]
#define config2mem(configval) addrmap[(configval) & 7]
#define config2name(configval) port_name[((configval) >> 6) & 3]
/* First and last 8390 pages. */
#define AC_START_PG 0x00 /* First page of 8390 TX buffer */
#define AC_STOP_PG 0x80 /* Last page +1 of the 8390 RX ring */
int ac3200_probe(struct device *dev);
static int ac_probe1(int ioaddr, struct device *dev);
static int ac_open(struct device *dev);
static void ac_reset_8390(struct device *dev);
static int ac_block_input(struct device *dev, int count,
char *buf, int ring_offset);
static void ac_block_output(struct device *dev, const int count,
const unsigned char *buf, const int start_page);
static int ac_close_card(struct device *dev);
/* Probe for the AC3200.
The AC3200 can be identified by either the EISA configuration registers,
or the unique value in the station address PROM.
*/
int ac3200_probe(struct device *dev)
{
unsigned short ioaddr = dev->base_addr;
if (ioaddr > 0x1ff) /* Check a single specified location. */
return ac_probe1(ioaddr, dev);
else if (ioaddr > 0) /* Don't probe at all. */
return ENXIO;
/* If you have a pre-pl15 machine you should delete this line. */
if ( ! EISA_bus)
return ENXIO;
for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000)
if (ac_probe1(ioaddr, dev) == 0)
return 0;
return ENODEV;
}
static int ac_probe1(int ioaddr, struct device *dev)
{
int i;
#ifndef final_version
printk("AC3200 ethercard probe at %#3x:", ioaddr);
for(i = 0; i < 6; i++)
printk(" %02x", inb(ioaddr + AC_SA_PROM + i));
#endif
/* !!!!The values of AC_ADDRn (see above) should be corrected when we
find out the correct station address prefix!!!! */
if (inb(ioaddr + AC_SA_PROM + 0) != AC_ADDR0
|| inb(ioaddr + AC_SA_PROM + 1) != AC_ADDR1
|| inb(ioaddr + AC_SA_PROM + 2) != AC_ADDR2 ) {
#ifndef final_version
printk(" not found (invalid prefix).\n");
#endif
return ENODEV;
}
/* The correct probe method is to check the EISA ID. */
for (i = 0; i < 4; i++)
if (inl(ioaddr + AC_ID_PORT) != AC_EISA_ID) {
printk("EISA ID mismatch, %8x vs %8x.\n",
inl(ioaddr + AC_EISA_ID), AC_EISA_ID);
return ENODEV;
}
for(i = 0; i < ETHER_ADDR_LEN; i++)
dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i);
#ifndef final_version
printk("\nAC3200 ethercard configuration register is %#02x,"
" EISA ID %02x %02x %02x %02x.\n", inb(ioaddr + AC_CONFIG),
inb(ioaddr + AC_ID_PORT + 0), inb(ioaddr + AC_ID_PORT + 1),
inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3));
#endif
/* Assign and snarf the interrupt now. */
if (dev->irq == 0)
dev->irq = config2irq(inb(ioaddr + AC_CONFIG));
else if (dev->irq == 2)
dev->irq = 9;
if (irqaction (dev->irq, &ei_sigaction)) {
printk (" unable to get IRQ %d.\n", dev->irq);
return 0;
}
dev->base_addr = ioaddr;
#ifdef notyet
if (dev->mem_start) { /* Override the value from the board. */
for (i = 0; i < 7; i++)
if (addrmap[i] == dev->mem_start)
break;
if (i >= 7)
i = 0;
outb((inb(ioaddr + AC_CONFIG) & ~7) | i, ioaddr + AC_CONFIG);
}
#endif
dev->if_port = inb(ioaddr + AC_CONFIG) >> 6;
dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG));
dev->rmem_start = dev->mem_start + TX_PAGES*256;
dev->mem_end = dev->rmem_end = dev->mem_start
+ (AC_STOP_PG - AC_START_PG)*256;
ethdev_init(dev);
ei_status.name = "AC3200";
ei_status.tx_start_page = AC_START_PG;
ei_status.rx_start_page = AC_START_PG + TX_PAGES;
ei_status.stop_page = AC_STOP_PG;
ei_status.word16 = 1;
printk("\n%s: AC3200 at %#x, IRQ %d, %s port, shared memory at %#x-%#x.\n",
dev->name, ioaddr, dev->irq, port_name[dev->if_port],
dev->mem_start, dev->mem_end-1);
if (ei_debug > 0)
printk(version);
ei_status.reset_8390 = &ac_reset_8390;
ei_status.block_input = &ac_block_input;
ei_status.block_output = &ac_block_output;
dev->open = &ac_open;
dev->stop = &ac_close_card;
NS8390_init(dev, 0);
return 0;
}
static int ac_open(struct device *dev)
{
#ifdef notyet
/* Someday we may enable the IRQ and shared memory here. */
int ioaddr = dev->base_addr;
if (irqaction(dev->irq, &ei_sigaction))
return -EAGAIN;
#endif
return ei_open(dev);
}
static void ac_reset_8390(struct device *dev)
{
ushort ioaddr = dev->base_addr;
outb(AC_RESET, ioaddr + AC_RESET_PORT);
if (ei_debug > 1) printk("resetting AC3200, t=%d...", jiffies);
ei_status.txing = 0;
outb(AC_ENABLE, ioaddr + AC_RESET_PORT);
if (ei_debug > 1) printk("reset done\n");
return;
}
/* Block input and output are easy on shared memory ethercards, the only
complication is when the ring buffer wraps. */
static int ac_block_input(struct device *dev, int count, char *buf,
int ring_offset)
{
long xfer_start = dev->mem_start + ring_offset - (AC_START_PG<<8);
if (xfer_start + count > dev->rmem_end) {
/* We must wrap the input move. */
int semi_count = dev->rmem_end - xfer_start;
memcpy(buf, (char*)xfer_start, semi_count);
count -= semi_count;
memcpy(buf + semi_count, (char *)dev->rmem_start, count);
return dev->rmem_start + count;
}
memcpy(buf, (char*)xfer_start, count);
return ring_offset + count;
}
static void ac_block_output(struct device *dev, int count,
const unsigned char *buf, int start_page)
{
long shmem = dev->mem_start + ((start_page - AC_START_PG)<<8);
memcpy((unsigned char *)shmem, buf, count);
}
static int ac_close_card(struct device *dev)
{
dev->start = 0;
dev->tbusy = 1;
if (ei_debug > 1)
printk("%s: Shutting down ethercard.\n", dev->name);
#ifdef notyet
/* We should someday disable shared memory and interrupts. */
outb(0x00, ioaddr + 6); /* Disable interrupts. */
free_irq(dev->irq);
irq2dev_map[dev->irq] = 0;
#endif
NS8390_init(dev, 0);
return 0;
}
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c ac3200.c"
* version-control: t
* kept-new-versions: 5
* tab-width: 4
* End:
*/
This diff is collapsed.
......@@ -14,7 +14,9 @@
#define DEPCA_RBI ioaddr+0x02 /* RAM buffer index (2k buffer mode) */
#define DEPCA_DATA ioaddr+0x04 /* LANCE registers' data port */
#define DEPCA_ADDR ioaddr+0x06 /* LANCE registers' address port */
#define DEPCA_HBASE ioaddr+0x08 /* EISA high memory base address reg. */
#define DEPCA_PROM ioaddr+0x0c /* Ethernet address ROM data port */
#define DEPCA_CNFG ioaddr+0x0c /* EISA Configuration port */
#define DEPCA_RBSA ioaddr+0x0e /* RAM buffer starting address (2k buff.) */
/*
......@@ -35,6 +37,7 @@
#define BUF 0x0020 /* BUFfer size (1->32k, 0->64k) */
#define RBE 0x0010 /* Remote Boot Enable (1->net boot) */
#define AAC 0x0008 /* Address ROM Address Counter (1->enable) */
#define _128KB 0x0008 /* 128kB Network RAM (1->enable) */
#define IM 0x0004 /* Interrupt Mask (1->mask) */
#define IEN 0x0002 /* Interrupt tristate ENable (1->enable) */
#define LED 0x0001 /* LED control */
......@@ -119,6 +122,20 @@
#define TMD3_LCAR 0x0800 /* Loss of CARrier */
#define TMD3_RTRY 0x0400 /* ReTRY error */
/*
** EISA configuration Register (CNFG) bit definitions
*/
#define TIMEOUT 0x0100 /* 0:2.5 mins, 1: 30 secs */
#define REMOTE 0x0080 /* Remote Boot Enable -> 1 */
#define IRQ11 0x0040 /* Enable -> 1 */
#define IRQ10 0x0020 /* Enable -> 1 */
#define IRQ9 0x0010 /* Enable -> 1 */
#define IRQ5 0x0008 /* Enable -> 1 */
#define BUFF 0x0004 /* 0: 64kB or 128kB, 1: 32kB */
#define PADR16 0x0002 /* RAM on 64kB boundary */
#define PADR17 0x0001 /* RAM on 128kB boundary */
/*
** Miscellaneous
*/
......@@ -126,3 +143,6 @@
#define MASK_INTERRUPTS 1
#define UNMASK_INTERRUPTS 0
#define EISA_EN 0x0001 /* Enable EISA bus buffers */
#define DEPCA_EISA_ID ioaddr+0x80 /* ID long word for EISA card */
#define DEPCA_EISA_CTRL ioaddr+0x84 /* Control word for EISA card */
This diff is collapsed.
......@@ -128,7 +128,7 @@ loopback_init(struct device *dev)
#endif
/* New-style flags. */
dev->flags = IFF_LOOPBACK;
dev->flags = IFF_LOOPBACK|IFF_BROADCAST;
dev->family = AF_INET;
#ifdef CONFIG_INET
dev->pa_addr = in_aton("127.0.0.1");
......
This diff is collapsed.
......@@ -142,6 +142,7 @@ static struct blist blacklist[] =
{"MAXTOR","XT-4380S","B3C"}, /* Locks-up when LUN>0 polled. */
{"MAXTOR","MXT-1240S","I1.2"}, /* Locks up when LUN > 0 polled */
{"MAXTOR","XT-4170S","B5A"}, /* Locks-up sometimes when LUN>0 polled. */
{"MAXTOR","XT-8760S","B6B"}, /* Locks-up when LUN > 0 is polled */
{"MAXTOR","XT-8760S","B7B"}, /* guess what? */
{"NEC","CD-ROM DRIVE:841","1.0"}, /* Locks-up when LUN>0 polled. */
{"RODIME","RO3000S","2.33"}, /* Locks up if polled for lun != 0 */
......
......@@ -37,6 +37,7 @@
#define ARPHRD_CSLIP6 259
#define ARPHRD_RSRVD 260 /* Notional KISS type */
#define ARPHRD_ADAPT 264
#define ARPHRD_PPP 512
/* ARP protocol opcodes. */
#define ARPOP_REQUEST 1 /* ARP request */
......
......@@ -22,6 +22,7 @@
/* This structure gets passed by the SIOCADDRTOLD and SIOCDELRTOLD calls. */
struct old_rtentry {
unsigned long rt_genmask;
struct sockaddr rt_dst;
......@@ -44,7 +45,8 @@ struct rtentry {
struct ifnet *rt_ifp;
short rt_metric; /* +1 for binary compatibility! */
char *rt_dev; /* forcing the device at add */
unsigned long rt_mtu; /* per route MTU/Window */
unsigned long rt_mss; /* per route MTU/Window */
unsigned long rt_window; /* Window clamping */
};
......@@ -54,5 +56,14 @@ struct rtentry {
#define RTF_REINSTATE 0x0008 /* re-instate route after tmout */
#define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */
#define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */
#define RTF_MTU 0x0040 /* specific MSS for this route */
#define RTF_MSS 0x0040 /* specific MSS for this route */
#define RTF_WINDOW 0x0080 /* per route window clamping */
/*
* REMOVE THESE BY 1.2.0 !!!!!!!!!!!!!!!!!
*/
#define RTF_MTU RTF_MSS
#define rt_mtu rt_mss
#endif /* _LINUX_ROUTE_H */
......@@ -45,6 +45,8 @@
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/segment.h>
#include <asm/segment.h>
/*
* Define this if things work differently on a i386 and a i486:
......@@ -678,6 +680,13 @@ int verify_area(int type, const void * addr, unsigned long size)
{
struct vm_area_struct * vma;
/* If the current user space is mapped to kernel space (for the
* case where we use a fake user buffer with get_fs/set_fs()) we
* don't expect to find the address in the user vm map.
*/
if (get_fs() == get_ds())
return 0;
for (vma = current->mm->mmap ; ; vma = vma->vm_next) {
if (!vma)
goto bad_area;
......
3c509.o de600.o 3c501.o plip.o
3c509.o de600.o de620.o 3c501.o plip.o
......@@ -839,7 +839,7 @@ static int inet_connect(struct socket *sock, struct sockaddr * uaddr,
int err;
sock->conn = NULL;
if (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
if (sock->state == SS_CONNECTING && tcp_connected(sk->state))
{
sock->state = SS_CONNECTED;
/* Connection completing after a connect/EINPROGRESS/select/connect */
......
......@@ -308,7 +308,7 @@ static void icmp_redirect(struct icmphdr *icmph, struct sk_buff *skb,
*/
#ifdef not_a_good_idea
ip_rt_add((RTF_DYNAMIC | RTF_MODIFIED | RTF_GATEWAY),
ip, 0, icmph->un.gateway, dev,0);
ip, 0, icmph->un.gateway, dev,0, 0);
break;
#endif
case ICMP_REDIR_HOST:
......@@ -324,7 +324,7 @@ static void icmp_redirect(struct icmphdr *icmph, struct sk_buff *skb,
break;
printk("redirect from %08lx\n", source);
ip_rt_add((RTF_DYNAMIC | RTF_MODIFIED | RTF_HOST | RTF_GATEWAY),
ip, 0, icmph->un.gateway, dev,0);
ip, 0, icmph->un.gateway, dev,0, 0);
break;
case ICMP_REDIR_NETTOS:
case ICMP_REDIR_HOSTTOS:
......
......@@ -1523,8 +1523,8 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
#ifdef CONFIG_IP_FORWARD
ip_forward(skb, dev, is_frag);
#else
printk("Machine %lx tried to use us as a forwarder to %lx but we have forwarding disabled!\n",
iph->saddr,iph->daddr);
/* printk("Machine %lx tried to use us as a forwarder to %lx but we have forwarding disabled!\n",
iph->saddr,iph->daddr);*/
ip_statistics.IpInAddrErrors++;
#endif
/*
......
......@@ -26,6 +26,7 @@
* identification, support for local net 0 and
* multiple datalinks <Greg Page>
* Revision 0.26: Device drop kills IPX routes via it. (needed for modules)
* Revision 0.27: Autobind <Mark Evans>
*
*
*
......@@ -640,18 +641,11 @@ static int ipx_release(struct socket *sock, struct socket *peer)
static unsigned short first_free_socketnum(void)
{
static unsigned short socketNum = 0x4000;
unsigned short startNum, foundNum = 0;
startNum = socketNum;
do {
if (ipx_find_socket(htons(socketNum)) == NULL) {
foundNum = socketNum;
}
socketNum++;
while (ipx_find_socket(htons(socketNum)) != NULL)
if (socketNum > 0x7ffc) socketNum = 0x4000;
} while (!foundNum && (socketNum != startNum));
return htons(foundNum);
return htons(socketNum++);
}
static int ipx_bind(struct socket *sock, struct sockaddr *uaddr,int addr_len)
......@@ -736,9 +730,17 @@ static int ipx_connect(struct socket *sock, struct sockaddr *uaddr,
return(-EINVAL);
addr=(struct sockaddr_ipx *)uaddr;
if(sk->ipx_source_addr.net==0) /* Must bind first - no autobinding in this */
return -EINVAL;
if(sk->ipx_source_addr.net==0)
/* put the autobinding in */
{
struct sockaddr_ipx uaddr;
int ret;
uaddr.sipx_port = 0;
uaddr.sipx_network = 0L;
ret = ipx_bind (sock, (struct sockaddr *)&uaddr, sizeof(struct sockaddr_ipx));
if (ret != 0) return (ret);
}
sk->ipx_dest_addr.net=addr->sipx_network;
sk->ipx_dest_addr.sock=addr->sipx_port;
......@@ -970,6 +972,18 @@ static int ipx_sendto(struct socket *sock, void *ubuf, int len, int noblock,
if(usipx)
{
if(sk->ipx_source_addr.net==0)
/* put the autobinding in */
{
struct sockaddr_ipx uaddr;
int ret;
uaddr.sipx_port = 0;
uaddr.sipx_network = 0L;
ret = ipx_bind (sock, (struct sockaddr *)&uaddr, sizeof(struct sockaddr_ipx));
if (ret != 0) return (ret);
}
if(addr_len <sizeof(*usipx))
return(-EINVAL);
if(usipx->sipx_family != AF_IPX)
......
......@@ -21,6 +21,8 @@
* Alan Cox : Added BSD route gw semantics
* Alan Cox : Super /proc >4K
* Alan Cox : MTU in route table
* Alan Cox : MSS actually. Also added the window
* clamper.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -195,7 +197,7 @@ static inline struct device * get_gw_dev(unsigned long gw)
*/
void ip_rt_add(short flags, unsigned long dst, unsigned long mask,
unsigned long gw, struct device *dev, unsigned short mtu)
unsigned long gw, struct device *dev, unsigned short mtu, unsigned long window)
{
struct rtable *r, *rt;
struct rtable **rp;
......@@ -267,12 +269,16 @@ void ip_rt_add(short flags, unsigned long dst, unsigned long mask,
rt->rt_dev = dev;
rt->rt_gateway = gw;
rt->rt_mask = mask;
rt->rt_mtu = dev->mtu;
rt->rt_mss = dev->mtu - HEADER_SIZE;
rt->rt_window = 0; /* Default is no clamping */
/* Are the MSS/Window valid ? */
if(rt->rt_flags & RTF_MTU)
rt->rt_mtu = mtu;
if(rt->rt_flags & RTF_MSS)
rt->rt_mss = mtu;
if(rt->rt_flags & RTF_WINDOW)
rt->rt_window = window;
/*
* What we have to do is loop though this until we have
......@@ -449,7 +455,7 @@ static int rt_new(struct rtentry *r)
* Add the route
*/
ip_rt_add(flags, daddr, mask, gw, dev, r->rt_mtu);
ip_rt_add(flags, daddr, mask, gw, dev, r->rt_mss, r->rt_window);
return 0;
}
......@@ -481,7 +487,7 @@ int rt_get_info(char *buffer, char **start, off_t offset, int length)
int size;
len += sprintf(buffer,
"Iface\tDestination\tGateway \tFlags\tRefCnt\tUse\tMetric\tMask\tMTU\n");
"Iface\tDestination\tGateway \tFlags\tRefCnt\tUse\tMetric\tMask\t\tMTU\tWindow\n");
pos=len;
/*
......@@ -490,10 +496,10 @@ int rt_get_info(char *buffer, char **start, off_t offset, int length)
for (r = rt_base; r != NULL; r = r->rt_next)
{
size = sprintf(buffer+len, "%s\t%08lX\t%08lX\t%02X\t%d\t%lu\t%d\t%08lX\t%d\n",
size = sprintf(buffer+len, "%s\t%08lX\t%08lX\t%02X\t%d\t%lu\t%d\t%08lX\t%d\t%lu\n",
r->rt_dev->name, r->rt_dst, r->rt_gateway,
r->rt_flags, r->rt_refcnt, r->rt_use, r->rt_metric,
r->rt_mask, (int)r->rt_mtu);
r->rt_mask, (int)r->rt_mss, r->rt_window);
len+=size;
pos+=size;
if(pos<offset)
......
......@@ -36,14 +36,15 @@ struct rtable
unsigned char rt_metric;
short rt_refcnt;
unsigned long rt_use;
unsigned short rt_mss, rt_mtu;
unsigned short rt_mss;
unsigned long rt_window;
struct device *rt_dev;
};
extern void ip_rt_flush(struct device *dev);
extern void ip_rt_add(short flags, unsigned long addr, unsigned long mask,
unsigned long gw, struct device *dev, unsigned short);
unsigned long gw, struct device *dev, unsigned short mss, unsigned long window);
extern struct rtable *ip_rt_route(unsigned long daddr, struct options *opt, unsigned long *src_addr);
extern struct rtable *ip_rt_local(unsigned long daddr, struct options *opt, unsigned long *src_addr);
extern int rt_get_info(char * buffer, char **start, off_t offset, int length);
......
......@@ -109,6 +109,7 @@ struct sock {
volatile unsigned short mss; /* current eff. mss - can change */
volatile unsigned short user_mss; /* mss requested by user in ioctl */
volatile unsigned short max_window;
unsigned long window_clamp;
unsigned short num;
volatile unsigned short cong_window;
volatile unsigned short cong_count;
......
......@@ -76,6 +76,9 @@
* Alan Cox : Move to kernel side addressing changes.
* Alan Cox : Beginning work on TCP fastpathing (not yet usable)
* Arnt Gulbrandsen: Turbocharged tcp_check() routine.
* Alan Cox : TCP fast path debugging
* Alan Cox : Window clamping
* Michael Riepe : Bug in tcp_check()
*
*
* To Fix:
......@@ -152,7 +155,7 @@
#include <asm/segment.h>
#include <linux/mm.h>
#define TCP_FASTPATH
#undef TCP_FASTPATH
#define SEQ_TICK 3
unsigned long seq_offset;
......@@ -183,8 +186,6 @@ static __inline__ int min(unsigned int a, unsigned int b)
in order to get the data we are waiting for into the memory limit.
Secondly we bin common duplicate forms at receive time
TODO: add sk->window_clamp to limit windows over the DE600 and AX.25
Better heuristics welcome
*/
......@@ -192,6 +193,8 @@ int tcp_select_window(struct sock *sk)
{
int new_window = sk->prot->rspace(sk);
if(sk->window_clamp)
new_window=min(sk->window_clamp,new_window);
/*
* two things are going on here. First, we don't ever offer a
* window less than min(sk->mss, MAX_WINDOW/2). This is the
......@@ -565,8 +568,7 @@ unsigned short tcp_check(struct tcphdr *th, int len,
adcl $0, %%ebx
movl %%edx, %%ecx
2: andl $28, %%ecx
cmpl $4, %%ecx
jb 4f
je 4f
shrl $2, %%ecx
clc
3: lodsl
......@@ -578,11 +580,13 @@ unsigned short tcp_check(struct tcphdr *th, int len,
je 5f
lodsw
addl %%eax, %%ebx
adcl $0, %%ebx
movw $0, %%ax
5: test $1, %%edx
je 6f
lodsb
addl %%eax, %%ebx
adcl $0, %%ebx
6: movl %%ebx, %%eax
shrl $16, %%eax
addw %%ax, %%bx
......@@ -2024,10 +2028,16 @@ static void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
*/
rt=ip_rt_route(saddr, NULL,NULL);
if(rt!=NULL && (rt->rt_flags&RTF_WINDOW))
sk->window_clamp=rt->rt_window;
else
sk->window_clamp=0;
if (sk->user_mss)
newsk->mtu = sk->user_mss;
else if(rt!=NULL && (rt->rt_flags&RTF_MTU))
newsk->mtu = rt->rt_mtu - HEADER_SIZE;
else if(rt!=NULL && (rt->rt_flags&RTF_MSS))
newsk->mtu = rt->rt_mss - HEADER_SIZE;
else
{
#ifdef CONFIG_INET_SNARL /* Sub Nets ARe Local */
......@@ -2270,6 +2280,7 @@ static void tcp_close(struct sock *sk, int timeout)
sizeof(struct tcphdr),sk->ip_tos,sk->ip_ttl);
if (tmp < 0)
{
sk->write_seq++; /* Very important 8) */
kfree_skb(buff,FREE_WRITE);
/*
......@@ -2481,12 +2492,18 @@ 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);
if (after(ack, sk->sent_seq) ||
(sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT))
{
......@@ -2841,6 +2858,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
if (sk->state == TCP_FIN_WAIT1)
{
if (!sk->dead)
sk->state_change(sk);
if (sk->rcv_ack_seq == sk->write_seq)
......@@ -2866,6 +2884,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
if (sk->state == TCP_CLOSING)
{
if (!sk->dead)
sk->state_change(sk);
if (sk->rcv_ack_seq == sk->write_seq)
......@@ -2974,10 +2993,12 @@ static int tcp_data(struct sk_buff *skb, struct sock *sk,
sk->state_change(sk);
return(0);
}
#if 0
/* Discard the frame here - we've already proved its a duplicate */
kfree_skb(skb, FREE_READ);
return(0);
#endif
}
/*
* Now we have to walk the chain, and figure out where this one
......@@ -3523,11 +3544,16 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
t1->urg_ptr = 0;
t1->doff = 6;
/* use 512 or whatever user asked for */
if(rt!=NULL && (rt->rt_flags&RTF_WINDOW))
sk->window_clamp=rt->rt_window;
else
sk->window_clamp=0;
if (sk->user_mss)
sk->mtu = sk->user_mss;
else if(rt!=NULL && rt->rt_flags&RTF_MTU)
sk->mtu = rt->rt_mtu;
else if(rt!=NULL && (rt->rt_flags&RTF_MTU))
sk->mtu = rt->rt_mss;
else
{
#ifdef CONFIG_INET_SNARL
......@@ -3779,7 +3805,7 @@ tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
*/
/* Im trusting gcc to optimise this sensibly... might need judicious application of a software mallet */
if(!(sk->shutdown & RCV_SHUTDOWN) && sk->state==TCP_ESTABLISHED && !th->urg && !th->syn && !th->fin && !th->rst && !th->urg)
if(!(sk->shutdown & RCV_SHUTDOWN) && sk->state==TCP_ESTABLISHED && !th->urg && !th->syn && !th->fin && !th->rst)
{
/* Packets in order. Fits window */
if(th->seq == sk->acked_seq+1 && sk->window && tcp_clean_end(sk))
......@@ -3804,7 +3830,7 @@ tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
sk->window-=skb->len; /* We know its effect on the window */
else
sk->window=0;
sk->acked_seq = th->ack_seq; /* Easy */
sk->acked_seq = th->seq+skb->len; /* Easy */
skb->acked=1; /* Guaranteed true */
if(!sk->delay_acks || sk->ack_backlog >= sk->max_ack_backlog ||
sk->bytes_rcv > sk->max_unacked)
......@@ -3939,17 +3965,18 @@ tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
return(0);
}
if (th->fin && tcp_fin(skb, sk, th, saddr, dev)) {
kfree_skb(skb, FREE_READ);
release_sock(sk);
return(0);
}
if (tcp_data(skb, sk, saddr, len)) {
kfree_skb(skb, FREE_READ);
release_sock(sk);
return(0);
}
if (th->fin && tcp_fin(skb, sk, th, saddr, dev)) {
kfree_skb(skb, FREE_READ);
release_sock(sk);
return(0);
}
release_sock(sk);
return(0);
......
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