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
40ae7bb1
Commit
40ae7bb1
authored
Mar 26, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/tmp3
parents
55d25ac9
da017c5b
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
348 additions
and
266 deletions
+348
-266
Documentation/cciss.txt
Documentation/cciss.txt
+4
-0
arch/i386/kernel/cpu/amd.c
arch/i386/kernel/cpu/amd.c
+1
-2
arch/i386/kernel/cpu/intel.c
arch/i386/kernel/cpu/intel.c
+1
-0
arch/i386/kernel/cpuid.c
arch/i386/kernel/cpuid.c
+2
-0
arch/i386/kernel/msr.c
arch/i386/kernel/msr.c
+6
-1
arch/x86_64/kernel/pci-gart.c
arch/x86_64/kernel/pci-gart.c
+1
-0
drivers/block/cciss.c
drivers/block/cciss.c
+16
-4
drivers/char/cyclades.c
drivers/char/cyclades.c
+22
-34
drivers/char/drm/drm_drv.h
drivers/char/drm/drm_drv.h
+16
-8
drivers/ide/ide-cd.c
drivers/ide/ide-cd.c
+2
-2
drivers/parisc/eisa_eeprom.c
drivers/parisc/eisa_eeprom.c
+1
-1
drivers/pci/pci.ids
drivers/pci/pci.ids
+2
-0
drivers/pci/quirks.c
drivers/pci/quirks.c
+1
-0
drivers/sbus/char/riowatchdog.c
drivers/sbus/char/riowatchdog.c
+17
-2
drivers/scsi/scsi.h
drivers/scsi/scsi.h
+1
-1
drivers/serial/8250_pci.c
drivers/serial/8250_pci.c
+13
-0
drivers/usb/class/usblp.c
drivers/usb/class/usblp.c
+3
-5
drivers/usb/core/file.c
drivers/usb/core/file.c
+1
-2
drivers/usb/image/scanner.c
drivers/usb/image/scanner.c
+3
-3
drivers/usb/image/scanner.h
drivers/usb/image/scanner.h
+0
-2
drivers/usb/misc/auerswald.c
drivers/usb/misc/auerswald.c
+5
-12
drivers/usb/misc/brlvger.c
drivers/usb/misc/brlvger.c
+3
-5
drivers/usb/misc/rio500.c
drivers/usb/misc/rio500.c
+1
-3
drivers/usb/net/rtl8150.c
drivers/usb/net/rtl8150.c
+0
-1
drivers/usb/usb-skeleton.c
drivers/usb/usb-skeleton.c
+3
-6
fs/cramfs/inode.c
fs/cramfs/inode.c
+1
-0
fs/dcache.c
fs/dcache.c
+8
-7
fs/devfs/util.c
fs/devfs/util.c
+92
-0
fs/partitions/check.c
fs/partitions/check.c
+2
-88
include/asm-i386/bitops.h
include/asm-i386/bitops.h
+1
-1
include/asm-i386/io.h
include/asm-i386/io.h
+1
-1
include/asm-i386/processor.h
include/asm-i386/processor.h
+1
-1
include/asm-parisc/compat.h
include/asm-parisc/compat.h
+1
-1
include/asm-ppc64/compat.h
include/asm-ppc64/compat.h
+1
-1
include/asm-s390x/compat.h
include/asm-s390x/compat.h
+1
-1
include/asm-x86_64/compat.h
include/asm-x86_64/compat.h
+1
-1
include/linux/cyclades.h
include/linux/cyclades.h
+1
-3
include/linux/devfs_fs_kernel.h
include/linux/devfs_fs_kernel.h
+10
-31
include/linux/pci_ids.h
include/linux/pci_ids.h
+9
-0
net/decnet/dn_table.c
net/decnet/dn_table.c
+1
-2
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+1
-1
sound/oss/cs4232.c
sound/oss/cs4232.c
+41
-3
sound/oss/emu10k1/cardwo.c
sound/oss/emu10k1/cardwo.c
+8
-4
sound/oss/mad16.c
sound/oss/mad16.c
+42
-26
No files found.
Documentation/cciss.txt
View file @
40ae7bb1
...
...
@@ -9,6 +9,10 @@ This driver is known to work with the following cards:
* SA 5i
* SA 532
* SA 5312
* SA 641
* SA 642
* SA 6400
* SA 6400 U320 Expansion Module
If nodes are not already created in the /dev/cciss directory
...
...
arch/i386/kernel/cpu/amd.c
View file @
40ae7bb1
...
...
@@ -90,14 +90,13 @@ static void __init init_amd(struct cpuinfo_x86 *c)
d
=
d2
-
d
;
/* Knock these two lines out if it debugs out ok */
printk
(
KERN_INFO
"K6 BUG %ld %d (Report these if test report is incorrect)
\n
"
,
d
,
20
*
K6_BUG_LOOP
);
printk
(
KERN_INFO
"AMD K6 stepping B detected - "
);
/* -- cut here -- */
if
(
d
>
20
*
K6_BUG_LOOP
)
printk
(
"system stability may be impaired when more than 32 MB are used.
\n
"
);
else
printk
(
"probably OK (after B9730xxxx).
\n
"
);
printk
(
KERN_INFO
"Please see http://
www.mygale.com/~
poulot/k6bug.html
\n
"
);
printk
(
KERN_INFO
"Please see http://
membres.lycos.fr/
poulot/k6bug.html
\n
"
);
}
/* K6 with old style WHCR */
...
...
arch/i386/kernel/cpu/intel.c
View file @
40ae7bb1
...
...
@@ -100,6 +100,7 @@ static struct _cache_table cache_table[] __initdata =
{
0x25
,
LVL_3
,
2048
},
{
0x29
,
LVL_3
,
4096
},
{
0x39
,
LVL_2
,
128
},
{
0x3b
,
LVL_2
,
128
},
{
0x3C
,
LVL_2
,
256
},
{
0x41
,
LVL_2
,
128
},
{
0x42
,
LVL_2
,
256
},
...
...
arch/i386/kernel/cpuid.c
View file @
40ae7bb1
...
...
@@ -64,6 +64,7 @@ static inline void do_cpuid(int cpu, u32 reg, u32 *data)
{
struct
cpuid_command
cmd
;
preempt_disable
();
if
(
cpu
==
smp_processor_id
()
)
{
cpuid
(
reg
,
&
data
[
0
],
&
data
[
1
],
&
data
[
2
],
&
data
[
3
]);
}
else
{
...
...
@@ -73,6 +74,7 @@ static inline void do_cpuid(int cpu, u32 reg, u32 *data)
smp_call_function
(
cpuid_smp_cpuid
,
&
cmd
,
1
,
1
);
}
preempt_enable
();
}
#else
/* ! CONFIG_SMP */
...
...
arch/i386/kernel/msr.c
View file @
40ae7bb1
...
...
@@ -115,9 +115,13 @@ static void msr_smp_rdmsr(void *cmd_block)
static
inline
int
do_wrmsr
(
int
cpu
,
u32
reg
,
u32
eax
,
u32
edx
)
{
struct
msr_command
cmd
;
int
ret
;
preempt_disable
();
if
(
cpu
==
smp_processor_id
()
)
{
return
wrmsr_eio
(
reg
,
eax
,
edx
);
ret
=
wrmsr_eio
(
reg
,
eax
,
edx
);
preempt_enable
();
return
ret
;
}
else
{
cmd
.
cpu
=
cpu
;
cmd
.
reg
=
reg
;
...
...
@@ -125,6 +129,7 @@ static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx)
cmd
.
data
[
1
]
=
edx
;
smp_call_function
(
msr_smp_wrmsr
,
&
cmd
,
1
,
1
);
preempt_enable
();
return
cmd
.
err
;
}
}
...
...
arch/x86_64/kernel/pci-gart.c
View file @
40ae7bb1
...
...
@@ -419,6 +419,7 @@ static __init int init_k8_gatt(agp_kern_info *info)
panic
(
"Cannot allocate GATT table"
);
memset
(
gatt
,
0
,
gatt_size
);
change_page_attr
(
virt_to_page
(
gatt
),
gatt_size
/
PAGE_SIZE
,
PAGE_KERNEL_NOCACHE
);
global_flush_tlb
();
agp_gatt_table
=
gatt
;
for_all_nb
(
dev
)
{
...
...
drivers/block/cciss.c
View file @
40ae7bb1
/*
* Disk Array driver for
Compaq SMART2
Controllers
* Copyright 2000
Compaq Computer Corporation
* Disk Array driver for
HP SA 5xxx and 6xxx
Controllers
* Copyright 2000
, 2002 Hewlett-Packard Development Company, L.P.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Questions/Comments/Bugfixes to
arrays@compaq.com
* Questions/Comments/Bugfixes to
Cciss-discuss@lists.sourceforge.net
*
*/
...
...
@@ -69,6 +69,14 @@ const struct pci_device_id cciss_pci_device_id[] = {
0x0E11
,
0x4082
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_COMPAQ
,
PCI_DEVICE_ID_COMPAQ_CISSB
,
0x0E11
,
0x4083
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_COMPAQ
,
PCI_DEVICE_ID_COMPAQ_CISSC
,
0x0E11
,
0x409A
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_COMPAQ
,
PCI_DEVICE_ID_COMPAQ_CISSC
,
0x0E11
,
0x409B
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_COMPAQ
,
PCI_DEVICE_ID_COMPAQ_CISSC
,
0x0E11
,
0x409C
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_COMPAQ
,
PCI_DEVICE_ID_COMPAQ_CISSC
,
0x0E11
,
0x409D
,
0
,
0
,
0
},
{
0
,}
};
MODULE_DEVICE_TABLE
(
pci
,
cciss_pci_device_id
);
...
...
@@ -80,10 +88,14 @@ MODULE_DEVICE_TABLE(pci, cciss_pci_device_id);
* access = Address of the struct of function pointers
*/
static
struct
board_type
products
[]
=
{
{
0x40700E11
,
"Smart Array 5300"
,
&
SA5_access
},
{
0x40700E11
,
"Smart Array 5300"
,
&
SA5_access
},
{
0x40800E11
,
"Smart Array 5i"
,
&
SA5B_access
},
{
0x40820E11
,
"Smart Array 532"
,
&
SA5B_access
},
{
0x40830E11
,
"Smart Array 5312"
,
&
SA5B_access
},
{
0x409A0E11
,
"Smart Array 641"
,
&
SA5_access
},
{
0x409B0E11
,
"Smart Array 642"
,
&
SA5_access
},
{
0x409C0E11
,
"Smart Array 6400"
,
&
SA5_access
},
{
0x409D0E11
,
"Smart Array 6400 EM"
,
&
SA5_access
},
};
/* How long to wait (in millesconds) for board to go into simple mode */
...
...
drivers/char/cyclades.c
View file @
40ae7bb1
...
...
@@ -12,7 +12,7 @@ static char rcsid[] =
*
* Initially written by Randolph Bentson <bentson@grieg.seaslug.org>.
* Modified and maintained by Marcio Saito <marcio@cyclades.com>.
* Currently maintained by
Henrique Gobbi <henrique.gobbi
@cyclades.com>.
* Currently maintained by
Ivan Passos <ivan
@cyclades.com>.
*
* For Technical support and installation problems, please send e-mail
* to support@cyclades.com.
...
...
@@ -883,7 +883,9 @@ static void cyz_poll(unsigned long);
static
long
cyz_polling_cycle
=
CZ_DEF_POLL
;
static
int
cyz_timeron
=
0
;
static
struct
timer_list
cyz_timerlist
=
TIMER_INITIALIZER
(
cyz_poll
,
0
,
0
);
static
struct
timer_list
cyz_timerlist
=
{
.
function
=
cyz_poll
};
#else
/* CONFIG_CYZ_INTR */
static
void
cyz_rx_restart
(
unsigned
long
);
...
...
@@ -4944,17 +4946,16 @@ cy_detect_pci(void)
struct
pci_dev
*
pdev
=
NULL
;
unsigned
char
cyy_rev_id
;
unsigned
char
cy_pci_irq
=
0
;
uclong
cy_pci_phys0
,
cy_pci_phys
1
,
cy_pci_phys
2
;
unsigned
char
cy_pci_irq
=
0
;
uclong
cy_pci_phys0
,
cy_pci_phys2
;
uclong
cy_pci_addr0
,
cy_pci_addr2
;
unsigned
short
i
,
j
,
cy_pci_nchan
,
plx_ver
;
unsigned
short
device_id
,
dev_index
=
0
;
unsigned
short
i
,
j
,
cy_pci_nchan
,
plx_ver
;
unsigned
short
device_id
,
dev_index
=
0
;
uclong
mailbox
;
uclong
Ze_addr0
[
NR_CARDS
],
Ze_addr2
[
NR_CARDS
],
ZeIndex
=
0
;
uclong
Ze_phys0
[
NR_CARDS
],
Ze_phys2
[
NR_CARDS
];
unsigned
char
Ze_irq
[
NR_CARDS
];
struct
resource
*
resource
;
unsigned
long
res_start
,
res_len
;
unsigned
char
Ze_irq
[
NR_CARDS
];
struct
pci_dev
*
Ze_pdev
[
NR_CARDS
];
for
(
i
=
0
;
i
<
NR_CARDS
;
i
++
)
{
/* look for a Cyclades card by vendor and device id */
...
...
@@ -4976,7 +4977,6 @@ cy_detect_pci(void)
/* read PCI configuration area */
cy_pci_irq
=
pdev
->
irq
;
cy_pci_phys0
=
pci_resource_start
(
pdev
,
0
);
cy_pci_phys1
=
pci_resource_start
(
pdev
,
1
);
cy_pci_phys2
=
pci_resource_start
(
pdev
,
2
);
pci_read_config_byte
(
pdev
,
PCI_REVISION_ID
,
&
cyy_rev_id
);
...
...
@@ -5002,15 +5002,10 @@ cy_detect_pci(void)
/* Although we don't use this I/O region, we should
request it from the kernel anyway, to avoid problems
with other drivers accessing it. */
resource
=
request_region
(
cy_pci_phys1
,
CyPCI_Yctl
,
"Cyclom-Y"
);
if
(
resource
==
NULL
)
{
printk
(
KERN_ERR
"cyclades: failed to allocate IO "
"resource at 0x%lx
\n
"
,
cy_pci_phys1
);
if
(
pci_request_regions
(
pdev
,
"Cyclom-Y"
)
!=
0
)
{
printk
(
KERN_ERR
"cyclades: failed to reserve PCI resources
\n
"
);
continue
;
}
res_start
=
cy_pci_phys1
;
res_len
=
CyPCI_Yctl
;
#if defined(__alpha__)
if
(
device_id
==
PCI_DEVICE_ID_CYCLOM_Y_Lo
)
{
/* below 1M? */
...
...
@@ -5081,10 +5076,7 @@ cy_detect_pci(void)
cy_card
[
j
].
bus_index
=
1
;
cy_card
[
j
].
first_line
=
cy_next_channel
;
cy_card
[
j
].
num_chips
=
cy_pci_nchan
/
4
;
cy_card
[
j
].
resource
=
resource
;
cy_card
[
j
].
res_start
=
res_start
;
cy_card
[
j
].
res_len
=
res_len
;
resource
=
NULL
;
/* For next card */
cy_card
[
j
].
pdev
=
pdev
;
/* enable interrupts in the PCI interface */
plx_ver
=
cy_readb
(
cy_pci_addr2
+
CyPLX_VER
)
&
0x0f
;
...
...
@@ -5164,15 +5156,10 @@ cy_detect_pci(void)
/* Although we don't use this I/O region, we should
request it from the kernel anyway, to avoid problems
with other drivers accessing it. */
resource
=
request_region
(
cy_pci_phys1
,
CyPCI_Zctl
,
"Cyclades-Z"
);
if
(
resource
==
NULL
)
{
printk
(
KERN_ERR
"cyclades: failed ot allocate IO resource "
"at 0x%lx
\n
"
,
cy_pci_phys1
);
if
(
pci_request_regions
(
pdev
,
"Cyclades-Z"
)
!=
0
)
{
printk
(
KERN_ERR
"cyclades: failed to reserve PCI resources
\n
"
);
continue
;
}
res_start
=
cy_pci_phys1
;
res_len
=
CyPCI_Zctl
;
if
(
mailbox
==
ZE_V1
)
{
cy_pci_addr2
=
(
ulong
)
ioremap
(
cy_pci_phys2
,
CyPCI_Ze_win
);
...
...
@@ -5187,6 +5174,7 @@ cy_detect_pci(void)
Ze_addr0
[
ZeIndex
]
=
cy_pci_addr0
;
Ze_addr2
[
ZeIndex
]
=
cy_pci_addr2
;
Ze_irq
[
ZeIndex
]
=
cy_pci_irq
;
Ze_pdev
[
ZeIndex
]
=
pdev
;
ZeIndex
++
;
}
i
--
;
...
...
@@ -5271,10 +5259,7 @@ cy_detect_pci(void)
cy_card
[
j
].
bus_index
=
1
;
cy_card
[
j
].
first_line
=
cy_next_channel
;
cy_card
[
j
].
num_chips
=
-
1
;
cy_card
[
j
].
resource
=
resource
;
cy_card
[
j
].
res_start
=
res_start
;
cy_card
[
j
].
res_len
=
res_len
;
resource
=
NULL
;
/* For next card */
cy_card
[
j
].
pdev
=
pdev
;
/* print message */
#ifdef CONFIG_CYZ_INTR
...
...
@@ -5302,12 +5287,14 @@ cy_detect_pci(void)
cy_pci_addr0
=
Ze_addr0
[
0
];
cy_pci_addr2
=
Ze_addr2
[
0
];
cy_pci_irq
=
Ze_irq
[
0
];
pdev
=
Ze_pdev
[
0
];
for
(
j
=
0
;
j
<
ZeIndex
-
1
;
j
++
)
{
Ze_phys0
[
j
]
=
Ze_phys0
[
j
+
1
];
Ze_phys2
[
j
]
=
Ze_phys2
[
j
+
1
];
Ze_addr0
[
j
]
=
Ze_addr0
[
j
+
1
];
Ze_addr2
[
j
]
=
Ze_addr2
[
j
+
1
];
Ze_irq
[
j
]
=
Ze_irq
[
j
+
1
];
Ze_pdev
[
j
]
=
Ze_pdev
[
j
+
1
];
}
ZeIndex
--
;
mailbox
=
(
uclong
)
cy_readl
(
&
((
struct
RUNTIME_9060
*
)
...
...
@@ -5365,6 +5352,7 @@ cy_detect_pci(void)
cy_card
[
j
].
bus_index
=
1
;
cy_card
[
j
].
first_line
=
cy_next_channel
;
cy_card
[
j
].
num_chips
=
-
1
;
cy_card
[
j
].
pdev
=
pdev
;
/* print message */
#ifdef CONFIG_CYZ_INTR
...
...
@@ -5797,8 +5785,8 @@ cy_cleanup_module(void)
#endif
/* CONFIG_CYZ_INTR */
)
free_irq
(
cy_card
[
i
].
irq
,
&
cy_card
[
i
]);
if
(
cy_card
[
i
].
resource
)
release_region
(
cy_card
[
i
].
res_start
,
cy_card
[
i
].
res_len
);
if
(
cy_card
[
i
].
pdev
)
pci_release_regions
(
cy_card
[
i
].
pdev
);
}
}
if
(
tmp_buf
)
{
...
...
drivers/char/drm/drm_drv.h
View file @
40ae7bb1
...
...
@@ -581,8 +581,10 @@ static int __init drm_init( void )
init_timer
(
&
dev
->
timer
);
init_waitqueue_head
(
&
dev
->
context_wait
);
if
((
DRM
(
minor
)[
i
]
=
DRM
(
stub_register
)(
DRIVER_NAME
,
&
DRM
(
fops
),
dev
))
<
0
)
return
-
EPERM
;
if
((
DRM
(
minor
)[
i
]
=
DRM
(
stub_register
)(
DRIVER_NAME
,
&
DRM
(
fops
),
dev
))
<
0
)
{
retcode
=
-
EPERM
;
goto
fail_reg
;
}
dev
->
device
=
MKDEV
(
DRM_MAJOR
,
DRM
(
minor
)[
i
]
);
dev
->
name
=
DRIVER_NAME
;
...
...
@@ -591,9 +593,8 @@ static int __init drm_init( void )
#if __MUST_HAVE_AGP
if
(
dev
->
agp
==
NULL
)
{
DRM_ERROR
(
"Cannot initialize the agpgart module.
\n
"
);
DRM
(
stub_unregister
)(
DRM
(
minor
)[
i
]);
DRM
(
takedown
)(
dev
);
return
-
ENOMEM
;
retcode
=
-
ENOMEM
;
goto
fail
;
}
#endif
#if __REALLY_HAVE_MTRR
...
...
@@ -609,9 +610,7 @@ static int __init drm_init( void )
retcode
=
DRM
(
ctxbitmap_init
)(
dev
);
if
(
retcode
)
{
DRM_ERROR
(
"Cannot allocate memory for context bitmap.
\n
"
);
DRM
(
stub_unregister
)(
DRM
(
minor
)[
i
]);
DRM
(
takedown
)(
dev
);
return
retcode
;
goto
fail
;
}
#endif
DRM_INFO
(
"Initialized %s %d.%d.%d %s on minor %d
\n
"
,
...
...
@@ -626,6 +625,15 @@ static int __init drm_init( void )
DRIVER_POSTINIT
();
return
0
;
fail:
DRM
(
stub_unregister
)(
DRM
(
minor
)[
i
]);
DRM
(
takedown
)(
dev
);
fail_reg:
kfree
(
DRM
(
device
));
kfree
(
DRM
(
minor
));
return
retcode
;
}
/* drm_cleanup is called via cleanup_module at module unload time.
...
...
drivers/ide/ide-cd.c
View file @
40ae7bb1
...
...
@@ -1749,8 +1749,8 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
/*
* pad, if necessary
*/
if
(
len
)
{
while
(
len
)
{
if
(
len
>
0
)
{
while
(
len
>
0
)
{
int
pad
=
0
;
xferfunc
(
drive
,
&
pad
,
sizeof
(
pad
));
...
...
drivers/parisc/eisa_eeprom.c
View file @
40ae7bb1
...
...
@@ -12,7 +12,7 @@
static
unsigned
long
eeprom_addr
;
static
lo
ng
long
eisa_eeprom_llseek
(
struct
file
*
file
,
loff_t
offset
,
int
origin
)
static
lo
ff_t
eisa_eeprom_llseek
(
struct
file
*
file
,
loff_t
offset
,
int
origin
)
{
switch
(
origin
)
{
case
0
:
...
...
drivers/pci/pci.ids
View file @
40ae7bb1
...
...
@@ -4911,6 +4911,8 @@
0100 Lava Dual Serial
0101 Lava Quatro A
0102 Lava Quatro B
0180 Lava Octo A
0181 Lava Octo B
0200 Lava Port Plus
0201 Lava Quad A
0202 Lava Quad B
...
...
drivers/pci/quirks.c
View file @
40ae7bb1
...
...
@@ -719,6 +719,7 @@ static struct pci_fixup pci_fixups[] __devinitdata = {
* instead of 0x01.
*/
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82380FB
,
quirk_transparent_bridge
},
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_TOSHIBA
,
0x605
,
quirk_transparent_bridge
},
{
PCI_FIXUP_FINAL
,
PCI_VENDOR_ID_CYRIX
,
PCI_DEVICE_ID_CYRIX_PCI_MASTER
,
quirk_mediagx_master
},
...
...
drivers/sbus/char/riowatchdog.c
View file @
40ae7bb1
/* $Id: riowatchdog.c,v 1.3
2001/10/08 22:19:51
davem Exp $
/* $Id: riowatchdog.c,v 1.3
.2.2 2002/01/23 18:48:02
davem Exp $
* riowatchdog.c - driver for hw watchdog inside Super I/O of RIO
*
* Copyright (C) 2001 David S. Miller (davem@redhat.com)
...
...
@@ -127,8 +127,11 @@ static int riowd_release(struct inode *inode, struct file *filp)
static
int
riowd_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
static
struct
watchdog_info
info
=
{
0
,
0
,
"Natl. Semiconductor PC97317"
};
static
struct
watchdog_info
info
=
{
WDIOF_SETTIMEOUT
,
0
,
"Natl. Semiconductor PC97317"
};
unsigned
int
options
;
int
new_margin
;
switch
(
cmd
)
{
case
WDIOC_GETSUPPORT
:
...
...
@@ -159,6 +162,18 @@ static int riowd_ioctl(struct inode *inode, struct file *filp,
break
;
case
WDIOC_SETTIMEOUT
:
if
(
get_user
(
new_margin
,
(
int
*
)
arg
))
return
-
EFAULT
;
if
((
new_margin
<
60
)
||
(
new_margin
>
(
255
*
60
)))
return
-
EINVAL
;
riowd_timeout
=
(
new_margin
+
59
)
/
60
;
riowd_pingtimer
();
/* Fall */
case
WDIOC_GETTIMEOUT
:
return
put_user
(
riowd_timeout
*
60
,
(
int
*
)
arg
);
default:
return
-
EINVAL
;
};
...
...
drivers/scsi/scsi.h
View file @
40ae7bb1
...
...
@@ -193,7 +193,7 @@ extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
#define SCSI_LOG_HLCOMPLETE_BITS 3
#define SCSI_LOG_IOCTL_BITS 3
#if CONFIG_SCSI_LOGGING
#if
def
CONFIG_SCSI_LOGGING
#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) \
{ \
...
...
drivers/serial/8250_pci.c
View file @
40ae7bb1
...
...
@@ -897,6 +897,7 @@ enum pci_board_num_t {
pbn_b0_bt_1_460800
,
pbn_b0_bt_2_460800
,
pbn_b0_bt_4_460800
,
pbn_b0_bt_1_921600
,
pbn_b0_bt_2_921600
,
...
...
@@ -1039,6 +1040,12 @@ static struct pci_board pci_boards[] __devinitdata = {
.
base_baud
=
460800
,
.
uart_offset
=
8
,
},
[
pbn_b0_bt_4_460800
]
=
{
.
flags
=
FL_BASE0
|
FL_BASE_BARS
,
.
num_ports
=
4
,
.
base_baud
=
460800
,
.
uart_offset
=
8
,
},
[
pbn_b0_bt_1_921600
]
=
{
.
flags
=
FL_BASE0
|
FL_BASE_BARS
,
...
...
@@ -1928,6 +1935,12 @@ static struct pci_device_id serial_pci_tbl[] __devinitdata = {
{
PCI_VENDOR_ID_LAVA
,
PCI_DEVICE_ID_LAVA_QUATRO_B
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
pbn_b0_bt_2_115200
},
{
PCI_VENDOR_ID_LAVA
,
PCI_DEVICE_ID_LAVA_OCTO_A
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
pbn_b0_bt_4_460800
},
{
PCI_VENDOR_ID_LAVA
,
PCI_DEVICE_ID_LAVA_OCTO_B
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
pbn_b0_bt_4_460800
},
{
PCI_VENDOR_ID_LAVA
,
PCI_DEVICE_ID_LAVA_PORT_PLUS
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
pbn_b0_bt_2_460800
},
...
...
drivers/usb/class/usblp.c
View file @
40ae7bb1
...
...
@@ -186,8 +186,6 @@ static void usblp_dump(struct usblp *usblp) {
}
#endif
extern
devfs_handle_t
usb_devfs_handle
;
/* /dev/usb dir. */
/* Quirks: various printer quirks are handled by this table & its flags. */
struct
quirk_printer_struct
{
...
...
@@ -820,7 +818,7 @@ static int usblp_probe(struct usb_interface *intf,
struct
usblp
*
usblp
=
0
;
int
protocol
;
int
retval
;
char
name
[
6
];
char
name
[
10
];
/* Malloc and start initializing usblp structure so we can use it
* directly. */
...
...
@@ -909,8 +907,8 @@ static int usblp_probe(struct usb_interface *intf,
#endif
/* If we have devfs, create with perms=660. */
sprintf
(
name
,
"lp%d"
,
usblp
->
minor
);
usblp
->
devfs
=
devfs_register
(
usb_devfs_handle
,
name
,
sprintf
(
name
,
"
usb/
lp%d"
,
usblp
->
minor
);
usblp
->
devfs
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
usblp
->
minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
...
...
drivers/usb/core/file.c
View file @
40ae7bb1
...
...
@@ -28,8 +28,7 @@
#endif
#include <linux/usb.h>
devfs_handle_t
usb_devfs_handle
;
/* /dev/usb dir. */
EXPORT_SYMBOL
(
usb_devfs_handle
);
static
devfs_handle_t
usb_devfs_handle
;
/* /dev/usb dir. */
#define MAX_USB_MINORS 256
static
struct
file_operations
*
usb_minors
[
MAX_USB_MINORS
];
...
...
drivers/usb/image/scanner.c
View file @
40ae7bb1
...
...
@@ -878,7 +878,7 @@ probe_scanner(struct usb_interface *intf,
char
valid_device
=
0
;
char
have_bulk_in
,
have_bulk_out
,
have_intr
;
char
name
[
1
0
];
char
name
[
1
4
];
dbg
(
"probe_scanner: USB dev address:%p"
,
dev
);
...
...
@@ -1099,9 +1099,9 @@ probe_scanner(struct usb_interface *intf,
scn
->
scn_minor
=
scn_minor
;
scn
->
isopen
=
0
;
sprintf
(
name
,
"scanner%d"
,
scn
->
scn_minor
-
SCN_BASE_MNR
);
sprintf
(
name
,
"
usb/
scanner%d"
,
scn
->
scn_minor
-
SCN_BASE_MNR
);
scn
->
devfs
=
devfs_register
(
usb_devfs_handle
,
name
,
scn
->
devfs
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
scn
->
scn_minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
...
...
drivers/usb/image/scanner.h
View file @
40ae7bb1
...
...
@@ -352,6 +352,4 @@ struct scn_usb_data {
};
#define to_scanner(d) container_of(d, struct scn_usb_data, kobj)
extern
devfs_handle_t
usb_devfs_handle
;
static
struct
usb_driver
scanner_driver
;
drivers/usb/misc/auerswald.c
View file @
40ae7bb1
...
...
@@ -72,9 +72,6 @@ do { \
#endif
/* prefix for the device descriptors in /dev/usb */
#define AU_PREFIX "auer"
/* Number of read buffers for each device */
#define AU_RBUFFERS 10
...
...
@@ -243,7 +240,7 @@ typedef struct auerscon
typedef
struct
{
struct
semaphore
mutex
;
/* protection in user context */
char
name
[
16
];
/* name of the /dev/usb entry */
char
name
[
20
];
/* name of the /dev/usb entry */
unsigned
int
dtindex
;
/* index in the device table */
devfs_handle_t
devfs
;
/* devfs device node */
struct
usb_device
*
usbdev
;
/* USB device handle */
...
...
@@ -260,9 +257,6 @@ typedef struct
wait_queue_head_t
bufferwait
;
/* wait for a control buffer */
}
auerswald_t
,
*
pauerswald_t
;
/* the global usb devfs handle */
extern
devfs_handle_t
usb_devfs_handle
;
/* array of pointers to our devices that are currently connected */
static
pauerswald_t
dev_table
[
AUER_MAX_DEVICES
];
...
...
@@ -1440,7 +1434,7 @@ static int auerchar_open (struct inode *inode, struct file *file)
cp
->
open_count
++
;
ccp
->
auerdev
=
cp
;
dbg
(
"open %s as /dev/
usb/
%s"
,
cp
->
dev_desc
,
cp
->
name
);
dbg
(
"open %s as /dev/%s"
,
cp
->
dev_desc
,
cp
->
name
);
up
(
&
cp
->
mutex
);
/* file IO stuff */
...
...
@@ -1970,7 +1964,7 @@ static int auerswald_probe (struct usb_interface *intf,
}
/* Give the device a name */
sprintf
(
cp
->
name
,
AU_PREFIX
"
%d"
,
dtindex
);
sprintf
(
cp
->
name
,
"usb/auer
%d"
,
dtindex
);
/* Store the index */
cp
->
dtindex
=
dtindex
;
...
...
@@ -1978,8 +1972,7 @@ static int auerswald_probe (struct usb_interface *intf,
up
(
&
dev_table_mutex
);
/* initialize the devfs node for this device and register it */
cp
->
devfs
=
devfs_register
(
usb_devfs_handle
,
cp
->
name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
cp
->
devfs
=
devfs_register
(
NULL
,
cp
->
name
,
0
,
USB_MAJOR
,
AUER_MINOR_BASE
+
dtindex
,
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
&
auerswald_fops
,
NULL
);
...
...
@@ -2089,7 +2082,7 @@ static void auerswald_disconnect (struct usb_interface *intf)
return
;
down
(
&
cp
->
mutex
);
info
(
"device /dev/
usb/
%s now disconnecting"
,
cp
->
name
);
info
(
"device /dev/%s now disconnecting"
,
cp
->
name
);
/* remove from device table */
/* Nobody can open() this device any more */
...
...
drivers/usb/misc/brlvger.c
View file @
40ae7bb1
...
...
@@ -144,8 +144,6 @@ static int mycontrolmsg(const char *funcname,
#define rcvcontrolmsg(priv,a,b,c,d,e,f) \
controlmsg(priv, USB_DIR_IN, a,b,c,d,e,f)
extern
devfs_handle_t
usb_devfs_handle
;
/* /dev/usb dir. */
/* ----------------------------------------------------------------------- */
/* Data */
...
...
@@ -294,7 +292,7 @@ brlvger_probe (struct usb_interface *intf,
/* protects against reentrance: once we've found a free slot
we reserve it.*/
static
DECLARE_MUTEX
(
reserve_sem
);
char
devfs_name
[
16
];
char
devfs_name
[
20
];
actifsettings
=
dev
->
actconfig
->
interface
->
altsetting
;
...
...
@@ -375,8 +373,8 @@ brlvger_probe (struct usb_interface *intf,
};
dbg
(
"Display length: %d"
,
priv
->
plength
);
sprintf
(
devfs_name
,
"brlvger%d"
,
priv
->
subminor
);
priv
->
devfs
=
devfs_register
(
usb_devfs_handle
,
devfs_name
,
sprintf
(
devfs_name
,
"
usb/
brlvger%d"
,
priv
->
subminor
);
priv
->
devfs
=
devfs_register
(
NULL
,
devfs_name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
BRLVGER_MINOR
+
priv
->
subminor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
...
...
drivers/usb/misc/rio500.c
View file @
40ae7bb1
...
...
@@ -76,8 +76,6 @@ struct rio_usb_data {
struct
semaphore
lock
;
/* general race avoidance */
};
extern
devfs_handle_t
usb_devfs_handle
;
/* /dev/usb dir. */
static
struct
rio_usb_data
rio_instance
;
static
int
open_rio
(
struct
inode
*
inode
,
struct
file
*
file
)
...
...
@@ -478,7 +476,7 @@ static int probe_rio(struct usb_interface *intf,
}
dbg
(
"probe_rio: ibuf address:%p"
,
rio
->
ibuf
);
rio
->
devfs
=
devfs_register
(
usb_devfs_handle
,
"
rio500"
,
rio
->
devfs
=
devfs_register
(
NULL
,
"usb/
rio500"
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
RIO_MINOR
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
...
...
drivers/usb/net/rtl8150.c
View file @
40ae7bb1
...
...
@@ -107,7 +107,6 @@ struct rtl8150 {
typedef
struct
rtl8150
rtl8150_t
;
/* the global usb devfs handle */
extern
devfs_handle_t
usb_devfs_handle
;
unsigned
long
multicast_filter_limit
=
32
;
static
void
fill_skb_pool
(
rtl8150_t
*
);
...
...
drivers/usb/usb-skeleton.c
View file @
40ae7bb1
...
...
@@ -119,9 +119,6 @@ struct usb_skel {
};
/* the global usb devfs handle */
extern
devfs_handle_t
usb_devfs_handle
;
/* prevent races between open() and disconnect() */
static
DECLARE_MUTEX
(
disconnect_sem
);
...
...
@@ -514,7 +511,7 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
size_t
buffer_size
;
int
i
;
int
retval
;
char
name
[
1
0
];
char
name
[
1
4
];
/* See if the device offered us matches what we can accept */
...
...
@@ -609,9 +606,9 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
}
/* initialize the devfs node for this device and register it */
sprintf
(
name
,
"skel%d"
,
dev
->
minor
);
sprintf
(
name
,
"
usb/
skel%d"
,
dev
->
minor
);
dev
->
devfs
=
devfs_register
(
usb_devfs_handle
,
name
,
dev
->
devfs
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
dev
->
minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
...
...
fs/cramfs/inode.c
View file @
40ae7bb1
...
...
@@ -51,6 +51,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inod
inode
->
i_blocks
=
(
cramfs_inode
->
size
-
1
)
/
512
+
1
;
inode
->
i_blksize
=
PAGE_CACHE_SIZE
;
inode
->
i_gid
=
cramfs_inode
->
gid
;
inode
->
i_mtime
=
inode
->
i_atime
=
inode
->
i_ctime
=
0
;
inode
->
i_ino
=
CRAMINO
(
cramfs_inode
);
/* inode->i_nlink is left 1 - arguably wrong for directories,
but it's the best we can do without reading the directory
...
...
fs/dcache.c
View file @
40ae7bb1
...
...
@@ -784,7 +784,8 @@ struct dentry * d_alloc_root(struct inode * root_inode)
struct
dentry
*
res
=
NULL
;
if
(
root_inode
)
{
res
=
d_alloc
(
NULL
,
&
(
const
struct
qstr
)
{
"/"
,
1
,
0
});
static
const
struct
qstr
name
=
{
.
name
=
"/"
,
.
len
=
1
,
.
hash
=
0
};
res
=
d_alloc
(
NULL
,
&
name
);
if
(
res
)
{
res
->
d_sb
=
root_inode
->
i_sb
;
res
->
d_parent
=
res
;
...
...
@@ -994,12 +995,12 @@ struct dentry * d_lookup(struct dentry * parent, struct qstr * name)
/*
* If dentry is moved, fail the lookup
*/
if
(
unlikely
(
move_count
!=
dentry
->
d_move_count
))
break
;
if
(
!
d_unhashed
(
dentry
))
{
atomic_inc
(
&
dentry
->
d_count
)
;
dentry
->
d_vfs_flags
|=
DCACHE_REFERENCED
;
found
=
dentry
;
if
(
likely
(
move_count
==
dentry
->
d_move_count
))
{
if
(
!
d_unhashed
(
dentry
))
{
atomic_inc
(
&
dentry
->
d_count
);
dentry
->
d_vfs_flags
|=
DCACHE_REFERENCED
;
found
=
dentry
;
}
}
spin_unlock
(
&
dentry
->
d_lock
);
break
;
...
...
fs/devfs/util.c
View file @
40ae7bb1
...
...
@@ -70,6 +70,7 @@
#include <linux/devfs_fs_kernel.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/genhd.h>
#include <asm/bitops.h>
#include "internal.h"
...
...
@@ -266,6 +267,18 @@ void devfs_dealloc_devnum(umode_t mode, dev_t devnum)
up
(
&
device_list_mutex
);
}
struct
unique_numspace
{
spinlock_t
init_lock
;
unsigned
char
sem_initialised
;
unsigned
int
num_free
;
/* Num free in bits */
unsigned
int
length
;
/* Array length in bytes */
unsigned
long
*
bits
;
struct
semaphore
semaphore
;
};
#define UNIQUE_NUMBERSPACE_INITIALISER {SPIN_LOCK_UNLOCKED, 0, 0, 0, NULL}
/**
* devfs_alloc_unique_number - Allocate a unique (positive) number.
...
...
@@ -339,3 +352,82 @@ void devfs_dealloc_unique_number (struct unique_numspace *space, int number)
if
(
!
was_set
)
PRINTK
(
"(): number %d was already free
\n
"
,
number
);
}
/* End Function devfs_dealloc_unique_number */
EXPORT_SYMBOL
(
devfs_dealloc_unique_number
);
static
struct
unique_numspace
disc_numspace
=
UNIQUE_NUMBERSPACE_INITIALISER
;
static
struct
unique_numspace
cdrom_numspace
=
UNIQUE_NUMBERSPACE_INITIALISER
;
void
devfs_create_partitions
(
struct
gendisk
*
dev
)
{
int
pos
=
0
;
devfs_handle_t
dir
;
char
dirname
[
64
],
symlink
[
16
];
if
(
dev
->
flags
&
GENHD_FL_DEVFS
)
{
dir
=
dev
->
de
;
if
(
!
dir
)
/* Aware driver wants to block disc management */
return
;
pos
=
devfs_generate_path
(
dir
,
dirname
+
3
,
sizeof
dirname
-
3
);
if
(
pos
<
0
)
return
;
strncpy
(
dirname
+
pos
,
"../"
,
3
);
}
else
{
/* Unaware driver: construct "real" directory */
sprintf
(
dirname
,
"../%s/disc%d"
,
dev
->
disk_name
,
dev
->
first_minor
>>
dev
->
minor_shift
);
dir
=
devfs_mk_dir
(
dirname
+
3
);
dev
->
de
=
dir
;
}
dev
->
number
=
devfs_alloc_unique_number
(
&
disc_numspace
);
sprintf
(
symlink
,
"discs/disc%d"
,
dev
->
number
);
devfs_mk_symlink
(
symlink
,
dirname
+
pos
);
dev
->
disk_de
=
devfs_register
(
dir
,
"disc"
,
0
,
dev
->
major
,
dev
->
first_minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
,
dev
->
fops
,
NULL
);
}
void
devfs_create_cdrom
(
struct
gendisk
*
dev
)
{
char
vname
[
23
];
dev
->
number
=
devfs_alloc_unique_number
(
&
cdrom_numspace
);
sprintf
(
vname
,
"cdroms/cdrom%d"
,
dev
->
number
);
if
(
dev
->
de
)
{
int
pos
;
char
rname
[
64
];
dev
->
disk_de
=
devfs_register
(
dev
->
de
,
"cd"
,
DEVFS_FL_DEFAULT
,
dev
->
major
,
dev
->
first_minor
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
dev
->
fops
,
NULL
);
pos
=
devfs_generate_path
(
dev
->
disk_de
,
rname
+
3
,
sizeof
(
rname
)
-
3
);
if
(
pos
>=
0
)
{
strncpy
(
rname
+
pos
,
"../"
,
3
);
devfs_mk_symlink
(
vname
,
rname
+
pos
);
}
}
else
{
dev
->
disk_de
=
devfs_register
(
NULL
,
vname
,
DEVFS_FL_DEFAULT
,
dev
->
major
,
dev
->
first_minor
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
dev
->
fops
,
NULL
);
}
}
void
devfs_remove_partitions
(
struct
gendisk
*
dev
)
{
devfs_unregister
(
dev
->
disk_de
);
dev
->
disk_de
=
NULL
;
if
(
dev
->
flags
&
GENHD_FL_CD
)
{
if
(
dev
->
de
)
devfs_remove
(
"cdroms/cdrom%d"
,
dev
->
number
);
devfs_dealloc_unique_number
(
&
cdrom_numspace
,
dev
->
number
);
}
else
{
devfs_remove
(
"discs/disc%d"
,
dev
->
number
);
if
(
!
(
dev
->
flags
&
GENHD_FL_DEVFS
))
{
devfs_unregister
(
dev
->
de
);
dev
->
de
=
NULL
;
}
devfs_dealloc_unique_number
(
&
disc_numspace
,
dev
->
number
);
}
}
fs/partitions/check.c
View file @
40ae7bb1
...
...
@@ -176,93 +176,6 @@ static void devfs_register_partition(struct gendisk *dev, int part)
#endif
}
#ifdef CONFIG_DEVFS_FS
static
struct
unique_numspace
disc_numspace
=
UNIQUE_NUMBERSPACE_INITIALISER
;
static
struct
unique_numspace
cdrom_numspace
=
UNIQUE_NUMBERSPACE_INITIALISER
;
#endif
static
void
devfs_create_partitions
(
struct
gendisk
*
dev
)
{
#ifdef CONFIG_DEVFS_FS
int
pos
=
0
;
devfs_handle_t
dir
;
char
dirname
[
64
],
symlink
[
16
];
if
(
dev
->
flags
&
GENHD_FL_DEVFS
)
{
dir
=
dev
->
de
;
if
(
!
dir
)
/* Aware driver wants to block disc management */
return
;
pos
=
devfs_generate_path
(
dir
,
dirname
+
3
,
sizeof
dirname
-
3
);
if
(
pos
<
0
)
return
;
strncpy
(
dirname
+
pos
,
"../"
,
3
);
}
else
{
/* Unaware driver: construct "real" directory */
sprintf
(
dirname
,
"../%s/disc%d"
,
dev
->
disk_name
,
dev
->
first_minor
>>
dev
->
minor_shift
);
dir
=
devfs_mk_dir
(
dirname
+
3
);
dev
->
de
=
dir
;
}
dev
->
number
=
devfs_alloc_unique_number
(
&
disc_numspace
);
sprintf
(
symlink
,
"discs/disc%d"
,
dev
->
number
);
devfs_mk_symlink
(
symlink
,
dirname
+
pos
);
dev
->
disk_de
=
devfs_register
(
dir
,
"disc"
,
0
,
dev
->
major
,
dev
->
first_minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
,
dev
->
fops
,
NULL
);
#endif
}
static
void
devfs_create_cdrom
(
struct
gendisk
*
dev
)
{
#ifdef CONFIG_DEVFS_FS
char
vname
[
23
];
dev
->
number
=
devfs_alloc_unique_number
(
&
cdrom_numspace
);
sprintf
(
vname
,
"cdroms/cdrom%d"
,
dev
->
number
);
if
(
dev
->
de
)
{
int
pos
;
char
rname
[
64
];
dev
->
disk_de
=
devfs_register
(
dev
->
de
,
"cd"
,
DEVFS_FL_DEFAULT
,
dev
->
major
,
dev
->
first_minor
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
dev
->
fops
,
NULL
);
pos
=
devfs_generate_path
(
dev
->
disk_de
,
rname
+
3
,
sizeof
(
rname
)
-
3
);
if
(
pos
>=
0
)
{
strncpy
(
rname
+
pos
,
"../"
,
3
);
devfs_mk_symlink
(
vname
,
rname
+
pos
);
}
}
else
{
dev
->
disk_de
=
devfs_register
(
NULL
,
vname
,
DEVFS_FL_DEFAULT
,
dev
->
major
,
dev
->
first_minor
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
dev
->
fops
,
NULL
);
}
#endif
}
static
void
devfs_remove_partitions
(
struct
gendisk
*
dev
)
{
#ifdef CONFIG_DEVFS_FS
devfs_unregister
(
dev
->
disk_de
);
dev
->
disk_de
=
NULL
;
if
(
dev
->
flags
&
GENHD_FL_CD
)
{
if
(
dev
->
de
)
devfs_remove
(
"cdroms/cdrom%d"
,
dev
->
number
);
devfs_dealloc_unique_number
(
&
cdrom_numspace
,
dev
->
number
);
}
else
{
devfs_remove
(
"discs/disc%d"
,
dev
->
number
);
if
(
!
(
dev
->
flags
&
GENHD_FL_DEVFS
))
{
devfs_unregister
(
dev
->
de
);
dev
->
de
=
NULL
;
}
devfs_dealloc_unique_number
(
&
disc_numspace
,
dev
->
number
);
}
#endif
}
/*
* sysfs bindings for partitions
*/
...
...
@@ -522,6 +435,7 @@ char *partition_name(dev_t dev)
{
struct
gendisk
*
hd
;
static
char
nomem
[]
=
"<nomem>"
;
char
b
[
BDEVNAME_SIZE
];
struct
dev_name
*
dname
;
struct
list_head
*
tmp
;
int
part
;
...
...
@@ -547,7 +461,7 @@ char *partition_name(dev_t dev)
put_disk
(
hd
);
}
if
(
!
dname
->
name
)
{
sprintf
(
dname
->
namebuf
,
"[dev %s]"
,
kdevname
(
to_kdev_t
(
dev
)
));
sprintf
(
dname
->
namebuf
,
"[dev %s]"
,
__bdevname
(
dev
,
b
));
dname
->
name
=
dname
->
namebuf
;
}
...
...
include/asm-i386/bitops.h
View file @
40ae7bb1
...
...
@@ -458,7 +458,7 @@ static __inline__ int ffs(int x)
__asm__
(
"bsfl %1,%0
\n\t
"
"jnz 1f
\n\t
"
"movl $-1,%0
\n
"
"1:"
:
"=r"
(
r
)
:
"
g
"
(
x
));
"1:"
:
"=r"
(
r
)
:
"
rm
"
(
x
));
return
r
+
1
;
}
...
...
include/asm-i386/io.h
View file @
40ae7bb1
...
...
@@ -49,7 +49,7 @@
* Temporary debugging check to catch old code using
* unmapped ISA addresses. Will be removed in 2.4.
*/
#if CONFIG_DEBUG_IOVIRT
#if
def
CONFIG_DEBUG_IOVIRT
extern
void
*
__io_virt_debug
(
unsigned
long
x
,
const
char
*
file
,
int
line
);
#define __io_virt(x) __io_virt_debug((unsigned long)(x), __FILE__, __LINE__)
#else
...
...
include/asm-i386/processor.h
View file @
40ae7bb1
...
...
@@ -419,7 +419,7 @@ static inline void load_esp0(struct tss_struct *tss, unsigned long esp0)
{
tss
->
esp0
=
esp0
;
/* This can only happen when SEP is enabled, no need to test "SEP"arately */
if
(
tss
->
ss1
!=
__KERNEL_CS
)
{
if
(
(
unlikely
(
tss
->
ss1
!=
__KERNEL_CS
))
)
{
tss
->
ss1
=
__KERNEL_CS
;
wrmsr
(
MSR_IA32_SYSENTER_CS
,
__KERNEL_CS
,
0
);
}
...
...
include/asm-parisc/compat.h
View file @
40ae7bb1
...
...
@@ -114,7 +114,7 @@ typedef u32 compat_uptr_t;
static
inline
void
*
compat_ptr
(
compat_uptr_t
uptr
)
{
return
(
void
*
)
uptr
;
return
(
void
*
)
(
unsigned
long
)
uptr
;
}
#endif
/* _ASM_PARISC_COMPAT_H */
include/asm-ppc64/compat.h
View file @
40ae7bb1
...
...
@@ -108,7 +108,7 @@ typedef u32 compat_uptr_t;
static
inline
void
*
compat_ptr
(
compat_uptr_t
uptr
)
{
return
(
void
*
)
uptr
;
return
(
void
*
)
(
unsigned
long
)
uptr
;
}
#endif
/* _ASM_PPC64_COMPAT_H */
include/asm-s390x/compat.h
View file @
40ae7bb1
...
...
@@ -111,7 +111,7 @@ typedef u32 compat_uptr_t;
static
inline
void
*
compat_ptr
(
compat_uptr_t
uptr
)
{
return
(
void
*
)(
uptr
&
0x7fffffffUL
);
return
(
void
*
)(
u
nsigned
long
)(
u
ptr
&
0x7fffffffUL
);
}
#endif
/* _ASM_S390X_COMPAT_H */
include/asm-x86_64/compat.h
View file @
40ae7bb1
...
...
@@ -117,7 +117,7 @@ typedef u32 compat_uptr_t;
static
inline
void
*
compat_ptr
(
compat_uptr_t
uptr
)
{
return
(
void
*
)
uptr
;
return
(
void
*
)
(
unsigned
long
)
uptr
;
}
#endif
/* _ASM_X86_64_COMPAT_H */
include/linux/cyclades.h
View file @
40ae7bb1
...
...
@@ -515,9 +515,7 @@ struct cyclades_card {
int
nports
;
/* Number of ports in the card */
int
bus_index
;
/* address shift - 0 for ISA, 1 for PCI */
int
intr_enabled
;
/* FW Interrupt flag - 0 disabled, 1 enabled */
struct
resource
*
resource
;
unsigned
long
res_start
;
unsigned
long
res_len
;
struct
pci_dev
*
pdev
;
#ifdef __KERNEL__
spinlock_t
card_lock
;
#else
...
...
include/linux/devfs_fs_kernel.h
View file @
40ae7bb1
...
...
@@ -20,20 +20,9 @@
typedef
struct
devfs_entry
*
devfs_handle_t
;
#ifdef CONFIG_DEVFS_FS
struct
unique_numspace
{
spinlock_t
init_lock
;
unsigned
char
sem_initialised
;
unsigned
int
num_free
;
/* Num free in bits */
unsigned
int
length
;
/* Array length in bytes */
unsigned
long
*
bits
;
struct
semaphore
semaphore
;
};
#define UNIQUE_NUMBERSPACE_INITIALISER {SPIN_LOCK_UNLOCKED, 0, 0, 0, NULL}
struct
gendisk
;
#ifdef CONFIG_DEVFS_FS
extern
devfs_handle_t
devfs_register
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
flags
,
unsigned
int
major
,
unsigned
int
minor
,
...
...
@@ -47,21 +36,11 @@ extern void devfs_remove(const char *fmt, ...)
extern
int
devfs_generate_path
(
devfs_handle_t
de
,
char
*
path
,
int
buflen
);
extern
int
devfs_register_tape
(
devfs_handle_t
de
);
extern
void
devfs_unregister_tape
(
int
num
);
extern
int
devfs_alloc_unique_number
(
struct
unique_numspace
*
space
);
extern
void
devfs_dealloc_unique_number
(
struct
unique_numspace
*
space
,
int
number
);
extern
void
devfs_create_partitions
(
struct
gendisk
*
dev
);
extern
void
devfs_create_cdrom
(
struct
gendisk
*
dev
);
extern
void
devfs_remove_partitions
(
struct
gendisk
*
dev
);
extern
void
mount_devfs_fs
(
void
);
#else
/* CONFIG_DEVFS_FS */
struct
unique_numspace
{
char
dummy
;
};
#define UNIQUE_NUMBERSPACE_INITIALISER {0}
static
inline
devfs_handle_t
devfs_register
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
flags
,
...
...
@@ -99,14 +78,14 @@ static inline int devfs_register_tape (devfs_handle_t de)
static
inline
void
devfs_unregister_tape
(
int
num
)
{
}
static
inline
int
devfs_alloc_unique_number
(
struct
unique_numspace
*
space
)
static
inline
void
devfs_create_partitions
(
struct
gendisk
*
dev
)
{
return
-
1
;
}
static
inline
void
devfs_dealloc_unique_number
(
struct
unique_numspace
*
space
,
int
number
)
static
inline
void
devfs_create_cdrom
(
struct
gendisk
*
dev
)
{
}
static
inline
void
devfs_remove_partitions
(
struct
gendisk
*
dev
)
{
return
;
}
static
inline
void
mount_devfs_fs
(
void
)
{
...
...
include/linux/pci_ids.h
View file @
40ae7bb1
...
...
@@ -397,6 +397,8 @@
#define PCI_DEVICE_ID_IBM_MPIC 0x0046
#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d
#define PCI_DEVICE_ID_IBM_CHUKAR 0x0096
#define PCI_DEVICE_ID_IBM_CPC710_PCI64 0x00fc
#define PCI_DEVICE_ID_IBM_CPC710_PCI32 0x0105
#define PCI_DEVICE_ID_IBM_405GP 0x0156
#define PCI_DEVICE_ID_IBM_SERVERAIDI960 0x01bd
#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff
...
...
@@ -1248,6 +1250,7 @@
#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
#define PCI_DEVICE_ID_SERVERWORKS_CIOB30 0x0010
#define PCI_DEVICE_ID_SERVERWORKS_CMIC_HE 0x0011
#define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017
#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200
#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
#define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203
...
...
@@ -1257,6 +1260,9 @@
#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
#define PCI_DEVICE_ID_SERVERWORKS_OSB4USB 0x0220
#define PCI_DEVICE_ID_SERVERWORKS_CSB5USB PCI_DEVICE_ID_SERVERWORKS_OSB4USB
#define PCI_DEVICE_ID_SERVERWORKS_CSB6USB 0x0221
#define PCI_DEVICE_ID_SERVERWORKS_GCLE 0x0225
#define PCI_DEVICE_ID_SERVERWORKS_GCLE2 0x0227
#define PCI_DEVICE_ID_SERVERWORKS_CSB5ISA 0x0230
#define PCI_VENDOR_ID_SBE 0x1176
...
...
@@ -1759,6 +1765,9 @@
#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03
#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00
#define PCI_VENDOR_ID_DUNORD 0x5544
#define PCI_DEVICE_ID_DUNORD_I3000 0x0001
#define PCI_VENDOR_ID_DCI 0x6666
#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002
...
...
net/decnet/dn_table.c
View file @
40ae7bb1
...
...
@@ -836,8 +836,7 @@ struct dn_fib_table *dn_fib_get_table(int n, int create)
return
NULL
;
if
(
in_interrupt
()
&&
net_ratelimit
())
{
printk
(
KERN_DEBUG
"DECnet: BUG! Attempt to create routing table
from interrupt
\n
"
);
printk
(
KERN_DEBUG
"DECnet: BUG! Attempt to create routing table from interrupt
\n
"
);
return
NULL
;
}
if
((
t
=
kmalloc
(
sizeof
(
struct
dn_fib_table
),
GFP_KERNEL
))
==
NULL
)
...
...
net/ipv6/addrconf.c
View file @
40ae7bb1
...
...
@@ -1111,7 +1111,7 @@ static int __ipv6_regen_rndid(struct inet6_dev *idev)
if
(
time_before
(
idev
->
regen_timer
.
expires
,
jiffies
))
{
idev
->
regen_timer
.
expires
=
0
;
printk
(
KERN_WARNING
"__ipv6_regen_rndid(): too short regeneration interval; timer diabled for %s.
\n
"
,
"__ipv6_regen_rndid(): too short regeneration interval; timer di
s
abled for %s.
\n
"
,
idev
->
dev
->
name
);
in6_dev_put
(
idev
);
return
-
1
;
...
...
sound/oss/cs4232.c
View file @
40ae7bb1
...
...
@@ -34,6 +34,8 @@
* anyway.
*
* Changes
* John Rood Added Bose Sound System Support.
* Toshio Spoor
* Alan Cox Modularisation, Basic cleanups.
* Paul Barton-Davis Separated MPU configuration, added
* Tropez+ (WaveFront) support
...
...
@@ -58,6 +60,10 @@
#define KEY_PORT 0x279
/* Same as LPT1 status port */
#define CSN_NUM 0x99
/* Just a random number */
#define INDEX_ADDRESS 0x00
/* (R0) Index Address Register */
#define INDEX_DATA 0x01
/* (R1) Indexed Data Register */
#define PIN_CONTROL 0x0a
/* (I10) Pin Control */
#define ENABLE_PINS 0xc0
/* XCTRL0/XCTRL1 enable */
static
void
CS_OUT
(
unsigned
char
a
)
{
...
...
@@ -67,6 +73,7 @@ static void CS_OUT(unsigned char a)
#define CS_OUT2(a, b) {CS_OUT(a);CS_OUT(b);}
#define CS_OUT3(a, b, c) {CS_OUT(a);CS_OUT(b);CS_OUT(c);}
static
int
__initdata
bss
=
0
;
static
int
mpu_base
=
0
,
mpu_irq
=
0
;
static
int
synth_base
=
0
,
synth_irq
=
0
;
static
int
mpu_detected
=
0
;
...
...
@@ -97,7 +104,31 @@ static void sleep(unsigned howlong)
schedule_timeout
(
howlong
);
}
int
probe_cs4232
(
struct
address_info
*
hw_config
,
int
isapnp_configured
)
static
void
enable_xctrl
(
int
baseio
)
{
unsigned
char
regd
;
/*
* Some IBM Aptiva's have the Bose Sound System. By default
* the Bose Amplifier is disabled. The amplifier will be
* activated, by setting the XCTRL0 and XCTRL1 bits.
* Volume of the monitor bose speakers/woofer, can then
* be set by changing the PCM volume.
*
*/
printk
(
"cs4232: enabling Bose Sound System Amplifier.
\n
"
);
/* Switch to Pin Control Address */
regd
=
inb
(
baseio
+
INDEX_ADDRESS
)
&
0xe0
;
outb
(((
unsigned
char
)
(
PIN_CONTROL
|
regd
)),
baseio
+
INDEX_ADDRESS
);
/* Activate the XCTRL0 and XCTRL1 Pins */
regd
=
inb
(
baseio
+
INDEX_DATA
);
outb
(((
unsigned
char
)
(
ENABLE_PINS
|
regd
)),
baseio
+
INDEX_DATA
);
}
int
__init
probe_cs4232
(
struct
address_info
*
hw_config
,
int
isapnp_configured
)
{
int
i
,
n
;
int
base
=
hw_config
->
io_base
,
irq
=
hw_config
->
irq
;
...
...
@@ -218,7 +249,7 @@ int probe_cs4232(struct address_info *hw_config, int isapnp_configured)
return
0
;
}
void
attach_cs4232
(
struct
address_info
*
hw_config
)
void
__init
attach_cs4232
(
struct
address_info
*
hw_config
)
{
int
base
=
hw_config
->
io_base
,
irq
=
hw_config
->
irq
,
...
...
@@ -275,9 +306,14 @@ void attach_cs4232(struct address_info *hw_config)
}
hw_config
->
slots
[
1
]
=
hw_config2
.
slots
[
1
];
}
if
(
bss
)
{
enable_xctrl
(
base
);
}
}
static
void
unload_cs4232
(
struct
address_info
*
hw_config
)
static
void
__exit
unload_cs4232
(
struct
address_info
*
hw_config
)
{
int
base
=
hw_config
->
io_base
,
irq
=
hw_config
->
irq
;
int
dma1
=
hw_config
->
dma
,
dma2
=
hw_config
->
dma2
;
...
...
@@ -349,6 +385,8 @@ MODULE_PARM(synthirq,"i");
MODULE_PARM_DESC
(
synthirq
,
"Maui WaveTable IRQ"
);
MODULE_PARM
(
isapnp
,
"i"
);
MODULE_PARM_DESC
(
isapnp
,
"Enable ISAPnP probing (default 1)"
);
MODULE_PARM
(
bss
,
"i"
);
MODULE_PARM_DESC
(
bss
,
"Enable Bose Sound System Support (default 0)"
);
/*
* Install a CS4232 based card. Need to have ad1848 and mpu401
...
...
sound/oss/emu10k1/cardwo.c
View file @
40ae7bb1
...
...
@@ -408,14 +408,17 @@ static void copy_block(void **dst, u32 str, u8 *src, u32 len)
if
(
len
>
PAGE_SIZE
-
pgoff
)
{
k
=
PAGE_SIZE
-
pgoff
;
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
k
);
if
(
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
k
))
return
;
len
-=
k
;
while
(
len
>
PAGE_SIZE
)
{
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
PAGE_SIZE
);
if
(
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
PAGE_SIZE
))
return
;
k
+=
PAGE_SIZE
;
len
-=
PAGE_SIZE
;
}
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
len
);
if
(
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
len
))
return
;
}
else
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
len
);
...
...
@@ -440,7 +443,8 @@ static void copy_ilv_block(struct woinst *woinst, u32 str, u8 *src, u32 len)
while
(
len
)
{
for
(
voice_num
=
0
;
voice_num
<
woinst
->
num_voices
;
voice_num
++
)
{
__copy_from_user
((
u8
*
)(
voice
[
voice_num
].
mem
.
addr
[
pg
])
+
pgoff
,
src
,
woinst
->
format
.
bytespervoicesample
);
if
(
__copy_from_user
((
u8
*
)(
voice
[
voice_num
].
mem
.
addr
[
pg
])
+
pgoff
,
src
,
woinst
->
format
.
bytespervoicesample
))
return
-
EFAULT
;
src
+=
woinst
->
format
.
bytespervoicesample
;
}
...
...
sound/oss/mad16.c
View file @
40ae7bb1
...
...
@@ -365,6 +365,8 @@ static int __init init_c930(struct address_info *hw_config)
{
unsigned
char
cfg
=
0
;
cfg
|=
(
0x0f
&
mad16_conf
);
if
(
c931_detected
)
{
/* Bit 0 has reversd meaning. Bits 1 and 2 sese
...
...
@@ -402,7 +404,10 @@ static int __init init_c930(struct address_info *hw_config)
and the C931. */
cfg
=
c931_detected
?
0x04
:
0x00
;
mad_write
(
MC4_PORT
,
0x52
|
cfg
);
if
(
mad16_cdsel
&
0x20
)
mad_write
(
MC4_PORT
,
0x62
|
cfg
);
/* opl4 */
else
mad_write
(
MC4_PORT
,
0x52
|
cfg
);
/* opl3 */
mad_write
(
MC5_PORT
,
0x3C
);
/* Init it into mode2 */
mad_write
(
MC6_PORT
,
0x02
);
/* Enable WSS, Disable MPU and SB */
...
...
@@ -529,10 +534,12 @@ static int __init probe_mad16(struct address_info *hw_config)
return
init_c930
(
hw_config
);
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
{
if
(
!
c924pnp
)
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
}
/*
* Set the WSS address
...
...
@@ -559,10 +566,10 @@ static int __init probe_mad16(struct address_info *hw_config)
*/
tmp
&=
~
0x0f
;
tmp
|=
(
mad16_conf
&
0x0f
);
/* CD-ROM and joystick bits */
mad_write
(
MC1_PORT
,
tmp
);
tmp
=
mad_read
(
MC2_PORT
);
tmp
=
mad16_cdsel
;
mad_write
(
MC2_PORT
,
tmp
);
mad_write
(
MC3_PORT
,
0xf0
);
/* Disable SB */
...
...
@@ -590,9 +597,12 @@ static int __init probe_mad16(struct address_info *hw_config)
mad_write
(
MC5_PORT
,
0x30
|
cs4231_mode
);
}
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
if
(
!
c924pnp
)
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
{
if
(
!
c924pnp
)
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
}
wss_init
(
hw_config
);
return
1
;
...
...
@@ -879,7 +889,7 @@ static int __initdata cdirq = 0;
static
int
__initdata
cdport
=
0x340
;
static
int
__initdata
cddma
=
-
1
;
static
int
__initdata
opl4
=
0
;
static
int
__initdata
joystick
=
1
;
static
int
__initdata
joystick
=
0
;
MODULE_PARM
(
mpu_io
,
"i"
);
MODULE_PARM
(
mpu_irq
,
"i"
);
...
...
@@ -953,14 +963,14 @@ static int __init init_mad16(void)
return
-
EINVAL
;
}
/*
* Build the config words
*/
/*
* Build the config words
*/
mad16_conf
=
(
joystick
^
1
)
|
cdtype
;
mad16_conf
=
(
joystick
^
1
)
|
cdtype
;
mad16_cdsel
=
0
;
if
(
opl4
)
mad16_cdsel
|=
0x20
;
if
(
opl4
)
mad16_cdsel
|=
0x20
;
if
(
cdtype
){
if
(
cddma
>
7
||
cddma
<
0
||
dma_map
[
dmatype
][
cddma
]
==
-
1
)
...
...
@@ -978,8 +988,8 @@ static int __init init_mad16(void)
printk
(
", no IRQ"
);
else
if
(
cdirq
<
0
||
cdirq
>
15
||
irq_map
[
cdirq
]
==
-
1
)
{
printk
(
", invalid IRQ (disabling)"
);
cdirq
=
0
;
printk
(
", invalid IRQ (disabling)"
);
cdirq
=
0
;
}
else
printk
(
", IRQ %d"
,
cdirq
);
...
...
@@ -1032,14 +1042,14 @@ static int __init init_mad16(void)
found_mpu
=
probe_mad16_mpu
(
&
cfg_mpu
);
if
(
joystick
==
1
)
{
/* register gameport */
if
(
!
request_region
(
0x201
,
1
,
"mad16 gameport"
))
printk
(
KERN_ERR
"mad16: gameport address 0x201 already in use
\n
"
);
else
{
/* register gameport */
if
(
!
request_region
(
0x201
,
1
,
"mad16 gameport"
))
printk
(
KERN_ERR
"mad16: gameport address 0x201 already in use
\n
"
);
else
{
printk
(
KERN_ERR
"mad16: gameport enabled at 0x201
\n
"
);
gameport
.
io
=
0x201
;
gameport_register_port
(
&
gameport
);
}
gameport
.
io
=
0x201
;
gameport_register_port
(
&
gameport
);
}
}
else
printk
(
KERN_ERR
"mad16: gameport disabled.
\n
"
);
return
0
;
...
...
@@ -1049,6 +1059,12 @@ static void __exit cleanup_mad16(void)
{
if
(
found_mpu
)
unload_mad16_mpu
(
&
cfg_mpu
);
if
(
gameport
.
io
)
{
/* the gameport was initialized so we must free it up */
gameport_unregister_port
(
&
gameport
);
gameport
.
io
=
0
;
release_region
(
0x201
,
1
);
}
unload_mad16
(
&
cfg
);
}
...
...
@@ -1058,9 +1074,9 @@ module_exit(cleanup_mad16);
#ifndef MODULE
static
int
__init
setup_mad16
(
char
*
str
)
{
/* io, irq */
/* io, irq */
int
ints
[
8
];
str
=
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
io
=
ints
[
1
];
...
...
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