1. 16 6月, 2009 2 次提交
    • C
      [S390] pm: vmwatchdog power management callbacks. · 58872d5f
      Christian Borntraeger 提交于
      This patch implements suspend/hibernation for the vmwatchdog driver. The
      pm_notifier_callchain is used to get control on PM events. Since watchdog
      operation and suspend cannot work together in a reliable fashion, the open
      flag is also used to prevent suspend and open from happening at the same
      time.
      The watchdog can also be active with no open file descriptor. This patch
      adds another flag which is only changed in vmwdt_keep_alive and
      vmwdt_disable.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      58872d5f
    • M
      [S390] pm: con3215 power management callbacks · 77812a27
      Martin Schwidefsky 提交于
      Introduce the power management callbacks to the 3215 console. On suspend
      the console buffer is flushed to the 3215 device to have an empty console
      buffer. Printks done while the 3215 device is suspended are buffered in
      the 64K buffer of the 3215 device. If the buffer is full new messages will
      push out the oldest messages to make room for the most recent message.
      On resume the buffered messages are printed. If the system panics before
      the 3215 device is resumed ccw_device_force_console is used to get the
      console working again.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      77812a27
  2. 12 6月, 2009 2 次提交
    • M
      [S390] 3270: lock dependency fixes · 205d7ab9
      Martin Schwidefsky 提交于
      Lockdep found a problem with the lock order of the view lock and the
      ccw device lock. raw3270_activate_view/raw3270_deactivate_view first
      take the ccw device lock then call the activate/deactivate functions
      of the view which take view lock. The update functions of the
      con3270/tty3270 view will first take the view lock, then take the
      ccw device lock. To fix this the activate/deactivate functions are
      changed to avoid taking the view lock by moving the functions calls
      that modify the 3270 output buffer to the update function which is
      called by a timer.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      205d7ab9
    • M
      [S390] 3270: do not register with tty_register_device · fcf7581f
      Martin Schwidefsky 提交于
      The tty3270_notifier that calls tty_register_device / tty_unregister_device
      is harmful in two ways:
      1) the device node that is create is wrong because the minor numbers for
         3270 tty start with 1 and tty_notifier passes the minor as index.
      2) If 1) is corrected you'll get a warning:
           WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x4c/0x60()
           sysfs: duplicate filename '227:1' can not be created
         The 227:1 link is already created by raw3270_create_attributes to refer
         to ../../class/tty/tty<devno>. There cannot be two links.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fcf7581f
  3. 23 5月, 2009 1 次提交
  4. 11 5月, 2009 2 次提交
    • T
      block: implement and enforce request peek/start/fetch · 9934c8c0
      Tejun Heo 提交于
      Till now block layer allowed two separate modes of request execution.
      A request is always acquired from the request queue via
      elv_next_request().  After that, drivers are free to either dequeue it
      or process it without dequeueing.  Dequeue allows elv_next_request()
      to return the next request so that multiple requests can be in flight.
      
      Executing requests without dequeueing has its merits mostly in
      allowing drivers for simpler devices which can't do sg to deal with
      segments only without considering request boundary.  However, the
      benefit this brings is dubious and declining while the cost of the API
      ambiguity is increasing.  Segment based drivers are usually for very
      old or limited devices and as converting to dequeueing model isn't
      difficult, it doesn't justify the API overhead it puts on block layer
      and its more modern users.
      
      Previous patches converted all block low level drivers to dequeueing
      model.  This patch completes the API transition by...
      
      * renaming elv_next_request() to blk_peek_request()
      
      * renaming blkdev_dequeue_request() to blk_start_request()
      
      * adding blk_fetch_request() which is combination of peek and start
      
      * disallowing completion of queued (not started) requests
      
      * applying new API to all LLDs
      
      Renamings are for consistency and to break out of tree code so that
      it's apparent that out of tree drivers need updating.
      
      [ Impact: block request issue API cleanup, no functional change ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: unsik Kim <donari75@gmail.com>
      Cc: Paul Clements <paul.clements@steeleye.com>
      Cc: Tim Waugh <tim@cyberelk.net>
      Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Laurent Vivier <Laurent@lvivier.info>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: Pierre Ossman <drzeus@drzeus.cx>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Stefan Weinhuber <wein@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      9934c8c0
    • T
      block: convert to pos and nr_sectors accessors · 83096ebf
      Tejun Heo 提交于
      With recent cleanups, there is no place where low level driver
      directly manipulates request fields.  This means that the 'hard'
      request fields always equal the !hard fields.  Convert all
      rq->sectors, nr_sectors and current_nr_sectors references to
      accessors.
      
      While at it, drop superflous blk_rq_pos() < 0 test in swim.c.
      
      [ Impact: use pos and nr_sectors accessors ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Tested-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NAdrian McMenamin <adrian@mcmen.demon.co.uk>
      Acked-by: NAdrian McMenamin <adrian@mcmen.demon.co.uk>
      Acked-by: NMike Miller <mike.miller@hp.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Paul Clements <paul.clements@steeleye.com>
      Cc: Tim Waugh <tim@cyberelk.net>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Dario Ballabio <ballabio_dario@emc.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: unsik Kim <donari75@gmail.com>
      Cc: Laurent Vivier <Laurent@lvivier.info>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      83096ebf
  5. 28 4月, 2009 1 次提交
    • T
      block: implement and use [__]blk_end_request_all() · 40cbbb78
      Tejun Heo 提交于
      There are many [__]blk_end_request() call sites which call it with
      full request length and expect full completion.  Many of them ensure
      that the request actually completes by doing BUG_ON() the return
      value, which is awkward and error-prone.
      
      This patch adds [__]blk_end_request_all() which takes @rq and @error
      and fully completes the request.  BUG_ON() is added to to ensure that
      this actually happens.
      
      Most conversions are simple but there are a few noteworthy ones.
      
      * cdrom/viocd: viocd_end_request() replaced with direct calls to
        __blk_end_request_all().
      
      * s390/block/dasd: dasd_end_request() replaced with direct calls to
        __blk_end_request_all().
      
      * s390/char/tape_block: tapeblock_end_request() replaced with direct
        calls to blk_end_request_all().
      
      [ Impact: cleanup ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      40cbbb78
  6. 23 4月, 2009 1 次提交
  7. 26 3月, 2009 4 次提交
  8. 19 2月, 2009 2 次提交
  9. 09 1月, 2009 2 次提交
  10. 06 1月, 2009 1 次提交
  11. 25 12月, 2008 9 次提交
  12. 15 11月, 2008 1 次提交
  13. 28 10月, 2008 2 次提交
    • F
      [S390] tape: disable interrupts in tape_open and tape_release · b3c21e49
      Frank Munzert 提交于
      Get tape device lock with interrupts disabled. Otherwise lockdep will issue a
      warning similar to:
      
      =================================
      [ INFO: inconsistent lock state ]
      2.6.27 #1
      ---------------------------------
      inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
      vol_id/2903 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (sch->lock){++..}, at: [<000003e00004c7a2>] tape_open+0x42/0x1a4 [tape]
      {in-hardirq-W} state was registered at:
        [<000000000007ce5c>] __lock_acquire+0x894/0xa74
        [<000000000007d0ce>] lock_acquire+0x92/0xb8
        [<0000000000345154>] _spin_lock+0x5c/0x9c
        [<0000000000202264>] do_IRQ+0x124/0x1f0
        [<0000000000026610>] io_return+0x0/0x8
      
      irq event stamp: 847
      hardirqs last  enabled at (847): [<000000000007aca6>] trace_hardirqs_on+0x2a/0x38
      hardirqs last disabled at (846): [<0000000000076ca2>] trace_hardirqs_off+0x2a/0x38
      softirqs last  enabled at (0): [<000000000004909e>] copy_process+0x43e/0x11f4
      softirqs last disabled at (0): [<0000000000000000>] 0x0
      
      other info that might help us debug this:
      1 lock held by vol_id/2903:
       #0:  (&bdev->bd_mutex){--..}, at: [<000000000010e0f4>] do_open+0x78/0x358
      
      stack backtrace:
      CPU: 1 Not tainted 2.6.27 #1},
      Process vol_id (pid: 2903, task: 000000003d4c0000, ksp: 000000003d4e3b10)
      0400000000000000 000000003d4e3830 0000000000000002 0000000000000000
             000000003d4e38d0 000000003d4e3848 000000003d4e3848 00000000000168a8
             0000000000000000 000000003d4e3b10 0000000000000000 0000000000000000
             000000003d4e3830 000000000000000c 000000003d4e3830 000000003d4e38a0
             000000000034aa98 00000000000168a8 000000003d4e3830 000000003d4e3880
      Call Trace:
      ([<000000000001681c>] show_trace+0x138/0x158)
       [<0000000000016902>] show_stack+0xc6/0xf8
       [<00000000000170d4>] dump_stack+0xb0/0xc0
       [<0000000000078810>] print_usage_bug+0x1e8/0x228
       [<000000000007a71c>] mark_lock+0xb14/0xd24
       [<000000000007cd5a>] __lock_acquire+0x792/0xa74
       [<000000000007d0ce>] lock_acquire+0x92/0xb8
       [<0000000000345154>] _spin_lock+0x5c/0x9c
       [<000003e00004c7a2>] tape_open+0x42/0x1a4 [tape]
       [<000003e00005185c>] tapeblock_open+0x98/0xd0 [tape]
      Signed-off-by: NFrank Munzert <munzert@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b3c21e49
    • F
      [S390] tape block: complete request with correct locking · 7a4a1ccd
      Frank Munzert 提交于
      __blk_end_request must be called with request queue lock held. We need to use
      blk_end_request rather than  __blk_end_request.
      Signed-off-by: NFrank Munzert <munzert@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      7a4a1ccd
  14. 21 10月, 2008 2 次提交
    • A
      [PATCH] switch tape_block · 4e999af9
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4e999af9
    • A
      [PATCH] beginning of methods conversion · d4430d62
      Al Viro 提交于
      To keep the size of changesets sane we split the switch by drivers;
      to keep the damn thing bisectable we do the following:
      	1) rename the affected methods, add ones with correct
      prototypes, make (few) callers handle both.  That's this changeset.
      	2) for each driver convert to new methods.  *ALL* drivers
      are converted in this series.
      	3) kill the old (renamed) methods.
      
      Note that it _is_ a flagday; all in-tree drivers are converted and by the
      end of this series no trace of old methods remain.  The only reason why
      we do that this way is to keep the damn thing bisectable and allow per-driver
      debugging if anything goes wrong.
      
      New methods:
      	open(bdev, mode)
      	release(disk, mode)
      	ioctl(bdev, mode, cmd, arg)		/* Called without BKL */
      	compat_ioctl(bdev, mode, cmd, arg)
      	locked_ioctl(bdev, mode, cmd, arg)	/* Called with BKL, legacy */
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d4430d62
  15. 17 10月, 2008 1 次提交
  16. 14 10月, 2008 4 次提交
  17. 11 10月, 2008 3 次提交