Commit Graph

1090 Commits (5dbfc9cb59d4ad75199949d7dd8a8c6d7bc518df)

Author SHA1 Message Date
Christof Schmitt 553448f6c4 [SCSI] zfcp: Message cleanup
Cleanup the messages used in the zfcp driver: Remove unnecessary debug
and trace message and convert the remaining messages to standard
kernel macros. Remove the zfcp message macros and while updating the
whole flie also update the copyright headers.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12 08:22:26 -05:00
Swen Schillig 00bab91066 [SCSI] zfcp: Cleanup qdio code
Cleanup the interface code from zfcp to qdio. Also move code that
belongs to the qdio interface from the erp to the qdio file.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12 08:22:25 -05:00
Christof Schmitt fa04c28168 [SCSI] zfcp: Cleanup code in zfcp_ccw
Overall cleanup in file zfcp_ccw.c. Fix coding style issues, remove
useless macros and messages and convert remaining messages to standard
macros.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12 08:22:25 -05:00
Christof Schmitt 45633fdc96 [SCSI] zfcp: Move CFDC code to new file.
zfcp implements a device file to allow Linux guests changing the
Access Control Tables stored in the adapter. The code for the device
file has nothing to do with the other parts of the driver, so move it
to a new file and cleanup the code while doing so.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12 08:22:25 -05:00
Christof Schmitt 24073b475d [SCSI] zfcp: Move FC code to new file
Move all Fibre Channel related code to new file and cleanup the code
while doing so.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12 08:22:25 -05:00
Patrick McHardy 22d1ba74bb vlan: move struct vlan_dev_info to private header
Hide struct vlan_dev_info from drivers to prevent them from growing
more creative ways to use it. Provide accessors for the two drivers
that currently use it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-08 03:23:57 -07:00
Arnd Bergmann 3e0420f066 vmwatchdog: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-07-02 15:06:26 -06:00
Arnd Bergmann 6c111d8863 vmcp: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-07-02 15:06:26 -06:00
Arnd Bergmann dca67e9d3d monwriter: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-07-02 15:06:23 -06:00
Arnd Bergmann 6ce46a435a monreader: BKL pushdown
[jmc: added <linux/smp_lock.h>]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-07-02 15:06:04 -06:00
Arnd Bergmann e73322ceef crypto-zcrypt_api: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-06-20 14:05:55 -06:00
Arnd Bergmann 986837bade block-dasd_eer: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-06-20 14:05:54 -06:00
Jonathan Corbet 764a4a8e54 drivers/s390: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20 14:03:43 -06:00
Linus Torvalds a4df1ac12d Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: MMU: Fix is_empty_shadow_page() check
  KVM: MMU: Fix printk() format string
  KVM: IOAPIC: only set remote_irr if interrupt was injected
  KVM: MMU: reschedule during shadow teardown
  KVM: VMX: Clear CR4.VMXE in hardware_disable
  KVM: migrate PIT timer
  KVM: ppc: Report bad GFNs
  KVM: ppc: Use a read lock around MMU operations, and release it on error
  KVM: ppc: Remove unmatched kunmap() call
  KVM: ppc: add lwzx/stwz emulation
  KVM: ppc: Remove duplicate function
  KVM: s390: Fix race condition in kvm_s390_handle_wait
  KVM: s390: Send program check on access error
  KVM: s390: fix interrupt delivery
  KVM: s390: handle machine checks when guest is running
  KVM: s390: fix locking order problem in enable_sie
  KVM: s390: use yield instead of schedule to implement diag 0x44
  KVM: x86 emulator: fix hypercall return value on AMD
  KVM: ia64: fix zero extending for mmio ld1/2/4 emulation in KVM
2008-06-11 10:35:44 -07:00
Linus Torvalds f7f866eed0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  net: Fix routing tables with id > 255 for legacy software
  sky2: Hold RTNL while calling dev_close()
  s2io iomem annotations
  atl1: fix suspend regression
  qeth: start dev queue after tx drop error
  qeth: Prepare-function to call s390dbf was wrong
  qeth: reduce number of kernel messages
  qeth: Use ccw_device_get_id().
  qeth: layer 3 Oops in ip event handler
  virtio: use callback on empty in virtio_net
  virtio: virtio_net free transmit skbs in a timer
  virtio: Fix typo in virtio_net_hdr comments
  virtio_net: Fix skb->csum_start computation
  ehea: set mac address fix
  sfc: Recover from RX queue flush failure
  add missing lance_* exports
  ixgbe: fix typo
  forcedeth: msi interrupts
  ipsec: pfkey should ignore events when no listeners
  pppoe: Unshare skb before anything else
  ...
2008-06-11 08:39:51 -07:00
Frank Blaschka d0ec0f5497 qeth: start dev queue after tx drop error
In case the xmit function drop out with an error, we have to wake
the netdevice queue to start another xmit.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-10 18:20:37 -04:00
Peter Tiedemann 345aa66e97 qeth: Prepare-function to call s390dbf was wrong
Prepare-function to call s390dbf was wrong handling variable arguments.
This worked as macro but not as function any more.
Now using va_list processing.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-10 18:20:36 -04:00
Frank Blaschka 14cc21b677 qeth: reduce number of kernel messages
Remove unnecessary messages. Write important debug information to
s390dbf.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-10 18:20:35 -04:00
Cornelia Huck f06f6f3224 qeth: Use ccw_device_get_id().
Get the devno from the ccw device via ccw_device_get_id() instead
of parsing the bus_id.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-10 18:20:35 -04:00
Frank Blaschka e5bd7be567 qeth: layer 3 Oops in ip event handler
The ip event handler may present us non qeth network interfaces.
Add qeth card pointer check.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-10 18:20:34 -04:00
Julia Lawall 1783e60ff2 [S390] tape_3590.c: introduce missing kfree
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

@r exists@
expression E,E1;
statement S;
position p1,p2,p3;
@@

E =@p1 \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != E = E1
if (E == NULL || ...) S
... when != E = E1
if@p2 (...) {
 ... when != kfree(E)
 }
... when != E = E1
kfree@p3(E);

@forall@
position r.p2;
expression r.E;
int E1 != 0;
@@

* if@p2 (...) {
 ... when != kfree(E)
     when strict
return E1; }

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-06-10 10:03:28 +02:00
Carsten Otte 7b439d2530 [S390] vt220 console, initialize list head before use
This patch fixes a null pointer dereference during initialisation when no
sclp event facility is available:
sclp vt220 tty driver: could not register vt220 - sclp_register returned -5
Unable to handle kernel paging request at virtual user address 0000000000000000
Oops: 0004 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted 2.6.26-rc3-kvm-bigiron-00968-gd939e93-dirty #30
Process swapper (pid: 0, task: 0000000000600be0, ksp: 000000000064a000)
Krnl PSW : 0400000180000000 0000000000320d8c (sclp_unregister+0x48/0x8c)
           R:0 T:1 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 EA:3
