Commit 55415e93 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.91

parent 40820e9a
...@@ -682,6 +682,11 @@ S: Stresemannstr. 62 ...@@ -682,6 +682,11 @@ S: Stresemannstr. 62
S: 10963 Berlin S: 10963 Berlin
S: Germany S: Germany
N: Ken Pizzini
E: ken@halcyon.com
D: CDROM driver "sonycd535" (Sony CDU-535/531)
S:
N: Stefan Probst N: Stefan Probst
E: snprobst@immd4.informatik.uni-erlangen.de E: snprobst@immd4.informatik.uni-erlangen.de
D: The Linux Support Team Erlangen D: The Linux Support Team Erlangen
......
VERSION = 1 VERSION = 1
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 90 SUBLEVEL = 91
ARCH = i386 ARCH = i386
......
...@@ -46,15 +46,6 @@ void show_regs(struct pt_regs * regs) ...@@ -46,15 +46,6 @@ void show_regs(struct pt_regs * regs)
printk("\nPS: %04lx PC: %016lx\n", regs->ps, regs->pc); printk("\nPS: %04lx PC: %016lx\n", regs->ps, regs->pc);
} }
/*
* Do necessary setup to start up a newly executed thread.
*/
void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
{
regs->pc = pc;
wrusp(sp);
}
/* /*
* Free current thread data structures etc.. * Free current thread data structures etc..
*/ */
......
...@@ -43,7 +43,7 @@ comment 'Networking options' ...@@ -43,7 +43,7 @@ comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" = "y" ]; then if [ "$CONFIG_INET" = "y" ]; then
bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n
bool 'IP multicasting (ALPHA)' CONFIG_IP_MULTICAST n bool 'IP multicasting' CONFIG_IP_MULTICAST n
bool 'IP firewalling' CONFIG_IP_FIREWALL n bool 'IP firewalling' CONFIG_IP_FIREWALL n
bool 'IP accounting' CONFIG_IP_ACCT n bool 'IP accounting' CONFIG_IP_ACCT n
comment '(it is safe to leave these untouched)' comment '(it is safe to leave these untouched)'
...@@ -119,7 +119,6 @@ if [ "$CONFIG_SLIP" = "y" ]; then ...@@ -119,7 +119,6 @@ if [ "$CONFIG_SLIP" = "y" ]; then
fi fi
bool 'PPP (point-to-point) support' CONFIG_PPP n bool 'PPP (point-to-point) support' CONFIG_PPP n
bool 'PLIP (parallel port) support' CONFIG_PLIP n bool 'PLIP (parallel port) support' CONFIG_PLIP 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 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
...@@ -162,7 +161,7 @@ if [ "$CONFIG_NET_EISA" = "y" ]; then ...@@ -162,7 +161,7 @@ if [ "$CONFIG_NET_EISA" = "y" ]; then
bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
fi fi
bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
bool 'DE425, DE434, DE435 support' CONFIG_DE4x5 n bool 'DE425, DE434, DE435 support' CONFIG_DE4X5 n
# bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n # bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n # bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n # bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
...@@ -195,6 +194,7 @@ if [ "$CONFIG_SBPCD" = "y" ]; then ...@@ -195,6 +194,7 @@ if [ "$CONFIG_SBPCD" = "y" ]; then
fi fi
fi fi
bool 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n bool 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n
bool 'Sony CDU535 CDROM driver support' CONFIG_CDU535 n
comment 'Filesystems' comment 'Filesystems'
...@@ -210,7 +210,7 @@ bool '/proc filesystem support' CONFIG_PROC_FS y ...@@ -210,7 +210,7 @@ bool '/proc filesystem support' CONFIG_PROC_FS y
if [ "$CONFIG_INET" = "y" ]; then if [ "$CONFIG_INET" = "y" ]; then
bool 'NFS filesystem support' CONFIG_NFS_FS y bool 'NFS filesystem support' CONFIG_NFS_FS y
fi fi
if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_AZTCD" = "y" ]; then if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_AZTCD" = "y" -o "$CONFIG_CDU535" = "y" ]; then
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
else else
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
......
...@@ -113,17 +113,6 @@ void show_regs(struct pt_regs * regs) ...@@ -113,17 +113,6 @@ void show_regs(struct pt_regs * regs)
0xffff & regs->fs,0xffff & regs->gs); 0xffff & regs->fs,0xffff & regs->gs);
} }
/*
* Do necessary setup to start up a newly executed thread.
*/
void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp)
{
regs->cs = USER_CS;
regs->ds = regs->es = regs->ss = regs->fs = regs->gs = USER_DS;
regs->eip = eip;
regs->esp = esp;
}
/* /*
* Free current thread data structures etc.. * Free current thread data structures etc..
*/ */
......
...@@ -79,6 +79,11 @@ OBJS := $(OBJS) xd.o ...@@ -79,6 +79,11 @@ OBJS := $(OBJS) xd.o
SRCS := $(SRCS) xd.c SRCS := $(SRCS) xd.c
endif endif
ifdef CONFIG_CDU535
OBJS := $(OBJS) sonycd535.o
SRCS := $(SRCS) sonycd535.c
endif
all: block.a all: block.a
block.a: $(OBJS) block.a: $(OBJS)
......
...@@ -71,7 +71,7 @@ restore the default behaviour. ...@@ -71,7 +71,7 @@ restore the default behaviour.
Tells the floppy driver that you don't have a Thinkpad. Tells the floppy driver that you don't have a Thinkpad.
floppy=<drive>,<type>,cmos floppy=<drive>,<type>,cmos
Sets the cmos type of <drive> to <type>. Additionnaly, this drive is Sets the cmos type of <drive> to <type>. Additionally, this drive is
allowed in the bitmask. This is useful if you have more than two allowed in the bitmask. This is useful if you have more than two
floppy drives (only two can be described in the physical cmos), or if floppy drives (only two can be described in the physical cmos), or if
your BIOS uses non-standard CMOS types. The CMOS types are: your BIOS uses non-standard CMOS types. The CMOS types are:
......
README FOR LINUX SONY CDU-535/531 DRIVER
========================================
This is the the Sony CDU-535 (and 531) driver version 0.7 for Linux.
I do not think I have the documentation to add features like DMA support
so if anyone else wants to pursue it or help me with it, please do.
(I need to see what was done for the CDU-31A driver -- perhaps I can
steal some of that code.)
This is a Linux device driver for the Sony CDU-535 CDROM drive. This is
one of the older Sony drives with its own interface card (Sony bus).
The DOS driver for this drive is named SONY_CDU.SYS - when you boot DOS
your drive should be identified as a SONY CDU-535. The driver works
with a CDU-531 also. One user reported that the driver worked on drives
OEM'ed by Procomm, drive and interface board were labelled Procomm.
The Linux driver is based on Corey Minyard's sonycd 0.3 driver for
the CDU-31A. Ron Jeppesen just changed the commands that were sent
to the drive to correspond to the CDU-535 commands and registers.
There were enough changes to let bugs creep in but it seems to be stable.
Ron was able to tar an entire CDROM (should read all blocks) and built
ghostview and xfig off Walnut Creek's X11R5/GNU CDROM. xcdplayer and
workman work with the driver. Others have used the driver without
problems except those dealing with wait loops (fixed in third release).
Like Minyard's original driver this one uses a polled interface (this
is also the default setup for the DOS driver). It has not been tried
with interrupts or DMA enabled on the board.
REQUIREMENTS
============
- Sony CDU-535 drive, preferably without interrupts and DMA
enabled on the card.
- Drive must be set up as unit 1. Only the first unit will be
recognized
- you must enter your interface address into
/usr/src/linux/include/linux/sonycd535.h and build the
appropriate kernel or use the "kernel command line" parameter
sonycd535=0x320
with the correct interface address.
NOTES:
======
1) The drive MUST be turned on when booting or it will not be recognized!
(but see comments on modulized version below)
2) when the cdrom device is opened the eject button is disabled to keep the
user from ejecting a mounted disk and replacing it with another.
Unfortunately xcdplayer and workman also open the cdrom device so you
have to use the eject button in the software. Keep this in mind if your
cdrom player refuses to give up its disk -- exit workman or xcdplayer, or
umount the drive if it has been mounted.
THANKS
======
Many thanks to Ron Jeppesen (ronj.an@site007.saic.com) for getting
this project off the ground. He wrote the initial release and
the first two patches to this driver (0.1, 0.2, and 0.3).
(aknowlegements from Ron Jeppesen in the 0.3 release:)
Thanks to Corey Minyard who wrote the original CDU-31A driver on which
this driver is based. Thanks to Ken Pizzini and Bob Blair who provided
patches and feedback on the first release of this driver.
Ken Pizzini
ken@halcyon.com
------------------------------------------------------------------------------
(The following is from Joel Katz <Stimpson@Panix.COM>.)
To build a version of sony535.o that can be installed as a module,
use the following command:
gcc -c -D__KERNEL__ -DMODULE -O2 sonycd535.c -o sonycd535.o
To install the module, simply type:
insmod sony535.o
And to remove it:
rmmod sony535
The code checks to see if MODULE is defined and behaves as it used
to if MODULE is not defined. That means your patched file should behave
exactly as it used to if compiled into the kernel.
I have an externel drive, and I usually leave it powered off. I used
to have to reboot if I needed to use the CDROM drive. Now I don't.
Even if you have an internal drive, why waste the 268K of memory
(unswappable) that the driver uses if you use your CD-ROM drive infrequently?
This driver will not install (whether compiled in or loaded as a
module) if the CDROM drive is not available during its initialization. This
means that you can have the driver compiled into the kernel and still load
the module later (assuming the driver doesn't install itself during
power-on). This only wastes 12K when you boot with the CDROM drive off.
This is what I usually do; I leave the driver compiled into the
kernel, but load it as a module if I powered the system up with the drive
off and then later decided to use the CDROM drive.
Since the driver only uses a single page to point to the chunks,
attempting to set the buffer cache to more than 2 Megabytes would be very
bad; don't do that.
...@@ -47,6 +47,9 @@ extern unsigned long mcd_init(unsigned long mem_start, unsigned long mem_end); ...@@ -47,6 +47,9 @@ extern unsigned long mcd_init(unsigned long mem_start, unsigned long mem_end);
#ifdef CONFIG_AZTCD #ifdef CONFIG_AZTCD
extern unsigned long aztcd_init(unsigned long mem_start, unsigned long mem_end); extern unsigned long aztcd_init(unsigned long mem_start, unsigned long mem_end);
#endif #endif
#ifdef CONFIG_CDU535
extern unsigned long sony535_init(unsigned long mem_start, unsigned long mem_end);
#endif
#ifdef CONFIG_BLK_DEV_HD #ifdef CONFIG_BLK_DEV_HD
extern unsigned long hd_init(unsigned long mem_start, unsigned long mem_end); extern unsigned long hd_init(unsigned long mem_start, unsigned long mem_end);
#endif #endif
...@@ -181,6 +184,15 @@ static void floppy_off(unsigned int nr); ...@@ -181,6 +184,15 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device) #define DEVICE_ON(device)
#define DEVICE_OFF(device) #define DEVICE_OFF(device)
#elif (MAJOR_NR == CDU535_CDROM_MAJOR)
#define DEVICE_NAME "SONY-CDU535"
#define DEVICE_INTR do_cdu535
#define DEVICE_REQUEST do_cdu535_request
#define DEVICE_NR(device) (MINOR(device))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR) #elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR)
#define DEVICE_NAME "Matsushita CD-ROM controller #1" #define DEVICE_NAME "Matsushita CD-ROM controller #1"
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
#include <linux/config.h> #include <linux/config.h>
/* do print messages for unexpected interupts */ /* do print messages for unexpected interrupts */
static int print_unex=1; static int print_unex=1;
#ifndef FD_MODULE #ifndef FD_MODULE
...@@ -3205,7 +3205,7 @@ static char get_fdc_version(void) ...@@ -3205,7 +3205,7 @@ static char get_fdc_version(void)
/* we make the invert_dcl function global. One day, somebody might /* we make the invert_dcl function global. One day, somebody might
want to centralize all thinkpad related options into one lilo option, want to centralize all thinkpad related options into one lilo option,
there are just so many thinpad related quirks! */ there are just so many thinkpad related quirks! */
void floppy_invert_dcl(int *ints,int param) void floppy_invert_dcl(int *ints,int param)
{ {
int i; int i;
......
...@@ -399,6 +399,9 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bh[]) ...@@ -399,6 +399,9 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bh[])
int correct_size; int correct_size;
struct blk_dev_struct * dev; struct blk_dev_struct * dev;
int i; int i;
#if defined(CONFIG_CDU535) && defined(CONFIG_CDU31A)
int sonycd_save_mem_start;
#endif
/* Make sure that the first block contains something reasonable */ /* Make sure that the first block contains something reasonable */
while (!*bh) { while (!*bh) {
...@@ -542,9 +545,24 @@ long blk_dev_init(long mem_start, long mem_end) ...@@ -542,9 +545,24 @@ long blk_dev_init(long mem_start, long mem_end)
#ifdef CONFIG_BLK_DEV_XD #ifdef CONFIG_BLK_DEV_XD
mem_start = xd_init(mem_start,mem_end); mem_start = xd_init(mem_start,mem_end);
#endif #endif
#if defined(CONFIG_CDU535) && defined(CONFIG_CDU31A)
{ /* since controllers for 535 and 31A can be at same location
* we have to be careful.
*/
sonycd_save_mem_start = mem_start;
mem_start = cdu31a_init(mem_start,mem_end);
if ( mem_start == sonycd_save_mem_start ) { /* CDU31A not found */
mem_start = sony535_init(mem_start,mem_end);
}
}
#else
#ifdef CONFIG_CDU31A #ifdef CONFIG_CDU31A
mem_start = cdu31a_init(mem_start,mem_end); mem_start = cdu31a_init(mem_start,mem_end);
#endif #endif
#ifdef CONFIG_CDU535
mem_start = sony535_init(mem_start,mem_end);
#endif
#endif /* CONFIG_CDU31A && CONFIG_CDU535 */
#ifdef CONFIG_MCD #ifdef CONFIG_MCD
mem_start = mcd_init(mem_start,mem_end); mem_start = mcd_init(mem_start,mem_end);
#endif #endif
......
This diff is collapsed.
...@@ -91,7 +91,8 @@ unsigned char kbd_read_mask = 0x01; /* modified by psaux.c */ ...@@ -91,7 +91,8 @@ unsigned char kbd_read_mask = 0x01; /* modified by psaux.c */
/* shift state counters.. */ /* shift state counters.. */
static unsigned char k_down[NR_SHIFT] = {0, }; static unsigned char k_down[NR_SHIFT] = {0, };
/* keyboard key bitmap */ /* keyboard key bitmap */
static unsigned long key_down[8] = { 0, }; #define BITS_PER_LONG (8*sizeof(unsigned long))
static unsigned long key_down[256/BITS_PER_LONG] = { 0, };
extern int last_console; extern int last_console;
static int want_console = -1; static int want_console = -1;
...@@ -954,8 +955,8 @@ void compute_shiftstate(void) ...@@ -954,8 +955,8 @@ void compute_shiftstate(void)
for(i=0; i < SIZE(key_down); i++) for(i=0; i < SIZE(key_down); i++)
if(key_down[i]) { /* skip this word if not a single bit on */ if(key_down[i]) { /* skip this word if not a single bit on */
k = (i<<5); k = i*BITS_PER_LONG;
for(j=0; j<32; j++,k++) for(j=0; j<BITS_PER_LONG; j++,k++)
if(test_bit(k, key_down)) { if(test_bit(k, key_down)) {
sym = U(plain_map[k]); sym = U(plain_map[k]);
if(KTYP(sym) == KT_SHIFT) { if(KTYP(sym) == KT_SHIFT) {
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
# DE4x5 The DIGITAL series of PCI/EISA Ethernet Cards, # DE4x5 The DIGITAL series of PCI/EISA Ethernet Cards,
# DE425, DE434 and DE435 # DE425, DE434 and DE435
# DE4x5_DEBUG Set the desired debug level # DE4x5_DEBUG Set the desired debug level
# IS_ZYNX May allow driver to work with Zynx cards -
# see linux/drivers/net/README.de4x5
# #
# The following options exist, but cannot be set in this file. # The following options exist, but cannot be set in this file.
......
...@@ -194,11 +194,13 @@ ifdef CONFIG_ATP ...@@ -194,11 +194,13 @@ ifdef CONFIG_ATP
NETDRV_OBJS := $(NETDRV_OBJS) atp.o NETDRV_OBJS := $(NETDRV_OBJS) atp.o
endif endif
ifdef CONFIG_DE4x5 ifdef CONFIG_DE4X5
NETDRV_OBJS := $(NETDRV_OBJS) de4x5.o NETDRV_OBJS := $(NETDRV_OBJS) de4x5.o
else
MODULES := $(MODULES) de4x5.o
endif
de4x5.o: de4x5.c CONFIG de4x5.o: de4x5.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(DE4x5_OPTS) -c $< $(CC) $(CPPFLAGS) $(CFLAGS) $(DE4x5_OPTS) -c $<
endif
ifdef CONFIG_NI52 ifdef CONFIG_NI52
NETDRV_OBJS := $(NETDRV_OBJS) ni52.o NETDRV_OBJS := $(NETDRV_OBJS) ni52.o
...@@ -252,7 +254,7 @@ endif ...@@ -252,7 +254,7 @@ endif
net.a: $(NETDRV_OBJS) net.a: $(NETDRV_OBJS)
rm -f net.a rm -f net.a
ar rcs net.a $(NETDRV_OBJS) $(AR) rcs net.a $(NETDRV_OBJS)
clean: clean:
rm -f core *.o *.a *.s rm -f core *.o *.a *.s
......
...@@ -21,6 +21,16 @@ theoretical ethernet rate. ...@@ -21,6 +21,16 @@ theoretical ethernet rate.
The cause is under investigation. The cause is under investigation.
************************************************************************ ************************************************************************
ZYNX cards, which use the PCI DECchip DC21040, are not specifically
supported in this driver because
a) I have no information on them.
b) I cannot test them with the driver.
c) Donald Becker's 'tulip.c' driver works with them....well one person says
they do and another doesn't, so take your pick!
This driver can be made to work with the ZYNX (and may be the SMC) card by
setting a compile time flag in linux/drivers/net/CONFIG
Enjoy! Enjoy!
......
...@@ -115,7 +115,7 @@ ethif_probe(struct device *dev) ...@@ -115,7 +115,7 @@ ethif_probe(struct device *dev)
#ifdef CONFIG_EWRK3 /* DEC EtherWORKS 3 */ #ifdef CONFIG_EWRK3 /* DEC EtherWORKS 3 */
&& ewrk3_probe(dev) && ewrk3_probe(dev)
#endif #endif
#ifdef CONFIG_DE4x5 /* DEC DE425, DE434, DE435 adapters */ #ifdef CONFIG_DE4X5 /* DEC DE425, DE434, DE435 adapters */
&& de4x5_probe(dev) && de4x5_probe(dev)
#endif #endif
#ifdef CONFIG_APRICOT /* Apricot I82596 */ #ifdef CONFIG_APRICOT /* Apricot I82596 */
......
...@@ -547,7 +547,7 @@ i596_open(struct device *dev) ...@@ -547,7 +547,7 @@ i596_open(struct device *dev)
irq2dev_map[dev->irq] = dev; irq2dev_map[dev->irq] = dev;
i = init_rx_bufs(dev, RX_RING_SIZE); i = init_rx_bufs(dev, RX_RING_SIZE);
if ((i = init_rx_bufs(dev, RX_RING_SIZE)) < RX_RING_SIZE) if ((i = init_rx_bufs(dev, RX_RING_SIZE)) < RX_RING_SIZE)
printk("%s: only able to allocate %d receive buffers\n", dev->name, i); printk("%s: only able to allocate %d receive buffers\n", dev->name, i);
...@@ -743,6 +743,7 @@ int apricot_probe(struct device *dev) ...@@ -743,6 +743,7 @@ int apricot_probe(struct device *dev)
dev->priv = (void *)((dev->mem_start + 0xf) & 0xfffffff0); dev->priv = (void *)((dev->mem_start + 0xf) & 0xfffffff0);
lp = (struct i596_private *)dev->priv; lp = (struct i596_private *)dev->priv;
memset((void *)lp, 0, sizeof(struct i596_private));
lp->scb.command = 0; lp->scb.command = 0;
lp->scb.cmd = (struct i596_cmd *) I596_NULL; lp->scb.cmd = (struct i596_cmd *) I596_NULL;
lp->scb.rfd = (struct i596_rfd *)I596_NULL; lp->scb.rfd = (struct i596_rfd *)I596_NULL;
......
This diff is collapsed.
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
To unload a module, turn off the associated interface To unload a module, turn off the associated interface
'ifconfig eth?? down' then 'rmmod depca'. 'ifconfig eth?? down' then 'rmmod depca'.
[Alan Cox: Changed to split off the module values as ints for insmod [Alan Cox: Changed to split off the module values as ints for insmod
you can now do insmod depca.c irq=7 io=0x200 ] you can now do insmod depca.c irq=7 io=0x200 ]
...@@ -168,20 +168,24 @@ ...@@ -168,20 +168,24 @@
0.37 22-jul-94 Added MODULE support 0.37 22-jul-94 Added MODULE support
0.38 15-aug-94 Added DBR ROM switch in depca_close(). 0.38 15-aug-94 Added DBR ROM switch in depca_close().
Multi DEPCA bug fix. Multi DEPCA bug fix.
0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0.
0.381 12-dec-94 Added DE101 recognition, fix multicast bug 0.381 12-dec-94 Added DE101 recognition, fix multicast bug.
0.382 9-feb-95 Fix recognition bug reported by <bkm@star.rl.ac.uk>.
========================================================================= =========================================================================
*/ */
static char *version = "depca.c:v0.381 12/12/94 davies@wanton.lkg.dec.com\n"; static char *version = "depca.c:v0.382 2/9/94 davies@wanton.lkg.dec.com\n";
#include <linux/config.h>
#ifdef MODULE #ifdef MODULE
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h> #include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif /* MODULE */ #endif /* MODULE */
#include <stdarg.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/string.h> #include <linux/string.h>
...@@ -210,9 +214,7 @@ static int depca_debug = 1; ...@@ -210,9 +214,7 @@ static int depca_debug = 1;
#define PROBE_LENGTH 32 #define PROBE_LENGTH 32
#endif #endif
#ifndef PROBE_SEQUENCE #define ETH_PROM_SIG 0xAA5500FFUL
#define PROBE_SEQUENCE "FF0055AAFF0055AA"
#endif
#ifndef DEPCA_SIGNATURE #ifndef DEPCA_SIGNATURE
#define DEPCA_SIGNATURE {"DEPCA",\ #define DEPCA_SIGNATURE {"DEPCA",\
...@@ -274,13 +276,13 @@ static short mem_chkd = 0; /* holds which base addrs have been */ ...@@ -274,13 +276,13 @@ static short mem_chkd = 0; /* holds which base addrs have been */
** The DEPCA Rx and Tx ring descriptors. ** The DEPCA Rx and Tx ring descriptors.
*/ */
struct depca_rx_head { struct depca_rx_head {
long base; volatile long base;
short buf_length; /* This length is negative 2's complement! */ short buf_length; /* This length is negative 2's complement! */
short msg_length; /* This length is "normal". */ short msg_length; /* This length is "normal". */
}; };
struct depca_tx_head { struct depca_tx_head {
long base; volatile long base;
short length; /* This length is negative 2's complement! */ short length; /* This length is negative 2's complement! */
short misc; /* Errors and TDR info */ short misc; /* Errors and TDR info */
}; };
...@@ -479,9 +481,7 @@ depca_probe1(struct device *dev, short ioaddr) ...@@ -479,9 +481,7 @@ depca_probe1(struct device *dev, short ioaddr)
j=inb(DEPCA_PROM); j=inb(DEPCA_PROM);
} }
#ifdef HAVE_PORTRESERVE request_region(ioaddr, DEPCA_TOTAL_SIZE, dev->name);
request_region(ioaddr, DEPCA_TOTAL_SIZE,"depca");
#endif
/* /*
** Set up the maximum amount of network RAM(kB) ** Set up the maximum amount of network RAM(kB)
...@@ -762,9 +762,7 @@ depca_open(struct device *dev) ...@@ -762,9 +762,7 @@ depca_open(struct device *dev)
printk("nicsr: 0x%02x\n",inb(DEPCA_NICSR)); printk("nicsr: 0x%02x\n",inb(DEPCA_NICSR));
} }
#ifdef MODULE MOD_INC_USE_COUNT;
MOD_INC_USE_COUNT;
#endif
return 0; /* Always succeed */ return 0; /* Always succeed */
} }
...@@ -1176,9 +1174,7 @@ depca_close(struct device *dev) ...@@ -1176,9 +1174,7 @@ depca_close(struct device *dev)
irq2dev_map[dev->irq] = 0; irq2dev_map[dev->irq] = 0;
#ifdef MODULE
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
#endif
return 0; return 0;
} }
...@@ -1452,98 +1448,61 @@ static char *DepcaSignature(unsigned long mem_addr) ...@@ -1452,98 +1448,61 @@ static char *DepcaSignature(unsigned long mem_addr)
** its ROM address counter to be initialized and enabled. Only enable ** its ROM address counter to be initialized and enabled. Only enable
** if the first address octet is a 0x08 - this minimises the chances of ** if the first address octet is a 0x08 - this minimises the chances of
** messing around with some other hardware, but it assumes that this DEPCA ** messing around with some other hardware, but it assumes that this DEPCA
** card initialized itself correctly. It also assumes that all past and ** card initialized itself correctly.
** future DEPCA/EtherWORKS cards will have ethernet addresses beginning with **
** a 0x08. ** Search the Ethernet address ROM for the signature. Since the ROM address
** counter can start at an arbitrary point, the search must include the entire
** probe sequence length plus the (length_of_the_signature - 1).
** Stop the search IMMEDIATELY after the signature is found so that the
** PROM address counter is correctly positioned at the start of the
** ethernet address for later read out.
*/ */
static int DevicePresent(short ioaddr) static int DevicePresent(short ioaddr)
{ {
static short fp=1,sigLength=0; union {
static char devSig[] = PROBE_SEQUENCE; struct {
u_long a;
u_long b;
} llsig;
char Sig[sizeof(long) << 1];
} dev;
short sigLength=0;
char data; char data;
int i, j, nicsr, status = 0; int i, j, nicsr, status = 0;
static char asc2hex(char value);
/* data = inb(DEPCA_PROM); /* clear counter on DEPCA */
** Initialize the counter on a DEPCA card. Two reads to ensure DEPCA ethernet
** address counter is a) cleared and b) the correct data read.
*/
data = inb(DEPCA_PROM); /* clear counter */
data = inb(DEPCA_PROM); /* read data */ data = inb(DEPCA_PROM); /* read data */
/* if (data == 0x08) { /* Enable counter on DEPCA */
** Enable counter
*/
if (data == 0x08) {
nicsr = inb(DEPCA_NICSR); nicsr = inb(DEPCA_NICSR);
nicsr |= AAC; nicsr |= AAC;
outb(nicsr, DEPCA_NICSR); outb(nicsr, DEPCA_NICSR);
} }
/* dev.llsig.a = ETH_PROM_SIG;
** Convert the ascii signature to a hex equivalent & pack in place dev.llsig.b = ETH_PROM_SIG;
*/ sigLength = sizeof(long) << 1;
if (fp) { /* only do this once!... */
for (i=0,j=0;devSig[i] != '\0' && !status;i+=2,j++) { for (i=0,j=0;j<sigLength && i<PROBE_LENGTH+sigLength-1;i++) {
if ((devSig[i]=asc2hex(devSig[i]))>=0) { data = inb(DEPCA_PROM);
devSig[i]<<=4; if (dev.Sig[j] == data) { /* track signature */
if((devSig[i+1]=asc2hex(devSig[i+1]))>=0){ j++;
devSig[j]=devSig[i]+devSig[i+1]; } else { /* lost signature; begin search again */
} else { if (data == dev.Sig[0]) { /* rare case.... */
status= -1; j=1;
}
} else { } else {
status= -1;
}
}
sigLength=j;
fp = 0;
}
/*
** Search the Ethernet address ROM for the signature. Since the ROM address
** counter can start at an arbitrary point, the search must include the entire
** probe sequence length plus the (length_of_the_signature - 1).
** Stop the search IMMEDIATELY after the signature is found so that the
** PROM address counter is correctly positioned at the start of the
** ethernet address for later read out.
*/
if (!status) {
for (i=0,j=0;j<sigLength && i<PROBE_LENGTH+sigLength-1;i++) {
data = inb(DEPCA_PROM);
if (devSig[j] == data) { /* track signature */
j++;
} else { /* lost signature; begin search again */
j=0; j=0;
} }
} }
}
if (j!=sigLength) { if (j!=sigLength) {
status = -ENODEV; /* search failed */ status = -ENODEV; /* search failed */
}
} }
return status; return status;
} }
static char asc2hex(char value)
{
value -= 0x30; /* normalise to 0..9 range */
if (value >= 0) {
if (value > 9) { /* but may not be 10..15 */
value &= 0x1f; /* make A..F & a..f be the same */
value -= 0x07; /* normalise to 10..15 range */
if ((value < 0x0a) || (value > 0x0f)) { /* if outside range then... */
value = -1; /* ...signal error */
}
}
} else { /* outside 0..9 range... */
value = -1; /* ...signal error */
}
return value; /* return hex char or error */
}
#ifdef MODULE #ifdef MODULE
char kernel_version[] = UTS_RELEASE; char kernel_version[] = UTS_RELEASE;
static struct device thisDepca = { static struct device thisDepca = {
...@@ -1576,6 +1535,7 @@ cleanup_module(void) ...@@ -1576,6 +1535,7 @@ cleanup_module(void)
if (MOD_IN_USE) { if (MOD_IN_USE) {
printk("%s: device busy, remove delayed\n",thisDepca.name); printk("%s: device busy, remove delayed\n",thisDepca.name);
} else { } else {
release_region(thisDepca.base_addr, DEPCA_TOTAL_SIZE);
unregister_netdev(&thisDepca); unregister_netdev(&thisDepca);
} }
} }
......
This diff is collapsed.
/* /*
* eata.c - Low-level driver for EATA/DMA SCSI host adapters. * eata.c - Low-level driver for EATA/DMA SCSI host adapters.
* *
* 9 Feb 1995 rev. 1.16 for linux 1.1.90
* Use host->wish_block instead of host->block.
* New list of Data Out SCSI commands.
*
* 8 Feb 1995 rev. 1.15 for linux 1.1.89 * 8 Feb 1995 rev. 1.15 for linux 1.1.89
* Cleared target_time_out counter while preforming a reset. * Cleared target_time_out counter while performing a reset.
* All external symbols renamed to avoid possible name conflicts. * All external symbols renamed to avoid possible name conflicts.
* *
* 28 Jan 1995 rev. 1.14 for linux 1.1.86 * 28 Jan 1995 rev. 1.14 for linux 1.1.86
...@@ -88,7 +92,7 @@ ...@@ -88,7 +92,7 @@
* CACHE : DISABLED * CACHE : DISABLED
* *
* In order to support multiple ISA boards in a reliable way, * In order to support multiple ISA boards in a reliable way,
* the driver sets host->block = TRUE for all ISA boards. * the driver sets host->wish_block = TRUE for all ISA boards.
*/ */
#if defined(MODULE) #if defined(MODULE)
...@@ -167,6 +171,8 @@ ...@@ -167,6 +171,8 @@
#define ASOK 0x00 #define ASOK 0x00
#define ASST 0x01 #define ASST 0x01
#define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr)[0])
/* "EATA", in Big Endian format */ /* "EATA", in Big Endian format */
#define EATA_SIGNATURE 0x41544145 #define EATA_SIGNATURE 0x41544145
...@@ -466,7 +472,7 @@ static inline int port_detect(ushort *port_base, unsigned int j, ...@@ -466,7 +472,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
if (HD(j)->subversion == ESA) if (HD(j)->subversion == ESA)
sh[j]->unchecked_isa_dma = FALSE; sh[j]->unchecked_isa_dma = FALSE;
else { else {
sh[j]->block = sh[j]; sh[j]->wish_block = TRUE;
sh[j]->unchecked_isa_dma = TRUE; sh[j]->unchecked_isa_dma = TRUE;
disable_dma(dma_channel); disable_dma(dma_channel);
clear_dma_ff(dma_channel); clear_dma_ff(dma_channel);
...@@ -562,6 +568,12 @@ int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { ...@@ -562,6 +568,12 @@ int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
struct mscp *cpp; struct mscp *cpp;
struct mssp *spp; struct mssp *spp;
static const unsigned char data_out_cmds[] = {
0x0a, 0x2a, 0x15, 0x55, 0x04, 0x07, 0x0b, 0x10, 0x16, 0x18, 0x1d,
0x24, 0x2b, 0x2e, 0x30, 0x31, 0x32, 0x38, 0x39, 0x3a, 0x3b, 0x3d,
0x3f, 0x40, 0x41, 0x4c, 0xaa, 0xae, 0xb0, 0xb1, 0xb2, 0xb6, 0xea
};
save_flags(flags); save_flags(flags);
cli(); cli();
/* j is the board number */ /* j is the board number */
...@@ -619,11 +631,13 @@ int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { ...@@ -619,11 +631,13 @@ int eata2x_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
if (do_trace) printk("%s: qcomm, mbox %d, target %d, pid %ld.\n", if (do_trace) printk("%s: qcomm, mbox %d, target %d, pid %ld.\n",
BN(j), i, SCpnt->target, SCpnt->pid); BN(j), i, SCpnt->target, SCpnt->pid);
if (SCpnt->cmnd[0] == WRITE_10 || SCpnt->cmnd[0] == WRITE_6) for (k = 0; k < ARRAY_SIZE(data_out_cmds); k++)
cpp->dout = TRUE; if (SCpnt->cmnd[0] == data_out_cmds[k]) {
else cpp->dout = TRUE;
cpp->din = TRUE; break;
}
cpp->din = !cpp->dout;
cpp->reqsen = TRUE; cpp->reqsen = TRUE;
cpp->dispri = TRUE; cpp->dispri = TRUE;
cpp->one = TRUE; cpp->one = TRUE;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <linux/scsicam.h> #include <linux/scsicam.h>
#define EATA_VERSION "1.15.00" #define EATA_VERSION "1.16.00"
int eata2x_detect(Scsi_Host_Template *); int eata2x_detect(Scsi_Host_Template *);
int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
......
...@@ -241,6 +241,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){ ...@@ -241,6 +241,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
(tpnt->unchecked_isa_dma && j ? GFP_DMA : 0) | GFP_ATOMIC); (tpnt->unchecked_isa_dma && j ? GFP_DMA : 0) | GFP_ATOMIC);
retval->host_busy = 0; retval->host_busy = 0;
retval->block = NULL; retval->block = NULL;
retval->wish_block = 0;
if(j > 0xffff) panic("Too many extra bytes requested\n"); if(j > 0xffff) panic("Too many extra bytes requested\n");
retval->extra_bytes = j; retval->extra_bytes = j;
retval->loaded_as_module = scsi_loadable_module_flag; retval->loaded_as_module = scsi_loadable_module_flag;
......
...@@ -243,6 +243,7 @@ struct Scsi_Host ...@@ -243,6 +243,7 @@ struct Scsi_Host
that should be locked out of performing I/O while we have an active that should be locked out of performing I/O while we have an active
command on this host. */ command on this host. */
struct Scsi_Host * block; struct Scsi_Host * block;
unsigned wish_block:1;
/* These parameters should be set by the detect routine */ /* These parameters should be set by the detect routine */
unsigned char *base; unsigned char *base;
......
...@@ -212,10 +212,7 @@ void scsi_make_blocked_list(void) { ...@@ -212,10 +212,7 @@ void scsi_make_blocked_list(void) {
/* /*
* Create a circular linked list from the scsi hosts which have * Create a circular linked list from the scsi hosts which have
* the "block" field in the Scsi_Host structure set to any value * the "wish_block" field in the Scsi_Host structure set.
* different from NULL.
* If there is only one host such that host->block != NULL, the list is
* empty and host->block is reset to NULL.
* The blocked list should include all the scsi hosts using ISA DMA. * The blocked list should include all the scsi hosts using ISA DMA.
* In some systems, using two dma channels simultaneously causes * In some systems, using two dma channels simultaneously causes
* unpredictable results. * unpredictable results.
...@@ -243,10 +240,10 @@ void scsi_make_blocked_list(void) { ...@@ -243,10 +240,10 @@ void scsi_make_blocked_list(void) {
* Useful to put into the blocked list all the hosts whose driver * Useful to put into the blocked list all the hosts whose driver
* does not know about the host->block feature. * does not know about the host->block feature.
*/ */
if (shpnt->unchecked_isa_dma) shpnt->block = shpnt; if (shpnt->unchecked_isa_dma) shpnt->wish_block = 1;
#endif #endif
if (shpnt->block) sh[block_count++] = shpnt; if (shpnt->wish_block) sh[block_count++] = shpnt;
} }
if (block_count == 1) sh[0]->block = NULL; if (block_count == 1) sh[0]->block = NULL;
......
...@@ -374,7 +374,7 @@ static void sg_init() ...@@ -374,7 +374,7 @@ static void sg_init()
memset(scsi_generics, 0, (sg_template.dev_noticed + SG_EXTRA_DEVS) memset(scsi_generics, 0, (sg_template.dev_noticed + SG_EXTRA_DEVS)
* sizeof(struct scsi_generic)); * sizeof(struct scsi_generic));
sg_template.dev_max = sg_template.dev_noticed; sg_template.dev_max = sg_template.dev_noticed + SG_EXTRA_DEVS;
} }
static int sg_attach(Scsi_Device * SDp) static int sg_attach(Scsi_Device * SDp)
......
/* /*
* u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters. * u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters.
* *
* 9 Feb 1995 rev. 1.16 for linux 1.1.90
* Use host->wish_block instead of host->block.
*
* 8 Feb 1995 rev. 1.15 for linux 1.1.89 * 8 Feb 1995 rev. 1.15 for linux 1.1.89
* Cleared target_time_out counter while preforming a reset. * Cleared target_time_out counter while performing a reset.
* *
* 28 Jan 1995 rev. 1.14 for linux 1.1.86 * 28 Jan 1995 rev. 1.14 for linux 1.1.86
* Added module support. * Added module support.
...@@ -111,7 +114,7 @@ ...@@ -111,7 +114,7 @@
* The new firmware has fixed all the above problems. * The new firmware has fixed all the above problems.
* *
* In order to support multiple ISA boards in a reliable way, * In order to support multiple ISA boards in a reliable way,
* the driver sets host->block = TRUE for all ISA boards. * the driver sets host->wish_block = TRUE for all ISA boards.
*/ */
#if defined(MODULE) #if defined(MODULE)
...@@ -428,7 +431,7 @@ static inline int port_detect(ushort *port_base, unsigned int j, ...@@ -428,7 +431,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
sprintf(BN(j), "U34F%d", j); sprintf(BN(j), "U34F%d", j);
} }
else { else {
sh[j]->block = sh[j]; sh[j]->wish_block = TRUE;
#if defined (HAVE_OLD_U14F_FIRMWARE) #if defined (HAVE_OLD_U14F_FIRMWARE)
sh[j]->hostt->use_clustering = DISABLE_CLUSTERING; sh[j]->hostt->use_clustering = DISABLE_CLUSTERING;
......
...@@ -10,7 +10,7 @@ int u14_34f_abort(Scsi_Cmnd *); ...@@ -10,7 +10,7 @@ int u14_34f_abort(Scsi_Cmnd *);
int u14_34f_reset(Scsi_Cmnd *); int u14_34f_reset(Scsi_Cmnd *);
int u14_34f_biosparam(Disk *, int, int *); int u14_34f_biosparam(Disk *, int, int *);
#define U14_34F_VERSION "1.15.00" #define U14_34F_VERSION "1.16.00"
#define ULTRASTOR_14_34F { \ #define ULTRASTOR_14_34F { \
NULL, /* Ptr for modules */ \ NULL, /* Ptr for modules */ \
......
...@@ -79,7 +79,7 @@ Snail mail: Hannu Savolainen ...@@ -79,7 +79,7 @@ Snail mail: Hannu Savolainen
Finland Finland
FAX: +358 0 341 6272 (answers if I have my machine (mgetty) on). FAX: +358 0 341 6272 (answers if I have my machine (mgetty) on).
NOTE! I propably don't answer to Snail mail or FAX messages. Sending answer NOTE! I probably don't answer to Snail mail or FAX messages. Sending answer
to each of them is simply too expensive and time consuming. However I to each of them is simply too expensive and time consuming. However I
try to reply every email message I get (within a week). If you don't try to reply every email message I get (within a week). If you don't
get response, please check how your address is written in the message get response, please check how your address is written in the message
......
...@@ -140,17 +140,17 @@ void proc_read_inode(struct inode * inode) ...@@ -140,17 +140,17 @@ void proc_read_inode(struct inode * inode)
} }
#ifdef CONFIG_IP_ACCT #ifdef CONFIG_IP_ACCT
/* be careful: /proc/net/ip_acct_0 resets IP accounting */ /* this file may be opened R/W by root to reset the accounting */
if (ino == PROC_NET_IPACCT0) { if (ino == PROC_NET_IPACCT) {
inode->i_mode = S_IFREG | S_IRUSR; inode->i_mode = S_IFREG | S_IRUGO | S_IWUSR;
inode->i_op = &proc_net_inode_operations; inode->i_op = &proc_net_inode_operations;
return; return;
} }
#endif #endif
#ifdef CONFIG_IP_FIREWALL #ifdef CONFIG_IP_FIREWALL
/* /proc/net/ip_forward_0 and /proc/net/ip_block_0 reset counters */ /* these files may be opened R/W by root to reset the counters */
if ((ino == PROC_NET_IPFWFWD0) || (ino == PROC_NET_IPFWBLK0)) { if ((ino == PROC_NET_IPFWFWD) || (ino == PROC_NET_IPFWBLK)) {
inode->i_mode = S_IFREG | S_IRUSR; inode->i_mode = S_IFREG | S_IRUGO | S_IWUSR;
inode->i_op = &proc_net_inode_operations; inode->i_op = &proc_net_inode_operations;
return; return;
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -59,14 +60,11 @@ extern int afinet_get_info(char *, char **, off_t, int); ...@@ -59,14 +60,11 @@ extern int afinet_get_info(char *, char **, off_t, int);
extern int wavelan_get_info(char *, char **, off_t, int); extern int wavelan_get_info(char *, char **, off_t, int);
#endif /* defined(CONFIG_WAVELAN) */ #endif /* defined(CONFIG_WAVELAN) */
#ifdef CONFIG_IP_ACCT #ifdef CONFIG_IP_ACCT
extern int ip_acct_procinfo(char *, char **, off_t, int); extern int ip_acct_procinfo(char *, char **, off_t, int, int);
extern int ip_acct0_procinfo(char *, char **, off_t, int);
#endif /* CONFIG_IP_ACCT */ #endif /* CONFIG_IP_ACCT */
#ifdef CONFIG_IP_FIREWALL #ifdef CONFIG_IP_FIREWALL
extern int ip_fw_blk_procinfo(char *, char **, off_t, int); extern int ip_fw_blk_procinfo(char *, char **, off_t, int, int);
extern int ip_fw_blk0_procinfo(char *, char **, off_t, int); extern int ip_fw_fwd_procinfo(char *, char **, off_t, int, int);
extern int ip_fw_fwd_procinfo(char *, char **, off_t, int);
extern int ip_fw_fwd0_procinfo(char *, char **, off_t, int);
#endif /* CONFIG_IP_FIREWALL */ #endif /* CONFIG_IP_FIREWALL */
extern int ip_msqhst_procinfo(char *, char **, off_t, int); extern int ip_msqhst_procinfo(char *, char **, off_t, int);
extern int ip_mc_procinfo(char *, char **, off_t, int); extern int ip_mc_procinfo(char *, char **, off_t, int);
...@@ -147,16 +145,13 @@ static struct proc_dir_entry net_dir[] = { ...@@ -147,16 +145,13 @@ static struct proc_dir_entry net_dir[] = {
#endif #endif
#ifdef CONFIG_IP_FIREWALL #ifdef CONFIG_IP_FIREWALL
{ PROC_NET_IPFWFWD, 10, "ip_forward"}, { PROC_NET_IPFWFWD, 10, "ip_forward"},
{ PROC_NET_IPFWFWD0, 12, "ip_forward_0"},
{ PROC_NET_IPFWBLK, 8, "ip_block"}, { PROC_NET_IPFWBLK, 8, "ip_block"},
{ PROC_NET_IPFWBLK0, 10, "ip_block_0"},
#endif #endif
#ifdef CONFIG_IP_MASQUERADE #ifdef CONFIG_IP_MASQUERADE
{ PROC_NET_IPMSQHST, 13, "ip_masquerade"}, { PROC_NET_IPMSQHST, 13, "ip_masquerade"},
#endif #endif
#ifdef CONFIG_IP_ACCT #ifdef CONFIG_IP_ACCT
{ PROC_NET_IPACCT, 7, "ip_acct"}, { PROC_NET_IPACCT, 7, "ip_acct"},
{ PROC_NET_IPACCT0, 9, "ip_acct_0"},
#endif #endif
#if defined(CONFIG_WAVELAN) #if defined(CONFIG_WAVELAN)
{ PROC_NET_WAVELAN, 7, "wavelan" }, { PROC_NET_WAVELAN, 7, "wavelan" },
...@@ -300,24 +295,18 @@ static int proc_readnet(struct inode * inode, struct file * file, ...@@ -300,24 +295,18 @@ static int proc_readnet(struct inode * inode, struct file * file,
#endif #endif
#ifdef CONFIG_IP_FIREWALL #ifdef CONFIG_IP_FIREWALL
case PROC_NET_IPFWFWD: case PROC_NET_IPFWFWD:
length = ip_fw_fwd_procinfo(page, &start, file->f_pos,thistime); length = ip_fw_fwd_procinfo(page, &start, file->f_pos,
break; thistime, (file->f_flags & O_ACCMODE) == O_RDWR);
case PROC_NET_IPFWFWD0:
length = ip_fw_fwd0_procinfo(page, &start, file->f_pos,thistime);
break; break;
case PROC_NET_IPFWBLK: case PROC_NET_IPFWBLK:
length = ip_fw_blk_procinfo(page, &start, file->f_pos,thistime); length = ip_fw_blk_procinfo(page, &start, file->f_pos,
break; thistime, (file->f_flags & O_ACCMODE) == O_RDWR);
case PROC_NET_IPFWBLK0:
length = ip_fw_blk0_procinfo(page, &start, file->f_pos,thistime);
break; break;
#endif #endif
#ifdef CONFIG_IP_ACCT #ifdef CONFIG_IP_ACCT
case PROC_NET_IPACCT: case PROC_NET_IPACCT:
length = ip_acct_procinfo(page, &start, file->f_pos,thistime); length = ip_acct_procinfo(page, &start, file->f_pos,
break; thistime, (file->f_flags & O_ACCMODE) == O_RDWR);
case PROC_NET_IPACCT0:
length = ip_acct0_procinfo(page, &start, file->f_pos,thistime);
break; break;
#endif #endif
#ifdef CONFIG_IP_MASQUERADE #ifdef CONFIG_IP_MASQUERADE
......
...@@ -32,7 +32,7 @@ extern __inline__ unsigned long set_bit(unsigned long nr, void * addr) ...@@ -32,7 +32,7 @@ extern __inline__ unsigned long set_bit(unsigned long nr, void * addr)
"=&r" (oldbit) "=&r" (oldbit)
:"r" (1UL << (nr & 63)), :"r" (1UL << (nr & 63)),
"m" (((unsigned long *) addr)[nr >> 6])); "m" (((unsigned long *) addr)[nr >> 6]));
return oldbit; return oldbit != 0;
} }
extern __inline__ unsigned long clear_bit(unsigned long nr, void * addr) extern __inline__ unsigned long clear_bit(unsigned long nr, void * addr)
...@@ -54,7 +54,7 @@ extern __inline__ unsigned long clear_bit(unsigned long nr, void * addr) ...@@ -54,7 +54,7 @@ extern __inline__ unsigned long clear_bit(unsigned long nr, void * addr)
"=&r" (oldbit) "=&r" (oldbit)
:"r" (1UL << (nr & 63)), :"r" (1UL << (nr & 63)),
"m" (((unsigned long *) addr)[nr >> 6])); "m" (((unsigned long *) addr)[nr >> 6]));
return oldbit; return oldbit != 0;
} }
extern __inline__ unsigned long change_bit(unsigned long nr, void * addr) extern __inline__ unsigned long change_bit(unsigned long nr, void * addr)
...@@ -74,7 +74,7 @@ extern __inline__ unsigned long change_bit(unsigned long nr, void * addr) ...@@ -74,7 +74,7 @@ extern __inline__ unsigned long change_bit(unsigned long nr, void * addr)
"=&r" (oldbit) "=&r" (oldbit)
:"r" (1UL << (nr & 63)), :"r" (1UL << (nr & 63)),
"m" (((unsigned long *) addr)[nr >> 6])); "m" (((unsigned long *) addr)[nr >> 6]));
return oldbit; return oldbit != 0;
} }
extern __inline__ unsigned long test_bit(int nr, void * addr) extern __inline__ unsigned long test_bit(int nr, void * addr)
......
...@@ -158,16 +158,19 @@ extern inline unsigned long pgd_page(pgd_t pgd) ...@@ -158,16 +158,19 @@ extern inline unsigned long pgd_page(pgd_t pgd)
extern inline int pte_none(pte_t pte) { return !pte_val(pte); } extern inline int pte_none(pte_t pte) { return !pte_val(pte); }
extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_VALID; } extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_VALID; }
extern inline int pte_inuse(pte_t *ptep) { return mem_map[MAP_NR(ptep)] > 1; }
extern inline void pte_clear(pte_t *ptep) { pte_val(*ptep) = 0; } extern inline void pte_clear(pte_t *ptep) { pte_val(*ptep) = 0; }
extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); } extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); }
extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~_PFN_MASK) != _PAGE_TABLE || pmd_page(pmd) > high_memory; } extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~_PFN_MASK) != _PAGE_TABLE || pmd_page(pmd) > high_memory; }
extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_VALID; } extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_VALID; }
extern inline int pmd_inuse(pmd_t *pmdp) { return mem_map[MAP_NR(pmdp)] > 1; }
extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; } extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; }
extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); } extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); }
extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~_PFN_MASK) != _PAGE_TABLE || pgd_page(pgd) > high_memory; } extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~_PFN_MASK) != _PAGE_TABLE || pgd_page(pgd) > high_memory; }
extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_VALID; } extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_VALID; }
extern inline int pgd_inuse(pgd_t *pgdp) { return mem_map[MAP_NR(pgdp)] > 1; }
extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; } extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; }
/* /*
...@@ -344,6 +347,16 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address) ...@@ -344,6 +347,16 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
return (pmd_t *) pgd_page(*pgd) + address; return (pmd_t *) pgd_page(*pgd) + address;
} }
extern inline void pgd_free(pgd_t * pgd)
{
free_page((unsigned long) pgd);
}
extern inline pgd_t * pgd_alloc(void)
{
return (pgd_t *) get_free_page(GFP_KERNEL);
}
extern pgd_t swapper_pg_dir[1024]; extern pgd_t swapper_pg_dir[1024];
#endif /* _ALPHA_PGTABLE_H */ #endif /* _ALPHA_PGTABLE_H */
...@@ -77,4 +77,13 @@ extern inline void end_bh_atomic(void) ...@@ -77,4 +77,13 @@ extern inline void end_bh_atomic(void)
: "0" (0)); : "0" (0));
} }
/*
* Do necessary setup to start up a newly executed thread.
*/
static inline void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
{
regs->pc = pc;
wrusp(sp);
}
#endif /* __ASM_ALPHA_PROCESSOR_H */ #endif /* __ASM_ALPHA_PROCESSOR_H */
...@@ -36,7 +36,7 @@ struct pt_regs { ...@@ -36,7 +36,7 @@ struct pt_regs {
unsigned long r26; unsigned long r26;
unsigned long r27; unsigned long r27;
unsigned long r28; unsigned long r28;
unsigned long padding; unsigned long hae;
/* These are saved by PAL-code: */ /* These are saved by PAL-code: */
unsigned long ps; unsigned long ps;
unsigned long pc; unsigned long pc;
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
#define PTRS_PER_PMD 1 #define PTRS_PER_PMD 1
#define PTRS_PER_PGD 1024 #define PTRS_PER_PGD 1024
/* the no. of pointers that fit on a page: this will go away */
#define PTRS_PER_PAGE (PAGE_SIZE/sizeof(void*))
/* Just any arbitrary offset to the start of the vmalloc VM area: the /* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the * current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that * physical memory until the kernel virtual memory starts. That means that
...@@ -133,17 +130,36 @@ extern unsigned long high_memory; ...@@ -133,17 +130,36 @@ extern unsigned long high_memory;
extern inline int pte_none(pte_t pte) { return !pte_val(pte); } extern inline int pte_none(pte_t pte) { return !pte_val(pte); }
extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_PRESENT; } extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_PRESENT; }
extern inline int pte_inuse(pte_t *ptep) { return mem_map[MAP_NR(ptep)] > 1; }
extern inline void pte_clear(pte_t *ptep) { pte_val(*ptep) = 0; } extern inline void pte_clear(pte_t *ptep) { pte_val(*ptep) = 0; }
extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); } extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); }
extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~PAGE_MASK) != _PAGE_TABLE || pmd_val(pmd) > high_memory; } extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~PAGE_MASK) != _PAGE_TABLE || pmd_val(pmd) > high_memory; }
extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_PRESENT; } extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_PRESENT; }
extern inline int pmd_inuse(pmd_t *pmdp) { return 0; }
extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; } extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; }
#ifdef THREE_LEVEL
/*
* The "pgd_xxx()" functions here are trivial for a folded two-level
* setup: the pgd is never bad, and a pmd always exists (as it's folded
* into the pgd entry)
*/
extern inline int pgd_none(pgd_t pgd) { return 0; }
extern inline int pgd_bad(pgd_t pgd) { return 0; }
extern inline int pgd_present(pgd_t pgd) { return 1; }
extern inline int pgd_inuse(pgd_t * pgdp) { return mem_map[MAP_NR(pgdp)] > 1; }
extern inline void pgd_clear(pgd_t * pgdp) { }
#else
/*
* These are the old (and incorrect) ones needed for code that doesn't
* know about three-level yet..
*/
extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); } extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); }
extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~PAGE_MASK) != _PAGE_TABLE || pgd_val(pgd) > high_memory; } extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~PAGE_MASK) != _PAGE_TABLE || pgd_val(pgd) > high_memory; }
extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_PRESENT; } extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_PRESENT; }
extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; } extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; }
#endif
/* /*
* The following only work if pte_present() is true. * The following only work if pte_present() is true.
...@@ -185,6 +201,8 @@ extern inline unsigned long pte_page(pte_t pte) ...@@ -185,6 +201,8 @@ extern inline unsigned long pte_page(pte_t pte)
extern inline unsigned long pmd_page(pmd_t pmd) extern inline unsigned long pmd_page(pmd_t pmd)
{ return pmd_val(pmd) & PAGE_MASK; } { return pmd_val(pmd) & PAGE_MASK; }
#ifndef THREE_LEVEL
extern inline unsigned long pgd_page(pgd_t pgd) extern inline unsigned long pgd_page(pgd_t pgd)
{ return pgd_val(pgd) & PAGE_MASK; } { return pgd_val(pgd) & PAGE_MASK; }
...@@ -193,6 +211,11 @@ extern inline void pgd_set(pgd_t * pgdp, pte_t * ptep) ...@@ -193,6 +211,11 @@ extern inline void pgd_set(pgd_t * pgdp, pte_t * ptep)
#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address)) #define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
/* the no. of pointers that fit on a page: this will go away */
#define PTRS_PER_PAGE (PAGE_SIZE/sizeof(void*))
#endif
/* to find an entry in a page-table-directory */ /* to find an entry in a page-table-directory */
extern inline pgd_t * pgd_offset(struct task_struct * tsk, unsigned long address) extern inline pgd_t * pgd_offset(struct task_struct * tsk, unsigned long address)
{ {
...@@ -300,6 +323,16 @@ extern inline pmd_t * pmd_alloc(pgd_t * pgd, unsigned long address) ...@@ -300,6 +323,16 @@ extern inline pmd_t * pmd_alloc(pgd_t * pgd, unsigned long address)
return (pmd_t *) pgd; return (pmd_t *) pgd;
} }
extern inline void pgd_free(pgd_t * pgd)
{
free_page((unsigned long) pgd);
}
extern inline pgd_t * pgd_alloc(void)
{
return (pgd_t *) get_free_page(GFP_KERNEL);
}
extern pgd_t swapper_pg_dir[1024]; extern pgd_t swapper_pg_dir[1024];
#endif /* _I386_PAGE_H */ #endif /* _I386_PAGE_H */
...@@ -39,7 +39,7 @@ extern int EISA_bus; ...@@ -39,7 +39,7 @@ extern int EISA_bus;
* User space process size: 3GB. This is hardcoded into a few places, * User space process size: 3GB. This is hardcoded into a few places,
* so don't change it unless you know what you are doing. * so don't change it unless you know what you are doing.
*/ */
#define TASK_SIZE 0xc0000000 #define TASK_SIZE (0xC0000000UL)
/* /*
* Size of io_bitmap in longwords: 32 is ports 0-0x3ff. * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
...@@ -128,4 +128,12 @@ struct thread_struct { ...@@ -128,4 +128,12 @@ struct thread_struct {
NULL, 0, 0, 0, 0 /* vm86_info */ \ NULL, 0, 0, 0, 0 /* vm86_info */ \
} }
static inline void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp)
{
regs->cs = USER_CS;
regs->ds = regs->es = regs->ss = regs->fs = regs->gs = USER_DS;
regs->eip = eip;
regs->esp = esp;
}
#endif /* __ASM_I386_PROCESSOR_H */ #endif /* __ASM_I386_PROCESSOR_H */
...@@ -80,7 +80,7 @@ extern int EISA_bus; ...@@ -80,7 +80,7 @@ extern int EISA_bus;
* User space process size: 2GB. This is hardcoded into a few places, * User space process size: 2GB. This is hardcoded into a few places,
* so don't change it unless you know what you are doing. * so don't change it unless you know what you are doing.
*/ */
#define TASK_SIZE 0x80000000 #define TASK_SIZE (0x80000000UL)
/* /*
* Size of io_bitmap in longwords: 32 is ports 0-0x3ff. * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* *
* "this is gonna have to change to 1gig for the sparc" - David S. Miller * "this is gonna have to change to 1gig for the sparc" - David S. Miller
*/ */
#define TASK_SIZE (0xc0000000UL) #define TASK_SIZE (0xC0000000UL)
/* /*
* Size of io_bitmap in longwords: 32 is ports 0-0x3ff. * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
......
...@@ -20,7 +20,6 @@ struct plipconf ...@@ -20,7 +20,6 @@ struct plipconf
unsigned short pcmd; unsigned short pcmd;
unsigned long nibble; unsigned long nibble;
unsigned long trigger; unsigned long trigger;
unsigned long unit;
}; };
#define PLIP_GET_TIMEOUT 0x1 #define PLIP_GET_TIMEOUT 0x1
......
...@@ -69,13 +69,10 @@ enum net_directory_inos { ...@@ -69,13 +69,10 @@ enum net_directory_inos {
#endif #endif
#ifdef CONFIG_IP_FIREWALL #ifdef CONFIG_IP_FIREWALL
PROC_NET_IPFWFWD, PROC_NET_IPFWFWD,
PROC_NET_IPFWFWD0,
PROC_NET_IPFWBLK, PROC_NET_IPFWBLK,
PROC_NET_IPFWBLK0,
#endif #endif
#ifdef CONFIG_IP_ACCT #ifdef CONFIG_IP_ACCT
PROC_NET_IPACCT, PROC_NET_IPACCT,
PROC_NET_IPACCT0,
#endif #endif
#if defined(CONFIG_WAVELAN) #if defined(CONFIG_WAVELAN)
PROC_NET_WAVELAN, PROC_NET_WAVELAN,
......
...@@ -269,7 +269,6 @@ extern int request_irq(unsigned int irq,void (*handler)(int, struct pt_regs *), ...@@ -269,7 +269,6 @@ extern int request_irq(unsigned int irq,void (*handler)(int, struct pt_regs *),
extern void free_irq(unsigned int irq); extern void free_irq(unsigned int irq);
extern unsigned long copy_thread(int, unsigned long, struct task_struct *, struct pt_regs *); extern unsigned long copy_thread(int, unsigned long, struct task_struct *, struct pt_regs *);
extern void start_thread(struct pt_regs *, unsigned long pc, unsigned long sp);
extern void flush_thread(void); extern void flush_thread(void);
extern void exit_thread(void); extern void exit_thread(void);
......
#ifndef SONYCD535_H
#define SONYCD535_H
/*
* define all the commands recognized by the CDU-531/5
*/
#define SONY535_REQUEST_DRIVE_STATUS_1 (0x80)
#define SONY535_REQUEST_SENSE (0x82)
#define SONY535_REQUEST_DRIVE_STATUS_2 (0x84)
#define SONY535_REQUEST_ERROR_STATUS (0x86)
#define SONY535_REQUEST_AUDIO_STATUS (0x88)
#define SONY535_INQUIRY (0x8a)
#define SONY535_SET_INACTIVITY_TIME (0x90)
#define SONY535_SEEK_AND_READ_N_BLOCKS_1 (0xa0)
#define SONY535_SEEK_AND_READ_N_BLOCKS_2 (0xa4)
#define SONY535_PLAY_AUDIO (0xa6)
#define SONY535_REQUEST_DISC_CAPACITY (0xb0)
#define SONY535_REQUEST_TOC_DATA (0xb2)
#define SONY535_REQUEST_SUB_Q_DATA (0xb4)
#define SONY535_REQUEST_ISRC (0xb6)
#define SONY535_REQUEST_UPC_EAN (0xb8)
#define SONY535_SET_DRIVE_MODE (0xc0)
#define SONY535_REQUEST_DRIVE_MODE (0xc2)
#define SONY535_SET_RETRY_COUNT (0xc4)
#define SONY535_DIAGNOSTIC_1 (0xc6)
#define SONY535_DIAGNOSTIC_4 (0xcc)
#define SONY535_DIAGNOSTIC_5 (0xce)
#define SONY535_EJECT_CADDY (0xd0)
#define SONY535_DISABLE_EJECT_BUTTON (0xd2)
#define SONY535_ENABLE_EJECT_BUTTON (0xd4)
#define SONY535_HOLD (0xe0)
#define SONY535_AUDIO_PAUSE_ON_OFF (0xe2)
#define SONY535_SET_VOLUME (0xe8)
#define SONY535_STOP (0xf0)
#define SONY535_SPIN_UP (0xf2)
#define SONY535_SPIN_DOWN (0xf4)
#define SONY535_CLEAR_PARAMETERS (0xf6)
#define SONY535_CLEAR_ENDING_ADDRESS (0xf8)
/*
* define some masks
*/
#define SONY535_DATA_NOT_READY_BIT (0x1)
#define SONY535_RESULT_NOT_READY_BIT (0x2)
/*
* drive status 1
*/
#define SONY535_STATUS1_COMMAND_ERROR (0x1)
#define SONY535_STATUS1_DATA_ERROR (0x2)
#define SONY535_STATUS1_SEEK_ERROR (0x4)
#define SONY535_STATUS1_DISC_TYPE_ERROR (0x8)
#define SONY535_STATUS1_NOT_SPINNING (0x10)
#define SONY535_STATUS1_EJECT_BUTTON_PRESSED (0x20)
#define SONY535_STATUS1_CADDY_NOT_INSERTED (0x40)
#define SONY535_STATUS1_BYTE_TWO_FOLLOWS (0x80)
/*
* drive status 2
*/
#define SONY535_CDD_LOADING_ERROR (0x7)
#define SONY535_CDD_NO_DISC (0x8)
#define SONY535_CDD_UNLOADING_ERROR (0x9)
#define SONY535_CDD_CADDY_NOT_INSERTED (0xd)
#define SONY535_ATN_RESET_OCCURRED (0x2)
#define SONY535_ATN_DISC_CHANGED (0x4)
#define SONY535_ATN_RESET_AND_DISC_CHANGED (0x6)
#define SONY535_ATN_EJECT_IN_PROGRESS (0xe)
#define SONY535_ATN_BUSY (0xf)
/*
* define some parameters
*/
#define SONY535_AUDIO_DRIVE_MODE (0)
#define SONY535_CDROM_DRIVE_MODE (0xe0)
#define SONY535_PLAY_OP_PLAYBACK (0)
#define SONY535_PLAY_OP_ENTER_HOLD (1)
#define SONY535_PLAY_OP_SET_AUDIO_ENDING_ADDR (2)
#define SONY535_PLAY_OP_SCAN_FORWARD (3)
#define SONY535_PLAY_OP_SCAN_BACKWARD (4)
/*
* convert from msf format to block number
*/
#define SONY_BLOCK_NUMBER(m,s,f) (((m)*60L+(s))*75L+(f))
#define SONY_BLOCK_NUMBER_MSF(x) (((x)[0]*60L+(x)[1])*75L+(x)[2])
/*
* error return values from the doSonyCmd() routines
*/
#define TIME_OUT (-1)
#define NO_CDROM (-2)
#define BAD_STATUS (-3)
#define CD_BUSY (-4)
#define NOT_DATA_CD (-5)
#define NO_ROOM (-6)
#define LOG_START_OFFSET 150 /* Offset of first logical sector */
#define SONY_JIFFIES_TIMEOUT 500 /* Maximum number of jiffies (10ms)
the drive will wait/try for an
operation */
#define SONY_READY_RETRIES (50000) /* How many times to retry a
spin waiting for a register
to come ready */
#define SONY535_FAST_POLLS (10000) /* how many times recheck
status waiting for a data
to become ready */
typedef unsigned char Byte;
/*
* This is the complete status returned from the drive configuration request
* command.
*/
struct s535_sony_drive_config
{
char vendor_id[8];
char product_id[16];
char product_rev_level[4];
};
/* The following is returned from the request sub-q data command */
struct s535_sony_subcode
{
unsigned char address :4;
unsigned char control :4;
unsigned char track_num;
unsigned char index_num;
unsigned char rel_msf[3];
unsigned char abs_msf[3];
};
struct s535_sony_disc_capacity
{
Byte mFirstTrack, sFirstTrack, fFirstTrack;
Byte mLeadOut, sLeadOut, fLeadOut;
};
/*
* The following is returned from the request TOC (Table Of Contents) command.
* (last_track_num-first_track_num+1) values are valid in tracks.
*/
struct s535_sony_toc
{
unsigned char reserved0 :4;
unsigned char control0 :4;
unsigned char point0;
unsigned char first_track_num;
unsigned char reserved0a;
unsigned char reserved0b;
unsigned char reserved1 :4;
unsigned char control1 :4;
unsigned char point1;
unsigned char last_track_num;
unsigned char dummy1;
unsigned char dummy2;
unsigned char reserved2 :4;
unsigned char control2 :4;
unsigned char point2;
unsigned char lead_out_start_msf[3];
struct
{
unsigned char reserved :4;
unsigned char control :4;
unsigned char track;
unsigned char track_start_msf[3];
} tracks[100];
unsigned int lead_out_start_lba;
};
#endif /* SONYCD535_H */
...@@ -105,6 +105,9 @@ extern void sbpcd_setup(char *str, int *ints); ...@@ -105,6 +105,9 @@ extern void sbpcd_setup(char *str, int *ints);
#ifdef CONFIG_CDU31A #ifdef CONFIG_CDU31A
extern void cdu31a_setup(char *str, int *ints); extern void cdu31a_setup(char *str, int *ints);
#endif CONFIG_CDU31A #endif CONFIG_CDU31A
#ifdef CONFIG_CDU535
extern void sonycd535_setup(char *str, int *ints);
#endif CONFIG_CDU535
void ramdisk_setup(char *str, int *ints); void ramdisk_setup(char *str, int *ints);
#ifdef CONFIG_SYSVIPC #ifdef CONFIG_SYSVIPC
...@@ -222,6 +225,9 @@ struct { ...@@ -222,6 +225,9 @@ struct {
#ifdef CONFIG_AZTCD #ifdef CONFIG_AZTCD
{ "aztcd=", aztcd_setup }, { "aztcd=", aztcd_setup },
#endif #endif
#ifdef CONFIG_CDU535
{ "sonycd535=", sonycd535_setup },
#endif CONFIG_CDU535
#ifdef CONFIG_SOUND #ifdef CONFIG_SOUND
{ "sound=", sound_setup }, { "sound=", sound_setup },
#endif #endif
......
...@@ -67,6 +67,7 @@ extern int sys_tz; ...@@ -67,6 +67,7 @@ extern int sys_tz;
extern int request_dma(unsigned int dmanr, char * deviceID); extern int request_dma(unsigned int dmanr, char * deviceID);
extern void free_dma(unsigned int dmanr); extern void free_dma(unsigned int dmanr);
extern int close_fp(struct file *filp, unsigned int fd);
extern void (* iABI_hook)(struct pt_regs * regs); extern void (* iABI_hook)(struct pt_regs * regs);
struct symbol_table symbol_table = { struct symbol_table symbol_table = {
...@@ -128,6 +129,7 @@ struct symbol_table symbol_table = { ...@@ -128,6 +129,7 @@ struct symbol_table symbol_table = {
X(namei), X(namei),
X(lnamei), X(lnamei),
X(open_namei), X(open_namei),
X(close_fp),
X(check_disk_change), X(check_disk_change),
X(invalidate_buffers), X(invalidate_buffers),
X(fsync_dev), X(fsync_dev),
......
This diff is collapsed.
...@@ -53,6 +53,7 @@ static void change_protection(unsigned long start, unsigned long end, pgprot_t n ...@@ -53,6 +53,7 @@ static void change_protection(unsigned long start, unsigned long end, pgprot_t n
*page_table = pte_modify(entry, newprot); *page_table = pte_modify(entry, newprot);
++page_table; ++page_table;
} while (--offset); } while (--offset);
dir++;
} }
return; return;
} }
......
#define THREE_LEVEL
/* /*
* linux/mm/vmalloc.c * linux/mm/vmalloc.c
* *
...@@ -32,7 +33,7 @@ static inline void set_pgdir(unsigned long address, pgd_t entry) ...@@ -32,7 +33,7 @@ static inline void set_pgdir(unsigned long address, pgd_t entry)
struct task_struct * p; struct task_struct * p;
for_each_task(p) for_each_task(p)
*PAGE_DIR_OFFSET(p,address) = entry; *pgd_offset(p,address) = entry;
} }
static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned long size) static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned long size)
...@@ -152,7 +153,7 @@ static int alloc_area_pages(unsigned long address, unsigned long size) ...@@ -152,7 +153,7 @@ static int alloc_area_pages(unsigned long address, unsigned long size)
pgd_t * dir; pgd_t * dir;
unsigned long end = address + size; unsigned long end = address + size;
dir = PAGE_DIR_OFFSET(&init_task, address); dir = pgd_offset(&init_task, address);
while (address < end) { while (address < end) {
pmd_t *pmd = pmd_alloc_kernel(dir, address); pmd_t *pmd = pmd_alloc_kernel(dir, address);
if (!pmd) if (!pmd)
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
* this fixed and the accept bug fixed * this fixed and the accept bug fixed
* some RPC stuff seems happier. * some RPC stuff seems happier.
* Niibe Yutaka : 4.4BSD style write async I/O * Niibe Yutaka : 4.4BSD style write async I/O
* Alan Cox,
* Tony Gale : Fixed reuse semantics.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -854,7 +856,7 @@ static int inet_bind(struct socket *sock, struct sockaddr *uaddr, ...@@ -854,7 +856,7 @@ static int inet_bind(struct socket *sock, struct sockaddr *uaddr,
destroy_sock(sk2); destroy_sock(sk2);
goto outside_loop; goto outside_loop;
} }
if (!sk->reuse) if (!sk->reuse || sk2->state==TCP_LISTEN)
{ {
sti(); sti();
return(-EADDRINUSE); return(-EADDRINUSE);
......
...@@ -680,7 +680,7 @@ int arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) ...@@ -680,7 +680,7 @@ int arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
having to use a huge number of proxy arp entries having to use a huge number of proxy arp entries
and having to keep them uptodate. and having to keep them uptodate.
*/ */
if (proxy_entry->htype == htype && if (proxy_entry->dev != dev &&
!((proxy_entry->ip^tip)&proxy_entry->mask)) !((proxy_entry->ip^tip)&proxy_entry->mask))
break; break;
......
...@@ -179,7 +179,7 @@ static void igmp_group_dropped(struct ip_mc_list *im) ...@@ -179,7 +179,7 @@ static void igmp_group_dropped(struct ip_mc_list *im)
del_timer(&im->timer); del_timer(&im->timer);
igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_LEAVE_MESSAGE); igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_LEAVE_MESSAGE);
ip_mc_filter_del(im->interface, im->multiaddr); ip_mc_filter_del(im->interface, im->multiaddr);
printk("Left group %lX\n",im->multiaddr); /* printk("Left group %lX\n",im->multiaddr);*/
} }
static void igmp_group_added(struct ip_mc_list *im) static void igmp_group_added(struct ip_mc_list *im)
...@@ -187,7 +187,7 @@ static void igmp_group_added(struct ip_mc_list *im) ...@@ -187,7 +187,7 @@ static void igmp_group_added(struct ip_mc_list *im)
igmp_init_timer(im); igmp_init_timer(im);
igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT); igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
ip_mc_filter_add(im->interface, im->multiaddr); ip_mc_filter_add(im->interface, im->multiaddr);
printk("Joined group %lX\n",im->multiaddr); /* printk("Joined group %lX\n",im->multiaddr);*/
} }
int igmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, int igmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
......
This diff is collapsed.
...@@ -544,7 +544,12 @@ ipxitf_rcv(ipx_interface *intrfc, struct sk_buff *skb) ...@@ -544,7 +544,12 @@ ipxitf_rcv(ipx_interface *intrfc, struct sk_buff *skb)
ipx_interface *i; ipx_interface *i;
/* See if we should update our network number */ /* See if we should update our network number */
if ((intrfc->if_netnum == 0L) && (ipx->ipx_tctrl == 0)) { if ((intrfc->if_netnum == 0L) &&
(ipx->ipx_source.net == ipx->ipx_dest.net)) {
/* NB: NetWare servers lie about their hop count so we
* dropped the test based on it. This is the best way
* to determine this is a 0 hop count packet.
*/
if ((i=ipxitf_find_using_net(ipx->ipx_source.net))==NULL) { if ((i=ipxitf_find_using_net(ipx->ipx_source.net))==NULL) {
intrfc->if_netnum = ipx->ipx_source.net; intrfc->if_netnum = ipx->ipx_source.net;
(void) ipxitf_add_local_route(intrfc); (void) ipxitf_add_local_route(intrfc);
...@@ -558,8 +563,15 @@ ipxitf_rcv(ipx_interface *intrfc, struct sk_buff *skb) ...@@ -558,8 +563,15 @@ ipxitf_rcv(ipx_interface *intrfc, struct sk_buff *skb)
} }
} }
if (intrfc->if_netnum != ipx->ipx_dest.net) if (intrfc->if_netnum != ipx->ipx_dest.net) {
return ipxrtr_route_skb(skb); /* We only route point-to-point packets. */
if ((skb->pkt_type != PACKET_BROADCAST) &&
(skb->pkt_type != PACKET_MULTICAST))
return ipxrtr_route_skb(skb);
kfree_skb(skb,FREE_READ);
return 0;
}
/* see if we should keep it */ /* see if we should keep it */
if ((memcmp(ipx_broadcast_node, ipx->ipx_dest.node, IPX_NODE_LEN) == 0) if ((memcmp(ipx_broadcast_node, ipx->ipx_dest.node, IPX_NODE_LEN) == 0)
......
...@@ -301,7 +301,8 @@ void ip_rt_add(short flags, unsigned long dst, unsigned long mask, ...@@ -301,7 +301,8 @@ void ip_rt_add(short flags, unsigned long dst, unsigned long mask,
rp = &rt_base; rp = &rt_base;
while ((r = *rp) != NULL) while ((r = *rp) != NULL)
{ {
if (r->rt_dst != dst) if (r->rt_dst != dst ||
r->rt_mask != mask)
{ {
rp = &r->rt_next; rp = &r->rt_next;
continue; continue;
......
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