1. 09 6月, 2009 3 次提交
  2. 03 6月, 2009 1 次提交
  3. 02 6月, 2009 4 次提交
    • A
      cciss: use schedule_timeout_interruptible() · 77b0308a
      Andrew Morton 提交于
      Use schedule_timeout_interruptible() instead of open-coding the set and
      schedule parts.
      
      Cc: Mike Miller <mikem@beardog.cca.cpqcorp.net>
      Cc: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      77b0308a
    • A
      cciss: add cciss driver sysfs entries · 7fe06326
      Andrew Patterson 提交于
      Add sysfs entries to the cciss driver needed for the dm/multipath tools.
      
      A file for vendor, model, rev, and unique_id is added for each logical
      drive under directory /sys/bus/pci/devices/<dev>/ccissX/cXdY.  Where X =
      the controller (or host) number and Y is the logical drive number.
      
      A link from /sys/bus/pci/devices/<dev>/ccissX/cXdY/block:cciss!cXdY to
      /sys/block/cciss!cXdY/device is also created.  A bus is created in
      /sys/bus/cciss.  A link is created from the pci ccissX entry to
      /sys/bus/cciss/devices/ccissX.  Please consider this for inclusion.
      Signed-off-by: NMike Miller <mike.miller@hp.com>
      Cc: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      7fe06326
    • S
      cciss: fix SCSI device reset handler · 88f627ae
      Stephen M. Cameron 提交于
      Fix the SCSI reset error handler to send a working, properly addressed
      reset message to the target device and add code to wait for the target
      device to become ready by polling it with Test Unit Ready.
      
      The existing reset code was broken in that it didn't bother to set the
      8-byte LUN address to anything besides zero, so the command was addressed
      to the controller, which pretended to the driver that the command
      succeeded, while doing nothing.  Ages ago I tested this code, but
      unbeknownst to me, my test was flawed, and what I thought was a tape drive
      getting reset was actually nothing of the sort.  Unfortunately, there is
      still lots of Smartarray firmware that doesn't handle doing target resets
      right, and this code won't help in those cases, but it also shouldn't make
      things worse in those cases than they already are.
      Signed-off-by: NStephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
      Cc: Mike Miller <mikem@beardog.cca.cpqcorp.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      88f627ae
    • S
      cciss: factor out core of sendcmd() for a more sane interface · 4a4b2d76
      Stephen M. Cameron 提交于
      Factor out the core of sendcmd() to provide a simpler interface which
      exposes all the error information to the caller and make the original
      sendcmd use this new function.  Rationale: The SCSI error handling
      routines need to send commands with interrupts turned off, but they also
      need access to the full error information.
      Signed-off-by: NStephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
      Cc: Mike Miller <mikem@beardog.cca.cpqcorp.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      4a4b2d76
  4. 23 5月, 2009 3 次提交
  5. 22 5月, 2009 9 次提交
  6. 21 5月, 2009 2 次提交
  7. 20 5月, 2009 8 次提交
    • R
      cdrom: beyond ARRAY_SIZE of viocd_diskinfo · d3375ea7
      Roel Kluin 提交于
      Do not go beyond ARRAY_SIZE of viocd_diskinfo
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      d3375ea7
    • B
      drm: Round size of SHM maps to PAGE_SIZE · b6741377
      Benjamin Herrenschmidt 提交于
      Currently, userspace can fail to obtain the SAREA mapping (among other
      reasons) if it passes SAREA_MAX to drmAddMap without aligning it to the
      page size. This breaks for example on PowerPC with 64K pages and radeon
      despite the kernel radeon actually doing the right rouding in the first
      place.
      
      The way SAREA_MAX is defined with a bunch of ifdef's and duplicated
      between libdrm and the X server is gross, ultimately it should be
      retrieved by userspace from the kernel, but in the meantime, we have
      plenty of existing userspace built with bad values that need to work.
      
      This patch works around broken userspace by rounding the requested size
      in drm_addmap_core() of any SHM map to the page size. Since the backing
      memory for SHM maps is also allocated within addmap_core, there is no
      danger of adjacent memory being exposed due to the increased map size.
      The only side effect is that drivers that previously tried to create or
      access SHM maps using a size < PAGE_SIZE and failed (getting -EINVAL),
      will now succeed at the cost of a little bit more memory used if that
      happens to be when the map is created.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b6741377
    • E
      TPM: get_event_name stack corruption · fbaa5869
      Eric Paris 提交于
      get_event_name uses sprintf to fill a buffer declared on the stack.  It fills
      the buffer 2 bytes at a time.  What the code doesn't take into account is that
      sprintf(buf, "%02x", data) actually writes 3 bytes.  2 bytes for the data and
      then it nul terminates the string.  Since we declare buf to be 40 characters
      long and then we write 40 bytes of data into buf sprintf is going to write 41
      characters.  The fix is to leave room in buf for the nul terminator.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      fbaa5869
    • R
      PCI PM: Fix initialization and kexec breakage for some devices · b3bad72e
      Rafael J. Wysocki 提交于
      Recent PCI PM changes introduced a bug that causes some devices to be
      mishandled after kexec and during early initialization.  The failure
      scenario in the kexec case is the following:
      
      * Assume a PCI device is not power-manageable by the platform and has
        PCI_PM_CTRL_NO_SOFT_RESET set in PMCSR.
      * The device is put into D3 before kexec (using the native PCI PM).
      * After kexec, pci_setup_device() sets the device's power state to
        PCI_UNKNOWN.
      * pci_set_power_state(dev, PCI_D0) is called by the device's driver.
      * __pci_start_power_transition(dev, PCI_D0) is called and since the
        device is not power-manageable by the platform, it causes
        pci_update_current_state(dev, PCI_D0) to be called.  As a result
        the device's current_state field is updated to PCI_D3, in
        accordance with the contents of its PCI PM registers.
      * pci_raw_set_power_state() is called and it changes the device power
        state to D0.  *However*, it should also call pci_restore_bars() to
        reinitialize the device, but it doesn't, because the device's
        current_state field has been modified earlier.
      
      To prevent this from happening, modify pci_platform_power_transition()
      so that it doesn't use pci_update_current_state() to update the
      current_state field for devices that aren't power-manageable by the
      platform.  Instead, this field should be updated directly for devices
      that don't support the native PCI PM.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b3bad72e
    • N
      mfd: pcf50633: fix unsafe disable_irq() · f43ab901
      Nelson Castillo 提交于
      Without this change Openmoko Freerunner (GTA02) bootstrap will deadlock.
      As pointed out in other patches this issue is in the wild since the merge
      of:
      
      : commit 3aa551c9
      : Author: Thomas Gleixner <tglx@linutronix.de>
      : Date:   Mon Mar 23 18:28:15 2009 +0100
      :
      :    genirq: add threaded interrupt handler support
      :
      :    Add support for threaded interrupt handlers
      Signed-off-by: NNelson Castillo <arhuaco@freaks-unidos.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <balajirrao@openmoko.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      f43ab901
    • M
      mfd: Keep a cache of WM8350 volatile values · b126d113
      Mark Brown 提交于
      Due to the way that the WM8350 audio driver handles CODEC_ENA many of
      the WM8350 audio registers are marked as volatile when they aren't
      actually so. Allow the audio driver to see a cache of these values for
      inspection during interrupt context.
      
      To do this we need to stop satisfying any bits from volatile registers
      from cache - there's no real benefit from doing so anyway, we did the
      read already.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      b126d113
    • L
      Avoid ICE in get_random_int() with gcc-3.4.5 · 26a9a418
      Linus Torvalds 提交于
      Martin Knoblauch reports that trying to build 2.6.30-rc6-git3 with
      RHEL4.3 userspace (gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)) causes an
      internal compiler error (ICE):
      
          drivers/char/random.c: In function `get_random_int':
          drivers/char/random.c:1672: error: unrecognizable insn:
          (insn 202 148 150 0 /scratch/build/linux-2.6.30-rc6-git3/arch/x86/include/asm/tsc.h:23 (set (reg:SI 0 ax [91])
                  (subreg:SI (plus:DI (plus:DI (reg:DI 0 ax [88])
                              (subreg:DI (reg:SI 6 bp) 0))
                          (const_int -4 [0xfffffffffffffffc])) 0)) -1 (nil)
              (nil))
          drivers/char/random.c:1672: internal compiler error: in extract_insn, at recog.c:2083
      
      and after some debugging it turns out that it's due to the code trying
      to figure out the rough value of the current stack pointer by taking an
      address of an uninitialized variable and casting that to an integer.
      
      This is clearly a compiler bug, but it's not worth fighting - while the
      current stack kernel pointer might be somewhat hard to predict in user
      space, it's also not generally going to change for a lot of the call
      chains for a particular process.
      
      So just drop it, and mumble some incoherent curses at the compiler.
      Tested-by: NMartin Knoblauch <spamtrap@knobisoft.de>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26a9a418
    • B
      scsi_lib: remove unused variable · ac36552a
      Boaz Harrosh 提交于
      The last request completion cleanup in scsi_lib left an unused
      this_count variable in scsi_io_completion().
      (It was used before in a code segment that now uses blk_end_request_all())
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      ac36552a
  8. 19 5月, 2009 7 次提交
    • B
      libosd: Use of new blk_make_request · c29b70f6
      Boaz Harrosh 提交于
      Use new blk_make_request() to allocate a request from bio
      and avoid using deprecated blk_rq_append_bio().
      
      This patch is dependent on a block layer patch titled:
          [BLOCK] New blk_make_request() takes bio returns request
      
      This is the last usage of blk_rq_append_bio in osd, it can now
      be un-exported.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      CC: Jeff Garzik <jeff@garzik.org>
      CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c29b70f6
    • B
      libosd: Use new blk_rq_map_kern · bc38bf10
      Boaz Harrosh 提交于
      Now that blk_rq_map_kern will append the buffer onto the
      request we can use it easily for adding extra segments
      (eg. attributes)
      
      This patch is dependent on a block layer patch titled:
         [BLOCK] allow blk_rq_map_kern to append to requests
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      bc38bf10
    • T
      block: set rq->resid_len to blk_rq_bytes() on issue · 5f49f631
      Tejun Heo 提交于
      In commit c3a4d78c, while introducing
      rq->resid_len, the default value of residue count was changed from
      full count to zero.  The conversion was done under the assumption that
      when a request fails residue count wasn't defined.  However, Boaz and
      James pointed out that this wasn't true and the residue count should
      be preserved for failed requests too.
      
      This patchset restores the original behavior by setting rq->resid_len
      to blk_rq_bytes(rq) on request start and restoring explicit clearing
      in affected drivers.  While at it, take advantage of the fact that
      rq->resid_len is set to full count where applicable.
      
      * ide-cd: rq->resid_len cleared on pc success
      
      * mptsas: req->resid_len cleared on success
      
      * sas_expander: rsp/req->resid_len cleared on success
      
      * mpt2sas_transport: req->resid_len cleared on success
      
      * ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
        advantage of initial full count to simplify code
      
      Boaz Harrosh spotted bug in resid_len initialization.  Fixed as
      suggested.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NBorislav Petkov <petkovbb@googlemail.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5f49f631
    • T
      ub: use __blk_end_request_all() · 3755100d
      Tejun Heo 提交于
      ub_end_rq() always tries to complete full request.  The @cmd_len
      parameter was there because rq->data_len used to be overwritten with
      residue count.  Drop @cmd_len and use __blk_end_request_all().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      3755100d
    • I
      xen/blkfront: fix warning when deleting gendisk on unplug/shutdown · 31a14400
      Ian Campbell 提交于
      Currently blkfront gives a warning when hot unplugging due to calling
      del_gendisk() with interrupts disabled (due to blkif_io_lock).
      
      WARNING: at kernel/softirq.c:124 local_bh_enable+0x36/0x84()
      Modules linked in: xenfs xen_netfront ext3 jbd mbcache xen_blkfront
      Pid: 13, comm: xenwatch Not tainted 2.6.29-xs5.5.0.13 #3
      Call Trace:
       [<c012611c>] warn_slowpath+0x80/0xb6
       [<c0104cf1>] xen_sched_clock+0x16/0x63
       [<c0104710>] xen_force_evtchn_callback+0xc/0x10
       [<c0104e32>] check_events+0x8/0xe
       [<c0104d9b>] xen_restore_fl_direct_end+0x0/0x1
       [<c0103749>] xen_mc_flush+0x10a/0x13f
       [<c0105bd2>] __switch_to+0x114/0x14e
       [<c011d92b>] dequeue_task+0x62/0x70
       [<c0123b6f>] finish_task_switch+0x2b/0x84
       [<c0299877>] schedule+0x66d/0x6e7
       [<c0104710>] xen_force_evtchn_callback+0xc/0x10
       [<c0104710>] xen_force_evtchn_callback+0xc/0x10
       [<c012a642>] local_bh_enable+0x36/0x84
       [<c022f9a7>] sk_filter+0x57/0x5c
       [<c0233dae>] netlink_broadcast+0x1d5/0x315
       [<c01c6371>] kobject_uevent_env+0x28d/0x331
       [<c01e7ead>] device_del+0x10f/0x120
       [<c01e7ec6>] device_unregister+0x8/0x10
       [<c015f86d>] bdi_unregister+0x2d/0x39
       [<c01bf6f4>] unlink_gendisk+0x23/0x3e
       [<c01ac946>] del_gendisk+0x7b/0xe7
       [<d0828c19>] blkfront_closing+0x28/0x6e [xen_blkfront]
       [<d082900c>] backend_changed+0x3ad/0x41d [xen_blkfront]
      
      We can fix this by calling del_gendisk() later in blkfront_closing, after
      releasing blkif_io_lock. Since the queue is stopped during the interrupts
      disabled phase I don't think there is any danger of an event occuring between
      releasing the blkif_io_lock and deleting the disk.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      31a14400
    • I
      xen/blkfront: allow xenbus state transition to Closing->Closed when not Connected · 28afea5b
      Ian Campbell 提交于
      This situation can occur when attempting to attach a block device whose
      backend is an empty physical CD-ROM driver. The backend in this case
      will go directly from the Initialising state to Closing->Closed.
      Previously this would result in a NULL pointer deref on info->gd
      (xenbus_dev_fatal does not return as a1a15ac5 seems to expect)
      
      Cc: stable@kernel.org
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Acked-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      28afea5b
    • A
  9. 18 5月, 2009 3 次提交