History log of /drivers/s390/block/dasd.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f16330316321d1c388d13096f6858f5d2dac29dc 18-Jan-2012 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: revalidate server for new pathgroup

If a pathgroup is established we get an event and have to revalidate
the server to propagate supported features like PAV and enable them.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
ece2ccb668046610189d88d6aaf05aeb09c988a1 07-Jan-2012 Al Viro <viro@zeniv.linux.org.uk> Merge branches 'vfsmount-guts', 'umode_t' and 'partitions' into Z
f4ae40a6a50a98ac23d4b285f739455e926a473e 24-Jul-2011 Al Viro <viro@zeniv.linux.org.uk> switch debugfs to umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
/drivers/s390/block/dasd.c
ff01bb4832651c6d25ac509a06a10fcbd75c461c 16-Sep-2011 Al Viro <viro@zeniv.linux.org.uk> fs: move code out of buffer.c

Move invalidate_bdev, block_sync_page into fs/block_dev.c. Export
kill_bdev as well, so brd doesn't have to open code it. Reduce
buffer_head.h requirement accordingly.

Removed a rather large comment from invalidate_bdev, as it looked a bit
obsolete to bother moving. The small comment replacing it says enough.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
/drivers/s390/block/dasd.c
c8d1c0ff840bbf06c60ff4235202a4b1457d8f59 30-Oct-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: prevent path verification before resume

Mark the device as suspended and delay execution of the path
verification worker to prevent mix-up.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
5915a873fcb1cea5260940be519f2cdf898f7be3 30-Oct-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: re-initialize read_conf buffer for retries

The buffer for read configuration data has to be initialized with an
EBCDIC string to show support for extended UIDs to z/VM.
If this read configuration data CQR needs to be retried, the buffer
may have changed in between. So re-initialize the buffer to get a
correct extended UID under z/VM.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
214b8ffc205bcf2ca5b04b3903be13a9257c3fbd 30-Oct-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: wait for terminated request

After terminating a request in the dasd_sleep_on_immediatly function,
wait for the clear interrupt to be received before starting the
new request. This prevents the requests from getting mixed up.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
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>
/drivers/s390/block/dasd.c
e4258d55bff06780cd424c671b576a90acc1592f 03-Aug-2011 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: use vmalloc for statistics input buffer

The size of the buffer that is used to store DASD statistics input
strings depends on the user input. If the input string is to large,
the write operation could fail with -ENOMEM. To avoid this, use
vmalloc instead of kmalloc.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
/drivers/s390/block/dasd.c
4fa52aa7a82f9226b3874a69816bda3af821f002 24-Jul-2011 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: add enhanced DASD statistics interface

This patch extends the DASD statistics to allow for a more detailed
analysis of DASD I/O operations. In particular we want the statistics
to provide answers to the following questions:
- How many requests used a PAV alias?
- How many requests used High Performance FICON?
- How do read request perform versus write requests?

The existing DASD statistics interface has several shortcomings
- The interface for global data is a formatted text table in procfs
(/proc/dasd/statistics). The layout is meant for human readers and
is not to easy to parse. If values get to large for the table
layout, they get scaled down.
- The statistics which are collected per block device can be
accessed via an ioctl interface, which can only be extended by
defining a new ioctl.
- There is no statistics interface for individual PAV base and alias
devices.

To overcome theses shortcomings we create a new DASD statistics
interface in debugfs. This interface will contain one entry for global
data, one per DASD block device, and one per DASD base and alias
device. Each file contains the statistic data in easy to parse
name/value and name/array pairs. The existing interfaces will remain
functional, but they will not be extended.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
aade6c0dfb46ff7ce7df0ed7a2ef15d2d3c47f05 10-May-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: prevent IO error during reserve/release loop

The termination of running CQR caused by reserve/release operations
may lead to an IO error if reserve/release is done in a tight loop.
Prevent this by increasing the retry counter after termination.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
65f8da475995f667af5298c644707dbd9d646ca6 20-Apr-2011 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix race between open and offline

The dasd_open function uses the private_data pointer of the gendisk to
find the dasd_block structure that matches the gendisk. When a DASD
device is set offline, we set the private_data pointer of the gendisk
to NULL and later remove the dasd_block structure, but there is still
a small race window, in which dasd_open could first read a pointer
from the private_data field and then try to use it, after the structure
has already been freed.
To close this race window, we will store a pointer to the dasd_devmap
structure of the base device in the private_data field. The devmap
entries are not deleted, and we already have proper locking and
reference counting in place, so that we can safely get from a devmap
pointer to the dasd_device and dasd_block structures of the device.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
7eaceaccab5f40bbfda044629a6298616aeaed50 10-Mar-2011 Jens Axboe <jaxboe@fusionio.com> block: remove per-queue plugging

Code has been converted over to the new explicit on-stack plugging,
and delay users have been converted to use the new API for that.
So lets kill off the old plugging along with aops->sync_page().

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/drivers/s390/block/dasd.c
09a8e7adcf960bd6a7204f3f3b377a89ce22efbf 05-Jan-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: Correct retry counter for terminated I/O.

In case the DASD driver needs to term a running I/O the retry counter
is decreased twice.
Remove the unnecessary retry counter decrease in das_term_IO.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
e4dbb0f2b5dd6a836d0e5c60aa5f573e0bbcf76a 05-Jan-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: Add support for raw ECKD access.

Normal I/O operations through the DASD device driver give only access
to the data fields of an ECKD device even for track based I/O.
This patch extends the DASD device driver to give access to whole
ECKD tracks including count, key and data fields.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6f272b9cec285a9610a2acf101f694bc58bed37e 05-Jan-2011 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: Prevent deadlock during suspend/resume.

The freeze callback may set a stop bit so that a worker thread could
not start I/O. The discipline specific freeze function waits for the
worker to be completed.
Set the stop_bit after the discipline specific freeze function has
returned and no worker is running.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
5a27e60dec59a95bd7f8ae9a19ae2ede4f76395b 05-Jan-2011 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: Improve handling of stolen DASD reservation

If a DASD device has been reserved by a Linux system, and later
this reservation is ‘stolen’ by a second system by means of an
unconditional reserve, then the first system receives a
notification about this fact. With this patch such an event can
be either ignored, as before, or it can be used to let the device
fail all I/O request, so that the device will not block anymore.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
a4d26c6aeceea330ee5e0fb6b017d57e3b252d29 05-Jan-2011 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: do path verification for paths added at runtime

When a new path is added at runtime, the CIO layer will call the drivers
path_event callback. The DASD device driver uses this callback to trigger
a path verification for the new path. The driver will use only those
paths for I/O, which have been successfully verified.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
ef19298b406f93af4bb249f0776deb8366e97532 05-Jan-2011 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: add High Performance FICON multitrack support

Some storage systems support multitrack High Performance FICON
requests, which read or write data to more than one track.
This patch enables the DASD device driver to generate multitrack
High Performance FICON requests.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
3283942b71eb5023184b378230f5f0e3fbb40991 05-Jan-2011 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] dasd: add support for irq statistics

Add support for DASD I/O interrupt statistics in /proc/interrupts.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
56b86b615b807e043339979878a2de88f900ee4f 25-Oct-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: ignore unsolicited interrupts for DIAG

For the DASD DIAG discipline IO is started through special diagnose
calls. Unsolicited interrupts may contain information about the device
itself. But this information is not needed because the device is not
used directly.
Fix the case that an unimplemented dicipline function may be called
by ignoring unsolicited interrupts for the DIAG disciplin.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
a5a0061fb3a22bbd9b108af8382142fd0f41ebee 25-Oct-2010 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix unsolicited interrupt recognition

