Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
bc0243ae
Commit
bc0243ae
authored
Nov 22, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mca-sysfs-VI
Make proc and legacy depend on compile options.
parent
34d0daf9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
41 deletions
+58
-41
arch/i386/Kconfig
arch/i386/Kconfig
+2
-0
arch/i386/kernel/mca.c
arch/i386/kernel/mca.c
+21
-24
drivers/mca/Kconfig
drivers/mca/Kconfig
+17
-0
drivers/mca/Makefile
drivers/mca/Makefile
+3
-2
include/linux/mca-legacy.h
include/linux/mca-legacy.h
+0
-13
include/linux/mca.h
include/linux/mca.h
+15
-2
No files found.
arch/i386/Kconfig
View file @
bc0243ae
...
@@ -1079,6 +1079,8 @@ config MCA
...
@@ -1079,6 +1079,8 @@ config MCA
<file:Documentation/mca.txt> (and especially the web page given
<file:Documentation/mca.txt> (and especially the web page given
there) before attempting to build an MCA bus kernel.
there) before attempting to build an MCA bus kernel.
source "drivers/mca/Kconfig"
config HOTPLUG
config HOTPLUG
bool "Support for hot-pluggable devices"
bool "Support for hot-pluggable devices"
---help---
---help---
...
...
arch/i386/kernel/mca.c
View file @
bc0243ae
...
@@ -408,16 +408,11 @@ subsys_initcall(mca_init);
...
@@ -408,16 +408,11 @@ subsys_initcall(mca_init);
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
void
mca_handle_nmi_
slot
(
int
slot
,
int
check_flag
)
static
void
mca_handle_nmi_
device
(
struct
mca_device
*
mca_dev
,
int
check_flag
)
{
{
struct
mca_device
*
mca_dev
=
mca_find_device_by_slot
(
slot
)
;
int
slot
=
mca_dev
->
slot
;
if
(
!
mca_dev
)
{
if
(
slot
==
MCA_INTEGSCSI
)
{
printk
(
KERN_CRIT
"NMI: caused by unknown slot %d
\n
"
,
slot
);
}
else
if
(
slot
<
MCA_MAX_SLOT_NR
)
{
printk
(
KERN_CRIT
"NMI: caused by MCA adapter in slot %d (%s)
\n
"
,
slot
+
1
,
mca_dev
->
dev
.
name
);
}
else
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
->
dev
.
name
);
}
else
if
(
slot
==
MCA_INTEGVIDEO
)
{
}
else
if
(
slot
==
MCA_INTEGVIDEO
)
{
...
@@ -433,8 +428,8 @@ static void mca_handle_nmi_slot(int slot, int check_flag)
...
@@ -433,8 +428,8 @@ static void mca_handle_nmi_slot(int slot, int check_flag)
if
(
check_flag
)
{
if
(
check_flag
)
{
unsigned
char
pos6
,
pos7
;
unsigned
char
pos6
,
pos7
;
pos6
=
mca_
read_pos
(
slot
,
6
);
pos6
=
mca_
device_read_pos
(
mca_dev
,
6
);
pos7
=
mca_
read_pos
(
slot
,
7
);
pos7
=
mca_
device_read_pos
(
mca_dev
,
7
);
printk
(
KERN_CRIT
"NMI: POS 6 = 0x%x, POS 7 = 0x%x
\n
"
,
pos6
,
pos7
);
printk
(
KERN_CRIT
"NMI: POS 6 = 0x%x, POS 7 = 0x%x
\n
"
,
pos6
,
pos7
);
}
}
...
@@ -443,28 +438,30 @@ static void mca_handle_nmi_slot(int slot, int check_flag)
...
@@ -443,28 +438,30 @@ static void mca_handle_nmi_slot(int slot, int check_flag)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
void
mca_handle_nmi
(
void
)
static
int
mca_handle_nmi_callback
(
struct
device
*
dev
,
void
*
data
)
{
{
struct
mca_device
*
mca_dev
=
to_mca_device
(
dev
);
int
i
;
unsigned
char
pos5
;
unsigned
char
pos5
;
/* First try - scan the various adapters and see if a specific
pos5
=
mca_device_read_pos
(
mca_dev
,
5
);
* adapter was responsible for the error.
*/
for
(
i
=
0
;
i
<
MCA_NUMADAPTERS
;
i
++
)
if
(
!
(
pos5
&
0x80
))
{
{
/* Bit 7 of POS 5 is reset when this adapter has a hardware
/* Bit 7 of POS 5 is reset when this adapter has a hardware
* error. Bit 7 it reset if there's error information
* error. Bit 7 it reset if there's error information
* available in POS 6 and 7.
* available in POS 6 and 7.
*/
*/
pos5
=
mca_read_pos
(
i
,
5
);
mca_handle_nmi_device
(
mca_dev
,
!
(
pos5
&
0x40
));
return
1
;
if
(
!
(
pos5
&
0x80
))
{
mca_handle_nmi_slot
(
i
,
!
(
pos5
&
0x40
));
return
;
}
}
}
return
0
;
}
void
mca_handle_nmi
(
void
)
{
/* First try - scan the various adapters and see if a specific
* adapter was responsible for the error.
*/
bus_for_each_dev
(
&
mca_bus_type
,
NULL
,
mca_handle_nmi_callback
);
mca_nmi_hook
();
mca_nmi_hook
();
}
/* mca_handle_nmi */
}
/* mca_handle_nmi */
drivers/mca/Kconfig
0 → 100644
View file @
bc0243ae
comment "Micro Channel Architecture Bus support"
depends on MCA
config MCA_LEGACY
bool "Legacy MCA API Support"
depends on MCA
help
This compiles in support for the old slot based MCA API. If you
have an unconverted MCA driver, you will need to say Y here. It
is safe to say Y anyway.
config MCA_PROC_FS
bool "Support for the mca entry in /proc"
depends on MCA_LEGACY
help
If you want the old style /proc/mca directory in addition to the
new style sysfs say Y here.
drivers/mca/Makefile
View file @
bc0243ae
# Makefile for the Linux MCA bus support
# Makefile for the Linux MCA bus support
obj-y
:=
mca-bus.o mca-device.o mca-driver.o
mca-legacy.o
obj-y
:=
mca-bus.o mca-device.o mca-driver.o
obj-$(CONFIG_PROC_FS)
+=
mca-proc.o
obj-$(CONFIG_MCA_PROC_FS)
+=
mca-proc.o
obj-$(CONFIG_MCA_LEGACY)
+=
mca-legacy.o
export-objs
:=
mca-bus.o mca-legacy.o mca-proc.o mca-driver.o
export-objs
:=
mca-bus.o mca-legacy.o mca-proc.o mca-driver.o
...
...
include/linux/mca-legacy.h
View file @
bc0243ae
...
@@ -65,17 +65,4 @@ extern unsigned char mca_read_pos(int slot, int reg);
...
@@ -65,17 +65,4 @@ extern unsigned char mca_read_pos(int slot, int reg);
/* write a byte to the specified POS register. */
/* write a byte to the specified POS register. */
extern
void
mca_write_pos
(
int
slot
,
int
reg
,
unsigned
char
byte
);
extern
void
mca_write_pos
(
int
slot
,
int
reg
,
unsigned
char
byte
);
#ifdef CONFIG_PROC_FS
extern
void
mca_do_proc_init
(
void
);
extern
void
mca_set_adapter_procfn
(
int
slot
,
MCA_ProcFn
,
void
*
dev
);
#else
static
inline
void
mca_do_proc_init
(
void
)
{
}
static
inline
void
mca_set_adapter_procfn
(
int
slot
,
MCA_ProcFn
*
fn
,
void
*
dev
)
{
}
#endif
#endif
#endif
include/linux/mca.h
View file @
bc0243ae
...
@@ -64,7 +64,7 @@ struct mca_device {
...
@@ -64,7 +64,7 @@ struct mca_device {
short
pos_register
;
short
pos_register
;
enum
MCA_AdapterStatus
status
;
enum
MCA_AdapterStatus
status
;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_
MCA_
PROC_FS
/* name of the proc/mca file */
/* name of the proc/mca file */
char
procname
[
8
];
char
procname
[
8
];
/* /proc info callback */
/* /proc info callback */
...
@@ -128,8 +128,21 @@ extern void mca_unregister_driver(struct mca_driver *drv);
...
@@ -128,8 +128,21 @@ extern void mca_unregister_driver(struct mca_driver *drv);
/* WARNING: only called by the boot time device setup */
/* WARNING: only called by the boot time device setup */
extern
int
mca_register_device
(
int
bus
,
struct
mca_device
*
mca_dev
);
extern
int
mca_register_device
(
int
bus
,
struct
mca_device
*
mca_dev
);
/* for now, include the legacy API */
#ifdef CONFIG_MCA_LEGACY
#include <linux/mca-legacy.h>
#include <linux/mca-legacy.h>
#endif
#ifdef CONFIG_MCA_PROC_FS
extern
void
mca_do_proc_init
(
void
);
extern
void
mca_set_adapter_procfn
(
int
slot
,
MCA_ProcFn
,
void
*
dev
);
#else
static
inline
void
mca_do_proc_init
(
void
)
{
}
static
inline
void
mca_set_adapter_procfn
(
int
slot
,
MCA_ProcFn
*
fn
,
void
*
dev
)
{
}
#endif
#endif
/* _LINUX_MCA_H */
#endif
/* _LINUX_MCA_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment