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
3c79402a
Commit
3c79402a
authored
Nov 24, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://gkernel.bkbits.net/libata-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
parents
be595d15
d2665005
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
14 deletions
+40
-14
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+13
-4
drivers/scsi/libata.h
drivers/scsi/libata.h
+1
-1
drivers/scsi/sata_promise.c
drivers/scsi/sata_promise.c
+2
-0
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+22
-8
include/linux/libata.h
include/linux/libata.h
+2
-1
No files found.
drivers/scsi/libata-core.c
View file @
3c79402a
...
@@ -133,7 +133,11 @@ void ata_tf_load_pio(struct ata_port *ap, struct ata_taskfile *tf)
...
@@ -133,7 +133,11 @@ void ata_tf_load_pio(struct ata_port *ap, struct ata_taskfile *tf)
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
unsigned
int
is_addr
=
tf
->
flags
&
ATA_TFLAG_ISADDR
;
unsigned
int
is_addr
=
tf
->
flags
&
ATA_TFLAG_ISADDR
;
outb
(
tf
->
ctl
,
ioaddr
->
ctl_addr
);
if
(
tf
->
ctl
!=
ap
->
last_ctl
)
{
outb
(
tf
->
ctl
,
ioaddr
->
ctl_addr
);
ap
->
last_ctl
=
tf
->
ctl
;
ata_wait_idle
(
ap
);
}
if
(
is_addr
&&
(
tf
->
flags
&
ATA_TFLAG_LBA48
))
{
if
(
is_addr
&&
(
tf
->
flags
&
ATA_TFLAG_LBA48
))
{
outb
(
tf
->
hob_feature
,
ioaddr
->
error_addr
);
outb
(
tf
->
hob_feature
,
ioaddr
->
error_addr
);
...
@@ -187,7 +191,11 @@ void ata_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
...
@@ -187,7 +191,11 @@ void ata_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf)
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
unsigned
int
is_addr
=
tf
->
flags
&
ATA_TFLAG_ISADDR
;
unsigned
int
is_addr
=
tf
->
flags
&
ATA_TFLAG_ISADDR
;
writeb
(
tf
->
ctl
,
ap
->
ioaddr
.
ctl_addr
);
if
(
tf
->
ctl
!=
ap
->
last_ctl
)
{
writeb
(
tf
->
ctl
,
ap
->
ioaddr
.
ctl_addr
);
ap
->
last_ctl
=
tf
->
ctl
;
ata_wait_idle
(
ap
);
}
if
(
is_addr
&&
(
tf
->
flags
&
ATA_TFLAG_LBA48
))
{
if
(
is_addr
&&
(
tf
->
flags
&
ATA_TFLAG_LBA48
))
{
writeb
(
tf
->
hob_feature
,
(
void
*
)
ioaddr
->
error_addr
);
writeb
(
tf
->
hob_feature
,
(
void
*
)
ioaddr
->
error_addr
);
...
@@ -1281,9 +1289,9 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
...
@@ -1281,9 +1289,9 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
/* software reset. causes dev0 to be selected */
/* software reset. causes dev0 to be selected */
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
{
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
{
writeb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
writeb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
udelay
(
1
0
);
/* FIXME: flush */
udelay
(
2
0
);
/* FIXME: flush */
writeb
(
ap
->
ctl
|
ATA_SRST
,
ioaddr
->
ctl_addr
);
writeb
(
ap
->
ctl
|
ATA_SRST
,
ioaddr
->
ctl_addr
);
udelay
(
1
0
);
/* FIXME: flush */
udelay
(
2
0
);
/* FIXME: flush */
writeb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
writeb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
}
else
{
}
else
{
outb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
outb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
...
@@ -2755,6 +2763,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
...
@@ -2755,6 +2763,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
ap
->
cbl
=
ATA_CBL_NONE
;
ap
->
cbl
=
ATA_CBL_NONE
;
ap
->
device
[
0
].
flags
=
ATA_DFLAG_MASTER
;
ap
->
device
[
0
].
flags
=
ATA_DFLAG_MASTER
;
ap
->
active_tag
=
ATA_TAG_POISON
;
ap
->
active_tag
=
ATA_TAG_POISON
;
ap
->
last_ctl
=
0xFF
;
/* ata_engine init */
/* ata_engine init */
ap
->
eng
.
flags
=
0
;
ap
->
eng
.
flags
=
0
;
...
...
drivers/scsi/libata.h
View file @
3c79402a
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#define __LIBATA_H__
#define __LIBATA_H__
#define DRV_NAME "libata"
#define DRV_NAME "libata"
#define DRV_VERSION "0.8
0
"
/* must be exactly four chars */
#define DRV_VERSION "0.8
1
"
/* must be exactly four chars */
struct
ata_scsi_args
{
struct
ata_scsi_args
{
struct
ata_port
*
ap
;
struct
ata_port
*
ap
;
...
...
drivers/scsi/sata_promise.c
View file @
3c79402a
...
@@ -213,6 +213,8 @@ static struct pci_device_id pdc_sata_pci_tbl[] = {
...
@@ -213,6 +213,8 @@ static struct pci_device_id pdc_sata_pci_tbl[] = {
board_2037x
},
board_2037x
},
{
PCI_VENDOR_ID_PROMISE
,
0x3375
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
{
PCI_VENDOR_ID_PROMISE
,
0x3375
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_2037x
},
board_2037x
},
{
PCI_VENDOR_ID_PROMISE
,
0x3376
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_2037x
},
{
PCI_VENDOR_ID_PROMISE
,
0x3318
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
{
PCI_VENDOR_ID_PROMISE
,
0x3318
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
board_20319
},
board_20319
},
{
PCI_VENDOR_ID_PROMISE
,
0x3319
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
{
PCI_VENDOR_ID_PROMISE
,
0x3319
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
...
...
drivers/scsi/sata_svw.c
View file @
3c79402a
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
#endif
/* CONFIG_ALL_PPC */
#endif
/* CONFIG_ALL_PPC */
#define DRV_NAME "ata_k2"
#define DRV_NAME "ata_k2"
#define DRV_VERSION "1.0
2
"
#define DRV_VERSION "1.0
3
"
static
u32
k2_sata_scr_read
(
struct
ata_port
*
ap
,
unsigned
int
sc_reg
)
static
u32
k2_sata_scr_read
(
struct
ata_port
*
ap
,
unsigned
int
sc_reg
)
...
@@ -69,8 +69,11 @@ static void k2_sata_tf_load(struct ata_port *ap, struct ata_taskfile *tf)
...
@@ -69,8 +69,11 @@ static void k2_sata_tf_load(struct ata_port *ap, struct ata_taskfile *tf)
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
unsigned
int
is_addr
=
tf
->
flags
&
ATA_TFLAG_ISADDR
;
unsigned
int
is_addr
=
tf
->
flags
&
ATA_TFLAG_ISADDR
;
writeb
(
tf
->
ctl
,
ioaddr
->
ctl_addr
);
if
(
tf
->
ctl
!=
ap
->
last_ctl
)
{
writeb
(
tf
->
ctl
,
ioaddr
->
ctl_addr
);
ap
->
last_ctl
=
tf
->
ctl
;
ata_wait_idle
(
ap
);
}
if
(
is_addr
&&
(
tf
->
flags
&
ATA_TFLAG_LBA48
))
{
if
(
is_addr
&&
(
tf
->
flags
&
ATA_TFLAG_LBA48
))
{
writew
(
tf
->
feature
|
(((
u16
)
tf
->
hob_feature
)
<<
8
),
ioaddr
->
error_addr
);
writew
(
tf
->
feature
|
(((
u16
)
tf
->
hob_feature
)
<<
8
),
ioaddr
->
error_addr
);
writew
(
tf
->
nsect
|
(((
u16
)
tf
->
hob_nsect
)
<<
8
),
ioaddr
->
nsect_addr
);
writew
(
tf
->
nsect
|
(((
u16
)
tf
->
hob_nsect
)
<<
8
),
ioaddr
->
nsect_addr
);
...
@@ -311,13 +314,24 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
...
@@ -311,13 +314,24 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
rc
=
-
ENODEV
;
rc
=
-
ENODEV
;
goto
err_out_unmap
;
goto
err_out_unmap
;
}
}
/* Clear a magic bit in SCR1 according to Darwin, those help
* some funky seagate drives (though so far, those were already
* set by the firmware on the machines I had access to
*/
writel
(
readl
(
mmio_base
+
0x80
)
&
~
0x00040000
,
mmio_base
+
0x80
);
/* Clear SATA error & interrupts we don't use */
writel
(
0xffffffff
,
mmio_base
+
0x44
);
writel
(
0x0
,
mmio_base
+
0x88
);
probe_ent
->
sht
=
&
k2_sata_sht
;
probe_ent
->
sht
=
&
k2_sata_sht
;
probe_ent
->
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_
NO_LEGACY
|
probe_ent
->
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_
SATA_RESET
|
ATA_FLAG_
SRST
|
ATA_FLAG_MMIO
;
ATA_FLAG_
NO_LEGACY
|
ATA_FLAG_MMIO
;
probe_ent
->
port_ops
=
&
k2_sata_ops
;
probe_ent
->
port_ops
=
&
k2_sata_ops
;
probe_ent
->
n_ports
=
2
;
probe_ent
->
n_ports
=
2
;
probe_ent
->
irq
=
pdev
->
irq
;
probe_ent
->
irq
=
pdev
->
irq
;
probe_ent
->
irq_flags
=
SA_SHIRQ
;
probe_ent
->
irq_flags
=
SA_SHIRQ
;
probe_ent
->
mmio_base
=
mmio_base
;
probe_ent
->
mmio_base
=
mmio_base
;
/*
/*
...
...
include/linux/libata.h
View file @
3c79402a
...
@@ -310,6 +310,7 @@ struct ata_port {
...
@@ -310,6 +310,7 @@ struct ata_port {
struct
ata_ioports
ioaddr
;
/* ATA cmd/ctl/dma register blocks */
struct
ata_ioports
ioaddr
;
/* ATA cmd/ctl/dma register blocks */
u8
ctl
;
/* cache of ATA control register */
u8
ctl
;
/* cache of ATA control register */
u8
last_ctl
;
/* Cache last written value */
unsigned
int
bus_state
;
unsigned
int
bus_state
;
unsigned
int
port_state
;
unsigned
int
port_state
;
unsigned
int
pio_mask
;
unsigned
int
pio_mask
;
...
@@ -522,12 +523,12 @@ static inline u8 ata_irq_on(struct ata_port *ap)
...
@@ -522,12 +523,12 @@ static inline u8 ata_irq_on(struct ata_port *ap)
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
ap
->
ctl
&=
~
ATA_NIEN
;
ap
->
ctl
&=
~
ATA_NIEN
;
ap
->
last_ctl
=
ap
->
ctl
;
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
if
(
ap
->
flags
&
ATA_FLAG_MMIO
)
writeb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
writeb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
else
else
outb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
outb
(
ap
->
ctl
,
ioaddr
->
ctl_addr
);
return
ata_wait_idle
(
ap
);
return
ata_wait_idle
(
ap
);
}
}
...
...
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