aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-06-02[PATCH] pcmcia: missing pcmcia_get_socket() result checkFlorin Malita1-0/+6
The result of pcmcia_get_socket() may be NULL but ds_event() uses it without checking. Coverity CID: 436. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-04-22[PATCH] pcmcia: remove unneeded forward declarationsAndrew Morton1-6/+2
Also remove a couple of unneeded typecasts. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-04-22[PATCH] pcmcia: do not set dev_node to NULL too earlyDominik Brodowski1-0/+2
If we set dev_node to NULL too early, some drivers which used this to determine whether unregister_netdev() needs to be called fail when removing a PCMCIA card. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-04-22[PATCH] pcmcia: fix comment for pcmcia_load_firmwareKomuro1-2/+2
The comment of "pcmcia_load_firmware" is wrong: the firmware(*.cis) files reside in /lib/firmware/ _not_ /lib/firmware/cis/ . Signed-off-by: komurojun-mbn@nifty.com Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-04-22[PATCH] pcmcia: unload second device firstKomuro1-1/+1
Use list_add instead of list_add_tail for pcmcia_device_add so that second device of multi-function-card will be unloaded first. Signed-off-by: komurojun-mbn@nifty.com Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: fix pcmcia_device_remove oopsHugh Dickins1-1/+1
Fix pcmcia_device_remove NULL pointer dereference at shutdown. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: pseudo device handling updateDominik Brodowski1-33/+48
If the driver for the primary pseudo device is removed from the device, the secondary driver must be removed as well -- it cannot exist on its own. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: convert DEV_OK to pcmcia_dev_presentDominik Brodowski1-0/+27
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-22/+19
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-23/+25
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-1/+0
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-11/+8
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-6/+6
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-4/+26
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: socket.functions starts with 1Dominik Brodowski1-2/+2
socket.functions is the number of functions, and so must be one larger than the maximum function number. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: size reduction if ioctl isn't compiledDominik Brodowski1-0/+2
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 include of config.hDominik Brodowski1-1/+0
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 Brodowski1-7/+7
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: make config_t independent, add reference countingDominik Brodowski1-27/+43
Handle config_t structs independent of struct pcmcia_socket, and add reference counting for them. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31[PATCH] pcmcia: access config_t using pointer instead of arrayDominik Brodowski1-0/+1
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-03-31[PATCH] pcmcia: permit single-character identifiersJanos Farkas1-1/+1
For some time, the core pcmcia drivers seem not to think single character prod_ids are valid, thus preventing the "cleverly" named "D" "Link DWL-650 11Mbps WLAN Card" Before (as in 2.6.16): PRODID_1="" PRODID_2="Link DWL-650 11Mbps WLAN Card" PRODID_3="Version 01.02" PRODID_4="" MANFID=0156,0002 FUNCID=6 After (with the patch) PRODID_1="D" PRODID_2="Link DWL-650 11Mbps WLAN Card" PRODID_3="Version 01.02" PRODID_4="" MANFID=0156,0002 FUNCID=6 Signed-off-by: Janos Farkas <chexum@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-10[PATCH] fix pcmcia_device_probe oopsHugh Dickins1-1/+1
Fix pcmcia_device_probe NULL pointer dereference at startup. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-01[PATCH] pcmcia: properly handle pseudo multi-function devicesDominik Brodowski1-18/+22
The second pseudo multi-function device of a PCMCIA card may only be configured once the first one is initialized. Therefore, delay the registration of the second device until the first one is initialized. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net
2006-01-13[PATCH] Add pcmcia_bus_type probe and remove methodsRussell King1-2/+2
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-12[PATCH] pcmcia: runtime powermanagement interfaceDominik Brodowski1-2/+35
With the "power/state" sysfs interface being deprecated, make another one available which is compatible to what was discussed on the linux PM mailinglist. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06[PATCH] pcmcia: kzalloc conversionDominik Brodowski1-7/+3
Convert users of kmalloc and memset to kzalloc Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callbackDominik Brodowski1-150/+27
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-60/+17
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-35/+62
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-06[PATCH] pcmcia: merge suspend into device modelDominik Brodowski1-10/+84
Merge the suspend and resume methods for 16-bit PCMCIA cards into the device model -- for both runtime power management and suspend to ram/disk. Bugfix in ds.c by Richard Purdie Signed-Off-By: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05[PATCH] pcmcia: new suspend coreDominik Brodowski1-0/+10
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>
2006-01-05[PATCH] pcmcia: validate_mem shouldn't be voidDominik Brodowski1-1/+3
Add a return value to pcmcia_validate_mem. Only if we have enough memory available to map the CIS, we should proceed in trying to determine information about the device. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-04[PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers1-25/+25
Leave the overloaded "hotplug" word to susbsystems which are handling real devices. The driver core does not "plug" anything, it just exports the state to userspace and generates events. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-12[PCMCIA] inform user of insertion and ejection eventsDominik Brodowski1-0/+3
Print out minimal information in dmesg whnever a CardBus or PCMCIA card is inserted into or ejected from a slot. This will make debugging certain types of bugs much easier, and is similar to output produced by other hotpluggable buses. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2005-10-28[PATCH] Driver core: pass interface to class interface methodsDmitry Torokhov1-2/+4
Driver core: pass interface to class intreface methods Pass interface as argument to add() and remove() class interface methods. This way a subsystem can implement generic add/remove handlers and then call interface-specific ones. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-09[PATCH] pcmcia: add pcmcia to IRQ informationBrice Goglin1-1/+9
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-09-09[PATCH] pcmcia: reduce ds.c stack footprintIngo Molnar1-6/+18
This patch reduces the stack footprint of pcmcia_device_query() from 416 bytes to 36 bytes. Signed-off-by: Ingo Molnar <mingo@elte.hu> 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-08-01[PATCH] pcmcia: fix multiple insertion of multifunction cardsDominik Brodowski1-1/+1
The ordering of setting and clearing device_add_pending went wrong on some occasions, causing multifunction cards only to be handled correctly on the first insertion, not on subsequent ones. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-28[PATCH] pcmcia: fix commentPavel Roskin1-2/+2
There are two problems with the message about missing callback functions: it's not written in correct English and it lacks newline at the end. 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: reduce client_handle_t usageDominik Brodowski1-28/+18
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: remove client_t usageDominik Brodowski1-22/+13
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-12/+20
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-30[PATCH] pcmcia: fix modalias attribute in sysfsDominik Brodowski1-1/+1
Fix up PCMCIA modalias file in sysfs 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: export modalias in sysfsDominik Brodowski1-2/+23
Provide a "modalias" entry in sysfs for PCMCIA devices. 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 Brodowski1-20/+2
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 Brodowski1-82/+41
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 Brodowski1-6/+6
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: clean up cs ds callbackDominik Brodowski1-5/+7
struct pcmcia_callback isn't needed for each socket, one is enough for all sockets. 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 Brodowski1-780/+15
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>
2005-06-27[PATCH] pcmcia: add a config option for the PCMICA ioctlDominik Brodowski1-3/+33
Add a new config option to control the building of the PCMCIA IOCTL. Currently, it is not yet made public, though the help text is there already. Signed-off-by: Dominik Brodowski <linux@dominikbrodowksi.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>