Commit graph

126 commits

Author SHA1 Message Date
Dominik Brodowski
d7646f7632 pcmcia: use dev_pm_ops for class pcmcia_socket_class
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 9905d1b411 .

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-24 11:00:11 +01:00
David S. Miller
47871889c6 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
	drivers/firmware/iscsi_ibft.c
2010-02-28 19:23:06 -08:00
David S. Miller
19bc291c99 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-core.h
	drivers/net/wireless/rt2x00/rt2800pci.c
2010-02-25 23:26:21 -08:00
Pavel Roskin
fbc87d67af Introduce PCMCIA_DEVICE_PROD_ID3
...and use it in hostap_cs and orinoco_cs.

Another PCMCIA device with Intersil Prism chipset has been reported:

Socket 0:
  product info: "Gigabyte", "GN-WLM01_P25L_ADAPTER", "ISL37300P", "Eval-RevA"
  manfid: 0x02e0, 0x1011
  function: 6 (network)

As it's the case with some other Prism based devices, the third ID
string contains a design name that should be sufficient to identify the
card as having Intersil Prism chipset and thus compatible with both
orinoco_cs and hostap_cs.

Introduce PCMCIA_DEVICE_PROD_ID3 that matches the third ID string only.

Use it in orinoco_cs and hostap_cs to match cards with the third ID
string indicating Prism chipset.  Remove corresponding entries that use
PCMCIA_DEVICE_PROD_ID123.

Reported-by: Ozzy <ozzymud@gmail.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:51:23 -05:00
Dominik Brodowski
aa584ca4cd pcmcia: use state machine for extended requery
The requery callback now also handles the addition of a second pseudo
multifunction device. Avoids messing with dev_{g,s}et_drvdata(), and
fixes any workqueue <-> skt_mutex deadlock.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:27 +01:00
Dominik Brodowski
f971dbd5da pcmcia: use pccardd to handle eject, insert, suspend and resume requests
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 <tom.leiming@gmail.com>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:25 +01:00
Dominik Brodowski
3f565232c5 pcmcia: use mutex for dynid lock
Even though we weren't calling a blocking function within the dynid
spinlock, we do not need a spinlock here but can and should be using
a mutex.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:23 +01:00
Dominik Brodowski
00ce99ff50 pcmcia: simplify locking
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 <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:20 +01:00
Dominik Brodowski
6b8e087b86 pcmcia: add locking to set_mem_map()
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_virt

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:13 +01:00
Dominik Brodowski
3a86e1807a pcmcia: do not use resource manager on !PCMCIA
If only CardBus cards are used, but not PCMCIA cards, we do not need
the extensive resource management functions provided for by
rsrc_nonstatic.c (~240K).

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:31 +01:00
Dominik Brodowski
4e8804ff6d pcmcia: m8xx_pcmcia.c should use iodyn resource manager
The socket driver m8xx_pcmcia.c uses a static memory assignment,
but io_offset is set to 0. Therefore, it seems proper to use the
iodyn resource manager for this driver, as was previously the
case (before commit 80128ff79d).

CC: Vitaly Bordug <vitb@kernel.crashing.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Olof Johansson <olof@lixom.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:10 +01:00
Dominik Brodowski
57197b9b77 pcmcia: CardBus doesn't need CIS access
At least no in-kernel CardBus-capable PCI driver makes use of the CIS
access functions. Therefore, it seems sensible to remove this unused
code, and cleanup cardbus.c a lot.

CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:13 +01:00
Dominik Brodowski
88b060d6c0 pcmcia: improve check for same card in slot after resume
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 <jbarnes@virtuousgeek.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:12 +01:00
Dominik Brodowski
9fea84f46a pcmcia: CodingStyle fixes
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 <linux@dominikbrodowski.net>
2009-12-07 22:23:40 +01:00
Dominik Brodowski
e15c1c1f3f pcmcia: remove unused IRQ_FIRST_SHARED
Komuro pointed out that IRQ_FIRST_SHARED is not used at all in the
PCMCIA subsystem, so remove it. Also, remove two bogus assignments.

CC: Karsten Keil <keil@b1-systems.de>
CC: netdev@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-12-07 22:23:24 +01:00
Linus Torvalds
d9b2c4d0b0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* 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
  ...
