1. 06 Feb, 2014 1 commit
    • Tejun Heo's avatar
      libata: disable LPM for some WD SATA-I devices · f07b772d
      Tejun Heo authored
      commit ecd75ad514d73efc1bbcc5f10a13566c3ace5f53 upstream.
      
      For some reason, some early WD drives spin up and down drives
      erratically when the link is put into slumber mode which can reduce
      the life expectancy of the device significantly.  Unfortunately, we
      don't have full list of devices and given the nature of the issue it'd
      be better to err on the side of false positives than the other way
      around.  Let's disable LPM on all WD devices which match one of the
      known problematic model prefixes and are SATA-I.
      
      As horkage list doesn't support matching SATA capabilities, this is
      implemented as two horkages - WD_BROKEN_LPM and NOLPM.  The former is
      set for the known prefixes and sets the latter if the matched device
      is SATA-I.
      
      Note that this isn't optimal as this disables all LPM operations and
      partial link power state reportedly works fine on these; however, the
      way LPM is implemented in libata makes it difficult to precisely map
      libata LPM setting to specific link power state.  Well, these devices
      are already fairly outdated.  Let's just disable whole LPM for now.
      Signed-off-by: 's avatarTejun Heo <tj@kernel.org>
      Reported-and-tested-by: 's avatarNikos Barkas <levelwol@gmail.com>
      Reported-and-tested-by: 's avatarIoannis Barkas <risc4all@yahoo.com>
      References: https://bugzilla.kernel.org/show_bug.cgi?id=57211Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f07b772d
  2. 09 Jan, 2014 1 commit
    • Tejun Heo's avatar
      libata, freezer: avoid block device removal while system is frozen · 4e7255f3
      Tejun Heo authored
      commit 85fbd722ad0f5d64d1ad15888cd1eb2188bfb557 upstream.
      
      Freezable kthreads and workqueues are fundamentally problematic in
      that they effectively introduce a big kernel lock widely used in the
      kernel and have already been the culprit of several deadlock
      scenarios.  This is the latest occurrence.
      
      During resume, libata rescans all the ports and revalidates all
      pre-existing devices.  If it determines that a device has gone
      missing, the device is removed from the system which involves
      invalidating block device and flushing bdi while holding driver core
      layer locks.  Unfortunately, this can race with the rest of device
      resume.  Because freezable kthreads and workqueues are thawed after
      device resume is complete and block device removal depends on
      freezable workqueues and kthreads (e.g. bdi_wq, jbd2) to make
      progress, this can lead to deadlock - block device removal can't
      proceed because kthreads are frozen and kthreads can't be thawed
      because device resume is blocked behind block device removal.
      
      839a8e86 ("writeback: replace custom worker pool implementation
      with unbound workqueue") made this particular deadlock scenario more
      visible but the underlying problem has always been there - the
      original forker task and jbd2 are freezable too.  In fact, this is
      highly likely just one of many possible deadlock scenarios given that
      freezer behaves as a big kernel lock and we don't have any debug
      mechanism around it.
      
      I believe the right thing to do is getting rid of freezable kthreads
      and workqueues.  This is something fundamentally broken.  For now,
      implement a funny workaround in libata - just avoid doing block device
      hot[un]plug while the system is frozen.  Kernel engineering at its
      finest.  :(
      
      v2: Add EXPORT_SYMBOL_GPL(pm_freezing) for cases where libata is built
          as a module.
      
      v3: Comment updated and polling interval changed to 10ms as suggested
          by Rafael.
      
      v4: Add #ifdef CONFIG_FREEZER around the hack as pm_freezing is not
          defined when FREEZER is not configured thus breaking build.
          Reported by kbuild test robot.
      Signed-off-by: 's avatarTejun Heo <tj@kernel.org>
      Reported-by: 's avatarTomaž Šolc <tomaz.solc@tablix.org>
      Reviewed-by: 's avatar"Rafael J. Wysocki" <rjw@rjwysocki.net>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=62801
      Link: http://lkml.kernel.org/r/20131213174932.GA27070@htj.dyndns.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: kbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4e7255f3
  3. 12 Dec, 2013 1 commit
  4. 14 May, 2013 1 commit
  5. 11 Apr, 2013 1 commit
  6. 03 Apr, 2013 2 commits
    • Aaron Lu's avatar
      libata-acpi: remove redundent code for power resource handling · 7381fe73
      Aaron Lu authored
      With commit:
      bc9b6407
      ACPI / PM: Rework the handling of devices depending on power resources
      
      The ACPI core now takes care of the power resources an acpi device
      depends on in that when the power resources are turned on, any devices
      that are bound to or in the dependent list of this acpi device will be
      runtime resumed. So there is no need for ata acpi code to duplicate this
      effort, and thus, the ata_acpi_(un)register_power_resource functions are
      no longer needed.
      
      The above commit thinks the scsi device is not bound to the acpi device,
      so needs to be added to the dependent list. But actually, it is. So
      there is no need to add it to the dependent list, or it will be runtime
      resumed twice(though this wouldn't cause any problem).
      
      This patch fixes it, and as a result, the
      ata_acpi_(un)register_power_resource and ata_acpi_(un)bind functions
      are removed.
      Signed-off-by: 's avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      7381fe73
    • Krzysztof Mazur's avatar
      [libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression · 6d3bfc7b
      Krzysztof Mazur authored
      On Mon, Mar 25, 2013 at 06:26:50PM +0100, Ronald wrote:
      > In reply to [1]: I have the same issue. Git bisect took 50+ rebuilds xD
      >
      > Smartd does not work anymore since 84a9a8cd ([libata] Set proper SK
      > when CK_COND is set.).
      
      > [1] http://www.spinics.net/lists/linux-ide/msg45268.html
      
      It seems that the SAM_STAT_CHECK_CONDITION is not cleared
      causing -EIO, because that patch modified sensebuf and
      the check for clearing SAM_STAT_CHECK_CONDITION is no longer valid.
      
      Fix that.
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      6d3bfc7b
  7. 20 Feb, 2013 1 commit
    • Gwendal Grignou's avatar
      [libata] Set proper SK when CK_COND is set. · 84a9a8cd
      Gwendal Grignou authored
      When the user application sends a ATA_12 or ATA_16 PASSTHROUGH
      scsi command, put the task file register in the sense data with the
      proper Sense Key. Instead of NO SENSE, set RECOVERED, as
      specified in [SAT2]12.2.5 Table 92.
      
      Tested:
      Using udev ata_id to generate a passthrough command, IDENTIFY:
      before:
       sd 0:0:0:0: [sda] CDB: ATA command pass through(12)/Blank: \
      a1 08 2e 00 01 00 00 00 00 ec 00 00
       sd 0:0:0:0: [sda] Sense Key : No Sense [current] [descriptor]
       Descriptor sense data with sense descriptors (in hex):
               72 00 00 00 00 00 00 0e 09 0c 00 00 00 00 00 3f
               00 18 00 a6 e0 50
      
      after
       sd 0:0:0:0: [sda] CDB: ATA command pass through(12)/Blank: \
      a1 08 2e 00 01 00 00 00 00 ec 00 00
       sd 0:0:0:0: [sda]  Sense Key : Recovered Error [current] [descriptor]
       Descriptor sense data with sense descriptors (in hex):
              72 01 00 1d 00 00 00 0e 09 0c 00 00 00 01 00 00
              00 00 00 00 00 50
      Signed-off-by: 's avatarGwendal Grignou <gwendal@google.com>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      84a9a8cd
  8. 21 Jan, 2013 1 commit
    • Aaron Lu's avatar
      libata: identify and init ZPODD devices · afe75951
      Aaron Lu authored
      The ODD can be enabled for ZPODD if the following three conditions are
      satisfied:
      1 The ODD supports device attention;
      2 The platform can runtime power off the ODD through ACPI;
      3 The ODD is either slot type or drawer type.
      For such ODDs, zpodd_init is called and a new structure is allocated for
      it to store ZPODD related stuffs.
      
      And the zpodd_dev_enabled function is used to test if ZPODD is currently
      enabled for this ODD.
      
      A new config CONFIG_SATA_ZPODD is added to selectively build ZPODD code.
      Signed-off-by: 's avatarAaron Lu <aaron.lu@intel.com>
      Acked-by: 's avatarTejun Heo <tj@kernel.org>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      afe75951
  9. 14 Dec, 2012 1 commit
    • Xiaotian Feng's avatar
      [libata] fix Null pointer dereference on disk error · 26cd4d65
      Xiaotian Feng authored
      Following oops were observed when disk error happened:
      
      [ 4272.896937] sd 0:0:0:0: [sda] Unhandled error code
      [ 4272.896939] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
      [ 4272.896942] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 5a de a7 00 00 08 00
      [ 4272.896951] end_request: I/O error, dev sda, sector 5955239
      [ 4291.574947] BUG: unable to handle kernel NULL pointer dereference at (null)
      [ 4291.658305] IP: [] ahci_activity_show+0x1/0x40
      [ 4291.730090] PGD 76dbbc067 PUD 6c4fba067 PMD 0
      [ 4291.783408] Oops: 0000 [#1] SMP
      [ 4291.822100] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/sw_activity
      [ 4291.934235] CPU 9
      [ 4291.958301] Pid: 27942, comm: hwinfo ......
      
      ata_scsi_find_dev could return NULL, so ata_scsi_activity_{show,store} should check if atadev is NULL.
      Signed-off-by: 's avatarXiaotian Feng <dannyfeng@tencent.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: stable@kernel.org
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      26cd4d65
  10. 14 Nov, 2012 2 commits
    • Martin K. Petersen's avatar
      [SCSI] sd: Implement support for WRITE SAME · 5db44863
      Martin K. Petersen authored
      Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk
      driver.
      
       - We set the default maximum to 0xFFFF because there are several
         devices out there that only support two-byte block counts even with
         WRITE SAME(16). We only enable transfers bigger than 0xFFFF if the
         device explicitly reports MAXIMUM WRITE SAME LENGTH in the BLOCK
         LIMITS VPD.
      
       - max_write_same_blocks can be overriden per-device basis in sysfs.
      
       - The UNMAP discovery heuristics remain unchanged but the discard
         limits are tweaked to match the "real" WRITE SAME commands.
      
       - In the error handling logic we now distinguish between WRITE SAME
         with and without UNMAP set.
      
      The discovery process heuristics are:
      
       - If the device reports a SCSI level of SPC-3 or greater we'll issue
         READ SUPPORTED OPERATION CODES to find out whether WRITE SAME(16) is
         supported. If that's the case we will use it.
      
       - If the device supports the block limits VPD and reports a MAXIMUM
         WRITE SAME LENGTH bigger than 0xFFFF we will use WRITE SAME(16).
      
       - Otherwise we will use WRITE SAME(10) unless the target LBA is beyond
         0xFFFFFFFF or the block count exceeds 0xFFFF.
      
       - no_write_same is set for ATA, FireWire and USB.
      Signed-off-by: 's avatarMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Reviewed-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: 's avatarJames Bottomley <JBottomley@Parallels.com>
      5db44863
    • Martin K. Petersen's avatar
      [SCSI] Add a report opcode helper · 3c6bdaea
      Martin K. Petersen authored
      The REPORT SUPPORTED OPERATION CODES command can be used to query
      whether a given opcode is supported by a device. Add a helper function
      that allows us to look up commands.
      
      We only issue RSOC if the device reports compliance with SPC-3 or
      later. But to err on the side of caution we disable the command for ATA,
      FireWire and USB.
      Signed-off-by: 's avatarMartin K. Petersen <martin.petersen@oracle.com>
      Acked-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: 's avatarJames Bottomley <JBottomley@Parallels.com>
      3c6bdaea
  11. 17 Aug, 2012 3 commits
  12. 29 Jun, 2012 1 commit
  13. 23 Apr, 2012 1 commit
    • Dan Williams's avatar
      [SCSI] libsas, libata: fix start of life for a sas ata_port · b2024459
      Dan Williams authored
      This changes the ordering of initialization and probing events from:
        1/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        2/ allocate ata_port and schedule port probe in DISCE_PROBE
      ...to:
        1/ allocate ata_port in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        2/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        3/ schedule port probe in DISCE_PROBE
      
      This ordering prevents PHYE_SIGNAL_LOSS_EVENTS from sneaking in to
      destrory ata devices before they have been fully initialized:
      
        BUG: unable to handle kernel paging request at 0000000000003b10
        IP: [<ffffffffa0053d7e>] sas_ata_end_eh+0x12/0x5e [libsas]
        ...
        [<ffffffffa004d1af>] sas_unregister_common_dev+0x78/0xc9 [libsas]
        [<ffffffffa004d4d4>] sas_unregister_dev+0x4f/0xad [libsas]
        [<ffffffffa004d5b1>] sas_unregister_domain_devices+0x7f/0xbf [libsas]
        [<ffffffffa004c487>] sas_deform_port+0x61/0x1b8 [libsas]
        [<ffffffffa004bed0>] sas_phye_loss_of_signal+0x29/0x2b [libsas]
      
      ...and kills the awkward "sata domain_device briefly existing in the
      domain without an ata_port" state.
      Reported-by: 's avatarMichal Kosciowski <michal.kosciowski@intel.com>
      Signed-off-by: 's avatarDan Williams <dan.j.williams@intel.com>
      Acked-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: 's avatarJames Bottomley <JBottomley@Parallels.com>
      b2024459
  14. 22 Apr, 2012 1 commit
  15. 12 Apr, 2012 1 commit
  16. 29 Feb, 2012 1 commit
  17. 09 Jan, 2012 2 commits
  18. 09 Nov, 2011 1 commit
  19. 31 Oct, 2011 1 commit
  20. 02 Oct, 2011 1 commit
  21. 23 Jul, 2011 1 commit
    • Joe Perches's avatar
      ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level> · a9a79dfe
      Joe Perches authored
      Saves text by removing nearly duplicated text format strings by
      creating ata_<foo>_printk functions and printf extension %pV.
      
      ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
      
      Format string duplication comes from:
      
       #define ata_link_printk(link, lv, fmt, args...) do { \
             if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link)    \
                     printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,   \
                            (link)->pmp , ##args); \
             else \
                     printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
             } while(0)
      
      Coalesce long formats.
      
      $ size drivers/ata/built-in.*
         text	   data	    bss	    dec	    hex	filename
       544969	  73893	 116584	 735446	  b38d6	drivers/ata/built-in.allyesconfig.ata.o
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.allyesconfig.dev_level.o
       141328	  14689	   4220	 160237	  271ed	drivers/ata/built-in.defconfig.ata.o
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.defconfig.dev_level.o
      Signed-off-by: 's avatarJoe Perches <joe@perches.com>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@pobox.com>
      a9a79dfe
  22. 23 Jun, 2011 1 commit
    • Nishanth Aravamudan's avatar
      libata/sas: only set FROZEN flag if new EH is supported · 3f1e046a
      Nishanth Aravamudan authored
      On 16.06.2011 [08:28:39 -0500], Brian King wrote:
      > On 06/16/2011 02:51 AM, Tejun Heo wrote:
      > > On Wed, Jun 15, 2011 at 04:34:17PM -0700, Nishanth Aravamudan wrote:
      > >>> That looks like the right thing to do. For ipr's usage of
      > >>> libata, we don't have the concept of a port frozen state, so this flag
      > >>> should really never get set. The alternate way to fix this would be to
      > >>> only set ATA_PFLAG_FROZEN in ata_port_alloc if ap->ops->error_handler
      > >>> is not NULL.
      > >>
      > >> It seemed like ipr is as you say, but I wasn't sure if it was
      > >> appropriate to make the change above in the common libata-scis code or
      > >> not. I don't want to break some other device on accident.
      > >>
      > >> Also, I tried your suggestion, but I don't think that can happen in
      > >> ata_port_alloc? ata_port_alloc is allocated ap itself, and it seems like
      > >> ap->ops typically gets set only after ata_port_alloc returns?
      > >
      > > Maybe we can test error_handler in ata_sas_port_start()?
      >
      > Good point. Since libsas is converted to the new eh now, we would need to have
      > this test.
      
      Commit 7b3a24c5 ("ahci: don't enable
      port irq before handler is registered") caused a regression for CD-ROMs
      attached to the IPR SATA bus on Power machines:
      
        ata_port_alloc: ENTER
        ata_port_probe: ata1: bus probe begin
        ata1.00: ata_dev_read_id: ENTER
        ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
        ata1.00: ata_dev_read_id: ENTER
        ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
        ata1.00: limiting speed to UDMA7:PIO5
        ata1.00: ata_dev_read_id: ENTER
        ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
        ata1.00: disabled
        ata_port_probe: ata1: bus probe end
        scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured
      
      The FROZEN flag added in that commit is only cleared by the new EH code,
      which is not used by ipr. Clear this flag in the SAS code if we don't
      support new EH.
      Reported-by: 's avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: 's avatarNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@pobox.com>
      3f1e046a
  23. 20 May, 2011 1 commit
  24. 06 May, 2011 1 commit
  25. 31 Mar, 2011 1 commit
  26. 14 Mar, 2011 1 commit
  27. 02 Mar, 2011 2 commits
    • James Bottomley's avatar
      libata: fix locking for sas paths · a29b5dad
      James Bottomley authored
      For historical reasons, libsas uses the scsi host lock as the ata port
      lock, and libata always uses the ata host.  For the old eh, this was
      largely irrelevant since the two locks were never mixed inside the
      code.  However, the new eh has a case where it nests acquisition of
      the host lock inside the port lock (this does look rather deadlock
      prone).  Obviously this would be an instant deadlock if the port lock
      were the host lock, so switch the libsas paths to use the ata host
      lock as well.
      Signed-off-by: 's avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      a29b5dad
    • James Bottomley's avatar
      libata: plumb sas port scan into standard libata paths · 238c9cf9
      James Bottomley authored
      The function ata_sas_port_init() has always really done its own thing.
      However, as a precursor to moving to the libata new eh, it has to be
      properly using the standard libata scan paths.  This means separating
      the current libata scan paths into pieces which can be shared with
      libsas and pieces which cant (really just the async call and the host
      scan).
      Signed-off-by: 's avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      238c9cf9
  28. 13 Feb, 2011 2 commits
    • James Bottomley's avatar
      [SCSI] libata: fix locking for sas paths · b8784f77
      James Bottomley authored
      For historical reasons, libsas uses the scsi host lock as the ata port
      lock, and libata always uses the ata host.  For the old eh, this was
      largely irrelevant since the two locks were never mixed inside the
      code.  However, the new eh has a case where it nests acquisition of
      the host lock inside the port lock (this does look rather deadlock
      prone).  Obviously this would be an instant deadlock if the port lock
      were the host lock, so switch the libsas paths to use the ata host
      lock as well.
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: 's avatarJames Bottomley <James.Bottomley@suse.de>
      b8784f77
    • James Bottomley's avatar
      [SCSI] libata: plumb sas port scan into standard libata paths · 1f723867
      James Bottomley authored
      The function ata_sas_port_init() has always really done its own thing.
      However, as a precursor to moving to the libata new eh, it has to be
      properly using the standard libata scan paths.  This means separating
      the current libata scan paths into pieces which can be shared with
      libsas and pieces which cant (really just the async call and the host
      scan).
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: 's avatarJames Bottomley <James.Bottomley@suse.de>
      1f723867
  29. 28 Jan, 2011 1 commit
    • Tejun Heo's avatar
      libata: set queue DMA alignment to sector size for ATAPI too · 729a6a30
      Tejun Heo authored
      ata_pio_sectors() expects buffer for each sector to be contained in a
      single page; otherwise, it ends up overrunning the first page.  This
      is achieved by setting queue DMA alignment.  If sector_size is smaller
      than PAGE_SIZE and all buffers are sector_size aligned, buffer for
      each sector is always contained in a single page.
      
      This wasn't applied to ATAPI devices but IDENTIFY_PACKET is executed
      as ATA_PROT_PIO and thus uses ata_pio_sectors().  Newer versions of
      udev issue IDENTIFY_PACKET with unaligned buffer triggering the
      problem and causing oops.
      
      This patch fixes the problem by setting sdev->sector_size to
      ATA_SECT_SIZE on ATATPI devices and always setting DMA alignment to
      sector_size.  While at it, add a warning for the unlikely but still
      possible scenario where sector_size is larger than PAGE_SIZE, in which
      case the alignment wouldn't be enough.
      Signed-off-by: 's avatarTejun Heo <tj@kernel.org>
      Reported-by: 's avatarJohn Stanley <jpsinthemix@verizon.net>
      Tested-by: 's avatarJohn Stanley <jpsinthemix@verizon.net>
      Cc: stable@kernel.org
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      729a6a30
  30. 06 Jan, 2011 1 commit
  31. 17 Nov, 2010 1 commit
  32. 16 Nov, 2010 1 commit
    • Jeff Garzik's avatar
      SCSI host lock push-down · f281233d
      Jeff Garzik authored
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: 's avatarJeff Garzik <jgarzik@redhat.com>
      Acked-by: 's avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  33. 12 Nov, 2010 1 commit