The dasd interrupt handler needs to distinguish solicited from
unsolicited interrupts, as unsolicited interrupts may require special
handling (e.g. summary unit checks) and solicited interrupts require
proper error recovery for the failed I/O request.
The interrupt handler needs to check several bit fields in the
interrupt response block (irb) to make this distinction.
So far our check of the status control bits has not been specific
enough, which may lead to a failed request getting just retried
instead of the necessary error recovery.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
a2887097f25cd38cadfc11d10769e2b349fb5eca 23-Oct-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block

* 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block: (46 commits)
xen-blkfront: disable barrier/flush write support
Added blk-lib.c and blk-barrier.c was renamed to blk-flush.c
block: remove BLKDEV_IFL_WAIT
aic7xxx_old: removed unused 'req' variable
block: remove the BH_Eopnotsupp flag
block: remove the BLKDEV_IFL_BARRIER flag
block: remove the WRITE_BARRIER flag
swap: do not send discards as barriers
fat: do not send discards as barriers
ext4: do not send discards as barriers
jbd2: replace barriers with explicit flush / FUA usage
jbd2: Modify ASYNC_COMMIT code to not rely on queue draining on barrier
jbd: replace barriers with explicit flush / FUA usage
nilfs2: replace barriers with explicit flush / FUA usage
reiserfs: replace barriers with explicit flush / FUA usage
gfs2: replace barriers with explicit flush / FUA usage
btrfs: replace barriers with explicit flush / FUA usage
xfs: replace barriers with explicit flush / FUA usage
block: pass gfp_mask and flags to sb_issue_discard
dm: convey that all flushes are processed as empty
...
cfdb00a77ea7d5fb922fd985e5dfbcb36873411b 31-May-2010 Arnd Bergmann <arnd@arndb.de> s390/block: kill the big kernel lock

The dasd and dcssblk drivers gained the big
kernel lock in the recent pushdown from the
block layer, but they don't really need it,
so remove the calls without a replacement.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
/drivers/s390/block/dasd.c
4913efe456c987057e5d36a3f0a55422a9072cae 03-Sep-2010 Tejun Heo <tj@kernel.org> block: deprecate barrier and replace blk_queue_ordered() with blk_queue_flush()

Barrier is deemed too heavy and will soon be replaced by FLUSH/FUA
requests. Deprecate barrier. All REQ_HARDBARRIERs are failed with
-EOPNOTSUPP and blk_queue_ordered() is replaced with simpler
blk_queue_flush().

blk_queue_flush() takes combinations of REQ_FLUSH and FUA. If a
device has write cache and can flush it, it should set REQ_FLUSH. If
the device can handle FUA writes, it should also set REQ_FUA.

All blk_queue_ordered() users are converted.

* ORDERED_DRAIN is mapped to 0 which is the default value.
* ORDERED_DRAIN_FLUSH is mapped to REQ_FLUSH.
* ORDERED_DRAIN_FLUSH_FUA is mapped to REQ_FLUSH | REQ_FUA.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Cc: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/drivers/s390/block/dasd.c
625c94df22fb4247c8ccd54635a8ec77cb60d651 13-Aug-2010 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] dasd: fix format string types

Get rid of these warnings:

drivers/s390/block/dasd.c: In function '__dasd_device_check_expire':
drivers/s390/block/dasd.c:1330: warning: format '%i' expects type 'int', but argument 4 has type 'long unsigned int'
drivers/s390/block/dasd.c:1337: warning: format '%i' expects type 'int', but argument 4 has type 'long unsigned int'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6e9624b8caec290d28b4c6d9ec75749df6372b87 07-Aug-2010 Arnd Bergmann <arnd@arndb.de> block: push down BKL into .open and .release

The open and release block_device_operations are currently
called with the BKL held. In order to change that, we must
first make sure that all drivers that currently rely
on this have no regressions.

This blindly pushes the BKL into all .open and .release
operations for all block drivers to prepare for the
next step. The drivers can subsequently replace the BKL
with their own locks or remove it completely when it can
be shown that it is not needed.

The functions blkdev_get and blkdev_put are the only
remaining users of the big kernel lock in the block
layer, besides a few uses in the ioctl code, none
of which need to serialize with blkdev_{get,put}.

Most of these two functions is also under the protection
of bdev->bd_mutex, including the actual calls to
->open and ->release, and the common code does not
access any global data structures that need the BKL.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/drivers/s390/block/dasd.c
00fff26539bfe3fad21c164fc4002d9ede056fb0 03-Jul-2010 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> block: remove q->prepare_flush_fn completely

This removes q->prepare_flush_fn completely (changes the
blk_queue_ordered API).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/drivers/s390/block/dasd.c
a23ed009a726feeafdbabeaf5f0bde1a3f04d121 26-May-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: unit check handling during internal cio I/O

React on unit checks during cio internal I/O.
Handle as unsolicited interrupt and advice cio to retry.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
501183f2ed74434e30a1b039b2f3af30f1f3f461 17-May-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: add dynamic pav toleration

For base Parallel Access Volume (PAV) there is a fixed mapping of
base and alias devices. With dynamic PAV this mapping can be changed
so that an alias device is used with another base device.
This patch enables the DASD device driver to tolerate dynamic PAV
changes.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
1c1e093cbf6d3a7576ba0bd10363362a1c5c74ee 12-May-2010 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix race between tasklet and dasd_sleep_on

The various dasd_sleep_on functions use a global wait queue when
waiting for a cqr. The wait condition checks the status and devlist
fields of the cqr to determine if it is safe to continue. This
evaluation may return true, although the tasklet has not finished
processing of the cqr and the callback function has not been called
yet. When the callback is finally called, the data in the cqr may
already be invalid. The sleep_on wait condition needs a safe way to
determine if the tasklet has finished processing. Use the
callback_data field of the cqr to store a token, which is set by
the callback function itself.

Cc: <stable@kernel.org>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6a5176c474e3e722ab273d940442238e554e5e58 22-Apr-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix endless loop in erp

If not enough memory is available to build a new erp request it ended
up in an endless loop trying to build erp requests. Fixed the loop to
proceed the next request instead.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
33b62a30f78536b976183cc764c08038ac011e0a 08-Mar-2010 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: automatic recognition of read-only devices

In z/VM it is possible to attach a device as read-only. To prevent
unintentional write requests and subsequent I/O errors, we can detect
this configuration using the z/VM DIAG 210 interface and set the
respective linux block device to read-only as well.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
b1bf9368407ae7e89d8a005bb40beb70a41df539 01-Mar-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block

* 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block: (38 commits)
block: don't access jiffies when initialising io_context
cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds
block: fix for "Consolidate phys_segment and hw_segment limits"
cfq-iosched: quantum check tweak
blktrace: perform cleanup after setup error
blkdev: fix merge_bvec_fn return value checks
cfq-iosched: requests "in flight" vs "in driver" clarification
cciss: Fix problem with scatter gather elements in the scsi half of the driver
cciss: eliminate unnecessary pointer use in cciss scsi code
cciss: do not use void pointer for scsi hba data
cciss: factor out scatter gather chain block mapping code
cciss: fix scatter gather chain block dma direction kludge
cciss: simplify scatter gather code
cciss: factor out scatter gather chain block allocation and freeing
cciss: detect bad alignment of scsi commands at build time
cciss: clarify command list padding calculation
cfq-iosched: rethink seeky detection for SSDs
cfq-iosched: rework seeky detection
block: remove padding from io_context on 64bit builds
block: Consolidate phys_segment and hw_segment limits
...
b695adfaa118fd7c50eca8990e348dd7372ee0aa 26-Feb-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: correct offline processing

