summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Driver Core: Increase the default timeout value of the firmware subsystemDave Jones2007-02-071-1/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174589 The ipw driver sometimes takes a long time to load its firmware. Whilst the ipw driver should be using the async interface of the firmware loader to make this a non-issue, this is a minimal fix. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: allow to delay the uevent at device creation timeKay Sievers2007-02-071-1/+2
| | | | | | | | | | For the block subsystem, we want to delay all uevents until the disk has been scanned and allpartitons are already created before the first event is sent out. Signed-off-by: Kay Sievers <kay.sievers@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: add device_type to struct deviceKay Sievers2007-02-072-20/+41
| | | | | | | | | | | | | | | | | | | This allows us to add type specific attributes, uevent vars and release funtions. A subsystem can carry different types of devices like the "block" subsys has disks and partitions. Both types create a different set of attributes, but belong to the same subsystem. This corresponds to the low level objects: kobject -> device (object/device data) kobj_type -> device_type (type of object/device we are embedded in) kset -> class/bus (list of objects/devices of a subsystem) Signed-off-by: Kay Sievers <kay.sievers@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: add uevent vars for devices of a classKay Sievers2007-02-071-12/+34
| | | | | | | | | | | Devices converted from class_device to device should have the same uevent keys as the original class_device had. We search up the parents until we find the first bus device and add the (already deprecated) PHYDEV* values. Signed-off-by: Kay Sievers <kay.sievers@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: Change function call order in device_bind_driver().Cornelia Huck2007-02-071-2/+6
| | | | | | | | | | | Change function call order in device_bind_driver(). If we create symlinks (which might fail) before adding the device to the list we don't have to clean up afterwards (which we didn't). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: Don't stop probing on ->probe errors.Cornelia Huck2007-02-071-7/+6
| | | | | | | | | | | | Don't stop on the first ->probe error that is not -ENODEV/-ENXIO. There might be a driver registered returning an unresonable return code, and this stops probing completely even though it may make sense to try the next possible driver. At worst, we may end up with an unbound device. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core fixes: device_register() retval check in platform.cCornelia Huck2007-02-071-2/+9
| | | | | | | | Check the return value of device_register() in platform_bus_init(). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core fixes: make_class_name() retval checksCornelia Huck2007-02-072-13/+25
| | | | | | | | | Make make_class_name() return NULL on error and fixup callers in the driver core. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add the sysfs driver name to all modulesGreg Kroah-Hartman2007-02-071-1/+3
| | | | | | | | | This adds the module name to all USB drivers, if they are built into the kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/ Cc: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* SERIO: add the sysfs driver name to all modulesGreg Kroah-Hartman2007-02-071-2/+4
| | | | | | | | | This adds the module name to all SERIO drivers, if they are built into the kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/ Cc: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCI: add the sysfs driver name to all modulesGreg Kroah-Hartman2007-02-072-4/+7
| | | | | | | | | | | | This adds the module name to all PCI drivers, if they are built into the kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/ It also fixes up the IDE core, which was calling __pci_register_driver() directly. Cc: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: Allow device_move(dev, NULL).Cornelia Huck2007-02-071-29/+47
| | | | | | | | | | | | | | | | If we allow NULL as the new parent in device_move(), we need to make sure that the device is placed into the same place as it would if it was newly registered: - Consider the device virtual tree. In order to be able to reuse code, setup_parent() has been tweaked a bit. - kobject_move() can fall back to the kset's kobject. - sysfs_move_dir() uses the sysfs root dir as fallback. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: Remove device_is_registered() in device_move().Cornelia Huck2007-02-071-4/+0
| | | | | | | | | | | device_is_registered() will always be false for a device with no bus. Remove this check and trust the caller to know what they're doing. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Network: convert network devices to use struct device instead of class_deviceGreg Kroah-Hartman2007-02-0713-165/+222
| | | | | | | | | | | This lets the network core have the ability to handle suspend/resume issues, if it wants to. Thanks to Frederik Deweerdt <frederik.deweerdt@gmail.com> for the arm driver fixes. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: convert SPI code to use struct deviceGreg Kroah-Hartman2007-02-074-22/+22
| | | | | | | | | 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: <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: convert pcmcia code to use struct deviceGreg Kroah-Hartman2007-02-0713-104/+126
| | | | | | | | | | 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>
* Merge branch 'for-linus' of ↵Linus Torvalds2007-02-0610-74/+982
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid: USB HID: handle multi-interface devices for Apple macbook pro properly HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG USB HID: fix bogus comment in hid_get_class_descriptor() USB HID: remove hid_find_field_by_usage() HID: API - fix leftovers of hidinput API in USB HID HID: hid debug from hid-debug.h to hid layer hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter hid: quirk for multi-input devices with unneeded output reports hid: allow force feedback for multi-input devices
| * USB HID: handle multi-interface devices for Apple macbook pro properlySoeren Sonnenburg2007-02-051-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Some HID devices by Apple have both keyboard and mouse interfaces; the keyboard interface is handled by usbhid, but the mouse (really touchpad) interface must be handled by the separate 'appletouch' driver. Using HID_QUIRK_IGNORE will make hiddev ignore both interfaces, therefore a new quirk flag to ignore only the mouse interface is required. Signed-off-by: Soeren Sonnenburg <kernel@nn7.de> Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUGJiri Kosina2007-02-054-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending on it. Also, as we have new CONFIG_HID_DEBUG, this should be used on places where ifdef DEBUG was used before. Suggested by Adrian Bunk. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * USB HID: fix bogus comment in hid_get_class_descriptor()Jiri Kosina2007-02-051-1/+1
| | | | | | | | | | | | | | The comment in hid_get_class_descriptor() says a very obvious thing and is also violating codingstyle. Just remove it. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * USB HID: remove hid_find_field_by_usage()Jiri Kosina2007-02-051-17/+0
| | | | | | | | | | | | | | The unused hid_find_field_by_usage() function has been commented out for a pretty long time. Remove it completely. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: API - fix leftovers of hidinput API in USB HIDJiri Kosina2007-02-052-16/+16
| | | | | | | | | | | | | | | | | | hidinput_{open,close}() functions do not belong to usbhid, but to the generic HID layer. Move them, and fix hooks in struct hid_device, so that now the callbacks are done to transport-specific _open() functions, but not input_open() functions. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: hid debug from hid-debug.h to hid layerJiri Kosina2007-02-056-6/+791
| | | | | | | | | | | | | | | | | | | | | | hid-debug.h contains a lot of code, and should not therefore be a header. This patch moves the code to generic hid layer as .c source, and introduces CONFIG_HID_DEBUG to conditionally compile it, instead of playing with #define DEBUG and including hid-debug.h. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * hid: force feedback driver for PantherLord USB/PS2 2in1 AdapterAnssi Hannula2007-02-054-0/+143
| | | | | | | | | | | | | | | | Add a force feedback driver for PantherLord USB/PS2 2in1 Adapter, 0810:0001. The device identifies itself as "Twin USB Joystick". Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * hid: quirk for multi-input devices with unneeded output reportsAnssi Hannula2007-02-052-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports when enumerating reports on a hid-input device. Add this quirk and HID_QUIRK_MULTI_INPUT to 0810:0001. PantherLord Twin USB Joystick, 0810:0001 has separate input reports for 2 distinct game controllers in the same interface, so it needs HID_QUIRK_MULTI_INPUT. However, the device also contains one output report per controller which is used to control the force feedback function, and we do not want those to appear as separate input devices as well. The simplest approach seems to be to add a quirk to skip output reports on 0810:0001, and allow the force feedback driver to handle those. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * hid: allow force feedback for multi-input devicesAnssi Hannula2007-02-051-5/+1
| | | | | | | | | | | | | | | | | | | | Allow hid devices with HID_QUIRK_MULTI_INPUT to have force feedback. This was previously disabled because there were not any force feedback drivers for such devices. This will change with my upcoming patch. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-linus' of ↵Linus Torvalds2007-02-0620-403/+240
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband: IB/ehca: Remove obsolete prototypes IB/ehca: Remove use of do_mmap() RDMA/addr: Handle ethernet neighbour updates during route resolution IB: Make sure struct ib_user_mad.data is aligned IB/srp: Don't wait for response when QP is in error state. IB: Return qp pointer as part of ib_wc IB: Include <linux/kref.h> explicitly in <rdma/ib_verbs.h>
| * | IB/ehca: Remove obsolete prototypesHoang-Nam Nguyen2007-02-041-14/+0
| | | | | | | | | | | | | | | | | | | | | Remove prototypes for functions that don't exist. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | IB/ehca: Remove use of do_mmap()Hoang-Nam Nguyen2007-02-046-363/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes do_mmap() from ehca: - Call remap_pfn_range() for hardware register block - Use vm_insert_page() to register memory allocated for completion queues and queue pairs - The actual mmap() call/trigger is now controlled by user space, ie. libehca Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | RDMA/addr: Handle ethernet neighbour updates during route resolutionSteve Wise2007-02-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iWARP connection manager uses the ib_addr services to do route resolution (neighbour discovery in the IP world). The ib_addr netevent callback routine, however, currently only acts on InfiniBand neighbour updates. It needs to act on ethernet neighbour updates as well. This patch just removes filtering on device type altogether and will trigger on any neighour updates where the nud_type is valid. This simplifies the code some. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | IB/srp: Don't wait for response when QP is in error state.Ishai Rabinovitz2007-02-042-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is a call to send_tsk_mgmt SRP posts a send and waits for 5 seconds to get a response. When the QP is in the error state it is obvious that there will be no response so it is quite useless to wait. In fact, the timeout causes SRP to wait a long time to reconnect when a QP error occurs. (Each abort and each reset_device calls send_tsk_mgmt, which waits for the timeout). The following patch solves this problem by identifying the failure and returning an immediate error code. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | IB: Return qp pointer as part of ib_wcMichael S. Tsirkin2007-02-0411-24/+27
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct ib_wc currently only includes the local QP number: this matches the IB spec, but seems mostly useless. The following patch replaces this with the pointer to qp itself, and updates all low level drivers and all users. This has the following advantages: - Ability to get a per-qp context through wc->qp->qp_context - Existing drivers already have the qp pointer ready in poll cq, so this change actually saves a tiny bit (extra memory read) on data path (for ehca it would actually be expensive to find the QP pointer when polling a CQ, but ehca does not support SRQ so we can leave wc->qp as NULL for ehca) - Users that need the QP number can still get it through wc->qp->qp_num Use case: In IPoIB connected mode code, I have a common CQ shared by multiple QPs. To track connection usage, I need a way to get at some per-QP context upon the completion, and I would like to avoid allocating context object per work request just to stick a QP pointer into it. With this code, I can just use wc->qp->qp_context. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2007-02-0617-555/+847
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (32 commits) mmc: tifm: replace kmap with page_address mmc: sdhci: fix voltage ocr mmc: sdhci: replace kmap with page_address mmc: wbsd: replace kmap with page_address mmc: handle pci_enable_device() return value in sdhci mmc: Proper unclaim in mmc_block mmc: change wbsd mailing list mmc: Graceful fallback for fancy features mmc: Handle wbsd's stupid command list mmc: Allow host drivers to specify max block count mmc: Allow host drivers to specify a max block size tifm_sd: add suspend and resume functionality tifm_core: add suspend/resume infrastructure for tifm devices tifm_7xx1: prettify tifm_7xx1: recognize device 0xac8f as supported tifm_7xx1: switch from workqueue to kthread tifm_7xx1: Merge media insert and media remove functions tifm_7xx1: simplify eject function Add dummy_signal_irq function to save check in ISR Remove unused return value from signal_irq callback ...
| * | mmc: tifm: replace kmap with page_addressPierre Ossman2007-02-041-11/+4
| | | | | | | | | | | | | | | | | | | | | Since we actively avoid highmem, calling kmap_atomic() instead of page_address() is effectively only obfuscation. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: sdhci: fix voltage ocrPierre Ossman2007-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Some bad if-clauses caused the driver to just report the highest supported voltage, not all. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: sdhci: replace kmap with page_addressPierre Ossman2007-02-042-19/+6
| | | | | | | | | | | | | | | | | | | | | Since we actively avoid highmem, calling kmap_atomic() instead of page_address() is effectively only obfuscation. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: wbsd: replace kmap with page_addressPierre Ossman2007-02-042-31/+10
| | | | | | | | | | | | | | | | | | | | | Since we actively avoid highmem, calling kmap_atomic() instead of page_address() is effectively only obfuscation. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: handle pci_enable_device() return value in sdhciPierre Ossman2007-02-041-1/+3
| | | | | | | | | | | | | | | | | | Make sure we report back any errors from pci_enable_device(). Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: Proper unclaim in mmc_blockPierre Ossman2007-02-041-1/+2
| | | | | | | | | | | | | | | | | | Make sure we release the claim on the host even on failure. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: Graceful fallback for fancy featuresPierre Ossman2007-02-041-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMC high-speed, wide bus support and SD high-speed are functions that aren't critical for correct operation of the card. As such, they shouldn't mark the card as bad or dead when there is a failure activating these features. This is needed in particular on some really stupid hardware (e.g. Winbond's) where not all data transfer commands are supported. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: Handle wbsd's stupid command listPierre Ossman2007-02-041-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wbsd hardware is so incredibly brain damaged that it has an internal list of commands that result in data transfers. The result being that commands that aren't on this list aren't supported. Instead of locking up, waiting for a data interrupt that will never come, we try to fail a bit more gracefully. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: Allow host drivers to specify max block countPierre Ossman2007-02-0412-21/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many controllers have an upper limit on the number of blocks that can be transferred in one request. Allow the host drivers to specify this and make sure we avoid hitting this limit. Also change the max_sectors field to avoid confusion. This makes it map less directly to the block layer limits, but as they didn't apply directly on MMC cards anyway, this isn't a great loss. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: Allow host drivers to specify a max block sizePierre Ossman2007-02-0411-12/+43
| | | | | | | | | | | | | | | | | | | | | Most controllers have an upper limit on the block size. Allow the host drivers to specify this and make sure we avoid hitting this limit. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_sd: add suspend and resume functionalityAlex Dubov2007-02-041-1/+38
| | | | | | | | | | | | | | | Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_core: add suspend/resume infrastructure for tifm devicesAlex Dubov2007-02-041-1/+34
| | | | | | | | | | | | | | | Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_7xx1: prettifyAlex Dubov2007-02-041-16/+18
| | | | | | | | | | | | | | | | | | | | | Fix some spaces and tabs. No semantic changes are introduced. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_7xx1: recognize device 0xac8f as supportedAlex Dubov2007-02-041-5/+8
| | | | | | | | | | | | | | | | | | | | | This patch also adds symbolic defines for supported pci ids. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_7xx1: switch from workqueue to kthreadAlex Dubov2007-02-042-68/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As there's only one work item (media_switcher) to handle and it's effectively serialized with itself, I found it more convenient to use kthread instead of workqueue. This also allows for a working implementation of suspend/resume, which were totally broken in the past version. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_7xx1: Merge media insert and media remove functionsAlex Dubov2007-02-041-128/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware does not say whether card was inserted or removed when reporting socket events. Moreover, during suspend, media can be removed or switched to some other card type without notification. Therefore, for each socket in the change set the following is performed: 1. If there's active device in the socket it's unregistered 2. Media detection is performed 3. If detection recognizes supportable media, new device is registered This patch also alters some macros and variable names to enhance clarity. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | tifm_7xx1: simplify eject functionAlex Dubov2007-02-041-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | Eject function can take advantage of the socket_id field instead of explicit pointer comparison. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>