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
8402aa96
Commit
8402aa96
authored
Oct 21, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata] Integrate Serial ATA driver into kernel tree.
parent
4effb658
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
136 additions
and
1 deletion
+136
-1
Documentation/DocBook/Makefile
Documentation/DocBook/Makefile
+1
-1
drivers/ide/pci/piix.c
drivers/ide/pci/piix.c
+2
-0
drivers/pci/quirks.c
drivers/pci/quirks.c
+62
-0
drivers/scsi/Kconfig
drivers/scsi/Kconfig
+52
-0
drivers/scsi/Makefile
drivers/scsi/Makefile
+6
-0
include/linux/ioport.h
include/linux/ioport.h
+1
-0
kernel/resource.c
kernel/resource.c
+12
-0
No files found.
Documentation/DocBook/Makefile
View file @
8402aa96
...
...
@@ -12,7 +12,7 @@ DOCBOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \
deviceiobook.sgml procfs-guide.sgml tulip-user.sgml
\
writing_usb_driver.sgml scsidrivers.sgml sis900.sgml
\
kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml
\
gadget.sgml
gadget.sgml
libata.sgml
###
# The build process is as follows (targets):
...
...
drivers/ide/pci/piix.c
View file @
8402aa96
...
...
@@ -797,7 +797,9 @@ static struct pci_device_id piix_pci_tbl[] = {
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801EB_11
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
15
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801E_11
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
16
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801DB_10
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
17
},
#ifndef CONFIG_SCSI_SATA
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801EB_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
18
},
#endif
/* !CONFIG_SCSI_SATA */
{
0
,
},
};
...
...
drivers/pci/quirks.c
View file @
8402aa96
...
...
@@ -748,6 +748,60 @@ static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
sis_96x_compatible
=
1
;
}
#ifdef CONFIG_SCSI_SATA
static
void
__init
quirk_intel_ide_combined
(
struct
pci_dev
*
pdev
)
{
u8
prog
,
comb
,
tmp
;
/*
* Narrow down to Intel SATA PCI devices.
*/
switch
(
pdev
->
device
)
{
/* PCI ids taken from drivers/scsi/ata_piix.c */
case
0x24d1
:
case
0x24df
:
case
0x25a3
:
case
0x25b0
:
break
;
default:
/* we do not handle this PCI device */
return
;
}
/*
* Read combined mode register.
*/
pci_read_config_byte
(
pdev
,
0x90
,
&
tmp
);
/* combined mode reg */
tmp
&=
0x6
;
/* interesting bits 2:1, PATA primary/secondary */
if
(
tmp
==
0x4
)
/* bits 10x */
comb
=
(
1
<<
0
);
/* SATA port 0, PATA port 1 */
else
if
(
tmp
==
0x6
)
/* bits 11x */
comb
=
(
1
<<
2
);
/* PATA port 0, SATA port 1 */
else
return
;
/* not in combined mode */
/*
* Read programming interface register.
* (Tells us if it's legacy or native mode)
*/
pci_read_config_byte
(
pdev
,
PCI_CLASS_PROG
,
&
prog
);
/* if SATA port is in native mode, we're ok. */
if
(
prog
&
comb
)
return
;
/* SATA port is in legacy mode. Reserve port so that
* IDE driver does not attempt to use it. If request_region
* fails, it will be obvious at boot time, so we don't bother
* checking return values.
*/
if
(
comb
==
(
1
<<
0
))
request_region
(
0x1f0
,
8
,
"libata"
);
/* port 0 */
else
request_region
(
0x170
,
8
,
"libata"
);
/* port 1 */
}
#endif
/* CONFIG_SCSI_SATA */
/*
* The main table of quirks.
*
...
...
@@ -851,6 +905,14 @@ static struct pci_fixup pci_fixups[] __devinitdata = {
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801DB_0
,
asus_hides_smbus_lpc
},
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801BA_0
,
asus_hides_smbus_lpc
},
#ifdef CONFIG_SCSI_SATA
/* Fixup BIOSes that configure Parallel ATA (PATA / IDE) and
* Serial ATA (SATA) into the same PCI ID.
*/
{
PCI_FIXUP_FINAL
,
PCI_VENDOR_ID_INTEL
,
PCI_ANY_ID
,
quirk_intel_ide_combined
},
#endif
/* CONFIG_SCSI_SATA */
{
0
}
};
...
...
drivers/scsi/Kconfig
View file @
8402aa96
...
...
@@ -403,6 +403,58 @@ config SCSI_MEGARAID
To compile this driver as a module, choose M here: the
module will be called megaraid.
config SCSI_SATA
bool "Serial ATA (SATA) support"
depends on SCSI && EXPERIMENTAL
help
This driver family supports Serial ATA host controllers
and devices.
If unsure, say N.
config SCSI_SATA_SVW
tristate "ServerWorks Frodo / Apple K2 SATA support (EXPERIMENTAL)"
depends on SCSI_SATA && PCI && EXPERIMENTAL
help
This option enables support for Broadcom/Serverworks/Apple K2
SATA support.
If unsure, say N.
config SCSI_ATA_PIIX
tristate "Intel PIIX/ICH SATA support"
depends on SCSI_SATA && PCI
help
This option enables support for ICH5 Serial ATA.
If PATA support was enabled previously, this enables
support for select Intel PIIX/ICH PATA host controllers.
If unsure, say N.
config SCSI_SATA_PROMISE
tristate "Promise SATA support"
depends on SCSI_SATA && PCI && EXPERIMENTAL
help
This option enables support for Promise Serial ATA.
If unsure, say N.
config SCSI_SATA_SIL
tristate "Silicon Image SATA support"
depends on SCSI_SATA && PCI && BROKEN
help
This option enables support for Silicon Image Serial ATA.
If unsure, say N.
config SCSI_SATA_VIA
tristate "VIA SATA support"
depends on SCSI_SATA && PCI && EXPERIMENTAL
help
This option enables support for VIA Serial ATA.
If unsure, say N.
config SCSI_BUSLOGIC
tristate "BusLogic SCSI support"
depends on (PCI || ISA) && SCSI
...
...
drivers/scsi/Makefile
View file @
8402aa96
...
...
@@ -112,6 +112,11 @@ obj-$(CONFIG_SCSI_FCAL) += fcal.o
obj-$(CONFIG_SCSI_CPQFCTS)
+=
cpqfc.o
obj-$(CONFIG_SCSI_LASI700)
+=
lasi700.o 53c700.o
obj-$(CONFIG_SCSI_NSP32)
+=
nsp32.o
obj-$(CONFIG_SCSI_SATA_SVW)
+=
libata.o sata_svw.o
obj-$(CONFIG_SCSI_ATA_PIIX)
+=
libata.o ata_piix.o
obj-$(CONFIG_SCSI_SATA_PROMISE)
+=
libata.o sata_promise.o
obj-$(CONFIG_SCSI_SATA_SIL)
+=
libata.o sata_sil.o
obj-$(CONFIG_SCSI_SATA_VIA)
+=
libata.o sata_via.o
obj-$(CONFIG_ARM)
+=
arm/
...
...
@@ -146,6 +151,7 @@ zalon7xx-objs := zalon.o ncr53c8xx.o
NCR_Q720_mod-objs
:=
NCR_Q720.o ncr53c8xx.o
cpqfc-objs
:=
cpqfcTSinit.o cpqfcTScontrol.o cpqfcTSi2c.o
\
cpqfcTSworker.o cpqfcTStrigger.o
libata-objs
:=
libata-core.o libata-scsi.o
# Files generated that shall be removed upon make clean
clean-files
:=
53c7xx_d.h 53c700_d.h
\
...
...
include/linux/ioport.h
View file @
8402aa96
...
...
@@ -89,6 +89,7 @@ extern struct resource iomem_resource;
extern
int
get_resource_list
(
struct
resource
*
,
char
*
buf
,
int
size
);
extern
int
request_resource
(
struct
resource
*
root
,
struct
resource
*
new
);
extern
struct
resource
*
____request_resource
(
struct
resource
*
root
,
struct
resource
*
new
);
extern
int
release_resource
(
struct
resource
*
new
);
extern
int
insert_resource
(
struct
resource
*
parent
,
struct
resource
*
new
);
extern
int
allocate_resource
(
struct
resource
*
root
,
struct
resource
*
new
,
...
...
kernel/resource.c
View file @
8402aa96
...
...
@@ -206,6 +206,18 @@ int request_resource(struct resource *root, struct resource *new)
EXPORT_SYMBOL
(
request_resource
);
struct
resource
*
____request_resource
(
struct
resource
*
root
,
struct
resource
*
new
)
{
struct
resource
*
conflict
;
write_lock
(
&
resource_lock
);
conflict
=
__request_resource
(
root
,
new
);
write_unlock
(
&
resource_lock
);
return
conflict
;
}
EXPORT_SYMBOL
(
____request_resource
);
int
release_resource
(
struct
resource
*
old
)
{
int
retval
;
...
...
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