17 Oct, 2016
2 commits
-
Accesses to the rtsx usb device, which is the parent of the rtsx memstick
device, must not be done unless it's runtime resumed. This is currently not
the case and it could trigger various errors.Fix this by properly deal with runtime PM in this regards. This means
making sure the device is runtime resumed, when serving requests via the
->request() callback or changing settings via the ->set_param() callbacks.Cc:
Cc: Ritesh Raj Sarraf
Cc: Alan Stern
Signed-off-by: Ulf Hansson -
Accesses to the rtsx usb device, which is the parent of the rtsx memstick
device, must not be done unless it's runtime resumed.Therefore when the rtsx_usb_ms driver polls for inserted memstick cards,
let's add pm_runtime_get|put*() to make sure accesses is done when the
rtsx usb device is runtime resumed.Reported-by: Ritesh Raj Sarraf
Tested-by: Ritesh Raj Sarraf
Signed-off-by: Alan Stern
Cc:
Signed-off-by: Ulf Hansson
24 May, 2016
1 commit
-
First version of this patch has already been posted to LKML by Ben
Hutchings ~6 months ago, but no further action were performed.Ben's original message:
: rtsx_usb_ms creates a task that mostly sleeps, but tasks in
: uninterruptible sleep still contribute to the load average (for
: bug-compatibility with Unix). A load average of ~1 on a system that
: should be idle is somewhat alarming.
:
: Change the sleep to be interruptible, but still ignore signals.References: https://bugs.debian.org/765717
Link: http://lkml.kernel.org/r/b49f95ae83057efa5d96f532803cba47@natalenko.name
Signed-off-by: Oleksandr Natalenko
Cc: Oleg Nesterov
Cc: Ben Hutchings
Cc: Lee Jones
Cc: Wolfram Sang
Cc: Roger Tseng
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Mar, 2016
1 commit
-
The r592 driver relies on behavior of the DMA mapping API that is
normally observed but not guaranteed by the API. Instead it uses a
runtime check to fail transfers if the API ever behavesWhen CONFIG_NEED_SG_DMA_LENGTH is not set, one of the checks turns into a
comparison of a variable with itself, which gcc-6.0 now warns about:drivers/memstick/host/r592.c: In function 'r592_transfer_fifo_dma':
drivers/memstick/host/r592.c:302:31: error: self-comparison always evaluates to false [-Werror=tautological-compare]
(sg_dma_len(&dev->req->sg) < dev->req->sg.length)) {
^The check itself is not a problem, so this patch just rephrases the
condition in a way that gcc does not consider an indication of a mistake.
We already know that dev->req->sg.length was initially R592_LFIFO_SIZE, so
we can compare it to that constant again.Signed-off-by: Arnd Bergmann
Cc: Maxim Levitsky
Cc: Quentin Lambert
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2015
1 commit
-
Replace occurences of the pci api by appropriate call to the dma api.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)@deprecated@
idexpression id;
position p;
@@(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)@bad1@
idexpression id;
position deprecated.p;
@@
...when != &id->dev
when != pci_get_drvdata ( id )
when != pci_enable_device ( id )
(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)@depends on !bad1@
idexpression id;
expression direction;
position deprecated.p;
@@(
- pci_dma_supported@p ( id,
+ dma_supported ( &id->dev,
...
+ , GFP_ATOMIC
)
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_ATOMIC
)
)Signed-off-by: Quentin Lambert
Cc: Maxim Levitsky
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
14 Oct, 2014
1 commit
-
When PM_SLEEP is not enabled, the r592_clear_interrupts() function is
never used. If so, don't build it to prevent a compiler warning.Signed-off-by: Thierry Reding
Cc: Maxim Levitsky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jun, 2014
1 commit
-
Add cancel_work_sync() in rtsx_pci_ms_drv_remove() to cancel pending
request work when removing the driver.Signed-off-by: Micky Ching
Cc: Samuel Ortiz says:
Cc: Maxim Levitsky
Cc: Greg Kroah-Hartman
Cc: Alex Dubov
Cc: Roger Tseng
Cc: Wei WANG
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Apr, 2014
1 commit
-
Realtek USB memstick host driver provides memstick host support based on the
Realtek USB card reader MFD driver.Signed-off-by: Roger Tseng
Signed-off-by: Lee Jones
24 Jan, 2014
1 commit
-
This patch is used to add support for ms card. The main difference
between ms card and mspro card is long data transfer mode. mspro card
can use auto mode DMA for long data transfer, but ms can not use this
mode, it should use normal mode DMA.The memstick core added support for ms card, but the original driver will
make ms card fail at initialization, because it uses auto mode DMA. This
patch makes the ms card work properly.Signed-off-by: Micky Ching
Cc: Maxim Levitsky
Cc: Samuel Ortiz
Cc: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Nov, 2013
1 commit
-
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang
Acked-by: Linus Walleij (personally at LCE13)
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Sep, 2013
1 commit
-
The driver core clears the driver data to NULL after device_release or on
probe failure. Thus, it is not needed to manually clear the device driver
data to NULL.Signed-off-by: Jingoo Han
Cc: Maxim Levitsky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Aug, 2013
1 commit
-
Update copyright date, and remove author address.
Signed-off-by: Wei WANG
Acked-by: Chris Ball
Signed-off-by: Samuel Ortiz
04 Jul, 2013
2 commits
-
Signed-off-by: Libo Chen
Cc: Maxim Levitsky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use module_pci_driver instead of init/exit, make code clean.
Signed-off-by: Libo Chen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 May, 2013
1 commit
-
r592_pm_ops is not exported. Also, CONFIG_PM_SLEEP is used to
remove unnecessary ifdefs.Signed-off-by: Jingoo Han
Cc: Maxim Levitsky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Feb, 2013
1 commit
-
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)Signed-off-by: Wei Yongjun
Cc: Maxim Levitsky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Feb, 2013
1 commit
-
Pull MFS updates from Samuel Ortiz:
"This is the MFD pull request for the 3.9 merge window.No new drivers this time, but a bunch of fairly big cleanups:
- Roger Quadros worked on a OMAP USBHS and TLL platform data
consolidation, OMAP5 support and clock management code cleanup.- The first step of a major sync for the ab8500 driver from Lee
Jones. In particular, the debugfs and the sysct interfaces got
extended and improved.- Peter Ujfalusi sent a nice patchset for cleaning and fixing the
twl-core driver, with a much needed module id lookup code
improvement.- The regular wm5102 and arizona cleanups and fixes from Mark Brown.
- Laxman Dewangan extended the palmas APIs in order to implement the
palmas GPIO and rt drivers.- Laxman also added DT support for the tps65090 driver.
- The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra
and Darren Hart.- Linus Walleij patchset for the ab8500 driver allowed ab8500 and
ab9540 based devices to switch to the new abx500 pin-ctrl driver.- The max8925 now has device tree and irqdomain support thanks to
Qing Xu.- The recently added rtsx driver got a few cleanups and fixes for a
better card detection code path and now also supports the RTS5227
chipset, thanks to Wei Wang and Roger Tseng."* tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (109 commits)
mfd: lpc_ich: Use devres API to allocate private data
mfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH
mfd: lpc_sch: Accomodate partial population of the MFD devices
mfd: da9052-i2c: Staticize da9052_i2c_fix()
mfd: syscon: Fix sparse warning
mfd: twl-core: Fix kernel panic on boot
mfd: rtsx: Fix issue that booting OS with SD card inserted
mfd: ab8500: Fix compile error
mfd: Add missing GENERIC_HARDIRQS dependecies
Documentation: Add docs for max8925 dt
mfd: max8925: Add dts
mfd: max8925: Support dt for backlight
mfd: max8925: Fix onkey driver irq base
mfd: max8925: Fix mfd device register failure
mfd: max8925: Add irqdomain for dt
mfd: vexpress: Allow vexpress-sysreg to self-initialise
mfd: rtsx: Support RTS5227
mfd: rtsx: Implement driving adjustment to device-dependent callbacks
mfd: vexpress: Add pseudo-GPIO based LEDs
mfd: ab8500: Rename ab8500 to abx500 for hwmon driver
...
14 Feb, 2013
1 commit
-
Realtek card reader supports both SD and MS card. According to the
settings of rtsx MFD driver, SD host will be probed before MS host.
If we boot/reboot Linux with SD card inserted, the resetting flow of SD
card will succeed, and the following resetting flow of MS is sure to fail.
Then MS upper-level driver will ask rtsx driver to turn power off. This
request leads to the result that the following SD commands fail and SD card
can't be accessed again.In this commit, Realtek's SD and MS host driver will check whether the card
that upper driver requesting is the one existing in the slot. If not, Realtek's
host driver will refuse the operation to make sure the exlusive accessing
at the same time.Signed-off-by: Wei WANG
Signed-off-by: Samuel Ortiz
22 Jan, 2013
1 commit
-
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.Cc: FUJITA Tomonori
Cc: Alex Dubov
Signed-off-by: Kees Cook
Signed-off-by: Greg Kroah-Hartman
16 Nov, 2012
1 commit
-
Realtek PCI-E Memstick card host driver is used to access Memstick
card, with the help of Realtek PCI-E card reader MFD driver.Signed-off-by: Wei WANG
Acked-by: Alex Dubov
Signed-off-by: Greg Kroah-Hartman
20 Mar, 2012
1 commit
-
Signed-off-by: Cong Wang
13 Jan, 2012
1 commit
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Acked-by: Mauro Carvalho Chehab
Signed-off-by: Rusty Russell
01 Nov, 2011
1 commit
-
This is another group of drivers that simply assumed that module.h was
everywhere. But it won't be once we clean up its presence from device.h
Call out the real users of it in advance.Signed-off-by: Paul Gortmaker
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
29 Mar, 2011
1 commit
-
Fixes this build error:
drivers/memstick/host/r592.c:26: error: 'enable_dma' redeclared as different kind of symbol
arch/powerpc/include/asm/dma.h:189: note: previous definition of 'enable_dma' was hereSigned-off-by: Stephen Rothwell
Cc: Andrew Morton
Cc: FUJITA Tomonori
Cc: Alex Dubov
Acked-by: Maxim Levitsky
Signed-off-by: Linus Torvalds
26 Mar, 2011
1 commit
-
Signed-off-by: Maxim Levitsky
Acked-by: Alex Dubov
Cc: FUJITA Tomonori
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Mar, 2011
1 commit
-
The EXTRA_CFLAGS assignment in memstick/Makefile was not accomplishing
anything because this flag only has effect on sources at the same level
as the makefile (i.e., per directory). Since both core/ and host/ rely
on MEMSTICK_DEBUG, the subdir-ccflags-y variant seems to be the
appropriate choice.Signed-off-by: matt mooney
Acked-by: WANG Cong
Signed-off-by: Michal Marek
14 Jan, 2011
3 commits
-
Signed-off-by: Aries Lee
Signed-off-by: Takashi Iwai
Cc: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a function jmb38x_ms_pmos() to enable / disable PMOS setups for
JMicron 38x controllers.Signed-off-by: Aries Lee
Signed-off-by: Takashi Iwai
Cc: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch corrects the definition of clock values for JMicron 38x
controllers and sets the value properly per interface type.
Also, it adds a check for TPC errors in the interrupt handler.Signed-off-by: Aries Lee
Signed-off-by: Takashi Iwai
Cc: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Mar, 2010
1 commit
-
…it 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 allmodconfig8. 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>
07 Apr, 2009
1 commit
-
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Jan, 2009
1 commit
-
Cc: Alex Dubov
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
14 Sep, 2008
1 commit
-
- 8-bit interface mode never worked properly. The only adapter I have
which supports the 8b mode (the Jmicron) had some problems with its
clock wiring and they discovered it only now. We also discovered that
ProHG media is more sensitive to the ordering of initialization
commands.- Make the driver fall back to highest supported mode instead of always
falling back to serial. The driver will attempt the switch to 8b mode
for any new MSPro card, but not all of them support it. Previously,
these new cards ended up in serial mode, which is not the best idea
(they work fine with 4b, after all).- Edit some macros for better conformance to Sony documentation
Signed-off-by: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Jul, 2008
2 commits
-
Instead of using a separate thread to pump requests from block layer queue
to memstick, do so inline, utilizing the callback design of the memstick.[akpm@linux-foundation.org: fix warnings]
Signed-off-by: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some controllers (Jmicron, for instance) can report temporal failure
condition during power-on. It is desirable to account for this using a
return value of "set_param" device method. The return value can also be
handy to distinguish between supported and unsupported device parameters
in run time.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Jul, 2008
1 commit
-
There is no such thing as a "device id size" in the driver core, so
remove the define and fix up any users of this odd define in the rest of
the kernel.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
20 Apr, 2008
1 commit
-
struct class_device is going away, struct device should be used instead.
Signed-off-by: Tony Jones
Signed-off-by: Kay Sievers
Cc: Alex Dubov
Signed-off-by: Greg Kroah-Hartman
29 Mar, 2008
1 commit
-
drivers/memstick/host/tifm_ms.c: In function 'tifm_ms_data_event':
drivers/memstick/host/tifm_ms.c:185: warning: 'p_off' may be used uninitialized in this functionCc: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds