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
bc781aa9
Commit
bc781aa9
authored
Dec 29, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
parents
77f234f9
d2b18394
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
drivers/mmc/mmc_block.c
drivers/mmc/mmc_block.c
+9
-5
No files found.
drivers/mmc/mmc_block.c
View file @
bc781aa9
...
...
@@ -359,7 +359,12 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
md
->
block_bits
=
card
->
csd
.
read_blkbits
;
blk_queue_hardsect_size
(
md
->
queue
.
queue
,
1
<<
md
->
block_bits
);
set_capacity
(
md
->
disk
,
card
->
csd
.
capacity
);
/*
* The CSD capacity field is in units of read_blkbits.
* set_capacity takes units of 512 bytes.
*/
set_capacity
(
md
->
disk
,
card
->
csd
.
capacity
<<
(
card
->
csd
.
read_blkbits
-
9
));
}
out:
return
md
;
...
...
@@ -373,7 +378,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
mmc_card_claim_host
(
card
);
cmd
.
opcode
=
MMC_SET_BLOCKLEN
;
cmd
.
arg
=
1
<<
card
->
csd
.
read_blk
bits
;
cmd
.
arg
=
1
<<
md
->
block_
bits
;
cmd
.
flags
=
MMC_RSP_R1
;
err
=
mmc_wait_for_cmd
(
card
->
host
,
&
cmd
,
5
);
mmc_card_release_host
(
card
);
...
...
@@ -412,10 +417,9 @@ static int mmc_blk_probe(struct mmc_card *card)
if
(
err
)
goto
out
;
printk
(
KERN_INFO
"%s: %s %s %
d
KiB %s
\n
"
,
printk
(
KERN_INFO
"%s: %s %s %
lu
KiB %s
\n
"
,
md
->
disk
->
disk_name
,
mmc_card_id
(
card
),
mmc_card_name
(
card
),
(
card
->
csd
.
capacity
<<
card
->
csd
.
read_blkbits
)
/
1024
,
mmc_blk_readonly
(
card
)
?
"(ro)"
:
""
);
get_capacity
(
md
->
disk
)
>>
1
,
mmc_blk_readonly
(
card
)
?
"(ro)"
:
""
);
mmc_set_drvdata
(
card
,
md
);
add_disk
(
md
->
disk
);
...
...
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