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
a0ea7328
Commit
a0ea7328
authored
Jun 04, 2005
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata] ahci: finish ATAPI support (hopefully)
parent
70c85233
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
drivers/scsi/ahci.c
drivers/scsi/ahci.c
+8
-12
No files found.
drivers/scsi/ahci.c
View file @
a0ea7328
...
...
@@ -50,6 +50,7 @@ enum {
AHCI_CMD_SLOT_SZ
=
32
*
32
,
AHCI_RX_FIS_SZ
=
256
,
AHCI_CMD_TBL_HDR
=
0x80
,
AHCI_CMD_TBL_CDB
=
0x40
,
AHCI_CMD_TBL_SZ
=
AHCI_CMD_TBL_HDR
+
(
AHCI_MAX_SG
*
16
),
AHCI_PORT_PRIV_DMA_SZ
=
AHCI_CMD_SLOT_SZ
+
AHCI_CMD_TBL_SZ
+
AHCI_RX_FIS_SZ
,
...
...
@@ -510,7 +511,8 @@ static void ahci_fill_sg(struct ata_queued_cmd *qc)
static
void
ahci_qc_prep
(
struct
ata_queued_cmd
*
qc
)
{
struct
ahci_port_priv
*
pp
=
qc
->
ap
->
private_data
;
struct
ata_port
*
ap
=
qc
->
ap
;
struct
ahci_port_priv
*
pp
=
ap
->
private_data
;
u32
opts
;
const
u32
cmd_fis_len
=
5
;
/* five dwords */
...
...
@@ -522,18 +524,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
opts
=
(
qc
->
n_elem
<<
16
)
|
cmd_fis_len
;
if
(
qc
->
tf
.
flags
&
ATA_TFLAG_WRITE
)
opts
|=
AHCI_CMD_WRITE
;
switch
(
qc
->
tf
.
protocol
)
{
case
ATA_PROT_ATAPI
:
case
ATA_PROT_ATAPI_NODATA
:
case
ATA_PROT_ATAPI_DMA
:
if
(
is_atapi_taskfile
(
&
qc
->
tf
))
opts
|=
AHCI_CMD_ATAPI
;
break
;
default:
/* do nothing */
break
;
}
pp
->
cmd_slot
[
0
].
opts
=
cpu_to_le32
(
opts
);
pp
->
cmd_slot
[
0
].
status
=
0
;
...
...
@@ -545,6 +537,10 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
* a SATA Register - Host to Device command FIS.
*/
ata_tf_to_fis
(
&
qc
->
tf
,
pp
->
cmd_tbl
,
0
);
if
(
opts
&
AHCI_CMD_ATAPI
)
{
memset
(
pp
->
cmd_tbl
+
AHCI_CMD_TBL_CDB
,
0
,
32
);
memcpy
(
pp
->
cmd_tbl
+
AHCI_CMD_TBL_CDB
,
qc
->
cdb
,
ap
->
cdb_len
);
}
if
(
!
(
qc
->
flags
&
ATA_QCFLAG_DMAMAP
))
return
;
...
...
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