Flushing the dasd ccw request queue may stop the processing of the
block device request queue. Destroy partitions may wait for
outstanding requests and thus hang.
Swapping dasd_destroy_partitions and dasd_flush_request_queue so that
the request queue is empty before dasd_destroy_partitions is called.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
589c74d5076dd1bde13a5a36d97ca79be8bd72b2 26-Feb-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix refcounting.

The function dasd_device_from_cdev returns a reference to the dasd
device and increases the refcount by one. If an exception occurs,
the refcount was not decreased in all cases
e.g. in dasd_discipline_show.
Prevent the offline processing from hang by correcting two functions
to decrease the refcount even if an error occured.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
9eb251225ab4dbea3119cfcf4c5194eed223a740 26-Feb-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix online/offline race

Setting a DASD online and offline in quick succession may cause
a kernel panic or let the chhccwdev command wait forever.
The Online process is split into two parts. After the first part
is finished the offline process may be called. This may result
in a situation where the second online processing part tries to
set the DASD offline as well.
Use a mutex to protect online and offline against each other.
Also correct some checking.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
8a78362c4eefc1deddbefe2c7f38aabbc2429d6b 26-Feb-2010 Martin K. Petersen <martin.petersen@oracle.com> block: Consolidate phys_segment and hw_segment limits

Except for SCSI no device drivers distinguish between physical and
hardware segment limits. Consolidate the two into a single segment
limit.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
086fa5ff0854c676ec333760f4c0154b3b242616 26-Feb-2010 Martin K. Petersen <martin.petersen@oracle.com> block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectors

The block layer calling convention is blk_queue_<limit name>.
blk_queue_max_sectors predates this practice, leading to some confusion.
Rename the function to appropriately reflect that its intended use is to
set max_hw_sectors.

Also introduce a temporary wrapper for backwards compability. This can
be removed after the merge window is closed.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
294001a80c9810e2fe27aaaad7df8be12a103065 27-Jan-2010 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix possible NULL pointer errors

Fix possible NULL pointer in DASD messages and correct discipline
checking.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
b8ed5dd54895647c2690575aad6f07748c2c618a 07-Dec-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: remove strings from s390dbf

Remove strings from s390 debugfeature entries that could lead to a
crash when the data is read from dbf because the strings do not exist
any more.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
eb6e199bef288611157b8198c25d12b32bf058d0 07-Dec-2009 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: improve error recovery for internal I/O

Most of the error conditions reported by a FICON storage server
indicate situations which can be recovered. Sometimes the host just
needs to retry an I/O request, but sometimes the recovery
is more complex and requires the device driver to wait, choose
a different path, etc.

The DASD device driver has a fully featured error recovery
for normal block layer I/O, but not for internal I/O request which
are for example used during the device bring up.
This can lead to situations where the IPL of a system fails because
DASD devices are not properly recognized.
This patch will extend the internal I/O handling to use the existing
error recovery procedures.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
779c27820a6bd53523a34551aa6004045a060dcf 07-Dec-2009 Christian Borntraeger <borntraeger@de.ibm.com> [S390] dasd: remove dead code

the todclk.h header file is dead code. Remove it.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
454e1fa1ebae7cff707b2e3f12b775c263c8408b 07-Dec-2009 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: split PGID settings and status

Split setting (driver wants feature enabled) and status (feature
setup was successful) for PGID related ccw device features so that
setup errors can be detected. Previously, incorrectly handled setup
errors could in rare cases lead to erratic I/O behavior and
permanently unusuable devices.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
d9fa9441ed6e0467d7d41de730581874c997e658 14-Oct-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: use idal for device characteristics

If the rdc_buffer is above 2G we need indirect addresssing so we have
to use an idaw to give the rdc_buffer to the ccw.
If the rdc_buffer is under 2G nothing changes.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6fca97a958bc3c67566aa91eafc6a5be2e66d6b3 06-Oct-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix race condition in resume code

There is a race while re-reading the device characteristics. After
cleaning the memory area a cqr is build which reads the device
characteristics. This may take a rather long time and the device
characteristics structure is zero during this. Now it could be
possible that the block tasklet starts working and a new cqr will be
build. The build_cp command refers to the device characteristics
structure and this may lead into a divide by zero exception.
Fix this by re-reading the device characteristics into a temporary
structur and copy the data to the original structure. Also take the
ccwdev_lock.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e 22-Sep-2009 Alexey Dobriyan <adobriyan@gmail.com> const: make block_device_operations const

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/s390/block/dasd.c
68b781fe1bed89011ab7c58ede8476abe64432d2 11-Sep-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: optimize cpu usage in goodcase

remove unnecessary dbf call, remove string operations for magic

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
97f604b07473669f4da52b1f859ee45e8d48d42a 11-Sep-2009 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fail requests when device state is less then ready

A DASD device that is not ready or online has no defined disk layout,
so all requests that arrive in such a state need to be returned as
failed.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
cf05b824dbb871159e1b4c4f2733b9c9d2f756cf 23-Aug-2009 Julia Lawall <julia@diku.dk> [S390] drivers/s390: put NULL test before dereference

If the NULL test on block is needed, it should be before the dereference of
the base field.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression E1,E2;
identifier fld;
statement S1,S2;
@@

E1 = E2->fld;
(
if (E1 == NULL) S1 else S2
|
*if (E2 == NULL) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
181d95229b0931ee2ce6aad7348079cbc10e8d05 22-Jun-2009 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] dasd: fix refcounting in dasd_change_state

To set a dasd online dasd_change_state is called twice. The first
cycle will schedule initial analysis of the device, set the rc to
-EAGAIN and will not touch the device state any more.
The initial analysis will in turn call dasd_change_state to increase
the state to the final DASD_STATE_ONLINE.

If the dasd_change_state on the second thread outruns the other one
both finish with the state set to DASD_STATE_ONLINE and the device
refcount will be decreased by 2.

Fix this by leaving dasd_change_state on rc == -EAGAIN so that the
refcount will always be decreased by 1.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
e6125fba81e362d9b314d10893af1d9dc5658f33 22-Jun-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd_pm: fix stop flag handling

The stop flags are handled in the generic restore function so the
stop flag is removed also for FBA and DIAG devices.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
d41dd122acf960db78c9ddc87684b43751dd36d9 16-Jun-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] pm: dasd power management callbacks.

Introduce the power management callbacks to the dasd driver. On suspend
the dasd devices are stopped and removed from the focus of alias
management.
On resume they are reinitialized by rereading the device characteristics
and adding the device to the alias management.
In case the device has gone away during suspend it will caught in the
suspend state with stopped flag set to UNRESUMED. After it appears again
the restore function is called again.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6cc7f168954fe8b3d8988a90b2478a9c11c5ebcb 12-Jun-2009 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: forward internal errors to dasd_sleep_on caller

If a DASD requests is started with dasd_sleep_on and fails, then the
calling function may need to know the reason for the failure.
In cases of hardware errors it can inspect the sense data in the irb,
but when the reason is internal (e.g. start_IO failed) then it needs
a meaningfull return code.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
92636b152f3b58e459988934f689619af9e04dbc 12-Jun-2009 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] dasd: check_characteristics cleanup

Fix a broken memset (sizeof pointer vs sizeof the underlying
structure) by cleaning up the involved functions.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1 22-May-2009 Martin K. Petersen <martin.petersen@oracle.com> block: Do away with the notion of hardsect_size

Until now we have had a 1:1 mapping between storage device physical
block size and the logical block sized used when addressing the device.
With SATA 4KB drives coming out that will no longer be the case. The
sector size will be 4KB but the logical block size will remain
512-bytes. Hence we need to distinguish between the physical block size
and the logical ditto.

