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
0cbd0fa4
Commit
0cbd0fa4
authored
Oct 15, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: add endian markups to the ub driver.
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
4d0f012b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
drivers/block/ub.c
drivers/block/ub.c
+6
-6
No files found.
drivers/block/ub.c
View file @
0cbd0fa4
...
...
@@ -63,9 +63,9 @@
/* command block wrapper */
struct
bulk_cb_wrap
{
u
32
Signature
;
/* contains 'USBC' */
__le
32
Signature
;
/* contains 'USBC' */
u32
Tag
;
/* unique per command id */
u
32
DataTransferLength
;
/* size of data */
__le
32
DataTransferLength
;
/* size of data */
u8
Flags
;
/* direction in bit 0 */
u8
Lun
;
/* LUN normally 0 */
u8
Length
;
/* of of the CDB */
...
...
@@ -79,9 +79,9 @@ struct bulk_cb_wrap {
/* command status wrapper */
struct
bulk_cs_wrap
{
u
32
Signature
;
/* should = 'USBS' */
__le
32
Signature
;
/* should = 'USBS' */
u32
Tag
;
/* same as original command */
u
32
Residue
;
/* amount not transferred */
__le
32
Residue
;
/* amount not transferred */
u8
Status
;
/* see below */
};
...
...
@@ -1692,8 +1692,8 @@ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_capacity *ret)
}
/* sd.c special-cases sector size of 0 to mean 512. Needed? Safe? */
nsec
=
be32_to_cpu
(
*
(
u
32
*
)
p
)
+
1
;
bsize
=
be32_to_cpu
(
*
(
u
32
*
)(
p
+
4
));
nsec
=
be32_to_cpu
(
*
(
__be
32
*
)
p
)
+
1
;
bsize
=
be32_to_cpu
(
*
(
__be
32
*
)(
p
+
4
));
switch
(
bsize
)
{
case
512
:
shift
=
0
;
break
;
case
1024
:
shift
=
1
;
break
;
...
...
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