Commit 6caf23d5 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.52

parent 85ed1260
......@@ -317,13 +317,20 @@ CONFIG_M486
not sure, say N; This option will make the kernel use some
instructions that are only available on 486+ machines.
Enable loadable module support
CONFIG_MODULES
Kernel modules are small pieces of compiled code which can be
inserted in or removed from the running kernel, using the
programs insmod and rmmod. This is described in the file
Documentation/modules.txt. Modules can be device drivers, file
systems, binary executable formats, and so on. If you think that
you may want to make use of modules with this kernel in the future,
then say Y here.
Set version information on all symbols for modules
CONFIG_MODVERSIONS
Kernel modules are pieces of code which can be inserted in or
removed from the running kernel, using the programs insmod and
rmmod. This is described in the file
Documentation/modules.txt. Usually, modules have to be recompiled
whenever you switch to a new kernel. Enabling this option allows you
Usually, modules have to be recompiled whenever you
switch to a new kernel. Enabling this option allows you
to keep using the same modules even after compiling a new kernel;
this requires the program modprobe. All the software needed for
module support is in the modules package in
......@@ -813,14 +820,16 @@ CONFIG_SCSI_U14_34F
Future Domain 16xx SCSI support
CONFIG_SCSI_FUTURE_DOMAIN
This is support for an SCSI host adaptor. It is explained in section
3.7 of the SCSI-HOWTO, available via ftp (user: anonymous) at
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If it doesn't work out of
the box, you may have to change some settings in
drivers/scsi/fdomain.h. This driver is also available as a module (
= code which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read Documentation/modules.txt.
This is support for Future Domain's 16-bit SCSI host adaptors
(TMC-1660/1680, TMC-1650/1670, TMC-3260) and other adaptors based on the
Future Domain chipsets (Quantum ISA-200S, ISA-250MG; and at least one IBM
board). It is explained in section 3.7 of the SCSI-HOWTO, available via
ftp (user: anonymous) at sunsite.unc.edu:/pub/Linux/docs/HOWTO. If it
doesn't work out of the box, you may have to change some settings in
drivers/scsi/fdomain.h. This driver is also available as a module ( =
code which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M here and
read Documentation/modules.txt.
Generic NCR5380 SCSI support
CONFIG_SCSI_GENERIC_NCR5380
......@@ -2183,6 +2192,54 @@ CONFIG_SUN_ZS
This driver does not exist at this point, so you might as well say
N.
Advanced Power Management
CONFIG_APM
This driver provides APM support on machines with an APM-compliant 32-bit
BIOS. Specifically, the time will be reset after a USER RESUME
operation, the /proc/apm device will provide battery status information,
and ioctls are provided to put the machine in STANDBY or SUSPEND mode.
This is most useful on laptops with a compliant BIOS.
Ignore USER SUSPEND
CONFIG_APM_IGNORE_USER_SUSPEND
This option will ignore USER SUSPEND requests. On machines with a
compliant APM BIOS, this is never what you want to do. However, this is
necessary on the NEC Versa M series, which generates these when resuming
from SYSTEM SUSPEND. Enabling this on other laptops may cause the laptop
to generate a CRITICAL SUSPEND when an appropriate USER SUSPEND is
ignored -- this may prevent the APM driver from updating the system time
on a RESUME.
Enable APM features
CONFIG_APM_DO_ENABLE
Enable APM features at boot time. From page 36 of the APM BIOS
specification: "When disabled, the APM BIOS does not automatically power
manage devices, enter the Standby State, enter the Suspend State, or take
power saving steps in response to CPU Idle calls." This driver will make
CPU Idle calls when Linux is idle (unless this feature is turned off --
see below). This should always save battery power, but more complicated
APM features will be dependent on your BIOS implementation. You may need
to turn this option off if your computer hangs at boot time when using
APM support, or if it beeps continuously instead of suspending. Turn
this off if you have a NEC UltraLite Versa 33/C or a Toshiba T400CDT.
This is off by default since most machines do fine without this feature.
Do CPU IDLE calls
CONFIG_APM_CPU_IDLE
Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop. On
some machines, this can activate improved power savings, such as a slowed
CPU clock rate, when the machine is idle. These idle call is made after
the idle loop has run for some length of time (e.g., 333 mS). On some
machines, this will cause a hang at boot time or whenever the CPU becomes
idle. (On machines with more than one CPU, this option does nothing.)
Black display
CONFIG_APM_DISPLAY_BLANK
Enable console blanking using the APM. Some laptops can use this to turn
off the LCD backlight when the VC screen blanker blanks the screen. Note
that this is only used by the VC screen blanker, and won't turn off the
backlight when using X11.
Sound card support
CONFIG_SOUND
If you have a Sound Card in your Computer, i.e. if it can say more
......
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 51
SUBLEVEL = 52
ARCH = i386
......@@ -243,7 +243,7 @@ net: dummy
$(MAKE) linuxsubdirs SUBDIRS=net
MODFLAGS = -DMODULE
ifdef CONFIG_MODULES
ifdef CONFIG_MODVERSIONS
MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
endif
......@@ -273,6 +273,18 @@ modules_install:
rm -f .misc .allmods; \
)
# modules disabled....
else
modules modules_install: dummy
@echo
@echo "The present kernel configuration has modules disabled."
@echo "Type 'make config' and enable loadable module support."
@echo "Then build a kernel with module support enabled."
@echo
@exit 1
endif
clean: archclean
rm -f kernel/ksyms.lst include/linux/compile.h
rm -f core `find . -name '*.[oas]' -print`
......
......@@ -9,6 +9,14 @@ unset CONFIG_CROSSCOMPILE CONFIG_NATIVE
unset CONFIG_PCI CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS
unset CONFIG_ALPHA_NEED_ROUNDING_EMULATION
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
MODULES=y
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
fi
mainmenu_option next_comment
comment 'General setup'
......@@ -50,10 +58,6 @@ bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
source drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then
......
......@@ -2,6 +2,12 @@
# Automatically generated make config: don't edit
#
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
#
# General setup
#
......@@ -23,11 +29,6 @@ CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BINFMT_ELF is not set
#
# Loadable module support
#
# CONFIG_MODVERSIONS is not set
#
# block devices
#
......
......@@ -4,6 +4,14 @@
#
mainmenu_name "Linux Kernel Configuration"
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
MODULES=y
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
fi
mainmenu_option next_comment
comment 'General setup'
......@@ -24,10 +32,6 @@ fi
bool 'Use 486-specific optimizations (does NOT work on i386)' CONFIG_M486
#fi
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
source drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then
......
......@@ -2,6 +2,12 @@
# Automatically generated make config: don't edit
#
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
#
# General setup
#
......@@ -15,11 +21,6 @@ CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_M486=y
#
# Loadable module support
#
# CONFIG_MODVERSIONS is not set
#
# block devices
#
......@@ -98,6 +99,7 @@ CONFIG_EL3=y
#
# Filesystems
#
# CONFIG_QUOTA is not set
CONFIG_MINIX_FS=y
# CONFIG_EXT_FS is not set
CONFIG_EXT2_FS=y
......@@ -124,6 +126,7 @@ CONFIG_ISO9660_FS=y
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
#
# Sound
......
This diff is collapsed.
......@@ -198,7 +198,15 @@ struct atapi_toc_entry {
unsigned adr : 4;
byte track;
byte reserved2;
unsigned lba;
union {
unsigned lba;
struct {
byte reserved3;
byte m;
byte s;
byte f;
} msf;
} addr;
};
struct atapi_toc {
......@@ -209,6 +217,43 @@ struct atapi_toc {
struct atapi_toc_entry ent[MAX_TRACKS+1]; /* One extra for the leadout. */
};
/* This structure is annoyingly close to, but not identical with,
the cdrom_subchnl structure from cdrom.h. */
struct atapi_cdrom_subchnl
{
u_char acdsc_reserved;
u_char acdsc_audiostatus;
u_short acdsc_length;
u_char acdsc_format;
u_char acdsc_adr: 4;
u_char acdsc_ctrl: 4;
u_char acdsc_trk;
u_char acdsc_ind;
union
{
struct
{
u_char minute;
u_char second;
u_char frame;
} msf;
int lba;
} acdsc_absaddr;
union
{
struct
{
u_char minute;
u_char second;
u_char frame;
} msf;
int lba;
} acdsc_reladdr;
};
/* Extra per-device info for cdrom drives. */
struct cdrom_info {
......
......@@ -237,6 +237,7 @@ int ether_config(struct device *dev, struct ifmap *map)
return 0;
}
#ifdef CONFIG_MODULES
int register_netdev(struct device *dev)
{
struct device *d = dev_base;
......@@ -356,6 +357,7 @@ void unregister_netdev(struct device *dev)
restore_flags(flags);
}
#endif /* CONFIG_MODULES */
......
......@@ -69,9 +69,11 @@ struct pci_dev_info dev_info[] = {
DEVICE( CIRRUS, CIRRUS_5430, "GD 5430"),
DEVICE( CIRRUS, CIRRUS_5434_4, "GD 5434"),
DEVICE( CIRRUS, CIRRUS_5434_8, "GD 5434"),
DEVICE( CIRRUS, CIRRUS_5436, "GD 5436"),
DEVICE( CIRRUS, CIRRUS_6729, "CL 6729"),
DEVICE( CIRRUS, CIRRUS_7542, "CL 7542"),
DEVICE( CIRRUS, CIRRUS_7543, "CL 7543"),
DEVICE( WD, WD_7197, "WD 7197"),
DEVICE( AMD, AMD_LANCE, "79C970"),
DEVICE( AMD, AMD_SCSI, "53C974"),
DEVICE( TRIDENT, TRIDENT_9420, "TG 9420"),
......@@ -83,6 +85,7 @@ struct pci_dev_info dev_info[] = {
DEVICE( MATROX, MATROX_MGA_IMP, "MGA Impression"),
DEVICE( CT, CT_65545, "65545"),
DEVICE( FD, FD_36C70, "TMC-18C30"),
DEVICE( SI, SI_6202, "6202"),
DEVICE( SI, SI_503, "85C503"),
DEVICE( SI, SI_501, "85C501"),
DEVICE( SI, SI_496, "85C496"),
......@@ -103,10 +106,13 @@ struct pci_dev_info dev_info[] = {
DEVICE( N9, N9_I128, "Imagine 128"),
DEVICE( UMC, UMC_UM8673F, "UM8673F"),
BRIDGE( UMC, UMC_UM8891A, "UM8891A", 0x01),
DEVICE( UMC, UMC_UM8886BF, "UM8886BF"),
DEVICE( UMC, UMC_UM8886A, "UM8886A"),
BRIDGE( UMC, UMC_UM8881F, "UM8881F", 0x02),
DEVICE( UMC, UMC_UM8886F, "UM8886F"),
DEVICE( UMC, UMC_UM9017F, "UM9017F"),
DEVICE( UMC, UMC_UM8886N, "UM8886N"),
DEVICE( UMC, UMC_UM8891N, "UM8891N"),
DEVICE( X, X_AGX016, "ITT AGX016"),
DEVICE( QLOGIC, QLOGIC_ISP1020, "ISP1020"),
DEVICE( QLOGIC, QLOGIC_ISP1022, "ISP1022"),
......@@ -126,6 +132,7 @@ struct pci_dev_info dev_info[] = {
DEVICE( AL, AL_M1449, "M1449"),
DEVICE( AL, AL_M1451, "M1451"),
DEVICE( AL, AL_M1461, "M1461"),
DEVICE( AL, AL_M1489, "M1489"),
DEVICE( AL, AL_M4803, "M4803"),
DEVICE( ASP, ASP_ABP940, "ABP940"),
DEVICE( IMS, IMS_8849, "8849"),
......@@ -139,6 +146,7 @@ struct pci_dev_info dev_info[] = {
DEVICE( EF, EF_ATM_ASIC, "155P-MF1 (ASIC)"),
DEVICE( IMAGINGTECH, IMAGINGTECH_ICPCI, "MVC IC-PCI"),
DEVICE( PLX, PLX_9060, "PCI9060 i960 bridge"),
DEVICE( ALLIANCE, ALLIANCE_PROMOTIO, "Promotion-6410"),
DEVICE( ALLIANCE, ALLIANCE_PROVIDEO, "Provideo"),
DEVICE( MUTECH, MUTECH_MV1000, "MV-1000"),
DEVICE( ZEITNET, ZEITNET_1221, "1221"),
......@@ -388,6 +396,7 @@ const char *pci_strvendor(unsigned int vendor)
case PCI_VENDOR_ID_DEC: return "DEC";
case PCI_VENDOR_ID_CIRRUS: return "Cirrus Logic";
case PCI_VENDOR_ID_IBM: return "IBM";
case PCI_VENDOR_ID_WD: return "Western Digital";
case PCI_VENDOR_ID_AMD: return "AMD";
case PCI_VENDOR_ID_TRIDENT: return "Trident";
case PCI_VENDOR_ID_AI: return "Acer Incorporated";
......@@ -407,6 +416,7 @@ const char *pci_strvendor(unsigned int vendor)
case PCI_VENDOR_ID_QLOGIC: return "Q Logic";
case PCI_VENDOR_ID_LEADTEK: return "Leadtek Research";
case PCI_VENDOR_ID_CONTAQ: return "Contaq";
case PCI_VENDOR_ID_FOREX: return "Forex";
case PCI_VENDOR_ID_OLICOM: return "Olicom";
case PCI_VENDOR_ID_CMD: return "CMD";
case PCI_VENDOR_ID_VISION: return "Vision";
......@@ -418,6 +428,7 @@ const char *pci_strvendor(unsigned int vendor)
case PCI_VENDOR_ID_ASP: return "Advanced System Products";
case PCI_VENDOR_ID_IMS: return "IMS";
case PCI_VENDOR_ID_TEKRAM2: return "Tekram";
case PCI_VENDOR_ID_AMCC: return "AMCC";
case PCI_VENDOR_ID_REALTEK: return "Realtek";
case PCI_VENDOR_ID_VIA: return "VIA Technologies";
case PCI_VENDOR_ID_VORTEX: return "VORTEX";
......
......@@ -2147,8 +2147,10 @@ static int update_timeout(Scsi_Cmnd * SCset, int timeout)
#define MALLOC_PAGEBITS 12
#ifdef CONFIG_MODULES
static int scsi_register_host(Scsi_Host_Template *);
static void scsi_unregister_host(Scsi_Host_Template *);
#endif
void *scsi_malloc(unsigned int len)
{
......@@ -2638,6 +2640,8 @@ static void resize_dma_pool(void)
restore_flags(flags);
}
#ifdef CONFIG_MODULES /* a big #ifdef block... */
/*
* This entry point should be called by a loadable module if it is trying
* add a low level scsi driver to the system.
......@@ -3044,6 +3048,8 @@ void scsi_unregister_module(int module_type, void * ptr)
return;
}
#endif /* CONFIG_MODULES */
#ifdef DEBUG_TIMEOUT
static void
scsi_dump_status(void)
......
......@@ -5,6 +5,9 @@
* Development Sponsored by Killy Corp. NY NY
*
* Borrows code from st driver.
*
* Version from 1.3.51 modified by Rick Richardson to fix problem in
* detecting whether its a send or a recieve style command (see sg_write)
*/
#include <linux/module.h>
......@@ -341,10 +344,18 @@ static int sg_write(struct inode *inode,struct file *filp,const char *buf,int co
/*
* fix input size, and see if we are sending data.
*
* Mod by Rick Richardson (rick@dgii.com):
* The original test to see if its a SEND/REC was:
* if( device->header.pack_len > device->header.reply_len )
* I haven't a clue why the author thought this would work. Instead,
* I've changed it to see if there is any additional data in this
* packet beyond the length of the SCSI command itself.
*/
device->header.pack_len=count;
buf+=sizeof(struct sg_header);
if( device->header.pack_len > device->header.reply_len )
size = COMMAND_SIZE(get_user(buf)) + sizeof(struct sg_header);
if( device->header.pack_len > size)
{
bsize = device->header.pack_len;
direction = SG_SEND;
......
......@@ -1021,6 +1021,8 @@ static void get_sectorsize(int i){
scsi_CDs[i].sector_size = (buffer[4] << 24) |
(buffer[5] << 16) | (buffer[6] << 8) | buffer[7];
if(scsi_CDs[i].sector_size == 0) scsi_CDs[i].sector_size = 2048;
/* Work around bug/feature in HP 4020i CD-Recorder... */
if(scsi_CDs[i].sector_size == 2340) scsi_CDs[i].sector_size = 2048;
if(scsi_CDs[i].sector_size != 2048 &&
scsi_CDs[i].sector_size != 512) {
printk ("scd%d : unsupported sector size %d.\n",
......
......@@ -1042,6 +1042,10 @@ int bread_page(unsigned long address, kdev_t dev, int b[], int size)
}
tmp = get_hash_table(dev, block, size);
if (tmp) {
if (!buffer_uptodate(tmp)) {
ll_rw_block(READ, 1, &tmp);
wait_on_buffer(tmp);
}
memcpy(next->b_data, tmp->b_data, size);
brelse(tmp);
continue;
......@@ -1789,6 +1793,8 @@ int bdflush(void * unused) {
in a few more things so "top" and /proc/2/{exe,root,cwd}
display semi-sane things. Not real crucial though... */
current->session = 1;
current->pgrp = 1;
sprintf(current->comm, "kernel bdflush");
for (;;) {
......
......@@ -55,7 +55,7 @@ extern void dump_thread(struct pt_regs *, struct user *);
/*
* Here are the actual binaries that will be accepted:
* add more with "register_binfmt()"..
* add more with "register_binfmt()" if using modules...
*/
extern struct linux_binfmt elf_format;
......@@ -69,6 +69,7 @@ static struct linux_binfmt aout_format = {
static struct linux_binfmt *formats = &aout_format;
#ifdef CONFIG_MODULES
int register_binfmt(struct linux_binfmt * fmt)
{
struct linux_binfmt ** tmp = &formats;
......@@ -100,6 +101,7 @@ int unregister_binfmt(struct linux_binfmt * fmt)
}
return -EINVAL;
}
#endif /* CONFIG_MODULES */
int open_inode(struct inode * inode, int mode)
{
......
......@@ -416,28 +416,19 @@ int open_namei(const char * pathname, int flag, int mode,
return -EPERM;
}
if (flag & O_TRUNC) {
struct iattr newattrs;
if ((error = get_write_access(inode))) {
iput(inode);
return error;
}
if (inode->i_sb && inode->i_sb->dq_op)
inode->i_sb->dq_op->initialize(inode, -1);
newattrs.ia_size = 0;
newattrs.ia_valid = ATTR_SIZE;
if ((error = notify_change(inode, &newattrs))) {
put_write_access(inode);
error = do_truncate(inode, 0);
put_write_access(inode);
if (error) {
iput(inode);
return error;
}
down(&inode->i_sem);
inode->i_size = 0;
if (inode->i_op && inode->i_op->truncate)
inode->i_op->truncate(inode);
up(&inode->i_sem);
inode->i_dirt = 1;
put_write_access(inode);
} else
if (flag & FMODE_WRITE)
if (inode->i_sb && inode->i_sb->dq_op)
......
......@@ -61,21 +61,27 @@ asmlinkage int sys_fstatfs(unsigned int fd, struct statfs * buf)
return 0;
}
static int do_truncate(struct inode *inode, unsigned long length)
int do_truncate(struct inode *inode, unsigned long length)
{
int error;
struct iattr newattrs;
newattrs.ia_size = length;
newattrs.ia_ctime = newattrs.ia_mtime = CURRENT_TIME;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME | ATTR_MTIME;
error = notify_change(inode, &newattrs);
if (error)
return error;
/* truncate virtual mappings of this file */
down(&inode->i_sem);
vmtruncate(inode, length);
inode->i_size = newattrs.ia_size = length;
inode->i_size = length;
inode->i_dirt = 1;
if (inode->i_op && inode->i_op->truncate)
inode->i_op->truncate(inode);
up(&inode->i_sem);
newattrs.ia_ctime = newattrs.ia_mtime = CURRENT_TIME;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME | ATTR_MTIME;
inode->i_dirt = 1;
return notify_change(inode, &newattrs);
return 0;
}
asmlinkage int sys_truncate(const char * path, unsigned long length)
......
......@@ -8,7 +8,12 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := proc.o
O_OBJS := inode.o root.o base.o mem.o link.o fd.o array.o kmsg.o net.o scsi.o
O_OBJS := inode.o root.o base.o mem.o link.o fd.o array.o kmsg.o net.o
M_OBJS := $(O_TARGET)
# For either CONFIG_SCSI=y or CONFIG_SCSI=m
ifdef CONFIG_SCSI
O_OBJS += scsi.o
endif
include $(TOPDIR)/Rules.make
......@@ -770,10 +770,12 @@ static int read_maps (int pid, struct file * file, char * buf, int count)
return destptr-buf;
}
#ifdef CONFIG_MODULES
extern int get_module_list(char *);
extern int get_ksyms_list(char *, char **, off_t, int);
#endif
extern int get_device_list(char *);
extern int get_filesystem_list(char *);
extern int get_ksyms_list(char *, char **, off_t, int);
extern int get_irq_list(char *);
extern int get_dma_list(char *);
extern int get_cpuinfo(char *);
......@@ -807,9 +809,14 @@ static int get_root_array(char * page, int type, char **start, off_t offset, int
return get_malloc(page);
#endif
#ifdef CONFIG_MODULES
case PROC_MODULES:
return get_module_list(page);
case PROC_KSYMS:
return get_ksyms_list(page, start, offset, length);
#endif
case PROC_STAT:
return get_kstat(page);
......@@ -822,9 +829,6 @@ static int get_root_array(char * page, int type, char **start, off_t offset, int
case PROC_FILESYSTEMS:
return get_filesystem_list(page);
case PROC_KSYMS:
return get_ksyms_list(page, start, offset, length);
case PROC_DMA:
return get_dma_list(page);
......
......@@ -12,6 +12,7 @@
#include <linux/stat.h>
#include <linux/locks.h>
#include <linux/limits.h>
#include <linux/config.h>
#include <asm/system.h>
#include <asm/segment.h>
......@@ -170,11 +171,13 @@ void proc_read_inode(struct inode * inode)
case PROC_NET:
inode->i_nlink = 2;
break;
#ifdef CONFIG_SCSI
case PROC_SCSI:
inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
inode->i_nlink = 2;
inode->i_op = &proc_scsi_inode_operations;
break;
#endif
case PROC_KCORE:
inode->i_mode = S_IFREG | S_IRUSR;
inode->i_op = &proc_kcore_inode_operations;
......
......@@ -131,6 +131,7 @@ struct proc_dir_entry proc_net = {
NULL, NULL
};
#ifdef CONFIG_SCSI
struct proc_dir_entry proc_scsi = {
PROC_SCSI, 4, "scsi",
S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0,
......@@ -138,6 +139,7 @@ struct proc_dir_entry proc_scsi = {
NULL, NULL,
NULL, &proc_root, NULL
};
#endif
int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
{
......@@ -258,7 +260,9 @@ void proc_root_init(void)
});
proc_register(&proc_root, &proc_net);
#ifdef CONFIG_SCSI
proc_register(&proc_root, &proc_scsi);
#endif
#ifdef CONFIG_DEBUG_MALLOC
proc_register(&proc_root, &(struct proc_dir_entry) {
......@@ -270,10 +274,17 @@ void proc_root_init(void)
PROC_KCORE, 5, "kcore",
S_IFREG | S_IRUSR, 1, 0, 0,
});
#ifdef CONFIG_MODULES
proc_register(&proc_root, &(struct proc_dir_entry) {
PROC_MODULES, 7, "modules",
S_IFREG | S_IRUGO, 1, 0, 0,
});
proc_register(&proc_root, &(struct proc_dir_entry) {
PROC_KSYMS, 5, "ksyms",
S_IFREG | S_IRUGO, 1, 0, 0,
});
#endif
proc_register(&proc_root, &(struct proc_dir_entry) {
PROC_STAT, 4, "stat",
S_IFREG | S_IRUGO, 1, 0, 0,
......@@ -290,10 +301,6 @@ void proc_root_init(void)
PROC_FILESYSTEMS, 11,"filesystems",
S_IFREG | S_IRUGO, 1, 0, 0,
});
proc_register(&proc_root, &(struct proc_dir_entry) {
PROC_KSYMS, 5, "ksyms",
S_IFREG | S_IRUGO, 1, 0, 0,
});
proc_register(&proc_root, &(struct proc_dir_entry) {
PROC_DMA, 3, "dma",
S_IFREG | S_IRUGO, 1, 0, 0,
......
......@@ -38,9 +38,9 @@ static int proc_scsilseek(struct inode *, struct file *, off_t, int);
extern void build_proc_dir_hba_entries(uint);
/* the *_get_info() functions are in the respective scsi driver code */
extern int (* dispatch_scsi_info_ptr)(int, char *, char **, off_t, int, int);
int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
off_t offset, int length, int inout) = 0;
static struct file_operations proc_scsi_operations = {
proc_scsilseek, /* lseek */
proc_readscsi, /* read */
......
......@@ -159,6 +159,7 @@ int register_filesystem(struct file_system_type * fs)
return 0;
}
#ifdef CONFIG_MODULES
int unregister_filesystem(struct file_system_type * fs)
{
struct file_system_type ** tmp;
......@@ -174,6 +175,7 @@ int unregister_filesystem(struct file_system_type * fs)
}
return -EINVAL;
}
#endif
static int fs_index(const char * __name)
{
......
......@@ -450,7 +450,7 @@ extern void kill_fasync(struct fasync_struct *fa, int sig);
extern int getname(const char * filename, char **result);
extern void putname(char * name);
extern int do_truncate(struct inode *, unsigned long);
extern int register_blkdev(unsigned int, const char *, struct file_operations *);
extern int unregister_blkdev(unsigned int major, const char * name);
extern int blkdev_open(struct inode * inode, struct file * filp);
......
......@@ -259,15 +259,19 @@
#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014
#define PCI_VENDOR_ID_CIRRUS 0x1013
#define PCI_DEVICE_ID_CIRRUS_5430 0x00A0
#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00A4
#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00A8
#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0
#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4
#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8
#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac
#define PCI_DEVICE_ID_CIRRUS_6729 0x1100
#define PCI_DEVICE_ID_CIRRUS_7542 0x1200
#define PCI_DEVICE_ID_CIRRUS_7543 0x1202
#define PCI_VENDOR_ID_IBM 0x1014
#define PCI_VENDOR_ID_WD 0x101c
#define PCI_DEVICE_ID_WD_7197 0x3296
#define PCI_VENDOR_ID_AMD 0x1022
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
#define PCI_DEVICE_ID_AMD_SCSI 0x2020
......@@ -292,6 +296,7 @@
#define PCI_DEVICE_ID_FD_36C70 0x0000
#define PCI_VENDOR_ID_SI 0x1039
#define PCI_DEVICE_ID_SI_6202 0x0002
#define PCI_DEVICE_ID_SI_503 0x0008
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_496 0x0496
......@@ -328,10 +333,13 @@
#define PCI_VENDOR_ID_UMC 0x1060
#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
#define PCI_DEVICE_ID_UMC_UM8891A 0x0891
#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a
#define PCI_DEVICE_ID_UMC_UM8886A 0x886a
#define PCI_DEVICE_ID_UMC_UM8881F 0x8881
#define PCI_DEVICE_ID_UMC_UM8886F 0x8886
#define PCI_DEVICE_ID_UMC_UM9017F 0x9017
#define PCI_DEVICE_ID_UMC_UM8886N 0xe886
#define PCI_DEVICE_ID_UMC_UM8891N 0xe891
#define PCI_VENDOR_ID_X 0x1061
#define PCI_DEVICE_ID_X_AGX016 0x0001
......@@ -346,6 +354,8 @@
#define PCI_VENDOR_ID_CONTAQ 0x1080
#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600
#define PCI_VENDOR_ID_FOREX 0x1083
#define PCI_VENDOR_ID_OLICOM 0x108d
#define PCI_VENDOR_ID_CMD 0x1095
......@@ -375,6 +385,7 @@
#define PCI_DEVICE_ID_AL_M1449 0x1449
#define PCI_DEVICE_ID_AL_M1451 0x1451
#define PCI_DEVICE_ID_AL_M1461 0x1461
#define PCI_DEVICE_ID_AL_M1489 0x1489
#define PCI_DEVICE_ID_AL_M4803 0x5215
#define PCI_VENDOR_ID_ASP 0x10cd
......@@ -386,6 +397,8 @@
#define PCI_VENDOR_ID_TEKRAM2 0x10e1
#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c
#define PCI_VENDOR_ID_AMCC 0x10e8
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
......@@ -408,6 +421,7 @@
#define PCI_DEVICE_ID_PLX_9060 0x0001
#define PCI_VENDOR_ID_ALLIANCE 0x1142
#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210
#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422
#define PCI_VENDOR_ID_MUTECH 0x1159
......
......@@ -594,7 +594,9 @@ asmlinkage void start_kernel(void)
sched_init();
time_init();
parse_options(command_line);
#ifdef CONFIG_MODULES
init_modules();
#endif
#ifdef CONFIG_PROFILE
if (!prof_shift)
#ifdef CONFIG_PROFILE_SHIFT
......
......@@ -14,7 +14,10 @@ O_TARGET := kernel.o
O_OBJS = sched.o dma.o fork.o exec_domain.o panic.o printk.o sys.o \
module.o exit.o signal.o itimer.o info.o time.o softirq.o \
resource.o
ifeq ($(CONFIG_MODULES),y)
OX_OBJS = ksyms.o
endif
include $(TOPDIR)/Rules.make
......
......@@ -37,6 +37,7 @@
#include <linux/minix_fs.h>
#include <linux/ext2_fs.h>
#include <linux/random.h>
#include <linux/mount.h>
extern unsigned char aux_device_present, kbd_read_mask;
......@@ -79,6 +80,7 @@ extern void __remqu (void);
#include <net/udp.h>
#include <net/tcp.h>
#include <net/route.h>
#include <linux/net_alias.h>
#if defined(CONFIG_PPP) || defined(CONFIG_SLIP)
#include "../drivers/net/slhc.h"
#endif
......@@ -122,15 +124,12 @@ extern void *sys_call_table;
#include "../drivers/scsi/scsi_ioctl.h"
#include "../drivers/scsi/hosts.h"
#include "../drivers/scsi/constants.h"
#include "../drivers/scsi/sd.h"
#include <linux/scsicam.h>
extern int generic_proc_info(char *, char **, off_t, int, int, int);
#endif
int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
off_t offset, int length,
int inode, int func) = 0; /* Dirty hack */
extern int sys_tz;
extern int request_dma(unsigned int dmanr, char * deviceID);
extern void free_dma(unsigned int dmanr);
......@@ -500,7 +499,6 @@ struct symbol_table symbol_table = {
X(kernel_scsi_ioctl),
X(need_isa_buffer),
X(request_queueable),
X(dispatch_scsi_info_ptr),
X(generic_proc_info),
X(scsi_devices),
X(gendisk_head), /* Needed for sd.c */
......@@ -515,7 +513,6 @@ struct symbol_table symbol_table = {
*/
X(gendisk_head),
X(resetup_one_dev),
X(dispatch_scsi_info_ptr),
#endif
/* Added to make file system as module */
X(set_writetime),
......@@ -563,8 +560,10 @@ struct symbol_table symbol_table = {
X(proc_unregister),
X(in_group_p),
X(generate_cluster),
#ifdef CONFIG_SCSI
X(proc_scsi),
X(proc_scsi_inode_operations),
#endif
X(proc_net_inode_operations),
X(proc_net),
#endif
......
......@@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/config.h>
/*
* Originally by Anonymous (as far as I know...)
* Linux version by Bas Laarhoven <bas@vimec.nl>
......@@ -38,8 +39,13 @@
* On 1-Aug-95: <Matti.Aarnio@utu.fi> altered code to use same style as
* do /proc/net/XXX "files". Namely allow more than 4kB
* (or what the block size if) output.
*
* - Use dummy syscall functions for users who disable all
* module support. Similar to kernel/sys.c (Paul Gortmaker)
*/
#ifdef CONFIG_MODULES /* a *big* #ifdef block... */
#ifdef DEBUG_MODULE
#define PRINTK(a) printk a
#else
......@@ -781,3 +787,30 @@ register_symtab(struct symbol_table *intab)
return 0;
}
#else /* CONFIG_MODULES */
/* Dummy syscalls for people who don't want modules */
asmlinkage unsigned long sys_create_module(void)
{
return -ENOSYS;
}
asmlinkage int sys_init_module(void)
{
return -ENOSYS;
}
asmlinkage int sys_delete_module(void)
{
return -ENOSYS;
}
asmlinkage int sys_get_kernel_syms(void)
{
return -ENOSYS;
}
#endif /* CONFIG_MODULES */
......@@ -709,8 +709,8 @@ static inline void add_mem_queue(struct mem_list * head, struct mem_list * entry
static inline void remove_mem_queue(struct mem_list * head, struct mem_list * entry)
{
entry->next->prev = entry->prev;
entry->prev->next = entry->next;
struct mem_list * next = entry->next;
(next->prev = entry->prev)->next = next;
}
/*
......
......@@ -5334,8 +5334,7 @@ static void tcp_write_wakeup(struct sock *sk)
* Find the first data byte.
*/
tcp_data_start = skb->ip_hdr +
((iph->ihl + th->doff) << 2);
tcp_data_start = (char *) th + (th->doff << 2);
/*
* Add it to our new buffer
......
......@@ -22,6 +22,9 @@
#
# 301195 (boldt@math.ucsb.edu) - added help text support
#
# 281295 Paul Gortmaker - make tri_state functions collapse to boolean
# if module support is not enabled.
#
#
# Make sure we're really running bash.
......@@ -137,7 +140,8 @@ function define_bool () {
function bool () {
def=$(eval echo "\${$2:-'n'}")
case "$def" in
"y") defprompt="Y/n/?"
"y" | "m") defprompt="Y/n/?"
def="y"
;;
"n") defprompt="N/y/?"
;;
......@@ -161,28 +165,32 @@ function bool () {
# tristate question define
#
function tristate () {
def=$(eval echo "\${$2:-'n'}")
case "$def" in
"y") defprompt="Y/m/n/?"
;;
"m") defprompt="M/n/y/?"
;;
"n") defprompt="N/y/m/?"
;;
esac
while :; do
readln "$1 ($2) [$defprompt] " "$def"
case "$ans" in
[yY] | [yY]es ) define_bool "$2" "y"
break ;;
[nN] | [nN]o ) define_bool "$2" "n"
break ;;
[mM] ) define_bool "$2" "m"
break ;;
* ) help "$2"
;;
if [ "$MODULES" != "y" ]; then
bool "$1" "$2"
else
def=$(eval echo "\${$2:-'n'}")
case "$def" in
"y") defprompt="Y/m/n/?"
;;
"m") defprompt="M/n/y/?"
;;
"n") defprompt="N/y/m/?"
;;
esac
done
while :; do
readln "$1 ($2) [$defprompt] " "$def"
case "$ans" in
[yY] | [yY]es ) define_bool "$2" "y"
break ;;
[nN] | [nN]o ) define_bool "$2" "n"
break ;;
[mM] ) define_bool "$2" "m"
break ;;
* ) help "$2"
;;
esac
done
fi
}
#
......@@ -200,6 +208,7 @@ function dep_tristate () {
if [ "$3" != "m" ]; then
tristate "$1" "$2"
else
if [ "$MODULES" = "y" ]; then
case "$def" in
"y" | "m") defprompt="M/n/?"
def="m"
......@@ -226,6 +235,7 @@ function dep_tristate () {
;;
esac
done
fi
fi
}
......
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