This patch renames hardsect_size to logical_block_size.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
9934c8c04561413609d2bc38c6b9f268cba774a4 08-May-2009 Tejun Heo <tj@kernel.org> block: implement and enforce request peek/start/fetch

Till now block layer allowed two separate modes of request execution.
A request is always acquired from the request queue via
elv_next_request(). After that, drivers are free to either dequeue it
or process it without dequeueing. Dequeue allows elv_next_request()
to return the next request so that multiple requests can be in flight.

Executing requests without dequeueing has its merits mostly in
allowing drivers for simpler devices which can't do sg to deal with
segments only without considering request boundary. However, the
benefit this brings is dubious and declining while the cost of the API
ambiguity is increasing. Segment based drivers are usually for very
old or limited devices and as converting to dequeueing model isn't
difficult, it doesn't justify the API overhead it puts on block layer
and its more modern users.

Previous patches converted all block low level drivers to dequeueing
model. This patch completes the API transition by...

* renaming elv_next_request() to blk_peek_request()

* renaming blkdev_dequeue_request() to blk_start_request()

* adding blk_fetch_request() which is combination of peek and start

* disallowing completion of queued (not started) requests

* applying new API to all LLDs

Renamings are for consistency and to break out of tree code so that
it's apparent that out of tree drivers need updating.

[ Impact: block request issue API cleanup, no functional change ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Mike Miller <mike.miller@hp.com>
Cc: unsik Kim <donari75@gmail.com>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Laurent Vivier <Laurent@lvivier.info>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Stefan Weinhuber <wein@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
83096ebf1263b2c1ee5e653ba37d993d02e3eb7b 07-May-2009 Tejun Heo <tj@kernel.org> block: convert to pos and nr_sectors accessors

With recent cleanups, there is no place where low level driver
directly manipulates request fields. This means that the 'hard'
request fields always equal the !hard fields. Convert all
rq->sectors, nr_sectors and current_nr_sectors references to
accessors.

While at it, drop superflous blk_rq_pos() < 0 test in swim.c.

[ Impact: use pos and nr_sectors accessors ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tested-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Mike Miller <mike.miller@hp.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Dario Ballabio <ballabio_dario@emc.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: unsik Kim <donari75@gmail.com>
Cc: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
40cbbb781d3eba5d6ac0860db078af490e5c7c6b 23-Apr-2009 Tejun Heo <tj@kernel.org> block: implement and use [__]blk_end_request_all()

There are many [__]blk_end_request() call sites which call it with
full request length and expect full completion. Many of them ensure
that the request actually completes by doing BUG_ON() the return
value, which is awkward and error-prone.

This patch adds [__]blk_end_request_all() which takes @rq and @error
and fully completes the request. BUG_ON() is added to to ensure that
this actually happens.

Most conversions are simple but there are a few noteworthy ones.

* cdrom/viocd: viocd_end_request() replaced with direct calls to
__blk_end_request_all().

* s390/block/dasd: dasd_end_request() replaced with direct calls to
__blk_end_request_all().

* s390/char/tape_block: tapeblock_end_request() replaced with direct
calls to blk_end_request_all().

[ Impact: cleanup ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mike Miller <mike.miller@hp.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/s390/block/dasd.c
f3445a1a656bc26b07946cc6d20de1ef07c8d116 14-Apr-2009 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] dasd: Use the new async framework for autoonlining.

The dasd driver can automatically online detected dasds, which
especially important for finding the root device. Currently,
it will wait for each online operation to finish individually,
which may take long if many dasds need to be onlined. When using
the new async framework, these onlining operations can run in
parallel and presence of the root device is ensured by the fact
that prepare_namespace() waits for all async threads to finish.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
47593bfa1056d306fde067b28dd8617009be4121 31-Mar-2009 Sebastian Ott <sebott@linux.vnet.ibm.com> [S390] cio: introduce notifier for boxed state

If a ccw device did not respond in time during internal io, we set it
into boxed state. With this patch we have the following behaviour:
* the ccw driver will get a notification if the device was online and
goes into the boxed state
* if the device was disconnected and got boxed nothing special is to be
done (it will be handled in reprobing later)
* if the device got boxed while initial sensing it will be unregistered

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
fc19f381b3828aa4f8a3417dbefc3418ec6bbe10 26-Mar-2009 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: message cleanup

Moved some Messages into s390 debug feature and changed remaining
messages to use the dev_xxx and pr_xxx macros.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
f3eb5384cf0325c02e306b1d81e70f81a03d7432 26-Mar-2009 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: add High Performance FICON support

To support High Performance FICON, the DASD device driver has to
translate I/O requests into the new transport mode control words (TCW)
instead of the traditional (command mode) CCW requests.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
0000d031703c33b9ea909ad81f03762db66135e1 26-Mar-2009 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] dasd: enable compat ioctls

All of the ioctls are compatible. Just enable them.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
48cae885d5a896030588978f503c73c5ed5e62b1 11-Feb-2009 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix race in dasd timer handling

In dasd_device_set_timer and dasd_block_set_timer we interpret the
return value of mod_timer in a wrong way. If the timer expires in
the small window between our check of timer_pending and the call to
mod_timer, then the timer will be set, mod_timer returns zero and
we will call add_timer for a timer that is already pending.
As del_timer and mod_timer do all the necessary checking themselves,
we can simplify our code and remove the race a the same time.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
1301809bcee33c2153605b4387c57fab75f9800a 09-Jan-2009 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: send change uevents for dasd block devices

When a DASD device enters or leaves the 'online' state we need to
trigger change events for the respective disk and partitions.
These extra events are needed because when disk and partitions are
first added, udev rules that try to read disk labels or other data
may fail as the disk may not yet be ready.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
0cd4bd4754d51bdc8f9cd880c29910d0d52337bb 25-Dec-2008 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: call cleanup_cqr with request_queue_lock

__dasd_cleanup_cqr should be called with request_queue_lock held and
__dasd_block_process_erp with queue_lock

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
a9cffb227d59db526286cc9f84bf258e68a97470 14-Nov-2008 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: log sense for fatal errors

The logging of sense data for fatal errors was accidentally removed
during Hyper PAV implementation.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
57a7c0bca009059d1d85bec608af70aa6c5f344c 02-Mar-2008 Al Viro <viro@zeniv.linux.org.uk> [PATCH] switch dasd

->compat_ioctl() actually had been useless here; generic
logics works fine.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
/drivers/s390/block/dasd.c
d4430d62fa77208824a37fe6f85ab2831d274769 02-Mar-2008 Al Viro <viro@zeniv.linux.org.uk> [PATCH] beginning of methods conversion

To keep the size of changesets sane we split the switch by drivers;
to keep the damn thing bisectable we do the following:
1) rename the affected methods, add ones with correct
prototypes, make (few) callers handle both. That's this changeset.
2) for each driver convert to new methods. *ALL* drivers
are converted in this series.
3) kill the old (renamed) methods.

Note that it _is_ a flagday; all in-tree drivers are converted and by the
end of this series no trace of old methods remain. The only reason why
we do that this way is to keep the damn thing bisectable and allow per-driver
debugging if anything goes wrong.

New methods:
open(bdev, mode)
release(disk, mode)
ioctl(bdev, mode, cmd, arg) /* Called without BKL */
compat_ioctl(bdev, mode, cmd, arg)
locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
/drivers/s390/block/dasd.c
2a0217d5c7d22d6dd28f8ae5d20b06d24dc426b8 10-Oct-2008 Kay Sievers <kay.sievers@vrfy.org> [S390] bus_id -> dev_name conversions

bus_id -> dev_name() conversions in s390 code.

