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
1e1bb25e
Commit
1e1bb25e
authored
Oct 28, 2005
by
Tony Luck
Browse files
Options
Browse Files
Download
Plain Diff
Pull big-sim-disk into release branch
parents
c87ff943
b6a7e1ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
arch/ia64/hp/sim/simscsi.c
arch/ia64/hp/sim/simscsi.c
+8
-5
No files found.
arch/ia64/hp/sim/simscsi.c
View file @
1e1bb25e
...
...
@@ -205,10 +205,11 @@ simscsi_get_disk_size (int fd)
char
buf
[
512
];
/*
* This is a bit kludgey: the simulator doesn't provide a direct way of determining
* the disk size, so we do a binary search, assuming a maximum disk size of 4GB.
* This is a bit kludgey: the simulator doesn't provide a
* direct way of determining the disk size, so we do a binary
* search, assuming a maximum disk size of 128GB.
*/
for
(
bit
=
(
4
UL
<<
30
)
/
512
;
bit
!=
0
;
bit
>>=
1
)
{
for
(
bit
=
(
128
UL
<<
30
)
/
512
;
bit
!=
0
;
bit
>>=
1
)
{
req
.
addr
=
__pa
(
&
buf
);
req
.
len
=
sizeof
(
buf
);
ia64_ssc
(
fd
,
1
,
__pa
(
&
req
),
((
sectors
|
bit
)
-
1
)
*
512
,
SSC_READ
);
...
...
@@ -225,8 +226,10 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
{
unsigned
long
offset
;
offset
=
(
(
sc
->
cmnd
[
2
]
<<
24
)
|
(
sc
->
cmnd
[
3
]
<<
16
)
|
(
sc
->
cmnd
[
4
]
<<
8
)
|
(
sc
->
cmnd
[
5
]
<<
0
))
*
512
;
offset
=
(((
unsigned
long
)
sc
->
cmnd
[
2
]
<<
24
)
|
((
unsigned
long
)
sc
->
cmnd
[
3
]
<<
16
)
|
((
unsigned
long
)
sc
->
cmnd
[
4
]
<<
8
)
|
((
unsigned
long
)
sc
->
cmnd
[
5
]
<<
0
))
*
512UL
;
if
(
sc
->
use_sg
>
0
)
simscsi_sg_readwrite
(
sc
,
mode
,
offset
);
else
...
...
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