1. 16 3月, 2014 4 次提交
  2. 20 12月, 2013 5 次提交
  3. 19 12月, 2013 3 次提交
  4. 17 12月, 2013 5 次提交
  5. 01 12月, 2013 2 次提交
    • S
      [SCSI] hpsa: return 0 from driver probe function on success, not 1 · 88bf6d62
      Stephen M. Cameron 提交于
      A return value of 1 is interpreted as an error.  See pci_driver.
      in local_pci_probe().  If you're wondering how this ever could
      have worked, it's because it used to be the case that only return
      values less than zero were interpreted as failure.  But even in
      the current kernel if the driver registers its various entry
      points with the kernel, and then returns a value which is
      interpreted as failure, those registrations aren't undone, so
      the driver still mostly works.  However, the driver's remove
      function wouldn't be called on rmmod, and pci power management
      functions wouldn't work.  In the case of Smart Array, since it
      has a battery backed cache (or else no cache) even if the driver
      is not shut down properly as long as there is no outstanding
      i/o, nothing too bad happens, which is why it took so long to
      notice.
      
      Requesting backport to stable because the change to pci-driver.c
      which requires driver probe functions to return 0 occurred between
      2.6.35 and 2.6.36 (the pci power management breakage) and again
      between 3.7 and 3.8 (pci_dev->driver getting set to NULL in
      local_pci_probe() preventing driver remove function from being
      called on rmmod.)
      Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      88bf6d62
    • S
      [SCSI] hpsa: do not discard scsi status on aborted commands · 2e311fba
      Stephen M. Cameron 提交于
      We inadvertantly discarded the scsi status for aborted commands.
      For some commands (e.g. reads from tape drives) these can't be retried,
      and if we discarded the scsi status, the scsi mid layer couldn't notice
      anything was wrong and the error was not reported.
      Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      2e311fba
  6. 29 11月, 2013 1 次提交
    • M
      [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers · 54b2b50c
      Martin K. Petersen 提交于
      Some host adapters do not pass commands through to the target disk
      directly. Instead they provide an emulated target which may or may not
      accurately report its capabilities. In some cases the physical device
      characteristics are reported even when the host adapter is processing
      commands on the device's behalf. This can lead to adapter firmware hangs
      or excessive I/O errors.
      
      This patch disables WRITE SAME for devices connected to host adapters
      that provide an emulated target. Driver writers can disable WRITE SAME
      by setting the no_write_same flag in the host adapter template.
      
      [jejb: fix up rejections due to eh_deadline patch]
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      54b2b50c
  7. 25 10月, 2013 1 次提交
  8. 14 10月, 2013 1 次提交
  9. 11 9月, 2013 4 次提交
  10. 04 9月, 2013 1 次提交
  11. 26 8月, 2013 3 次提交
    • J
      [SCSI] hpsa: fix warning with smp_processor_id() in preemptible · 804a5cb5
      John Kacur 提交于
       section Signed-off-by: John Kacur <jkacur@redhat.com>
      
      On a 3.6-rt (real-time patch) kernel we are seeing the following BUG
      However, it appears to be relevant for non-realtime (mainline) as well.
      
      [   49.688847] hpsa 0000:03:00.0: hpsa0: <0x323a> at IRQ 67 using DAC
      [   49.749928] scsi0 : hpsa
      [   49.784437] BUG: using smp_processor_id() in preemptible [00000000
      00000000] code: kworker/u:0/6
      [   49.784465] caller is enqueue_cmd_and_start_io+0x5a/0x100 [hpsa]
      [   49.784468] Pid: 6, comm: kworker/u:0 Not tainted
      3.6.11.5-rt37.52.el6rt.x86_64.debug #1
      [   49.784471] Call Trace:
      [   49.784512]  [<ffffffff812abe83>] debug_smp_processor_id+0x123/0x150
      [   49.784520]  [<ffffffffa009043a>] enqueue_cmd_and_start_io+0x5a/0x100
      [hpsa]
      [   49.784529]  [<ffffffffa00905cb>]
      hpsa_scsi_do_simple_cmd_core+0xeb/0x110 [hpsa]
      [   49.784537]  [<ffffffff812b09c8>] ? swiotlb_dma_mapping_error+0x18/0x30
      [   49.784544]  [<ffffffff812b09c8>] ? swiotlb_dma_mapping_error+0x18/0x30
      [   49.784553]  [<ffffffffa0090701>]
      hpsa_scsi_do_simple_cmd_with_retry+0x91/0x280 [hpsa]
      [   49.784562]  [<ffffffffa0093558>]
      hpsa_scsi_do_report_luns.clone.2+0xd8/0x130 [hpsa]
      [   49.784571]  [<ffffffffa00935ea>]
      hpsa_gather_lun_info.clone.3+0x3a/0x1a0 [hpsa]
      [   49.784580]  [<ffffffffa00963df>] hpsa_update_scsi_devices+0x11f/0x4f0
      [hpsa]
      [   49.784592]  [<ffffffff81592019>] ? sub_preempt_count+0xa9/0xe0
      [   49.784601]  [<ffffffffa00968ad>] hpsa_scan_start+0xfd/0x150 [hpsa]
      [   49.784613]  [<ffffffff8158cba8>] ? rt_spin_lock_slowunlock+0x78/0x90
      [   49.784626]  [<ffffffff813b04d7>] do_scsi_scan_host+0x37/0xa0
      [   49.784632]  [<ffffffff813b05da>] do_scan_async+0x1a/0x30
      [   49.784643]  [<ffffffff8107c4ab>] async_run_entry_fn+0x9b/0x1d0
      [   49.784655]  [<ffffffff8106ae92>] process_one_work+0x1f2/0x620
      [   49.784661]  [<ffffffff8106ae20>] ? process_one_work+0x180/0x620
      [   49.784668]  [<ffffffff8106d4fe>] ? worker_thread+0x5e/0x3a0
      [   49.784674]  [<ffffffff8107c410>] ? async_schedule+0x20/0x20
      [   49.784681]  [<ffffffff8106d5d3>] worker_thread+0x133/0x3a0
      [   49.784688]  [<ffffffff8106d4a0>] ? manage_workers+0x190/0x190
      [   49.784696]  [<ffffffff81073236>] kthread+0xa6/0xb0
      [   49.784707]  [<ffffffff815970a4>] kernel_thread_helper+0x4/0x10
      [   49.784715]  [<ffffffff81082a7c>] ? finish_task_switch+0x8c/0x110
      [   49.784721]  [<ffffffff8158e44b>] ? _raw_spin_unlock_irq+0x3b/0x70
      [   49.784727]  [<ffffffff8158e85d>] ? retint_restore_args+0xe/0xe
      [   49.784734]  [<ffffffff81073190>] ? kthreadd+0x1e0/0x1e0
      [   49.784739]  [<ffffffff815970a0>] ? gs_change+0xb/0xb
      
      -------------------
      
      This is caused by
      enqueue_cmd_and_start_io()->
              set_performant_mode()->
                      smp_processor_id()
      Which if you have debugging enabled calls debug_processor_id() and triggers the warning.
      
      The code here is
       c->Header.ReplyQueue = smp_processor_id() % h->nreply_queues;
      
      Since it is not critical that the code complete on the same processor,
      but the cpu is a hint used in generating the ReplyQueue and will still work if
      the cpu migrates or is preempted, it is safe to use the raw_smp_processor_id()
      to surpress the false positve warning.
      Signed-off-by: NJohn Kacur <jkacur@redhat.com>
      Acked-by: NStephen Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      804a5cb5
    • T
    • T
      [SCSI] hpsa: fix a race in cmd_free/scsi_done · 2cc5bfaf
      Tomas Henzl 提交于
      When the driver calls scsi_done and after that frees it's internal
      preallocated memory it can happen that a new job is enqueud before
      the memory is freed. The allocation fails and the message
      "cmd_alloc returned NULL" is shown.
      Patch below fixes it by moving cmd->scsi_done after cmd_free.
      Signed-off-by: NTomas Henzl <thenzl@redhat.com>
      Acked-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      2cc5bfaf
  12. 24 2月, 2013 5 次提交
  13. 04 1月, 2013 1 次提交
    • G
      Drivers: scsi: remove __dev* attributes. · 6f039790
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Adam Radford <linuxraid@lsi.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6f039790
  14. 24 9月, 2012 1 次提交
  15. 18 9月, 2012 1 次提交
    • S
      [SCSI] hpsa: fix handling of protocol error · 256d0eaa
      Stephen M. Cameron 提交于
      If a command status of CMD_PROTOCOL_ERR is received, this
      information should be conveyed to the SCSI mid layer, not
      dropped on the floor.  CMD_PROTOCOL_ERR may be received
      from the Smart Array for any commands destined for an external
      RAID controller such as a P2000, or commands destined for tape
      drives or CD/DVD-ROM drives, if for instance a cable is
      disconnected.  This mostly affects multipath configurations, as
      disconnecting a cable on a non-multipath configuration is not
      going to do anything good regardless of whether CMD_PROTOCOL_ERR
      is handled correctly or not.  Not handling CMD_PROTOCOL_ERR
      correctly in a multipath configaration involving external RAID
      controllers may cause data corruption, so this is quite a serious
      bug.  This bug should not normally cause a problem for direct
      attached disk storage.
      Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      256d0eaa
  16. 14 9月, 2012 2 次提交