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
1c251ad4
Commit
1c251ad4
authored
Nov 30, 2003
by
Grant Grundler
Committed by
Jeff Garzik
Nov 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata] use sg_dma_xxx macros
Fixes build on some platforms, fixes issues on others.
parent
b6248157
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+7
-7
drivers/scsi/sata_promise.c
drivers/scsi/sata_promise.c
+2
-2
No files found.
drivers/scsi/libata-core.c
View file @
1c251ad4
...
...
@@ -1635,8 +1635,8 @@ static void ata_sg_clean(struct ata_queued_cmd *qc)
if
(
cmd
->
use_sg
)
pci_unmap_sg
(
ap
->
host_set
->
pdev
,
sg
,
qc
->
n_elem
,
dir
);
else
pci_unmap_single
(
ap
->
host_set
->
pdev
,
sg
[
0
].
dma_address
,
sg
[
0
].
length
,
dir
);
pci_unmap_single
(
ap
->
host_set
->
pdev
,
sg
_dma_address
(
&
sg
[
0
])
,
sg
_dma_len
(
&
sg
[
0
])
,
dir
);
qc
->
flags
&=
~
ATA_QCFLAG_SG
;
qc
->
sg
=
NULL
;
...
...
@@ -1659,8 +1659,8 @@ void ata_fill_sg(struct ata_queued_cmd *qc)
assert
(
qc
->
n_elem
>
0
);
for
(
i
=
0
;
i
<
qc
->
n_elem
;
i
++
)
{
ap
->
prd
[
i
].
addr
=
cpu_to_le32
(
sg
[
i
].
dma_address
);
ap
->
prd
[
i
].
flags_len
=
cpu_to_le32
(
sg
[
i
].
length
);
ap
->
prd
[
i
].
addr
=
cpu_to_le32
(
sg
_dma_address
(
&
sg
[
i
])
);
ap
->
prd
[
i
].
flags_len
=
cpu_to_le32
(
sg
_dma_len
(
&
sg
[
i
])
);
VPRINTK
(
"PRD[%u] = (0x%X, 0x%X)
\n
"
,
i
,
le32_to_cpu
(
ap
->
prd
[
i
].
addr
),
le32_to_cpu
(
ap
->
prd
[
i
].
flags_len
));
}
...
...
@@ -1691,12 +1691,12 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
sg
->
page
=
virt_to_page
(
cmd
->
request_buffer
);
sg
->
offset
=
(
unsigned
long
)
cmd
->
request_buffer
&
~
PAGE_MASK
;
sg
->
length
=
cmd
->
request_bufflen
;
sg
_dma_len
(
sg
)
=
cmd
->
request_bufflen
;
if
(
!
have_sg
)
return
0
;
sg
->
dma_address
=
pci_map_single
(
ap
->
host_set
->
pdev
,
sg
_dma_address
(
sg
)
=
pci_map_single
(
ap
->
host_set
->
pdev
,
cmd
->
request_buffer
,
cmd
->
request_bufflen
,
dir
);
...
...
@@ -1917,7 +1917,7 @@ static void ata_pio_sector(struct ata_port *ap)
qc
->
cursg_ofs
++
;
if
(
cmd
->
use_sg
)
if
((
qc
->
cursg_ofs
*
ATA_SECT_SIZE
)
==
sg
[
qc
->
cursg
].
length
)
{
if
((
qc
->
cursg_ofs
*
ATA_SECT_SIZE
)
==
sg
_dma_len
(
&
sg
[
qc
->
cursg
])
)
{
qc
->
cursg
++
;
qc
->
cursg_ofs
=
0
;
}
...
...
drivers/scsi/sata_promise.c
View file @
1c251ad4
...
...
@@ -616,8 +616,8 @@ static void pdc20621_fill_sg(struct ata_queued_cmd *qc)
last
=
qc
->
n_elem
;
idx
=
0
;
for
(
i
=
0
;
i
<
last
;
i
++
)
{
buf
[
idx
++
]
=
cpu_to_le32
(
sg
[
i
].
dma_address
);
buf
[
idx
++
]
=
cpu_to_le32
(
sg
[
i
].
length
);
buf
[
idx
++
]
=
cpu_to_le32
(
sg
_dma_address
(
&
sg
[
i
])
);
buf
[
idx
++
]
=
cpu_to_le32
(
sg
_dma_len
(
&
sg
[
i
])
);
total_len
+=
sg
[
i
].
length
;
}
buf
[
idx
-
1
]
|=
cpu_to_le32
(
ATA_PRD_EOT
);
...
...
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