06 Nov, 2013
1 commit
-
The while loop only peeks at the top request in the queue but does
not yet consume it. Since we only handle fs requests, we need to
dequeue and complete all other request command types with error
just in case we would ever receive such an unforeseen request.Signed-off-by: Steffen Maier
Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky
28 Oct, 2013
1 commit
-
We check for the existence of block->profile.data before we write to
it, but the dependent code block misses braces.Signed-off-by: Stefan Weinhuber
Signed-off-by: Martin Schwidefsky
24 Oct, 2013
8 commits
-
There is a debugging leftover from git commit 4d334fd155b53adf
"s390/3270: asynchronous size sensing" in raw3270_reset_device_cb.
Under z/VM the diagnose 0x210 can be used to find the correct
size of the 3270 terminal.Signed-off-by: Martin Schwidefsky
-
Make smatch happy and remove this warning:
drivers/s390/char/raw3270.c:347 raw3270_irq() error: we previously
assumed 'rq' could be null (see line 342)Signed-off-by: Martin Schwidefsky
-
This patch fixes the following smatch warning:
monwrite_diag() error: strcpy() '"LNXAPPL"' too large for 'id.prod_nr'
(8 vs 7)
Using strcpy() is wrong, because it also copies the terminating null
byte, but in this case the extra copied null byte will be overwritten
right after the strcpy(), so there is no real problem here.
Use strncpy() to fix the warning.Signed-off-by: Gerald Schaefer
Signed-off-by: Martin Schwidefsky -
Currently zfpcdump can only collect registers for up to CONFIG_NR_CPUS
CPUss. This dependency is not necessary. So remove it by dynamically
allocating the save area array.Signed-off-by: Michael Holzheu
Reviewed-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
When quiescing an eadm subchannel make sure that outstanding IO is
cleared and potential timeout handlers are canceled.Reviewed-by: Peter Oberparleiter
Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky -
find_first_bit_left() and friends have nothing to do with the normal
LSB0 bit numbering for big endian machines used in Linux (least
significant bit has bit number 0).
Instead they use MSB0 bit numbering, where the most signficant bit has
bit number 0. So rename find_first_bit_left() and friends to
find_first_bit_inv(), to avoid any confusion.
Also provide inv versions of set_bit, clear_bit and test_bit.This also removes the confusing use of e.g. set_bit() in airq.c which
uses a "be_to_le" bit number conversion, which could imply that instead
set_bit_le() could be used. But that is entirely wrong since the _le
bitops variant uses yet another bit numbering scheme.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Refactor direct debug level comparisons with the (internal) s390db->level
member. Use the debug_level_enabled() function instead.Signed-off-by: Hendrik Brueckner
Signed-off-by: Martin Schwidefsky -
get_inbound_buffer_frontier() makes use of the return value of atomic_sub()
which shouldn't work, since atomic_sub() is supposed to return void.
This only works on s390 because atomic_sub() gets mapped to atomic_sub_return()
with a define without changing it's return value to void.So use atomic_sub_return() instead of atomic_sub() in qeth code before fixing
atomic ops.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
22 Oct, 2013
1 commit
-
The result of the store-clock-fast (STCKF) instruction is a bit fuzzy.
It can happen that the value stored on one CPU is smaller than the value
stored on another CPU, although the order of the stores is the other
way around. This can cause deltas of get_tod_clock() values to become
negative when they should not be.We need to be more careful with store-clock-fast, this patch partially
reverts git commit e4b7b4238e666682555461fa52eecd74652f36bb "time:
always use stckf instead of stck if available". The get_tod_clock()
function now uses the store-clock-extended (STCKE) instruction.
get_tod_clock_fast() can be used if the fuzziness of store-clock-fast
is acceptable e.g. for wait loops local to a CPU.Signed-off-by: Martin Schwidefsky
15 Oct, 2013
2 commits
-
Fix check within vmlogrdr_open() if the minor address is not larger
than the number of array elements.Found with "smatch":
drivers/s390/char/vmlogrdr.c:318 vmlogrdr_open() warn:
buffer overflow 'sys_ser' 3
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
The prefix command is used instead of a define extent to make use of
PAV alias devices during format. On some older storage servers the
prefix command may not be available and the IO request will fail.
Check for availability of prefix command and use define extent if
not available.Signed-off-by: Stefan Haberland
Signed-off-by: Martin Schwidefsky
30 Sep, 2013
2 commits
-
To detect a line mode console we need a message event type
for the receive mask and a command event type for the send mask.
Checking for a MSG event in the sclp send mask was wrong and
might result in line mode consoles not being detected.Signed-off-by: Christian Borntraeger
Signed-off-by: Martin Schwidefsky -
In case of error, the function tty3270_alloc_screen() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().Signed-off-by: Wei Yongjun
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
12 Sep, 2013
1 commit
-
Modify the s390 copy_oldmem_page() and remap_oldmem_pfn_range() function
for zfcpdump to read from the HSA memory if memory below HSA_SIZE bytes is
requested. Otherwise real memory is used.Signed-off-by: Michael Holzheu
Cc: HATAYAMA Daisuke
Cc: Jan Willeke
Cc: Vivek Goyal
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Sep, 2013
2 commits
-
Let's get rid of another sparse false positive:
drivers/s390/crypto/ap_bus.c:416:64: warning:
cast truncates bits from constant value (102030405060708 becomes 5060708)So instead of using a cast let's use an and-mask.
That way sparse remains silent and one doesn't always have to check
if this is a valid warning/bug or just a false positive.Signed-off-by: Heiko Carstens
-
Make various functions static, add declarations to header files to
fix a couple of sparse findings.Signed-off-by: Heiko Carstens
04 Sep, 2013
3 commits
-
Let's not add a function for every external interrupt subclass for
which we need reference counting. Just have two register/unregister
functions which have a subclass parameter:void irq_subclass_register(enum irq_subclass subclass);
void irq_subclass_unregister(enum irq_subclass subclass);Signed-off-by: Heiko Carstens
-
Pull first round of SCSI updates from James Bottomley:
"This patch set is a set of driver updates (ufs, zfcp, lpfc, mpt2/3sas,
qla4xxx, qla2xxx [adding support for ISP8044 + other things]).We also have a new driver: esas2r which has a number of static checker
problems, but which I expect to resolve over the -rc course of 3.12
under the new driver exception.We also have the error return that were discussed at LSF"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (118 commits)
[SCSI] sg: push file descriptor list locking down to per-device locking
[SCSI] sg: checking sdp->detached isn't protected when open
[SCSI] sg: no need sg_open_exclusive_lock
[SCSI] sg: use rwsem to solve race during exclusive open
[SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0
[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
[SCSI] qla2xxx: Update the driver version to 8.06.00.08-k.
[SCSI] qla2xxx: print MAC via %pMR.
[SCSI] qla2xxx: Correction to message ids.
[SCSI] qla2xxx: Correctly print out/in mailbox registers.
[SCSI] qla2xxx: Add a new interface to update versions.
[SCSI] qla2xxx: Move queue depth ramp down message to i/o debug level.
[SCSI] qla2xxx: Select link initialization option bits from current operating mode.
[SCSI] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support.
[SCSI] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware doesn't provide it
[SCSI] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log for normal temperature AEN
[SCSI] qla2xxx: Correct Interrupt Register offset for ISPFX00
[SCSI] qla2xxx: Remove handling of Shutdown Requested AEN from qlafx00_process_aen().
[SCSI] qla2xxx: Send all AENs for ISPFx00 to above layers.
[SCSI] qla2xxx: Add changes in initialization for ISPFX00 cards with BIOS
... -
Pull first batch of s390 updates from Martin Schwidefsky:
"The most interesting change is that Martin converted s390 to generic
hardirqs. Which means that all current architectures have been
converted and that CONFIG_GENERIC_HARDIRQS can be removed. Martin
prepared a patch for that already (see genirq branch), but the best
time to merge that is probably at the end of the merge window / begin
of -rc1.Another patch converts s390 to software referenced bits instead of
relying on the reference bit in the storage key. Therefore s390
doesn't use storage keys anymore, except for kvm.Besides that we have improvements, cleanups and fixes in PCI, DASD and
all over the place."* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (32 commits)
s390/pci: use virtual memory for iommu bitmap
s390/cio: fix unlocked access of global bitmap
s390/pci: update function handle after resume from hibernate
s390/pci: try harder to modify a function
s390/pci: split lpf
s390/hibernate: add early resume function
s390/pci: add recover sysfs knob
s390/pci: use claim_resource
s390/pci/hotplug: convert to be builtin only
s390/mm: implement software referenced bits
s390/dasd: fix statistics for recovered requests
s390/tx: allow program interruption filtering in user space
s390/pgtable: fix mprotect for single-threaded KVM guests
s390/time: return with irqs disabled from psw_idle
s390/kprobes: add support for compare and branch instructions
s390/switch_to: fix save_access_regs() / restore_access_regs()
s390/bitops: fix inline assembly constraints
s390/dasd: enable raw_track_access reads without direct I/O
s390/mm: introduce ptep_flush_lazy helper
s390/time: clock comparator revalidation
...
03 Sep, 2013
4 commits
-
Enabling the data router support by default
can increase performance in certain situations.
It is safe to do so and tolerated in LPAR and under z/VM
in case there is no data router support in that environment.Signed-off-by: Steffen Maier
Reviewed-by: Martin Peschke
Signed-off-by: James Bottomley -
Get rid of unused function zfcp_fsf_get_req and corresponding
prototype definition.Commit a54ca0f62f953898b05549391ac2a8a4dad6482b in v2.6.28
"[SCSI] zfcp: Redesign of the debug tracing for HBA records."
accidentally introduced this code which was dead in the first place.Signed-off-by: Martin Peschke
Signed-off-by: Steffen Maier
Signed-off-by: James Bottomley -
strict_strtoul and friends are obsolete. Use kstrtoul functions
instead.Signed-off-by: Martin Peschke
Signed-off-by: Steffen Maier
Signed-off-by: James Bottomley -
minor cleanup for status read request
Signed-off-by: Martin Peschke
Signed-off-by: Steffen Maier
Signed-off-by: James Bottomley
30 Aug, 2013
2 commits
-
Access to the slow_subchannel_set has to be secured via the
slow_subchannel_lock.Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky -
Some functions that do arch specific resume actions are called
directly from swsusp_asm64.S . Before we add another function call
provide a generic s390_early_resume function which can be used
for this purpose.Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky
28 Aug, 2013
1 commit
-
When a recovery cqr is cleaned up, copy the start time, stop time,
and start device to the original cqr. These times are needed later
when the original request is finalized and counted in the DASD
statistics.Signed-off-by: Stefan Weinhuber
Signed-off-by: Martin Schwidefsky
23 Aug, 2013
2 commits
-
By popular demand, this patch brings back a couple of sysfs attributes
removed by commit 663e0890e31cb85f0cca5ac1faaee0d2d52880b5
"[SCSI] zfcp: remove access control tables interface".
The content has been irrelevant for years, but the files must be
there forever for whatever user space tools that may rely on them.Since these files always return a constant value, a new stripped
down show-macro was required. Otherwise build warnings would have
been introduced.Signed-off-by: Martin Peschke
Signed-off-by: Steffen Maier
Signed-off-by: James Bottomley -
BUG: sleeping function called from invalid context at kernel/workqueue.c:2752
in_atomic(): 1, irqs_disabled(): 1, pid: 360, name: zfcperp0.0.1700
CPU: 1 Not tainted 3.9.3+ #69
Process zfcperp0.0.1700 (pid: 360, task: 0000000075b7e080, ksp: 000000007476bc30)Call Trace:
([] show_trace+0x106/0x154)
[] show_stack+0x74/0xf4
[] dump_stack+0xc6/0xd4
[] __might_sleep+0x128/0x148
[] flush_work+0x54/0x1f8
[] __cancel_work_timer+0xc6/0x128
[] scsi_device_dev_release_usercontext+0x164/0x23c
[] execute_in_process_context+0x96/0xa8
[] device_release+0x60/0xc0
[] kobject_release+0xa8/0x1c4
[] __scsi_iterate_devices+0xfa/0x130
[] zfcp_erp_strategy+0x4da/0x1014 [zfcp]
[] zfcp_erp_thread+0xf6/0x2b0 [zfcp]
[] kthread+0xf2/0xfc
[] kernel_thread_starter+0x6/0xc
[] kernel_thread_starter+0x0/0xcApparently, the ref_count for some scsi_device drops down to zero,
triggering device removal through execute_in_process_context(), while
the lldd error recovery thread iterates through a scsi device list.
Unfortunately, execute_in_process_context() decides to immediately
execute that device removal function, instead of scheduling asynchronous
execution, since it detects process context and thinks it is safe to do
so. But almost all calls to shost_for_each_device() in our lldd are
inside spin_lock_irq, even in thread context. Obviously, schedule()
inside spin_lock_irq sections is a bad idea.Change the lldd to use the proper iterator function,
__shost_for_each_device(), in combination with required locking.Occurences that need to be changed include all calls in zfcp_erp.c,
since those might be executed in zfcp error recovery thread context
with a lock held.Other occurences of shost_for_each_device() in zfcp_fsf.c do not
need to be changed (no process context, no surrounding locking).The problem was introduced in Linux 2.6.37 by commit
b62a8d9b45b971a67a0f8413338c230e3117dff5
"[SCSI] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit".Reported-by: Christian Borntraeger
Signed-off-by: Martin Peschke
Cc: stable@vger.kernel.org #2.6.37+
Signed-off-by: Steffen Maier
Signed-off-by: James Bottomley
22 Aug, 2013
7 commits
-
This patch adds wait_event_interruptible_lock_irq_timeout(), which is a
straight-forward descendant of wait_event_interruptible_timeout() and
wait_event_interruptible_lock_irq().The zfcp driver used to call wait_event_interruptible_timeout()
in combination with some intricate and error-prone locking. Using
wait_event_interruptible_lock_irq_timeout() as a replacement
nicely cleans up that locking.This rework removes a situation that resulted in a locking imbalance
in zfcp_qdio_sbal_get():BUG: workqueue leaked lock or atomic: events/1/0xffffff00/10
last function: zfcp_fc_wka_port_offline+0x0/0xa0 [zfcp]It was introduced by commit c2af7545aaff3495d9bf9a7608c52f0af86fb194
"[SCSI] zfcp: Do not wait for SBALs on stopped queue", which had a new
code path related to ZFCP_STATUS_ADAPTER_QDIOUP that took an early exit
without a required lock being held. The problem occured when a
special, non-SCSI I/O request was being submitted in process context,
when the adapter's queues had been torn down. In this case the bug
surfaced when the Fibre Channel port connection for a well-known address
was closed during a concurrent adapter shut-down procedure, which is a
rare constellation.This patch also fixes these warnings from the sparse tool (make C=1):
drivers/s390/scsi/zfcp_qdio.c:224:12: warning: context imbalance in
'zfcp_qdio_sbal_check' - wrong count at exit
drivers/s390/scsi/zfcp_qdio.c:244:5: warning: context imbalance in
'zfcp_qdio_sbal_get' - unexpected unlockLast but not least, we get rid of that crappy lock-unlock-lock
sequence at the beginning of the critical section.It is okay to call zfcp_erp_adapter_reopen() with req_q_lock held.
Reported-by: Mikulas Patocka
Reported-by: Heiko Carstens
Signed-off-by: Martin Peschke
Cc: stable@vger.kernel.org #2.6.35+
Signed-off-by: Steffen Maier
Signed-off-by: James Bottomley -
The ECKD protocol supports reading of tracks with arbitrary format as
raw track images. The DASD device driver supports this in its
raw_track_access mode. In this mode it maps each track to sixteen 4096
byte sectors and rejects all requests that are not properly aligned to
this mapping.An application that wants to use a DASD in raw_track_access mode will
usually use direct I/O to make sure that properly aligned requests are
directly submitted to the driver. However, applications that are not
aware of this mode, e.g. udev, will encounter I/O errors.To make the use without direct I/O possible and avoid this kind of
alignment errors, we now pad unaligned read requests with a dummy
page, so that we can always read full tracks. Please note that
writing is still only possible for full track images that are properly
aligned.Signed-off-by: Stefan Weinhuber
Signed-off-by: Martin Schwidefsky -
Change wording for the cpu capabiity changed message:
If such an event occurs it only means that a cpu capability *may* have
changed. A cpu capability change event may also occur for other reasons.Also change the severity of the message from warning to informational.
If such an event happens user space should into /proc/sysinfo and verify
if some capability values changed, if that is of interest.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
With the introduction of PCI it became apparent that s390 should
convert to generic hardirqs as too many drivers do not have the
correct dependency for GENERIC_HARDIRQS. On the architecture
level s390 does not have irq lines. It has external interrupts,
I/O interrupts and adapter interrupts. This patch hard-codes all
external interrupts as irq #1, all I/O interrupts as irq #2 and
all adapter interrupts as irq #3. The additional information from
the lowcore associated with the interrupt is stored in the
pt_regs of the interrupt frame, where the interrupt handler can
pick it up. For PCI/MSI interrupts the adapter interrupt handler
scans the relevant bit fields and calls generic_handle_irq with
the virtual irq number for the MSI interrupt.Reviewed-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky -
The PCI code is the first user of adapter interrupts vectors.
Add a set of helpers to airq.c to separate the adatper interrupt
code from the PCI bits. The helpers allow for adapter interrupt
vectors of any size.Reviewed-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky -
Just a small update to the wording of the messages, to bring them
more in line with our other messages.Signed-off-by: Stefan Weinhuber
Signed-off-by: Martin Schwidefsky -
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.Signed-off-by: Jingoo Han
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
30 Jul, 2013
1 commit
-
The processing of the dasd_block tasklet may have been interrupted
by a path event.
Restart the dasd tasklets in sleep_on_immediately function.Signed-off-by: Stefan Haberland
Signed-off-by: Martin Schwidefsky
19 Jul, 2013
1 commit
-
The zcrypt device driver has been split into base/bus module, api-module,
card modules and message type modules. The base module has been renamed
from z90crypt to ap.
A module alias (with the well-known z90crypt identifier) will be introduced
that enable users to use their existing way to load the zcrypt device driver.Signed-off-by: Ingo Tuchscherer
Signed-off-by: Martin Schwidefsky
16 Jul, 2013
1 commit
-
Fix a "set but not used" warning found via make W=1.
Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky