1. 05 9月, 2013 1 次提交
  2. 27 6月, 2013 1 次提交
  3. 25 6月, 2013 1 次提交
  4. 05 6月, 2013 2 次提交
    • M
      [SCSI] Allow error handling timeout to be specified · 0816c925
      Martin K. Petersen 提交于
      Introduce eh_timeout which can be used for error handling purposes. This
      was previously hardcoded to 10 seconds in the SCSI error handling
      code. However, for some fast-fail scenarios it is necessary to be able
      to tune this as it can take several iterations (bus device, target, bus,
      controller) before we give up.
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0816c925
    • J
      [SCSI] libsas: implement > 16 byte CDB support · e73823f7
      James Bottomley 提交于
      Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes
      or less.  Instead do all copies via cmd->cmd_len (and use a pointer to this in
      the libsas task instead of a copy).  Note that this still doesn't enable > 16
      byte CDB support in the underlying drivers because their internal format has
      to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is
      different.  the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all
      updated for this change.
      
      Cc: Lukasz Dorau <lukasz.dorau@intel.com>
      Cc: Maciej Patelczyk <maciej.patelczyk@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Jack Wang <xjtuwjp@gmail.com>
      Cc: Lindar Liu <lindar_liu@usish.com>
      Cc: Xiangliang Yu <yuxiangl@marvell.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      e73823f7
  5. 10 5月, 2013 2 次提交
  6. 07 5月, 2013 1 次提交
  7. 03 5月, 2013 1 次提交
  8. 01 5月, 2013 1 次提交
  9. 12 4月, 2013 3 次提交
  10. 10 4月, 2013 2 次提交
    • A
      scsi: bury ->proc_info() · 70ef457d
      Al Viro 提交于
      all users converted to ->show_info()/->write_info()
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      70ef457d
    • A
      scsi: saner replacements for ->proc_info() · 0ffddfbb
      Al Viro 提交于
      It's still an obsolete interface; don't introduce those in new drivers.
      However, it's saner than the ->proc_info() and commits after this one
      will convert the existing ->proc_info() users to it.
      
      The read side is ->show_info(seq_file *, struct Scsi_Host *); use
      seq_... for generating contents.
      
      The write side is ->write_info(struct Scsi_Host *, char *, int).
      
      Again, this is driven by procfs needs; we are going to kill ->write_proc()
      and ->read_proc() and this is the main obstacle to burying that piece of
      shit.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0ffddfbb
  11. 26 3月, 2013 2 次提交
  12. 24 2月, 2013 1 次提交
  13. 26 1月, 2013 2 次提交
    • A
      [SCSI] remove can_power_off flag from scsi_device · 44ec657b
      Aaron Lu 提交于
      Commit 166a2967 "libata: tell scsi layer
      device supports runtime power off" introduced the can_power_off flag for
      scsi_device and is used to support ZPODD implementation in SCSI layer.
      Since ZPODD is now implemented in ATA layer, that flag is no longer
      needed, so remove it.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      44ec657b
    • A
      [libata] scsi: no poll when ODD is powered off · 6f4c827e
      Aaron Lu 提交于
      When the ODD is powered off, any action the user did to the ODD that
      would generate a media event will trigger an ACPI interrupt, so the
      poll for media event is no longer necessary. And the poll will also
      cause a runtime status change, which will stop the ODD from staying in
      powered off state, so the poll should better be stopped.
      
      But since we don't have access to the gendisk structure in LLDs, here
      comes the disk_events_disable_depth for scsi device. This field is a
      hint set by LLDs to convey information to upper layer drivers. A value
      of 0 means media poll is necessary for the device, while values above 0
      means media poll is not needed and should better be skipped. So we can
      increase its value when we are to power off the ODD in ATA layer and
      decrease its value when the ODD is powered on, effectively silence the
      media events poll.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6f4c827e
  14. 08 1月, 2013 1 次提交
  15. 20 12月, 2012 1 次提交
  16. 15 12月, 2012 5 次提交
    • Y
      libfcoe, fcoe: consolidate the fcoe_ctlr_get_lesb/fcoe_get_lesb · 57c2728f
      Yi Zou 提交于
      Similarly they can be moved into libfcoe instead of being private to fcoe now.
      Also add comments particularly on the term LESB to the corresponding function.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: NMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      57c2728f
    • Y
      libfcoe, fcoe: move fcoe_link_speed_update() to libfcoe and export it · 03702689
      Yi Zou 提交于
      With the previous patch, fcoe_link_speed_update() can be moved into libfcoe and
      exported to used by fcoe, bnx2fc, and etc.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: NMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      03702689
    • Y
      fcoe: add support to the get_netdev() for fcoe_interface · 66524ec9
      Yi Zou 提交于
      Adds support to fcoe_port's newly added get_netdev fucntion pointer.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: NMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      66524ec9
    • Y
      fcoe: prep work to start consolidate the usage of fcoe_netdev · 8106fb47
      Yi Zou 提交于
      Currently, in the default kernel fcoe driver, it is needed to get to the underlying
      private per fcoe transport's private structure, e.g., fcoe_interface in
      fcoe.ko, and returns the associated netdev. The similar logic exists in other
      fcoe drivers, e.g., bnx2fc, so we add a function pointer into the common
      fcoe_port struct to allow individual fcoe transport implementaion (fcoe
      and bnx2fc) to get the corresponding netdev associated with a give lport.
      
      Then a inline fcoe_get_netdev() is added as part of libfcoe for all underlying
      fcoe transport drivers to use regardless of its individual fcoe transport
      driver, and also allows move more common code such as fcoe_link_speed_update or
      fcoe_ctlr_get_lesb to be in libfcoe, rather than specific to fcoe.
      
      This patch is a prep work that adds aforementioned fucntion pointer, and
      followed by the actual code changes to make use of it.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: NMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      8106fb47
    • R
      libfcoe, fcoe, bnx2fc: Add new fcoe control interface · 6a891b07
      Robert Love 提交于
      This patch does a few things.
      
      1) Makes /sys/bus/fcoe/ctlr_{create,destroy} interfaces.
         These interfaces take an <ifname> and will either
         create an FCoE Controller or destroy an FCoE
         Controller depending on which file is written to.
      
         The new FCoE Controller will start in a DISABLED
         state and will not do discovery or login until it
         is ENABLED. This pause will allow us to configure
         the FCoE Controller before enabling it.
      
      2) Makes the 'mode' attribute of a fcoe_ctlr_device
         writale. This allows the user to configure the mode
         in which the FCoE Controller will start in when it
         is ENABLED.
      
         Possible modes are 'Fabric', or 'VN2VN'.
      
         The default mode for a fcoe_ctlr{,_device} is 'Fabric'.
         Drivers must implement the set_fcoe_ctlr_mode routine
         to support this feature.
      
         libfcoe offers an exported routine to set a FCoE
         Controller's mode. The mode can only be changed
         when the FCoE Controller is DISABLED.
      
         This patch also removes the get_fcoe_ctlr_mode pointer
         in the fcoe_sysfs function template, the code in
         fcoe_ctlr.c to get the mode and the assignment of
         the fcoe_sysfs function pointer to the fcoe_ctlr.c
         implementation (in fcoe and bnx2fc). fcoe_sysfs can
         return that value for the mode without consulting the
         LLD.
      
      3) Make a 'enabled' attribute of a fcoe_ctlr_device. On a
         read, fcoe_sysfs will return the attribute's value. On
         a write, fcoe_sysfs will call the LLD (if there is a
         callback) to notifiy that the enalbed state has changed.
      
      This patch maintains the old FCoE control interfaces as
      module parameters, but it adds comments pointing out that
      the old interfaces are deprecated.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      6a891b07
  17. 01 12月, 2012 2 次提交
  18. 27 11月, 2012 1 次提交
  19. 14 11月, 2012 2 次提交
    • M
      [SCSI] sd: Implement support for WRITE SAME · 5db44863
      Martin K. Petersen 提交于
      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: NMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NMike Snitzer <snitzer@redhat.com>
      Reviewed-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      5db44863
    • M
      [SCSI] Add a report opcode helper · 3c6bdaea
      Martin K. Petersen 提交于
      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: NMartin K. Petersen <martin.petersen@oracle.com>
      Acked-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      3c6bdaea
  20. 09 10月, 2012 1 次提交
  21. 07 10月, 2012 2 次提交
  22. 03 10月, 2012 1 次提交
  23. 24 9月, 2012 3 次提交
  24. 14 9月, 2012 1 次提交
    • E
      scsi_netlink: Remove dead and buggy code · 8289bab1
      Eric W. Biederman 提交于
      The scsi netlink code confuses the netlink port id with a process id,
      going so far as to read NETLINK_CREDS(skb)->pid instead of the correct
      NETLINK_CB(skb).pid.  Fortunately it does not matter because nothing
      registers to respond to scsi netlink requests.
      
      The only interesting use of the scsi_netlink interface is
      fc_host_post_vendor_event which sends a netlink multicast message.
      
      Since nothing registers to handle scsi netlink messages kill all of the
      registration logic, while retaining the same error handling behavior
      preserving the userspace visible behavior and removing all of the
      confused code that thought a netlink port id was a process id.
      
      This was tested with a kernel allyesconfig build which had no problems.
      
      Cc: James Bottomley <James.Bottomley@parallels.com>
      Cc: James Smart <James.Smart@Emulex.Com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8289bab1