History log of /drivers/s390/cio/device.h
Revision Date Author Comments
de400d6b78d15a73023485f050bc6b1709dc7a79 30-Oct-2011 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] fix mismatch in summation of I/O IRQ statistics

Current IRQ statistics support does not show detail counts for I/O
interrupts which are processed internally only. The result is a
summation count which is way off such as this one:

CPU0 CPU1 CPU2
I/O: 1331 710 442
[...]
QAI: 15 16 16 [I/O] QDIO Adapter Interrupt
QDI: 1 0 0 [I/O] QDIO Interrupt
DAS: 706 645 381 [I/O] DASD
C15: 26 10 0 [I/O] 3215
C70: 0 0 0 [I/O] 3270
TAP: 0 0 0 [I/O] Tape
VMR: 0 0 0 [I/O] Unit Record Devices
LCS: 0 0 0 [I/O] LCS
CLW: 0 0 0 [I/O] CLAW
CTC: 0 0 0 [I/O] CTC
APB: 0 0 0 [I/O] AP Bus

Fix this by moving I/O interrupt accounting into the common I/O layer.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
60063497a95e716c9a689af3be2687d261f115b4 27-Jul-2011 Arun Sharma <asharma@fb.com> atomic: use <linux/atomic.h>

This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d5ab5276baf9fd8b581cfbf41b10b6d4eae55960 23-Mar-2011 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] ccw_bus_type: make it static

Make ccw_bus_type static. ccw_device drivers have to
use ccw_driver_register.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
76e6fb4b86446e4605379b99ad3dd3f96bb1696f 26-Feb-2010 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] ccw_device_notify: improve return codes

Callers of ccw_device_notify could not distinguish between a driver
who has no notifier registered and a driver who doesn't want to keep
a device after a certain event. Change this by adding proper return
codes.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
be5d3823f29c09676abd2eeea4f9767bc4a1a531 26-Feb-2010 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] cio: consolidate workqueues

We used to maintain 2 singlethreaded workqueues for synchronization
and to trigger work from interrupt context. Since our latest cio
changes we only use one of these workqueues. So get rid of the
unused workqueue, rename the remaining one to "cio_work_q" and move
its ownership to the channel subsystem driver.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
d7d12ef2befac4fed0dccaddff11338b654804df 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: make steal lock procedure more robust

An Unconditional Reserve + Release operation (steal lock) for a
boxed device may fail when encountering special error cases
(e.g. unit checks or path errors). Fix this by using the more
robust ccw_request infrastructure for performing the steal lock
CCW program.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
52ef0608e3ee4a511725e443c4b572fece22b353 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: use sense-pgid operation for path verification

Set-pgid operations fail for some device types under z/VM for which
the hypervisor has already set the pgid. Also reserved devices or
changed pgids are not correctly recognized. Fix these problems by
using a combination of sense-pgid and set-pgid and by also accepting
pre-defined pgid settings.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
4257aaecffab77bad43e12057f56a5590b360f9f 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: remove intretry flag

After changing all internal I/O functions to use the newly introduced
ccw request infrastructure, retries are handled automatically after a
clear operation. Therefore remove the internal retry flag and
associated code.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
9679baaf85b6e4dc662160bbbca344287ea6580d 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: use ccw request infrastructure for pgid

Use the newly introduced ccw request infrastructure to implement
pgid related operations: sense pgid, set pgid and disband pg.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
39f5360b3d68a8e96d280481d9c442e7c005c317 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: use ccw request infrastructure for sense id

Use the newly introduced ccw request infrastructure to implement
the sense id operation.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
e1f0fbd655539b0093738f58d57db83a0ac2dd6c 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: consistent infrastructure for internal I/O requests

Reduce code duplication by introducing a central infrastructure to
perform an internal I/O operation on a CCW device.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
736b5db895eb900c108fe9e9b1659c171481169e 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: handle error during device recognition consistently

Remove the return code from ccw_device_recognition and handle
recognition errors through the existing callback
ccw_device_recog_done to reduce cleanup code duplication.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
37de53bb52908726c18fc84515792a5b2f454532 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: introduce ccw device todos

Introduce a central mechanism for performing delayed ccw device work
to ensure that different types of work do not overwrite each other.
Prioritization ensures that the most important work is always
performed while less important tasks are either obsoleted or repeated
later.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
6afcc775d9d66fe550fad6c579f78b3c3da895b8 06-Oct-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: make not operational handling consistent

When a ccw device appears not operational, inform the associated
device driver and act according to the response: if the driver
wants to keep the device, put it into the disconnected state.
If not, or if there is no driver or if the device is not online,
unregister it. This approach is consistent with no-path event
handling.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2f17644d1cd0121daa0a997ff4eca5b3b44d1fae 22-Sep-2009 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] cio: merge init calls

Define initialization sequence of css and ccw bus init calls by merging
them into a single init call. Also introduce channel_subsystem_init_sync
to wait for the initialization of devices to finish.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
823d494ac11111064cf39abd4178ce299414c771 16-Jun-2009 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] pm: ccw bus power management callbacks

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
c4621a62649a56f155a96dfc5de479be226f0768 31-Mar-2009 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] cio: introduce ccw_device_schedule_sch_unregister

Introduce ccw_device_schedule_sch_unregister as a wrapper for queuing
ccw_device_call_sch_unregister on the slow_path_wq. This wrapper
will be used in the next patch.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
eb32ae8d0e052d1a287f99f93130ea2ad9af317e 26-Mar-2009 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: Use unbind/bind instead of unregister/register.

