29 Sep, 2010
5 commits
-
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 -
Several drivers prefer to explicitly set config_{base,index,regs},
formerly known as ConfigBase, ConfigIndex and Present. Instead of
passing these values inside config_req_t, store it in struct
pcmcia_device.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 -
IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO
(all other drivers). As this flags seems to relate to ioport access, make
it conditional to the driver having requested IO port access. There are two
drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:
ray_cs and b43. For those, we consistently only set INT_MEMORY in future.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 -
The Status (CISREG_CCSR) and ExtStatus (CISREG_ESR) registers were
only accessed to enable audio output for some drivers and IRQ for
serial_cs.c. The former also required setting config_req_t.Attributes
to CONF_ENABLE_SPKR; the latter can be simplified to setting this
field to CONF_ENABLE_ESR.CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: linux-scsi@vger.kernel.org
Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
The "Pin" and "Copy" configuration registers (CISREG_SCR, CISREG_PPR)
do not seem to be utilized anywhere. If a device would request a
write to these registers, "0" would be written. Continue to do so, but
warn of unexpected behavior -- and remove the "Pin" and "Copy" entries
from config_req_t.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski
03 Aug, 2010
5 commits
-
Insert PCMCIA device resources into the resource tree. However, this is
currently only implemented for sockets which do not statically map the
resources.Signed-off-by: Dominik Brodowski
-
Use struct resource * also for iomem resources.
CC: linux-mtd@lists.infradead.org
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: Jiri Kosina
Signed-off-by: Dominik Brodowski -
Signed-off-by: Dominik Brodowski
-
Introduce a new field into struct pcmcia_device named "resource" and of
type struct resource *, which contains the IO port ranges allocated for
this device. Memory window ranges and registration with the resource
trees will follow at a later date.Signed-off-by: Dominik Brodowski
-
Use pcmcia_read_config_byte and pcmcia_write_config_byte instead
of pcmcia_access_configuration_register.CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: Michael Buesch
Signed-off-by: Dominik Brodowski
31 Jul, 2010
2 commits
-
Split up the central event handler for 16bit cards into three individual
functions.Signed-off-by: Dominik Brodowski
-
Signed-off-by: Dominik Brodowski
10 May, 2010
3 commits
-
Clean up the alloc_io_space() function by moving most of it to
the actual resource_ops. This allows for a bit less re-directions.
Future cleanups will follow, and will make up for the code
duplication currently present between rsrc_iodyn and rsrc_nonstatic
(which are hardly ever built at the same time anyway, therefore no
increase in built size).Signed-off-by: Dominik Brodowski
-
Signed-off-by: Dominik Brodowski
-
Setup the IRQ to be used by PCMCIA drivers already during the device
registration stage, making use of a new function pcmcia_setup_irq().
This will allow us to get rid of quite a lot of indirection in the
future.Signed-off-by: Dominik Brodowski
18 Feb, 2010
5 commits
-
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 -
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 -
Move rsrc_mgr indirections only used by the pcmcia module to the
pcmcia module.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
As PCMCIA is the only real user of CIS access functions, include
cistpl.c in the PCMCIA module, not in the PCMCIA & CardBus core
module.Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski
25 Jan, 2010
3 commits
-
Remove rsrc_mgr indirections only used by pcmcia_resource.c
Tested-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
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
29 Nov, 2009
3 commits
-
pcmcia_get_window() and pcmcia_get_mem_page() were only called from
pcmcia_ioctl.c. Therefore, move these functions to that file, and
remove the useless EXPORTs.Signed-off-by: Dominik Brodowski
-
Logic changes based on top of the other patches:
This set of patches changed window_handle_t from being a pointer to an
unsigned long. The unsigned long is now a simple index into socket->win[].
Going from a pointer to unsigned long should leave the user space interface
unchanged unless I'm mistaken.This change results in code that is less error prone and a user space
interface which is much cleaner and safer. A nice side effect is that we
are also are able to remove all members except one from window_t.[ linux@dominikbrodowski.net:
Update to 2.6.31. Also, a plain "index" to socket->win[] does not
work, as several codepaths rely on "window_handle_t" being
non-zero if used. Therefore, set the window_handle_t to the
socket->win[] index + 1. ]CC: netdev@vger.kernel.org
Signed-off-by: Magnus Damm
Signed-off-by: Dominik Brodowski -
No logic changes, just pass struct pcmcia_socket to pcmcia_get_mem_page()
[linux@dominikbrodowski.net: update to 2.6.31]
Signed-off-by: Magnus Damm
Signed-off-by: Dominik Brodowski
09 Nov, 2009
3 commits
-
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
-
Remove the pcmcia_get_{first,next}_tuple() calls no longer needed by
(current) pcmcia device drivers.Signed-off-by: Dominik Brodowski
-
As a replacement to pcmcia_get_{first,next}_tuple() and
pcmcia_get_tuple_data(), three new -- and easier to use --
functions are added:- pcmcia_get_tuple() to get the very first CIS entry of one
type.- pcmcia_loop_tuple() to loop over all CIS entries of one type.
- pcmcia_get_mac_from_cis() to read out the hardware MAC address
from CISTPL_FUNCE.Only a handful of drivers need these functions anyway, as most
CIS access is already handled by pcmcia_loop_config(), which
now shares the same backed (pccard_loop_tuple()) with
pcmcia_loop_tuple().A pcmcia_get_mac_from_cis() bug noted by Komuro
has been fixed in this revision.Signed-off-by: Dominik Brodowski
19 Oct, 2009
1 commit
-
pccard_read_tuple(), which is only used by the PCMCIA core, should
handle TUPLE_RETURN_COMMON more sensibly: If a specific function (which
may be 0) is requested, set tuple.Attributes = 0 as was done in all
PCMCIA drivers. If, however, BIND_FN_ALL is requested, return the
"common" tuple. As to the callers of pccard_read_tuple():- All calls to pcmcia_validate_cis() had set the "function" parameter to
BIND_FN_ALL. Therefore, remove the "function" parameter and make the
parameter to pccard_read_tuple explicit.- Calls to CISTPL_VERS_1 and CISTPL_MANFID now set BIND_FN_ALL. This was
already the case for calls to CISTPL_LONGLINK_MFC.Signed-off-by: Dominik Brodowski
31 Aug, 2008
2 commits
-
Since we're just parsing the tuple being passed to this function, we don't
need any device-specific information.Also, remove the call to pcmcia_validate_cis() from pcmciamtd.c, since it
is already called by the PCMCIA core.Signed-off-by: Dominik Brodowski
-
16-bit PCMCIA device handling function definitions are moved to ds.h,
internal definitions to cs_internal.h.Signed-off-by: Dominik Brodowski
26 Aug, 2008
3 commits
-
The header file for use by (in-kernel) PCMCIA sockets deserved a major
cleanup. Some stuff only used by the pcmcia core modules was moved to
cs_internal.hSigned-off-by: Dominik Brodowski
-
Merge ds_internal.c into cs_internal.h.
Signed-off-by: Dominik Brodowski
-
Small cleanup to cs_internal.h.
Signed-off-by: Dominik Brodowski
23 Aug, 2008
5 commits
-
CS_BAD_TUPLE was used to denote a bad tuple being passed to the parse
function. Therefore, replace it with -EINVAL and a verbose message.Signed-off-by: Dominik Brodowski
-
With the PCMCIA ioctl being the only remaining user of
_get_configuration_info, move the function to pcmcia_ioctl.cSigned-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
-
Signed-off-by: Dominik Brodowski