Krnl GPRS: 0000000000000000 0000000000000000 0000000000630478 0700000000649c20
           0000000000000000 0000000000433060 000000000064a660 0000000002e26000
           00000000006db000 0000000000000000 0000000000a78578 0000000000649b80
           0000000000630dc0 000000000044fa20 0000000000320d76 0000000000649b80
Krnl Code: 0000000000320d7c: e310c0080004       lg      %r1,8(%r12)
           0000000000320d82: b9040032           lgr     %r3,%r2
           0000000000320d86: c02000187b79       larl    %r2,630478
          >0000000000320d8c: e34010000024       stg     %r4,0(%r1)
           0000000000320d92: e31040080024       stg     %r1,8(%r4)
           0000000000320d98: c01100200200       lgfi    %r1,2097664
           0000000000320d9e: e310c0080024       stg     %r1,8(%r12)
           0000000000320da4: c01100100100       lgfi    %r1,1048832
Call Trace:
([<0000000000320d76>] sclp_unregister+0x32/0x8c)
 [<00000000006657b4>] __sclp_vt220_cleanup+0xc4/0xe0
 [<000000000066595c>] __sclp_vt220_init+0x18c/0x1a0
 [<0000000000665aba>] sclp_vt220_con_init+0x42/0x68
 [<00000000006601ca>] console_init+0x4e/0x68
 [<000000000064acae>] start_kernel+0x3a2/0x4dc
 [<0000000000100020>] _stext+0x20/0x80
INFO: lockdep is turned off.
Last Breaking-Event-Address:
 [<000000000041f964>] _spin_lock_irqsave+0xb0/0xb4
 <4>---[ end trace 31fd0ba7d8756001 ]---

The issue is caused by a list_empty() check in __sclp_vt220_cleanup, which
usually fails on non-initialized list heads that contain {NULL,NULL} instead.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-06-10 10:03:27 +02:00
Cornelia Huck 85b0d7c0ad [S390] cio: Fix inverted isc priorities.
Priorities for I/O interruption subclasses range from 0 (highest)
to 7 (lowest). Unfortunately, the console has been using isc 7
instead of an isc with a higher priority than regular I/O
subchannels (which use 3). Fix this by making the console use
isc 1.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-06-10 10:03:27 +02:00
Cornelia Huck 12829126aa [S390] cio: Fix sparse warnings in blacklist.c.
sparse complains about signedness:

drivers/s390/cio/blacklist.c:132:28: warning: incorrect type in
argument 2 (different signedness)
drivers/s390/cio/blacklist.c:132:28:    expected unsigned int *val
drivers/s390/cio/blacklist.c:132:28:    got int *cssid
drivers/s390/cio/blacklist.c:136:28: warning: incorrect type in
argument 2 (different signedness)
drivers/s390/cio/blacklist.c:136:28:    expected unsigned int *val
drivers/s390/cio/blacklist.c:136:28:    got int *ssid
drivers/s390/cio/blacklist.c:140:28: warning: incorrect type in
argument 2 (different signedness)
drivers/s390/cio/blacklist.c:140:28:    expected unsigned int *val
drivers/s390/cio/blacklist.c:140:28:    got int *devno

cssid, ssid and devno are of course unsigned, so let's make the
variables unsigned as well.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-06-10 10:03:26 +02:00
Christian Borntraeger 71cde5879f KVM: s390: handle machine checks when guest is running
The low-level interrupt handler on s390 checks for _TIF_WORK_INT and
exits the guest context, if work is pending.
TIF_WORK_INT is defined as_TIF_SIGPENDING | _TIF_NEED_RESCHED |
 _TIF_MCCK_PENDING. Currently the sie loop checks for signals and
reschedule, but it does not check for machine checks. That means that
we exit the guest context if a machine check is pending, but we do not
handle the machine check.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-06-06 21:08:26 +03:00
Christof Schmitt aa0fec6239 [SCSI] zfcp: Fix sparse warning by providing new entry in dbf
drivers/s390/scsi/zfcp_dbf.c:692:2: warning: context imbalance in
'zfcp_rec_dbf_event_thread' - different lock contexts for basic block

Replace the parameter indicating if the lock is held with a new entry
function that only acquires the lock. This makes the lock handling
more visible and removes the sparse warning.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:15 -05:00
Martin Peschke 7337891f38 [SCSI] zfcp: remove some __attribute__ ((packed))
There is no need to pack data structures which describe the
contents of records in the new recovery trace.

lcrash currently depends on the binary format for the other traces,
removing the packed attribute from all traces would break trace
debugging with lcrash.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:15 -05:00
Martin Peschke 70c6654051 [SCSI] zfcp: Refine trace levels of some recovery related events.
This change better spreads trace levels of recovery related events.
There was an overlap of traces for some recovery triggers and the
processing of recovery actions.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:15 -05:00
Martin Peschke c3baa9a26c [SCSI] zfcp: Add information about interrupt to trace.
Store the index of the buffer in the inbound queue used to report
request completion in trace record for request coompletion.
This piece of information allows to better compare qdio and zfcp traces.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:15 -05:00
Martin Peschke e891bffe92 [SCSI] zfcp: Rename sbal_curr to sbal_last.
sbal_last is more appropriate, because it matches sbal_first.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:14 -05:00
Martin Peschke d01d51beee [SCSI] zfcp: Rename sbal_last.
sbal_last is confusing, as it is not the last one actually used,
but just a limit. sbal_limit is a better name.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:14 -05:00
Martin Peschke 0f83b110f0 [SCSI] zfcp: Remove field sbal_last from trace record.
This field is not needed, because it designates an index with a fix offset
from sbal_first. It's name is confusing anyway.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:14 -05:00
Christof Schmitt 5c9a6890de [SCSI] zfcp: Remove some sparse warnings
Remove some sparse warnings by telling sparse that zfcp_req_create
acquires the lock for the request queue.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:14 -05:00
Heiko Carstens b21417820f [SCSI] zfcp: Fix fsf_status_read return code handling
If allocation of a status buffer failed the function incorrectly
returned 0 instead of -ENOMEM.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:13 -05:00
Christof Schmitt 9dfe1cc36b [SCSI] zfcp: Fix mempool pointer for GID_PN request allocation
When allocating memory for GID_PN nameserver requests, the allocation
function stores the pointer to the mempool, but then overwrites the
pointer via memset. Later, the wrong function to free the memory will
be called, since this is based on the stored pointer.

Fix this by first initializing the struct and then storing the pointer.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:13 -05:00
Swen Schillig d26ab06ede [SCSI] zfcp: receiving an unsolicted status can lead to I/O stall
Processing of an unsolicted status request can lead to a locking race
of the request_queue's queue_lock during the recreation of the
used up status read request while still in interrupt context
of the response handler.

Detaching the 'refill' of the long running status read requests from
the handler to a scheduled work is solving this issue.

In addition, each refill-run is trying to re-establish the full amount
of status read requests, which might have failed in earlier runs.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:27:13 -05:00
Christof Schmitt 3a0d9e9235 [SCSI] zfcp: sysfs attributes for fabric and channel latencies
The latency information is provided on a SCSI device level (LUN)
which can be found at the following location

 /sys/class/scsi_device/<H:C:T:L>/device/cmd_latency
 /sys/class/scsi_device/<H:C:T:L>/device/read_latency
 /sys/class/scsi_device/<H:C:T:L>/device/write_latency