The common I/O layer may encounter a situation where the
device number of a ccw device has changed or a device
driver doesn't want to keep a formerly disconnected device
becoming operational again. Instead of using device_del()/
device_add() as now, we can just unbind the driver from the
device and rebind it to get the desired effect (rebinding)
with less overhead.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13952ec12dfeea793ff83c2a96139ed57eb0b897 25-Dec-2008 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] cio: introduce cio_commit_config

To change the configuration of a subchannel we alter the modifiable
bits of the subchannel's schib field and issue a modify subchannel.
There can be the case that not all changes were applied -or worse-
quietly overwritten by the hardware. With the next store subchannel
we obtain the current state of the hardware but lose our target
configuration.

With this patch we introduce a subchannel_config structure which
contains the target subchannel configuration. Additionally the msch
wrapper cio_modify is replaced with cio_commit_config which
copies the desired changes to a temporary schib. msch is then
called with the temporary schib. This schib is only written back
to the subchannel if all changes were applied.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
ecf5d9ef68b868b293b40b89615a92de7310d065 10-Oct-2008 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: introduce purge function for /proc/cio_ignore

Allow users to remove blacklisted ccw devices by using the
/proc/cio_ignore interface:

echo purge > /proc/cio_ignore

will remove all devices which are offline and blacklisted.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
91c36919a456589f4f073671474a1f899e0d3c2b 21-Aug-2008 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: call ccw driver notify function with lock held

Calling a ccw driver's notify function without the ccw device lock
held opens up a race window between discovery and handling of a change
in the device operational state. As a result, the device driver may
encounter unexpected device malfunction, leading to out-of-retry
situations or similar.

Remove race by extending the ccw device lock from state change
discovery to the calling of the notify function.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
c820de39bd083222f5be2563181c87493e436f7c 14-Jul-2008 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: Rework css driver.

Rework the css driver methods to provide sane callbacks for
subchannels of all types.

As a bonus, this cleans up and simplyfies the machine check
handling for I/O subchannels a lot.

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>
a806170e29c5468b1d641a22518243bdf1b8d58b 17-Apr-2008 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Fix a lot of sparse warnings.

Most noteable part of this commit is the new local header file entry.h
which contains all the function declarations of functions that get only
called from asm code or are arch internal. That way we can avoid extern
declarations in C files.
This is more or less the same that was done for sparc64.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
90ab133603d066e850fc9ed297b6eb52f888dd25 26-Jan-2008 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: introduce timed recovery procedure

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>
cd6b4f27b9bb2a6a5ec82b96b87c85421257be6c 26-Jan-2008 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: Introduce subchannel->private.

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>
602b20f2bf335d0d5fce11cb2ade22aa74e7ba25 26-Jan-2008 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: css_driver: Use consistent parameters.

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>
3f4cf6e72f9f6a0b046b32881acc4f829f3aaa46 12-Oct-2007 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: Avoid machine check vs. not operational races.

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>
2b67fc46061b2171fb8fbb55d1ac717abd533569 05-Feb-2007 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Get rid of a lot of sparse warnings.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
d7b5a4c94f49131811112526f7d404a50f0b5ca7 08-Dec-2006 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] Support for disconnected devices reappearing on another subchannel.

- create a 'pseudo_subchannel' per channel subsystem (the 'orphanage')
- use the orphanage as a shelter for ccw_devices that can't remain on the same
subchannel

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
c16375329c2ab4667df873394c4be7a61d163c62 08-Dec-2006 Martin Schwidefsky <schwidefsky@de.ibm.com> [S390] more workqueue fixes.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
3c9da7ba049d11caccc219576a3a23404aa2fc50 27-Oct-2006 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: Make ccw_device_register() static.

ccw_device_register() is only called from io_subchannel_register()
and io_subchannel_probe() and will never be called for possible
non-io subchannels.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
e7769b48a0216d7262fe2ba59b1b3697be462cbb 11-Oct-2006 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] cio: Remove grace period for vary off chpid.

The grace period handling introduced needless complexity. It didn't
help the dasd driver (which can handle terminated I/O just well),
and it doesn't help for long running channel programs (which won't
complete during the grace period anyway). Terminating I/O using a
path that just disappeared immediately is much more consistent with
what the user expects.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
94bb063312d872d9269deb2e5c0c7c6d5b0318e1 29-Jun-2006 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] rework of channel measurement facility.

Fixes for several channel measurement facility bugs:
* Blocks copied from the hardware might not be consistent. Solve this
by moving the copying into idle state and repeating the copying.
* avg_sample_interval changed with every read, even though no new block
was available. Solve this by storing a timestamp when the last new
block was received.
* Several locking issues.
* Measurements were not reenabled after a disconnected device became
available again.
* Remove #defines for ioctls that were never implemented.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
40154b824331cd9c81c06545761338f3d80a36e2 29-Jun-2006 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio async subchannel reprobe.

Changes in the DASD driver require an asynchronous implementation of the
subchannel reprobe loop. This loop was so far only used by the blacklisting
mechanism but is now available to all CCW device drivers.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
a8237fc4108060402d904bea5e1062e22e731969 06-Jan-2006 Cornelia Huck <cohuck@de.ibm.com> [PATCH] s390: introduce struct subchannel_id

This patch introduces a struct subchannel_id containing the subchannel number
(formerly referred to as "irq") and switches code formerly relying on the
subchannel number over to it.

While we're touching inline assemblies anyway, make sure they have correct
memory constraints.

Signed-off-by: Cornelia Huck <cohuck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

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!