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
50a8fdd6
Commit
50a8fdd6
authored
Oct 09, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-acpi.bkbits.net/26-latest-release
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
a068ea13
928a40a4
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
61 additions
and
149 deletions
+61
-149
arch/i386/pci/i386.c
arch/i386/pci/i386.c
+9
-3
drivers/acpi/motherboard.c
drivers/acpi/motherboard.c
+5
-1
drivers/ide/ide-dma.c
drivers/ide/ide-dma.c
+4
-4
drivers/ide/ide-taskfile.c
drivers/ide/ide-taskfile.c
+0
-13
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cmd64x.c
+0
-17
drivers/ide/pci/cmd64x.h
drivers/ide/pci/cmd64x.h
+0
-4
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/pdc202xx_old.c
+0
-11
drivers/ide/pci/pdc202xx_old.h
drivers/ide/pci/pdc202xx_old.h
+0
-71
drivers/pcmcia/rsrc_mgr.c
drivers/pcmcia/rsrc_mgr.c
+38
-24
drivers/pnp/system.c
drivers/pnp/system.c
+5
-1
No files found.
arch/i386/pci/i386.c
View file @
50a8fdd6
...
@@ -142,7 +142,7 @@ static void __init pcibios_allocate_resources(int pass)
...
@@ -142,7 +142,7 @@ static void __init pcibios_allocate_resources(int pass)
DBG
(
"PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)
\n
"
,
DBG
(
"PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)
\n
"
,
r
->
start
,
r
->
end
,
r
->
flags
,
disabled
,
pass
);
r
->
start
,
r
->
end
,
r
->
flags
,
disabled
,
pass
);
pr
=
pci_find_parent_resource
(
dev
,
r
);
pr
=
pci_find_parent_resource
(
dev
,
r
);
if
(
!
pr
||
inser
t_resource
(
pr
,
r
)
<
0
)
{
if
(
!
pr
||
reques
t_resource
(
pr
,
r
)
<
0
)
{
printk
(
KERN_ERR
"PCI: Cannot allocate resource region %d of device %s
\n
"
,
idx
,
pci_name
(
dev
));
printk
(
KERN_ERR
"PCI: Cannot allocate resource region %d of device %s
\n
"
,
idx
,
pci_name
(
dev
));
/* We'll assign a new address later */
/* We'll assign a new address later */
r
->
end
-=
r
->
start
;
r
->
end
-=
r
->
start
;
...
@@ -164,7 +164,7 @@ static void __init pcibios_allocate_resources(int pass)
...
@@ -164,7 +164,7 @@ static void __init pcibios_allocate_resources(int pass)
}
}
}
}
static
void
__init
pcibios_assign_resources
(
void
)
static
int
__init
pcibios_assign_resources
(
void
)
{
{
struct
pci_dev
*
dev
=
NULL
;
struct
pci_dev
*
dev
=
NULL
;
int
idx
;
int
idx
;
...
@@ -204,6 +204,7 @@ static void __init pcibios_assign_resources(void)
...
@@ -204,6 +204,7 @@ static void __init pcibios_assign_resources(void)
pci_assign_resource
(
dev
,
PCI_ROM_RESOURCE
);
pci_assign_resource
(
dev
,
PCI_ROM_RESOURCE
);
}
}
}
}
return
0
;
}
}
void
__init
pcibios_resource_survey
(
void
)
void
__init
pcibios_resource_survey
(
void
)
...
@@ -212,9 +213,14 @@ void __init pcibios_resource_survey(void)
...
@@ -212,9 +213,14 @@ void __init pcibios_resource_survey(void)
pcibios_allocate_bus_resources
(
&
pci_root_buses
);
pcibios_allocate_bus_resources
(
&
pci_root_buses
);
pcibios_allocate_resources
(
0
);
pcibios_allocate_resources
(
0
);
pcibios_allocate_resources
(
1
);
pcibios_allocate_resources
(
1
);
pcibios_assign_resources
();
}
}
/**
* called in fs_initcall (one below subsys_initcall),
* give a chance for motherboard reserve resources
*/
fs_initcall
(
pcibios_assign_resources
);
int
pcibios_enable_resources
(
struct
pci_dev
*
dev
,
int
mask
)
int
pcibios_enable_resources
(
struct
pci_dev
*
dev
,
int
mask
)
{
{
u16
cmd
,
old_cmd
;
u16
cmd
,
old_cmd
;
...
...
drivers/acpi/motherboard.c
View file @
50a8fdd6
...
@@ -170,4 +170,8 @@ static int __init acpi_motherboard_init(void)
...
@@ -170,4 +170,8 @@ static int __init acpi_motherboard_init(void)
return
0
;
return
0
;
}
}
subsys_initcall
(
acpi_motherboard_init
);
/**
* Reserve motherboard resources after PCI claim BARs,
* but before PCI assign resources for uninitialized PCI devices
*/
fs_initcall
(
acpi_motherboard_init
);
drivers/ide/ide-dma.c
View file @
50a8fdd6
...
@@ -407,10 +407,6 @@ static int config_drive_for_dma (ide_drive_t *drive)
...
@@ -407,10 +407,6 @@ static int config_drive_for_dma (ide_drive_t *drive)
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
if
((
id
->
capability
&
1
)
&&
hwif
->
autodma
)
{
if
((
id
->
capability
&
1
)
&&
hwif
->
autodma
)
{
/* Consult the list of known "bad" drives */
if
(
__ide_dma_bad_drive
(
drive
))
return
__ide_dma_off
(
drive
);
/*
/*
* Enable DMA on any drive that has
* Enable DMA on any drive that has
* UltraDMA (mode 0/1/2/3/4/5/6) enabled
* UltraDMA (mode 0/1/2/3/4/5/6) enabled
...
@@ -564,6 +560,10 @@ EXPORT_SYMBOL(__ide_dma_host_on);
...
@@ -564,6 +560,10 @@ EXPORT_SYMBOL(__ide_dma_host_on);
int
__ide_dma_on
(
ide_drive_t
*
drive
)
int
__ide_dma_on
(
ide_drive_t
*
drive
)
{
{
/* consult the list of known "bad" drives */
if
(
__ide_dma_bad_drive
(
drive
))
return
1
;
drive
->
using_dma
=
1
;
drive
->
using_dma
=
1
;
ide_toggle_bounce
(
drive
,
1
);
ide_toggle_bounce
(
drive
,
1
);
...
...
drivers/ide/ide-taskfile.c
View file @
50a8fdd6
...
@@ -611,19 +611,6 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
...
@@ -611,19 +611,6 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
case
TASKFILE_IN_DMA
:
case
TASKFILE_IN_DMA
:
err
=
ide_diag_taskfile
(
drive
,
&
args
,
taskin
,
inbuf
);
err
=
ide_diag_taskfile
(
drive
,
&
args
,
taskin
,
inbuf
);
break
;
break
;
case
TASKFILE_IN_OUT
:
#if 0
args.prehandler = &pre_task_out_intr;
args.handler = &task_out_intr;
err = ide_diag_taskfile(drive, &args, taskout, outbuf);
args.prehandler = NULL;
args.handler = &task_in_intr;
err = ide_diag_taskfile(drive, &args, taskin, inbuf);
break;
#else
err
=
-
EFAULT
;
goto
abort
;
#endif
case
TASKFILE_MULTI_OUT
:
case
TASKFILE_MULTI_OUT
:
if
(
!
drive
->
mult_count
)
{
if
(
!
drive
->
mult_count
)
{
/* (hs): give up if multcount is not set */
/* (hs): give up if multcount is not set */
...
...
drivers/ide/pci/cmd64x.c
View file @
50a8fdd6
...
@@ -38,8 +38,6 @@ static u8 cmd64x_proc = 0;
...
@@ -38,8 +38,6 @@ static u8 cmd64x_proc = 0;
static
struct
pci_dev
*
cmd_devs
[
CMD_MAX_DEVS
];
static
struct
pci_dev
*
cmd_devs
[
CMD_MAX_DEVS
];
static
int
n_cmd_devs
;
static
int
n_cmd_devs
;
#undef DEBUG_CMD_REGS
static
char
*
print_cmd64x_get_info
(
char
*
buf
,
struct
pci_dev
*
dev
,
int
index
)
static
char
*
print_cmd64x_get_info
(
char
*
buf
,
struct
pci_dev
*
dev
,
int
index
)
{
{
char
*
p
=
buf
;
char
*
p
=
buf
;
...
@@ -49,9 +47,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
...
@@ -49,9 +47,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
u8
reg72
=
0
,
reg73
=
0
;
/* primary */
u8
reg72
=
0
,
reg73
=
0
;
/* primary */
u8
reg7a
=
0
,
reg7b
=
0
;
/* secondary */
u8
reg7a
=
0
,
reg7b
=
0
;
/* secondary */
u8
reg50
=
0
,
reg71
=
0
;
/* extra */
u8
reg50
=
0
,
reg71
=
0
;
/* extra */
#ifdef DEBUG_CMD_REGS
u8
hi_byte
=
0
,
lo_byte
=
0
;
#endif
/* DEBUG_CMD_REGS */
p
+=
sprintf
(
p
,
"
\n
Controller: %d
\n
"
,
index
);
p
+=
sprintf
(
p
,
"
\n
Controller: %d
\n
"
,
index
);
p
+=
sprintf
(
p
,
"CMD%x Chipset.
\n
"
,
dev
->
device
);
p
+=
sprintf
(
p
,
"CMD%x Chipset.
\n
"
,
dev
->
device
);
...
@@ -127,18 +122,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
...
@@ -127,18 +122,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
(
reg71
&
MRDMODE_BLK_CH0
)
?
"blocked"
:
"enabled"
,
(
reg71
&
MRDMODE_BLK_CH0
)
?
"blocked"
:
"enabled"
,
(
reg71
&
MRDMODE_BLK_CH1
)
?
"blocked"
:
"enabled"
);
(
reg71
&
MRDMODE_BLK_CH1
)
?
"blocked"
:
"enabled"
);
#ifdef DEBUG_CMD_REGS
SPLIT_BYTE
(
reg50
,
hi_byte
,
lo_byte
);
p
+=
sprintf
(
p
,
"CFR = 0x%02x, HI = 0x%02x, "
"LOW = 0x%02x
\n
"
,
reg50
,
hi_byte
,
lo_byte
);
SPLIT_BYTE
(
reg57
,
hi_byte
,
lo_byte
);
p
+=
sprintf
(
p
,
"ARTTIM23 = 0x%02x, HI = 0x%02x, "
"LOW = 0x%02x
\n
"
,
reg57
,
hi_byte
,
lo_byte
);
SPLIT_BYTE
(
reg71
,
hi_byte
,
lo_byte
);
p
+=
sprintf
(
p
,
"MRDMODE = 0x%02x, HI = 0x%02x, "
"LOW = 0x%02x
\n
"
,
reg71
,
hi_byte
,
lo_byte
);
#endif
/* DEBUG_CMD_REGS */
return
(
char
*
)
p
;
return
(
char
*
)
p
;
}
}
...
...
drivers/ide/pci/cmd64x.h
View file @
50a8fdd6
...
@@ -15,10 +15,6 @@
...
@@ -15,10 +15,6 @@
#define cmdprintk(x...)
#define cmdprintk(x...)
#endif
#endif
#ifndef SPLIT_BYTE
#define SPLIT_BYTE(B,H,L) ((H)=(B>>4), (L)=(B-((B>>4)<<4)))
#endif
/*
/*
* CMD64x specific registers definition.
* CMD64x specific registers definition.
*/
*/
...
...
drivers/ide/pci/pdc202xx_old.c
View file @
50a8fdd6
...
@@ -314,17 +314,6 @@ static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed)
...
@@ -314,17 +314,6 @@ static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed)
pci_write_config_byte
(
dev
,
(
drive_pci
)
|
0x02
,
CP
|
TC
);
pci_write_config_byte
(
dev
,
(
drive_pci
)
|
0x02
,
CP
|
TC
);
}
}
#if PDC202XX_DECODE_REGISTER_INFO
pci_read_config_byte
(
dev
,
(
drive_pci
),
&
AP
);
pci_read_config_byte
(
dev
,
(
drive_pci
)
|
0x01
,
&
BP
);
pci_read_config_byte
(
dev
,
(
drive_pci
)
|
0x02
,
&
CP
);
pci_read_config_byte
(
dev
,
(
drive_pci
)
|
0x03
,
&
DP
);
decode_registers
(
REG_A
,
AP
);
decode_registers
(
REG_B
,
BP
);
decode_registers
(
REG_C
,
CP
);
decode_registers
(
REG_D
,
DP
);
#endif
/* PDC202XX_DECODE_REGISTER_INFO */
#if PDC202XX_DEBUG_DRIVE_INFO
#if PDC202XX_DEBUG_DRIVE_INFO
printk
(
KERN_DEBUG
"%s: %s drive%d 0x%08x "
,
printk
(
KERN_DEBUG
"%s: %s drive%d 0x%08x "
,
drive
->
name
,
ide_xfer_verbose
(
speed
),
drive
->
name
,
ide_xfer_verbose
(
speed
),
...
...
drivers/ide/pci/pdc202xx_old.h
View file @
50a8fdd6
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#endif
#endif
#define PDC202XX_DEBUG_DRIVE_INFO 0
#define PDC202XX_DEBUG_DRIVE_INFO 0
#define PDC202XX_DECODE_REGISTER_INFO 0
static
const
char
*
pdc_quirk_drives
[]
=
{
static
const
char
*
pdc_quirk_drives
[]
=
{
"QUANTUM FIREBALLlct08 08"
,
"QUANTUM FIREBALLlct08 08"
,
...
@@ -99,76 +98,6 @@ static inline u8 *pdc202xx_ultra_verbose (u32 drive_pci, u16 slow_cable)
...
@@ -99,76 +98,6 @@ static inline u8 *pdc202xx_ultra_verbose (u32 drive_pci, u16 slow_cable)
#define MC1 0x02
/* DMA"C" timing */
#define MC1 0x02
/* DMA"C" timing */
#define MC0 0x01
/* DMA"C" timing */
#define MC0 0x01
/* DMA"C" timing */
#if PDC202XX_DECODE_REGISTER_INFO
#define REG_A 0x01
#define REG_B 0x02
#define REG_C 0x04
#define REG_D 0x08
static
void
decode_registers
(
u8
registers
,
u8
value
)
{
u8
bit
=
0
,
bit1
=
0
,
bit2
=
0
;
switch
(
registers
)
{
case
REG_A
:
bit2
=
0
;
printk
(
"A Register "
);
if
(
value
&
0x80
)
printk
(
"SYNC_IN "
);
if
(
value
&
0x40
)
printk
(
"ERRDY_EN "
);
if
(
value
&
0x20
)
printk
(
"IORDY_EN "
);
if
(
value
&
0x10
)
printk
(
"PREFETCH_EN "
);
if
(
value
&
0x08
)
{
printk
(
"PA3 "
);
bit2
|=
0x08
;
}
if
(
value
&
0x04
)
{
printk
(
"PA2 "
);
bit2
|=
0x04
;
}
if
(
value
&
0x02
)
{
printk
(
"PA1 "
);
bit2
|=
0x02
;
}
if
(
value
&
0x01
)
{
printk
(
"PA0 "
);
bit2
|=
0x01
;
}
printk
(
"PIO(A) = %d "
,
bit2
);
break
;
case
REG_B
:
bit1
=
0
;
bit2
=
0
;
printk
(
"B Register "
);
if
(
value
&
0x80
)
{
printk
(
"MB2 "
);
bit1
|=
0x80
;
}
if
(
value
&
0x40
)
{
printk
(
"MB1 "
);
bit1
|=
0x40
;
}
if
(
value
&
0x20
)
{
printk
(
"MB0 "
);
bit1
|=
0x20
;
}
printk
(
"DMA(B) = %d "
,
bit1
>>
5
);
if
(
value
&
0x10
)
printk
(
"PIO_FORCED/PB4 "
);
if
(
value
&
0x08
)
{
printk
(
"PB3 "
);
bit2
|=
0x08
;
}
if
(
value
&
0x04
)
{
printk
(
"PB2 "
);
bit2
|=
0x04
;
}
if
(
value
&
0x02
)
{
printk
(
"PB1 "
);
bit2
|=
0x02
;
}
if
(
value
&
0x01
)
{
printk
(
"PB0 "
);
bit2
|=
0x01
;
}
printk
(
"PIO(B) = %d "
,
bit2
);
break
;
case
REG_C
:
bit2
=
0
;
printk
(
"C Register "
);
if
(
value
&
0x80
)
printk
(
"DMARQp "
);
if
(
value
&
0x40
)
printk
(
"IORDYp "
);
if
(
value
&
0x20
)
printk
(
"DMAR_EN "
);
if
(
value
&
0x10
)
printk
(
"DMAW_EN "
);
if
(
value
&
0x08
)
{
printk
(
"MC3 "
);
bit2
|=
0x08
;
}
if
(
value
&
0x04
)
{
printk
(
"MC2 "
);
bit2
|=
0x04
;
}
if
(
value
&
0x02
)
{
printk
(
"MC1 "
);
bit2
|=
0x02
;
}
if
(
value
&
0x01
)
{
printk
(
"MC0 "
);
bit2
|=
0x01
;
}
printk
(
"DMA(C) = %d "
,
bit2
);
break
;
case
REG_D
:
printk
(
"D Register "
);
break
;
default:
return
;
}
printk
(
"
\n
%s "
,
(
registers
&
REG_D
)
?
"DP"
:
(
registers
&
REG_C
)
?
"CP"
:
(
registers
&
REG_B
)
?
"BP"
:
(
registers
&
REG_A
)
?
"AP"
:
"ERROR"
);
for
(
bit
=
128
;
bit
>
0
;
bit
/=
2
)
printk
(
"%s"
,
(
value
&
bit
)
?
"1"
:
"0"
);
printk
(
"
\n
"
);
}
#endif
/* PDC202XX_DECODE_REGISTER_INFO */
#define DISPLAY_PDC202XX_TIMINGS
#define DISPLAY_PDC202XX_TIMINGS
static
void
init_setup_pdc202ata4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
);
static
void
init_setup_pdc202ata4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
);
...
...
drivers/pcmcia/rsrc_mgr.c
View file @
50a8fdd6
...
@@ -88,6 +88,9 @@ static resource_map_t io_db = {
...
@@ -88,6 +88,9 @@ static resource_map_t io_db = {
};
};
static
DECLARE_MUTEX
(
rsrc_sem
);
static
DECLARE_MUTEX
(
rsrc_sem
);
static
unsigned
int
rsrc_mem_probe
;
#define MEM_PROBE_LOW (1 << 0)
#define MEM_PROBE_HIGH (1 << 1)
#ifdef CONFIG_PCMCIA_PROBE
#ifdef CONFIG_PCMCIA_PROBE
...
@@ -451,24 +454,22 @@ static u_long inv_probe(resource_map_t *m, struct pcmcia_socket *s)
...
@@ -451,24 +454,22 @@ static u_long inv_probe(resource_map_t *m, struct pcmcia_socket *s)
return
do_mem_probe
(
m
->
base
,
m
->
num
,
s
);
return
do_mem_probe
(
m
->
base
,
m
->
num
,
s
);
}
}
static
void
validate_mem
(
struct
pcmcia_socket
*
s
)
static
void
validate_mem
(
struct
pcmcia_socket
*
s
,
unsigned
int
probe_mask
)
{
{
resource_map_t
*
m
,
mm
;
resource_map_t
*
m
,
mm
;
static
u_char
order
[]
=
{
0xd0
,
0xe0
,
0xc0
,
0xf0
};
static
u_char
order
[]
=
{
0xd0
,
0xe0
,
0xc0
,
0xf0
};
static
int
hi
=
0
,
lo
=
0
;
static
int
hi
=
0
,
lo
=
0
;
u_long
b
,
i
,
ok
=
0
;
u_long
b
,
i
,
ok
=
0
;
int
force_low
=
!
(
s
->
features
&
SS_CAP_PAGE_REGS
);
down
(
&
rsrc_sem
);
/* We do up to four passes through the list */
/* We do up to four passes through the list */
if
(
!
force_low
)
{
if
(
probe_mask
&
MEM_PROBE_HIGH
)
{
if
(
hi
++
||
(
inv_probe
(
mem_db
.
next
,
s
)
>
0
)
)
if
(
inv_probe
(
mem_db
.
next
,
s
)
>
0
)
goto
out
;
return
;
printk
(
KERN_NOTICE
"cs: warning: no high memory space "
printk
(
KERN_NOTICE
"cs: warning: no high memory space "
"available!
\n
"
);
"available!
\n
"
);
}
}
if
(
lo
++
)
if
(
(
probe_mask
&
MEM_PROBE_LOW
)
==
0
)
goto
out
;
return
;
for
(
m
=
mem_db
.
next
;
m
!=
&
mem_db
;
m
=
mm
.
next
)
{
for
(
m
=
mem_db
.
next
;
m
!=
&
mem_db
;
m
=
mm
.
next
)
{
mm
=
*
m
;
mm
=
*
m
;
/* Only probe < 1 MB */
/* Only probe < 1 MB */
...
@@ -488,38 +489,51 @@ static void validate_mem(struct pcmcia_socket *s)
...
@@ -488,38 +489,51 @@ static void validate_mem(struct pcmcia_socket *s)
}
}
}
}
}
}
out:
up
(
&
rsrc_sem
);
}
}
#else
/* CONFIG_PCMCIA_PROBE */
#else
/* CONFIG_PCMCIA_PROBE */
static
void
validate_mem
(
struct
pcmcia_socket
*
s
)
static
void
validate_mem
(
struct
pcmcia_socket
*
s
,
unsigned
int
probe_mask
)
{
{
resource_map_t
*
m
,
mm
;
resource_map_t
*
m
,
mm
;
static
int
done
=
0
;
if
(
done
++
==
0
)
{
down
(
&
rsrc_sem
);
for
(
m
=
mem_db
.
next
;
m
!=
&
mem_db
;
m
=
mm
.
next
)
{
for
(
m
=
mem_db
.
next
;
m
!=
&
mem_db
;
m
=
mm
.
next
)
{
mm
=
*
m
;
mm
=
*
m
;
if
(
do_mem_probe
(
mm
.
base
,
mm
.
num
,
s
))
if
(
do_mem_probe
(
mm
.
base
,
mm
.
num
,
s
))
break
;
break
;
}
}
up
(
&
rsrc_sem
);
}
}
}
#endif
/* CONFIG_PCMCIA_PROBE */
#endif
/* CONFIG_PCMCIA_PROBE */
/*
* Locking note: this is the only place where we take
* both rsrc_sem and skt_sem.
*/
void
pcmcia_validate_mem
(
struct
pcmcia_socket
*
s
)
void
pcmcia_validate_mem
(
struct
pcmcia_socket
*
s
)
{
{
if
(
probe_mem
)
{
unsigned
int
probe_mask
;
down
(
&
rsrc_sem
);
probe_mask
=
MEM_PROBE_LOW
;
if
(
s
->
features
&
SS_CAP_PAGE_REGS
)
probe_mask
=
MEM_PROBE_HIGH
;
if
(
probe_mask
&
~
rsrc_mem_probe
)
{
rsrc_mem_probe
|=
probe_mask
;
down
(
&
s
->
skt_sem
);
down
(
&
s
->
skt_sem
);
if
(
probe_mem
&&
s
->
state
&
SOCKET_PRESENT
)
if
(
s
->
state
&
SOCKET_PRESENT
)
validate_mem
(
s
);
validate_mem
(
s
,
probe_mask
);
up
(
&
s
->
skt_sem
);
up
(
&
s
->
skt_sem
);
}
up
(
&
rsrc_sem
);
}
}
}
EXPORT_SYMBOL
(
pcmcia_validate_mem
);
EXPORT_SYMBOL
(
pcmcia_validate_mem
);
...
...
drivers/pnp/system.c
View file @
50a8fdd6
...
@@ -104,4 +104,8 @@ static int __init pnp_system_init(void)
...
@@ -104,4 +104,8 @@ static int __init pnp_system_init(void)
return
pnp_register_driver
(
&
system_pnp_driver
);
return
pnp_register_driver
(
&
system_pnp_driver
);
}
}
subsys_initcall
(
pnp_system_init
);
/**
* Reserve motherboard resources after PCI claim BARs,
* but before PCI assign resources for uninitialized PCI devices
*/
fs_initcall
(
pnp_system_init
);
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