summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_cis.c
Commit message (Collapse)AuthorAgeFilesLines
* mmc: sdio: fall back to SDIO 1.0 for broken 1.1 cardsWolfram Sang2016-05-161-1/+6
| | | | | | | | | | | I have two SDIO WLAN cards which specify being SDIO Rev. 1.1 cards but their FUNCE tuple reports the smaller size of a Rev 1.0 card. So, enforce 1.0 on these cards to avoid reading the not present registers. They are not really used anyhow. My cards initialize properly after this patch. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdio_cis: fix unknown tuple for CISTPL_SDIO_STDShawn Lin2016-01-201-0/+1
| | | | | | | | | | | | | | CISTPL_SDIO_STD(0x91) is a known tuple, but sdio_cis don't define it, so we get the warning below while probing several sdio wifi cards. Refer to SDIO spec, it's not needed to parse the tuple, so this patch make it a known one. [ 4.098980] mmc2: queuing unknown CIS tuple 0x91 (3 bytes) [ 4.099033] mmc2: new ultra high speed SDR104 SDIO card at address 0001 Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdio: Change pr_warning to pr_warn_ratelimitedLiu Chuansheng2012-07-221-1/+1
| | | | | | | | | | | When debugging one bad issue, got lots of pr_warning messages "queuing unknown CIS tuple" which caused a printk storm and flooded the console. This patch changes the pr_warning to use pr_warn_ratelimited. Signed-off-by: Liu Chuansheng <chuansheng.liu@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: replace printk with appropriate display macroGirish K S2011-10-261-2/+2
| | | | | | | | All the files using printk function for displaying kernel messages in the mmc driver have been replaced with corresponding macro. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* sdio: rework cis tuple parsingAlbert Herranz2009-12-151-74/+93
| | | | | | | | | | | | | | | | | | | | Rework the current CIS tuple parsing code, reusing the existing infrastructure and providing an easy way to add new CISTPL_FUNCE parsers by TPLFE_TYPE. Valid known CIS tuples are now silently queued for the SDIO function driver when not parsed/processed (-EILSEQ) by the SDIO core. Unknown CIS tuples (-ENOENT) are queued too for the SDIO function driver without aborting the initialization, but emit a warning in the kernel log. CISTPL_FUNCE tuples can be "whitelisted" now by adding a matching entry to the cis_tpl_funce_list table. Signed-off-by: Albert Herranz <albert_herranz@yahoo.es> Acked-by: Pierre Ossman <pierre@ossman.eu> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mmc: sdio: don't require CISTPL_VERS_1 to contain 4 stringsDavid Vrabel2009-10-081-4/+3
| | | | | | | | | | | | | | | The PC Card 8.0 specification (vol. 4, section 3.2.10) says the TPLLV1_INFO field of the CISTPL_VERS_1 tuple must contain 4 strings. Some cards don't have all 4 so just parse as many as we can. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Vrabel <david.vrabel@csr.com> Tested-by: Jonathan Cameron <jic23@cam.ac.uk> Tested-by: Bing Zhao <bzhao@marvell.com> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdio: pass whitelisted cis funce tuples to sdio driversAlbert Herranz2009-10-011-16/+49
| | | | | | | | | | | | | | | Some manufacturers provide vendor information in non-vendor specific CIS tuples. For example, Broadcom uses an Extended Function tuple to provide the MAC address on some of their network cards, as in the case of the Nintendo Wii WLAN daughter card. This patch allows passing whitelisted FUNCE tuples unknown to the SDIO core to a matching SDIO driver instead of rejecting them and failing. Signed-off-by: Albert Herranz <albert_herranz@yahoo.es> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdio: fix read buffer overflowRoel Kluin2009-09-231-1/+1
| | | | | | | | | | Avoid buffer underrun when parsing an invalid CISTPL_VERS_1. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: David Vrabel <david.vrabel@csr.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdio: handle null tuplesPierre Ossman2009-03-241-0/+4
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: handle cis end marker in link fieldPierre Ossman2009-03-241-0/+4
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: fix the use of hard coded timeout value.Benzi Zbit2008-07-151-0/+6
| | | | | | | | This adds reading and using of enable_timeout from the CIS Signed-off-by: Benzi Zbit <benzi.zbit@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: store vendor stringsPierre Ossman2007-09-231-1/+49
| | | | | | | Store vendor strings found in CISTPL_VERS_1 so that function drivers can access them. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: set the functions' block sizeDavid Vrabel2007-09-231-1/+1
| | | | | | | | | | | | | | | Before a driver is probed, set the function's block size to the default so the driver is sure the block size is something sensible and it needn't explicitly set it. The default block size is the largest that's supported by both the card and the host, with a maximum of 512 to ensure aribitrarily sized transfer use the optimal (least) number of commands. See http://lkml.org/lkml/2007/8/7/150 for reasons for the block size choice. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add SDIO_FBR_BASE(f) macroDavid Vrabel2007-09-231-1/+1
| | | | | Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: split up common and function CIS parsingPierre Ossman2007-09-231-22/+176
| | | | | | | | Add a more clean separation between global, common CIS information and the function specific one as we need the common information in places where no specific function is specified. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: link unknown CIS tuples to the sdio_func structureNicolas Pitre2007-09-231-29/+54
| | | | | | | | | This way those tuples that the core cares about are consumed by the core code, and tuples that only function drivers might make sense of are available to drivers. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: initial CIS parsing codeNicolas Pitre2007-09-231-0/+119
Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
OpenPOWER on IntegriCloud