[cornelia.huck@de.ibm.com: minor adaptions]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
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>
/drivers/s390/block/dasd.c
23d805b647db6c2063a13089497615efa9deacdd 14-Jul-2008 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [S390] cio: introduce fcx enabled scsw format

Extend the scsw data structure to the format required by fcx. Also
provide helper functions for easier access to fields which are present
in both the traditional as well as the modified format.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
/drivers/s390/block/dasd.c
c80ee724966a8ce9a68020d9095233fb1c6f57e8 30-May-2008 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: use a generic wait_queue for sleep_on

Use a generic wait_queue to prevent the wait_queue in dasd_sleep_on_
functions from being referenced by callback_data while it does not
exist any more.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
f16f5843507ceaea315dae82b9fee29a65b72f24 15-May-2008 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix timeout handling in interrupt handler

When the dasd_int_handler is called with an error code instead of
an irb, the associated request should be restarted. This handling
was missing from the -ETIMEDOUT case. In fact it should be done in
any case.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
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>
/drivers/s390/block/dasd.c
2a2cf6b18626e66b7898013dfa4df8fe2feca568 17-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com> [S390] replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
/drivers/s390/block/dasd.c
08a8a0c59e54f7eb80897c1e77efa4a541d11008 17-Apr-2008 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> [S390] dasd: fix double elevator_exit call when deadline iosched fails to load

I compiled the kernel without deadline, and the dasd code exits the old
scheduler (CFQ), fails to load the new one (deadline), and then things just
hang - with one of these (sorry about the weird chars - I copy & pasted it
from a 3270 console):

dasd(eckd): 0.0.0151: 3390/0A(CU:3990/01) Cyl:3338 Head:15 Sec:224
------------ cut here ------------
Badness at kernel/mutex.c:134
Modules linked in: dasd_eckd_mod dasd_mod
CPU: 0 Not tainted 2.6.25-rc3 #9
Process exe (pid: 538, task: 000000000d172000, ksp: 000000000d21ef88)
Krnl PSW : 0404000180000000 000000000022fb5c (mutex_lock_nested+0x2a4/0x2cc)
R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
Krnl GPRS: 0000000000024218 000000000076fc78 0000000000000000 000000000000000f
000000000022f92e 0000000000449898 000000000f921c00 000003e000162590
00000000001539c4 000000000d172000 070000007fffffff 000000000d21f400
000000000f8f2560 00000000002413f8 000000000022fb44 000000000d21f400
Krnl Code: 000000000022fb50: bf2f1000 icm %r2,15,0(%r1)
000000000022fb54: a774fef6 brc 7,22f940
000000000022fb58: a7f40001 brc 15,22fb5a
>000000000022fb5c: a7f4fef2 brc 15,22f940
000000000022fb60: c0e5fffa112a brasl %r14,171db4
000000000022fb66: 1222 ltr %r2,%r2
000000000022fb68: a784fedb brc 8,22f91e
000000000022fb6c: c010002a0086 larl %r1,76fc78
Call Trace:
(<000000000022f92e> mutex_lock_nested+0x76/0x2cc)
<00000000001539c4> elevator_exit+0x38/0x80
<0000000000156ffe> blk_cleanup_queue+0x62/0x7c
<000003e0001d5414> dasd_change_state+0xe0/0x8ec
<000003e0001d5cae> dasd_set_target_state+0x8e/0x9c
<000003e0001d5f74> dasd_generic_set_online+0x160/0x284
<000003e00011e83a> dasd_eckd_set_online+0x2e/0x40
<0000000000199bf4> ccw_device_set_online+0x170/0x2c0
<0000000000199d9e> online_store_recog_and_online+0x5a/0x14c
<000000000019a08a> online_store+0xbe/0x2ec
<000000000018456c> dev_attr_store+0x38/0x58
<000000000010efbc> sysfs_write_file+0x130/0x190
<00000000000af582> vfs_write+0xb2/0x160
<00000000000afc7c> sys_write+0x54/0x9c
<0000000000025e16> sys32_write+0x2e/0x50
<0000000000024218> sysc_noemu+0x10/0x16
<0000000077e82bd2> 0x77e82bd2

Set elevator pointer to NULL in order to avoid double elevator_exit
calls when elevator_init call for deadline iosched fails.
Also make sure the dasd device driver depends on IOSCHED_DEADLINE so
the default IO scheduler of the dasd driver is present.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
/drivers/s390/block/dasd.c
03513bccad33667ed738cfd96dc5757e539e0bdb 19-Feb-2008 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix locking in __dasd_device_process_final_queue

After setting the status of the cqr and releasing the lock for the
block cqr queue, we call the cqr callback function, which will usually
just trigger the dasd_block_tasklet. But when the tasklet is already
running the cqr might be processed before we invoke the callback
function. In rare cases the callback pointer may already be invalid
by the time we want to call it, which will result in a panic.
Solution: Call the callback function first and then release the lock.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
fe6b8e76d920b93fd445382aff7ff24082af8874 05-Feb-2008 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: fix panic caused by alias device offline

When an alias device is set offline while it is in use this may
result in a panic in the cleanup part of the dasd_block_tasklet.
The problem here is that there may exist some ccw requests that were
originally created for the alias device and transferred to the base
device when the alias was set offline. When these request are
cleaned up later, the discipline pointer in the alias device may not
be valid anymore. To fix this use the base device discipline to find
the cleanup function.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6c5f57c7884a7e0806ae9af86de243321cab4953 05-Feb-2008 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: add ifcc handling

Adding interface control check (ifcc) handling in error recovery.
First retry up to 255 times and if all retries fail try an alternate
path if possible.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
4c4e21486154c8db93c7e82a4b3ab5f621cd1d97 28-Jan-2008 Kiyoshi Ueda <k-ueda@ct.jp.nec.com> blk_end_request: changing s390 (take 4)

This patch converts s390 to use blk_end_request interfaces.
Related 'uptodate' arguments are converted to 'error'.

As a result, the interfaces of internal functions below are changed:
o dasd_end_request
o tapeblock_end_request

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
361f494d4e62ee5f7a971bf34945deeb69392159 26-Jan-2008 Peter Tiedemann <ptiedem@de.ibm.com> [S390] usage of s390dbf: shrink number of debug areas to use.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
/drivers/s390/block/dasd.c
7dc1da9ffae5a344f7115d019e2be069d3e1bb8d 26-Jan-2008 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix loop in request expiration handling

Add time to the 'expires' value to avoid a loop caused by the cqr
termination function

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
8e09f21574ea3028d5629e5de759e0b196c690c5 26-Jan-2008 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: add hyper PAV support to DASD device driver, part 1

Parallel access volumes (PAV) is a storage server feature, that allows
to start multiple channel programs on the same DASD in parallel. It
defines alias devices which can be used as alternative paths to the
same disk. With the old base PAV support we only needed rudimentary
functionality in the DASD device driver. As the mapping between base
and alias devices was static, we just had to export an identifier
(uid) and could leave the combining of devices to external layers
like a device mapper multipath.
Now hyper PAV removes the requirement to dedicate alias devices to
specific base devices. Instead each alias devices can be combined with
multiple base device on a per request basis. This requires full
support by the DASD device driver as now each channel program itself
has to identify the target base device.
The changes to the dasd device driver and the ECKD discipline are:
- Separate subchannel device representation (dasd_device) from block
device representation (dasd_block). Only base devices are block
devices.
- Gather information about base and alias devices and possible
combinations.
- For each request decide which dasd_device should be used (base or
alias) and build specific channel program.
- Support summary unit checks, which allow the storage server to
upgrade / downgrade between base and hyper PAV at runtime (support
is mandatory).

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
de3e0da1270bccb046885fbf1baa9140721de7e0 26-Jan-2008 Stefan Haberland <stefan.haberland@de.ibm.com> [S390] dasd: fix return value of dasd_generic_probe()