Each sysfs attribute provides the available data: min, max and sum for
fabric and channel latency and the number of requests processed.

An overrun of the variables is neither detected nor treated.  The file
has to be read twice to make a meaningful statement, because only the
differences of the values between the two reads can be used.  A reset
of the values can be achieved by writing to the attribute.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:23:44 -05:00
Christof Schmitt c9615858a8 [SCSI] zfcp: Track fabric and channel latencies provided by FCP adapter
Add the infrastructure to retrieve the fabric and channel latencies
from FSF commands for each SCSI command that has been processed. For
each unit, the sum, min, max and number of requests is tracked.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-05 09:23:42 -05:00
Linus Torvalds ab8cd81830 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest: notify on empty
  virtio: force callback on empty.
  virtio_blk: fix endianess annotations
  virtio_config: fix len calculation of config elements
  virtio_net: another race with virtio_net and enable_cb
  virtio: An entropy device, as suggested by hpa.
  virtio_blk: allow read-only disks
  lguest: fix ugly <NULL> in /proc/interrupts
  virtio: set device index in common code.
  virtio: virtio_pci should not set bus_id.
  virtio: bus_id for devices should contain 'virtio'
  Fix crash in virtio_blk during modprobe ; rmmod ; modprobe
  lguest: use ioremap_cache, not ioremap