2009-12-05 09:42:59 -08:00
Dominik Brodowski
5fa9167a1b pcmcia: rework the irq_req_t typedef
Most of the irq_req_t typedef'd struct can be re-worked quite
easily:

(1) IRQInfo2 was unused in any case, so drop it.

(2) IRQInfo1 was used write-only, so drop it.

(3) Instance (private data to be passed to the IRQ handler):
	Most PCMCIA drivers using pcmcia_request_irq() to actually
	register an IRQ handler set the "dev_id" to the same pointer
	as the "priv" pointer in struct pcmcia_device. Modify the two
	exceptions (ipwireless, ibmtr_cs) to also work this waym and
	set the IRQ handler's "dev_id" to p_dev->priv unconditionally.

(4) Handler is to be of type irq_handler_t.

(5) Handler != NULL already tells whether an IRQ handler is present.
	Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
	irq_req_t.Attributes.

CC: netdev@vger.kernel.org
CC: linux-bluetooth@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: Jaroslav Kysela <perex@perex.cz>
CC: Jiri Kosina <jkosina@suse.cz>
CC: Karsten Keil <isdn@linux-pingi.de>
for the Bluetooth parts: Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:03:14 +01:00
Dominik Brodowski
dd2e5a1565 pcmcia: remove deprecated handle_to_dev() macro
Update remaining users and remove deprecated handle_to_dev() macro

CC: Harald Welte <laforge@gnumonks.org>
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:03:10 +01:00
Dominik Brodowski
6838b03fc6 pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
pcmcia_request_window() only needs a pointer to struct pcmcia_device, not
a pointer to a pointer.

CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:02:58 +01:00
Dominik Brodowski
82f88e3600 pcmcia: remove unused "window_t" typedef
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:02:52 +01:00
Magnus Damm
0bdf9b3dd3 pcmcia: Change window_handle_t logic to unsigned long
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 <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:02:50 +01:00
Magnus Damm
16456ebabf pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
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 <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:02:49 +01:00
Magnus Damm
868575d1e8 pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page()

[linux@dominikbrodowski.net: update to 2.6.31]
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN)
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:02:13 +01:00
Magnus Damm
f5560da549 pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
No logic changes, just pass struct pcmcia_device to pcmcia_release_window().

