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
Kirill Smelkov
linux
Commits
ee29d109
Commit
ee29d109
authored
Oct 27, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] MCA bus basic cleanups
parent
ecf2c214
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1323 additions
and
1540 deletions
+1323
-1540
arch/i386/kernel/mca.c
arch/i386/kernel/mca.c
+20
-21
drivers/net/ibmlana.c
drivers/net/ibmlana.c
+87
-240
drivers/net/ibmlana.h
drivers/net/ibmlana.h
+15
-29
drivers/net/tokenring/3c359.c
drivers/net/tokenring/3c359.c
+1
-1
drivers/net/tokenring/smctr.c
drivers/net/tokenring/smctr.c
+115
-153
drivers/net/tokenring/smctr.h
drivers/net/tokenring/smctr.h
+2
-0
drivers/scsi/fd_mcs.c
drivers/scsi/fd_mcs.c
+1052
-1070
drivers/scsi/fd_mcs.h
drivers/scsi/fd_mcs.h
+31
-26
No files found.
arch/i386/kernel/mca.c
View file @
ee29d109
...
...
@@ -194,10 +194,9 @@ struct resource mca_standard_resources[] = {
#define MCA_STANDARD_RESOURCES (sizeof(mca_standard_resources)/sizeof(struct resource))
void
__init
mca_init
(
void
)
int
__init
mca_init
(
void
)
{
unsigned
int
i
,
j
;
unsigned
long
flags
;
/* WARNING: Be careful when making changes here. Putting an adapter
* and the motherboard simultaneously into setup mode may result in
...
...
@@ -209,16 +208,16 @@ void __init mca_init(void)
/* Make sure the MCA bus is present */
if
(
!
MCA_bus
)
return
;
printk
(
"Micro Channel bus detected.
\n
"
);
return
-
ENODEV
;
printk
(
KERN_INFO
"Micro Channel bus detected.
\n
"
);
/* Allocate MCA_info structure (at address divisible by 8) */
mca_info
=
(
struct
MCA_info
*
)
kmalloc
(
sizeof
(
struct
MCA_info
),
GFP_KERNEL
);
if
(
mca_info
==
NULL
)
{
printk
(
"Failed to allocate memory for mca_info!"
);
return
;
printk
(
KERN_ERR
"Failed to allocate memory for mca_info!"
);
return
-
ENOMEM
;
}
memset
(
mca_info
,
0
,
sizeof
(
struct
MCA_info
));
...
...
@@ -320,6 +319,8 @@ void __init mca_init(void)
#ifdef CONFIG_PROC_FS
mca_do_proc_init
();
#endif
return
0
;
}
subsys_initcall
(
mca_init
);
...
...
@@ -329,16 +330,16 @@ subsys_initcall(mca_init);
static
void
mca_handle_nmi_slot
(
int
slot
,
int
check_flag
)
{
if
(
slot
<
MCA_MAX_SLOT_NR
)
{
printk
(
"NMI: caused by MCA adapter in slot %d (%s)
\n
"
,
slot
+
1
,
printk
(
KERN_CRIT
"NMI: caused by MCA adapter in slot %d (%s)
\n
"
,
slot
+
1
,
mca_info
->
slot
[
slot
].
name
);
}
else
if
(
slot
==
MCA_INTEGSCSI
)
{
printk
(
"NMI: caused by MCA integrated SCSI adapter (%s)
\n
"
,
printk
(
KERN_CRIT
"NMI: caused by MCA integrated SCSI adapter (%s)
\n
"
,
mca_info
->
slot
[
slot
].
name
);
}
else
if
(
slot
==
MCA_INTEGVIDEO
)
{
printk
(
"NMI: caused by MCA integrated video adapter (%s)
\n
"
,
printk
(
KERN_CRIT
"NMI: caused by MCA integrated video adapter (%s)
\n
"
,
mca_info
->
slot
[
slot
].
name
);
}
else
if
(
slot
==
MCA_MOTHERBOARD
)
{
printk
(
"NMI: caused by motherboard (%s)
\n
"
,
printk
(
KERN_CRIT
"NMI: caused by motherboard (%s)
\n
"
,
mca_info
->
slot
[
slot
].
name
);
}
...
...
@@ -350,7 +351,7 @@ static void mca_handle_nmi_slot(int slot, int check_flag)
pos6
=
mca_read_pos
(
slot
,
6
);
pos7
=
mca_read_pos
(
slot
,
7
);
printk
(
"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
);
}
}
/* mca_handle_nmi_slot */
...
...
@@ -367,21 +368,19 @@ void mca_handle_nmi(void)
* adapter was responsible for the error.
*/
for
(
i
=
0
;
i
<
MCA_NUMADAPTERS
;
i
++
)
{
/* Bit 7 of POS 5 is reset when this adapter has a hardware
* error. Bit 7 it reset if there's error information
* available in POS 6 and 7.
*/
pos5
=
mca_read_pos
(
i
,
5
);
for
(
i
=
0
;
i
<
MCA_NUMADAPTERS
;
i
++
)
{
/* Bit 7 of POS 5 is reset when this adapter has a hardware
* error. Bit 7 it reset if there's error information
* available in POS 6 and 7.
*/
pos5
=
mca_read_pos
(
i
,
5
);
if
(
!
(
pos5
&
0x80
))
{
if
(
!
(
pos5
&
0x80
))
{
mca_handle_nmi_slot
(
i
,
!
(
pos5
&
0x40
));
return
;
}
}
mca_nmi_hook
();
}
/* mca_handle_nmi */
...
...
drivers/net/ibmlana.c
View file @
ee29d109
This diff is collapsed.
Click to expand it.
drivers/net/ibmlana.h
View file @
ee29d109
...
...
@@ -3,22 +3,6 @@
#ifdef _IBM_LANA_DRIVER_
/* version-dependent functions/structures */
#if LINUX_VERSION_CODE >= 0x020318
#define IBMLANA_READB(addr) isa_readb(addr)
#define IBMLANA_TOIO(dest, src, len) isa_memcpy_toio(dest, src, len)
#define IBMLANA_FROMIO(dest, src, len) isa_memcpy_fromio(dest, src, len)
#define IBMLANA_SETIO(dest, val, len) isa_memset_io(dest, val, len)
#define IBMLANA_NETDEV net_device
#else
#define IBMLANA_READB(addr) readb(addr)
#define IBMLANA_TOIO(dest, src, len) memcpy_toio(dest, src, len)
#define IBMLANA_FROMIO(dest, src, len) memcpy_fromio(dest, src, len)
#define IBMLANA_SETIO(dest, val, len) memset_io(dest, val, len)
#define IBMLANA_NETDEV device
#endif
/* maximum packet size */
#define PKTSIZE 1524
...
...
@@ -33,25 +17,27 @@
/* media enumeration - defined in a way that it fits onto the LAN/A's
POS registers... */
typedef
enum
{
Media_10BaseT
,
Media_10Base5
,
typedef
enum
{
Media_10BaseT
,
Media_10Base5
,
Media_Unknown
,
Media_10Base2
,
Media_Count
}
ibmlana_medium
;
/* private structure */
typedef
struct
{
unsigned
int
slot
;
/* MCA-Slot-# */
unsigned
int
slot
;
/* MCA-Slot-# */
struct
net_device_stats
stat
;
/* packet statistics */
int
realirq
;
/* memorizes actual IRQ, even when
currently not allocated */
ibmlana_medium
medium
;
/* physical cannector */
u32
tdastart
,
txbufstart
,
/* addresses */
rrastart
,
rxbufstart
,
rdastart
,
rxbufcnt
,
txusedcnt
;
int
nextrxdescr
,
/* next rx descriptor to be used */
lastrxdescr
,
/* last free rx descriptor */
nexttxdescr
,
/* last tx descriptor to be used */
currtxdescr
,
/* tx descriptor currently tx'ed */
txused
[
TXBUFCNT
];
/* busy flags */
int
realirq
;
/* memorizes actual IRQ, even when
currently not allocated */
ibmlana_medium
medium
;
/* physical cannector */
u32
tdastart
,
txbufstart
,
/* addresses */
rrastart
,
rxbufstart
,
rdastart
,
rxbufcnt
,
txusedcnt
;
int
nextrxdescr
,
/* next rx descriptor to be used */
lastrxdescr
,
/* last free rx descriptor */
nexttxdescr
,
/* last tx descriptor to be used */
currtxdescr
,
/* tx descriptor currently tx'ed */
txused
[
TXBUFCNT
];
/* busy flags */
spinlock_t
lock
;
}
ibmlana_priv
;
/* this card uses quite a lot of I/O ports...luckily the MCA bus decodes
...
...
@@ -289,7 +275,7 @@ typedef struct {
#endif
/* _IBM_LANA_DRIVER_ */
extern
int
ibmlana_probe
(
struct
IBMLANA_NETDEV
*
);
extern
int
ibmlana_probe
(
struct
net_device
*
);
#endif
/* _IBM_LANA_INCLUDE_ */
drivers/net/tokenring/3c359.c
View file @
ee29d109
...
...
@@ -1780,7 +1780,7 @@ static int xl_change_mtu(struct net_device *dev, int mtu)
static
void
__devexit
xl_remove_one
(
struct
pci_dev
*
pdev
)
{
struct
net_device
*
dev
=
p
dev
->
driver_data
;
struct
net_device
*
dev
=
p
ci_get_drvdata
(
pdev
)
;
struct
xl_private
*
xl_priv
=
(
struct
xl_private
*
)
dev
->
priv
;
unregister_trdev
(
dev
);
...
...
drivers/net/tokenring/smctr.c
View file @
ee29d109
This diff is collapsed.
Click to expand it.
drivers/net/tokenring/smctr.h
View file @
ee29d109
...
...
@@ -1050,6 +1050,8 @@ typedef struct net_local {
__u16
QueueSkb
;
struct
tr_statistics
MacStat
;
/* MAC statistics structure */
spinlock_t
lock
;
}
NET_LOCAL
;
/************************************
...
...
drivers/scsi/fd_mcs.c
View file @
ee29d109
This diff is collapsed.
Click to expand it.
drivers/scsi/fd_mcs.h
View file @
ee29d109
...
...
@@ -22,31 +22,36 @@
#ifndef _FD_MCS_H
#define _FD_MCS_H
extern
int
fd_mcs_detect
(
Scsi_Host_Template
*
);
extern
int
fd_mcs_release
(
struct
Scsi_Host
*
);
extern
int
fd_mcs_command
(
Scsi_Cmnd
*
);
extern
int
fd_mcs_abort
(
Scsi_Cmnd
*
);
extern
int
fd_mcs_reset
(
Scsi_Cmnd
*
,
unsigned
int
);
extern
int
fd_mcs_queue
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
)
);
extern
int
fd_mcs_biosparam
(
Disk
*
,
struct
block_device
*
,
int
*
);
extern
int
fd_mcs_proc_info
(
char
*
,
char
**
,
off_t
,
int
,
int
,
int
);
extern
const
char
*
fd_mcs_info
(
struct
Scsi_Host
*
);
static
int
fd_mcs_detect
(
Scsi_Host_Template
*
);
static
int
fd_mcs_release
(
struct
Scsi_Host
*
);
static
int
fd_mcs_command
(
Scsi_Cmnd
*
);
static
int
fd_mcs_abort
(
Scsi_Cmnd
*
);
static
int
fd_mcs_bus_reset
(
Scsi_Cmnd
*
);
static
int
fd_mcs_device_reset
(
Scsi_Cmnd
*
);
static
int
fd_mcs_host_reset
(
Scsi_Cmnd
*
);
static
int
fd_mcs_queue
(
Scsi_Cmnd
*
,
void
(
*
done
)
(
Scsi_Cmnd
*
));
static
int
fd_mcs_biosparam
(
Disk
*
,
struct
block_device
*
,
int
*
);
static
int
fd_mcs_proc_info
(
char
*
,
char
**
,
off_t
,
int
,
int
,
int
);
static
const
char
*
fd_mcs_info
(
struct
Scsi_Host
*
);
#define FD_MCS {\
proc_name: "fd_mcs", \
proc_info: fd_mcs_proc_info, \
detect: fd_mcs_detect, \
release: fd_mcs_release, \
info: fd_mcs_info, \
command: fd_mcs_command, \
queuecommand: fd_mcs_queue, \
abort: fd_mcs_abort, \
reset: fd_mcs_reset, \
bios_param: fd_mcs_biosparam, \
can_queue: 1, \
this_id: 7, \
sg_tablesize: 64, \
cmd_per_lun: 1, \
use_clustering: DISABLE_CLUSTERING }
#endif
/* _FD_MCS_H */
proc_name: "fd_mcs", \
proc_info: fd_mcs_proc_info, \
detect: fd_mcs_detect, \
release: fd_mcs_release, \
info: fd_mcs_info, \
command: fd_mcs_command, \
queuecommand: fd_mcs_queue, \
eh_abort_handler: fd_mcs_abort, \
eh_bus_reset_handler: fd_mcs_bus_reset, \
eh_host_reset_handler: fd_mcs_host_reset, \
eh_device_reset_handler: fd_mcs_device_reset, \
bios_param: fd_mcs_biosparam, \
can_queue: 1, \
this_id: 7, \
sg_tablesize: 64, \
cmd_per_lun: 1, \
use_clustering: DISABLE_CLUSTERING \
}
#endif
/* _FD_MCS_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