Commit Graph

9 Commits (51fae6de24da57bc6cdaa1b253595c3513ecbf2d)

Author SHA1 Message Date
Linus Torvalds f9c5d0451b Merge master.kernel.org:/home/rmk/linux-2.6-mmc 2006-01-07 10:43:40 -08:00
Tejun Heo 8ffdc6550c [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()
add @uptodate argument to end_that_request_last() and @error
to rq_end_io_fn().  there's no generic way to pass error code
to request completion function, making generic error handling
of non-fs request difficult (rq->errors is driver-specific and
each driver uses it differently).  this patch adds @uptodate
to end_that_request_last() and @error to rq_end_io_fn().

for fs requests, this doesn't really matter, so just using the
same uptodate argument used in the last call to
end_that_request_first() should suffice.  imho, this can also
help the generic command-carrying request jens is working on.

Signed-off-by: tejun heo <htejun@gmail.com>
Signed-Off-By: Jens Axboe <axboe@suse.de>
2006-01-06 09:49:03 +01:00
Russell King a6f6c96b65 [MMC] Improve MMC card block size selection
Select a block size for IO based on the read and write block size
combinations, and whether the card supports partial block reads
and/or partial block writes.

If we are able to satisfy block reads but not block writes, mark
the device read only.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-03 22:38:44 +00:00
Russell King d2b1839425 [MMC] Set correct capacity for 1024-byte block cards
We were passing set_capacity() the capacity we calculated in terms of
the number of blocks on the card, which happened to be the right units
for 512-byte block cards.  However, with 1024-byte block cards, we
end up setting the capacity to half the number of blocks.  Fix this
by shifting by the appropriate amount.

Thanks to Todd Blumer for pointing this out.

Use get_capacity() to report the card capacity, rather than
recalculating it from the CSD information.

Finally, use our chosen IO block size for the SET_BLOCKLEN command
rather than the CSD read block size.  Currently these are equivalent,
but will not be in the future.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-22 23:21:38 +00:00
Russell King 34cf9e3750 [MMC] Response to write commands is R1 nor R1b
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-04 18:43:39 +00:00
Pierre Ossman 936d859265 [MMC] Use command class to determine read-only status
If a card doesn't support the "write block" command class then
any attempts to open the device should reflect this by denying
write access.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-30 10:15:58 +00:00
Pierre Ossman a00fc09029 [PATCH] sd: read-only switch
Support for the read-only switch on SD cards which must be enforced by the
host.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:50 -07:00
Pierre Ossman 912490db69 [PATCH] MMC: Proper MMC command classes support
Defines for the different command classes as defined in the MMC and SD
specifications.

Removes the check for high command classes and instead checks that the
command classes needed are present.
Previous solution killed forward compatibility at no apparent gain.

Signed-of-by: Pierre Ossman
2005-05-21 10:27:02 +01:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00