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
e8741923
Commit
e8741923
authored
Jul 07, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/spare/repo/libata-2.6
into pobox.com:/spare/repo/sata-hacks/qc-xfermode
parents
da13ce37
50035625
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+4
-2
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+5
-4
include/linux/libata.h
include/linux/libata.h
+0
-2
No files found.
drivers/scsi/libata-core.c
View file @
e8741923
...
...
@@ -1281,6 +1281,9 @@ static void ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev)
if
(
!
ata_dev_present
(
dev
)
||
(
ap
->
flags
&
ATA_FLAG_PORT_DISABLED
))
return
;
if
(
dev
->
xfer_shift
==
ATA_SHIFT_PIO
)
dev
->
flags
|=
ATA_DFLAG_PIO
;
ata_dev_set_xfermode
(
ap
,
dev
);
base
=
base_from_shift
(
dev
->
xfer_shift
);
...
...
@@ -2338,8 +2341,6 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
ata_tf_init
(
ap
,
&
qc
->
tf
,
dev
->
devno
);
if
(
likely
((
dev
->
flags
&
ATA_DFLAG_PIO
)
==
0
))
qc
->
flags
|=
ATA_QCFLAG_DMA
;
if
(
dev
->
flags
&
ATA_DFLAG_LBA48
)
qc
->
tf
.
flags
|=
ATA_TFLAG_LBA48
;
}
...
...
@@ -2483,6 +2484,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc)
break
;
case
ATA_PROT_ATAPI
:
ata_qc_set_polling
(
qc
);
ata_tf_to_host_nolock
(
ap
,
&
qc
->
tf
);
queue_work
(
ata_wq
,
&
ap
->
packet_task
);
break
;
...
...
drivers/scsi/libata-scsi.c
View file @
e8741923
...
...
@@ -979,6 +979,8 @@ void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8
static
unsigned
int
atapi_xlat
(
struct
ata_queued_cmd
*
qc
,
u8
*
scsicmd
)
{
struct
scsi_cmnd
*
cmd
=
qc
->
scsicmd
;
struct
ata_device
*
dev
=
qc
->
dev
;
int
using_pio
=
(
dev
->
flags
&
ATA_DFLAG_PIO
);
qc
->
tf
.
flags
|=
ATA_TFLAG_ISADDR
|
ATA_TFLAG_DEVICE
;
if
(
cmd
->
sc_data_direction
==
SCSI_DATA_WRITE
)
{
...
...
@@ -992,14 +994,13 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
if
(
cmd
->
sc_data_direction
==
SCSI_DATA_NONE
)
qc
->
tf
.
protocol
=
ATA_PROT_ATAPI
;
/* PIO data xfer - polling */
else
if
((
qc
->
flags
&
ATA_QCFLAG_DMA
)
==
0
)
{
ata_qc_set_polling
(
qc
);
/* PIO data xfer */
else
if
(
using_pio
)
{
qc
->
tf
.
protocol
=
ATA_PROT_ATAPI
;
qc
->
tf
.
lbam
=
(
8
*
1024
)
&
0xff
;
qc
->
tf
.
lbah
=
(
8
*
1024
)
>>
8
;
/* DMA data xfer
- interrupt-driven
*/
/* DMA data xfer */
}
else
{
qc
->
tf
.
protocol
=
ATA_PROT_ATAPI_DMA
;
qc
->
tf
.
feature
|=
ATAPI_PKT_DMA
;
...
...
include/linux/libata.h
View file @
e8741923
...
...
@@ -110,7 +110,6 @@ enum {
ATA_FLAG_SATA_RESET
=
(
1
<<
7
),
/* use COMRESET */
ATA_QCFLAG_ACTIVE
=
(
1
<<
1
),
/* cmd not yet ack'd to scsi lyer */
ATA_QCFLAG_DMA
=
(
1
<<
2
),
/* data delivered via DMA */
ATA_QCFLAG_SG
=
(
1
<<
3
),
/* have s/g table? */
ATA_QCFLAG_SINGLE
=
(
1
<<
4
),
/* no s/g, just a single buffer */
ATA_QCFLAG_DMAMAP
=
ATA_QCFLAG_SG
|
ATA_QCFLAG_SINGLE
,
...
...
@@ -481,7 +480,6 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
static
inline
void
ata_qc_set_polling
(
struct
ata_queued_cmd
*
qc
)
{
qc
->
flags
&=
~
ATA_QCFLAG_DMA
;
qc
->
tf
.
ctl
|=
ATA_NIEN
;
}
...
...
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