Commit 5c6dadfd authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5

into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
parents 95a28cee db71a5a2
...@@ -110,16 +110,18 @@ S: San Jose, California 95129 ...@@ -110,16 +110,18 @@ S: San Jose, California 95129
S: USA S: USA
N: Andrea Arcangeli N: Andrea Arcangeli
E: andrea@e-mind.com E: andrea@suse.de
W: http://e-mind.com/~andrea/ W: http://www.kernel.org/pub/linux/kernel/people/andrea/
P: 1024/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 P: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43
P: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5
D: Parport hacker D: Parport hacker
D: Implemented a workaround for some interrupt buggy printers D: Implemented a workaround for some interrupt buggy printers
D: Author of pscan that helps to fix lp/parport bug D: Author of pscan that helps to fix lp/parport bugs
D: Author of lil (Linux Interrupt Latency benchmark) D: Author of lil (Linux Interrupt Latency benchmark)
D: Fixed the shm swap deallocation at swapoff time (try_to_unuse message) D: Fixed the shm swap deallocation at swapoff time (try_to_unuse message)
D: VM hacker
D: Various other kernel hacks D: Various other kernel hacks
S: Via Ciaclini 26 S: Via Cicalini 26
S: Imola 40026 S: Imola 40026
S: Italy S: Italy
......
...@@ -243,17 +243,15 @@ export MODVERDIR := .tmp_versions ...@@ -243,17 +243,15 @@ export MODVERDIR := .tmp_versions
comma := , comma := ,
depfile = $(subst $(comma),_,$(@D)/.$(@F).d) depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
noconfig_targets := xconfig gconfig menuconfig config oldconfig randconfig \ # Files to ignore in find ... statements
defconfig allyesconfig allnoconfig allmodconfig \
clean mrproper distclean rpm \
help tags TAGS cscope %docs \
checkconfig checkhelp checkincludes
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o
RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS
# ===========================================================================
# Rules shared between *config targets and build targets
# Helpers built in scripts/ # Helpers built in scripts/
# ---------------------------------------------------------------------------
scripts/docproc scripts/fixdep scripts/split-include : scripts ; scripts/docproc scripts/fixdep scripts/split-include : scripts ;
...@@ -261,9 +259,49 @@ scripts/docproc scripts/fixdep scripts/split-include : scripts ; ...@@ -261,9 +259,49 @@ scripts/docproc scripts/fixdep scripts/split-include : scripts ;
scripts: scripts:
$(Q)$(MAKE) $(build)=scripts $(Q)$(MAKE) $(build)=scripts
# Objects we will link into vmlinux / subdirs we need to visit
# ---------------------------------------------------------------------------
# To make sure we do not include .config for any of the *config targets
# catch them early, and hand them over to scripts/kconfig/Makefile
# It is allowed to specify more targets when calling make, including
# mixing *config targets and build targets.
# For example 'make oldconfig all'.
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
config-targets := 0
mixed-targets := 0
ifneq ($(filter config %config,$(MAKECMDGOALS)),)
config-targets := 1
ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
mixed-targets := 1
endif
endif
ifeq ($(mixed-targets),1)
# ===========================================================================
# We're called with mixed targets (*config and build targets).
# Handle them one by one.
%:: FORCE
$(Q)$(MAKE) $@
else
ifeq ($(config-targets),1)
# ===========================================================================
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target
%config: scripts/fixdep FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
config : scripts/fixdep FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
else
# ===========================================================================
# Build targets only - this includes vmlinux, arch specific targets, clean
# targets and others. In general all targets except *config targets.
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/ init-y := init/
drivers-y := drivers/ sound/ drivers-y := drivers/ sound/
net-y := net/ net-y := net/
...@@ -271,14 +309,8 @@ libs-y := lib/ ...@@ -271,14 +309,8 @@ libs-y := lib/
core-y := usr/ core-y := usr/
SUBDIRS := SUBDIRS :=
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
export include_config := 1
-include .config -include .config
endif
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
# Let architecture Makefiles change CPPFLAGS if needed # Let architecture Makefiles change CPPFLAGS if needed
...@@ -304,10 +336,8 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) ...@@ -304,10 +336,8 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
libs-y := $(libs-y1) $(libs-y2) libs-y := $(libs-y1) $(libs-y2)
ifdef include_config
# Here goes the main Makefile # Here goes the main Makefile
# =========================================================================== # ---------------------------------------------------------------------------
# #
# If the user gave a *config target, it'll be handled in another # If the user gave a *config target, it'll be handled in another
# section below, since in this case we cannot include .config # section below, since in this case we cannot include .config
...@@ -608,72 +638,6 @@ define filechk_gen-asm-offsets ...@@ -608,72 +638,6 @@ define filechk_gen-asm-offsets
echo "#endif" ) echo "#endif" )
endef endef
else # ifdef include_config
ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
# Targets which don't need .config
# ===========================================================================
#
# These targets basically have their own Makefile - not quite, but at
# least its own exclusive section in the same Makefile. The reason for
# this is the following:
# To know the configuration, the main Makefile has to include
# .config. That's a obviously a problem when .config doesn't exist
# yet, but that could be kludged around with only including it if it
# exists.
# However, the larger problem is: If you run make *config, make will
# include the old .config, then execute your *config. It will then
# notice that a piece it included (.config) did change and restart from
# scratch. Which will cause execution of *config again. You get the
# picture.
# If we don't explicitly let the Makefile know that .config is changed
# by *config (the old way), it won't reread .config after *config,
# thus working with possibly stale values - we don't that either.
#
# So we divide things: This part here is for making *config targets,
# and other targets which should work when no .config exists yet.
# The main part above takes care of the rest after a .config exists.
# Kernel configuration
# ---------------------------------------------------------------------------
.PHONY: oldconfig xconfig gconfig menuconfig config \
make_with_config rpm
scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf scripts/kconfig/gconf: scripts/fixdep FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
xconfig: scripts/kconfig/qconf
./scripts/kconfig/qconf arch/$(ARCH)/Kconfig
gconfig: scripts/kconfig/gconf
./scripts/kconfig/gconf arch/$(ARCH)/Kconfig
menuconfig: scripts/kconfig/mconf
$(Q)$(MAKE) $(build)=scripts/lxdialog
./scripts/kconfig/mconf arch/$(ARCH)/Kconfig
config: scripts/kconfig/conf
./scripts/kconfig/conf arch/$(ARCH)/Kconfig
oldconfig: scripts/kconfig/conf
./scripts/kconfig/conf -o arch/$(ARCH)/Kconfig
randconfig: scripts/kconfig/conf
./scripts/kconfig/conf -r arch/$(ARCH)/Kconfig
allyesconfig: scripts/kconfig/conf
./scripts/kconfig/conf -y arch/$(ARCH)/Kconfig
allnoconfig: scripts/kconfig/conf
./scripts/kconfig/conf -n arch/$(ARCH)/Kconfig
allmodconfig: scripts/kconfig/conf
./scripts/kconfig/conf -m arch/$(ARCH)/Kconfig
defconfig: scripts/kconfig/conf
./scripts/kconfig/conf -d arch/$(ARCH)/Kconfig
### ###
# Cleaning is done on three levels. # Cleaning is done on three levels.
...@@ -778,6 +742,8 @@ tags: FORCE ...@@ -778,6 +742,8 @@ tags: FORCE
# RPM target # RPM target
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
.PHONY: rpm
# If you do a make spec before packing the tarball you can rpm -ta it # If you do a make spec before packing the tarball you can rpm -ta it
spec: spec:
...@@ -813,14 +779,7 @@ help: ...@@ -813,14 +779,7 @@ help:
@echo ' mrproper - remove all generated files + config + various backup files' @echo ' mrproper - remove all generated files + config + various backup files'
@echo '' @echo ''
@echo 'Configuration targets:' @echo 'Configuration targets:'
@echo ' oldconfig - Update current config utilising a line-oriented program' @$(MAKE) -f scripts/kconfig/Makefile help
@echo ' menuconfig - Update current config utilising a menu based program'
@echo ' xconfig - Update current config utilising a QT based front-end'
@echo ' gconfig - Update current config utilising a GTK based front-end'
@echo ' defconfig - New config with default answer to all options'
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allnoconfig - New minimal config'
@echo '' @echo ''
@echo 'Other generic targets:' @echo 'Other generic targets:'
@echo ' all - Build all targets marked with [*]' @echo ' all - Build all targets marked with [*]'
...@@ -833,7 +792,7 @@ help: ...@@ -833,7 +792,7 @@ help:
@echo ' tags/TAGS - Generate tags file for editors' @echo ' tags/TAGS - Generate tags file for editors'
@echo '' @echo ''
@echo 'Documentation targets:' @echo 'Documentation targets:'
@$(MAKE) --no-print-directory -f Documentation/DocBook/Makefile dochelp @$(MAKE) -f Documentation/DocBook/Makefile dochelp
@echo '' @echo ''
@echo 'Architecture specific targets ($(ARCH)):' @echo 'Architecture specific targets ($(ARCH)):'
@$(if $(archhelp),$(archhelp),\ @$(if $(archhelp),$(archhelp),\
...@@ -864,17 +823,8 @@ checkincludes: ...@@ -864,17 +823,8 @@ checkincludes:
-name '*.[hcS]' -type f -print | sort \ -name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w scripts/checkincludes.pl | xargs $(PERL) -w scripts/checkincludes.pl
else # ifneq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
# We're called with both targets which do and do not need
# .config included. Handle them one after the other.
# ===========================================================================
%:: FORCE
$(Q)$(MAKE) $@
endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
endif # ifdef include_config
# FIXME Should go into a make.lib or something # FIXME Should go into a make.lib or something
# =========================================================================== # ===========================================================================
...@@ -894,6 +844,7 @@ targets := $(wildcard $(sort $(targets))) ...@@ -894,6 +844,7 @@ targets := $(wildcard $(sort $(targets)))
cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),) ifneq ($(cmd_files),)
$(cmd_files): ; # Do not try to update included dependency files
include $(cmd_files) include $(cmd_files)
endif endif
......
...@@ -295,7 +295,7 @@ static int __init mca_init(void) ...@@ -295,7 +295,7 @@ static int __init mca_init(void)
mca_dev->pos_register = 0x7f; mca_dev->pos_register = 0x7f;
outb_p(mca_dev->pos_register, MCA_MOTHERBOARD_SETUP_REG); outb_p(mca_dev->pos_register, MCA_MOTHERBOARD_SETUP_REG);
mca_dev->dev.name[0] = 0; mca_dev->name[0] = 0;
mca_read_and_store_pos(mca_dev->pos); mca_read_and_store_pos(mca_dev->pos);
mca_configure_adapter_status(mca_dev); mca_configure_adapter_status(mca_dev);
/* fake POS and slot for a motherboard */ /* fake POS and slot for a motherboard */
...@@ -315,7 +315,7 @@ static int __init mca_init(void) ...@@ -315,7 +315,7 @@ static int __init mca_init(void)
mca_dev->pos_register = 0xdf; mca_dev->pos_register = 0xdf;
outb_p(mca_dev->pos_register, MCA_MOTHERBOARD_SETUP_REG); outb_p(mca_dev->pos_register, MCA_MOTHERBOARD_SETUP_REG);
mca_dev->dev.name[0] = 0; mca_dev->name[0] = 0;
mca_read_and_store_pos(mca_dev->pos); mca_read_and_store_pos(mca_dev->pos);
mca_configure_adapter_status(mca_dev); mca_configure_adapter_status(mca_dev);
/* fake POS and slot for the integrated video */ /* fake POS and slot for the integrated video */
...@@ -414,13 +414,13 @@ static void mca_handle_nmi_device(struct mca_device *mca_dev, int check_flag) ...@@ -414,13 +414,13 @@ static void mca_handle_nmi_device(struct mca_device *mca_dev, int check_flag)
if(slot == MCA_INTEGSCSI) { if(slot == MCA_INTEGSCSI) {
printk(KERN_CRIT "NMI: caused by MCA integrated SCSI adapter (%s)\n", printk(KERN_CRIT "NMI: caused by MCA integrated SCSI adapter (%s)\n",
mca_dev->dev.name); mca_dev->name);
} else if(slot == MCA_INTEGVIDEO) { } else if(slot == MCA_INTEGVIDEO) {
printk(KERN_CRIT "NMI: caused by MCA integrated video adapter (%s)\n", printk(KERN_CRIT "NMI: caused by MCA integrated video adapter (%s)\n",
mca_dev->dev.name); mca_dev->name);
} else if(slot == MCA_MOTHERBOARD) { } else if(slot == MCA_MOTHERBOARD) {
printk(KERN_CRIT "NMI: caused by motherboard (%s)\n", printk(KERN_CRIT "NMI: caused by motherboard (%s)\n",
mca_dev->dev.name); mca_dev->name);
} }
/* More info available in POS 6 and 7? */ /* More info available in POS 6 and 7? */
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
*/ */
void (*pm_power_off)(void); void (*pm_power_off)(void);
static long no_idt[2];
static int reboot_mode; static int reboot_mode;
int reboot_thru_bios; int reboot_thru_bios;
...@@ -87,7 +86,9 @@ static struct ...@@ -87,7 +86,9 @@ static struct
unsigned long long * base __attribute__ ((packed)); unsigned long long * base __attribute__ ((packed));
} }
real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries }, real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
real_mode_idt = { 0x3ff, 0 }; real_mode_idt = { 0x3ff, 0 },
no_idt = { 0, 0 };
/* This is 16-bit protected mode code to disable paging and the cache, /* This is 16-bit protected mode code to disable paging and the cache,
switch to real mode and jump to the BIOS reset code. switch to real mode and jump to the BIOS reset code.
......
...@@ -82,7 +82,7 @@ static int DAC960_open(struct inode *inode, struct file *file) ...@@ -82,7 +82,7 @@ static int DAC960_open(struct inode *inode, struct file *file)
} else { } else {
DAC960_V2_LogicalDeviceInfo_T *i = DAC960_V2_LogicalDeviceInfo_T *i =
p->V2.LogicalDeviceInformation[drive_nr]; p->V2.LogicalDeviceInformation[drive_nr];
if (i->LogicalDeviceState == DAC960_V2_LogicalDevice_Offline) if (!i || i->LogicalDeviceState == DAC960_V2_LogicalDevice_Offline)
return -ENXIO; return -ENXIO;
} }
......
...@@ -25,13 +25,12 @@ struct eisa_device_info { ...@@ -25,13 +25,12 @@ struct eisa_device_info {
char name[DEVICE_NAME_SIZE]; char name[DEVICE_NAME_SIZE];
}; };
static struct eisa_device_info __initdata eisa_table[] = {
#ifdef CONFIG_EISA_NAMES #ifdef CONFIG_EISA_NAMES
static struct eisa_device_info __initdata eisa_table[] = {
#include "devlist.h" #include "devlist.h"
#endif
}; };
#define EISA_INFOS (sizeof (eisa_table) / (sizeof (struct eisa_device_info))) #define EISA_INFOS (sizeof (eisa_table) / (sizeof (struct eisa_device_info)))
#endif
#define EISA_MAX_FORCED_DEV 16 #define EISA_MAX_FORCED_DEV 16
#define EISA_FORCED_OFFSET 2 #define EISA_FORCED_OFFSET 2
...@@ -59,11 +58,11 @@ static int is_forced_dev (int *forced_tab, ...@@ -59,11 +58,11 @@ static int is_forced_dev (int *forced_tab,
static void __init eisa_name_device (struct eisa_device *edev) static void __init eisa_name_device (struct eisa_device *edev)
{ {
#ifdef CONFIG_EISA_NAMES
int i; int i;
for (i = 0; i < EISA_INFOS; i++) { for (i = 0; i < EISA_INFOS; i++) {
if (!strcmp (edev->id.sig, eisa_table[i].id.sig)) { if (!strcmp (edev->id.sig, eisa_table[i].id.sig)) {
strlcpy (edev->dev.name, strlcpy (edev->pretty_name,
eisa_table[i].name, eisa_table[i].name,
DEVICE_NAME_SIZE); DEVICE_NAME_SIZE);
return; return;
...@@ -71,7 +70,8 @@ static void __init eisa_name_device (struct eisa_device *edev) ...@@ -71,7 +70,8 @@ static void __init eisa_name_device (struct eisa_device *edev)
} }
/* No name was found */ /* No name was found */
sprintf (edev->dev.name, "EISA device %.7s", edev->id.sig); sprintf (edev->pretty_name, "EISA device %.7s", edev->id.sig);
#endif
} }
static char __init *decode_eisa_sig(unsigned long addr) static char __init *decode_eisa_sig(unsigned long addr)
...@@ -172,7 +172,6 @@ static int __init eisa_init_device (struct eisa_root_device *root, ...@@ -172,7 +172,6 @@ static int __init eisa_init_device (struct eisa_root_device *root,
{ {
char *sig; char *sig;
unsigned long sig_addr; unsigned long sig_addr;
int i;
sig_addr = SLOT_ADDRESS (root, slot) + EISA_VENDOR_ID_OFFSET; sig_addr = SLOT_ADDRESS (root, slot) + EISA_VENDOR_ID_OFFSET;
...@@ -190,8 +189,13 @@ static int __init eisa_init_device (struct eisa_root_device *root, ...@@ -190,8 +189,13 @@ static int __init eisa_init_device (struct eisa_root_device *root,
edev->dev.dma_mask = &edev->dma_mask; edev->dev.dma_mask = &edev->dma_mask;
sprintf (edev->dev.bus_id, "%02X:%02X", root->bus_nr, slot); sprintf (edev->dev.bus_id, "%02X:%02X", root->bus_nr, slot);
#ifdef CONFIG_EISA_NAMES
{
int i;
for (i = 0; i < EISA_MAX_RESOURCES; i++) for (i = 0; i < EISA_MAX_RESOURCES; i++)
edev->res[i].name = edev->dev.name; edev->res[i].name = edev->pretty_name;
}
#endif
if (is_forced_dev (enable_dev, root, edev)) if (is_forced_dev (enable_dev, root, edev))
edev->state = EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED; edev->state = EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED;
...@@ -270,8 +274,7 @@ static int __init eisa_probe (struct eisa_root_device *root) ...@@ -270,8 +274,7 @@ static int __init eisa_probe (struct eisa_root_device *root)
int i, c; int i, c;
struct eisa_device *edev; struct eisa_device *edev;
printk (KERN_INFO "EISA: Probing bus %d at %s\n", printk (KERN_INFO "EISA: Probing bus %d\n", root->bus_nr);
root->bus_nr, root->dev->name);
/* First try to get hold of slot 0. If there is no device /* First try to get hold of slot 0. If there is no device
* here, simply fail, unless root->force_probe is set. */ * here, simply fail, unless root->force_probe is set. */
......
...@@ -29,9 +29,6 @@ static int force_probe = EISA_FORCE_PROBE_DEFAULT; ...@@ -29,9 +29,6 @@ static int force_probe = EISA_FORCE_PROBE_DEFAULT;
static struct platform_device eisa_root_dev = { static struct platform_device eisa_root_dev = {
.name = "eisa", .name = "eisa",
.id = 0, .id = 0,
.dev = {
.name = "Virtual EISA Bridge",
},
}; };
static struct eisa_root_device eisa_bus_root = { static struct eisa_root_device eisa_bus_root = {
......
...@@ -134,7 +134,7 @@ struct mca_bus * __devinit mca_attach_bus(int bus) ...@@ -134,7 +134,7 @@ struct mca_bus * __devinit mca_attach_bus(int bus)
return NULL; return NULL;
memset(mca_bus, 0, sizeof(struct mca_bus)); memset(mca_bus, 0, sizeof(struct mca_bus));
sprintf(mca_bus->dev.bus_id,"mca%d",bus); sprintf(mca_bus->dev.bus_id,"mca%d",bus);
sprintf(mca_bus->dev.name,"Host %s MCA Bridge", bus ? "Secondary" : "Primary"); sprintf(mca_bus->name,"Host %s MCA Bridge", bus ? "Secondary" : "Primary");
device_register(&mca_bus->dev); device_register(&mca_bus->dev);
mca_root_busses[bus] = mca_bus; mca_root_busses[bus] = mca_bus;
......
...@@ -200,3 +200,18 @@ enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev) ...@@ -200,3 +200,18 @@ enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev)
{ {
return mca_dev->status; return mca_dev->status;
} }
EXPORT_SYMBOL(mca_device_status);
/**
* mca_device_set_name - set the name of the device
* @mca_device: device to set the name of
* @name: name to set
*/
void mca_device_set_name(struct mca_device *mca_dev, const char *name)
{
if(!mca_dev)
return;
strlcpy(mca_dev->name, name, sizeof(mca_dev->name));
}
EXPORT_SYMBOL(mca_device_set_name);
...@@ -278,7 +278,7 @@ void mca_set_adapter_name(int slot, char* name) ...@@ -278,7 +278,7 @@ void mca_set_adapter_name(int slot, char* name)
if(!mca_dev) if(!mca_dev)
return; return;
strlcpy(mca_dev->dev.name, name, sizeof(mca_dev->dev.name)); mca_device_set_name(mca_dev, name);
} }
EXPORT_SYMBOL(mca_set_adapter_name); EXPORT_SYMBOL(mca_set_adapter_name);
...@@ -297,7 +297,7 @@ char *mca_get_adapter_name(int slot) ...@@ -297,7 +297,7 @@ char *mca_get_adapter_name(int slot)
if(!mca_dev) if(!mca_dev)
return NULL; return NULL;
return mca_dev->dev.name; return mca_device_get_name(mca_dev);
} }
EXPORT_SYMBOL(mca_get_adapter_name); EXPORT_SYMBOL(mca_get_adapter_name);
......
...@@ -39,7 +39,7 @@ static int get_mca_info_helper(struct mca_device *mca_dev, char *page, int len) ...@@ -39,7 +39,7 @@ static int get_mca_info_helper(struct mca_device *mca_dev, char *page, int len)
for(j=0; j<8; j++) for(j=0; j<8; j++)
len += sprintf(page+len, "%02x ", len += sprintf(page+len, "%02x ",
mca_dev ? mca_dev->pos[j] : 0xff); mca_dev ? mca_dev->pos[j] : 0xff);
len += sprintf(page+len, " %s\n", mca_dev ? mca_dev->dev.name : ""); len += sprintf(page+len, " %s\n", mca_dev ? mca_dev->name : "");
return len; return len;
} }
...@@ -108,12 +108,12 @@ static int mca_default_procfn(char* buf, struct mca_device *mca_dev) ...@@ -108,12 +108,12 @@ static int mca_default_procfn(char* buf, struct mca_device *mca_dev)
} else if(slot == MCA_MOTHERBOARD) { } else if(slot == MCA_MOTHERBOARD) {
len += sprintf(buf+len, "Motherboard\n"); len += sprintf(buf+len, "Motherboard\n");
} }
if(mca_dev->dev.name[0]) { if (mca_dev->name[0]) {
/* Drivers might register a name without /proc handler... */ /* Drivers might register a name without /proc handler... */
len += sprintf(buf+len, "Adapter Name: %s\n", len += sprintf(buf+len, "Adapter Name: %s\n",
mca_dev->dev.name); mca_dev->name);
} else { } else {
len += sprintf(buf+len, "Adapter Name: Unknown\n"); len += sprintf(buf+len, "Adapter Name: Unknown\n");
} }
......
...@@ -2042,6 +2042,17 @@ config R8169 ...@@ -2042,6 +2042,17 @@ config R8169
say M here and read <file:Documentation/modules.txt>. This is say M here and read <file:Documentation/modules.txt>. This is
recommended. The module will be called r8169. recommended. The module will be called r8169.
config SIS190
tristate "SiS190 gigabit ethernet support (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
---help---
Say Y here if you have a SiS 190 PCI Gigabit Ethernet adapter.
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. This is
recommended. The module will be called sis190.
config SK98LIN config SK98LIN
tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
depends on PCI depends on PCI
......
...@@ -41,6 +41,7 @@ obj-$(CONFIG_PCNET32) += pcnet32.o mii.o ...@@ -41,6 +41,7 @@ obj-$(CONFIG_PCNET32) += pcnet32.o mii.o
obj-$(CONFIG_EEPRO100) += eepro100.o mii.o obj-$(CONFIG_EEPRO100) += eepro100.o mii.o
obj-$(CONFIG_TLAN) += tlan.o obj-$(CONFIG_TLAN) += tlan.o
obj-$(CONFIG_EPIC100) += epic100.o mii.o obj-$(CONFIG_EPIC100) += epic100.o mii.o
obj-$(CONFIG_SIS190) += sis190.o
obj-$(CONFIG_SIS900) += sis900.o obj-$(CONFIG_SIS900) += sis900.o
obj-$(CONFIG_YELLOWFIN) += yellowfin.o obj-$(CONFIG_YELLOWFIN) += yellowfin.o
obj-$(CONFIG_ACENIC) += acenic.o obj-$(CONFIG_ACENIC) += acenic.o
......
...@@ -25,6 +25,7 @@ obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o ...@@ -25,6 +25,7 @@ obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o
obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o
obj-$(CONFIG_PCNET32) += crc32.o obj-$(CONFIG_PCNET32) += crc32.o
obj-$(CONFIG_SGI_IOC3_ETH) += crc32.o obj-$(CONFIG_SGI_IOC3_ETH) += crc32.o
obj-$(CONFIG_SIS190) += crc32.o
obj-$(CONFIG_SIS900) += crc32.o obj-$(CONFIG_SIS900) += crc32.o
obj-$(CONFIG_SMC9194) += crc32.o obj-$(CONFIG_SMC9194) += crc32.o
obj-$(CONFIG_ADAPTEC_STARFIRE) += crc32.o obj-$(CONFIG_ADAPTEC_STARFIRE) += crc32.o
......
...@@ -97,7 +97,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de ...@@ -97,7 +97,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
dev->irq = pdev->irq; dev->irq = pdev->irq;
dev->dev_addr[0] = node; dev->dev_addr[0] = node;
lp->card_name = pdev->dev.name; lp->card_name = "PCI COM20020";
lp->card_flags = id->driver_data; lp->card_flags = id->driver_data;
lp->backplane = backplane; lp->backplane = backplane;
lp->clockp = clockp & 7; lp->clockp = clockp & 7;
...@@ -105,7 +105,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de ...@@ -105,7 +105,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
lp->timeout = timeout; lp->timeout = timeout;
lp->hw.owner = THIS_MODULE; lp->hw.owner = THIS_MODULE;
if (check_region(ioaddr, ARCNET_TOTAL_SIZE)) { if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com20020-pci")) {
BUGMSG(D_INIT, "IO region %xh-%xh already allocated.\n", BUGMSG(D_INIT, "IO region %xh-%xh already allocated.\n",
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
err = -EBUSY; err = -EBUSY;
...@@ -122,6 +122,8 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de ...@@ -122,6 +122,8 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
goto out_priv; goto out_priv;
} }
release_region(ioaddr, ARCNET_TOTAL_SIZE);
if ((err = com20020_found(dev, SA_SHIRQ)) != 0) if ((err = com20020_found(dev, SA_SHIRQ)) != 0)
goto out_priv; goto out_priv;
......
...@@ -55,7 +55,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum, ...@@ -55,7 +55,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum,
static void com20020_copy_from_card(struct net_device *dev, int bufnum, static void com20020_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count); int offset, void *buf, int count);
static void com20020_set_mc_list(struct net_device *dev); static void com20020_set_mc_list(struct net_device *dev);
static void com20020_close(struct net_device *, bool); static void com20020_close(struct net_device *);
static void com20020_copy_from_card(struct net_device *dev, int bufnum, static void com20020_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count) int offset, void *buf, int count)
...@@ -86,7 +86,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum, ...@@ -86,7 +86,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum,
/* Reset the card and check some basic stuff during the detection stage. */ /* Reset the card and check some basic stuff during the detection stage. */
int __devinit com20020_check(struct net_device *dev) int com20020_check(struct net_device *dev)
{ {
int ioaddr = dev->base_addr, status; int ioaddr = dev->base_addr, status;
struct arcnet_local *lp = dev->priv; struct arcnet_local *lp = dev->priv;
...@@ -152,7 +152,7 @@ int __devinit com20020_check(struct net_device *dev) ...@@ -152,7 +152,7 @@ int __devinit com20020_check(struct net_device *dev)
/* Set up the struct net_device associated with this card. Called after /* Set up the struct net_device associated with this card. Called after
* probing succeeds. * probing succeeds.
*/ */
int __devinit com20020_found(struct net_device *dev, int shared) int com20020_found(struct net_device *dev, int shared)
{ {
struct arcnet_local *lp; struct arcnet_local *lp;
int ioaddr = dev->base_addr; int ioaddr = dev->base_addr;
...@@ -180,6 +180,10 @@ int __devinit com20020_found(struct net_device *dev, int shared) ...@@ -180,6 +180,10 @@ int __devinit com20020_found(struct net_device *dev, int shared)
if (!dev->dev_addr[0]) if (!dev->dev_addr[0])
dev->dev_addr[0] = inb(ioaddr + 8); /* FIXME: do this some other way! */ dev->dev_addr[0] = inb(ioaddr + 8); /* FIXME: do this some other way! */
/* reserve the I/O region */
if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)"))
return -EBUSY;
SET_SUBADR(SUB_SETUP1); SET_SUBADR(SUB_SETUP1);
outb(lp->setup, _XREG); outb(lp->setup, _XREG);
...@@ -203,13 +207,10 @@ int __devinit com20020_found(struct net_device *dev, int shared) ...@@ -203,13 +207,10 @@ int __devinit com20020_found(struct net_device *dev, int shared)
if (request_irq(dev->irq, &arcnet_interrupt, shared, if (request_irq(dev->irq, &arcnet_interrupt, shared,
"arcnet (COM20020)", dev)) { "arcnet (COM20020)", dev)) {
BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq); BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq);
release_region(ioaddr, ARCNET_TOTAL_SIZE);
return -ENODEV; return -ENODEV;
} }
/* reserve the I/O region */
if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
free_irq(dev->irq, dev);
return -EBUSY;
}
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
BUGMSG(D_NORMAL, "%s: station %02Xh found at %03lXh, IRQ %d.\n", BUGMSG(D_NORMAL, "%s: station %02Xh found at %03lXh, IRQ %d.\n",
...@@ -226,8 +227,8 @@ int __devinit com20020_found(struct net_device *dev, int shared) ...@@ -226,8 +227,8 @@ int __devinit com20020_found(struct net_device *dev, int shared)
clockrates[3 - ((lp->setup2 & 0xF0) >> 4) + ((lp->setup & 0x0F) >> 1)]); clockrates[3 - ((lp->setup2 & 0xF0) >> 4) + ((lp->setup & 0x0F) >> 1)]);
if (!dev->init && register_netdev(dev)) { if (!dev->init && register_netdev(dev)) {
free_irq(dev->irq, dev);
release_region(ioaddr, ARCNET_TOTAL_SIZE); release_region(ioaddr, ARCNET_TOTAL_SIZE);
free_irq(dev->irq, dev);
return -EIO; return -EIO;
} }
return 0; return 0;
...@@ -298,16 +299,14 @@ static int com20020_status(struct net_device *dev) ...@@ -298,16 +299,14 @@ static int com20020_status(struct net_device *dev)
return ASTATUS(); return ASTATUS();
} }
static void com20020_close(struct net_device *dev, bool open) static void com20020_close(struct net_device *dev)
{ {
struct arcnet_local *lp = (struct arcnet_local *) dev->priv; struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
int ioaddr = dev->base_addr; int ioaddr = dev->base_addr;
if (!open) {
/* disable transmitter */ /* disable transmitter */
lp->config &= ~TXENcfg; lp->config &= ~TXENcfg;
SETCONF; SETCONF;
}
} }
/* Set or clear the multicast filter for this adaptor. /* Set or clear the multicast filter for this adaptor.
...@@ -339,7 +338,7 @@ static void com20020_set_mc_list(struct net_device *dev) ...@@ -339,7 +338,7 @@ static void com20020_set_mc_list(struct net_device *dev)
} }
} }
void __devexit com20020_remove(struct net_device *dev) void com20020_remove(struct net_device *dev)
{ {
unregister_netdev(dev); unregister_netdev(dev);
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
......
...@@ -158,14 +158,14 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -158,14 +158,14 @@ static int __init com90io_probe(struct net_device *dev)
"must specify the base address!\n"); "must specify the base address!\n");
return -ENODEV; return -ENODEV;
} }
if (check_region(ioaddr, ARCNET_TOTAL_SIZE)) { if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com90io probe")) {
BUGMSG(D_INIT_REASONS, "IO check_region %x-%x failed.\n", BUGMSG(D_INIT_REASONS, "IO check_region %x-%x failed.\n",
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
return -ENXIO; return -ENXIO;
} }
if (ASTATUS() == 0xFF) { if (ASTATUS() == 0xFF) {
BUGMSG(D_INIT_REASONS, "IO address %x empty\n", ioaddr); BUGMSG(D_INIT_REASONS, "IO address %x empty\n", ioaddr);
return -ENODEV; goto err_out;
} }
inb(_RESET); inb(_RESET);
mdelay(RESETtime); mdelay(RESETtime);
...@@ -174,7 +174,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -174,7 +174,7 @@ static int __init com90io_probe(struct net_device *dev)
if ((status & 0x9D) != (NORXflag | RECONflag | TXFREEflag | RESETflag)) { if ((status & 0x9D) != (NORXflag | RECONflag | TXFREEflag | RESETflag)) {
BUGMSG(D_INIT_REASONS, "Status invalid (%Xh).\n", status); BUGMSG(D_INIT_REASONS, "Status invalid (%Xh).\n", status);
return -ENODEV; goto err_out;
} }
BUGMSG(D_INIT_REASONS, "Status after reset: %X\n", status); BUGMSG(D_INIT_REASONS, "Status after reset: %X\n", status);
...@@ -186,7 +186,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -186,7 +186,7 @@ static int __init com90io_probe(struct net_device *dev)
if (status & RESETflag) { if (status & RESETflag) {
BUGMSG(D_INIT_REASONS, "Eternal reset (status=%Xh)\n", status); BUGMSG(D_INIT_REASONS, "Eternal reset (status=%Xh)\n", status);
return -ENODEV; goto err_out;
} }
outb((0x16 | IOMAPflag) & ~ENABLE16flag, _CONFIG); outb((0x16 | IOMAPflag) & ~ENABLE16flag, _CONFIG);
...@@ -198,7 +198,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -198,7 +198,7 @@ static int __init com90io_probe(struct net_device *dev)
if ((status = inb(_MEMDATA)) != 0xd1) { if ((status = inb(_MEMDATA)) != 0xd1) {
BUGMSG(D_INIT_REASONS, "Signature byte not found" BUGMSG(D_INIT_REASONS, "Signature byte not found"
" (%Xh instead).\n", status); " (%Xh instead).\n", status);
return -ENODEV; goto err_out;
} }
if (!dev->irq) { if (!dev->irq) {
/* /*
...@@ -215,10 +215,15 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -215,10 +215,15 @@ static int __init com90io_probe(struct net_device *dev)
if (dev->irq <= 0) { if (dev->irq <= 0) {
BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed\n"); BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed\n");
return -ENODEV; goto err_out;
} }
} }
release_region(ioaddr, ARCNET_TOTAL_SIZE); /* end of probing */
return com90io_found(dev); return com90io_found(dev);
err_out:
release_region(ioaddr, ARCNET_TOTAL_SIZE);
return -ENODEV;
} }
......
...@@ -33,20 +33,8 @@ ...@@ -33,20 +33,8 @@
#include "8390.h" #include "8390.h"
#define NE_BASE (dev->base_addr)
#define NE_CMD (0x00*2)
#define NE_EN0_ISR (0x07*2)
#define NE_EN0_DCFG (0x0e*2) #define NE_EN0_DCFG (0x0e*2)
#define NE_EN0_RSARLO (0x08*2)
#define NE_EN0_RSARHI (0x09*2)
#define NE_EN0_RCNTLO (0x0a*2)
#define NE_EN0_RXCR (0x0c*2)
#define NE_EN0_TXCR (0x0d*2)
#define NE_EN0_RCNTHI (0x0b*2)
#define NE_EN0_IMR (0x0f*2)
#define NESM_START_PG 0x0 /* First page of TX buffer */ #define NESM_START_PG 0x0 /* First page of TX buffer */
#define NESM_STOP_PG 0x40 /* Last page +1 of RX ring */ #define NESM_STOP_PG 0x40 /* Last page +1 of RX ring */
...@@ -56,12 +44,10 @@ ...@@ -56,12 +44,10 @@
#define WORDSWAP(a) ((((a)>>8)&0xff) | ((a)<<8)) #define WORDSWAP(a) ((((a)>>8)&0xff) | ((a)<<8))
#ifdef MODULE
static struct net_device *root_hydra_dev; static struct net_device *root_hydra_dev;
#endif
static int __init hydra_probe(void); static int __init hydra_probe(void);
static int hydra_init(unsigned long board); static int __init hydra_init(unsigned long board);
static int hydra_open(struct net_device *dev); static int hydra_open(struct net_device *dev);
static int hydra_close(struct net_device *dev); static int hydra_close(struct net_device *dev);
static void hydra_reset_8390(struct net_device *dev); static void hydra_reset_8390(struct net_device *dev);
...@@ -96,11 +82,11 @@ static int __init hydra_probe(void) ...@@ -96,11 +82,11 @@ static int __init hydra_probe(void)
return err; return err;
} }
int __init hydra_init(unsigned long board) static int __init hydra_init(unsigned long board)
{ {
struct net_device *dev; struct net_device *dev;
unsigned long ioaddr = board+HYDRA_NIC_BASE; unsigned long ioaddr = board+HYDRA_NIC_BASE;
const char *name = NULL; const char name[] = "NE2000";
int start_page, stop_page; int start_page, stop_page;
int j; int j;
...@@ -136,8 +122,6 @@ int __init hydra_init(unsigned long board) ...@@ -136,8 +122,6 @@ int __init hydra_init(unsigned long board)
return -ENOMEM; return -ENOMEM;
} }
name = "NE2000";
printk("%s: hydra at 0x%08lx, address %02x:%02x:%02x:%02x:%02x:%02x (hydra.c " HYDRA_VERSION ")\n", dev->name, ZTWO_PADDR(board), printk("%s: hydra at 0x%08lx, address %02x:%02x:%02x:%02x:%02x:%02x (hydra.c " HYDRA_VERSION ")\n", dev->name, ZTWO_PADDR(board),
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
...@@ -235,7 +219,6 @@ static void hydra_block_output(struct net_device *dev, int count, ...@@ -235,7 +219,6 @@ static void hydra_block_output(struct net_device *dev, int count,
static void __exit hydra_cleanup(void) static void __exit hydra_cleanup(void)
{ {
#ifdef MODULE
struct net_device *dev, *next; struct net_device *dev, *next;
while ((dev = root_hydra_dev)) { while ((dev = root_hydra_dev)) {
...@@ -246,7 +229,6 @@ static void __exit hydra_cleanup(void) ...@@ -246,7 +229,6 @@ static void __exit hydra_cleanup(void)
kfree(dev); kfree(dev);
root_hydra_dev = next; root_hydra_dev = next;
} }
#endif
} }
module_init(hydra_probe); module_init(hydra_probe);
......
This diff is collapsed.
...@@ -215,7 +215,7 @@ int __init ultramca_probe(struct device *gen_dev) ...@@ -215,7 +215,7 @@ int __init ultramca_probe(struct device *gen_dev)
printk(KERN_INFO "%s: %s found in slot %d\n", printk(KERN_INFO "%s: %s found in slot %d\n",
dev->name, smc_mca_adapter_names[adapter], slot + 1); dev->name, smc_mca_adapter_names[adapter], slot + 1);
strncpy(gen_dev->name, smc_mca_adapter_names[adapter], sizeof(gen_dev->name)); mca_device_set_name(mca_dev, smc_mca_adapter_names[adapter]);
mca_device_set_claim(mca_dev, 1); mca_device_set_claim(mca_dev, 1);
ultra_found++; ultra_found++;
......
This diff is collapsed.
...@@ -315,7 +315,7 @@ int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -315,7 +315,7 @@ int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->irq=pdev->irq; dev->irq=pdev->irq;
dev->base_addr=pci_resource_start(pdev,0) ; dev->base_addr=pci_resource_start(pdev,0) ;
dev->init=NULL ; /* Must be null with new api, otherwise get called twice */ dev->init=NULL ; /* Must be null with new api, otherwise get called twice */
xl_priv->xl_card_name = (char *)pdev->dev.name ; xl_priv->xl_card_name = pci_name(pdev);
xl_priv->xl_mmio=ioremap(pci_resource_start(pdev,1), XL_IO_SPACE); xl_priv->xl_mmio=ioremap(pci_resource_start(pdev,1), XL_IO_SPACE);
xl_priv->pdev = pdev ; xl_priv->pdev = pdev ;
......
...@@ -230,9 +230,10 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device ...@@ -230,9 +230,10 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device
dev->irq=pdev->irq; dev->irq=pdev->irq;
dev->base_addr=pci_resource_start(pdev, 0); dev->base_addr=pci_resource_start(pdev, 0);
dev->init=NULL; /* Must be NULL otherwise we get called twice */ dev->init=NULL; /* Must be NULL otherwise we get called twice */
olympic_priv->olympic_card_name = (char *)pdev->dev.name ; olympic_priv->olympic_card_name = pci_name(pdev);
olympic_priv->olympic_mmio = ioremap(pci_resource_start(pdev,1),256); olympic_priv->olympic_mmio = ioremap(pci_resource_start(pdev,1),256);
olympic_priv->olympic_lap = ioremap(pci_resource_start(pdev,2),2048); olympic_priv->olympic_lap = ioremap(pci_resource_start(pdev,2),2048);
#warning check ioremap return value
olympic_priv->pdev = pdev ; olympic_priv->pdev = pdev ;
if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000) ) if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000) )
......
...@@ -226,6 +226,7 @@ static struct pci_device_id tulip_pci_tbl[] = { ...@@ -226,6 +226,7 @@ static struct pci_device_id tulip_pci_tbl[] = {
{ 0x1737, 0xAB09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, { 0x1737, 0xAB09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, { 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x10b9, 0x5261, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, /* ALi 1563 integrated ethernet */ { 0x10b9, 0x5261, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, /* ALi 1563 integrated ethernet */
{ 0x10b7, 0x9300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* 3Com 3CSOHO100B-TX */
{ } /* terminate list */ { } /* terminate list */
}; };
MODULE_DEVICE_TABLE(pci, tulip_pci_tbl); MODULE_DEVICE_TABLE(pci, tulip_pci_tbl);
......
...@@ -890,12 +890,12 @@ int z8530_sync_dma_open(struct net_device *dev, struct z8530_channel *c) ...@@ -890,12 +890,12 @@ int z8530_sync_dma_open(struct net_device *dev, struct z8530_channel *c)
if(c->mtu > PAGE_SIZE/2) if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE; return -EMSGSIZE;
c->rx_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA); c->rx_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->rx_buf[0]==NULL) if(c->rx_buf[0]==NULL)
return -ENOBUFS; return -ENOBUFS;
c->rx_buf[1]=c->rx_buf[0]+PAGE_SIZE/2; c->rx_buf[1]=c->rx_buf[0]+PAGE_SIZE/2;
c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA); c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL) if(c->tx_dma_buf[0]==NULL)
{ {
free_page((unsigned long)c->rx_buf[0]); free_page((unsigned long)c->rx_buf[0]);
...@@ -1080,7 +1080,7 @@ int z8530_sync_txdma_open(struct net_device *dev, struct z8530_channel *c) ...@@ -1080,7 +1080,7 @@ int z8530_sync_txdma_open(struct net_device *dev, struct z8530_channel *c)
if(c->mtu > PAGE_SIZE/2) if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE; return -EMSGSIZE;
c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA); c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL) if(c->tx_dma_buf[0]==NULL)
return -ENOBUFS; return -ENOBUFS;
......
...@@ -1025,6 +1025,7 @@ struct airo_info { ...@@ -1025,6 +1025,7 @@ struct airo_info {
#define FLAG_802_11 0x200 #define FLAG_802_11 0x200
#define FLAG_PENDING_XMIT 0x400 #define FLAG_PENDING_XMIT 0x400
#define FLAG_PENDING_XMIT11 0x800 #define FLAG_PENDING_XMIT11 0x800
#define FLAG_PCI 0x1000
int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen, int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen,
int whichbap); int whichbap);
unsigned short *flash; unsigned short *flash;
...@@ -4093,6 +4094,7 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev, ...@@ -4093,6 +4094,7 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev,
return -ENODEV; return -ENODEV;
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
((struct airo_info *)dev->priv)->flags |= FLAG_PCI;
return 0; return 0;
} }
...@@ -4134,11 +4136,19 @@ static int __init airo_init_module( void ) ...@@ -4134,11 +4136,19 @@ static int __init airo_init_module( void )
static void __exit airo_cleanup_module( void ) static void __exit airo_cleanup_module( void )
{ {
int is_pci = 0;
while( airo_devices ) { while( airo_devices ) {
printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name ); printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name );
#ifdef CONFIG_PCI
if (((struct airo_info *)airo_devices->dev->priv)->flags & FLAG_PCI)
is_pci = 1;
#endif
stop_airo_card( airo_devices->dev, 1 ); stop_airo_card( airo_devices->dev, 1 );
} }
remove_proc_entry("aironet", proc_root_driver); remove_proc_entry("aironet", proc_root_driver);
if (is_pci)
pci_unregister_driver(&airo_driver);
} }
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
...@@ -5612,7 +5622,7 @@ static const struct iw_handler_def airo_handler_def = ...@@ -5612,7 +5622,7 @@ static const struct iw_handler_def airo_handler_def =
.standard = (iw_handler *) airo_handler, .standard = (iw_handler *) airo_handler,
.private = (iw_handler *) airo_private_handler, .private = (iw_handler *) airo_private_handler,
.private_args = (struct iw_priv_args *) airo_private_args, .private_args = (struct iw_priv_args *) airo_private_args,
#if 0 && WIRELESS_EXT > 15 #if WIRELESS_EXT > 15
.spy_offset = ((void *) (&((struct airo_info *) NULL)->spy_data) - .spy_offset = ((void *) (&((struct airo_info *) NULL)->spy_data) -
(void *) NULL), (void *) NULL),
#endif /* WIRELESS_EXT > 15 */ #endif /* WIRELESS_EXT > 15 */
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/timer.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/device.h> #include <linux/device.h>
...@@ -108,7 +107,7 @@ void stop_atmel_card( struct net_device *, int ); ...@@ -108,7 +107,7 @@ void stop_atmel_card( struct net_device *, int );
int reset_atmel_card( struct net_device * ); int reset_atmel_card( struct net_device * );
static void atmel_config(dev_link_t *link); static void atmel_config(dev_link_t *link);
static void atmel_release(u_long arg); static void atmel_release(dev_link_t *link);
static int atmel_event(event_t event, int priority, static int atmel_event(event_t event, int priority,
event_callback_args_t *args); event_callback_args_t *args);
...@@ -222,9 +221,6 @@ static dev_link_t *atmel_attach(void) ...@@ -222,9 +221,6 @@ static dev_link_t *atmel_attach(void)
return NULL; return NULL;
} }
memset(link, 0, sizeof(struct dev_link_t)); memset(link, 0, sizeof(struct dev_link_t));
init_timer(&link->release);
link->release.function = &atmel_release;
link->release.data = (u_long)link;
/* Interrupt setup */ /* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
...@@ -300,9 +296,8 @@ static void atmel_detach(dev_link_t *link) ...@@ -300,9 +296,8 @@ static void atmel_detach(dev_link_t *link)
if (*linkp == NULL) if (*linkp == NULL)
return; return;
del_timer(&link->release);
if ( link->state & DEV_CONFIG ) { if ( link->state & DEV_CONFIG ) {
atmel_release( (int)link ); atmel_release(link);
if ( link->state & DEV_STALE_CONFIG ) { if ( link->state & DEV_STALE_CONFIG ) {
link->state |= DEV_STALE_LINK; link->state |= DEV_STALE_LINK;
return; return;
...@@ -379,7 +374,6 @@ static struct { ...@@ -379,7 +374,6 @@ static struct {
/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
static struct device atmel_device = { static struct device atmel_device = {
.name = "Atmel at76c50x wireless",
.bus_id = "pcmcia", .bus_id = "pcmcia",
}; };
...@@ -606,9 +600,8 @@ static void atmel_config(dev_link_t *link) ...@@ -606,9 +600,8 @@ static void atmel_config(dev_link_t *link)
cs_failed: cs_failed:
cs_error(link->handle, last_fn, last_ret); cs_error(link->handle, last_fn, last_ret);
atmel_release((u_long)link); atmel_release(link);
}
} /* atmel_config */
/*====================================================================== /*======================================================================
...@@ -618,9 +611,8 @@ static void atmel_config(dev_link_t *link) ...@@ -618,9 +611,8 @@ static void atmel_config(dev_link_t *link)
======================================================================*/ ======================================================================*/
static void atmel_release(u_long arg) static void atmel_release(dev_link_t *link)
{ {
dev_link_t *link = (dev_link_t *)arg;
struct net_device *dev = ((local_info_t*)link->priv)->eth_dev; struct net_device *dev = ((local_info_t*)link->priv)->eth_dev;
DEBUG(0, "atmel_release(0x%p)\n", link); DEBUG(0, "atmel_release(0x%p)\n", link);
...@@ -639,8 +631,7 @@ static void atmel_release(u_long arg) ...@@ -639,8 +631,7 @@ static void atmel_release(u_long arg)
if (link->irq.AssignedIRQ) if (link->irq.AssignedIRQ)
CardServices(ReleaseIRQ, link->handle, &link->irq); CardServices(ReleaseIRQ, link->handle, &link->irq);
link->state &= ~DEV_CONFIG; link->state &= ~DEV_CONFIG;
}
} /* atmel_release */
/*====================================================================== /*======================================================================
...@@ -667,7 +658,7 @@ static int atmel_event(event_t event, int priority, ...@@ -667,7 +658,7 @@ static int atmel_event(event_t event, int priority,
link->state &= ~DEV_PRESENT; link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG) { if (link->state & DEV_CONFIG) {
netif_device_detach(local->eth_dev); netif_device_detach(local->eth_dev);
mod_timer(&link->release, jiffies + HZ/20); atmel_release(link);
} }
break; break;
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
...@@ -719,7 +710,7 @@ static void atmel_cs_cleanup(void) ...@@ -719,7 +710,7 @@ static void atmel_cs_cleanup(void)
/* XXX: this really needs to move into generic code.. */ /* XXX: this really needs to move into generic code.. */
while (dev_list != NULL) { while (dev_list != NULL) {
if (dev_list->state & DEV_CONFIG) if (dev_list->state & DEV_CONFIG)
atmel_release((u_long)dev_list); atmel_release(dev_list);
atmel_detach(dev_list); atmel_detach(dev_list);
} }
} }
......
...@@ -335,7 +335,7 @@ NCR_D700_probe(struct device *dev) ...@@ -335,7 +335,7 @@ NCR_D700_probe(struct device *dev)
} }
mca_device_set_claim(mca_dev, 1); mca_device_set_claim(mca_dev, 1);
strlcpy(dev->name, "NCR_D700", sizeof(dev->name)); mca_device_set_name(mca_dev, "NCR_D700");
dev_set_drvdata(dev, p); dev_set_drvdata(dev, p);
return 0; return 0;
} }
......
...@@ -291,7 +291,7 @@ NCR_Q720_probe(struct device *dev) ...@@ -291,7 +291,7 @@ NCR_Q720_probe(struct device *dev)
} }
mca_device_set_claim(mca_dev, 1); mca_device_set_claim(mca_dev, 1);
strlcpy(dev->name, "NCR_Q720", sizeof(dev->name)); mca_device_set_name(mca_dev, "NCR_Q720");
dev_set_drvdata(dev, p); dev_set_drvdata(dev, p);
return 0; return 0;
......
...@@ -100,7 +100,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr, ...@@ -100,7 +100,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
struct NCR_700_Host_Parameters *hostdata = struct NCR_700_Host_Parameters *hostdata =
kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
printk(KERN_NOTICE "sim710: %s\n", dev->name); printk(KERN_NOTICE "sim710: %s\n", dev->bus_id);
printk(KERN_NOTICE "sim710: irq = %d, clock = %d, base = 0x%lx, scsi_id = %d\n", printk(KERN_NOTICE "sim710: irq = %d, clock = %d, base = 0x%lx, scsi_id = %d\n",
irq, clock, base_addr, scsi_id); irq, clock, base_addr, scsi_id);
...@@ -255,7 +255,7 @@ sim710_mca_probe(struct device *dev) ...@@ -255,7 +255,7 @@ sim710_mca_probe(struct device *dev)
} else { } else {
return -ENODEV; return -ENODEV;
} }
strlcpy(dev->name, name, sizeof(dev->name)); mca_device_set_name(mca_dev, name);
mca_device_set_claim(mca_dev, 1); mca_device_set_claim(mca_dev, 1);
base = mca_device_transform_ioport(mca_dev, base); base = mca_device_transform_ioport(mca_dev, base);
irq_vector = mca_device_transform_irq(mca_dev, irq_vector); irq_vector = mca_device_transform_irq(mca_dev, irq_vector);
...@@ -304,7 +304,7 @@ sim710_eisa_probe(struct device *dev) ...@@ -304,7 +304,7 @@ sim710_eisa_probe(struct device *dev)
scsi_id = ffs(val) - 1; scsi_id = ffs(val) - 1;
if(scsi_id > 7 || (val & ~(1<<scsi_id)) != 0) { if(scsi_id > 7 || (val & ~(1<<scsi_id)) != 0) {
printk(KERN_ERR "sim710.c, EISA card %s has incorrect scsi_id, setting to 7\n", dev->name); printk(KERN_ERR "sim710.c, EISA card %s has incorrect scsi_id, setting to 7\n", dev->bus_id);
scsi_id = 7; scsi_id = 7;
} }
} else { } else {
......
...@@ -111,7 +111,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, ...@@ -111,7 +111,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo,
b->mask.data = data; b->mask.data = data;
b->mask.clock = clock; b->mask.clock = clock;
b->adapter = matrox_i2c_adapter_template; b->adapter = matrox_i2c_adapter_template;
snprintf(b->adapter.dev.name, DEVICE_NAME_SIZE, name, snprintf(b->adapter.name, DEVICE_NAME_SIZE, name,
minfo->fbcon.node); minfo->fbcon.node);
i2c_set_adapdata(&b->adapter, b); i2c_set_adapdata(&b->adapter, b);
b->adapter.algo_data = &b->bac; b->adapter.algo_data = &b->bac;
......
...@@ -1255,7 +1255,7 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, int kin ...@@ -1255,7 +1255,7 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, int kin
new_client->adapter = adapter; new_client->adapter = adapter;
new_client->driver = &maven_driver; new_client->driver = &maven_driver;
new_client->flags = 0; new_client->flags = 0;
strcpy(new_client->dev.name, "maven client"); strcpy(new_client->name, "maven client");
if ((err = i2c_attach_client(new_client))) if ((err = i2c_attach_client(new_client)))
goto ERROR3; goto ERROR3;
err = maven_init_client(new_client); err = maven_init_client(new_client);
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/sysctl.h>
#include <linux/moduleparam.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -51,12 +53,23 @@ static DECLARE_MUTEX_LOCKED(lockd_start); ...@@ -51,12 +53,23 @@ static DECLARE_MUTEX_LOCKED(lockd_start);
static DECLARE_WAIT_QUEUE_HEAD(lockd_exit); static DECLARE_WAIT_QUEUE_HEAD(lockd_exit);
/* /*
* Currently the following can be set only at insmod time. * These can be set at insmod time (useful for NFS as root filesystem),
* Ideally, they would be accessible through the sysctl interface. * and also changed through the sysctl interface. -- Jamie Lokier, Aug 2003
*/ */
unsigned long nlm_grace_period; static unsigned long nlm_grace_period;
unsigned long nlm_timeout = LOCKD_DFLT_TIMEO; static unsigned long nlm_timeout = LOCKD_DFLT_TIMEO;
unsigned long nlm_udpport, nlm_tcpport; static int nlm_udpport, nlm_tcpport;
/*
* Constants needed for the sysctl interface.
*/
static const unsigned long nlm_grace_period_min = 0;
static const unsigned long nlm_grace_period_max = 240;
static const unsigned long nlm_timeout_min = 3;
static const unsigned long nlm_timeout_max = 20;
static const int nlm_port_min = 0, nlm_port_max = 65535;
static struct ctl_table_header * nlm_sysctl_table;
static unsigned long set_grace_period(void) static unsigned long set_grace_period(void)
{ {
...@@ -302,52 +315,130 @@ lockd_down(void) ...@@ -302,52 +315,130 @@ lockd_down(void)
up(&nlmsvc_sema); up(&nlmsvc_sema);
} }
#ifdef MODULE /*
/* New module support in 2.1.18 */ * Sysctl parameters (same as module parameters, different interface).
*/
/* Something that isn't CTL_ANY, CTL_NONE or a value that may clash. */
#define CTL_UNNUMBERED -2
static ctl_table nlm_sysctls[] = {
{
.ctl_name = CTL_UNNUMBERED,
.procname = "nlm_grace_period",
.data = &nlm_grace_period,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_doulongvec_minmax,
.extra1 = (unsigned long *) &nlm_grace_period_min,
.extra2 = (unsigned long *) &nlm_grace_period_max,
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "nlm_timeout",
.data = &nlm_timeout,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_doulongvec_minmax,
.extra1 = (unsigned long *) &nlm_timeout_min,
.extra2 = (unsigned long *) &nlm_timeout_max,
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "nlm_udpport",
.data = &nlm_udpport,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.extra1 = (int *) &nlm_port_min,
.extra2 = (int *) &nlm_port_max,
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "nlm_tcpport",
.data = &nlm_tcpport,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.extra1 = (int *) &nlm_port_min,
.extra2 = (int *) &nlm_port_max,
},
{ .ctl_name = 0 }
};
static ctl_table nlm_sysctl_dir[] = {
{
.ctl_name = CTL_UNNUMBERED,
.procname = "nfs",
.mode = 0555,
.child = nlm_sysctls,
},
{ .ctl_name = 0 }
};
static ctl_table nlm_sysctl_root[] = {
{
.ctl_name = CTL_FS,
.procname = "fs",
.mode = 0555,
.child = nlm_sysctl_dir,
},
{ .ctl_name = 0 }
};
/*
* Module (and driverfs) parameters.
*/
#define param_set_min_max(name, type, which_strtol, min, max) \
static int param_set_##name(const char *val, struct kernel_param *kp) \
{ \
char *endp; \
__typeof__(type) num = which_strtol(val, &endp, 0); \
if (endp == val || *endp || num < (min) || num > (max)) \
return -EINVAL; \
*((int *) kp->arg) = num; \
return 0; \
}
param_set_min_max(port, int, simple_strtol, 0, 65535)
param_set_min_max(grace_period, unsigned long, simple_strtoul,
nlm_grace_period_min, nlm_grace_period_max)
param_set_min_max(timeout, unsigned long, simple_strtoul,
nlm_timeout_min, nlm_timeout_max)
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>"); MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
MODULE_DESCRIPTION("NFS file locking service version " LOCKD_VERSION "."); MODULE_DESCRIPTION("NFS file locking service version " LOCKD_VERSION ".");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(nlm_grace_period, "10-240l");
MODULE_PARM(nlm_timeout, "3-20l");
MODULE_PARM(nlm_udpport, "0-65535l");
MODULE_PARM(nlm_tcpport, "0-65535l");
int module_param_call(nlm_grace_period, param_set_grace_period, param_get_ulong,
init_module(void) &nlm_grace_period, 644);
{ module_param_call(nlm_timeout, param_set_timeout, param_get_ulong,
/* Init the static variables */ &nlm_timeout, 644);
init_MUTEX(&nlmsvc_sema); module_param_call(nlm_udpport, param_set_port, param_get_int,
nlmsvc_users = 0; &nlm_udpport, 644);
nlmsvc_pid = 0; module_param_call(nlm_tcpport, param_set_port, param_get_int,
return 0; &nlm_tcpport, 644);
}
void /*
cleanup_module(void) * Initialising and terminating the module.
{
/* FIXME: delete all NLM clients */
nlm_shutdown_hosts();
}
#else
/* not a module, so process bootargs
* lockd.udpport and lockd.tcpport
*/ */
static int __init udpport_set(char *str) static int __init init_nlm(void)
{ {
nlm_udpport = simple_strtoul(str, NULL, 0); nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root, 0);
return 1; return nlm_sysctl_table ? 0 : -ENOMEM;
} }
static int __init tcpport_set(char *str)
static void __exit exit_nlm(void)
{ {
nlm_tcpport = simple_strtoul(str, NULL, 0); /* FIXME: delete all NLM clients */
return 1; nlm_shutdown_hosts();
unregister_sysctl_table(nlm_sysctl_table);
} }
__setup("lockd.udpport=", udpport_set);
__setup("lockd.tcpport=", tcpport_set);
#endif module_init(init_nlm);
module_exit(exit_nlm);
/* /*
* Define NLM program and procedures * Define NLM program and procedures
......
...@@ -362,7 +362,7 @@ static int kstat_read_proc(char *page, char **start, off_t off, ...@@ -362,7 +362,7 @@ static int kstat_read_proc(char *page, char **start, off_t off,
int i, len; int i, len;
extern unsigned long total_forks; extern unsigned long total_forks;
u64 jif; u64 jif;
unsigned int sum = 0, user = 0, nice = 0, system = 0, idle = 0, iowait = 0; unsigned int sum = 0, user = 0, nice = 0, system = 0, idle = 0, iowait = 0, irq = 0, softirq = 0;
struct timeval now; struct timeval now;
unsigned long seq; unsigned long seq;
...@@ -388,25 +388,31 @@ static int kstat_read_proc(char *page, char **start, off_t off, ...@@ -388,25 +388,31 @@ static int kstat_read_proc(char *page, char **start, off_t off,
system += kstat_cpu(i).cpustat.system; system += kstat_cpu(i).cpustat.system;
idle += kstat_cpu(i).cpustat.idle; idle += kstat_cpu(i).cpustat.idle;
iowait += kstat_cpu(i).cpustat.iowait; iowait += kstat_cpu(i).cpustat.iowait;
irq += kstat_cpu(i).cpustat.irq;
softirq += kstat_cpu(i).cpustat.softirq;
for (j = 0 ; j < NR_IRQS ; j++) for (j = 0 ; j < NR_IRQS ; j++)
sum += kstat_cpu(i).irqs[j]; sum += kstat_cpu(i).irqs[j];
} }
len = sprintf(page, "cpu %u %u %u %u %u\n", len = sprintf(page, "cpu %u %u %u %u %u %u %u\n",
jiffies_to_clock_t(user), jiffies_to_clock_t(user),
jiffies_to_clock_t(nice), jiffies_to_clock_t(nice),
jiffies_to_clock_t(system), jiffies_to_clock_t(system),
jiffies_to_clock_t(idle), jiffies_to_clock_t(idle),
jiffies_to_clock_t(iowait)); jiffies_to_clock_t(iowait),
jiffies_to_clock_t(irq),
jiffies_to_clock_t(softirq));
for (i = 0 ; i < NR_CPUS; i++){ for (i = 0 ; i < NR_CPUS; i++){
if (!cpu_online(i)) continue; if (!cpu_online(i)) continue;
len += sprintf(page + len, "cpu%d %u %u %u %u %u\n", len += sprintf(page + len, "cpu%d %u %u %u %u %u %u %u\n",
i, i,
jiffies_to_clock_t(kstat_cpu(i).cpustat.user), jiffies_to_clock_t(kstat_cpu(i).cpustat.user),
jiffies_to_clock_t(kstat_cpu(i).cpustat.nice), jiffies_to_clock_t(kstat_cpu(i).cpustat.nice),
jiffies_to_clock_t(kstat_cpu(i).cpustat.system), jiffies_to_clock_t(kstat_cpu(i).cpustat.system),
jiffies_to_clock_t(kstat_cpu(i).cpustat.idle), jiffies_to_clock_t(kstat_cpu(i).cpustat.idle),
jiffies_to_clock_t(kstat_cpu(i).cpustat.iowait)); jiffies_to_clock_t(kstat_cpu(i).cpustat.iowait),
jiffies_to_clock_t(kstat_cpu(i).cpustat.irq),
jiffies_to_clock_t(kstat_cpu(i).cpustat.softirq));
} }
len += sprintf(page + len, "intr %u", sum); len += sprintf(page + len, "intr %u", sum);
......
...@@ -42,6 +42,9 @@ struct eisa_device { ...@@ -42,6 +42,9 @@ struct eisa_device {
struct resource res[EISA_MAX_RESOURCES]; struct resource res[EISA_MAX_RESOURCES];
u64 dma_mask; u64 dma_mask;
struct device dev; /* generic device */ struct device dev; /* generic device */
#ifdef CONFIG_EISA_NAMES
char pretty_name[DEVICE_NAME_SIZE];
#endif
}; };
#define to_eisa_device(n) container_of(n, struct eisa_device, dev) #define to_eisa_device(n) container_of(n, struct eisa_device, dev)
......
...@@ -97,7 +97,7 @@ struct ethtool_coalesce { ...@@ -97,7 +97,7 @@ struct ethtool_coalesce {
u32 rx_max_coalesced_frames; u32 rx_max_coalesced_frames;
/* Same as above two parameters, except that these values /* Same as above two parameters, except that these values
* apply while an IRQ is being services by the host. Not * apply while an IRQ is being serviced by the host. Not
* all cards support this feature and the values are ignored * all cards support this feature and the values are ignored
* in that case. * in that case.
*/ */
...@@ -119,7 +119,7 @@ struct ethtool_coalesce { ...@@ -119,7 +119,7 @@ struct ethtool_coalesce {
u32 tx_max_coalesced_frames; u32 tx_max_coalesced_frames;
/* Same as above two parameters, except that these values /* Same as above two parameters, except that these values
* apply while an IRQ is being services by the host. Not * apply while an IRQ is being serviced by the host. Not
* all cards support this feature and the values are ignored * all cards support this feature and the values are ignored
* in that case. * in that case.
*/ */
...@@ -250,6 +250,101 @@ struct ethtool_stats { ...@@ -250,6 +250,101 @@ struct ethtool_stats {
u64 data[0]; u64 data[0];
}; };
struct net_device;
/* Some generic methods drivers may use in their ethtool_ops */
u32 ethtool_op_get_link(struct net_device *dev);
u32 ethtool_op_get_tx_csum(struct net_device *dev);
u32 ethtool_op_get_sg(struct net_device *dev);
int ethtool_op_set_sg(struct net_device *dev, u32 data);
/**
* &ethtool_ops - Alter and report network device settings
* get_settings: Get device-specific settings
* set_settings: Set device-specific settings
* get_drvinfo: Report driver information
* get_regs: Get device registers
* get_wol: Report whether Wake-on-Lan is enabled
* set_wol: Turn Wake-on-Lan on or off
* get_msglevel: Report driver message level
* set_msglevel: Set driver message level
* nway_reset: Restart autonegotiation
* get_link: Get link status
* get_eeprom: Read data from the device EEPROM
* set_eeprom: Write data to the device EEPROM
* get_coalesce: Get interrupt coalescing parameters
* set_coalesce: Set interrupt coalescing parameters
* get_ringparam: Report ring sizes
* set_ringparam: Set ring sizes
* get_pauseparam: Report pause parameters
* set_pauseparam: Set pause paramters
* get_rx_csum: Report whether receive checksums are turned on or off
* set_rx_csum: Turn receive checksum on or off
* get_tx_csum: Report whether transmit checksums are turned on or off
* set_tx_csum: Turn transmit checksums on or off
* get_sg: Report whether scatter-gather is enabled
* set_sg: Turn scatter-gather on or off
* self_test: Run specified self-tests
* get_strings: Return a set of strings that describe the requested objects
* phys_id: Identify the device
* get_stats: Return statistics about the device
*
* Description:
*
* get_settings:
* @get_settings is passed an &ethtool_cmd to fill in. It returns
* an negative errno or zero.
*
* set_settings:
* @set_settings is passed an &ethtool_cmd and should attempt to set
* all the settings this device supports. It may return an error value
* if something goes wrong (otherwise 0).
*
* get_eeprom:
* Should fill in the magic field. Don't need to check len for zero
* or wraparound but must check offset + len < size. Fill in the data
* argument with the eeprom values from offset to offset + len. Update
* len to the amount read. Returns an error or zero.
*
* set_eeprom:
* Should validate the magic field. Don't need to check len for zero
* or wraparound but must check offset + len < size. Update len to
* the amount written. Returns an error or zero.
*/
struct ethtool_ops {
int (*get_settings)(struct net_device *, struct ethtool_cmd *);
int (*set_settings)(struct net_device *, struct ethtool_cmd *);
void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
int (*get_regs_len)(struct net_device *);
void (*get_regs)(struct net_device *, struct ethtool_regs *, void *);
void (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
int (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
u32 (*get_msglevel)(struct net_device *);
void (*set_msglevel)(struct net_device *, u32);
int (*nway_reset)(struct net_device *);
u32 (*get_link)(struct net_device *);
int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *);
int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *);
void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
u32 (*get_rx_csum)(struct net_device *);
int (*set_rx_csum)(struct net_device *, u32);
u32 (*get_tx_csum)(struct net_device *);
int (*set_tx_csum)(struct net_device *, u32);
u32 (*get_sg)(struct net_device *);
int (*set_sg)(struct net_device *, u32);
int (*self_test_count)(struct net_device *);
void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
void (*get_strings)(struct net_device *, u32 stringset, u8 *);
int (*phys_id)(struct net_device *, u32);
int (*get_stats_count)(struct net_device *);
void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
};
/* CMDs currently supported */ /* CMDs currently supported */
#define ETHTOOL_GSET 0x00000001 /* Get settings. */ #define ETHTOOL_GSET 0x00000001 /* Get settings. */
#define ETHTOOL_SSET 0x00000002 /* Set settings. */ #define ETHTOOL_SSET 0x00000002 /* Set settings. */
......
...@@ -17,6 +17,8 @@ struct cpu_usage_stat { ...@@ -17,6 +17,8 @@ struct cpu_usage_stat {
unsigned int user; unsigned int user;
unsigned int nice; unsigned int nice;
unsigned int system; unsigned int system;
unsigned int softirq;
unsigned int irq;
unsigned int idle; unsigned int idle;
unsigned int iowait; unsigned int iowait;
}; };
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* /*
* Version string * Version string
*/ */
#define LOCKD_VERSION "0.4" #define LOCKD_VERSION "0.5"
/* /*
* Default timeout for RPC calls (seconds) * Default timeout for RPC calls (seconds)
......
...@@ -73,6 +73,7 @@ struct mca_device { ...@@ -73,6 +73,7 @@ struct mca_device {
void *proc_dev; void *proc_dev;
#endif #endif
struct device dev; struct device dev;
char name[32];
}; };
#define to_mca_device(mdev) container_of(mdev, struct mca_device, dev) #define to_mca_device(mdev) container_of(mdev, struct mca_device, dev)
...@@ -92,6 +93,7 @@ struct mca_bus { ...@@ -92,6 +93,7 @@ struct mca_bus {
int number; int number;
struct mca_bus_accessor_functions f; struct mca_bus_accessor_functions f;
struct device dev; struct device dev;
char name[32];
}; };
#define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev) #define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev)
...@@ -118,6 +120,12 @@ extern void *mca_device_transform_memory(struct mca_device *mca_dev, ...@@ -118,6 +120,12 @@ extern void *mca_device_transform_memory(struct mca_device *mca_dev,
void *mem); void *mem);
extern int mca_device_claimed(struct mca_device *mca_dev); extern int mca_device_claimed(struct mca_device *mca_dev);
extern void mca_device_set_claim(struct mca_device *mca_dev, int val); extern void mca_device_set_claim(struct mca_device *mca_dev, int val);
extern void mca_device_set_name(struct mca_device *mca_dev, const char *name);
static inline char *mca_device_get_name(struct mca_device *mca_dev)
{
return mca_dev ? mca_dev->name : NULL;
}
extern enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev); extern enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev);
extern struct bus_type mca_bus_type; extern struct bus_type mca_bus_type;
......
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
struct divert_blk; struct divert_blk;
struct vlan_group; struct vlan_group;
struct ethtool_ops;
/* source back-compat hook */
#define SET_ETHTOOL_OPS(netdev,ops) \
( (netdev)->ethtool_ops = (ops) )
#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev #define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
functions are available. */ functions are available. */
...@@ -300,6 +305,8 @@ struct net_device ...@@ -300,6 +305,8 @@ struct net_device
* See <net/iw_handler.h> for details. Jean II */ * See <net/iw_handler.h> for details. Jean II */
struct iw_handler_def * wireless_handlers; struct iw_handler_def * wireless_handlers;
struct ethtool_ops *ethtool_ops;
/* /*
* This marks the end of the "visible" part of the structure. All * This marks the end of the "visible" part of the structure. All
* fields hereafter are internal to the system, and may change at * fields hereafter are internal to the system, and may change at
...@@ -482,7 +489,6 @@ struct packet_type ...@@ -482,7 +489,6 @@ struct packet_type
struct list_head list; struct list_head list;
}; };
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/notifier.h> #include <linux/notifier.h>
...@@ -630,6 +636,7 @@ extern int netif_rx(struct sk_buff *skb); ...@@ -630,6 +636,7 @@ extern int netif_rx(struct sk_buff *skb);
#define HAVE_NETIF_RECEIVE_SKB 1 #define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb); extern int netif_receive_skb(struct sk_buff *skb);
extern int dev_ioctl(unsigned int cmd, void *); extern int dev_ioctl(unsigned int cmd, void *);
extern int dev_ethtool(struct ifreq *);
extern unsigned dev_get_flags(const struct net_device *); extern unsigned dev_get_flags(const struct net_device *);
extern int dev_change_flags(struct net_device *, unsigned); extern int dev_change_flags(struct net_device *, unsigned);
extern int dev_set_mtu(struct net_device *, int); extern int dev_set_mtu(struct net_device *, int);
......
...@@ -34,4 +34,14 @@ ...@@ -34,4 +34,14 @@
# define PR_FP_EXC_ASYNC 2 /* async recoverable exception mode */ # define PR_FP_EXC_ASYNC 2 /* async recoverable exception mode */
# define PR_FP_EXC_PRECISE 3 /* precise exception mode */ # define PR_FP_EXC_PRECISE 3 /* precise exception mode */
/* Get/set whether we use statistical process timing or accurate timestamp
* based process timing */
#define PR_GET_TIMING 13
#define PR_SET_TIMING 14
# define PR_TIMING_STATISTICAL 0 /* Normal, traditional,
statistical process timing */
# define PR_TIMING_TIMESTAMP 1 /* Accurate timestamp based
process timing */
#endif /* _LINUX_PRCTL_H */ #endif /* _LINUX_PRCTL_H */
...@@ -118,7 +118,6 @@ typedef struct dev_link_t { ...@@ -118,7 +118,6 @@ typedef struct dev_link_t {
dev_node_t *dev; dev_node_t *dev;
u_int state, open; u_int state, open;
wait_queue_head_t pending; wait_queue_head_t pending;
struct timer_list release;
client_handle_t handle; client_handle_t handle;
io_req_t io; io_req_t io;
irq_req_t irq; irq_req_t irq;
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* the scsi code for linux. * the scsi code for linux.
*/ */
#include <linux/types.h>
/* /*
$Header: /usr/src/linux/include/linux/RCS/scsi.h,v 1.3 1993/09/24 12:20:33 drew Exp $ $Header: /usr/src/linux/include/linux/RCS/scsi.h,v 1.3 1993/09/24 12:20:33 drew Exp $
...@@ -208,18 +210,18 @@ static inline int scsi_status_is_good(int status) ...@@ -208,18 +210,18 @@ static inline int scsi_status_is_good(int status)
struct ccs_modesel_head struct ccs_modesel_head
{ {
u_char _r1; /* reserved */ u8 _r1; /* reserved */
u_char medium; /* device-specific medium type */ u8 medium; /* device-specific medium type */
u_char _r2; /* reserved */ u8 _r2; /* reserved */
u_char block_desc_length; /* block descriptor length */ u8 block_desc_length; /* block descriptor length */
u_char density; /* device-specific density code */ u8 density; /* device-specific density code */
u_char number_blocks_hi; /* number of blocks in this block desc */ u8 number_blocks_hi; /* number of blocks in this block desc */
u_char number_blocks_med; u8 number_blocks_med;
u_char number_blocks_lo; u8 number_blocks_lo;
u_char _r3; u8 _r3;
u_char block_length_hi; /* block length for blocks in this desc */ u8 block_length_hi; /* block length for blocks in this desc */
u_char block_length_med; u8 block_length_med;
u_char block_length_lo; u8 block_length_lo;
}; };
/* /*
......
...@@ -165,9 +165,9 @@ int parse_args(const char *name, ...@@ -165,9 +165,9 @@ int parse_args(const char *name,
} }
STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol); STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol);
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", long, simple_strtol); STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, simple_strtoul);
STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol); STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol);
STANDARD_PARAM_DEF(uint, unsigned int, "%u", long, simple_strtol); STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, simple_strtoul);
STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol); STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol);
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul); STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul);
......
...@@ -1201,11 +1201,17 @@ void scheduler_tick(int user_ticks, int sys_ticks) ...@@ -1201,11 +1201,17 @@ void scheduler_tick(int user_ticks, int sys_ticks)
if (rcu_pending(cpu)) if (rcu_pending(cpu))
rcu_check_callbacks(cpu, user_ticks); rcu_check_callbacks(cpu, user_ticks);
if (p == rq->idle) {
/* note: this timer irq context must be accounted for as well */ /* note: this timer irq context must be accounted for as well */
if (irq_count() - HARDIRQ_OFFSET >= SOFTIRQ_OFFSET) if (hardirq_count() - HARDIRQ_OFFSET) {
cpustat->system += sys_ticks; cpustat->irq += sys_ticks;
else if (atomic_read(&rq->nr_iowait) > 0) sys_ticks = 0;
} else if (softirq_count()) {
cpustat->softirq += sys_ticks;
sys_ticks = 0;
}
if (p == rq->idle) {
if (atomic_read(&rq->nr_iowait) > 0)
cpustat->iowait += sys_ticks; cpustat->iowait += sys_ticks;
else else
cpustat->idle += sys_ticks; cpustat->idle += sys_ticks;
......
...@@ -1399,7 +1399,15 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, ...@@ -1399,7 +1399,15 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
case PR_GET_FPEXC: case PR_GET_FPEXC:
error = GET_FPEXC_CTL(current, arg2); error = GET_FPEXC_CTL(current, arg2);
break; break;
case PR_GET_TIMING:
error = PR_TIMING_STATISTICAL;
break;
case PR_SET_TIMING:
if (arg2 == PR_TIMING_STATISTICAL)
error = 0;
else
error = -EINVAL;
break;
case PR_GET_KEEPCAPS: case PR_GET_KEEPCAPS:
if (current->keep_capabilities) if (current->keep_capabilities)
......
...@@ -87,13 +87,12 @@ char * strncpy(char * dest,const char *src,size_t count) ...@@ -87,13 +87,12 @@ char * strncpy(char * dest,const char *src,size_t count)
{ {
char *tmp = dest; char *tmp = dest;
while (count && (*dest++ = *src++) != '\0') while (count) {
count--; if ((*tmp = *src) != 0) src++;
while (count > 1) { tmp++;
*dest++ = 0;
count--; count--;
} }
return tmp; return dest;
} }
#endif #endif
......
...@@ -6,8 +6,8 @@ obj-y := sock.o skbuff.o iovec.o datagram.o scm.o ...@@ -6,8 +6,8 @@ obj-y := sock.o skbuff.o iovec.o datagram.o scm.o
obj-$(CONFIG_SYSCTL) += sysctl_net_core.o obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
obj-y += flow.o dev.o net-sysfs.o dev_mcast.o dst.o neighbour.o \ obj-y += flow.o dev.o ethtool.o net-sysfs.o dev_mcast.o dst.o \
rtnetlink.o utils.o link_watch.o filter.o neighbour.o rtnetlink.o utils.o link_watch.o filter.o
obj-$(CONFIG_NETFILTER) += netfilter.o obj-$(CONFIG_NETFILTER) += netfilter.o
obj-$(CONFIG_NET_DIVERT) += dv.o obj-$(CONFIG_NET_DIVERT) += dv.o
......
...@@ -2368,7 +2368,6 @@ static int dev_ifsioc(struct ifreq *ifr, unsigned int cmd) ...@@ -2368,7 +2368,6 @@ static int dev_ifsioc(struct ifreq *ifr, unsigned int cmd)
cmd == SIOCBONDSLAVEINFOQUERY || cmd == SIOCBONDSLAVEINFOQUERY ||
cmd == SIOCBONDINFOQUERY || cmd == SIOCBONDINFOQUERY ||
cmd == SIOCBONDCHANGEACTIVE || cmd == SIOCBONDCHANGEACTIVE ||
cmd == SIOCETHTOOL ||
cmd == SIOCGMIIPHY || cmd == SIOCGMIIPHY ||
cmd == SIOCGMIIREG || cmd == SIOCGMIIREG ||
cmd == SIOCSMIIREG || cmd == SIOCSMIIREG ||
...@@ -2465,13 +2464,26 @@ int dev_ioctl(unsigned int cmd, void *arg) ...@@ -2465,13 +2464,26 @@ int dev_ioctl(unsigned int cmd, void *arg)
} }
return ret; return ret;
case SIOCETHTOOL:
dev_load(ifr.ifr_name);
rtnl_lock();
ret = dev_ethtool(&ifr);
rtnl_unlock();
if (!ret) {
if (colon)
*colon = ':';
if (copy_to_user(arg, &ifr,
sizeof(struct ifreq)))
ret = -EFAULT;
}
return ret;
/* /*
* These ioctl calls: * These ioctl calls:
* - require superuser power. * - require superuser power.
* - require strict serialization. * - require strict serialization.
* - return a value * - return a value
*/ */
case SIOCETHTOOL:
case SIOCGMIIPHY: case SIOCGMIIPHY:
case SIOCGMIIREG: case SIOCGMIIREG:
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
......
This diff is collapsed.
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/fcdevice.h> #include <linux/fcdevice.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/ethtool.h>
#include <net/neighbour.h> #include <net/neighbour.h>
#include <net/snmp.h> #include <net/snmp.h>
#include <net/dst.h> #include <net/dst.h>
...@@ -625,4 +626,10 @@ EXPORT_SYMBOL(wireless_spy_update); ...@@ -625,4 +626,10 @@ EXPORT_SYMBOL(wireless_spy_update);
EXPORT_SYMBOL(linkwatch_fire_event); EXPORT_SYMBOL(linkwatch_fire_event);
/* ethtool.c */
EXPORT_SYMBOL(ethtool_op_get_link);
EXPORT_SYMBOL(ethtool_op_get_tx_csum);
EXPORT_SYMBOL(ethtool_op_get_sg);
EXPORT_SYMBOL(ethtool_op_set_sg);
#endif /* CONFIG_NET */ #endif /* CONFIG_NET */
...@@ -7,9 +7,8 @@ src := $(obj) ...@@ -7,9 +7,8 @@ src := $(obj)
.PHONY: __build .PHONY: __build
__build: __build:
ifdef include_config # Read .config if it exist, otherwise ignore
include .config -include .config
endif
include $(obj)/Makefile include $(obj)/Makefile
......
...@@ -44,4 +44,4 @@ clean-files += parse.output ...@@ -44,4 +44,4 @@ clean-files += parse.output
endif endif
targets += $(obj)/keywords.c $(obj)/lex.c $(obj)/parse.c $(obj)/parse.h targets += keywords.c lex.c parse.c parse.h
################# # ===========================================================================
# # Kernel configuration targets
# Shared Makefile for the various lkc executables: # These targets are used from top-level makefile
.PHONY: oldconfig xconfig gconfig menuconfig config
xconfig: scripts/kconfig/qconf
./scripts/kconfig/qconf arch/$(ARCH)/Kconfig
gconfig: scripts/kconfig/gconf
./scripts/kconfig/gconf arch/$(ARCH)/Kconfig
menuconfig: scripts/kconfig/mconf
$(Q)$(MAKE) $(build)=scripts/lxdialog
./scripts/kconfig/mconf arch/$(ARCH)/Kconfig
config: scripts/kconfig/conf
./scripts/kconfig/conf arch/$(ARCH)/Kconfig
oldconfig: scripts/kconfig/conf
./scripts/kconfig/conf -o arch/$(ARCH)/Kconfig
.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
randconfig: scripts/kconfig/conf
./scripts/kconfig/conf -r arch/$(ARCH)/Kconfig
allyesconfig: scripts/kconfig/conf
./scripts/kconfig/conf -y arch/$(ARCH)/Kconfig
allnoconfig: scripts/kconfig/conf
./scripts/kconfig/conf -n arch/$(ARCH)/Kconfig
allmodconfig: scripts/kconfig/conf
./scripts/kconfig/conf -m arch/$(ARCH)/Kconfig
defconfig: scripts/kconfig/conf
./scripts/kconfig/conf -d arch/$(ARCH)/Kconfig
# Help text used by make help
help:
@echo ' oldconfig - Update current config utilising a line-oriented program'
@echo ' menuconfig - Update current config utilising a menu based program'
@echo ' xconfig - Update current config utilising a QT based front-end'
@echo ' gconfig - Update current config utilising a GTK based front-end'
@echo ' defconfig - New config with default answer to all options'
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allnoconfig - New minimal config'
# ===========================================================================
# Shared Makefile for the various kconfig executables:
# conf: Used for defconfig, oldconfig and related targets # conf: Used for defconfig, oldconfig and related targets
# mconf: Used for the mconfig target. # mconf: Used for the mconfig target.
# Utilizes the lxdialog package # Utilizes the lxdialog package
...@@ -8,10 +57,8 @@ ...@@ -8,10 +57,8 @@
# Based on QT which needs to be installed to compile it # Based on QT which needs to be installed to compile it
# gconf: Used for the gconfig target # gconf: Used for the gconfig target
# Based on GTK which needs to be installed to compile it # Based on GTK which needs to be installed to compile it
# # object files used by all kconfig flavours
#################
# object files used by all lkc flavours
libkconfig-objs := zconf.tab.o libkconfig-objs := zconf.tab.o
host-progs := conf mconf qconf gconf host-progs := conf mconf qconf gconf
......
...@@ -241,7 +241,7 @@ static int sb_pnp_probe(struct pnp_card_link *card, const struct pnp_card_device ...@@ -241,7 +241,7 @@ static int sb_pnp_probe(struct pnp_card_link *card, const struct pnp_card_device
memset(scc, 0, sizeof(struct sb_card_config)); memset(scc, 0, sizeof(struct sb_card_config));
printk(KERN_INFO "sb: PnP: Found Card Named = \"%s\", Card PnP id = " \ printk(KERN_INFO "sb: PnP: Found Card Named = \"%s\", Card PnP id = " \
"%s, Device PnP id = %s\n", dev->dev.name, card_id->id, "%s, Device PnP id = %s\n", card->card->name, card_id->id,
dev->id->id); dev->id->id);
scc->card_id = card_id->id; scc->card_id = card_id->id;
......
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