Commit graph

39 commits

Author SHA1 Message Date
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
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
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
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
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
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
Dominik Brodowski
3939c1ef1f pcmcia: deprecate CS_NO_CARD
It means that no card can be detected in the socket, so return -ENODEV

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:43 +02:00
Dominik Brodowski
d8b0a49da4 pcmcia: deprecate CS_BAD_VCC and CS_BAD_VPP
They were either used to report that changing voltage is not allowed, or that
changing voltage failed.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:42 +02:00
Dominik Brodowski
de6405e9d1 pcmcia: deprecate CS_UNSUPPORTED_*
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 <linux@dominikbrodowski.net>
2008-08-23 02:29:41 +02:00
Dominik Brodowski
1168386aa7 pcmcia: deprecate CS_OUT_OF_RESOURCE
CS_OUT_OF_RESOURCE was almost only used to note -ENOMEM situations.
Therefore, use -ENOMEM explicitely, and also print out warnings.

CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:40 +02:00
Dominik Brodowski
5ff87db679 pcmcia: deprecate unused CS_ error codes
Deprecate unused CS_ error codes by replacing their definitions with
generic error messages, and removing them from the error_t lookup table.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:29:39 +02:00
Dominik Brodowski
1a53088c10 pcmcia: move config_info_t definition to ioctl-related parts in header files
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:16:09 +02:00
Dominik Brodowski
64f3464251 pcmcia: move pccard_get_configuration_info to ioctl
With the PCMCIA ioctl being the only remaining user of
_get_configuration_info, move the function to pcmcia_ioctl.c

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23 02:16:05 +02:00
Dominik Brodowski
4aeba0134f pcmcia: (re)move {pcmcia,pccard}_get_status
Except for one debug message in a driver marked BROKEN, pcmcia_get_status is
only used by the ioctl. Therefore, move it to pcmcia_ioctl.c and unexport it.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24 15:33:44 +02:00
Magnus Damm
b453917ac4 pcmcia: Remove unused header file code
pcmcia: Remove unused header file code

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24 15:33:43 +02:00
Olof Johansson
ecb8a8472f pcmcia: convert some internal-only ioaddr_t to unsigned int
Convert the io_req_t members to unsigned int, to allow use on machines with
more than 16 bits worth of IO ports (i.e.  secondary busses on ppc64, etc).

There was only a couple of places in drivers where a change was needed.  I
left printk formats alone (there are lots of %04x-style formats in there),
mostly to not change the format on the platforms that only have 16-bit io
addresses, but also because the padding doesn't really add all that much value
most of the time.

I found only one sprintf of an address, and upsized the string accordingly (I
doubt anyone will have anywhere near INT_MAX as irq value, but at least
there's room for it now).

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:08 -08:00
Dominik Brodowski
9940ec3617 [PATCH] pcmcia: convert DEV_OK to pcmcia_dev_present
Instead of the DEV_OK macro, drivers should use pcmcia_dev_present().

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:26:57 +02:00
Dominik Brodowski
70294b4683 [PATCH] pcmcia: remove unneeded Vcc pseudo setting
As we do not allow setting Vcc in the pcmcia core, and Vpp1 and
Vpp2 can only be set to the same value, a lot of code can be
streamlined.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:55 +02:00
Dominik Brodowski
4bbed52314 [PATCH] pcmcia: remove export of pcmcia_release_configuration
Handle the _modifying_ operation sm91c92_cs requires in
pcmcia_modify_configuration, so that the only remaining users
of pcmcia_release_configuration() are within the pcmcia core
module.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:53 +02:00
Dominik Brodowski
50db3fdbbc [PATCH] pcmcia: convert remaining users of pcmcia_release_io and _irq
Convert the remaining drivers which use pcmcia_release_io or
pcmcia_release_irq, and remove the EXPORT of these symbols.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:51 +02:00
Dominik Brodowski
5f2a71fcb7 [PATCH] pcmcia: add pcmcia_disable_device
pcmcia_disable_device(struct pcmcia_device *p_dev) performs the necessary
cleanups upon device or driver removal: it calls the appropriate
pcmcia_release_* functions, and can replace (most) of the current drivers'
_release() functions.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:50 +02:00
Dominik Brodowski
1540eec5e5 [PATCH] pcmcia: remove pcmcia_compat.c
Remove the compatibility wrappers, as they can (now) also be implemented
using macros. Please continue using these wrappers instead of new functions
until a new API has stabilized.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:02:33 +02:00
Dominik Brodowski
cbbddd1046 [PATCH] pcmcia: remove unused defines
Remove unused fields and declarations.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:02:13 +02:00
Dominik Brodowski
f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski
f399071558 [PATCH] pcmcia: remove old detach mechanism
Remove the old "detach" mechanism as it is unused now.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:15 +01:00
Pavel Roskin
a00db1ba7c [PATCH] pcmcia: remove client services version
The Linux PCMCIA code has some data that was apparently used (or meant to be
used) to ensure that only proper client drivers are loaded.  This is now
ensured (to a certain degree) by the fact that the most client drivers are
part of the kernel.  Also, the version information has not been updated
despite major changes in PCMCIA API.  This has made it meaningless.

This patch removes servinfo_t and pcmcia_get_card_services_info.  They are not
used in any userspace utilities such as pcmcia-cs and pcmciautils.
drivers/pcmcia/pcmcia_ioctl.c is adjusted accordingly.

CS_RELEASE and CS_RELEASE_CODE are removed.  include/pcmcia/version.h is empty
now.  It will be removed later, but for now it's left in the tree to avoid
touching all PCMCIA clients.

The only driver that needs to be changed is drivers/scsi/pcmcia/nsp_cs.c,
which uses CS_RELEASE_CODE.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:24:06 -07:00
Dominik Brodowski
2bc5a9bdc5 [PATCH] pcmcia: reduce client_handle_t usage
Reduce the occurences of "client_handle_t" which is nothing else than a
pointer to struct pcmcia_device by now.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:24:06 -07:00
Dominik Brodowski
3448139b41 [PATCH] pcmcia: ds.c cleanup
Clean up ds.c

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 18:03:20 -07:00
Dominik Brodowski
e94e15f705 [PATCH] pcmcia: cleanups
From: Adrian Bunk <bunk@stusta.de>

This patch contains the following cleanups:
- make needlessly global code static
- remove the following unneeded EXPORT_SYMBOL's:
  - ds.c: pcmcia_report_error
  - ds.c: pcmcia_bus_type

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 18:03:08 -07:00
Linus Torvalds
1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00