14 Oct, 2010
1 commit
-
pcmcia_socket_dev_resume() is only referenced from macro
SET_SYSTEM_SLEEP_PM_OPS(NULL, pcmcia_socket_dev_resume)
which based on CONFIG_PM_SLEEP may or may not actually
use its second parameter.Signed-off-by: Maciej Żenczykowski
Signed-off-by: Dominik Brodowski
29 Sep, 2010
1 commit
-
pcmcia_enable_device() now replaces pcmcia_request_configuration().
Instead of config_req_t, all necessary flags are either passed as
a parameter to pcmcia_enable_device(), or (in rare circumstances)
set in struct pcmcia_device -> flags.With the last remaining user of include/pcmcia/cs.h gone, remove
all references.CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
CC: Jiri Kosina
CC: linux-scsi@vger.kernel.org
Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski
31 Jul, 2010
3 commits
-
Remove cs_types.h which is no longer needed: Most definitions aren't
used at all, a few can be made away with, and two remaining definitions
(typedefs, unfortunatley) may be moved to more specific places.CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
Acked-by: Marcel Holtmann (for drivers/bluetooth/)
Acked-by: David S. Miller
Signed-off-by: Dominik Brodowski -
Split up the central event handler for 16bit cards into three individual
functions.Signed-off-by: Dominik Brodowski
-
The event callback for handling 16bit PCMCIA cards only needs to be
informed about a few events. Furthermore, send_event may already
only be called with skt->skt_mutex held, which also protects against
the module being removed behind the callback's back.Signed-off-by: Dominik Brodowski
10 May, 2010
1 commit
-
As we don't need the "Config" counter any more, we can simplify
struct pcmcia_socket.Signed-off-by: Dominik Brodowski
05 May, 2010
1 commit
-
Assert that userspace suspend and resume requests appearing
(almost) immediately are executed in the following order:
suspend, resume. This should result in "pccardctl reset"
behaving the same as before.Signed-off-by: Dominik Brodowski
24 Mar, 2010
1 commit
-
Instead of requiring PCMCIA socket drivers to call various functions
during their (bus) resume and suspend functions, register an own
dev_pm_ops for this class. This fixes several suspend/resume bugs
seen on db1xxx-ss, and probably on some other socket drivers, too.With regard to the asymmetry with only _noirq suspend, but split up
resume, please see bug 14334 and commit 9905d1b411946fb3 .Signed-off-by: Dominik Brodowski
18 Feb, 2010
8 commits
-
As this is the socket thread (pccardd) starting up, we do not have
anything to wait for in ds.c. Instead, wait the same amount of time
in pccardd to allow userspace to catch up and - possibly - execute
pcmcia-socket-startup.Signed-off-by: Dominik Brodowski
-
In cb_free(), we remove some sysfs files -- other sysfs files might
grab ops_mutex, so we cannot hold it while removing sysfs files. This
fixes http://lkml.org/lkml/2010/1/17/88 .Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
After a CIS update -- or the finalization of the resource database --,
proceed with the re-scanning or re-querying of PCMCIA cards only in
a separate thread to avoid deadlocks.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
This avoids any sysfs-related deadlock (or lockdep warning), such
as reported at http://lkml.org/lkml/2010/1/17/88 .Reported-by: Ming Lei
Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
replace pcmcia_socket->lock and pcmcia_dev_list_lock by using the
per-socket "ops_mutex", as we do neither need different locks
nor a spinlock here.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
As a side effect,
socket_state_t socket;
u_int state;
u_int suspended_state;
are properly protected now.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
Protect the pccard_operations callback "set_mem_map" by a new
mutex ops_mutex. This mutex also protects the following values
in struct pcmcia_socket:pccard_mem_map win[]
pccard_mem_map cis_mem
void __iomem *cis_virtTested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski
25 Jan, 2010
2 commits
-
As release_resoure_db() used to be called only from one place, and
it's a two-line function, remove it.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
Do not lock the socket driver module on card insert, as
the PCMCIA core can handle a socket module removal, at least
if we add a call to socket_remove() on pccardd()'s shutdown.Signed-off-by: Dominik Brodowski
18 Jan, 2010
4 commits
-
Do not lock the socket driver module in pcmcia_get_socket(), as
the PCMCIA core can handle a socket module removal: In
pcmcia_unregister_socket(), we explicitely wait for the last
put_device() to succeed.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
As ds.c is the only real user of CIS access functions, call the
cleanup functions from ds.c, too.Signed-off-by: Dominik Brodowski
-
During a suspend/resume cycle, an user may change the card in the
PCMCIA/CardBus slot. The pcmcia_core can at least look at the
socket state to check whether it is the same.For PCMCIA devices, move the detection and handling of such a
change to ds.c.For CardBus devices, the PCI hotplug interface doesn't offer a "rescan"
facility which also _removes_ devices no longer to be found behind a
bridge. Therefore, remove and re-add all devices unconditionally.CC: Jesse Barnes
CC: Linus Torvalds
Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
In pccard_validate_cis(), validate the card CIS, not the CIS cache.
Also, destroy the CIS cache if pccard_validate_cis fails.Furthermore, do not remove the fake CIS in destroy_cis_cache() but
do so explicitely in the code paths where it makes sense.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski
08 Dec, 2009
1 commit
-
Fix several CodingStyle issues in drivers/pcmcia/ . checkpatch.pl no longer
reports errors in the PCMCIA core. The remaining warnings mostly relate to
wrong indent -- PCMCIA historically used 4 spaces --, to lines over 80
characters and to hundreds of typedefs. The cleanup of those will follow
in the future.Signed-off-by: Dominik Brodowski
06 Dec, 2009
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (50 commits)
pcmcia: rework the irq_req_t typedef
pcmcia: remove deprecated handle_to_dev() macro
pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
pcmcia: remove unused "window_t" typedef
pcmcia: move some window-related code to pcmcia_ioctl.c
pcmcia: Change window_handle_t logic to unsigned long
pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
drivers/pcmcia: remove unnecessary kzalloc
pcmcia: correct handling for Zoomed Video registers in topic.h
pcmcia: fix printk formats
pcmcia: autoload module pcmcia
pcmcia/staging: update comedi drivers
PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
PCMCIA: ss: allow PCI IRQs > 255
PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket
PCMCIA: soc_common: constify soc_pcmcia_socket ops member
PCMCIA: sa1111: remove duplicated initializers
PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
...
09 Nov, 2009
3 commits
-
Attempt to load the "pcmcia" module for 16-bit PCMCIA cards, so that
PCMCIA support becomes available without pcmciautils/udev userspace
interaction. Based on a suggestion and a patch
Signed-off-by: Komuro
but converted it to request_module_nowait() and move it to a later
stage.Signed-off-by: Dominik Brodowski
-
Add a few more error and debug messages to the PCMCIA core.
Signed-off-by: Dominik Brodowski
-
Use the generic "dynamic debug" infrastructure instead of
CONIG_PCMCIA_DEBUG in the PCMCIA core (pcmcia.ko and pcmcia_core.ko). To
enable debugging, enable CONFIG_DYNAMIC_DEBUG, mount debugfs and$ echo -n 'module pcmcia_core +p' > /sys/kernel/debug/dynamic_debug/control
for the complete module "pcmcia_core", for example. For more detailled
instructions, please see Documentation/dynamic-debug-howto.txtSigned-off-by: Dominik Brodowski
03 Nov, 2009
1 commit
-
Commit 0c570cdeb8fdfcb354a3e9cd81bfc6a09c19de0c
(PM / yenta: Fix cardbus suspend/resume regression) caused resume to
fail on systems with two CardBus bridges. While the exact nature
of the failure is not known at the moment, it can be worked around by
splitting the yenta resume into an early part, executed during the
early phase of resume, that will only resume the socket and power it
up if there was a card in it during suspend, and a late part,
executed during "regular" resume, that will carry out all of the
remaining yenta resume operations.Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14334, which is a
listed regression from 2.6.31.Signed-off-by: Rafael J. Wysocki
Acked-by: Dominik Brodowski
Reported-by: Stephen J. Gowdy
Tested-by: Jose Marino
29 Sep, 2009
1 commit
-
pcmcia_socket_dev_suspend() doesn't use its second argument, so it
may be dropped safely.This change is necessary for the subsequent yenta suspend/resume fix.
Signed-off-by: Rafael J. Wysocki
Cc: stable@kernel.org
10 Nov, 2008
1 commit
-
Signed-off-by: Dominik Brodowski
02 Nov, 2008
1 commit
-
Signed-Off-By: Kay Sievers
Acked-by: Greg Kroah-Hartman
Signed-off-by: Dominik Brodowski
31 Aug, 2008
1 commit
-
16-bit PCMCIA device handling function definitions are moved to ds.h,
internal definitions to cs_internal.h.Signed-off-by: Dominik Brodowski
23 Aug, 2008
8 commits
-
CS_BAD_TYPE was only used in cs.c and already properly annotated by error
messages. CS_BAD_ATTRIBUTE and CS_BAD_PAGE mean a badly written driver, so
ds_dbg() output and -EINVAL seems to be enough.(includes bugfix from and
Signed-off-by: Harvey Harrison
)
Signed-off-by: Dominik Brodowski -
If a resource is already in use, mark it with -EBUSY. Same for cards already
asleep.(includes a fix for a bug found by Larry Finger -- thanks!)
Signed-off-by: Dominik Brodowski -
It's only used by pcmcia_core when socket-related queries time out.
Signed-off-by: Dominik Brodowski
-
It means that no card can be detected in the socket, so return -ENODEV
Signed-off-by: Dominik Brodowski
-
CS_UNSUPPORTED_MODE and CS_UNSUPPORTED_FUNCTION were mostly used to denote
trying to use PCMCIA functions on CardBus cards.Signed-off-by: Dominik Brodowski
-
Instead of using own error or success codes, the PCMCIA code should rely on
the generic return values. Therefore, replace all occurrences of CS_SUCCESS
with 0.CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Use CONFIG_PCMCIA_DEBUG instead of DEBUG so that dev_dbg() and other tricks
work properly.(includes bugfixes from and
Signed-off-by: Stephen Rothwell
Signed-off-by: Larry Finger
)Signed-off-by: Dominik Broodwski
-
Signed-off-by: Dominik Brodowski