Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
e494f633
Commit
e494f633
authored
Jun 27, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge 'upstream' branch of
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
parents
3bd19078
0c144d0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+11
-5
No files found.
drivers/scsi/libata-scsi.c
View file @
e494f633
...
@@ -1176,8 +1176,12 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf,
...
@@ -1176,8 +1176,12 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf,
n_sectors
=
ata_id_u32
(
args
->
id
,
60
);
n_sectors
=
ata_id_u32
(
args
->
id
,
60
);
n_sectors
--
;
/* ATA TotalUserSectors - 1 */
n_sectors
--
;
/* ATA TotalUserSectors - 1 */
tmp
=
n_sectors
;
/* note: truncates, if lba48 */
if
(
args
->
cmd
->
cmnd
[
0
]
==
READ_CAPACITY
)
{
if
(
args
->
cmd
->
cmnd
[
0
]
==
READ_CAPACITY
)
{
if
(
n_sectors
>=
0xffffffffULL
)
tmp
=
0xffffffff
;
/* Return max count on overflow */
else
tmp
=
n_sectors
;
/* sector count, 32-bit */
/* sector count, 32-bit */
rbuf
[
0
]
=
tmp
>>
(
8
*
3
);
rbuf
[
0
]
=
tmp
>>
(
8
*
3
);
rbuf
[
1
]
=
tmp
>>
(
8
*
2
);
rbuf
[
1
]
=
tmp
>>
(
8
*
2
);
...
@@ -1191,10 +1195,12 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf,
...
@@ -1191,10 +1195,12 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf,
}
else
{
}
else
{
/* sector count, 64-bit */
/* sector count, 64-bit */
rbuf
[
2
]
=
n_sectors
>>
(
8
*
7
);
tmp
=
n_sectors
>>
(
8
*
4
);
rbuf
[
3
]
=
n_sectors
>>
(
8
*
6
);
rbuf
[
2
]
=
tmp
>>
(
8
*
3
);
rbuf
[
4
]
=
n_sectors
>>
(
8
*
5
);
rbuf
[
3
]
=
tmp
>>
(
8
*
2
);
rbuf
[
5
]
=
n_sectors
>>
(
8
*
4
);
rbuf
[
4
]
=
tmp
>>
(
8
*
1
);
rbuf
[
5
]
=
tmp
;
tmp
=
n_sectors
;
rbuf
[
6
]
=
tmp
>>
(
8
*
3
);
rbuf
[
6
]
=
tmp
>>
(
8
*
3
);
rbuf
[
7
]
=
tmp
>>
(
8
*
2
);
rbuf
[
7
]
=
tmp
>>
(
8
*
2
);
rbuf
[
8
]
=
tmp
>>
(
8
*
1
);
rbuf
[
8
]
=
tmp
>>
(
8
*
1
);
...
...
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