[linux@dominikbrodowski.net: update to 2.6.31]
CC: netdev@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:01:26 +01:00
Russell King - ARM Linux
1689164a27 PCMCIA: ss: allow PCI IRQs > 255
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-09 08:30:15 +01:00
Dominik Brodowski
9cb495bb41 pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}
As all in-tree drivers have been converted to not use cs_error() any more,
drop these functions and definitions, and update the Documentation.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-09 08:30:06 +01:00
Dominik Brodowski
18a7a19b37 pcmcia: remove pcmcia_get_{first,next}_tuple()
Remove the pcmcia_get_{first,next}_tuple() calls no longer needed by
(current) pcmcia device drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-08 18:23:11 +01:00
Dominik Brodowski
91284224da pcmcia: add new CIS access helpers
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
<komurojun-mbn@nifty.com> has been fixed in this revision.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-08 18:06:54 +01:00
Rafael J. Wysocki
9905d1b411 PM / yenta: Split resume into early and late parts (rev. 4)
Commit 0c570cdeb8
(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 <rjw@sisk.pl>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Reported-by: Stephen J. Gowdy <gowdy@cern.ch>
Tested-by: Jose Marino <braket@hotmail.com>
2009-11-03 10:54:58 +01:00
Rafael J. Wysocki
827b4649d4 PM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend()
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 <rjw@sisk.pl>
Cc: stable@kernel.org
2009-09-29 00:10:41 +02:00
Steven A. Falco
1d80766554 pcmcia: Use phys_addr_t for physical addresses
Physical addresses are currently represented as int or long types.
However, this does not work for processors like the PPC440EPx, which
is a 32-bit processor with a 36-bit address space.  This patch uses
the phys_addr_t type, which correctly holds a 36-bit address on
this processor.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 10:17:15 -07:00
Dominik Brodowski
a45b3fb19b pcmcia: ioctl-internal definitions
cisinfo_t and cs_status_t are only used by the (deprecated) PCMCIA
ioctl. Therefore, move them out of the way.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-31 16:00:42 +02:00
Dominik Brodowski
272433e088 pcmcia: cistpl header cleanup
16-bit PCMCIA device handling function definitions are moved to ds.h.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-31 15:55:58 +02:00
Dominik Brodowski
2f3061eb10 pcmcia: remove unused argument to pcmcia_parse_tuple()
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 <linux@dominikbrodowski.net>
2008-08-31 15:50:33 +02:00
Dominik Brodowski
994917f8b7 pcmcia: card services header cleanup
16-bit PCMCIA device handling function definitions are moved to ds.h,
internal definitions to cs_internal.h.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-31 15:25:47 +02:00
Dominik Brodowski
35200d865d pcmcia: device_id header cleanup
Wrap in #ifdef to include header just once, and wrap in another #ifdef
to avoid it being used in userspace. Also, format the header similar to
the other PCMCIA header files.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-29 09:43:18 +02:00
Dominik Brodowski
d39bd56452 pcmcia: encapsulate ioaddr_t
By now, ioaddr_t should only be used by the deprecated ioctl, as it does not
correctly reflect the maximum ioport range at least on some architectures.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-29 09:43:14 +02:00
Dominik Brodowski
a58357862e pcmcia: cleanup device driver header file
The header file primarily used for (in-kernel) PCMCIA device drivers
also deserved a major cleanup. This header file also serves as the dumping
ground for all typedefs and definitions only used by the deprecated PCMCIA
ioctl and the deprecated PCMCIA userspace tools using this ioctl.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-29 09:28:47 +02:00
Dominik Brodowski
c23889ca5a pcmcia: cleanup socket services header file
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.h

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-26 00:09:56 +02:00
Dominik Brodowski
79ba675727 pcmcia: use dev_printk for cs_error()
Use dev_printk() in cs_error()-based error reporting. While this
function-turned-macro will hopefully go away soon, using dev_printk
simplifies the code much.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:34:36 +02:00
Dominik Brodowski
9c8b7965f5 pcmcia: remove CS_ error codes alltogether
Remoe the CS_ error codes. Drivers are expected to use default
error definitions (errno.h etc.).

Only one CS_ error code -- CS_IN_USE -- is used internally by the
(deprecated) pcmcia-cs userspace package. Therefore, keep this one
around so that it still compiles.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:34:36 +02:00
Dominik Brodowski
3f9c5f4cb7 pcmcia: deprecate CS_BAD_TUPLE
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 <linux@dominikbrodowski.net>
2008-08-23 02:34:28 +02:00
Dominik Brodowski
926c5402c2 pcmcia: deprecate CS_BAD_ARGS
CS_BAD_ARGS mean a badly written driver or invalid userspace ioctl access,
so translate that to -EINVAL.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:57 +02:00
Dominik Brodowski
69ba44331e pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZE
These four error values mostly mean a badly written driver, so ds_dbg()
output and -EINVAL seems to be enough.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:56 +02:00
Dominik Brodowski
610e23749e pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE
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 <harvey.harrison@gmail.com>
)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:55 +02:00
Dominik Brodowski
635d19bea0 pcmcia: deprecate CS_NO_MORE_ITEMS
CS_NO_MORE_ITEMS is returned by the CIS tuple reading and parsing code if
the end of a tuple chain is reached. As at least one PCMCIA driver relies
on matching this return value, replace it with -ENOSPC which is now
uniquely used for this purpose within the in-kernel pcmcia subsystem.

CC: Russell King <rmk+kernel@arm.linux.org.uk>
CC: linux-serial@vger.kernel.org
CC: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:54 +02:00
Dominik Brodowski
f958095ef4 pcmcia: deprecate CS_IN_USE
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 <linux@dominikbrodowski.net>
2008-08-23 02:29:48 +02:00
Dominik Brodowski
943f70f1b5 pcmcia: deprecate CS_CONFIGURATION_LOCKED
This error code meant that trying to change the configuration after the
initialization phase is forbidden.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:46 +02:00
Dominik Brodowski
ffb8da2027 pcmcia: deprecate CS_BAD_HANDLE
CS_BAD_HANDLE means that something went badly wrong: no parameter was passed,
or the paramater passed wasn't the correct one. Therefore, replace it with
-EINVAL.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:45 +02:00
Dominik Brodowski
8567142e87 pcmcia: deprecate CS_GENERAL_FAILURE
It's only used by pcmcia_core when socket-related queries time out.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:44 +02:00