- 22 May, 2009 1 commit
-
-
Martin K. Petersen authored
Until now we have had a 1:1 mapping between storage device physical block size and the logical block sized used when addressing the device. With SATA 4KB drives coming out that will no longer be the case. The sector size will be 4KB but the logical block size will remain 512-bytes. Hence we need to distinguish between the physical block size and the logical ditto. This patch renames hardsect_size to logical_block_size. Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 11 May, 2009 1 commit
-
-
Tejun Heo authored
With recent cleanups, there is no place where low level driver directly manipulates request fields. This means that the 'hard' request fields always equal the !hard fields. Convert all rq->sectors, nr_sectors and current_nr_sectors references to accessors. While at it, drop superflous blk_rq_pos() < 0 test in swim.c. [ Impact: use pos and nr_sectors accessors ] Signed-off-by:
Tejun Heo <tj@kernel.org> Acked-by:
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Tested-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Grant Likely <grant.likely@secretlab.ca> Tested-by:
Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by:
Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by:
Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Dario Ballabio <ballabio_dario@emc.com> Cc: David S. Miller <davem@davemloft.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: unsik Kim <donari75@gmail.com> Cc: Laurent Vivier <Laurent@lvivier.info> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 03 May, 2009 1 commit
-
-
Pierre Ossman authored
The block layer does not support very low sector count restrictions so we need to be prepared to handle bigger requests than we can send directly to the controller. Problem found by Manuel Lauss. Signed-off-by:
Pierre Ossman <pierre@ossman.eu>
-
- 24 Mar, 2009 1 commit
-
-
Andy Whitcroft authored
Currently we are using an explicit udev rule to trigger loading of the mmc-block module when an MMC or SD card is detected: SUBSYSTEM=="mmc", RUN+="/sbin/modprobe -Qba mmc-block" It makes much more sense for the mmc bus driver and the mmc-block module to share MODALIAS information so that they are linked automatically. There is no real information of use in the MMC system at the current time. All devices inserted require us to load the mmc-block device. Until such time as useful parameters exist simply reflect the module linkage via the module alias below: mmc:block Signed-off-by:
Andy Whitcroft <apw@canonical.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 17 Feb, 2009 1 commit
-
-
Yi Li authored
Signed-off-by:
Yi Li <yi.li@analog.com> Signed-off-by:
Bryan Wu <cooloney@kernel.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 31 Dec, 2008 3 commits
-
-
Adrian Hunter authored
If a card encounters an ECC error while reading a sector it will timeout. Instead of reporting the entire I/O request as having an error, redo the I/O one sector at a time so that all readable sectors are provided to the upper layers. Signed-off-by:
Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Adrian Hunter authored
Add command response and card status to error messages. Signed-off-by:
Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Harvey Harrison authored
sg_init_one is reading a be32, annotate as such. Signed-off-by:
Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 21 Oct, 2008 2 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
To keep the size of changesets sane we split the switch by drivers; to keep the damn thing bisectable we do the following: 1) rename the affected methods, add ones with correct prototypes, make (few) callers handle both. That's this changeset. 2) for each driver convert to new methods. *ALL* drivers are converted in this series. 3) kill the old (renamed) methods. Note that it _is_ a flagday; all in-tree drivers are converted and by the end of this series no trace of old methods remain. The only reason why we do that this way is to keep the damn thing bisectable and allow per-driver debugging if anything goes wrong. New methods: open(bdev, mode) release(disk, mode) ioctl(bdev, mode, cmd, arg) /* Called without BKL */ compat_ioctl(bdev, mode, cmd, arg) locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */ Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 12 Oct, 2008 2 commits
-
-
Pierre Ossman authored
We use 512 byte blocks on all cards, and newer cards support nothing else, so hard code it and make the code less complex. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Make sure we consider the maximum block count when we tell the block layer about the maximum sector count. That way we don't have to chop up the request ourselves. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 09 Oct, 2008 1 commit
-
-
Tejun Heo authored
* Implement disk_devt() and part_devt() and use them to directly access devt instead of computing it from ->major and ->first_minor. Note that all references to ->major and ->first_minor outside of block layer is used to determine devt of the disk (the part0) and as ->major and ->first_minor will continue to represent devt for the disk, converting these users aren't strictly necessary. However, convert them for consistency. * Implement disk_max_parts() to avoid directly deferencing genhd->minors. * Update bdget_disk() such that it doesn't assume consecutive minor space. * Move devt computation from register_disk() to add_disk() and make it the only one (all other usages use the initially determined value). These changes clean up the code and will help disk->part dereference fix and extended block device numbers. Signed-off-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 03 Oct, 2008 1 commit
-
-
Pierre Ossman authored
Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx> Signed-off-by:
James Bottomley <James.Bottomley@HansenPartnership.com>
-
- 20 Sep, 2008 1 commit
-
-
Akinobu Mita authored
Check error from mmc_register_driver() and properly unwind block device registration. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 05 Sep, 2008 1 commit
-
-
Andrew Morton authored
mmc_block_open() increments md->usage although it returns with -EROFS when default mounting a MMC/SD card with write protect switch on. This reference counting bug prevents /dev/mmcblkX from being released on card removal, and situation worsen with reinsertion until the minor number range runs out. Reported-by: <sasin@solomon-systech.com> Acked-by:
Pierre Ossman <drzeus-list@drzeus.cx> Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x] Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 01 Aug, 2008 1 commit
-
-
Pierre Ossman authored
Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 15 Jul, 2008 2 commits
-
-
Pierre Ossman authored
Relax requirements on host controllers and only require that they do not report a transfer count than is larger than the actual one (i.e. a lower value is okay). This is how many other parts of the kernel behaves so upper layers should already be prepared to handle that scenario. This gives us a performance boost on MMC cards. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Many failures are non-permanent, but the card might need some time to finish what it is doing before becoming responsive again. Make sure we wait for it to finish programming before dealing with the error. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 05 Jun, 2008 1 commit
-
-
Ben Collins authored
Fairly simple. "dev_use" was being allocated as a zero length array because of bad math on 64-bit systems, causing a crash in find_first_zero_bit(). One-liner follows: Signed-off-by:
Ben Collins <ben.collins@canonical.com> Acked-by:
Pierre Ossman <drzeus@drzeus.cx> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 28 Jan, 2008 1 commit
-
-
Kiyoshi Ueda authored
This patch converts mmc to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. Cc: Pierre Ossman <drzeus-mmc@drzeus.cx> Signed-off-by:
Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by:
Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 21 Nov, 2007 2 commits
-
-
David Woodhouse authored
Move the code which marks the minor number as free to mmc_blk_put() so that it happens on the final close() (or removal), instead of doing it at removal even when the device is still logically open. Signed-off-by:
David Woodhouse <dwmw2@infradead.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Some cards have been reported to signal that they're ready prematurely. Checking both the busy bit and card state solves the issue. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 23 Sep, 2007 4 commits
-
-
David Brownell authored
Teaching the MMC/SD block card driver about SPI. - Provide the SPI response type flags with each request issued. - Understand that multiblock SPI writes don't use STOP_TRANSMISSION. - Correct check for APP_CMD failure. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
The MMC_DATA_MULTI flag never had a proper definition of what it means, so remove it and let the drivers check the block count in the request. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
The write parameter in mmc_set_data_timeout() is redundant as the data structure contains information about the direction of the transfer. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 19 Jul, 2007 1 commit
-
-
Yoann Padioleau authored
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) [akpm@linux-foundation.org: get kcalloc args the right way around] Signed-off-by:
Yoann Padioleau <padator@wanadoo.fr> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by:
Russell King <rmk@arm.linux.org.uk> Cc: Bryan Wu <bryan.wu@analog.com> Acked-by:
Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Acked-by:
Roland Dreier <rolandd@cisco.com> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by:
Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by:
Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by:
Pierre Ossman <drzeus-list@drzeus.cx> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Acked-by:
Greg KH <greg@kroah.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 09 Jul, 2007 1 commit
-
-
Pierre Ossman authored
Some hosts cannot do scatter/gather in hardware. Since not doing sg is such a big performance hit, we (optionally) bounce the requests to a simple linear buffer that we hand over to the driver. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 23 May, 2007 1 commit
-
-
Pierre Ossman authored
Remove dead code and unused structs from the block driver. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 14 May, 2007 1 commit
-
-
Pierre Ossman authored
The MMC block devices now have an assigned major. Make sure we actually use it. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 01 May, 2007 6 commits
-
-
Pierre Ossman authored
Move protocol operations and definitions into their own files in an effort to separate protocol handling and bus arbitration more clearly. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
The classic MMC bus was defined as multi card bus system, which is reflected in the design in the MMC layer. When SD showed up, the bus topology was abandoned and a star topology (one card per host) was mandated. MMC version 4 has followed this, officially deprecating the bus topology. As we do not have any known users of the bus topology we can remove support for it. This will simplify the code and rectify some incorrect assumptions in the newer additions. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Clean up the drivers/mmc directory by moving card and host drivers into subdirectories. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
The mmc block queue functions are tailored for the mmc_block driver, so move those functions into that module. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Support for MMC 4.2 sector based cards. This tweaks the init a bit and reads a new field out of the EXT_CSD. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Alex Dubov authored
mmc layer may introduce additional (compared to block layer) limits on request size. Culling of the sg list to match adjusted request size simplifies the handling of such cases in the low level driver, allowing it to skip block count checks while processing sg entries. (fixes for wbsd and sdhci by Pierre Ossman) Signed-off-by:
Alex Dubov <oakad@yahoo.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 14 Feb, 2007 1 commit
-
-
Tim Schmielau authored
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by:
Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by:
Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 04 Feb, 2007 2 commits
-
-
Pierre Ossman authored
Make sure we release the claim on the host even on failure. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Many controllers have an upper limit on the number of blocks that can be transferred in one request. Allow the host drivers to specify this and make sure we avoid hitting this limit. Also change the max_sectors field to avoid confusion. This makes it map less directly to the block layer limits, but as they didn't apply directly on MMC cards anyway, this isn't a great loss. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-