Using the return value of ccw_device_set_online as return value for
dasd_generic_probe() causes the DASD to fail setting online

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
165125e1e480f9510a5ffcfbfee4e3ee38c05f23 24-Jul-2007 Jens Axboe <jens.axboe@oracle.com> [BLOCK] Get rid of request_queue_t typedef

Some of the code has been gradually transitioned to using the proper
struct request_queue, but there's lots left. So do a full sweet of
the kernel and get rid of this typedef and replace its uses with
the proper type.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/s390/block/dasd.c
763968e217c6657afaff90fbbec93531b3d6ce70 10-May-2007 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Avoid sparse warnings.

Monthly sparse warning avoidance patch. Sigh.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
/drivers/s390/block/dasd.c
aaff0f644a182015622d7686a66986319a1085d1 10-May-2007 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] dasd: Fix modular build.

Add missing export of dasd_generic_read_dev_chars().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
17283b56eceb6b7d9cc48dc74759a2450699c22a 04-May-2007 Cornelia Huck <cornelia.huck@de.ibm.com> [S390] dasd: New read device characteristics and read configuration data.

Instead of the deprecated read_dev_chars() and read_conf_data_lpm(),
implement dasd_generic_read_dev_chars() and dasd_eckd_read_conf_lpm().
These should even recover better from error than the original cio
functions.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
4dfd5c4593e69e9d399dd9e01d184dc534408f7e 27-Apr-2007 Horst Hummel <horst.hummel@de.ibm.com> [S390] dasd: Add sysfs attribute status and generate uevents.

This patch adds a sysfs-attribute 'status' to make the DASD device-status
accessible from user-space. In addition, the DASD driver generates an
uevent(CHANGE) for the ccw-device on each device-status change.
This enables user-space applications (e.g. udev) to do related processing.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
4d284cac76d0bfebc42d76b428c4e44d921200a9 05-Feb-2007 Heiko Carstens <heiko.carstens@de.ibm.com> [S390] Avoid excessive inlining.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
d54853ef8cb17296ac7bce9c77430fb7c80532d0 05-Feb-2007 Martin Schwidefsky <schwidefsky@de.ibm.com> [S390] ETR support.

This patch adds support for clock synchronization to an external time
reference (ETR). The external time reference sends an oscillator
signal and a synchronization signal every 2^20 microseconds to keep
the TOD clocks of all connected servers in sync. For availability
two ETR units can be connected to a machine. If the clock deviates
for more than the sync-check tolerance all cpus get a machine check
that indicates that the clock is out of sync. For the lovely details
how to get the clock back in sync see the code below.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
336c340b682daa283acf9202a07c4fd5c28e53a5 05-Feb-2007 Horst Hummel <horst.hummel@de.ibm.com> [S390] dasd: fix unconditional reserve handling.

The reserve/release IOCTLs sometimes do not work. If second system
does a 'steal lock' the pending unit check (Format 3 Msg F) is
delivered. Since ERP is disabled for reserve/release, the IOCTL call
fails. We have to allow basic ERP (retries) for reserve/release IOCTLs.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
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>
/drivers/s390/block/dasd.c
9575bf265711cabe7147a68003a56a9f19f034da 08-Dec-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] New DASD feature for ERP related logging

It is now possible to enable/disable ERP related logging without re-compile
and re-ipl. A additional sysfs-attribute 'erplog' allows to switch the
logging non-interruptive.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
4927b3f74c6a2fd92226dcf1542a598be9738808 06-Dec-2006 Al Viro <viro@ftp.linux.org.uk> [PATCH] More work_struct induced breakage (s390)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
29145a6c8cda3238049937612365e80b53c3f266 04-Dec-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] Enhanced handling of failed termination requests.

In case a request timed out and termination did not work, the console was
flooded with retry messages (every 1/10s). Now we use a 5s delay per retry and
generate a more precise message.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
867dcd0f32b125f45a663f9374a36fb21193ab21 18-Oct-2006 Stefan Weinhuber <wein@de.ibm.com> [S390] dasd: clean up timer.

Clean up dasd timer when when a dasd device is set offline.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
b0035f127e007ea0afc8baad740093eb124f7b0b 20-Sep-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] dasd default debug level.

Enhanced default DBF level to get most important messages
in debug feature files.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
a00bfd7147c0c5c04a59f7adcb0e6d8948b90a6e 20-Sep-2006 Martin Schwidefsky <schwidefsky@de.ibm.com> [S390] dasd deadlock after state change pending interrupt.

The dasd_device_from_cdev function is called from interrupt context
to get the struct dasd_device associated with a ccw device. The
driver_data of the ccw device points to the dasd_devmap structure
which contains the pointer to the dasd_device structure. The lock
that protects the dasd_devmap structure is acquire with out irqsave.
To prevent the deadlock in dasd_device_from_cdev if it is called
from interrupt context the dependency to the dasd_devmap structure
needs to be removed. Let the driver_data of the ccw device point
to the dasd_device structure directly and use the ccw device lock
to protect the access.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
8f61701bdf536c7a80f0f614bac91c7883804c4c 30-Aug-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] dasd: fix device shutdown process.

Fix clear_IO handling (need to wait for interrupt) and
introduced error-handling in shutdown processing.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
ebc4599990898ecaaace7ed40dfad6d8d9f2a24a 09-Aug-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] dasd set offline kernel bug.

