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
96b61dfd
Commit
96b61dfd
authored
Dec 29, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bart.bkbits.net/ide-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
bffac3b3
b3d1aca1
Changes
41
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
262 additions
and
215 deletions
+262
-215
Documentation/ide.txt
Documentation/ide.txt
+2
-0
arch/i386/pci/irq.c
arch/i386/pci/irq.c
+2
-0
drivers/ide/ide-proc.c
drivers/ide/ide-proc.c
+0
-15
drivers/ide/ide.c
drivers/ide/ide.c
+1
-4
drivers/ide/pci/aec62xx.c
drivers/ide/pci/aec62xx.c
+5
-6
drivers/ide/pci/aec62xx.h
drivers/ide/pci/aec62xx.h
+2
-2
drivers/ide/pci/alim15x3.c
drivers/ide/pci/alim15x3.c
+1
-2
drivers/ide/pci/amd74xx.c
drivers/ide/pci/amd74xx.c
+6
-3
drivers/ide/pci/atiixp.c
drivers/ide/pci/atiixp.c
+1
-2
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cmd64x.c
+1
-2
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5530.c
+1
-2
drivers/ide/pci/cy82c693.c
drivers/ide/pci/cy82c693.c
+3
-2
drivers/ide/pci/generic.c
drivers/ide/pci/generic.c
+8
-7
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt34x.c
+1
-2
drivers/ide/pci/hpt366.c
drivers/ide/pci/hpt366.c
+16
-17
drivers/ide/pci/hpt366.h
drivers/ide/pci/hpt366.h
+3
-3
drivers/ide/pci/it8172.c
drivers/ide/pci/it8172.c
+2
-3
drivers/ide/pci/ns87415.c
drivers/ide/pci/ns87415.c
+1
-2
drivers/ide/pci/opti621.c
drivers/ide/pci/opti621.c
+3
-4
drivers/ide/pci/opti621.h
drivers/ide/pci/opti621.h
+1
-1
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_new.c
+13
-14
drivers/ide/pci/pdc202xx_new.h
drivers/ide/pci/pdc202xx_new.h
+3
-3
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/pdc202xx_old.c
+11
-9
drivers/ide/pci/pdc202xx_old.h
drivers/ide/pci/pdc202xx_old.h
+3
-3
drivers/ide/pci/piix.c
drivers/ide/pci/piix.c
+6
-4
drivers/ide/pci/piix.h
drivers/ide/pci/piix.h
+3
-2
drivers/ide/pci/rz1000.c
drivers/ide/pci/rz1000.c
+1
-2
drivers/ide/pci/sc1200.c
drivers/ide/pci/sc1200.c
+1
-2
drivers/ide/pci/serverworks.c
drivers/ide/pci/serverworks.c
+7
-24
drivers/ide/pci/serverworks.h
drivers/ide/pci/serverworks.h
+2
-2
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/sgiioc4.c
+15
-4
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+1
-2
drivers/ide/pci/sis5513.c
drivers/ide/pci/sis5513.c
+1
-2
drivers/ide/pci/sl82c105.c
drivers/ide/pci/sl82c105.c
+1
-2
drivers/ide/pci/slc90e66.c
drivers/ide/pci/slc90e66.c
+1
-2
drivers/ide/pci/triflex.c
drivers/ide/pci/triflex.c
+1
-3
drivers/ide/pci/trm290.c
drivers/ide/pci/trm290.c
+1
-2
drivers/ide/pci/via82cxxx.c
drivers/ide/pci/via82cxxx.c
+1
-2
drivers/ide/setup-pci.c
drivers/ide/setup-pci.c
+103
-49
include/linux/ide.h
include/linux/ide.h
+3
-3
include/linux/pci_ids.h
include/linux/pci_ids.h
+24
-0
No files found.
Documentation/ide.txt
View file @
96b61dfd
...
@@ -297,6 +297,8 @@ Summary of ide driver parameters for kernel command line
...
@@ -297,6 +297,8 @@ Summary of ide driver parameters for kernel command line
"ide=reverse" : formerly called to pci sub-system, but now local.
"ide=reverse" : formerly called to pci sub-system, but now local.
"ide=nodma" : disable DMA globally for the IDE subsystem.
The following are valid ONLY on ide0, which usually corresponds
The following are valid ONLY on ide0, which usually corresponds
to the first ATA interface found on the particular host, and the defaults for
to the first ATA interface found on the particular host, and the defaults for
the base,ctl ports must not be altered.
the base,ctl ports must not be altered.
...
...
arch/i386/pci/irq.c
View file @
96b61dfd
...
@@ -491,6 +491,8 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
...
@@ -491,6 +491,8 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
case
PCI_DEVICE_ID_INTEL_ESB_1
:
case
PCI_DEVICE_ID_INTEL_ESB_1
:
case
PCI_DEVICE_ID_INTEL_ICH6_0
:
case
PCI_DEVICE_ID_INTEL_ICH6_0
:
case
PCI_DEVICE_ID_INTEL_ICH6_1
:
case
PCI_DEVICE_ID_INTEL_ICH6_1
:
case
PCI_DEVICE_ID_INTEL_ICH7_0
:
case
PCI_DEVICE_ID_INTEL_ICH7_1
:
r
->
name
=
"PIIX/ICH"
;
r
->
name
=
"PIIX/ICH"
;
r
->
get
=
pirq_piix_get
;
r
->
get
=
pirq_piix_get
;
r
->
set
=
pirq_piix_set
;
r
->
set
=
pirq_piix_set
;
...
...
drivers/ide/ide-proc.c
View file @
96b61dfd
...
@@ -492,20 +492,6 @@ void destroy_proc_ide_interface(ide_hwif_t *hwif)
...
@@ -492,20 +492,6 @@ void destroy_proc_ide_interface(ide_hwif_t *hwif)
}
}
}
}
static
void
destroy_proc_ide_interfaces
(
void
)
{
int
h
;
for
(
h
=
0
;
h
<
MAX_HWIFS
;
h
++
)
{
ide_hwif_t
*
hwif
=
&
ide_hwifs
[
h
];
#if 0
if (!hwif->present)
continue;
#endif
destroy_proc_ide_interface
(
hwif
);
}
}
extern
struct
seq_operations
ide_drivers_op
;
extern
struct
seq_operations
ide_drivers_op
;
static
int
ide_drivers_open
(
struct
inode
*
inode
,
struct
file
*
file
)
static
int
ide_drivers_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
{
...
@@ -535,6 +521,5 @@ void proc_ide_create(void)
...
@@ -535,6 +521,5 @@ void proc_ide_create(void)
void
proc_ide_destroy
(
void
)
void
proc_ide_destroy
(
void
)
{
{
remove_proc_entry
(
"ide/drivers"
,
proc_ide_root
);
remove_proc_entry
(
"ide/drivers"
,
proc_ide_root
);
destroy_proc_ide_interfaces
();
remove_proc_entry
(
"ide"
,
NULL
);
remove_proc_entry
(
"ide"
,
NULL
);
}
}
drivers/ide/ide.c
View file @
96b61dfd
...
@@ -2501,11 +2501,8 @@ void cleanup_module (void)
...
@@ -2501,11 +2501,8 @@ void cleanup_module (void)
{
{
int
index
;
int
index
;
for
(
index
=
0
;
index
<
MAX_HWIFS
;
++
index
)
{
for
(
index
=
0
;
index
<
MAX_HWIFS
;
++
index
)
ide_unregister
(
index
);
ide_unregister
(
index
);
if
(
ide_hwifs
[
index
].
dma_base
)
(
void
)
ide_release_dma
(
&
ide_hwifs
[
index
]);
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
proc_ide_destroy
();
proc_ide_destroy
();
...
...
drivers/ide/pci/aec62xx.c
View file @
96b61dfd
...
@@ -321,12 +321,12 @@ static void __devinit init_dma_aec62xx(ide_hwif_t *hwif, unsigned long dmabase)
...
@@ -321,12 +321,12 @@ static void __devinit init_dma_aec62xx(ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma
(
hwif
,
dmabase
,
8
);
ide_setup_dma
(
hwif
,
dmabase
,
8
);
}
}
static
void
__devinit
init_setup_aec62xx
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_aec62xx
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_aec6x80
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_aec6x80
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
unsigned
long
bar4reg
=
pci_resource_start
(
dev
,
4
);
unsigned
long
bar4reg
=
pci_resource_start
(
dev
,
4
);
...
@@ -340,7 +340,7 @@ static void __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *
...
@@ -340,7 +340,7 @@ static void __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *
strcpy
(
d
->
name
,
"AEC6280R"
);
strcpy
(
d
->
name
,
"AEC6280R"
);
}
}
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
/**
/**
...
@@ -356,8 +356,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
...
@@ -356,8 +356,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
{
{
ide_pci_device_t
*
d
=
&
aec62xx_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
aec62xx_chipsets
[
id
->
driver_data
];
d
->
init_setup
(
dev
,
d
);
return
d
->
init_setup
(
dev
,
d
);
return
0
;
}
}
static
struct
pci_device_id
aec62xx_pci_tbl
[]
=
{
static
struct
pci_device_id
aec62xx_pci_tbl
[]
=
{
...
...
drivers/ide/pci/aec62xx.h
View file @
96b61dfd
...
@@ -61,8 +61,8 @@ static struct chipset_bus_clock_list_entry aec6xxx_34_base [] = {
...
@@ -61,8 +61,8 @@ static struct chipset_bus_clock_list_entry aec6xxx_34_base [] = {
#define BUSCLOCK(D) \
#define BUSCLOCK(D) \
((struct chipset_bus_clock_list_entry *) pci_get_drvdata((D)))
((struct chipset_bus_clock_list_entry *) pci_get_drvdata((D)))
static
void
init_setup_aec6x80
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_aec6x80
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_aec62xx
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_aec62xx
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_aec62xx
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
init_chipset_aec62xx
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_aec62xx
(
ide_hwif_t
*
);
static
void
init_hwif_aec62xx
(
ide_hwif_t
*
);
static
void
init_dma_aec62xx
(
ide_hwif_t
*
,
unsigned
long
);
static
void
init_dma_aec62xx
(
ide_hwif_t
*
,
unsigned
long
);
...
...
drivers/ide/pci/alim15x3.c
View file @
96b61dfd
...
@@ -884,8 +884,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
...
@@ -884,8 +884,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
#if defined(CONFIG_SPARC64)
#if defined(CONFIG_SPARC64)
d
->
init_hwif
=
init_hwif_common_ali15x3
;
d
->
init_hwif
=
init_hwif_common_ali15x3
;
#endif
/* CONFIG_SPARC64 */
#endif
/* CONFIG_SPARC64 */
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
}
...
...
drivers/ide/pci/amd74xx.c
View file @
96b61dfd
...
@@ -493,9 +493,12 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
...
@@ -493,9 +493,12 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
{
{
amd_chipset
=
amd74xx_chipsets
+
id
->
driver_data
;
amd_chipset
=
amd74xx_chipsets
+
id
->
driver_data
;
amd_config
=
amd_ide_chips
+
id
->
driver_data
;
amd_config
=
amd_ide_chips
+
id
->
driver_data
;
if
(
dev
->
device
!=
amd_config
->
id
)
BUG
();
if
(
dev
->
device
!=
amd_config
->
id
)
{
ide_setup_pci_device
(
dev
,
amd_chipset
);
printk
(
KERN_ERR
"%s: assertion 0x%02x == 0x%02x failed !
\n
"
,
return
0
;
pci_name
(
dev
),
dev
->
device
,
amd_config
->
id
);
return
-
ENODEV
;
}
return
ide_setup_pci_device
(
dev
,
amd_chipset
);
}
}
static
struct
pci_device_id
amd74xx_pci_tbl
[]
=
{
static
struct
pci_device_id
amd74xx_pci_tbl
[]
=
{
...
...
drivers/ide/pci/atiixp.c
View file @
96b61dfd
...
@@ -341,8 +341,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
...
@@ -341,8 +341,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
static
int
__devinit
atiixp_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
atiixp_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
atiixp_pci_info
[
id
->
driver_data
]);
return
ide_setup_pci_device
(
dev
,
&
atiixp_pci_info
[
id
->
driver_data
]);
return
0
;
}
}
static
struct
pci_device_id
atiixp_pci_tbl
[]
=
{
static
struct
pci_device_id
atiixp_pci_tbl
[]
=
{
...
...
drivers/ide/pci/cmd64x.c
View file @
96b61dfd
...
@@ -709,8 +709,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
...
@@ -709,8 +709,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
static
int
__devinit
cmd64x_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
cmd64x_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
cmd64x_chipsets
[
id
->
driver_data
]);
return
ide_setup_pci_device
(
dev
,
&
cmd64x_chipsets
[
id
->
driver_data
]);
return
0
;
}
}
static
struct
pci_device_id
cmd64x_pci_tbl
[]
=
{
static
struct
pci_device_id
cmd64x_pci_tbl
[]
=
{
...
...
drivers/ide/pci/cs5530.c
View file @
96b61dfd
...
@@ -357,8 +357,7 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
...
@@ -357,8 +357,7 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
static
int
__devinit
cs5530_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
cs5530_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
cs5530_chipset
);
return
ide_setup_pci_device
(
dev
,
&
cs5530_chipset
);
return
0
;
}
}
static
struct
pci_device_id
cs5530_pci_tbl
[]
=
{
static
struct
pci_device_id
cs5530_pci_tbl
[]
=
{
...
...
drivers/ide/pci/cy82c693.c
View file @
96b61dfd
...
@@ -426,15 +426,16 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev
...
@@ -426,15 +426,16 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev
{
{
ide_pci_device_t
*
d
=
&
cy82c693_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
cy82c693_chipsets
[
id
->
driver_data
];
struct
pci_dev
*
dev2
;
struct
pci_dev
*
dev2
;
int
ret
=
-
ENODEV
;
/* CY82C693 is more than only a IDE controller.
/* CY82C693 is more than only a IDE controller.
Function 1 is primary IDE channel, function 2 - secondary. */
Function 1 is primary IDE channel, function 2 - secondary. */
if
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
&&
if
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
&&
PCI_FUNC
(
dev
->
devfn
)
==
1
)
{
PCI_FUNC
(
dev
->
devfn
)
==
1
)
{
dev2
=
pci_find_slot
(
dev
->
bus
->
number
,
dev
->
devfn
+
1
);
dev2
=
pci_find_slot
(
dev
->
bus
->
number
,
dev
->
devfn
+
1
);
ide_setup_pci_devices
(
dev
,
dev2
,
d
);
ret
=
ide_setup_pci_devices
(
dev
,
dev2
,
d
);
}
}
return
0
;
return
ret
;
}
}
static
struct
pci_device_id
cy82c693_pci_tbl
[]
=
{
static
struct
pci_device_id
cy82c693_pci_tbl
[]
=
{
...
...
drivers/ide/pci/generic.c
View file @
96b61dfd
...
@@ -96,25 +96,26 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
...
@@ -96,25 +96,26 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
{
{
ide_pci_device_t
*
d
=
&
generic_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
generic_chipsets
[
id
->
driver_data
];
u16
command
;
u16
command
;
int
ret
=
-
ENODEV
;
if
(
dev
->
vendor
==
PCI_VENDOR_ID_UMC
&&
if
(
dev
->
vendor
==
PCI_VENDOR_ID_UMC
&&
dev
->
device
==
PCI_DEVICE_ID_UMC_UM8886A
&&
dev
->
device
==
PCI_DEVICE_ID_UMC_UM8886A
&&
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)))
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)))
return
1
;
/* UM8886A/BF pair */
goto
out
;
/* UM8886A/BF pair */
if
(
dev
->
vendor
==
PCI_VENDOR_ID_OPTI
&&
if
(
dev
->
vendor
==
PCI_VENDOR_ID_OPTI
&&
dev
->
device
==
PCI_DEVICE_ID_OPTI_82C558
&&
dev
->
device
==
PCI_DEVICE_ID_OPTI_82C558
&&
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)))
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)))
return
1
;
goto
out
;
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
command
);
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
command
);
if
(
!
(
command
&
PCI_COMMAND_IO
))
if
(
!
(
command
&
PCI_COMMAND_IO
))
{
{
printk
(
KERN_INFO
"Skipping disabled %s IDE controller.
\n
"
,
d
->
name
);
printk
(
KERN_INFO
"Skipping disabled %s IDE controller.
\n
"
,
d
->
name
);
return
1
;
goto
out
;
}
}
ide_setup_pci_device
(
dev
,
d
);
ret
=
ide_setup_pci_device
(
dev
,
d
);
return
0
;
out:
return
ret
;
}
}
static
struct
pci_device_id
generic_pci_tbl
[]
=
{
static
struct
pci_device_id
generic_pci_tbl
[]
=
{
...
...
drivers/ide/pci/hpt34x.c
View file @
96b61dfd
...
@@ -251,8 +251,7 @@ static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_devic
...
@@ -251,8 +251,7 @@ static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_devic
d
->
name
=
chipset_names
[(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
1
:
0
];
d
->
name
=
chipset_names
[(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
1
:
0
];
d
->
bootable
=
(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
OFF_BOARD
:
NEVER_BOARD
;
d
->
bootable
=
(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
OFF_BOARD
:
NEVER_BOARD
;
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
}
static
struct
pci_device_id
hpt34x_pci_tbl
[]
=
{
static
struct
pci_device_id
hpt34x_pci_tbl
[]
=
{
...
...
drivers/ide/pci/hpt366.c
View file @
96b61dfd
...
@@ -1191,12 +1191,12 @@ static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase)
...
@@ -1191,12 +1191,12 @@ static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma
(
hwif
,
dmabase
,
8
);
ide_setup_dma
(
hwif
,
dmabase
,
8
);
}
}
static
void
__devinit
init_setup_hpt374
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_hpt374
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
struct
pci_dev
*
findev
=
NULL
;
struct
pci_dev
*
findev
=
NULL
;
if
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
if
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
return
;
return
-
ENODEV
;
while
((
findev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
findev
))
!=
NULL
)
{
while
((
findev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
findev
))
!=
NULL
)
{
if
((
findev
->
vendor
==
dev
->
vendor
)
&&
if
((
findev
->
vendor
==
dev
->
vendor
)
&&
...
@@ -1209,19 +1209,18 @@ static void __devinit init_setup_hpt374(struct pci_dev *dev, ide_pci_device_t *d
...
@@ -1209,19 +1209,18 @@ static void __devinit init_setup_hpt374(struct pci_dev *dev, ide_pci_device_t *d
printk
(
KERN_WARNING
"%s: pci-config space interrupt "
printk
(
KERN_WARNING
"%s: pci-config space interrupt "
"fixed.
\n
"
,
d
->
name
);
"fixed.
\n
"
,
d
->
name
);
}
}
ide_setup_pci_devices
(
dev
,
findev
,
d
);
return
ide_setup_pci_devices
(
dev
,
findev
,
d
);
return
;
}
}
}
}
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_hpt37x
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_hpt37x
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_hpt366
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_hpt366
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
struct
pci_dev
*
findev
=
NULL
;
struct
pci_dev
*
findev
=
NULL
;
u8
pin1
=
0
,
pin2
=
0
;
u8
pin1
=
0
,
pin2
=
0
;
...
@@ -1231,7 +1230,7 @@ static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d
...
@@ -1231,7 +1230,7 @@ static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d
"HPT372N"
};
"HPT372N"
};
if
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
if
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
return
;
return
-
ENODEV
;
pci_read_config_dword
(
dev
,
PCI_CLASS_REVISION
,
&
class_rev
);
pci_read_config_dword
(
dev
,
PCI_CLASS_REVISION
,
&
class_rev
);
class_rev
&=
0xff
;
class_rev
&=
0xff
;
...
@@ -1246,9 +1245,10 @@ static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d
...
@@ -1246,9 +1245,10 @@ static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d
case
6
:
case
6
:
case
5
:
case
5
:
case
4
:
case
4
:
case
3
:
ide_setup_pci_device
(
dev
,
d
);
case
3
:
return
;
goto
init_single
;
default:
break
;
default:
break
;
}
}
d
->
channels
=
1
;
d
->
channels
=
1
;
...
@@ -1266,11 +1266,11 @@ static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d
...
@@ -1266,11 +1266,11 @@ static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d
"pin1=%d pin2=%d
\n
"
,
d
->
name
,
"pin1=%d pin2=%d
\n
"
,
d
->
name
,
pin1
,
pin2
);
pin1
,
pin2
);
}
}
ide_setup_pci_devices
(
dev
,
findev
,
d
);
return
ide_setup_pci_devices
(
dev
,
findev
,
d
);
return
;
}
}
}
}
ide_setup_pci_device
(
dev
,
d
);
init_single:
return
ide_setup_pci_device
(
dev
,
d
);
}
}
...
@@ -1287,8 +1287,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
...
@@ -1287,8 +1287,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
{
{
ide_pci_device_t
*
d
=
&
hpt366_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
hpt366_chipsets
[
id
->
driver_data
];
d
->
init_setup
(
dev
,
d
);
return
d
->
init_setup
(
dev
,
d
);
return
0
;
}
}
static
struct
pci_device_id
hpt366_pci_tbl
[]
=
{
static
struct
pci_device_id
hpt366_pci_tbl
[]
=
{
...
...
drivers/ide/pci/hpt366.h
View file @
96b61dfd
...
@@ -414,9 +414,9 @@ static struct chipset_bus_clock_list_entry sixty_six_base_hpt374[] = {
...
@@ -414,9 +414,9 @@ static struct chipset_bus_clock_list_entry sixty_six_base_hpt374[] = {
#define F_LOW_PCI_50 0x2d
#define F_LOW_PCI_50 0x2d
#define F_LOW_PCI_66 0x42
#define F_LOW_PCI_66 0x42
static
void
init_setup_hpt366
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_hpt366
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_hpt37x
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_hpt37x
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_hpt374
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_hpt374
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_hpt366
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
init_chipset_hpt366
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_hpt366
(
ide_hwif_t
*
);
static
void
init_hwif_hpt366
(
ide_hwif_t
*
);
static
void
init_dma_hpt366
(
ide_hwif_t
*
,
unsigned
long
);
static
void
init_dma_hpt366
(
ide_hwif_t
*
,
unsigned
long
);
...
...
drivers/ide/pci/it8172.c
View file @
96b61dfd
...
@@ -270,9 +270,8 @@ static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_devic
...
@@ -270,9 +270,8 @@ static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_devic
{
{
if
((
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
||
if
((
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
||
(
!
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
))))
(
!
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
))))
return
1
;
/* IT8172 is more than only a IDE controller */
return
-
ENODEV
;
/* IT8172 is more than an IDE controller */
ide_setup_pci_device
(
dev
,
&
it8172_chipsets
[
id
->
driver_data
]);
return
ide_setup_pci_device
(
dev
,
&
it8172_chipsets
[
id
->
driver_data
]);
return
0
;
}
}
static
struct
pci_device_id
it8172_pci_tbl
[]
=
{
static
struct
pci_device_id
it8172_pci_tbl
[]
=
{
...
...
drivers/ide/pci/ns87415.c
View file @
96b61dfd
...
@@ -288,8 +288,7 @@ static ide_pci_device_t ns87415_chipset __devinitdata = {
...
@@ -288,8 +288,7 @@ static ide_pci_device_t ns87415_chipset __devinitdata = {
static
int
__devinit
ns87415_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
ns87415_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
ns87415_chipset
);
return
ide_setup_pci_device
(
dev
,
&
ns87415_chipset
);
return
0
;
}
}
static
struct
pci_device_id
ns87415_pci_tbl
[]
=
{
static
struct
pci_device_id
ns87415_pci_tbl
[]
=
{
...
...
drivers/ide/pci/opti621.c
View file @
96b61dfd
...
@@ -348,15 +348,14 @@ static void __init init_hwif_opti621 (ide_hwif_t *hwif)
...
@@ -348,15 +348,14 @@ static void __init init_hwif_opti621 (ide_hwif_t *hwif)
hwif
->
drives
[
1
].
autodma
=
hwif
->
autodma
;
hwif
->
drives
[
1
].
autodma
=
hwif
->
autodma
;
}
}
static
void
__init
init_setup_opti621
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__init
init_setup_opti621
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
int
__devinit
opti621_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
opti621_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
opti621_chipsets
[
id
->
driver_data
]);
return
ide_setup_pci_device
(
dev
,
&
opti621_chipsets
[
id
->
driver_data
]);
return
0
;
}
}
static
struct
pci_device_id
opti621_pci_tbl
[]
=
{
static
struct
pci_device_id
opti621_pci_tbl
[]
=
{
...
...
drivers/ide/pci/opti621.h
View file @
96b61dfd
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/ide.h>
#include <linux/ide.h>
static
void
init_setup_opti621
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_opti621
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_hwif_opti621
(
ide_hwif_t
*
);
static
void
init_hwif_opti621
(
ide_hwif_t
*
);
static
ide_pci_device_t
opti621_chipsets
[]
__devinitdata
=
{
static
ide_pci_device_t
opti621_chipsets
[]
__devinitdata
=
{
...
...
drivers/ide/pci/pdc202xx_new.c
View file @
96b61dfd
...
@@ -316,21 +316,21 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
...
@@ -316,21 +316,21 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
#endif
/* PDC202_DEBUG_CABLE */
#endif
/* PDC202_DEBUG_CABLE */
}
}
static
void
__devinit
init_setup_pdcnew
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_pdcnew
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_pdc20270
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_pdc20270
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
struct
pci_dev
*
findev
=
NULL
;
struct
pci_dev
*
findev
=
NULL
;
if
((
dev
->
bus
->
self
&&
if
((
dev
->
bus
->
self
&&
dev
->
bus
->
self
->
vendor
==
PCI_VENDOR_ID_DEC
)
&&
dev
->
bus
->
self
->
vendor
==
PCI_VENDOR_ID_DEC
)
&&
(
dev
->
bus
->
self
->
device
==
PCI_DEVICE_ID_DEC_21150
))
{
(
dev
->
bus
->
self
->
device
==
PCI_DEVICE_ID_DEC_21150
))
{
if
(
PCI_SLOT
(
dev
->
devfn
)
&
2
)
{
if
(
PCI_SLOT
(
dev
->
devfn
)
&
2
)
return
;
return
-
ENODEV
;
}
d
->
extra
=
0
;
d
->
extra
=
0
;
while
((
findev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
findev
))
!=
NULL
)
{
while
((
findev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
findev
))
!=
NULL
)
{
if
((
findev
->
vendor
==
dev
->
vendor
)
&&
if
((
findev
->
vendor
==
dev
->
vendor
)
&&
...
@@ -339,15 +339,15 @@ static void __devinit init_setup_pdc20270(struct pci_dev *dev, ide_pci_device_t
...
@@ -339,15 +339,15 @@ static void __devinit init_setup_pdc20270(struct pci_dev *dev, ide_pci_device_t
if
(
findev
->
irq
!=
dev
->
irq
)
{
if
(
findev
->
irq
!=
dev
->
irq
)
{
findev
->
irq
=
dev
->
irq
;
findev
->
irq
=
dev
->
irq
;
}
}
ide_setup_pci_devices
(
dev
,
findev
,
d
);
return
ide_setup_pci_devices
(
dev
,
findev
,
d
);
return
;
}
}
}
}
}
}
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_pdc20276
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_pdc20276
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
if
((
dev
->
bus
->
self
)
&&
if
((
dev
->
bus
->
self
)
&&
(
dev
->
bus
->
self
->
vendor
==
PCI_VENDOR_ID_INTEL
)
&&
(
dev
->
bus
->
self
->
vendor
==
PCI_VENDOR_ID_INTEL
)
&&
...
@@ -355,9 +355,9 @@ static void __devinit init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t
...
@@ -355,9 +355,9 @@ static void __devinit init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t
(
dev
->
bus
->
self
->
device
==
PCI_DEVICE_ID_INTEL_I960RM
)))
{
(
dev
->
bus
->
self
->
device
==
PCI_DEVICE_ID_INTEL_I960RM
)))
{
printk
(
KERN_INFO
"ide: Skipping Promise PDC20276 "
printk
(
KERN_INFO
"ide: Skipping Promise PDC20276 "
"attached to I2O RAID controller.
\n
"
);
"attached to I2O RAID controller.
\n
"
);
return
;
return
-
ENODEV
;
}
}
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
/**
/**
...
@@ -373,8 +373,7 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
...
@@ -373,8 +373,7 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
{
{
ide_pci_device_t
*
d
=
&
pdcnew_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
pdcnew_chipsets
[
id
->
driver_data
];
d
->
init_setup
(
dev
,
d
);
return
d
->
init_setup
(
dev
,
d
);
return
0
;
}
}
static
struct
pci_device_id
pdc202new_pci_tbl
[]
=
{
static
struct
pci_device_id
pdc202new_pci_tbl
[]
=
{
...
...
drivers/ide/pci/pdc202xx_new.h
View file @
96b61dfd
...
@@ -43,9 +43,9 @@ const static char *pdc_quirk_drives[] = {
...
@@ -43,9 +43,9 @@ const static char *pdc_quirk_drives[] = {
set_2regs(0x13,(c)); \
set_2regs(0x13,(c)); \
} while(0)
} while(0)
static
void
init_setup_pdcnew
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_pdcnew
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_pdc20270
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_pdc20270
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_pdc20276
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
);
static
int
init_setup_pdc20276
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
);
static
unsigned
int
init_chipset_pdcnew
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
init_chipset_pdcnew
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_pdc202new
(
ide_hwif_t
*
);
static
void
init_hwif_pdc202new
(
ide_hwif_t
*
);
...
...
drivers/ide/pci/pdc202xx_old.c
View file @
96b61dfd
...
@@ -658,7 +658,8 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase)
...
@@ -658,7 +658,8 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma
(
hwif
,
dmabase
,
8
);
ide_setup_dma
(
hwif
,
dmabase
,
8
);
}
}
static
void
__devinit
init_setup_pdc202ata4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_pdc202ata4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
if
((
dev
->
class
>>
8
)
!=
PCI_CLASS_STORAGE_IDE
)
{
if
((
dev
->
class
>>
8
)
!=
PCI_CLASS_STORAGE_IDE
)
{
u8
irq
=
0
,
irq2
=
0
;
u8
irq
=
0
,
irq2
=
0
;
...
@@ -685,10 +686,11 @@ static void __devinit init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_
...
@@ -685,10 +686,11 @@ static void __devinit init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_
}
}
#endif
#endif
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_pdc20265
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_pdc20265
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
if
((
dev
->
bus
->
self
)
&&
if
((
dev
->
bus
->
self
)
&&
(
dev
->
bus
->
self
->
vendor
==
PCI_VENDOR_ID_INTEL
)
&&
(
dev
->
bus
->
self
->
vendor
==
PCI_VENDOR_ID_INTEL
)
&&
...
@@ -696,7 +698,7 @@ static void __devinit init_setup_pdc20265(struct pci_dev *dev, ide_pci_device_t
...
@@ -696,7 +698,7 @@ static void __devinit init_setup_pdc20265(struct pci_dev *dev, ide_pci_device_t
(
dev
->
bus
->
self
->
device
==
PCI_DEVICE_ID_INTEL_I960RM
)))
{
(
dev
->
bus
->
self
->
device
==
PCI_DEVICE_ID_INTEL_I960RM
)))
{
printk
(
KERN_INFO
"ide: Skipping Promise PDC20265 "
printk
(
KERN_INFO
"ide: Skipping Promise PDC20265 "
"attached to I2O RAID controller.
\n
"
);
"attached to I2O RAID controller.
\n
"
);
return
;
return
-
ENODEV
;
}
}
#if 0
#if 0
...
@@ -714,12 +716,13 @@ static void __devinit init_setup_pdc20265(struct pci_dev *dev, ide_pci_device_t
...
@@ -714,12 +716,13 @@ static void __devinit init_setup_pdc20265(struct pci_dev *dev, ide_pci_device_t
}
}
#endif
#endif
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__devinit
init_setup_pdc202xx
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_pdc202xx
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
/**
/**
...
@@ -735,8 +738,7 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
...
@@ -735,8 +738,7 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
{
{
ide_pci_device_t
*
d
=
&
pdc202xx_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
pdc202xx_chipsets
[
id
->
driver_data
];
d
->
init_setup
(
dev
,
d
);
return
d
->
init_setup
(
dev
,
d
);
return
0
;
}
}
static
struct
pci_device_id
pdc202xx_pci_tbl
[]
=
{
static
struct
pci_device_id
pdc202xx_pci_tbl
[]
=
{
...
...
drivers/ide/pci/pdc202xx_old.h
View file @
96b61dfd
...
@@ -63,9 +63,9 @@ static const char *pdc_quirk_drives[] = {
...
@@ -63,9 +63,9 @@ static const char *pdc_quirk_drives[] = {
#define MC1 0x02
/* DMA"C" timing */
#define MC1 0x02
/* DMA"C" timing */
#define MC0 0x01
/* DMA"C" timing */
#define MC0 0x01
/* DMA"C" timing */
static
void
init_setup_pdc202ata4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
);
static
int
init_setup_pdc202ata4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
);
static
void
init_setup_pdc20265
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_pdc20265
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_pdc202xx
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_pdc202xx
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_pdc202xx
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
init_chipset_pdc202xx
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_pdc202xx
(
ide_hwif_t
*
);
static
void
init_hwif_pdc202xx
(
ide_hwif_t
*
);
static
void
init_dma_pdc202xx
(
ide_hwif_t
*
,
unsigned
long
);
static
void
init_dma_pdc202xx
(
ide_hwif_t
*
,
unsigned
long
);
...
...
drivers/ide/pci/piix.c
View file @
96b61dfd
...
@@ -134,6 +134,7 @@ static u8 piix_ratemask (ide_drive_t *drive)
...
@@ -134,6 +134,7 @@ static u8 piix_ratemask (ide_drive_t *drive)
case
PCI_DEVICE_ID_INTEL_82801EB_11
:
case
PCI_DEVICE_ID_INTEL_82801EB_11
:
case
PCI_DEVICE_ID_INTEL_ESB_2
:
case
PCI_DEVICE_ID_INTEL_ESB_2
:
case
PCI_DEVICE_ID_INTEL_ICH6_19
:
case
PCI_DEVICE_ID_INTEL_ICH6_19
:
case
PCI_DEVICE_ID_INTEL_ICH7_21
:
mode
=
3
;
mode
=
3
;
break
;
break
;
/* UDMA 66 capable */
/* UDMA 66 capable */
...
@@ -445,6 +446,7 @@ static unsigned int __devinit init_chipset_piix (struct pci_dev *dev, const char
...
@@ -445,6 +446,7 @@ static unsigned int __devinit init_chipset_piix (struct pci_dev *dev, const char
case
PCI_DEVICE_ID_INTEL_82801E_11
:
case
PCI_DEVICE_ID_INTEL_82801E_11
:
case
PCI_DEVICE_ID_INTEL_ESB_2
:
case
PCI_DEVICE_ID_INTEL_ESB_2
:
case
PCI_DEVICE_ID_INTEL_ICH6_19
:
case
PCI_DEVICE_ID_INTEL_ICH6_19
:
case
PCI_DEVICE_ID_INTEL_ICH7_21
:
{
{
unsigned
int
extra
=
0
;
unsigned
int
extra
=
0
;
pci_read_config_dword
(
dev
,
0x54
,
&
extra
);
pci_read_config_dword
(
dev
,
0x54
,
&
extra
);
...
@@ -535,9 +537,9 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
...
@@ -535,9 +537,9 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
* a standard ide PCI setup
* a standard ide PCI setup
*/
*/
static
void
__devinit
init_setup_piix
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
init_setup_piix
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
/**
/**
...
@@ -553,8 +555,7 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_
...
@@ -553,8 +555,7 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_
{
{
ide_pci_device_t
*
d
=
&
piix_pci_info
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
piix_pci_info
[
id
->
driver_data
];
d
->
init_setup
(
dev
,
d
);
return
d
->
init_setup
(
dev
,
d
);
return
0
;
}
}
/**
/**
...
@@ -612,6 +613,7 @@ static struct pci_device_id piix_pci_tbl[] = {
...
@@ -612,6 +613,7 @@ static struct pci_device_id piix_pci_tbl[] = {
#endif
#endif
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_ESB_2
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
19
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_ESB_2
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
19
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_ICH6_19
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
20
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_ICH6_19
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
20
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_ICH7_21
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
21
},
{
0
,
},
{
0
,
},
};
};
MODULE_DEVICE_TABLE
(
pci
,
piix_pci_tbl
);
MODULE_DEVICE_TABLE
(
pci
,
piix_pci_tbl
);
...
...
drivers/ide/pci/piix.h
View file @
96b61dfd
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/ide.h>
#include <linux/ide.h>
static
void
init_setup_piix
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_piix
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
__devinit
init_chipset_piix
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
__devinit
init_chipset_piix
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_piix
(
ide_hwif_t
*
);
static
void
init_hwif_piix
(
ide_hwif_t
*
);
...
@@ -57,7 +57,8 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
...
@@ -57,7 +57,8 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
/* 17 */
DECLARE_PIIX_DEV
(
"ICH4"
),
/* 17 */
DECLARE_PIIX_DEV
(
"ICH4"
),
/* 18 */
DECLARE_PIIX_DEV
(
"ICH5-SATA"
),
/* 18 */
DECLARE_PIIX_DEV
(
"ICH5-SATA"
),
/* 19 */
DECLARE_PIIX_DEV
(
"ICH5"
),
/* 19 */
DECLARE_PIIX_DEV
(
"ICH5"
),
/* 20 */
DECLARE_PIIX_DEV
(
"ICH6"
)
/* 20 */
DECLARE_PIIX_DEV
(
"ICH6"
),
/* 21 */
DECLARE_PIIX_DEV
(
"ICH7"
),
};
};
#endif
/* PIIX_H */
#endif
/* PIIX_H */
drivers/ide/pci/rz1000.c
View file @
96b61dfd
...
@@ -62,8 +62,7 @@ static ide_pci_device_t rz1000_chipset __devinitdata = {
...
@@ -62,8 +62,7 @@ static ide_pci_device_t rz1000_chipset __devinitdata = {
static
int
__devinit
rz1000_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
rz1000_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
rz1000_chipset
);
return
ide_setup_pci_device
(
dev
,
&
rz1000_chipset
);
return
0
;
}
}
static
struct
pci_device_id
rz1000_pci_tbl
[]
=
{
static
struct
pci_device_id
rz1000_pci_tbl
[]
=
{
...
...
drivers/ide/pci/sc1200.c
View file @
96b61dfd
...
@@ -489,8 +489,7 @@ static ide_pci_device_t sc1200_chipset __devinitdata = {
...
@@ -489,8 +489,7 @@ static ide_pci_device_t sc1200_chipset __devinitdata = {
static
int
__devinit
sc1200_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
sc1200_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
sc1200_chipset
);
return
ide_setup_pci_device
(
dev
,
&
sc1200_chipset
);
return
0
;
}
}
static
struct
pci_device_id
sc1200_pci_tbl
[]
=
{
static
struct
pci_device_id
sc1200_pci_tbl
[]
=
{
...
...
drivers/ide/pci/serverworks.c
View file @
96b61dfd
...
@@ -359,11 +359,9 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
...
@@ -359,11 +359,9 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
else
if
((
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB5IDE
)
||
else
if
((
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB5IDE
)
||
(
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE
)
||
(
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE
)
||
(
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2
))
{
(
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2
))
{
// u32 pioreg = 0, dmareg = 0;
/* Third Channel Test */
/* Third Channel Test */
if
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
))
{
if
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
))
{
#if 1
struct
pci_dev
*
findev
=
NULL
;
struct
pci_dev
*
findev
=
NULL
;
u32
reg4c
=
0
;
u32
reg4c
=
0
;
findev
=
pci_find_device
(
PCI_VENDOR_ID_SERVERWORKS
,
findev
=
pci_find_device
(
PCI_VENDOR_ID_SERVERWORKS
,
...
@@ -375,19 +373,11 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
...
@@ -375,19 +373,11 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
reg4c
|=
0x00000020
;
reg4c
|=
0x00000020
;
pci_write_config_dword
(
findev
,
0x4C
,
reg4c
);
pci_write_config_dword
(
findev
,
0x4C
,
reg4c
);
}
}
#endif
outb_p
(
0x06
,
0x0c00
);
outb_p
(
0x06
,
0x0c00
);
dev
->
irq
=
inb_p
(
0x0c01
);
dev
->
irq
=
inb_p
(
0x0c01
);
#if 0
/* WE need to figure out how to get the correct one */
printk("%s: interrupt %d\n", name, dev->irq);
if (dev->irq != 0x0B)
dev->irq = 0x0B;
#endif
#if 0
#if 0
printk("%s: device class (0x%04x)\n",
printk("%s: device class (0x%04x)\n",
name, dev->class);
name, dev->class);
#else
if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
dev->class &= ~0x000F0F00;
dev->class &= ~0x000F0F00;
// dev->class |= ~0x00000400;
// dev->class |= ~0x00000400;
...
@@ -413,7 +403,8 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
...
@@ -413,7 +403,8 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
* interrupt pin to be set, and it is a compatibility
* interrupt pin to be set, and it is a compatibility
* mode issue.
* mode issue.
*/
*/
dev
->
irq
=
0
;
if
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
)
dev
->
irq
=
0
;
}
}
// pci_read_config_dword(dev, 0x40, &pioreg)
// pci_read_config_dword(dev, 0x40, &pioreg)
// pci_write_config_dword(dev, 0x40, 0x99999999);
// pci_write_config_dword(dev, 0x40, 0x99999999);
...
@@ -566,20 +557,17 @@ static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
...
@@ -566,20 +557,17 @@ static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma
(
hwif
,
dmabase
,
8
);
ide_setup_dma
(
hwif
,
dmabase
,
8
);
}
}
static
void
__init
init_setup_svwks
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__init
init_setup_svwks
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
static
void
__init
init_setup_csb6
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__init
init_setup_csb6
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
if
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
))
{
if
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
))
{
d
->
bootable
=
NEVER_BOARD
;
d
->
bootable
=
NEVER_BOARD
;
if
(
dev
->
resource
[
0
].
start
==
0x01f1
)
if
(
dev
->
resource
[
0
].
start
==
0x01f1
)
d
->
bootable
=
ON_BOARD
;
d
->
bootable
=
ON_BOARD
;
}
else
{
if
((
dev
->
class
>>
8
)
!=
PCI_CLASS_STORAGE_IDE
)
return
;
}
}
#if 0
#if 0
if ((IDE_PCI_DEVID_EQ(d->devid, DEVID_CSB6) &&
if ((IDE_PCI_DEVID_EQ(d->devid, DEVID_CSB6) &&
...
@@ -591,7 +579,7 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
...
@@ -591,7 +579,7 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2
)
&&
dev
->
device
==
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2
)
&&
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)))
?
1
:
2
;
(
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)))
?
1
:
2
;
ide_setup_pci_device
(
dev
,
d
);
return
ide_setup_pci_device
(
dev
,
d
);
}
}
...
@@ -608,8 +596,7 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
...
@@ -608,8 +596,7 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
{
{
ide_pci_device_t
*
d
=
&
serverworks_chipsets
[
id
->
driver_data
];
ide_pci_device_t
*
d
=
&
serverworks_chipsets
[
id
->
driver_data
];
d
->
init_setup
(
dev
,
d
);
return
d
->
init_setup
(
dev
,
d
);
return
0
;
}
}
static
struct
pci_device_id
svwks_pci_tbl
[]
=
{
static
struct
pci_device_id
svwks_pci_tbl
[]
=
{
...
@@ -625,10 +612,6 @@ static struct pci_driver driver = {
...
@@ -625,10 +612,6 @@ static struct pci_driver driver = {
.
name
=
"Serverworks_IDE"
,
.
name
=
"Serverworks_IDE"
,
.
id_table
=
svwks_pci_tbl
,
.
id_table
=
svwks_pci_tbl
,
.
probe
=
svwks_init_one
,
.
probe
=
svwks_init_one
,
#if 0 /* FIXME: implement */
.suspend = ,
.resume = ,
#endif
};
};
static
int
svwks_ide_init
(
void
)
static
int
svwks_ide_init
(
void
)
...
...
drivers/ide/pci/serverworks.h
View file @
96b61dfd
...
@@ -21,8 +21,8 @@ static const char *svwks_bad_ata100[] = {
...
@@ -21,8 +21,8 @@ static const char *svwks_bad_ata100[] = {
NULL
NULL
};
};
static
void
init_setup_svwks
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_svwks
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_setup_csb6
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
init_setup_csb6
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_svwks
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
init_chipset_svwks
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_svwks
(
ide_hwif_t
*
);
static
void
init_hwif_svwks
(
ide_hwif_t
*
);
static
void
init_dma_svwks
(
ide_hwif_t
*
,
unsigned
long
);
static
void
init_dma_svwks
(
ide_hwif_t
*
,
unsigned
long
);
...
...
drivers/ide/pci/sgiioc4.c
View file @
96b61dfd
...
@@ -681,12 +681,14 @@ static unsigned int __devinit
...
@@ -681,12 +681,14 @@ static unsigned int __devinit
pci_init_sgiioc4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
pci_init_sgiioc4
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
unsigned
int
class_rev
;
unsigned
int
class_rev
;
int
ret
;
if
(
pci_enable_device
(
dev
))
{
ret
=
pci_enable_device
(
dev
);
if
(
ret
<
0
)
{
printk
(
KERN_ERR
printk
(
KERN_ERR
"Failed to enable device %s at slot %s
\n
"
,
"Failed to enable device %s at slot %s
\n
"
,
d
->
name
,
dev
->
slot_name
);
d
->
name
,
dev
->
slot_name
);
return
-
ENODEV
;
goto
out
;
}
}
pci_set_master
(
dev
);
pci_set_master
(
dev
);
...
@@ -698,9 +700,18 @@ pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
...
@@ -698,9 +700,18 @@ pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
printk
(
KERN_ERR
"Skipping %s IDE controller in slot %s: "
printk
(
KERN_ERR
"Skipping %s IDE controller in slot %s: "
"firmware is obsolete - please upgrade to revision"
"firmware is obsolete - please upgrade to revision"
"46 or higher
\n
"
,
d
->
name
,
dev
->
slot_name
);
"46 or higher
\n
"
,
d
->
name
,
dev
->
slot_name
);
return
-
ENODEV
;
ret
=
-
EAGAIN
;
goto
err_disable
;
}
}
return
sgiioc4_ide_setup_pci_device
(
dev
,
d
);
ret
=
sgiioc4_ide_setup_pci_device
(
dev
,
d
);
if
(
ret
<
0
)
goto
err_disable
;
out:
return
ret
;
err_disable:
pci_disable_device
(
dev
);
goto
out
;
}
}
static
ide_pci_device_t
sgiioc4_chipsets
[]
__devinitdata
=
{
static
ide_pci_device_t
sgiioc4_chipsets
[]
__devinitdata
=
{
...
...
drivers/ide/pci/siimage.c
View file @
96b61dfd
...
@@ -1102,8 +1102,7 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = {
...
@@ -1102,8 +1102,7 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = {
static
int
__devinit
siimage_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
siimage_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
siimage_chipsets
[
id
->
driver_data
]);
return
ide_setup_pci_device
(
dev
,
&
siimage_chipsets
[
id
->
driver_data
]);
return
0
;
}
}
static
struct
pci_device_id
siimage_pci_tbl
[]
=
{
static
struct
pci_device_id
siimage_pci_tbl
[]
=
{
...
...
drivers/ide/pci/sis5513.c
View file @
96b61dfd
...
@@ -946,8 +946,7 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
...
@@ -946,8 +946,7 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
static
int
__devinit
sis5513_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
sis5513_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
sis5513_chipset
);
return
ide_setup_pci_device
(
dev
,
&
sis5513_chipset
);
return
0
;
}
}
static
struct
pci_device_id
sis5513_pci_tbl
[]
=
{
static
struct
pci_device_id
sis5513_pci_tbl
[]
=
{
...
...
drivers/ide/pci/sl82c105.c
View file @
96b61dfd
...
@@ -490,8 +490,7 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
...
@@ -490,8 +490,7 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
static
int
__devinit
sl82c105_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
sl82c105_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
sl82c105_chipset
);
return
ide_setup_pci_device
(
dev
,
&
sl82c105_chipset
);
return
0
;
}
}
static
struct
pci_device_id
sl82c105_pci_tbl
[]
=
{
static
struct
pci_device_id
sl82c105_pci_tbl
[]
=
{
...
...
drivers/ide/pci/slc90e66.c
View file @
96b61dfd
...
@@ -246,8 +246,7 @@ static ide_pci_device_t slc90e66_chipset __devinitdata = {
...
@@ -246,8 +246,7 @@ static ide_pci_device_t slc90e66_chipset __devinitdata = {
static
int
__devinit
slc90e66_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
slc90e66_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
slc90e66_chipset
);
return
ide_setup_pci_device
(
dev
,
&
slc90e66_chipset
);
return
0
;
}
}
static
struct
pci_device_id
slc90e66_pci_tbl
[]
=
{
static
struct
pci_device_id
slc90e66_pci_tbl
[]
=
{
...
...
drivers/ide/pci/triflex.c
View file @
96b61dfd
...
@@ -158,9 +158,7 @@ static ide_pci_device_t triflex_device __devinitdata = {
...
@@ -158,9 +158,7 @@ static ide_pci_device_t triflex_device __devinitdata = {
static
int
__devinit
triflex_init_one
(
struct
pci_dev
*
dev
,
static
int
__devinit
triflex_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
triflex_device
);
return
ide_setup_pci_device
(
dev
,
&
triflex_device
);
return
0
;
}
}
static
struct
pci_device_id
triflex_pci_tbl
[]
=
{
static
struct
pci_device_id
triflex_pci_tbl
[]
=
{
...
...
drivers/ide/pci/trm290.c
View file @
96b61dfd
...
@@ -342,8 +342,7 @@ static ide_pci_device_t trm290_chipset __devinitdata = {
...
@@ -342,8 +342,7 @@ static ide_pci_device_t trm290_chipset __devinitdata = {
static
int
__devinit
trm290_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
trm290_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
trm290_chipset
);
return
ide_setup_pci_device
(
dev
,
&
trm290_chipset
);
return
0
;
}
}
static
struct
pci_device_id
trm290_pci_tbl
[]
=
{
static
struct
pci_device_id
trm290_pci_tbl
[]
=
{
...
...
drivers/ide/pci/via82cxxx.c
View file @
96b61dfd
...
@@ -620,8 +620,7 @@ static ide_pci_device_t via82cxxx_chipset __devinitdata = {
...
@@ -620,8 +620,7 @@ static ide_pci_device_t via82cxxx_chipset __devinitdata = {
static
int
__devinit
via_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
via_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
ide_setup_pci_device
(
dev
,
&
via82cxxx_chipset
);
return
ide_setup_pci_device
(
dev
,
&
via82cxxx_chipset
);
return
0
;
}
}
static
struct
pci_device_id
via_pci_tbl
[]
=
{
static
struct
pci_device_id
via_pci_tbl
[]
=
{
...
...
drivers/ide/setup-pci.c
View file @
96b61dfd
...
@@ -290,14 +290,16 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
...
@@ -290,14 +290,16 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
static
int
ide_pci_enable
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
ide_pci_enable
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
int
ret
;
if
(
pci_enable_device
(
dev
))
{
if
(
pci_enable_device
(
dev
))
{
if
(
pci_enable_device_bars
(
dev
,
1
<<
4
))
{
ret
=
pci_enable_device_bars
(
dev
,
1
<<
4
);
if
(
ret
<
0
)
{
printk
(
KERN_WARNING
"%s: (ide_setup_pci_device:) "
printk
(
KERN_WARNING
"%s: (ide_setup_pci_device:) "
"Could not enable device.
\n
"
,
d
->
name
);
"Could not enable device.
\n
"
,
d
->
name
);
return
-
EBUSY
;
goto
out
;
}
else
}
printk
(
KERN_WARNING
"%s: BIOS configuration fixed.
\n
"
,
d
->
name
);
printk
(
KERN_WARNING
"%s: BIOS configuration fixed.
\n
"
,
d
->
name
);
}
}
/*
/*
...
@@ -305,18 +307,23 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d)
...
@@ -305,18 +307,23 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d)
* dma mask field to the ide_pci_device_t if we need it (or let
* dma mask field to the ide_pci_device_t if we need it (or let
* lower level driver set the dma mask)
* lower level driver set the dma mask)
*/
*/
if
(
pci_set_dma_mask
(
dev
,
0xffffffff
))
{
ret
=
pci_set_dma_mask
(
dev
,
DMA_32BIT_MASK
);
if
(
ret
<
0
)
{
printk
(
KERN_ERR
"%s: can't set dma mask
\n
"
,
d
->
name
);
printk
(
KERN_ERR
"%s: can't set dma mask
\n
"
,
d
->
name
);
return
-
EBUSY
;
pci_disable_device
(
dev
);
goto
out
;
}
}
/* FIXME: Temporary - until we put in the hotplug interface logic
/* FIXME: Temporary - until we put in the hotplug interface logic
Check that the bits we want are not in use by someone else */
Check that the bits we want are not in use by someone else.
if
(
pci_request_region
(
dev
,
4
,
"ide_tmp"
))
As someone else uses it, we do not (yuck) disable the device */
return
-
EBUSY
;
ret
=
pci_request_region
(
dev
,
4
,
"ide_tmp"
);
if
(
ret
<
0
)
goto
out
;
pci_release_region
(
dev
,
4
);
pci_release_region
(
dev
,
4
);
out:
return
0
;
return
ret
;
}
}
/**
/**
...
@@ -515,22 +522,26 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
...
@@ -515,22 +522,26 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
static
int
ide_setup_pci_controller
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
int
noisy
,
int
*
config
)
static
int
ide_setup_pci_controller
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
int
noisy
,
int
*
config
)
{
{
int
ret
;
u32
class_rev
;
u32
class_rev
;
u16
pcicmd
;
u16
pcicmd
;
if
(
noisy
)
if
(
noisy
)
ide_setup_pci_noise
(
dev
,
d
);
ide_setup_pci_noise
(
dev
,
d
);
if
(
ide_pci_enable
(
dev
,
d
))
ret
=
ide_pci_enable
(
dev
,
d
);
return
-
EBUSY
;
if
(
ret
<
0
)
goto
out
;
if
(
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
pcicmd
))
{
ret
=
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
pcicmd
);
if
(
ret
<
0
)
{
printk
(
KERN_ERR
"%s: error accessing PCI regs
\n
"
,
d
->
name
);
printk
(
KERN_ERR
"%s: error accessing PCI regs
\n
"
,
d
->
name
);
return
-
EIO
;
goto
err_disable
;
}
}
if
(
!
(
pcicmd
&
PCI_COMMAND_IO
))
{
/* is device disabled? */
if
(
!
(
pcicmd
&
PCI_COMMAND_IO
))
{
/* is device disabled? */
if
(
ide_pci_configure
(
dev
,
d
))
ret
=
ide_pci_configure
(
dev
,
d
);
return
-
ENODEV
;
if
(
ret
<
0
)
goto
err_disable
;
*
config
=
1
;
*
config
=
1
;
printk
(
KERN_INFO
"%s: device enabled (Linux)
\n
"
,
d
->
name
);
printk
(
KERN_INFO
"%s: device enabled (Linux)
\n
"
,
d
->
name
);
}
}
...
@@ -539,7 +550,19 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in
...
@@ -539,7 +550,19 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in
class_rev
&=
0xff
;
class_rev
&=
0xff
;
if
(
noisy
)
if
(
noisy
)
printk
(
KERN_INFO
"%s: chipset revision %d
\n
"
,
d
->
name
,
class_rev
);
printk
(
KERN_INFO
"%s: chipset revision %d
\n
"
,
d
->
name
,
class_rev
);
return
0
;
out:
return
ret
;
err_disable:
pci_disable_device
(
dev
);
goto
out
;
}
static
void
ide_release_pci_controller
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
int
noisy
)
{
/* Balance ide_pci_enable() */
pci_disable_device
(
dev
);
}
}
/**
/**
...
@@ -643,14 +666,16 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
...
@@ -643,14 +666,16 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
* we "know" about, this information is in the ide_pci_device_t struct;
* we "know" about, this information is in the ide_pci_device_t struct;
* for all other chipsets, we just assume both interfaces are enabled.
* for all other chipsets, we just assume both interfaces are enabled.
*/
*/
static
ata_index_t
do_ide_setup_pci_device
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
u8
noisy
)
static
int
do_ide_setup_pci_device
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
ata_index_t
*
index
,
u8
noisy
)
{
{
int
pciirq
=
0
;
static
ata_index_t
ata_index
=
{
.
b
=
{
.
low
=
0xff
,
.
high
=
0xff
}
}
;
int
tried_config
=
0
;
int
tried_config
=
0
;
ata_index_t
index
=
{
.
b
=
{
.
low
=
0xff
,
.
high
=
0xff
}
}
;
int
pciirq
,
ret
;
if
(
ide_setup_pci_controller
(
dev
,
d
,
noisy
,
&
tried_config
)
<
0
)
ret
=
ide_setup_pci_controller
(
dev
,
d
,
noisy
,
&
tried_config
);
return
index
;
if
(
ret
<
0
)
goto
out
;
/*
/*
* Can we trust the reported IRQ?
* Can we trust the reported IRQ?
...
@@ -668,7 +693,10 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
...
@@ -668,7 +693,10 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
* space, place chipset into init-mode, and/or preserve
* space, place chipset into init-mode, and/or preserve
* an interrupt if the card is not native ide support.
* an interrupt if the card is not native ide support.
*/
*/
pciirq
=
(
d
->
init_chipset
)
?
d
->
init_chipset
(
dev
,
d
->
name
)
:
0
;
ret
=
d
->
init_chipset
?
d
->
init_chipset
(
dev
,
d
->
name
)
:
0
;
if
(
ret
<
0
)
goto
err_release_pci_controller
;
pciirq
=
ret
;
}
else
if
(
tried_config
)
{
}
else
if
(
tried_config
)
{
if
(
noisy
)
if
(
noisy
)
printk
(
KERN_INFO
"%s: will probe irqs later
\n
"
,
d
->
name
);
printk
(
KERN_INFO
"%s: will probe irqs later
\n
"
,
d
->
name
);
...
@@ -679,10 +707,10 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
...
@@ -679,10 +707,10 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
d
->
name
,
pciirq
);
d
->
name
,
pciirq
);
pciirq
=
0
;
pciirq
=
0
;
}
else
{
}
else
{
if
(
d
->
init_chipset
)
if
(
d
->
init_chipset
)
{
{
ret
=
d
->
init_chipset
(
dev
,
d
->
name
);
if
(
d
->
init_chipset
(
dev
,
d
->
name
)
<
0
)
if
(
ret
<
0
)
return
index
;
goto
err_release_pci_controller
;
}
}
if
(
noisy
)
if
(
noisy
)
#ifdef __sparc__
#ifdef __sparc__
...
@@ -693,18 +721,27 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
...
@@ -693,18 +721,27 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
d
->
name
,
pciirq
);
d
->
name
,
pciirq
);
#endif
#endif
}
}
if
(
pciirq
<
0
)
/* Error not an IRQ */
return
index
;
ide_pci_setup_ports
(
dev
,
d
,
pciirq
,
&
index
);
/* FIXME: silent failure can happen */
*
index
=
ata_index
;
ide_pci_setup_ports
(
dev
,
d
,
pciirq
,
index
);
out:
return
ret
;
return
index
;
err_release_pci_controller:
ide_release_pci_controller
(
dev
,
d
,
noisy
);
goto
out
;
}
}
void
ide_setup_pci_device
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
int
ide_setup_pci_device
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
{
ata_index_t
index_list
=
do_ide_setup_pci_device
(
dev
,
d
,
1
);
ata_index_t
index_list
;
int
ret
;
ret
=
do_ide_setup_pci_device
(
dev
,
d
,
&
index_list
,
1
);
if
(
ret
<
0
)
goto
out
;
if
((
index_list
.
b
.
low
&
0xf0
)
!=
0xf0
)
if
((
index_list
.
b
.
low
&
0xf0
)
!=
0xf0
)
probe_hwif_init_with_fixup
(
&
ide_hwifs
[
index_list
.
b
.
low
],
d
->
fixup
);
probe_hwif_init_with_fixup
(
&
ide_hwifs
[
index_list
.
b
.
low
],
d
->
fixup
);
...
@@ -712,25 +749,42 @@ void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d)
...
@@ -712,25 +749,42 @@ void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d)
probe_hwif_init_with_fixup
(
&
ide_hwifs
[
index_list
.
b
.
high
],
d
->
fixup
);
probe_hwif_init_with_fixup
(
&
ide_hwifs
[
index_list
.
b
.
high
],
d
->
fixup
);
create_proc_ide_interfaces
();
create_proc_ide_interfaces
();
out:
return
ret
;
}
}
EXPORT_SYMBOL_GPL
(
ide_setup_pci_device
);
EXPORT_SYMBOL_GPL
(
ide_setup_pci_device
);
void
ide_setup_pci_devices
(
struct
pci_dev
*
dev
,
struct
pci_dev
*
dev2
,
ide_pci_device_t
*
d
)
int
ide_setup_pci_devices
(
struct
pci_dev
*
dev1
,
struct
pci_dev
*
dev2
,
ide_pci_device_t
*
d
)
{
{
ata_index_t
index_list
=
do_ide_setup_pci_device
(
dev
,
d
,
1
);
struct
pci_dev
*
pdev
[]
=
{
dev1
,
dev2
};
ata_index_t
index_list2
=
do_ide_setup_pci_device
(
dev2
,
d
,
0
);
ata_index_t
index_list
[
2
];
int
ret
,
i
;
if
((
index_list
.
b
.
low
&
0xf0
)
!=
0xf0
)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
probe_hwif_init
(
&
ide_hwifs
[
index_list
.
b
.
low
]);
ret
=
do_ide_setup_pci_device
(
pdev
[
i
],
d
,
index_list
+
i
,
!
i
);
if
((
index_list
.
b
.
high
&
0xf0
)
!=
0xf0
)
/*
probe_hwif_init
(
&
ide_hwifs
[
index_list
.
b
.
high
]);
* FIXME: Mom, mom, they stole me the helper function to undo
if
((
index_list2
.
b
.
low
&
0xf0
)
!=
0xf0
)
* do_ide_setup_pci_device() on the first device!
probe_hwif_init
(
&
ide_hwifs
[
index_list2
.
b
.
low
]);
*/
if
((
index_list2
.
b
.
high
&
0xf0
)
!=
0xf0
)
if
(
ret
<
0
)
probe_hwif_init
(
&
ide_hwifs
[
index_list2
.
b
.
high
]);
goto
out
;
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
u8
idx
[
2
]
=
{
index_list
[
i
].
b
.
low
,
index_list
[
i
].
b
.
high
};
int
j
;
for
(
j
=
0
;
j
<
2
;
j
++
)
{
if
((
idx
[
j
]
&
0xf0
)
!=
0xf0
)
probe_hwif_init
(
ide_hwifs
+
idx
[
j
]);
}
}
create_proc_ide_interfaces
();
create_proc_ide_interfaces
();
out:
return
ret
;
}
}
EXPORT_SYMBOL_GPL
(
ide_setup_pci_devices
);
EXPORT_SYMBOL_GPL
(
ide_setup_pci_devices
);
...
...
include/linux/ide.h
View file @
96b61dfd
...
@@ -1422,7 +1422,7 @@ enum {
...
@@ -1422,7 +1422,7 @@ enum {
typedef
struct
ide_pci_device_s
{
typedef
struct
ide_pci_device_s
{
char
*
name
;
char
*
name
;
void
(
*
init_setup
)(
struct
pci_dev
*
,
struct
ide_pci_device_s
*
);
int
(
*
init_setup
)(
struct
pci_dev
*
,
struct
ide_pci_device_s
*
);
void
(
*
init_setup_dma
)(
struct
pci_dev
*
,
struct
ide_pci_device_s
*
,
ide_hwif_t
*
);
void
(
*
init_setup_dma
)(
struct
pci_dev
*
,
struct
ide_pci_device_s
*
,
ide_hwif_t
*
);
unsigned
int
(
*
init_chipset
)(
struct
pci_dev
*
,
const
char
*
);
unsigned
int
(
*
init_chipset
)(
struct
pci_dev
*
,
const
char
*
);
void
(
*
init_iops
)(
ide_hwif_t
*
);
void
(
*
init_iops
)(
ide_hwif_t
*
);
...
@@ -1438,8 +1438,8 @@ typedef struct ide_pci_device_s {
...
@@ -1438,8 +1438,8 @@ typedef struct ide_pci_device_s {
u8
flags
;
u8
flags
;
}
ide_pci_device_t
;
}
ide_pci_device_t
;
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
extern
int
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
extern
void
ide_setup_pci_devices
(
struct
pci_dev
*
,
struct
pci_dev
*
,
ide_pci_device_t
*
);
extern
int
ide_setup_pci_devices
(
struct
pci_dev
*
,
struct
pci_dev
*
,
ide_pci_device_t
*
);
void
ide_map_sg
(
ide_drive_t
*
,
struct
request
*
);
void
ide_map_sg
(
ide_drive_t
*
,
struct
request
*
);
void
ide_init_sg_cmd
(
ide_drive_t
*
,
struct
request
*
);
void
ide_init_sg_cmd
(
ide_drive_t
*
,
struct
request
*
);
...
...
include/linux/pci_ids.h
View file @
96b61dfd
...
@@ -2238,6 +2238,30 @@
...
@@ -2238,6 +2238,30 @@
#define PCI_DEVICE_ID_INTEL_ICH6_17 0x266d
#define PCI_DEVICE_ID_INTEL_ICH6_17 0x266d
#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e
#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e
#define PCI_DEVICE_ID_INTEL_ICH6_19 0x266f
#define PCI_DEVICE_ID_INTEL_ICH6_19 0x266f
#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b0
#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b1
#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0
#define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1
#define PCI_DEVICE_ID_INTEL_ICH7_4 0x27c2
#define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4
#define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5
#define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8
#define PCI_DEVICE_ID_INTEL_ICH7_8 0x27c9
#define PCI_DEVICE_ID_INTEL_ICH7_9 0x27ca
#define PCI_DEVICE_ID_INTEL_ICH7_10 0x27cb
#define PCI_DEVICE_ID_INTEL_ICH7_11 0x27cc
#define PCI_DEVICE_ID_INTEL_ICH7_12 0x27d0
#define PCI_DEVICE_ID_INTEL_ICH7_13 0x27d2
#define PCI_DEVICE_ID_INTEL_ICH7_14 0x27d4
#define PCI_DEVICE_ID_INTEL_ICH7_15 0x27d6
#define PCI_DEVICE_ID_INTEL_ICH7_16 0x27d8
#define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da
#define PCI_DEVICE_ID_INTEL_ICH7_18 0x27dc
#define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd
#define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de
#define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df
#define PCI_DEVICE_ID_INTEL_ICH7_22 0x27e0
#define PCI_DEVICE_ID_INTEL_ICH7_23 0x27e2
#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
...
...
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