summaryrefslogtreecommitdiff
path: root/drivers/s390/cio
AgeCommit message (Collapse)Author
2008-04-17[S390] qdio: Unrecognized inbound traffic if many FCP devices are onlineUrsula Braun
Problem: Usually every FCP device has its own indicator field the adapter uses to signal outstanding work. Once a certain limit of devices is reached, a common indicator field is used. In certain scenarios qdio resets this common indicator field, but handles only part of the FCP-devices sharing the common indicator field. Thus inbound traffic on the non-processed shared FCP-devices is not recognized immediately. Solution: Make sure common indicator field is reset only, if all FCP-devices sharing the indicator are processed. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17[S390] cio: fix parallel cm_enable processing.Michael Ernst
It is now possible to trigger cm_enable processing several times in parallel without causing a kernel panic. Signed-off-by: Michael Ernst <mernst@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17[S390] cio: Trigger verification on device/path not operational.Cornelia Huck
Currently, we don't do much on no path or no device situations during normal user I/O, since we rely on reports regarding those events by the machine. If we trigger a path verification to bring our device state up-to-date, we (a) may recover from path failures earlier and (b) better handle situations where the hardware/hypervisor doesn't give us enough notifications. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17[S390] cio: Fix race for "fast" path gone/path back situations.Cornelia Huck
Make sure we wait for previous evaluations triggered by path state changes to have settled before we manipulate path states again. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-02-19[S390] qdio: FCP/SCSI write I/O stagnates on LPARUrsula Braun
If running on LPAR, qdio might overlook an incoming buffer in certain scenarios. The patch makes sure that incoming buffers are detected immediately in all situations. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19[S390] qdio: fix qdio_activate timeout handling.Heiko Carstens
Current code in qdio_activate waits for at least 5 seconds until it returns. It may return earlier if an error occurs, but not if everything is ok. This large timeout value became visible with commit dfa77f611ff295598e218aa0eb6efa73a5cf26d0 "qdio: set QDIO_ACTIVATE_TIMEOUT to 5s", which intended to fix the timeout value which was zero. In turn setting an FCP adapter online took 5 seconds. In practice waiting for 5ms before continuing is sufficient as pointed out by Utz Bacher and Cornelia Huck. Cc: Utz Bacher <utz.bacher@de.ibm.com> Cc: Jan Glauber <jan.glauber@de.ibm.com> Cc: Ursula Braun <braunu@de.ibm.com> Cc: Martin Peschke <mp3@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19[S390] cio: Do timed recovery on workqueue.Cornelia Huck
We can't do our recovery in softirq context, so we schedule it from our timer function. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19[S390] cio: Remember to initialize recovery_lock.Cornelia Huck
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-09[S390] qdio: avoid hang when establishing qdio queuesUrsula Braun
If qdio establish runs in parallel with a channel error, ccw_device_start_timeout may not trigger the qdio_timeout_handler. In this case neither QDIO_IRQ_STATE_ESTABLISHED nor QDIO_IRQ_STATE_ERR is reached and the following wait_event hangs forever. Solution: do not make use of the timeout option with ccw_device_start, but add a timeout to the following wait_event. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-05[S390] cio: Add shutdown callback for ccwgroup.Cornelia Huck
This intendeds to make proper shutdown of qeth devices easier. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-05[S390] cio: Clean up chsc response code handling.Cornelia Huck
This provides unified return codes for common response codes and also makes the debug feature messages more similar and informational. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-05[S390] cio: make sense id procedure work with partial hardware responsePeter Oberparleiter
In some cases the current sense id procedure trips over incomplete hardware responses. In these cases, checking against the preset value of 0xFFFF is not enough. More critically, the VM DIAG call will always be considered to have provided data after such an incident, even if it was not successful at all. The solution is to always initialize the control unit data before doing a sense id call. Check the condition code before considering the control unit data. And initialize again, before evaluating the VM data. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] usage of s390dbf: shrink number of debug areas to use.Peter Tiedemann
Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
2008-01-26[S390] constify function pointer tables.Jan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] drivers/s390: Add missing "space"Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] qdio: set QDIO_ACTIVATE_TIMEOUT to 5sUrsula Braun
Current definition of QDIO_ACTIVATE_TIMEOUT results in value 0. Thus it may cause endless wait in function qdio_activate(). Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] qdio: Remove double checked value.Sebastian Ott
Signed-off-by: Sebastian Ott <sebott@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: introduce timed recovery procedurePeter Oberparleiter
Add a timed recovery procedure to reactivate ccw devices in cases where HW/VM events are not sufficient to allow for proper recovery of reappearing channel paths. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: memory leak in cio processingMichael Ernst
Allocated kernel memory for locks is not freed in case of subchannel found to be invalid. Signed-off-by: Michael Ernst <mernst@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Fix ungroup vs. machine check race in ccwgroup.Cornelia Huck
There are two ways for a ccwgroup device to be unregistered: Via the ungroup attribute, or when on of the slave devices is killed by a machine check. As we have to unregister the ccwgroup device via a callback, we'll now have to check whether it hasn't been already unregistered because of a machine check. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Delete timer in ccw_device_verify_done().Cornelia Huck
Make sure pending timers are always deleted, even if we don't go through ccw_device_done(). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: reduce cpu utilization during device scanPeter Oberparleiter
Minimize calls to cpu intensive function get_subchannel_by_schid() by introducing function for_each_subchannel_staged() which temporarily caches the information about registered subchannels in a bitmap. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Set driver->owner on css, ccw and ccwgroup busses.Cornelia Huck
Set the owner field in the embedded struct device_driver to the value provided in the {css,ccw,ccwgroup}_driver. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Use dev_{g,s}et_drvdata().Cornelia Huck
Also define helpers sch_{g,s}et_cdev() to make the intention more clear. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: I/O subchannel specific fields.Cornelia Huck
Some fields may be !0 only for I/O subchannels. Add some checks where required. Also adapt cio_enable_subchannel() to make the caller specify the intparm, which makes it more generic. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Extend adapter interrupt interface.Peter Oberparleiter
From: Cornelia Huck <cornelia.huck@de.ibm.com> Change the adapter interrupt interface in order to allow multiple adapter interrupt handlers to be registered. Indicators are now allocated by cio instead of the device driver. The qdio parts have been Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Introduce subchannel->private.Cornelia Huck
Introduce a private pointer in struct subchannel to store per-subchannel type data (cannot use dev->priv since this is already used for something else). Create a new header io_sch.h for I/O subchannel specific structures and instructions. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Cleanup debug feature usage.Cornelia Huck
Cleanup cio_debug.h. Also make CIO_DEBUG add the "cio:" prefix to the printk string so that it isn't needed for the debug feature. Fix outdated comments for cio_debug_init() and clean it up. Enlarge cio_crw to the same size as cio_msg so we may actually find some relevant information there. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Add css_driver_{register,unregister}.Cornelia Huck
Add wrapper functions for driver_register and driver_unregister so that css drivers don't need to muck with struct device_driver directly. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Reset sch->driver.Cornelia Huck
sch->driver needs to be reset to NULL on failed probe and after remove. We also need to check for sch->driver on shutdown. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: css_driver: Use consistent parameters.Cornelia Huck
Make all callbacks in css_driver take a struct subchannel (and not a struct device). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Use helpers instead of container_of().Cornelia Huck
- Introduce to_cssdriver. - Use to_xxx instead of container_of where possible. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-01-26[S390] cio: Dump ccw device information in case of timeout.Sebastian Ott
Information about a ccw device will be dumped in case of a ccw timeout. This can be enabled with the kernel parameter ccw_timeout_log. Signed-off-by: Sebastian Ott <sebott@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-12-04[S390] cio: add missing reprobe loop end statementPeter Oberparleiter
Add loop end statement to prevent looping over empty subchannel sets. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-12-04[S390] cio: Issue SenseID per path.Cornelia Huck
We may receive a unit check for every path when we issue a SenseID. Unfortunately, the channel subsystem will try on a different path every time if we use a lpm of 0xff, which will exhaust our retry counter. Therefore, revert SenseID to its previous per-path behaviour and just leave out the suspend multipath reconnect. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-20[S390] cio: Register/unregister subchannels only from kslowcrw.Cornelia Huck
Make sure all subchannel handling is done on the slow path workqueue so that we don't have races between an old subchannel unregistering and a new subchannel with the same name registering. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-20[S390] cio: change device sense procedure to work with pav aliasesPeter Oberparleiter
Modify the sense id channel program to allow device sensing of pav alias devices which belong to a base device with ungrouped paths. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-05[S390] Fix priority mistakes in drivers/s390/cio/cmf.cRoel Kluin
Fixes priority mistakes similar to '!x & y' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-05[S390] cio: use INIT_WORK to initialize struct work.Heiko Carstens
Use INIT_WORK to initialize struct work and don't initialize a struct work partial by explicitly initializing its private structures. Fixes the following lockdep bug because no key was assigned: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. 0000000001f07bb8 0000000001f07bf8 0000000000000002 0000000000000000 0000000001f07c98 0000000001f07c10 0000000001f07c10 0000000000015406 0000000000000000 0000000000000002 0000000000000000 0000000000000000 0000000001f07bf8 000000000000000c 0000000001f07bf8 0000000001f07c68 000000000039ae60 0000000000015406 0000000001f07bf8 0000000001f07c48 Call Trace: ([<0000000000015376>] show_trace+0xda/0x104) [<0000000000015460>] show_stack+0xc0/0xf8 [<00000000000154c6>] dump_stack+0x2e/0x3c [<000000000006a71e>] __lock_acquire+0x47e/0x11a0 [<000000000006b4f0>] lock_acquire+0xb0/0xd8 [<00000000000555a6>] run_workqueue+0x1aa/0x24c [<00000000000556de>] worker_thread+0x96/0xf4 [<000000000005c210>] kthread+0x90/0xb4 [<000000000001947a>] kernel_thread_starter+0x6/0xc [<0000000000019474>] kernel_thread_starter+0x0/0xc Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-22[S390] cio: Fix incomplete commit for uevent suppression.Cornelia Huck
Commit fa1a8c23eb7d3ded8a3c6d0e653339a2bc7fca9e intended to introduce uevent suppression for subchannels, but half of it was lost somewhere. Now, we end up with two uevents for every registered subchannel :( So we should better add the missing part from http://marc.info/?l=linux-kernel&m=117515953113974&w=2. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-22[S390] cio: Use to_channelpath() for device to channel path conversion.Cornelia Huck
We already have a macro for that, so let's use it consistently... Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-19Convert files to UTF-8 and some cleanupsJan Engelhardt
* Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19remove asm/bitops.h includesJiri Slaby
remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-12Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits) PM: merge device power-management source files sysfs: add copyrights kobject: update the copyrights kset: add some kerneldoc to help describe what these strange things are Driver core: rename ktype_edd and ktype_efivar Driver core: rename ktype_driver Driver core: rename ktype_device Driver core: rename ktype_class driver core: remove subsystem_init() sysfs: move sysfs file poll implementation to sysfs_open_dirent sysfs: implement sysfs_open_dirent sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir sysfs: make sysfs_root a regular directory dirent sysfs: open code sysfs_attach_dentry() sysfs: make s_elem an anonymous union sysfs: make bin attr open get active reference of parent too sysfs: kill unnecessary NULL pointer check in sysfs_release() sysfs: kill unnecessary sysfs_get() in open paths sysfs: reposition sysfs_dirent->s_mode. sysfs: kill sysfs_update_file() ...
2007-10-12Driver core: change add_uevent_var to use a structKay Sievers
This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12[S390] qdio: change QDIO performance_stats error message priorityUrsula Braun
Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2007-10-12[S390] qdio: dont cast function pointers and use them to call functions.Heiko Carstens
According to C99 6.3.2.3 it's undefined what happens if a converted pointer is used to call a function whose type is not compatible with the pointed-to type. That's what the qdio code is doing, so fix it. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-12[S390] Get rid of a bunch of sparse warnings again.Heiko Carstens
Also removes a bunch of ^L in drivers/s390/cio/cmf.c Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-12[S390] cio: Avoid machine check vs. not operational races.Cornelia Huck
There was the possibilty that an action like ccw_device_set_offline() triggered by a device gone machine check might trigger a not oper event. Unfortunately, this could lead to the situation that we tried to unregister a subchannel twice: Once from the slow path evaluation, and once via the not oper event. Fix this by always using the same mechanism (css_schedule_eval()) for triggering the unregister. This makes sure that unregistration will only be done once. As an added bonus, it also simplyfies the code. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-12[S390] cio: Fix device attributes for early devices.Cornelia Huck
Don't forget to set dev->groups for early ccw devices like the console device so the default attributes are created. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>