aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia/ds.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17pcmcia: use mutex for dynid lockDominik Brodowski1-1/+1
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>
2009-12-07pcmcia: CodingStyle fixesDominik Brodowski1-3/+3
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-11-28pcmcia: remove deprecated handle_to_dev() macroDominik Brodowski1-3/+0
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-28pcmcia: pcmcia_request_window() doesn't need a pointer to a pointerDominik Brodowski1-1/+1
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-28pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()Magnus Damm1-2/+0
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-28pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()Magnus Damm1-1/+2
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-28pcmcia: Pass struct pcmcia_device to pcmcia_release_window()Magnus Damm1-1/+1
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-09pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}Dominik Brodowski1-36/+0
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-08pcmcia: remove pcmcia_get_{first,next}_tuple()Dominik Brodowski1-15/+0
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-08pcmcia: add new CIS access helpersDominik Brodowski1-14/+43
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>
2008-08-31pcmcia: ioctl-internal definitionsDominik Brodowski1-0/+11
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-31pcmcia: cistpl header cleanupDominik Brodowski1-0/+28
16-bit PCMCIA device handling function definitions are moved to ds.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-31pcmcia: card services header cleanupDominik Brodowski1-1/+55
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-29pcmcia: encapsulate ioaddr_tDominik Brodowski1-0/+8
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-29pcmcia: cleanup device driver header fileDominik Brodowski1-127/+200
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-23pcmcia: use dev_printk for cs_error()Dominik Brodowski1-1/+12
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-23pcmcia: remove CS_ error codes alltogetherDominik Brodowski1-0/+3
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-23pcmcia: move config_info_t definition to ioctl-related parts in header filesDominik Brodowski1-0/+21
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-02pcmcia: only copy CIS override data onceDominik Brodowski1-0/+6
Instead of copying CIS override data in socket_sysfs.c or ds.c, and then again in cistpl.c, only do so once. Also, cisdump_t is now only used by the deprecated ioctl. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: remove unused bulkmem.hMagnus Damm1-1/+18
The code in include/pcmcia/bulkmem.h was only kept for compatibility reasons. Therefore, move the remaining region_info_t definition to ds.h [linux@dominikbrodowski.net: do not modify the IOCTL, move definition to ds.h, and update changelog] Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2007-10-16pcmcia: use DMA_MASK_NONE for the default for all pcmcia devicesJames Bottomley1-0/+1
Most non cardbus devices can't do dma, so flag them as such in the device creation routine. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Tejun Heo <htejun@gmail.com> Cc: Natalie Protasevich <protasnb@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07add new_id to PCMCIA driversBernhard Walle1-0/+6
PCI drivers have the new_id file in sysfs which allows new IDs to be added at runtime. The advantage is to avoid re-compilation of a driver that works for a new device, but it's ID table doesn't contain the new device. This mechanism is only meant for testing, after the driver has been tested successfully, the ID should be added in source code so that new revisions of the kernel automatically detect the device. The implementation follows the PCI implementation. The interface is documented in Documentation/pcmcia/driver.txt. Computations should be done in userspace, so the sysfs string contains the raw structure members for matching. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-03-31[PATCH] pcmcia: convert DEV_OK to pcmcia_dev_presentDominik Brodowski1-8/+4
Instead of the DEV_OK macro, drivers should use pcmcia_dev_present(). Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: use bitfield instead of p_state and stateDominik Brodowski1-16/+24
Instead of the two status values struct pcmcia_device->p_state and state, use descriptive bitfields. Most value-checking in drivers was invalid, as the core now only calls the ->remove() (a.k.a. detach) function in case the attachement _and_ configuration was successful. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: remove unused p_dev->state flagsDominik Brodowski1-3/+3
Remove the unused DEV_RELEASE_PENDING flag, and move the DEV_SUSPEND flag into the p_dev structure, and make use of it at the core level. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: remove dev_link_t and client_handle_t indirectionDominik Brodowski1-6/+1
dev_link_t * and client_handle_t both mean struct pcmcai_device * by now. Therefore, remove all such indirections. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: embed dev_link_t into struct pcmcia_deviceDominik Brodowski1-17/+14
Embed dev_link_t into struct pcmcia_device(), as they basically address the same entity. The actual contents of dev_link_t will be cleaned up step by step. This patch includes a bugfix from and signed-off-by Andrew Morton. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: rename pcmcia_device.stateDominik Brodowski1-1/+1
Rename pcmcia_device.state (which is used in very few places) to p_state in order to avoid a namespace collision when moving the deprecated dev_link_t into struct pcmcia_device Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: default suspend and resume handlingDominik Brodowski1-2/+1
In all but one case, the suspend and resume functions of PCMCIA drivers contain mostly of calls to pcmcia_release_configuration() and pcmcia_request_configuration(). Therefore, move this code out of the drivers and into the core. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: size reduction if ioctl isn't compiledDominik Brodowski1-2/+4
If the kernel is configured to not include the deprecated PCMCIA ioctl, some code doesn't need to be built. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: remove unused definesDominik Brodowski1-1/+0
Remove unused fields and declarations. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: access config_t using pointer instead of arrayDominik Brodowski1-0/+2
Access the PCMCIA config_t struct (one per device function) using a pointer in struct pcmcia_device, instead of looking them up in an array. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callbackDominik Brodowski1-5/+1
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[PATCH] pcmcia: remove old detach mechanismDominik Brodowski1-1/+0
Remove the old "detach" mechanism as it is unused now. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callbackDominik Brodowski1-0/+2
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function. Old functionality is preserved, for the moment. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05[PATCH] pcmcia: new suspend coreDominik Brodowski1-0/+6
Move the suspend and resume methods out of the event handler, and into special functions. Also use these functions for pre- and post-reset, as almost all drivers already do, and the remaining ones can easily be converted. Bugfix to include/pcmcia/ds.c Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2005-09-09[PATCH] pcmcia: add pcmcia to IRQ informationBrice Goglin1-0/+2
Add a devname parameter to the pcmcia_device structure, fills it with "pcmcia<bus_id>" in pcmcia_device_add, and passes it to request_irq in pcmcia_request_irq. Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.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-12[PATCH] pcmcia: fix pcmcia-cs compilationDominik Brodowski1-1/+4
Fix pcmcia-cs compilation with recent pcmcia kernel changes. 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[PATCH] pcmcia: remove client services versionPavel Roskin1-2/+0
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[PATCH] pcmcia: remove client_t usageDominik Brodowski1-9/+3
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[PATCH] pcmcia: move event handlerDominik Brodowski1-4/+4
Move the "event handler" to struct pcmcia_driver -- the unified event handler will disappear really soon, but switching it to struct pcmcia_driver in the meantime allows for better "step-by-step" patches. 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[PATCH] pcmcia: cleanupsDominik Brodowski1-2/+0
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[PATCH] pcmcia: device and driver matchingDominik Brodowski1-1/+6
The actual matching of pcmcia drivers and pcmcia devices. The original version of this was written by David Woodhouse. 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-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+200
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!