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
5a90fa71
Commit
5a90fa71
authored
Jul 29, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge head 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
parents
dddf8f9e
7b6dbd68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
drivers/scsi/ata_piix.c
drivers/scsi/ata_piix.c
+13
-6
No files found.
drivers/scsi/ata_piix.c
View file @
5a90fa71
...
@@ -38,6 +38,7 @@ enum {
...
@@ -38,6 +38,7 @@ enum {
PIIX_IOCFG
=
0x54
,
/* IDE I/O configuration register */
PIIX_IOCFG
=
0x54
,
/* IDE I/O configuration register */
ICH5_PMR
=
0x90
,
/* port mapping register */
ICH5_PMR
=
0x90
,
/* port mapping register */
ICH5_PCS
=
0x92
,
/* port control and status */
ICH5_PCS
=
0x92
,
/* port control and status */
PIIX_SCC
=
0x0A
,
/* sub-class code register */
PIIX_FLAG_AHCI
=
(
1
<<
28
),
/* AHCI possible */
PIIX_FLAG_AHCI
=
(
1
<<
28
),
/* AHCI possible */
PIIX_FLAG_CHECKINTR
=
(
1
<<
29
),
/* make sure PCI INTx enabled */
PIIX_FLAG_CHECKINTR
=
(
1
<<
29
),
/* make sure PCI INTx enabled */
...
@@ -62,6 +63,8 @@ enum {
...
@@ -62,6 +63,8 @@ enum {
ich6_sata_rm
=
4
,
ich6_sata_rm
=
4
,
ich7_sata
=
5
,
ich7_sata
=
5
,
esb2_sata
=
6
,
esb2_sata
=
6
,
PIIX_AHCI_DEVICE
=
6
,
};
};
static
int
piix_init_one
(
struct
pci_dev
*
pdev
,
static
int
piix_init_one
(
struct
pci_dev
*
pdev
,
...
@@ -574,11 +577,11 @@ static int piix_disable_ahci(struct pci_dev *pdev)
...
@@ -574,11 +577,11 @@ static int piix_disable_ahci(struct pci_dev *pdev)
addr
=
pci_resource_start
(
pdev
,
AHCI_PCI_BAR
);
addr
=
pci_resource_start
(
pdev
,
AHCI_PCI_BAR
);
if
(
!
addr
||
!
pci_resource_len
(
pdev
,
AHCI_PCI_BAR
))
if
(
!
addr
||
!
pci_resource_len
(
pdev
,
AHCI_PCI_BAR
))
return
0
;
return
0
;
mmio
=
ioremap
(
addr
,
64
);
mmio
=
ioremap
(
addr
,
64
);
if
(
!
mmio
)
if
(
!
mmio
)
return
-
ENOMEM
;
return
-
ENOMEM
;
tmp
=
readl
(
mmio
+
AHCI_GLOBAL_CTL
);
tmp
=
readl
(
mmio
+
AHCI_GLOBAL_CTL
);
if
(
tmp
&
AHCI_ENABLE
)
{
if
(
tmp
&
AHCI_ENABLE
)
{
tmp
&=
~
AHCI_ENABLE
;
tmp
&=
~
AHCI_ENABLE
;
...
@@ -588,7 +591,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
...
@@ -588,7 +591,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
if
(
tmp
&
AHCI_ENABLE
)
if
(
tmp
&
AHCI_ENABLE
)
rc
=
-
EIO
;
rc
=
-
EIO
;
}
}
iounmap
(
mmio
);
iounmap
(
mmio
);
return
rc
;
return
rc
;
}
}
...
@@ -626,9 +629,13 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -626,9 +629,13 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
port_info
[
1
]
=
NULL
;
port_info
[
1
]
=
NULL
;
if
(
port_info
[
0
]
->
host_flags
&
PIIX_FLAG_AHCI
)
{
if
(
port_info
[
0
]
->
host_flags
&
PIIX_FLAG_AHCI
)
{
int
rc
=
piix_disable_ahci
(
pdev
);
u8
tmp
;
if
(
rc
)
pci_read_config_byte
(
pdev
,
PIIX_SCC
,
&
tmp
);
return
rc
;
if
(
tmp
==
PIIX_AHCI_DEVICE
)
{
int
rc
=
piix_disable_ahci
(
pdev
);
if
(
rc
)
return
rc
;
}
}
}
if
(
port_info
[
0
]
->
host_flags
&
PIIX_FLAG_COMBINED
)
{
if
(
port_info
[
0
]
->
host_flags
&
PIIX_FLAG_COMBINED
)
{
...
...
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