The request queue flush function of the dasd driver has to dequeue
the requests first and then call the end request function. Otherwise
a kernel bug in ll_rw_block.c might get triggered.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
/drivers/s390/block/dasd.c
602cada851b28c5792339786efe872fbdc1f5d41 29-Jun-2006 Linus Torvalds <torvalds@g5.osdl.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits)
[PATCH] devfs: Remove it from the feature_removal.txt file
[PATCH] devfs: Last little devfs cleanups throughout the kernel tree.
[PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
[PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed
[PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed
[PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed
[PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed
[PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed
[PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree
[PATCH] devfs: Remove devfs_remove() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree
[PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree
[PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree
[PATCH] devfs: Remove devfs support from the sound subsystem
[PATCH] devfs: Remove devfs support from the ide subsystem.
[PATCH] devfs: Remove devfs support from the serial subsystem
[PATCH] devfs: Remove devfs from the init code
[PATCH] devfs: Remove devfs from the partition code
...
405455734e1cdec09c37233216f9240cb1a058e5 29-Jun-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] add PAV support to the dasd driver.

Add support for parallel-access-volumes to the dasd driver. This
allows concurrent access to dasd devices with multiple channel
programs.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
138c014dcba74211dc4e835658f34a787c40cf17 29-Jun-2006 Horst Hummel <horst.hummel@de.ibm.com> [S390] dasd whitespace and other cosmetics.

Dasd code cleanup: 1) remove white space, 2) remove the emacs override
sections, and 3) use kzalloc instead of kmalloc.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
/drivers/s390/block/dasd.c
8ab5e4c15b53e147c08031a959d9f776823dbe73 21-Jun-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] devfs: Remove devfs_remove() function from the kernel tree

Removes the devfs_remove() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/s390/block/dasd.c
95dc112a5770dc670a1b45a3d9ee346fdd2b2697 21-Jun-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree

Removes the devfs_mk_dir() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/s390/block/dasd.c
39ccf95e28765a08a9e01be614695d7c570b4e77 28-Apr-2006 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd ioctl never returns

The dasd state machine is not designed to enable an unformatted device, since
'unformatted' is a final state. The BIODASDENABLE ioctl calls
dasd_enable_device() which never returns if the device is in this special
state. Return -EPERM in dasd_increase_state for unformatted devices to make
dasd_enable_device terminate. Note: To get such an unformatted device online
it has to be re-analyzed. This means that the device needs to be disabled
prior to re-enablement.

Signed-off-by: Horst Hummel <horst.hummel@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>
/drivers/s390/block/dasd.c
25ee4cf831fcc2855927c175d246a25e5ebe5902 11-Apr-2006 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [PATCH] s390: fail-fast requests on quiesced devices

Using the fail-fast flag in i/o requests on a dasd disk which has been
quiesced leads to kernel panics. Modify the request start function to only
work on requests in a valid state.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@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>
/drivers/s390/block/dasd.c
dafd87aaef7d95a6ad3ff92e0d512e5b166c0716 11-Apr-2006 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd device offline messages

The dasd driver sometimes print the misleading message "Can't offline dasd
device with open count = 0". The reason why it can't offline the device in
this case is that the device is still in the startup phase. Print a more
meaningful message.

Signed-off-by: Horst Hummel <horst.hummel@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>
/drivers/s390/block/dasd.c
1e8c573933fd7975679766850252ad08667e5ca4 25-Mar-2006 Linus Torvalds <torvalds@g5.osdl.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial

* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (21 commits)
BUG_ON() Conversion in drivers/video/
BUG_ON() Conversion in drivers/parisc/
BUG_ON() Conversion in drivers/block/
BUG_ON() Conversion in sound/sparc/cs4231.c
BUG_ON() Conversion in drivers/s390/block/dasd.c
BUG_ON() Conversion in lib/swiotlb.c
BUG_ON() Conversion in kernel/cpu.c
BUG_ON() Conversion in ipc/msg.c
BUG_ON() Conversion in block/elevator.c
BUG_ON() Conversion in fs/coda/
BUG_ON() Conversion in fs/binfmt_elf_fdpic.c
BUG_ON() Conversion in input/serio/hil_mlc.c
BUG_ON() Conversion in md/dm-hw-handler.c
BUG_ON() Conversion in md/bitmap.c
The comment describing how MS_ASYNC works in msync.c is confusing
rcu: undeclared variable used in documentation
fix typos "wich" -> "which"
typo patch for fs/ufs/super.c
Fix simple typos
tabify drivers/char/Makefile
...
8d3b33f67fdc0fb364a1ef6d8fbbea7c2e4e6c98 25-Mar-2006 Rusty Russell <rusty@rustcorp.com.au> [PATCH] Remove MODULE_PARM

MODULE_PARM was actually breaking: recent gcc version optimize them out as
unused. It's time to replace the last users, which are generally in the
most unloved drivers anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
7ac1e877d48061aa6ebca936189c32b44ccf8d9c 24-Mar-2006 Eric Sesterhenn <snakebyte@gmx.de> BUG_ON() Conversion in drivers/s390/block/dasd.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
/drivers/s390/block/dasd.c
88abaab4f9b08381e30e737980a1c49d6b524dfc 24-Mar-2006 Eric Sesterhenn <snakebyte@gmx.de> [PATCH] s390: kzalloc() conversion in drivers/s390

Convert all kmalloc + memset sequences in drivers/s390 to kzalloc usage.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
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>
/drivers/s390/block/dasd.c
20c644680af1ef9a6b36c0873f59498c98b07ab1 24-Mar-2006 Stefan Weinhuber <wein@de.ibm.com> [PATCH] s390: dasd extended error reporting

The DASD extended error reporting is a facility that allows to get detailed
information about certain problems in the DASD I/O. This information can be
used to implement fail-over applications that can recover these problems.

Signed-off-by: Stefan Weinhuber <wein@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>
/drivers/s390/block/dasd.c
13c6204facb01d425320411c17febff666875518 24-Mar-2006 Christoph Hellwig <hch@lst.de> [PATCH] s390: use normal switch statement for ioctls in dasd_ioctlc

Handle ioctls implemented in dasd_ioctl through the normal switch statement
that most drivers use instead of the awkward dasd_ioctl_no_register routine.
This avoids searching a linear list on every call to dasd_ioctl(), and allows
to give the various ioctl implementation functions sane prototypes, aswell as
moving the check for bdev->bd_disk->private_data from the individual functions
to dasd_ioctl. (I think it can't actually every be NULL, but let's keep that
for later)

Signed-off-by: Christoph Hellwig <hch@lst.de>
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>
/drivers/s390/block/dasd.c
90f0094dc607abe384a412bfb7199fb667ab0735 08-Mar-2006 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd partition detection

DASD allows to open a device as soon as gendisk is registered, which means the
device is a fake device (capacity=0) and we do know nothing about blocksize
and partitions at that point of time. In case the device is opened by
someone, the bdev and inode creation is done with the fake device info and the
following partition detection code is just using the wrong data.

To avoid this modify the DASD state machine to make sure that the open is
rejected until the device analysis is either finished or an unformatted device
was detected.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
49d9c81a699b57a5b6488f3a761669d05e116588 21-Feb-2006 Heiko Carstens <heiko.carstens@de.ibm.com> [PATCH] s390: revert dasd eer module

Revert dasd eer module until we have a common understanding of how the
interface should be.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
aa88861fc3184a7d830954661dd281de4ae8d2ba 21-Feb-2006 Peter Oberparleiter <peter.oberparleiter@de.ibm.com> [PATCH] s390: dasd reference counting

When using the dasd diag discipline, the base discipline module (eckd or fba)
can be unloaded, even though the dasd driver requires both discipline modules
(base and diag) to work correctly.

Implement reference counting for both base and diag discipline modules in
order to fix this.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
12c3a54848a6eba2b38cd92ba5925433d223332b 03-Feb-2006 Stefan Weinhuber <wein@de.ibm.com> [PATCH] s390: dasd extended error reporting module

The DASD extended error reporting is a facility that allows to get detailed
information about certain problems in the DASD I/O. This information can be
used to implement fail-over applications that can recover these problems.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
c2ba444d1d871d3f6cd3bc5e7d8e19c48c8c02a4 01-Feb-2006 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd wait for clear i/o interrupt

The sleep_on function clears a running cqr without waiting for the related
interrupt. This can lead to a panic at the time the interrupt is processed
because the related memory might already be freed. Wait for clear-interrupt
and de-queue cqr prior to return.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
e018ba1fceee5bd306e31f6e3a60934d5f143ac5 01-Feb-2006 Heiko Carstens <heiko.carstens@de.ibm.com> [PATCH] s390: Remove CVS generated information

- Remove all CVS generated information like e.g. revision IDs from
drivers/s390 and include/asm-s390 (none present in arch/s390).

- Add newline at end of arch/s390/lib/Makefile to avoid diff message.

Acked-by: Andreas Herrmann <aherrman@de.ibm.com>
Acked-by: Frank Pavlic <pavlic@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
ed68cb3676bb179768529aeb808403d57295af56 14-Jan-2006 Heiko Carstens <heiko.carstens@de.ibm.com> [PATCH] s390: fix blk_queue_ordered call in dasd.c fixup

The QUEUE_ORDERED_* numbers got renumbered and by accident the dasd driver
was changed to use QUEUE_ORDERED_DRAIN instead of QUEUE_ORDERED_TAG.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
bcc132651d384ad115a275868effb49c64b348ce 14-Jan-2006 Martin Schwidefsky <schwidefsky@de.ibm.com> [PATCH] s390: fix blk_queue_ordered call in dasdc

Add the missing third argument to the blk_queue_ordered call and use the
constant QUEUE_ORDERED_DRAIN instead of "1".

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>
/drivers/s390/block/dasd.c
8262037f406dc8e0908ad51f355c3dfd4d662aba 10-Jan-2006 Christoph Hellwig <hch@lst.de> [PATCH] add ->compat_ioctl to dasd

Add a compat_ioctl method to the dasd driver so the last entries in
arch/s390/kernel/compat_ioctl.c can go away. Unlike the previous attempt this
one does not replace the ioctl method with an unlocked_ioctl method so that
the ioctl_by_bdev calls in s390 partition code continue to work.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
a885c8c4316e1c1d2d2c8755da3f3d14f852528d 08-Jan-2006 Christoph Hellwig <hch@lst.de> [PATCH] Add block_device_operations.getgeo block device method

HDIO_GETGEO is implemented in most block drivers, and all of them have to
duplicate the code to copy the structure to userspace, as well as getting
the start sector. This patch moves that to common code [1] and adds a
->getgeo method to fill out the raw kernel hd_geometry structure. For many
drivers this means ->ioctl can go away now.

[1] the s390 block drivers are odd in this respect. xpram sets ->start
to 4 always which seems more than odd, and the dasd driver shifts
the start offset around, probably because of it's non-standard
sector size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@suse.de>
Cc: <mike.miller@hp.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
d99cf9d679a520d67f81d805b7cb91c68e1847f0 06-Jan-2006 Linus Torvalds <torvalds@g5.osdl.org> Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block

Manual fixup for merge with Jens' "Suspend support for libata", commit
ID 9b847548663ef1039dd49f0eb4463d001e596bc3.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
347a8dc3b815f0c0fa62a1df075184ffe4cbdcf1 06-Jan-2006 Martin Schwidefsky <schwidefsky@de.ibm.com> [PATCH] s390: cleanup Kconfig

Sanitize some s390 Kconfig options. We have ARCH_S390, ARCH_S390X,
ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT. Replace these 6 options by
S390, 64BIT and COMPAT.

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>
/drivers/s390/block/dasd.c
1c01b8a5963aec60488c1c97d67cffd8b5275e3f 06-Jan-2006 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd failfast support

To properly support multipath-failover handling, the linux block layer has
introduced a special request flag, 'REQ_FAILFAST'. This flag is now used to
return requests immediately in case the device is not operational.

Signed-off-by: Horst Hummel <horst.hummel@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>
/drivers/s390/block/dasd.c
973bd9937569146de0917f54f05b2942f8257912 06-Jan-2006 Martin Schwidefsky <schwidefsky@de.ibm.com> [PATCH] s390: atomic primitives

Hugh Dickins <hugh@veritas.com>

Fix the broken atomic_cmpxchg primitive. Add atomic_sub_and_test,
atomic64_sub_return, atomic64_sub_and_test, atomic64_cmpxchg,
atomic64_add_unless and atomic64_inc_not_zero. Replace old style
atomic_compare_and_swap by atomic_cmpxchg. Shorten the whole header by
defining most primitives with the two inline functions atomic_add_return and
atomic_sub_return.

In addition this patch contains the s390 related fixes of Hugh's "mm: fill
arch atomic64 gaps" patch.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
8ffdc6550c47f75ca4e6c9f30a2a89063e035cf2 06-Jan-2006 Tejun Heo <htejun@gmail.com> [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()

add @uptodate argument to end_that_request_last() and @error
to rq_end_io_fn(). there's no generic way to pass error code
to request completion function, making generic error handling
of non-fs request difficult (rq->errors is driver-specific and
each driver uses it differently). this patch adds @uptodate
to end_that_request_last() and @error to rq_end_io_fn().

for fs requests, this doesn't really matter, so just using the
same uptodate argument used in the last call to
end_that_request_first() should suffice. imho, this can also
help the generic command-carrying request jens is working on.

Signed-off-by: tejun heo <htejun@gmail.com>
Signed-Off-By: Jens Axboe <axboe@suse.de>
/drivers/s390/block/dasd.c
17fd682e544556a2a829e94383239c029bb21c5e 07-Nov-2005 Jesper Juhl <jesper.juhl@gmail.com> [PATCH] kfree cleanup: drivers/s390

This is the drivers/s390/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/s390/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Cornelia Huck <cohuck@de.ibm.com>
Acked-by: Stefan Bader <Stefan.Bader@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
c6eb7b7703ac4b3401b74f411c8c51ded214bf19 04-Sep-2005 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: deadlock in dasd_devmap

Reintroduce a read-only copy of the devmap features in the device struct.
This is necessary to solve a deadlock on the dasd_devmap_lock which is
acquired by dasd_get_features called from the dasd tasklet. The current
implementation of devmap doesn't allow to call any devmap function from
interrupt or softirq context.

Signed-off-by: Horst Hummel <horst.hummel@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>
/drivers/s390/block/dasd.c
6bb0e01081c2ca585b5e145783fea53bb0589786 27-Jul-2005 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: free dasd slab cache

Free dasd slab cache on module unload.

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>
/drivers/s390/block/dasd.c
66a464dbc8e0345b6f972b92bf1118e043d7c987 25-Jun-2005 Michael Holzheu <holzheu@de.ibm.com> [PATCH] s390: debug feature changes

This patch changes the memory allocation method for the s390 debug feature.
Trace buffers had been allocated using the get_free_pages() function before.
Therefore it was not possible to get big memory areas in a running system due
to memory fragmentation. Now the trace buffers are subdivided into several
subbuffers with pagesize. Therefore it is now possible to allocate more
memory for the trace buffers and more trace records can be written.

In addition to that, dynamic specification of the size of the trace buffers is
implemented. It is now possible to change the size of a trace buffer using a
new debugfs file instance. When writing a number into this file, the trace
buffer size is changed to 'number * pagesize'.

In the past all the traces could be obtained from userspace by accessing files
in the "proc" filesystem. Now with debugfs we have a new filesystem which
should be used for debugging purposes. This patch moves the debug feature
from procfs to debugfs.

Since the interface of debug_register() changed, all device drivers, which use
the debug feature had to be adjusted.

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>
/drivers/s390/block/dasd.c
c551288e34cff0a78b3103ce2e12099dffa41071 25-Jun-2005 Cornelia Huck <cohuck@de.ibm.com> [PATCH] s/390: use klist in dasd driver

Convert the dasd driver to use the new klist interface.

Signed-off-by: Cornelia Huck <cohuck@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/s390/block/dasd.c
59afda786a58f2e8f74a48f2af90534d76d5338d 17-May-2005 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd set online failure

dasd driver changes:
- The feature check in dasd_generic_online returns an error if
the devmap entry for the device is not yet available. Check
for the feature after the device has been created.
- Do symmetric registration/deregistration of cdev->handler.

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>
/drivers/s390/block/dasd.c
6ed93c827eea181d87ce078cd1d671128c030b5a 01-May-2005 Stefan Weinhuber <wein@de.ibm.com> [PATCH] s390: enable write barriers in the dasd driver

The DASD device driver never reorders the I/O requests and relies on the
hardware to write all data to nonvolatile storage before signaling a
successful write. Hence, the only thing we have to do to support write
barriers is to set the queue ordered flag.

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>
/drivers/s390/block/dasd.c
f24acd4503270ed4c842c8fef0b71105285e0a06 01-May-2005 Horst Hummel <horst.hummel@de.ibm.com> [PATCH] s390: dasd readonly attribute

The independent read-only flags in devmap, dasd_device and gendisk are not
kept in sync. Use one bit per feature in the dasd driver and keep that bit in
sync with the gendisk bit.

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>
/drivers/s390/block/dasd.c
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!
/drivers/s390/block/dasd.c