aboutsummaryrefslogtreecommitdiff
path: root/drivers/pcmcia/pcmcia_ioctl.c
AgeCommit message (Collapse)Author
2008-08-31pcmcia: remove unused argument to pcmcia_parse_tuple()Dominik Brodowski
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-31pcmcia: card services header cleanupDominik Brodowski
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-25pcmcia: merge ds_internal.h into cs_internal.hDominik Brodowski
Merge ds_internal.c into cs_internal.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: deprecate CS_BAD_TUPLEDominik Brodowski
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-23pcmcia: deprecate CS_BAD_ARGSDominik Brodowski
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-23pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZEDominik Brodowski
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-23pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGEDominik Brodowski
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-23pcmcia: deprecate CS_NO_MORE_ITEMSDominik Brodowski
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-23pcmcia: deprecate CS_NO_CARDDominik Brodowski
It means that no card can be detected in the socket, so return -ENODEV Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: deprecate CS_UNSUPPORTED_*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 <linux@dominikbrodowski.net>
2008-08-23pcmcia: deprecate CS_SUCCESSDominik 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 <linux@dominikbrodowski.net>
2008-08-23pcmcia: move pccard_get_configuration_info to ioctlDominik Brodowski
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-23Merge branches 'pcmcia-config-loop' and 'pcmcia-printk' into pcmciaDominik Brodowski
* pcmcia-config-loop: pcmcia: pcmcia_config_loop() improvement by passing vcc pcmcia: pcmcia_config_loop() default CIS entry handling pcmcia: pcmcia_config_loop() ConfigIndex unification pcmcia: use pcmcia_loop_config in misc pcmcia drivers pcmcia: use pcmcia_loop_config in net pcmcia drivers pcmcia: use pcmcia_loop_config in ISDN pcmcia drivers pcmcia: use pcmcia_loop_config in scsi pcmcia drivers pcmcia: use pcmcia_loop_config in bluetooth drivers pcmcia: use pcmcia_loop_config in pata and ide drivers pcmcia: add pcmcia_loop_config() helper * pcmcia-printk: pcmcia: don't add extra DEBUG cflag pcmcia: remove unused cs_socket_name() definition pcmcia: use dev_printk in module rsrc_nonstatic pcmcia: use dev_printk in module pcmcia pcmcia: use dev_printk in module pcmcia_core pcmcia: use dev_printk and dev_dbg in yenta_socket
2008-08-23pcmcia: don't add extra DEBUG cflagDominik 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 <sfr@canb.auug.org.au> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> ) Signed-off-by: Dominik Broodwski <linux@dominikbrodowski.net>
2008-08-02pcmcia: only copy CIS override data onceDominik Brodowski
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-07-14Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6Linus Torvalds
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
2008-06-24pcmcia: (re)move {pcmcia,pccard}_get_statusDominik Brodowski
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-24pcmcia: kill IN_CARD_SERVICESAdrian Bunk
IN_CARD_SERVICES was #define'd but not used, so let's remove it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: simplify pccard_validate_cisDominik Brodowski
As cisinfo_t only contains one unsigned_int, pccard_validate_cis can be simplified by passing that around directly. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: carve out ioctl adjust function to pcmcia_ioctlDominik Brodowski
Let pcmcia_ioctl interact with rsrc_nonstatic using functions which rsrc_nonstatic.c has to use anyway. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-05-18pcmcia: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-04-29drivers/pcmcia/pcmcia_ioctl.c: fix buildakpm@linux-foundation.org
argh. A hunk got lost from "proc: remove proc_bus" Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12[PATCH] mark struct file_operations const 5Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-07Driver core: convert pcmcia code to use struct deviceGreg Kroah-Hartman
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Cc: <linux-pcmcia@lists.infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-08[PATCH] struct path: convert pcmciaJosef Sipek
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-04[PATCH] pcmcia: handle __copy_from_user() return value in ioctlDominik Brodowski
Handle __copy_from_user() return value. drivers/pcmcia/pcmcia_ioctl.c:597: warning: ignoring return value of '__copy_from_user', declared with attribute warn_unused_result Noticed and first fix by Randy Dunlap. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-10-25[PATCH] PCMCIA: handle sysfs, PCI errorsJeff Garzik
Handle sysfs and PCI errors correctly. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-07-31[PATCH] pcmcia: fix ioctl for GET_STATUS and GET_CONFIGURATION_INFODaniel Ritz
the p_dev == NULL checks are wrong. the called functions handle a NULL p_dev on their own. w/o this patch output of cardcctl status and cardctl config is broken for cardbus cards or when the slot is empty. Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15[PATCH] pcmcia Oopses fixesBenjamin Herrenschmidt
Fix some NULL dereferences in the pcmcia code when using old userland tools. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31[PATCH] pcmcia: use bitfield instead of p_state and stateDominik Brodowski
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: embed dev_link_t into struct pcmcia_deviceDominik Brodowski
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: remove include of config.hDominik Brodowski
Remove the inclusion of include/config.h as it isn't needed any longer. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: use mutexes instead of semaphoresDominik Brodowski
Use mutexes in the PCMICA core, as they suffice for what needs to be done. Includes a bugfix from and Signed-off-by Andrew Morton. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: always use device pointer to config_tDominik Brodowski
Update the remaining users using the static lookup table of the PCMCIA function configuration to use the struct pcmcia_device-contained pointer. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2005-09-13[PATCH] pcmcia: warn on IOCTL usageDominik Brodowski
More visible user information of scheduled feature removal. 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 references to pcmcia/version.hDominik Brodowski
As a follow-up, remove the inclusion of pcmcia/version.h in many files. 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 Roskin
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-06-27[PATCH] pcmcia: properly handle all errors of register_chrdevDominik Brodowski
register_chrdev() can return errors (negative) other then -EBUSY, so check for any negative error code. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> 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: ds.c cleanupDominik Brodowski
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[PATCH] pcmcia: cs.c cleanupDominik Brodowski
Clean up cs.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[PATCH] pcmcia: remove unneeded includes in ds.cDominik Brodowski
Remove unnecessary includes in ds.c and pcmcia_ioctl.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[PATCH] pcmcia: merge struct pcmcia_bus_socket into struct pcmcia_socketDominik Brodowski
Merge struct pcmcia_bus_socket into struct pcmcia_socket. 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: make PCMCIA status a bitfieldDominik Brodowski
make pcmcia_bus_socket->state a bitfield, and rename it pcmcia_state to prepare for struct pcmcia_bus_socket integration into struct pcmcia_socket. 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: move PCMCIA ioctl to a separate fileDominik Brodowski
Move all PCMCIA_IOCTL-related code to a different file. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> From: Richard Purdie <rpurdie@rpsys.net> The pcmcia-move-pcmcia-ioctl-to-a-separate-file patch was corrupted in -mm2 causing this problem. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>