2008-05-30 10:20:03 -07:00
Martin Schwidefsky 4657fb8a98 [S390] tape: fix race with stack local wait_queue_head_t.
A wait_event call with a stack local wait_queue_head_t structure that is
used to do the wake up for the wait_event is inherently racy. After the
wait_event finished the wake_up call might not have completed yet.
Replace the stack local wait_queue_head_t in tape_do_io and
tape_do_io_interruptible with a per device wait queue.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30 10:03:36 +02:00
Martin Schwidefsky 54ad64129c [S390] 3270: fix race with stack local wait_queue_head_t.
A wait_event call with a stack local wait_queue_head_t structure that is
used to do the wake up for the wait_event is inherently racy. After the
wait_event finished the wake_up call might not have completed yet.
Remove the stack local wait_queue_head_t from raw3270_start_init and
use the global raw3270_wait_queue instead.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30 10:03:35 +02:00
Stefan Haberland c80ee72496 [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>
2008-05-30 10:03:35 +02:00
Heiko Carstens d4820e44b0 [S390] sclp_vt220: fix scheduling while atomic bug.
The driver incorrectly assumed that putchar will only be called from
schedulable process context and therefore blocked and waited if no
free output buffers where available.
Since putchar may also be called from BH context this may lead to
deadlocks.
To fix this just return the number of characters accepted and let the
upper layer handle the rest.

The console write function will busy wait (sclp_sync_wait) until a
buffer is available again.

Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30 10:03:35 +02:00
Heiko Carstens 67060d9c1f [S390] Fix section mismatch warnings.
This fixes the last remaining section mismatch warnings in s390
architecture code. It reveals also a real bug introduced by... me
with git commit 2069e978d5
("[S390] sparsemem vmemmap: initialize memmap.")

Calling the generic vmemmap_alloc_block() function to get initialized
memory is a nice idea, however that function is __meminit annotated
and therefore the function might be gone if we try to call it later.
This can happen if a DCSS segment gets added.

So basically revert the patch and clear the memmap explicitly to fix
the original bug.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30 10:03:34 +02:00
Michael Holzheu f71ad62a26 [S390] tape: Fix race condition in tape block device driver
Due to incorrect function call sequence it can happen that a tape block
request is finished before the request is taken from the block request queue.

The following sequence leads to that condition:
 * tapeblock_start_request() -> start CCW program
 * Request finishes -> IO interrupt
 * tapeblock_end_request()
 * end_that_request_last()

If blkdev_dequeue_request() has not been called before end_that_request_last(),
a kernel bug is triggered in end_that_request_last() because the request is
still queued. To solve that problem blkdev_dequeue_request() has to be called
before starting the CCW program.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30 10:03:33 +02:00
Rusty Russell b769f57908 virtio: set device index in common code.
Anthony Liguori points out that three different transports use the virtio code,
but each one keeps its own counter to set the virtio_device's index field.  In
theory (though not in current practice) this means that names could be
duplicated, and that risk grows as more transports are created.

So we move the selection of the unique virtio_device.index into the common code
in virtio.c, which has the side-benefit of removing duplicate code.

The only complexity is that lguest and S/390 use the index to uniquely identify
the device in case of catastrophic failure before register_virtio_device() is
called: now we use the offset within the descriptor page as a unique identifier
for the printks.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chris Lalancette <clalance@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>
2008-05-30 15:09:42 +10:00
Greg Kroah-Hartman c5fb920aec s390: fix race in device_create
There is a race from when a device is created with device_create() and
then the drvdata is set with a call to dev_set_drvdata() in which a
sysfs file could be open, yet the drvdata will be NULL, causing all
sorts of bad things to happen.

This patch fixes the problem by using the new function,
device_create_drvdata().

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-20 13:31:56 -07:00
Heiko Carstens 5ca9fd54e3 s390: KVM guest: fix compile error
Fix kvm compile error:

Commit c45a6816c1
(virtio: explicit advertisement of driver features)
and commit e976a2b997
(s390: KVM guest: virtio device support, and kvm hypercalls)
don't like each other:

  CC      drivers/s390/kvm/kvm_virtio.o
drivers/s390/kvm/kvm_virtio.c:224: error: unknown field 'feature' specified in initializer
drivers/s390/kvm/kvm_virtio.c:224: warning: initialization from incompatible pointer type
make[3]: *** [drivers/s390/kvm/kvm_virtio.o] Error 1

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-05-18 14:34:15 +03:00
Cornelia Huck f455adcff1 [S390] tape: Use ccw_dev_id to build cdev_id.
To construct the integer containing the information from the bus_id,
it is easier to use the data from ccw_dev_id than to parse the bus_id.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-15 16:52:40 +02:00
Stefan Weinhuber f16f584350 [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>
2008-05-15 16:52:40 +02:00
Cornelia Huck 69f90f6a56 [S390] dasd: Use const in busid functions.
We should use 'const char *' in the busid functions since the
strings are not modified anyway.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-15 16:52:39 +02:00
Huang Weiyi c7a8548ffa [S390] blacklist.c: removed duplicated include
Removed duplicated include <asm/cio.h>
in drivers/s390/cio/blacklist.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-15 16:52:39 +02:00
Marcin Slusarz 3cb2cea15e [S390] vmlogrdr: module initialization function should return negative errors
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-15 16:52:38 +02:00
Michael Ernst 32aff5732a [S390] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID.
CCW_CMD_SUSPEND_RECONN causes a system hang if the cable of a
reserved DASD is disconnected and connected again.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-15 16:52:37 +02:00
Heiko Carstens 74c76c8457 [S390] tty3270: fix put_char fail/success conversion.
The wrong function got coverted ;)

  CC      drivers/s390/char/tty3270.o
drivers/s390/char/tty3270.c:1747:
 warning: initialization from incompatible pointer type

Acked-by: Alan Cox <alan@redhat.com>
Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-07 09:23:02 +02:00
Martin Schwidefsky c6ca1850e7 [S390] s390mach compile warning
Fix the following compile warning:

drivers/s390/s390mach.c: In function 's390_collect_crw_info':
drivers/s390/s390mach.c:77: warning: ignoring return value of 'down_interruptibl

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-07 09:23:02 +02:00
Michael Ernst 5b8909871b [S390] cio: Fix parsing mechanism for blacklisted devices.
New format cssid.ssid.devno is now parsed correctly.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-07 09:23:01 +02:00
Michael Ernst 139b83dd57 [S390] cio: Remove cio_msg kernel parameter.
The only sporadically used CIO_DEBUG messages are replaced by ordinary
CIO_MSG_EVENT messages. The CIO_MSG_EVENT messages debug levels are
consolidated.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-07 09:23:01 +02:00
Linus Torvalds d626e3bf72 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
  [SCSI] aic94xx: fix section mismatch
  [SCSI] u14-34f: Fix 32bit only problem
  [SCSI] dpt_i2o: sysfs code
  [SCSI] dpt_i2o: 64 bit support
  [SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent
  [SCSI] dpt_i2o: use standard __init / __exit code
  [SCSI] megaraid_sas: fix suspend/resume sections
  [SCSI] aacraid: Add Power Management support
  [SCSI] aacraid: Fix jbod operations scan issues
  [SCSI] aacraid: Fix warning about macro side-effects
  [SCSI] add support for variable length extended commands
  [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer
  [SCSI] bsg: add large command support
  [SCSI] aacraid: Fix down_interruptible() to check the return value correctly
  [SCSI] megaraid_sas; Update the Version and Changelog
  [SCSI] ibmvscsi: Handle non SCSI error status
  [SCSI] bug fix for free list handling
  [SCSI] ipr: Rename ipr's state scsi host attribute to prevent collisions
  [SCSI] megaraid_mbox: fix Dell CERC firmware problem
2008-05-02 13:52:35 -07:00
Boaz Harrosh 64a87b244b [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer
- struct scsi_cmnd had a 16 bytes command buffer of its own.
   This is an unnecessary duplication and copy of request's
   cmd. It is probably left overs from the time that scsi_cmnd
   could function without a request attached. So clean that up.

 - Once above is done, few places, apart from scsi-ml, needed
   adjustments due to changing the data type of scsi_cmnd->cmnd.

 - Lots of drivers still use MAX_COMMAND_SIZE. So I have left
   that #define but equate it to BLK_MAX_CDB. The way I see it
   and is reflected in the patch below is.
   MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB
                      as per the SCSI standard and is not related
                      to the implementation.
   BLK_MAX_CDB.     - The allocated space at the request level

 - I have audit all ISA drivers and made sure none use ->cmnd in a DMA
   Operation. Same audit was done by Andi Kleen.

(*)fixed-length here means commands that their size can be determined
   by their opcode and the CDB does not carry a length specifier, (unlike
   the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly
   true and the SCSI standard also defines extended commands and
   vendor specific commands that can be bigger than 16 bytes. The kernel
   will support these using the same infrastructure used for VARLEN CDB's.
   So in effect MAX_COMMAND_SIZE means the maximum size command
   scsi-ml supports without specifying a cmd_len by ULD's

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-05-02 10:18:22 -05:00
Linus Torvalds 95dfec6ae1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (53 commits)
  tcp: Overflow bug in Vegas
  [IPv4] UFO: prevent generation of chained skb destined to UFO device
  iwlwifi: move the selects to the tristate drivers
  ipv4: annotate a few functions __init in ipconfig.c
  atm: ambassador: vcc_sf semaphore to mutex
  MAINTAINERS: The socketcan-core list is subscribers-only.
  netfilter: nf_conntrack: padding breaks conntrack hash on ARM
  ipv4: Update MTU to all related cache entries in ip_rt_frag_needed()
  sch_sfq: use del_timer_sync() in sfq_destroy()
  net: Add compat support for getsockopt (MCAST_MSFILTER)
  net: Several cleanups for the setsockopt compat support.
  ipvs: fix oops in backup for fwmark conn templates
  bridge: kernel panic when unloading bridge module
  bridge: fix error handling in br_add_if()
  netfilter: {nfnetlink,ip,ip6}_queue: fix skb_over_panic when enlarging packets
  netfilter: x_tables: fix net namespace leak when reading /proc/net/xxx_tables_names
  netfilter: xt_TCPOPTSTRIP: signed tcphoff for ipv6_skip_exthdr() retval
  tcp: Limit cwnd growth when deferring for GSO
  tcp: Allow send-limited cwnd to grow up to max_burst when gso disabled
  [netdrvr] gianfar: Determine TBIPA value dynamically
  ...
2008-04-30 08:45:48 -07:00
Linus Torvalds d67c6f869c Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] Update default configuration.
  [S390] use generic sys_ptrace
  [S390] Remove self ptrace IEEE_IP hack.
  [S390] Convert to SPARSEMEM & SPARSEMEM_VMEMMAP
  [S390] System z large page support.
  [S390] Convert machine feature detection code to C.
  [S390] vmemmap: use clear_table to initialise page tables.
  [S390] Move stfl to system.h and delete duplicated version.
  [S390] uaccess_mvcos: #ifdef config dependent code.
  [S390] cpu topology: Fix possible deadlock.
  [S390] Add topology_core_siblings to topology.h
  [S390] cio: Make isc handling more robust.
  [S390] remove -traditional
  [S390] Automatically detect added cpus.
  [S390] smp: Fix locking order.
  [S390] Add missing ifndef/define to include/asm-s390/sysinfo.h.
  [S390] Move show_regs to traps.c.
  [S390] cio: Use strict_strtoul() for attributes.
2008-04-30 08:38:30 -07:00
Alan Cox 9e7c9a19c1 s390 tty: Prepare for put_char to return success/fail
Put the changes into the drivers first.  This will still compile/work but
produce a warning if bisected so can still be debugged

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:45 -07:00
Heiko Carstens 17f3458085 [S390] Convert to SPARSEMEM & SPARSEMEM_VMEMMAP
Convert s390 to SPARSEMEM and SPARSEMEM_VMEMMAP. We do a select
of SPARSEMEM_VMEMMAP since it is configurable. This is because
SPARSEMEM without SPARSEMEM_VMEMMAP gives us a hell of broken
include dependencies that I don't want to fix.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-04-30 13:38:48 +02:00
Cornelia Huck edf2209692 [S390] cio: Make isc handling more robust.
Introduce an ->isc field in the subchannel to store the desired
interruption subclass, since sch->schib.pmcw.isc may be overwritten
by the hardware on stsch() after machine checks.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-04-30 13:38:45 +02:00
Heiko Carstens 1e489518da [S390] Automatically detect added cpus.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-04-30 13:38:44 +02:00
Cornelia Huck 2f97220231 [S390] cio: Use strict_strtoul() for attributes.
Make parsing of attribute writes handle incorrect input better.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-04-30 13:38:43 +02:00
Denis V. Lunev 8b594007c3 s390: use non-racy method for proc entries creation
Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
main tree.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:21 -07:00
Alexey Dobriyan c74c120a21 proc: remove proc_root from drivers
Remove proc_root export.  Creation and removal works well if parent PDE is
supplied as NULL -- it worked always that way.

So, one useless export removed and consistency added, some drivers created
PDEs with &proc_root as parent but removed them as NULL and so on.

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>
2008-04-29 08:06:18 -07:00
Cornelia Huck 0a0a83107c netiucv: Fix missing driver attributes.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:36 -04:00
Frank Blaschka efe3df6f6c qeth: layer 2 allow ethtool to set TSO
Allow ethtool to turn on/off EDDP via ethtool TSO interface.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:35 -04:00
Ursula Braun a74b08c7fc qeth: read number of ports from card
Read out number of ports from the hardware.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:34 -04:00
Frank Blaschka 8af7c5aebc qeth: layer 3 add missing dev_open/close to ccwgroup handler
In case the ccwgroup device is set online/offline we have to run
the corresponding dev_open/close for the netdevice.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:33 -04:00
Frank Blaschka f90b744eb8 qeth: rework fast path
Remove unnecessary traces. Remove unnecessary wrappers for skb
functions.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:32 -04:00
Frank Blaschka 3f9975aa4d qeth: provide get ethtool settings
Load balancing bonding queries the speed of the slave interfaces.
To support a bond consisting of different slave speeds we have to
report the speed by ethtool settings.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:31 -04:00
Frank Blaschka 213298f862 qeth: layer 3 support vlan IPv6 on hiper socket
hiper socket require the QETH_HDR_EXT_VLAN_FRAME flag in the
qdio header to handle vlan tagged frames.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:31 -04:00
Peter Tiedemann cd023216e6 qeth module size reduction.
Replace complex macro for s390dbf calls by equivalent function. This reduces
module size about 10% without visible performance impact.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:30 -04:00
Ursula Braun 022b660ae5 ccwgroup: Unify parsing for group attribute.
Instead of having each driver for ccwgroup slave device parsing the
input itself and calling ccwgroup_create(), introduce a new function
ccwgroup_create_from_string() and handle parsing inside the ccwgroup
core.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:29 -04:00
Ursula Braun 8bbf84404b netiucv: get rid of in_atomic() use
There is no urgent need to restart a netiucv connection automatically,
if packets are sent while the netiucv device is not up and running.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:28 -04:00
Klaus D. Wacker 93ad37d94d lcs: CCL-sequ. numbers required for protocol 802.2 only.
Sequence numbers in skbs (Receive path) are assigned only to
802.2 packets.

Signed-off-by: Klaus D. Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 01:56:27 -04:00
Jared Hulbert 30afcb4bd2 return pfn from direct_access, for XIP
Alter the block device ->direct_access() API to work with the new
get_xip_mem() API (that requires both kaddr and pfn are returned).

Some architectures will not do the right thing in their virt_to_page() for use
by XIP (to translate from the kernel virtual address returned by
direct_access(), to a user mappable pfn in XIP's page fault handler.

However, we can't switch it to just return the pfn and not the kaddr, because
we have no good way to get a kva from a pfn, and XIP requires the kva for its
read(2) and write(2) handlers.  So we have to return both.

Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-mm@kvack.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 08:58:23 -07:00
Linus Torvalds 064922a805 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (40 commits)
  [SCSI] jazz_esp, sgiwd93, sni_53c710, sun3x_esp: fix platform driver hotplug/coldplug
  [SCSI] aic7xxx: add const
  [SCSI] aic7xxx: add static
  [SCSI] aic7xxx: Update _shipped files
  [SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
  [SCSI] qla2xxx: Update version number to 8.02.01-k2.
  [SCSI] qla2xxx: Correct regression in relogin code.
  [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.
  [SCSI] qla2xxx: make qla2x00_issue_iocb_timeout() static
  [SCSI] qla2xxx: qla_os.c, make 2 functions static
  [SCSI] qla2xxx: Re-register FDMI information after a LIP.
  [SCSI] qla2xxx: Correct SRB usage-after-completion/free issues.
  [SCSI] qla2xxx: Correct ISP84XX verify-chip response handling.
  [SCSI] qla2xxx: Wakeup DPC thread to process any deferred-work requests.
  [SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.
  [SCSI] m68k: new mac_esp scsi driver
  [SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs
  [SCSI] zfcp: Print some messages only during ERP
  [SCSI] zfcp: Wait for free SBAL during exchange config
  [SCSI] scsi_transport_fc: fc_user_scan correction
  ...
2008-04-27 11:25:00 -07:00
Swen Schillig 6d9d63b948 [SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs
The new FCP adapter statistics provide a variety of information about
the virtual adapter (subchannel). In order to collect this information
the zfcp driver is extended to query this information.

The information provided by the new FCP adapter statistics can be
fetched by reading from the following files in the sysfs filesystem

/sys/class/scsi_host/host<n>/seconds_active
/sys/class/scsi_host/host<n>/requests
/sys/class/scsi_host/host<n>/megabytes
/sys/class/scsi_host/host<n>/utilization

These are the statistics on a virtual adapter (subchannel) level.

The information provided is raw and not modified or interpreted by any
means.  No interpretation or modification of the values is done by the
zfcp driver.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-27 12:19:57 -05:00
Swen Schillig ec258fe4b7 [SCSI] zfcp: Print some messages only during ERP
When statistics are polled from sysfs, the statistics use the same
commands as the adapter initialization. Change the messages printed
here, so they are only printed during initialization and not for each
poll of adapter data.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-27 12:19:57 -05:00
Swen Schillig aee6ef1859 [SCSI] zfcp: Wait for free SBAL during exchange config
When sending a exchange config data command, wait for a free SBAL.
This does not matter during adapter initialization, but this is
required for pulling adapter statistics during high I/O load.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-27 12:19:56 -05:00
Christian Borntraeger e976a2b997 s390: KVM guest: virtio device support, and kvm hypercalls
This patch implements kvm guest kernel support for paravirtualized devices
and contains two parts:
o a basic virtio stub using virtio_ring and external interrupts and hypercalls
o full hypercall implementation in kvm_para.h

Currently we dont have PCI on s390. Making virtio_pci usable for s390 seems
more complicated that providing an own stub. This virtio stub is similar to
the lguest one, the memory for the descriptors and the device detection is made
via additional mapped memory on top of the guest storage. We use an external
interrupt with extint code 0x2603 for host->guest notification.

The hypercall definition uses the diag instruction for issuing a hypercall. The
parameters are written in R2-R7, the hypercall number is written in R1. This is
similar to the system call ABI (svc) which can use R1 for the number and R2-R6
for the parameters.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-04-27 12:00:51 +03:00
Matthew Wilcox 6188e10d38 Convert asm/semaphore.h users to linux/semaphore.h
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:22:54 -04:00
Matthew Wilcox d3135846f6 drivers: Remove unnecessary inclusions of asm/semaphore.h
None of these files use any of the functionality promised by
asm/semaphore.h.  It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:16:32 -04:00
Linus Torvalds 334d094504 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26: (1090 commits)
  [NET]: Fix and allocate less memory for ->priv'less netdevices
  [IPV6]: Fix dangling references on error in fib6_add().
  [NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
  [PKT_SCHED]: Fix datalen check in tcf_simp_init().
  [INET]: Uninline the __inet_inherit_port call.
  [INET]: Drop the inet_inherit_port() call.
  SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
  [netdrvr] forcedeth: internal simplifications; changelog removal
  phylib: factor out get_phy_id from within get_phy_device
  PHY: add BCM5464 support to broadcom PHY driver
  cxgb3: Fix __must_check warning with dev_dbg.
  tc35815: Statistics cleanup
  natsemi: fix MMIO for PPC 44x platforms
  [TIPC]: Cleanup of TIPC reference table code
  [TIPC]: Optimized initialization of TIPC reference table
  [TIPC]: Remove inlining of reference table locking routines
  e1000: convert uint16_t style integers to u16
  ixgb: convert uint16_t style integers to u16
  sb1000.c: make const arrays static
  sb1000.c: stop inlining largish static functions
  ...
2008-04-18 18:02:35 -07:00
Linus Torvalds 2cca775bae Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits)
  [SCSI] iscsi: bidi support for iscsi_tcp
  [SCSI] iscsi: bidi support at the generic libiscsi level
  [SCSI] iscsi: extended cdb support
  [SCSI] zfcp: Fix error handling for blocked unit for send FCP command
  [SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
  [SCSI] zfcp: fix 31 bit compile warnings
  [SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands
  [SCSI] bsg: remove minor in struct bsg_device
  [SCSI] bsg: use better helper list functions
  [SCSI] bsg: replace kobject_get with blk_get_queue
  [SCSI] bsg: takes a ref to struct device in fops->open
  [SCSI] qla1280: remove version check
  [SCSI] libsas: fix endianness bug in sas_ata
  [SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
  [SCSI] aacraid: Do not describe check_reset parameter with its value
  [SCSI] aacraid: Fix down_interruptible() to check the return value
  [SCSI] sun3_scsi_vme: add MODULE_LICENSE
  [SCSI] st: rename flush_write_buffer()
  [SCSI] tgt: use KMEM_CACHE macro
  [SCSI] initio: fix big endian problems for auto request sense
  ...
2008-04-18 11:25:31 -07:00
Christof Schmitt 57b7658aed [SCSI] zfcp: Fix error handling for blocked unit for send FCP command
In the case the unit is blocked, zfcp_unit_get has not been called
yet, so the error handling path should not call zfcp_unit_put.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-18 11:50:41 -05:00
Christof Schmitt 6071d7ec36 [SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
The testcase
# chchp -v 0 0.da && sleep 59 && chchp -v 1 0.da
results in this deadlock situation:

STACK TRACE FOR TASK: 0x7e9a2048 (zfcperp0.0.c613)
0 schedule+816 [0x356b3c]
1 schedule_timeout+172 [0x357340]
2 wait_for_common+192 [0x3565fc]
3 flush_cpu_workqueue+116 [0x52af0]
4 flush_workqueue+116 [0x533b8]
5 fc_remote_port_add+64 [0x1c83ec]
6 zfcp_erp_thread+4534 [0x26585a]
7 kernel_thread_starter+6 [0x195d2]

STACK TRACE FOR TASK: 0x7f8ec048 (fc_wq_0)
0 schedule+816 [0x356b3c]
1 zfcp_erp_wait+104 [0x264568]
2 zfcp_scsi_slave_destroy+64 [0x261b24]
3 __scsi_remove_device+154 [0x1c24ba]
4 scsi_remove_device+62 [0x1c2512]
5 __scsi_remove_target+198 [0x1c25ea]
6 __remove_child+58 [0x1c26d6]
7 device_for_each_child+66 [0x1ab566]
8 scsi_remove_target+98 [0x1c268a]
9 run_workqueue+200 [0x5272c]
10 worker_thread+146 [0x52882]
11 kthread+140 [0x58360]
12 kernel_thread_starter+6 [0x195d2]

Remove the zfcp_erp_wait call that is not required here to prevent the
deadlock situation.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-18 11:50:30 -05:00
Martin Peschke 1f6f7129eb [SCSI] zfcp: fix 31 bit compile warnings
drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_rscn’:
drivers/s390/scsi/zfcp_aux.c:1379: warning: cast from pointer to integer of
different size
drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_plogi’:
drivers/s390/scsi/zfcp_aux.c:1432: warning: cast from pointer to integer of
different size
drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_logo’:
drivers/s390/scsi/zfcp_aux.c:1457: warning: cast from pointer to integer of
different size
..

Just passing pointers rids us of these warnings and improves readability.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-18 11:50:17 -05:00
Martin Peschke ee95a16d39 [SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
as seen in linux-next tree:

drivers/s390/scsi/zfcp_dbf.c: In function ‘zfcp_rec_dbf_event_thread’:
drivers/s390/scsi/zfcp_dbf.c:697: warning: passing argument 1 of ‘atomic_read’
 from incompatible pointer type

Caused by recent git commit:

commit 348447e857
Author: Martin Peschke <mp3@de.ibm.com>
Date:   Thu Mar 27 14:22:01 2008 +0100

    [SCSI] zfcp: Add trace records for recovery thread and its queues

We are not supposed to poke inside semaphore.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Acked-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-17 12:56:49 -05:00
Martin Schwidefsky ca68305bf3 [S390] Remove code duplication from monreader / dcssblk.
Move the function that prints the segment warning messages found in the
monreader driver and the dcssblk driver to the extmem base code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:07 +02:00
Felix Beck 1749a81d62 [S390] zcrypt: Comments and kernel-doc cleanup
Comments, which suggested to be kernel-doc but were not in the right
formatting, have been corrected. Additionally some minor cleanup in
the comments has been done.

Signed-off-by: Felix Beck <felix.beck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:06 +02:00
Heiko Carstens a806170e29 [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>
2008-04-17 07:47:06 +02:00
Heiko Carstens 5a62b19219 [S390] Convert s390 to GENERIC_CLOCKEVENTS.
This way we get rid of s390's NO_IDLE_HZ and use the generic dynticks
variant instead. In addition we get high resolution timers for free.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:05 +02:00
Heiko Carstens 43ca5c3a1c [S390] Convert monitor calls to function calls.
Remove the program check generating monitor calls and use function
calls instead. Theres is no real advantage in using monitor calls,
but they do make debugging harder, because of all the program checks
it generates.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:05 +02:00
Ursula Braun e177685628 [S390] qdio (new feature): enhancing info-retrieval from QDIO-adapters
Next generation of OSA adapters allows retrieval of further self-describing
infos. This is the preparational infrastructure patch for further exploitation
in the qeth driver.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:04 +02:00
Harvey Harrison 2a2cf6b186 [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>
2008-04-17 07:47:04 +02:00
Ralph Wuerthner 2f7c8bd6dc [S390] zcrypt: add support for large random numbers
This patch allows user space applications to access large amounts of
truly random data. The random data source is the build-in hardware
random number generator on the CEX2C cards.

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:02 +02:00
Martin Schwidefsky cbce70e687 [S390] Add new fields for System z10 to /proc/sysinfo
Add permanent and temporary model capacity and the corresponding
capacity value fields for the three capacity identifiers to the
output of /proc/sysinfo.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:01 +02:00
Christian Borntraeger aa24f7f08b [S390] KVM preparation: split sysinfo definitions for kvm use
drivers/s390/sysinfo.c uses the store system information intruction to query
the system about information of the machine, the LPAR and additional
hypervisors. KVM has to implement the host part for this instruction.

To avoid code duplication, this patch splits the common definitions from
sysinfo.c into a separate header file include/asm-s390/sysinfo.h for KVM use.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:00 +02:00
Stefan Haberland f60c768c38 [S390] dasd: add sim handling.
Now the system reports system information messages (SIM) to the user.
The System Reference Code (SRC) which is reported to the user gives
the abbility to lookup the reason of the SIM online in the
documentation of the storage server.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:47:00 +02:00
Frank Munzert a695f16729 [S390] vmur: Use wait queue instead of mutex to serialize open
If user space opens a unit record device node then vmur is leaving the kernel
with lock open_mutex still held to prevent other processes from opening the
device simultaneously. This causes lockdep to complain about a lock held when
returning to user space.
Now the mutex is replaced by a wait queue to serialize device open.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:59 +02:00
Michael Holzheu 92bf435f38 [S390] tape: duplicate sysfs filename when setting tape device online
When a tape device is set online, offline and online again, the following
error message is printed on the console: "sysfs: duplicate filename
'non-rewinding' can not be created". The reason is that when setting a
device online, the tape driver creates a sysfs symlink from the tape device
to the tape class device. Unfortunately the symlink is not removed
correctly, when the device is set offline. Instead of passing the
tape device object to sysfs_remove_link, the class device object is used.
This patch fixes this problem and uses the correct tape device object now.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:59 +02:00
Stefan Haberland 00966c0a5b [S390] dasd: use GFP_DMA for fba private data allocation
allocating dasd_fba_private without GFP_DMA results in IO error
during read device characteristics of a FBA disk

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:58 +02:00
Ursula Braun 35b58b028d [S390] qdio: Unrecognized inbound traffic if many FCP devices are online
Problem:
Usually every FCP device has its own indicator field the adapter
uses to signal outstanding work. Once a certain limit of devices
is reached, a common indicator field is used. In certain scenarios
qdio resets this common indicator field, but handles only part of
the FCP-devices sharing the common indicator field. Thus inbound
traffic on the non-processed shared FCP-devices is not recognized
immediately.

Solution:
Make sure common indicator field is reset only, if all FCP-devices
sharing the indicator are processed.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:58 +02:00
Heiko Carstens d1e23375bf [S390] sclp: Get rid of in_atomic() use.
Reintroduces in_interrupt() check in sclp_tty code. Add may_schedule
parameter to vt220 write function, so we can let the write function
know if it may schedule or not. So we disallow scheduling for all
console calls and may allow them for tty calls.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:58 +02:00
Michael Ernst 8284fb19ef [S390] cio: fix parallel cm_enable processing.
It is now possible to trigger cm_enable processing several times in
parallel without causing a kernel panic.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:57 +02:00
Cornelia Huck fe6173d9b3 [S390] cio: Trigger verification on device/path not operational.
Currently, we don't do much on no path or no device situations during
normal user I/O, since we rely on reports regarding those events by
the machine. If we trigger a path verification to bring our device
state up-to-date, we (a) may recover from path failures earlier and
(b) better handle situations where the hardware/hypervisor doesn't
give us enough notifications.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:57 +02:00
Cornelia Huck 22806dc1a8 [S390] cio: Fix race for "fast" path gone/path back situations.
Make sure we wait for previous evaluations triggered by path state
changes to have settled before we manipulate path states again.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 07:46:57 +02:00
Josef 'Jeff' Sipek 08a8a0c59e [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>
2008-04-17 07:46:55 +02:00
Ursula Braun 3caa4af834 qeth: keep ip-address after LAN_OFFLINE failure
Problem:     If setting of an ip-address fails with LAN_OFFLINE,
             qeth does not save the ip-address in its internal
             list of set ip-addresses. qeth recovers after a
             following STARTLAN event, but cannot set the unsaved
             ip-address.
Solution:    save the ip-address in the qeth-maintained list of
             ip-addresses after a LAN_OFFLINE failure for SETIP.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:42 -04:00
Frank Blaschka b403e685b7 qeth: core code should alloc headroom for LLC protocol
Allocate headroom for TR_HLEN but using only ETH_HLEN causes rx
performance degradation. Allocate ETH_HLEN for ethernet and
TR_HLEN for token ring (layer 3 mode).

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:41 -04:00
Peter Tiedemann d11ba0c40f qeth: improving debug message handling
Improving debug message handling, moving ipa into messages from kernel
to dbf, some cleanups and typo fixes.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:41 -04:00
Frank Blaschka b7624ec1cf qeth: layer 3 do not allow to change mac address
hw does not allow to change the mac address.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:40 -04:00
Ursula Braun 1288372599 qeth: CCL-sequence numbers required for protocol ETH_P_802_2 only
Symptom:     slow CCL response time
Problem:     non-ETH_P_802_2 packets are not delivered to NDH for
             CCL. But CCL detects missing sequence numbers, which
             cause a serious performance problem with CCL.
Solution:    assign sequence numbers only to 802.2 packets.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:40 -04:00
Ursula Braun 922dc0624e qeth: set lan_online flag after a received STARTLAN
Problem:     A STARTLAN command from the adapter may arrive while a
             qeth recovery is currently running with a failed qeth
             STARTLAN. Usually qeth schedules a recovery when
             receiving a STARTLAN command from the adapter. But
             another recovery scheduled while a recovery is already
             running never starts. Thus the qeth-administered
             lan_online flag remains zero in this scenario, even
             though the adapter-STARTLAN has happened.
Solution:    Set lan_online flag for a received STARTLAN from the
             adapter in case scheduled recovery does not start.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:39 -04:00
Ursula Braun 508b3c4f71 qeth: allow qdio queue element addresses > 2GB
OSA-adapters do not have an address limitation for the qdio queue
structures except the MAX storage level of the current processor.
And due to a recent z/VM APAR there is no longer a restriction to
allocate qdio structures below 2 GB.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:38 -04:00
Ursula Braun 2d921c321c qeth: improve ip_list administration after deregister failures
1. ip_list handling after deregister failure of multicast address:
   If error code "MC Address not found" is returned do not re-add
   multicast address to ip_list.
   For other error codes readd multicast address at the end of
   function qeth_delete_all_mc.
2. ip_list handling after deregister failure or normal ip address:
   If error code "IP Address not found" is returned do not re-add
   multicast address to ip list.
   This is especially important in IP address takeover scenarios,
   to enable re-takeover of a taken over IP address.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:38 -04:00
Martin Peschke bfab1637b5 [SCSI] zfcp: Add docbook comments to debug trace.
Add missing docbook-comments for functions forming zfcp's internal
trace API.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:10 -05:00
Martin Peschke 92c7a83fc1 [SCSI] zfcp: Cleanup line breaks in debug trace.
Remove line breaks that do not conform to coding style.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:10 -05:00
Martin Peschke 6bc473dd32 [SCSI] zfcp: Shorten excessive names in debug trace.
Saving on line breaks, improving readability, by shortening excessive
function names and identifiers, by simplifying some functions call
chains, and by simplifying nesting of some data structure.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:10 -05:00
Christof Schmitt 2b604c9b90 [SCSI] zfcp: Move DBF definitions to private header file
Unclutter the global zfcp_def.h header. Move everything required to
call into the debug feature to a new header file.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:09 -05:00
Martin Peschke a9c857757e [SCSI] zfcp: Simplify zfcp_dbf_tag and related functions in debug trace.
Simplify usage of zfcp_dbf_tag() and calling functions.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:09 -05:00
Martin Peschke df29f4ac4d [SCSI] zfcp: Simplify usage of hex dump output function for debug trace.
Simplify usage of output function for hex dumps.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:09 -05:00
Martin Peschke c7b7fc8c30 [SCSI] zfcp: Remove obsolete output function from debug trace.
Remove obsolete output function.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:09 -05:00
Martin Peschke b634fff743 [SCSI] zfcp: Cleanup debug trace view functions.
Improve readability of code by using more convenient output function.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:09 -05:00
Martin Peschke 8fc5af1687 [SCSI] zfcp: simplify zfcp_dbf_timestamp()
Change zfcp_dbf_timestamp() so that it just calculates timespec from
timestamp. First step to be able to rip this code out of zfcp.
Besides, this change makes it easier to rip out old-style debug view
functions.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:08 -05:00
Martin Peschke 507e49693a [SCSI] zfcp: Remove obsolete erp_dbf trace
This patch removes the now obsolete erp_dbf trace.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:05 -05:00
Martin Peschke 6f4f365e9c [SCSI] zfcp: Add trace records for recovery actions.
This patch writes trace records for various phases of a recovery action:
action being created, action being processed, action continueing
asynchronously, action gone, action timed out, action dismissed etc.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:05 -05:00
Martin Peschke 9467a9b3ef [SCSI] zfcp: Trace all triggers of error recovery activity
This patch allows any recovery event to be traced back to an exact
cause, e.g. a particular request identified by an id (address).

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:04 -05:00
Martin Peschke 698ec01635 [SCSI] zfcp: Add traces for state changes.
This patch writes a trace record which provides information about state
changes for adapters, ports and units, e.g. target failure, targets becoming
online, targets being temporarily blocked due to pending recovery, targets
which have been recovered successfully etc.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:04 -05:00
Martin Peschke 348447e857 [SCSI] zfcp: Add trace records for recovery thread and its queues
This patch writes trace records which provide information about the
operation of the zfcp error recovery thread and the queues it works
on.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:04 -05:00
Martin Peschke d79a83dbff [SCSI] zfcp: Register new recovery trace.
This patch registers the new recovery trace with the s390 debug
feature.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:04 -05:00
Martin Peschke 10223c60da [SCSI] zfcp: Introduce printf helper functions for debug trace.
Introducing helper functions that allow for code simpfifications.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:04 -05:00
Martin Peschke b75db73159 [SCSI] zfcp: Add qtcb dump to hba debug trace
This patch adds per request hardware debugging data to the trace
record which is written per request. It's a replacement for some sad
kernel message based debugging code. Considering the amount of trace
data, printk() is not suitable for this stuff. Writing binary traces
is more efficient. In addition we got all information in one place.

The QTCB trace data is only dumped for requests other than SCSI
requests.  Otherwise we would flood the trace ring buffer. We are
mostly interested in non-SCSI, recovery related requests here anyway.

This patch also works around a known hardware bug. It truncates QTCB
traces so that we do not save unused areas of the hardware trace.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:03 -05:00
Martin Peschke 07c70d26b5 [SCSI] zfcp: Remove qtcb dump to kernel log
Is not appropriate to printk() tons of hardware trace data.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:03 -05:00
Martin Peschke 0f65e951ee [SCSI] zfcp: Clean up _zfcp_san_dbf_event_common_els
Clean up _zfcp_san_dbf_event_common_els using zfcp_dbf_hexdump()
helper.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:03 -05:00
Martin Peschke c15450e33d [SCSI] zfcp: Introduce a helper function that dumps hex data to a zfcp trace.
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:19:03 -05:00
Christof Schmitt 5c815d1501 [SCSI] zfcp: Fix handling for boxed port after physical close
When a FSF physical close returns the status boxed, this means that
another system already closed the port. For our system this is the
same status as in the good path, we have to send the normal close. So,
set the status for the boxed response to the same as for the good
status.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:15:44 -05:00
Christof Schmitt 74b2e047ec [SCSI] zfcp: convert zfcp to use target reset and device reset handler
[based on proposal from Mike Christie <michaelc@cs.wisc.edu>, this
patch adds some simplifications to the handler functions]

With the new target reset handler callback in the SCSI midlayer, the
device reset handler in zfcp can be split in two parts. Now, zfcp does
not have to track anymore whether the device supports LUN resets, so
remove this flag and let the SCSI midlayer decide what to do.

The device reset handler simply issues a LUN reset and the target
reset handler a target reset.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07 12:15:43 -05:00
YOSHIFUJI Hideaki c346dca108 [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
Introduce per-net_device inlines: dev_net(), dev_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-26 04:39:53 +09:00
David S. Miller 76fef2b6bf Merge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Conflicts:

	drivers/s390/net/qeth_main.c
2008-03-22 18:22:42 -07:00
David S. Miller 577f99c1d0 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/rt2x00/rt2x00dev.c
	net/8021q/vlan_dev.c
2008-03-18 00:37:55 -07:00
Frank Blaschka 19a3da6c6e qeth: remove old qeth files
Remove all obsolete qeth files.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-17 07:49:26 -04:00
Frank Blaschka 4a71df5004 qeth: new qeth device driver
List of major changes and improvements:
 no manipulation of the global ARP constructor
 clean code split into core, layer 2 and layer 3 functionality
 better exploitation of the ethtool interface
 better representation of the various hardware capabilities
 fix packet socket support (tcpdump), no fake_ll required
 osasnmpd notification via udev events
 coding style and beautification

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-17 07:49:26 -04:00
Peter Tiedemann 04885948b1 ctc: removal of the old ctc driver
ctc driver is replaced by a new ctcm driver.
The ctcm driver supports the channel-to-channel connections of the
old ctc driver plus an additional MPC protocol to provide SNA
connectivity.
This patch removes the functions of the old ctc driver.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-17 07:49:26 -04:00