VERSION = 2
PATCHLEVEL = 2
SUBLEVEL = 21
-EXTRAVERSION = rc3
+EXTRAVERSION = rc4
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
--- /dev/null
+/* ld script to make i386 Linux kernel
+ * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
+ */
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+ENTRY(_start)
+SECTIONS
+{
+ . = 0xC0000000 + 0x100000;
+ _text = .; /* Text and read-only data */
+ .text : {
+ *(.text)
+ *(.fixup)
+ *(.gnu.warning)
+ } = 0x9090
+ .text.lock : { *(.text.lock) } /* out-of-line lock text */
+ .rodata : { *(.rodata) }
+ .kstrtab : { *(.kstrtab) }
+
+ . = ALIGN(16); /* Exception table */
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
+
+ __start___ksymtab = .; /* Kernel symbol table */
+ __ksymtab : { *(__ksymtab) }
+ __stop___ksymtab = .;
+
+ _etext = .; /* End of text section */
+
+ .data : { /* Data */
+ *(.data)
+ CONSTRUCTORS
+ }
+
+ _edata = .; /* End of data section */
+
+ . = ALIGN(8192); /* init_task */
+ .data.init_task : { *(.data.init_task) }
+
+ . = ALIGN(4096); /* Init code and data */
+ __init_begin = .;
+ .text.init : { *(.text.init) }
+ .data.init : { *(.data.init) }
+ . = ALIGN(16); /* __setup() commandline parameters */
+ __setup_start = .;
+ .setup.init : { *(.setup.init) }
+ __setup_end = .;
+ __initcall_start = .; /* the init functions to be called */
+ .initcall.init : { *(.initcall.init) }
+ __initcall_end = .;
+ . = ALIGN(4096);
+ __init_end = .;
+
+
+ . = ALIGN(32);
+ .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+ . = ALIGN(4096);
+ .data.page_aligned : { *(.data.idt) }
+
+
+ __bss_start = .; /* BSS */
+ .bss : {
+ *(.bss)
+ }
+ _end = . ;
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+}
/* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux.
Copyright 1999 Silicon Integrated System Corporation
- Revision: 1.06.10 Feb 28 2002
+ Revision: 1.06.11 Apr. 30 2002
Modified from the driver which is originally written by Donald Becker.
preliminary Rev. 1.0 Jan. 18, 1998
http://www.sis.com.tw/support/databook.htm
- Rev 1.06.10 Feb. 28 2002 Allan Jacobsen (aj@2m.dk) Made RTL8201 PHY work on ECS K7S5A
- Rev 1.06.09 Sep. 28 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) update for 630ET & workaround for ICS1893 PHY
+ Rev 1.06.11 Apr. 25 2002 Mufasa Yang (mufasa@sis.com.tw) added SiS962 support
+ Rev 1.06.10 Dec. 18 2001 Hui-Fen Hsu workaround for EDB & RTL8201 PHY
+ Rev 1.06.09 Sep. 28 2001 Hui-Fen Hsu update for 630ET & workaround for ICS1893 PHY
Rev 1.06.08 Mar. 2 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) some bug fix & 635M/B support
Rev 1.06.07 Jan. 8 2001 Lei-Chun Chang added RTL8201 PHY support
Rev 1.06.06 Sep. 6 2000 Lei-Chun Chang added ICS1893 PHY support
#include "sis900.h"
static const char *version =
-"sis900.c: v1.06.10 02/28/2002\n";
+"sis900.c: v1.06.11 4/30/2002\n";
static int max_interrupt_work = 20;
static int multicast_filter_limit = 128;
{ "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME},
{ "ICS LAN PHY", 0x0015, 0xF440, LAN },
{ "NS 83851 PHY", 0x2000, 0x5C20, MIX },
- { "Realtek RTL8201 PHY", 0x0000, 0x8200, LAN },
+ { "Realtek RTL8201 PHY", 0x0000, 0x8200, LAN },
{0,},
};
return 1;
}
+
+/**
+ * sis962_get_mac_addr: - Get MAC address for SiS962 model
+ * @pci_dev: the sis900 pci device
+ * @net_dev: the net device to get address for
+ *
+ * SiS962 model, use EEPROM to store MAC address. And EEPROM is shared by
+ * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first
+ * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access
+ * by LAN, otherwise is not. After MAC address is read from EEPROM, send
+ * EEDONE signal to refuse EEPROM access by LAN.
+ * MAC address is read into @net_dev->dev_addr.
+ */
+
+static int sis962_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev)
+{
+
+ long ioaddr = net_dev->base_addr;
+ long ee_addr = ioaddr + mear;
+ u32 waittime = 0;
+ int ret = 0;
+
+ outl(EEREQ, ee_addr);
+ while(waittime < 2000) {
+ if(inl(ee_addr) & EEGNT) {
+ ret = sis900_get_mac_addr(pci_dev, net_dev);
+ outl(EEDONE, ee_addr);
+ return(ret);
+ } else {
+ udelay(1);
+ waittime ++;
+ }
+ }
+ outl(EEDONE, ee_addr);
+ return 0;
+}
+
static struct device * sis900_mac_probe (struct mac_chip_info * mac, struct pci_dev * pci_dev,
struct device * net_dev)
{
ret = sis630e_get_mac_addr(pci_dev, net_dev);
else if ((revision > 0x81) && (revision <= 0x90))
ret = sis635_get_mac_addr(pci_dev, net_dev);
+ else if (revision == SIS962_900_REV)
+ ret = sis962_get_mac_addr(pci_dev, net_dev);
else
ret = sis900_get_mac_addr(pci_dev, net_dev);
net_dev->interrupt = 0;
net_dev->start = 1;
+ /* Workaround for EDB */
+ sis900_set_mode(ioaddr, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED);
+
/* Enable all known interrupts by setting the interrupt mask. */
outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
outl(RxENA | inl(ioaddr + cr), ioaddr + cr);
autorec = mdio_read(net_dev, phy_addr, MII_ANLPAR);
status = autoadv & autorec;
+ *speed = HW_SPEED_10_MBPS;
+ *duplex = FDX_CAPABLE_HALF_SELECTED;
+
if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX))
*speed = HW_SPEED_100_MBPS;
- else
- *speed = HW_SPEED_10_MBPS;
if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX))
*duplex = FDX_CAPABLE_FULL_SELECTED;
- else
- *duplex = FDX_CAPABLE_HALF_SELECTED;
sis_priv->autong_complete = 1;
-
+
/* Workaround for Realtek RTL8201 PHY issue */
if((phy->phy_id0 == 0x0000) && ((phy->phy_id1 & 0xFFF0) == 0x8200)){
if(mdio_read(net_dev, phy_addr, MII_CONTROL) & MII_CNTL_FDX)
if(mdio_read(net_dev, phy_addr, 0x0019) & 0x01)
*speed = HW_SPEED_100_MBPS;
}
-
+
printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
net_dev->name,
*speed == HW_SPEED_100_MBPS ?
}
/* leave 8 or 7 most siginifant bits */
- if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV))
+ if((revision >= SIS635A_900_REV) || (revision == SIS900B_900_REV))
return ((int)(crc >> 24));
else
return ((int)(crc >> 25));
/* 635 Hash Table entires = 256(2^16) */
pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
- if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV))
+ if((revision >= SIS635A_900_REV) || (revision == SIS900B_900_REV))
table_entries = 16;
else
table_entries = 8;
}
pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
- if( (revision == SIS635A_900_REV) || (revision == SIS900B_900_REV) )
+ if( (revision >= SIS635A_900_REV) || (revision == SIS900B_900_REV) )
outl(PESEL | RND_CNT, ioaddr + cfg);
else
outl(PESEL, ioaddr + cfg);
EEaddrMask = 0x013F, EEcmdShift = 16
};
+/* For SiS962, request the eeprom software access */
+enum sis962_eeprom_command {
+ EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100
+};
+
/* Manamgement Data I/O (mdio) frame */
#define MIIread 0x6000
#define MIIwrite 0x5002
SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81,
SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83,
SIS630ET_900_REV = 0x84, SIS635A_900_REV = 0x90,
- SIS900B_900_REV = 0x03
+ SIS962_900_REV = 0X91, SIS900B_900_REV = 0x03
};
enum sis630_revision_id {
*
* Borrows code from st driver. Thanks to Alessandro Rubini's "dd" book.
*/
- static char * sg_version_str = "Version: 2.1.40 (20010620)";
- static int sg_version_num = 20140; /* 2 digits for each component */
+ static char * sg_version_str = "Version: 2.1.41 (20020409)";
+ static int sg_version_num = 20141; /* 2 digits for each component */
/*
* D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes:
* - scsi logging is available via SCSI_LOG_TIMEOUT macros. First
return resp;
if (SG_HEAP_KMAL == mem_src) {
resp = kmalloc(rqSz, page_mask);
- if (resp && retSzp) *retSzp = rqSz;
+ if (resp) {
+ if (! capable(CAP_SYS_ADMIN))
+ memset(resp, 0, rqSz);
+ if (retSzp) *retSzp = rqSz;
#ifdef SG_DEBUG
- if (resp) ++sg_num_kmal;
+ ++sg_num_kmal;
#endif
+ }
return resp;
}
if (SG_HEAP_POOL == mem_src) {
(scsi_dma_free_sectors > (SG_LOW_POOL_THRESHHOLD + num_sect))) {
resp = scsi_malloc(rqSz);
if (resp) {
+ if (! capable(CAP_SYS_ADMIN))
+ memset(resp, 0, rqSz);
if (retSzp) *retSzp = rqSz;
sg_pool_secs_avail -= num_sect;
#ifdef SG_DEBUG
resp = (char *)__get_free_pages(page_mask, order); /* try half */
resSz = a_size;
}
- if (retSzp) *retSzp = resSz;
+ if (resp) {
+ if (! capable(CAP_SYS_ADMIN))
+ memset(resp, 0, resSz);
+ if (retSzp) *retSzp = resSz;
#ifdef SG_DEBUG
- if (resp) ++sg_num_page;
+ ++sg_num_page;
#endif
+ }
}
else
printk("sg_low_malloc: bad mem_src=%d, rqSz=%df\n", mem_src, rqSz);
#define KDGETLED 0x4B31 /* return current led state */
#define KDSETLED 0x4B32 /* set led state [lights, not flags] */
#define LED_SCR 0x01 /* scroll lock led */
-#define LED_CAP 0x04 /* caps lock led */
#define LED_NUM 0x02 /* num lock led */
+#define LED_CAP 0x04 /* caps lock led */
#define KDGKBTYPE 0x4B33 /* get keyboard type */
#define KB_84 0x01
#define KDSKBMETA 0x4B63 /* sets meta key handling mode */
#define K_SCROLLLOCK 0x01
-#define K_CAPSLOCK 0x02
-#define K_NUMLOCK 0x04
+#define K_NUMLOCK 0x02
+#define K_CAPSLOCK 0x04
#define KDGKBLED 0x4B64 /* get led flags (not lights) */
-#define KDSKBLED 0x4B65 /* set led flags (not lights) */
+#define KDSKBLED 0x4B65 /* set led flags (not lights) */
struct kbentry {
unsigned char kb_table;
2.x extensions to driver:
* Copyright (C) 1998 - 2001 Douglas Gilbert
- Version: 2.1.40 (20010620)
+ Version: 2.1.41 (20020409)
This version for 2.2.x series kernels
D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au)
+ Changes since 2.1.40 (20010620)
+ - zero buffers for non-root users
Changes since 2.1.38 (20000626)
- fix bug that caused long wait when large buffer requested
Changes since 2.1.38 (20000527)
+++ /dev/null
-From: Paul Mackerras <paulus@samba.org>
-Date: Tue, 19 Mar 2002 16:01:22 +1100 (EST)
-To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org
-Subject: Re: [PATCH] zlib double-free bug
-
-Someone pointed me at a previously-posted patch for the zlib
-vulnerability. While I was looking at that patch I realized that both
-that patch and mine were buggy in different ways. My patch was
-freeing s->sub.trees.blens after that word had been overwritten by an
-assignment to s->sub.decode.codes, whereas with the previously-posted
-patch, it is still possible to get a double-free (if inflate_codes_new
-returns NULL, it will leave s->mode == DTREE but s->sub.trees.blens
-has already been freed).
-
-Here is a new patch which should fix both those problems.
-
-Paul.
-
-diff -urN linux-2.4.19-pre3/arch/ppc/boot/lib/zlib.c pmac/arch/ppc/boot/lib/zlib.c
---- linux-2.4.19-pre3/arch/ppc/boot/lib/zlib.c Mon Mar 18 13:34:47 2002
-+++ pmac/arch/ppc/boot/lib/zlib.c Tue Mar 19 15:46:09 2002
-@@ -1,5 +1,5 @@
- /*
-- * BK Id: SCCS/s.zlib.c 1.10 01/11/02 10:46:07 trini
-+ * BK Id: SCCS/s.zlib.c 1.9 12/05/01 16:19:42 mporter
- */
- /*
- * This file is derived from various .h and .c files from the zlib-0.95
-@@ -928,7 +928,10 @@
- {
- r = t;
- if (r == Z_DATA_ERROR)
-+ {
-+ ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
- s->mode = BADB;
-+ }
- LEAVE
- }
- s->sub.trees.index = 0;
-@@ -964,6 +967,7 @@
- if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
- (c == 16 && i < 1))
- {
-+ ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
- s->mode = BADB;
- z->msg = "invalid bit length repeat";
- r = Z_DATA_ERROR;
-@@ -991,7 +995,10 @@
- if (t != Z_OK)
- {
- if (t == (uInt)Z_DATA_ERROR)
-+ {
-+ ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
- s->mode = BADB;
-+ }
- r = t;
- LEAVE
- }
-diff -urN linux-2.4.19-pre3/drivers/net/zlib.c pmac/drivers/net/zlib.c
---- linux-2.4.19-pre3/drivers/net/zlib.c Sat Apr 28 23:02:45 2001
-+++ pmac/drivers/net/zlib.c Tue Mar 19 15:45:40 2002
-@@ -14,7 +14,7 @@
- */
-
- /*
-- * ==FILEVERSION 971210==
-+ * ==FILEVERSION 20020318==
- *
- * This marker is used by the Linux installation script to determine
- * whether an up-to-date version of this file is already installed.
-@@ -772,7 +772,7 @@
- windowBits = -windowBits;
- }
- if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-- windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-+ windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
- return Z_STREAM_ERROR;
- }
-@@ -3860,10 +3860,12 @@
- &s->sub.trees.tb, z);
- if (t != Z_OK)
- {
-- ZFREE(z, s->sub.trees.blens);
- r = t;
- if (r == Z_DATA_ERROR)
-+ {
-+ ZFREE(z, s->sub.trees.blens);
- s->mode = BADB;
-+ }
- LEAVE
- }
- s->sub.trees.index = 0;
-@@ -3928,11 +3930,13 @@
- #endif
- t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
- s->sub.trees.blens, &bl, &bd, &tl, &td, z);
-- ZFREE(z, s->sub.trees.blens);
- if (t != Z_OK)
- {
- if (t == (uInt)Z_DATA_ERROR)
-+ {
-+ ZFREE(z, s->sub.trees.blens);
- s->mode = BADB;
-+ }
- r = t;
- LEAVE
- }
-@@ -3945,6 +3949,7 @@
- r = Z_MEM_ERROR;
- LEAVE
- }
-+ ZFREE(z, s->sub.trees.blens);
- s->sub.decode.codes = c;
- s->sub.decode.tl = tl;
- s->sub.decode.td = td;
-diff -urN linux-2.4.19-pre3/fs/jffs2/zlib.c pmac/fs/jffs2/zlib.c
---- linux-2.4.19-pre3/fs/jffs2/zlib.c Mon Sep 24 09:31:33 2001
-+++ pmac/fs/jffs2/zlib.c Tue Mar 19 15:46:47 2002
-@@ -14,7 +14,7 @@
- */
-
- /*
-- * ==FILEVERSION 971210==
-+ * ==FILEVERSION 20020318==
- *
- * This marker is used by the Linux installation script to determine
- * whether an up-to-date version of this file is already installed.
-@@ -772,7 +772,7 @@
- windowBits = -windowBits;
- }
- if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-- windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-+ windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
- return Z_STREAM_ERROR;
- }
-@@ -3860,10 +3860,12 @@
- &s->sub.trees.tb, z);
- if (t != Z_OK)
- {
-- ZFREE(z, s->sub.trees.blens);
- r = t;
- if (r == Z_DATA_ERROR)
-+ {
-+ ZFREE(z, s->sub.trees.blens);
- s->mode = BADB;
-+ }
- LEAVE
- }
- s->sub.trees.index = 0;
-@@ -3928,11 +3930,13 @@
- #endif
- t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
- s->sub.trees.blens, &bl, &bd, &tl, &td, z);
-- ZFREE(z, s->sub.trees.blens);
- if (t != Z_OK)
- {
- if (t == (uInt)Z_DATA_ERROR)
-+ {
-+ ZFREE(z, s->sub.trees.blens);
- s->mode = BADB;
-+ }
- r = t;
- LEAVE
- }
-@@ -3945,6 +3949,7 @@
- r = Z_MEM_ERROR;
- LEAVE
- }
-+ ZFREE(z, s->sub.trees.blens);
- s->sub.decode.codes = c;
- s->sub.decode.tl = tl;
- s->sub.decode.td = td;
--
-To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-Please read the FAQ at http://www.tux.org/lkml/
-