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
e95a9ec1
Commit
e95a9ec1
authored
Feb 27, 2006
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
parents
6d6585e4
e4e10e3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
9 deletions
+43
-9
drivers/scsi/sata_sil.c
drivers/scsi/sata_sil.c
+43
-9
No files found.
drivers/scsi/sata_sil.c
View file @
e95a9ec1
...
...
@@ -49,11 +49,13 @@
#define DRV_VERSION "0.9"
enum
{
SIL_FLAG_RERR_ON_DMA_ACT
=
(
1
<<
29
),
SIL_FLAG_MOD15WRITE
=
(
1
<<
30
),
sil_3112
=
0
,
sil_3112_m15w
=
1
,
sil_3114
=
2
,
sil_3512
=
2
,
sil_3114
=
3
,
SIL_FIFO_R0
=
0x40
,
SIL_FIFO_W0
=
0x41
,
...
...
@@ -90,7 +92,7 @@ static void sil_post_set_mode (struct ata_port *ap);
static
const
struct
pci_device_id
sil_pci_tbl
[]
=
{
{
0x1095
,
0x3112
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3112_m15w
},
{
0x1095
,
0x0240
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3112_m15w
},
{
0x1095
,
0x3512
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3
1
12
},
{
0x1095
,
0x3512
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3
5
12
},
{
0x1095
,
0x3114
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3114
},
{
0x1002
,
0x436e
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3112_m15w
},
{
0x1002
,
0x4379
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
sil_3112_m15w
},
...
...
@@ -185,7 +187,8 @@ static const struct ata_port_info sil_port_info[] = {
.
mwdma_mask
=
0x07
,
/* mwdma0-2 */
.
udma_mask
=
0x3f
,
/* udma0-5 */
.
port_ops
=
&
sil_ops
,
},
/* sil_3112_15w - keep it sync'd w/ sil_3112 */
},
/* sil_3112_15w - keep it sync'd w/ sil_3112 */
{
.
sht
=
&
sil_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_NO_LEGACY
|
...
...
@@ -195,11 +198,24 @@ static const struct ata_port_info sil_port_info[] = {
.
mwdma_mask
=
0x07
,
/* mwdma0-2 */
.
udma_mask
=
0x3f
,
/* udma0-5 */
.
port_ops
=
&
sil_ops
,
},
/* sil_3114 */
},
/* sil_3512 */
{
.
sht
=
&
sil_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_NO_LEGACY
|
ATA_FLAG_SRST
|
ATA_FLAG_MMIO
,
ATA_FLAG_SRST
|
ATA_FLAG_MMIO
|
SIL_FLAG_RERR_ON_DMA_ACT
,
.
pio_mask
=
0x1f
,
/* pio0-4 */
.
mwdma_mask
=
0x07
,
/* mwdma0-2 */
.
udma_mask
=
0x3f
,
/* udma0-5 */
.
port_ops
=
&
sil_ops
,
},
/* sil_3114 */
{
.
sht
=
&
sil_sht
,
.
host_flags
=
ATA_FLAG_SATA
|
ATA_FLAG_NO_LEGACY
|
ATA_FLAG_SRST
|
ATA_FLAG_MMIO
|
SIL_FLAG_RERR_ON_DMA_ACT
,
.
pio_mask
=
0x1f
,
/* pio0-4 */
.
mwdma_mask
=
0x07
,
/* mwdma0-2 */
.
udma_mask
=
0x3f
,
/* udma0-5 */
...
...
@@ -216,12 +232,13 @@ static const struct {
unsigned
long
scr
;
/* SATA control register block */
unsigned
long
sien
;
/* SATA Interrupt Enable register */
unsigned
long
xfer_mode
;
/* data transfer mode register */
unsigned
long
sfis_cfg
;
/* SATA FIS reception config register */
}
sil_port
[]
=
{
/* port 0 ... */
{
0x80
,
0x8A
,
0x00
,
0x100
,
0x148
,
0xb4
},
{
0xC0
,
0xCA
,
0x08
,
0x180
,
0x1c8
,
0xf4
},
{
0x280
,
0x28A
,
0x200
,
0x300
,
0x348
,
0x2b4
},
{
0x2C0
,
0x2CA
,
0x208
,
0x380
,
0x3c8
,
0x2f4
},
{
0x80
,
0x8A
,
0x00
,
0x100
,
0x148
,
0xb4
,
0x14c
},
{
0xC0
,
0xCA
,
0x08
,
0x180
,
0x1c8
,
0xf4
,
0x1cc
},
{
0x280
,
0x28A
,
0x200
,
0x300
,
0x348
,
0x2b4
,
0x34c
},
{
0x2C0
,
0x2CA
,
0x208
,
0x380
,
0x3c8
,
0x2f4
,
0x3cc
},
/* ... port 3 */
};
...
...
@@ -471,6 +488,23 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
dev_printk
(
KERN_WARNING
,
&
pdev
->
dev
,
"cache line size not set. Driver may not function
\n
"
);
/* Apply R_ERR on DMA activate FIS errata workaround */
if
(
probe_ent
->
host_flags
&
SIL_FLAG_RERR_ON_DMA_ACT
)
{
int
cnt
;
for
(
i
=
0
,
cnt
=
0
;
i
<
probe_ent
->
n_ports
;
i
++
)
{
tmp
=
readl
(
mmio_base
+
sil_port
[
i
].
sfis_cfg
);
if
((
tmp
&
0x3
)
!=
0x01
)
continue
;
if
(
!
cnt
)
dev_printk
(
KERN_INFO
,
&
pdev
->
dev
,
"Applying R_ERR on DMA activate "
"FIS errata fix
\n
"
);
writel
(
tmp
&
~
0x3
,
mmio_base
+
sil_port
[
i
].
sfis_cfg
);
cnt
++
;
}
}
if
(
ent
->
driver_data
==
sil_3114
)
{
irq_mask
=
SIL_MASK_4PORT
;
...
...
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