Permalink
Browse files

Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits)
  [SCSI] qla4xxx: export address/port of connection (fix udev disk names)
  [SCSI] ipr: Fix BUG on adapter dump timeout
  [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer
  [SCSI] hpsa: change confusing message to be more clear
  [SCSI] iscsi class: fix vlan configuration
  [SCSI] qla4xxx: fix data alignment and use nl helpers
  [SCSI] iscsi class: fix link local mispelling
  [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA
  [SCSI] aacraid: use lower snprintf() limit
  [SCSI] lpfc 8.3.27: Change driver version to 8.3.27
  [SCSI] lpfc 8.3.27: T10 additions for SLI4
  [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery
  [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name
  [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout
  [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes
  [SCSI] megaraid_sas: Changelog and version update
  [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic
  [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support
  [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers
  [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts
  ...
  • Loading branch information...
2 parents 97d2eb1 + 590134f commit ec7ae517537ae5c7b0b2cd7f562dfa3e7a05b954 @torvalds torvalds committed Oct 28, 2011
Showing with 14,203 additions and 3,413 deletions.
  1. +13 −0 Documentation/ABI/testing/sysfs-block
  2. +2 −0 Documentation/scsi/00-INDEX
  3. +15 −0 Documentation/scsi/ChangeLog.megaraid_sas
  4. +310 −0 Documentation/scsi/LICENSE.qla4xxx
  5. +75 −0 Documentation/scsi/bnx2fc.txt
  6. +5 −0 arch/s390/include/asm/qdio.h
  7. +71 −0 block/genhd.c
  8. +1 −0 drivers/ata/libata-core.c
  9. +29 −15 drivers/ata/libata-scsi.c
  10. +54 −26 drivers/infiniband/ulp/iser/iscsi_iser.c
  11. +88 −4 drivers/message/fusion/mptbase.c
  12. +42 −30 drivers/message/fusion/mptbase.h
  13. +40 −7 drivers/message/fusion/mptsas.c
  14. +14 −4 drivers/message/fusion/mptscsih.c
  15. +1 −0 drivers/message/fusion/mptscsih.h
  16. +8 −3 drivers/s390/cio/qdio_main.c
  17. +1 −0 drivers/s390/cio/qdio_setup.c
  18. +36 −0 drivers/s390/scsi/zfcp_dbf.c
  19. +7 −0 drivers/s390/scsi/zfcp_def.h
  20. +1 −0 drivers/s390/scsi/zfcp_ext.h
  21. +49 −31 drivers/s390/scsi/zfcp_fsf.c
  22. +48 −10 drivers/s390/scsi/zfcp_qdio.c
  23. +51 −15 drivers/s390/scsi/zfcp_qdio.h
  24. +6 −9 drivers/s390/scsi/zfcp_scsi.c
  25. +10 −4 drivers/scsi/Kconfig
  26. +1 −0 drivers/scsi/Makefile
  27. +4 −3 drivers/scsi/aacraid/linit.c
  28. +1 −0 drivers/scsi/aic94xx/aic94xx_scb.c
  29. +20 −0 drivers/scsi/be2iscsi/be_cmds.c
  30. +2 −0 drivers/scsi/be2iscsi/be_cmds.h
  31. +56 −4 drivers/scsi/be2iscsi/be_iscsi.c
  32. +2 −0 drivers/scsi/be2iscsi/be_iscsi.h
  33. +67 −45 drivers/scsi/be2iscsi/be_main.c
  34. +4 −1 drivers/scsi/be2iscsi/be_main.h
  35. +2 −1 drivers/scsi/bnx2fc/bnx2fc.h
  36. +14 −12 drivers/scsi/bnx2fc/bnx2fc_els.c
  37. +161 −65 drivers/scsi/bnx2fc/bnx2fc_fcoe.c
  38. +11 −5 drivers/scsi/bnx2fc/bnx2fc_hwi.c
  39. +19 −13 drivers/scsi/bnx2fc/bnx2fc_io.c
  40. +11 −12 drivers/scsi/bnx2fc/bnx2fc_tgt.c
  41. +54 −26 drivers/scsi/bnx2i/bnx2i_iscsi.c
  42. +1 −19 drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
  43. +1 −19 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
  44. +56 −0 drivers/scsi/cxgbi/libcxgbi.c
  45. +1 −0 drivers/scsi/cxgbi/libcxgbi.h
  46. +52 −9 drivers/scsi/device_handler/scsi_dh.c
  47. +25 −82 drivers/scsi/device_handler/scsi_dh_alua.c
  48. +4 −2 drivers/scsi/device_handler/scsi_dh_rdac.c
  49. +14 −89 drivers/scsi/fcoe/fcoe.c
  50. +1 −10 drivers/scsi/fcoe/fcoe.h
  51. +101 −0 drivers/scsi/fcoe/fcoe_transport.c
  52. +2 −4 drivers/scsi/hpsa.c
  53. +17 −14 drivers/scsi/ipr.c
  54. +3 −1 drivers/scsi/ipr.h
  55. +69 −0 drivers/scsi/isci/host.c
  56. +15 −0 drivers/scsi/isci/host.h
  57. +3 −0 drivers/scsi/isci/init.c
  58. +1 −1 drivers/scsi/isci/isci.h
  59. +11 −0 drivers/scsi/isci/phy.c
  60. +1 −1 drivers/scsi/isci/port.c
  61. +1 −1 drivers/scsi/isci/port_config.c
  62. +4 −118 drivers/scsi/isci/registers.h
  63. +24 −0 drivers/scsi/isci/remote_device.c
  64. +9 −0 drivers/scsi/isci/remote_device.h
  65. +336 −44 drivers/scsi/isci/request.c
  66. +26 −5 drivers/scsi/isci/request.h
  67. +0 −2 drivers/scsi/isci/sas.h
  68. +3 −26 drivers/scsi/isci/task.c
  69. +19 −0 drivers/scsi/isci/task.h
  70. +56 −27 drivers/scsi/iscsi_tcp.c
  71. +5 −6 drivers/scsi/libfc/fc_exch.c
  72. +0 −2 drivers/scsi/libfc/fc_fcp.c
  73. +0 −9 drivers/scsi/libiscsi.c
  74. +8 −5 drivers/scsi/libsas/sas_discover.c
  75. +25 −12 drivers/scsi/libsas/sas_expander.c
  76. +101 −2 drivers/scsi/libsas/sas_host_smp.c
  77. +36 −7 drivers/scsi/libsas/sas_init.c
  78. +64 −81 drivers/scsi/libsas/sas_scsi_host.c
  79. +18 −2 drivers/scsi/lpfc/lpfc.h
  80. +53 −26 drivers/scsi/lpfc/lpfc_attr.c
  81. +3 −1 drivers/scsi/lpfc/lpfc_crtn.h
  82. +3 −0 drivers/scsi/lpfc/lpfc_ct.c
  83. +181 −0 drivers/scsi/lpfc/lpfc_debugfs.c
  84. +17 −16 drivers/scsi/lpfc/lpfc_els.c
  85. +5 −2 drivers/scsi/lpfc/lpfc_hbadisc.c
  86. +274 −26 drivers/scsi/lpfc/lpfc_hw4.h
  87. +172 −115 drivers/scsi/lpfc/lpfc_init.c
  88. +1 −0 drivers/scsi/lpfc/lpfc_logmsg.h
  89. +69 −11 drivers/scsi/lpfc/lpfc_mbox.c
  90. +213 −31 drivers/scsi/lpfc/lpfc_scsi.c
  91. +361 −99 drivers/scsi/lpfc/lpfc_sli.c
  92. +8 −10 drivers/scsi/lpfc/lpfc_sli.h
  93. +20 −3 drivers/scsi/lpfc/lpfc_sli4.h
  94. +1 −1 drivers/scsi/lpfc/lpfc_version.h
  95. +13 −3 drivers/scsi/lpfc/lpfc_vport.c
  96. +0 −9 drivers/scsi/mac_esp.c
  97. +16 −6 drivers/scsi/megaraid/megaraid_sas.h
  98. +181 −58 drivers/scsi/megaraid/megaraid_sas_base.c
  99. +18 −8 drivers/scsi/megaraid/megaraid_sas_fp.c
  100. +135 −58 drivers/scsi/megaraid/megaraid_sas_fusion.c
  101. +15 −4 drivers/scsi/megaraid/megaraid_sas_fusion.h
  102. +338 −109 drivers/scsi/mpt2sas/mpt2sas_base.c
  103. +36 −10 drivers/scsi/mpt2sas/mpt2sas_base.h
  104. +28 −0 drivers/scsi/mpt2sas/mpt2sas_ctl.c
  105. +2 −0 drivers/scsi/mpt2sas/mpt2sas_scsih.c
  106. +1 −1 drivers/scsi/mpt2sas/mpt2sas_transport.c
  107. +35 −0 drivers/scsi/mvsas/mv_94xx.c
  108. +2 −0 drivers/scsi/mvsas/mv_defs.h
  109. +11 −2 drivers/scsi/mvsas/mv_init.c
  110. +19 −60 drivers/scsi/mvsas/mv_sas.c
  111. +1 −3 drivers/scsi/mvsas/mv_sas.h
  112. +2,018 −0 drivers/scsi/mvumi.c
  113. +505 −0 drivers/scsi/mvumi.h
  114. +37 −36 drivers/scsi/pm8001/pm8001_hwi.c
  115. +2 −2 drivers/scsi/pm8001/pm8001_init.c
  116. +13 −80 drivers/scsi/pm8001/pm8001_sas.c
  117. +0 −2 drivers/scsi/pm8001/pm8001_sas.h
  118. +72 −39 drivers/scsi/qla2xxx/qla_attr.c
  119. +152 −0 drivers/scsi/qla2xxx/qla_bsg.c
  120. +42 −0 drivers/scsi/qla2xxx/qla_bsg.h
  121. +3 −3 drivers/scsi/qla2xxx/qla_dbg.c
  122. +8 −1 drivers/scsi/qla2xxx/qla_def.h
  123. +18 −0 drivers/scsi/qla2xxx/qla_gbl.h
  124. +18 −18 drivers/scsi/qla2xxx/qla_init.c
  125. +5 −0 drivers/scsi/qla2xxx/qla_isr.c
  126. +127 −0 drivers/scsi/qla2xxx/qla_mbx.c
  127. +941 −29 drivers/scsi/qla2xxx/qla_nx.c
  128. +253 −2 drivers/scsi/qla2xxx/qla_nx.h
  129. +32 −14 drivers/scsi/qla2xxx/qla_os.c
  130. +1 −0 drivers/scsi/qla4xxx/Kconfig
  131. +1 −1 drivers/scsi/qla4xxx/Makefile
  132. +76 −0 drivers/scsi/qla4xxx/ql4_attr.c
  133. +513 −0 drivers/scsi/qla4xxx/ql4_bsg.c
  134. +19 −0 drivers/scsi/qla4xxx/ql4_bsg.h
  135. +143 −71 drivers/scsi/qla4xxx/ql4_def.h
  136. +189 −9 drivers/scsi/qla4xxx/ql4_fw.h
  137. +55 −16 drivers/scsi/qla4xxx/ql4_glbl.h
  138. +158 −694 drivers/scsi/qla4xxx/ql4_init.c
  139. +66 −2 drivers/scsi/qla4xxx/ql4_iocb.c
  140. +69 −14 drivers/scsi/qla4xxx/ql4_isr.c
  141. +732 −92 drivers/scsi/qla4xxx/ql4_mbx.c
  142. +21 −0 drivers/scsi/qla4xxx/ql4_nvram.c
  143. +17 −0 drivers/scsi/qla4xxx/ql4_nx.c
  144. +2,116 −409 drivers/scsi/qla4xxx/ql4_os.c
  145. +1 −1 drivers/scsi/qla4xxx/ql4_version.h
  146. +1 −1 drivers/scsi/qlogicpti.c
  147. +10 −2 drivers/scsi/scsi_error.c
  148. +38 −0 drivers/scsi/scsi_sysfs.c
  149. +606 −136 drivers/scsi/scsi_transport_iscsi.c
  150. +8 −2 drivers/scsi/scsi_transport_sas.c
  151. +4 −3 drivers/scsi/sd.c
  152. +4 −0 include/linux/genhd.h
  153. +2 −0 include/linux/libata.h
  154. +92 −43 include/scsi/iscsi_if.h
  155. +33 −43 include/scsi/libfc.h
  156. +5 −0 include/scsi/libfcoe.h
  157. +29 −25 include/scsi/libsas.h
  158. +22 −2 include/scsi/sas.h
  159. +110 −0 include/scsi/scsi_bsg_iscsi.h
  160. +6 −0 include/scsi/scsi_device.h
  161. +15 −1 include/scsi/scsi_host.h
  162. +44 −3 include/scsi/scsi_transport_iscsi.h
@@ -206,3 +206,16 @@ Description:
when a discarded area is read the discard_zeroes_data
parameter will be set to one. Otherwise it will be 0 and
the result of reading a discarded area is undefined.
+What: /sys/block/<disk>/alias
+Date: Aug 2011
+Contact: Nao Nishijima <nao.nishijima.xt@hitachi.com>
+Description:
+ A raw device name of a disk does not always point a same disk
+ each boot-up time. Therefore, users have to use persistent
+ device names, which udev creates when the kernel finds a disk,
+ instead of raw device name. However, kernel doesn't show those
+ persistent names on its messages (e.g. dmesg).
+ This file can store an alias of the disk and it would be
+ appeared in kernel messages if it is set. A disk can have an
+ alias which length is up to 255bytes. Users can use alphabets,
+ numbers, "-" and "_" in alias name. This file is writeonce.
@@ -28,6 +28,8 @@ LICENSE.FlashPoint
- Licence of the Flashpoint driver
LICENSE.qla2xxx
- License for QLogic Linux Fibre Channel HBA Driver firmware.
+LICENSE.qla4xxx
+ - License for QLogic Linux iSCSI HBA Driver.
Mylex.txt
- info on driver for Mylex adapters
NinjaSCSI.txt
@@ -1,3 +1,18 @@
+Release Date : Wed. Oct 5, 2011 17:00:00 PST 2010 -
+ (emaild-id:megaraidlinux@lsi.com)
+ Adam Radford
+Current Version : 00.00.06.12-rc1
+Old Version : 00.00.05.40-rc1
+ 1. Continue booting immediately if FW in FAULT at driver load time.
+ 2. Increase default cmds per lun to 256.
+ 3. Fix mismatch in megasas_reset_fusion() mutex lock-unlock.
+ 4. Remove some un-necessary code.
+ 5. Clear state change interrupts for Fusion/Invader.
+ 6. Clear FUSION_IN_RESET before enabling interrupts.
+ 7. Add support for MegaRAID 9360/9380 12GB/s controllers.
+ 8. Add multiple MSI-X vector/multiple reply queue support.
+ 9. Add driver workaround for PERC5/1068 kdump kernel panic.
+-------------------------------------------------------------------------------
Release Date : Tue. Jul 26, 2011 17:00:00 PST 2010 -
(emaild-id:megaraidlinux@lsi.com)
Adam Radford

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,75 @@
+Operating FCoE using bnx2fc
+===========================
+Broadcom FCoE offload through bnx2fc is full stateful hardware offload that
+cooperates with all interfaces provided by the Linux ecosystem for FC/FCoE and
+SCSI controllers. As such, FCoE functionality, once enabled is largely
+transparent. Devices discovered on the SAN will be registered and unregistered
+automatically with the upper storage layers.
+
+Despite the fact that the Broadcom's FCoE offload is fully offloaded, it does
+depend on the state of the network interfaces to operate. As such, the network
+interface (e.g. eth0) associated with the FCoE offload initiator must be 'up'.
+It is recommended that the network interfaces be configured to be brought up
+automatically at boot time.
+
+Furthermore, the Broadcom FCoE offload solution creates VLAN interfaces to
+support the VLANs that have been discovered for FCoE operation (e.g.
+eth0.1001-fcoe). Do not delete or disable these interfaces or FCoE operation
+will be disrupted.
+
+Driver Usage Model:
+===================
+
+1. Ensure that fcoe-utils package is installed.
+
+2. Configure the interfaces on which bnx2fc driver has to operate on.
+Here are the steps to configure:
+ a. cd /etc/fcoe
+ b. copy cfg-ethx to cfg-eth5 if FCoE has to be enabled on eth5.
+ c. Repeat this for all the interfaces where FCoE has to be enabled.
+ d. Edit all the cfg-eth files to set "no" for DCB_REQUIRED** field, and
+ "yes" for AUTO_VLAN.
+ e. Other configuration parameters should be left as default
+
+3. Ensure that "bnx2fc" is in SUPPORTED_DRIVERS list in /etc/fcoe/config.
+
+4. Start fcoe service. (service fcoe start). If Broadcom devices are present in
+the system, bnx2fc driver would automatically claim the interfaces, starts vlan
+discovery and log into the targets.
+
+5. "Symbolic Name" in 'fcoeadm -i' output would display if bnx2fc has claimed
+the interface.
+Eg:
+[root@bh2 ~]# fcoeadm -i
+ Description: NetXtreme II BCM57712 10 Gigabit Ethernet
+ Revision: 01
+ Manufacturer: Broadcom Corporation
+ Serial Number: 0010186FD558
+ Driver: bnx2x 1.70.00-0
+ Number of Ports: 2
+
+ Symbolic Name: bnx2fc v1.0.5 over eth5.4
+ OS Device Name: host11
+ Node Name: 0x10000010186FD559
+ Port Name: 0x20000010186FD559
+ FabricName: 0x2001000DECB3B681
+ Speed: 10 Gbit
+ Supported Speed: 10 Gbit
+ MaxFrameSize: 2048
+ FC-ID (Port ID): 0x0F0377
+ State: Online
+
+6. Verify the vlan discovery is performed by running ifconfig and notice
+<INTERFACE>.<VLAN>-fcoe interfaces are automatically created.
+
+Refer to fcoeadm manpage for more information on fcoeadm operations to
+create/destroy interfaces or to display lun/target information.
+
+NOTE:
+====
+** Broadcom FCoE capable devices implement a DCBX/LLDP client on-chip. Only one
+LLDP client is allowed per interface. For proper operation all host software
+based DCBX/LLDP clients (e.g. lldpad) must be disabled. To disable lldpad on a
+given interface, run the following command:
+
+lldptool set-lldp -i <interface_name> adminStatus=disabled
@@ -46,6 +46,8 @@ struct qdesfmt0 {
u32 : 16;
} __attribute__ ((packed));
+#define QDR_AC_MULTI_BUFFER_ENABLE 0x01
+
/**
* struct qdr - queue description record (QDR)
* @qfmt: queue format
@@ -256,6 +258,8 @@ struct slsb {
u8 val[QDIO_MAX_BUFFERS_PER_Q];
} __attribute__ ((packed, aligned(256)));
+#define CHSC_AC2_MULTI_BUFFER_AVAILABLE 0x0080
+#define CHSC_AC2_MULTI_BUFFER_ENABLED 0x0040
#define CHSC_AC2_DATA_DIV_AVAILABLE 0x0010
#define CHSC_AC2_DATA_DIV_ENABLED 0x0002
@@ -357,6 +361,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
struct qdio_initialize {
struct ccw_device *cdev;
unsigned char q_format;
+ unsigned char qdr_ac;
unsigned char adapter_name[8];
unsigned int qib_param_field_format;
unsigned char *qib_param_field;
View
@@ -19,6 +19,7 @@
#include <linux/mutex.h>
#include <linux/idr.h>
#include <linux/log2.h>
+#include <linux/ctype.h>
#include "blk.h"
@@ -909,6 +910,74 @@ static int __init genhd_device_init(void)
subsys_initcall(genhd_device_init);
+static ssize_t alias_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct gendisk *disk = dev_to_disk(dev);
+ ssize_t ret = 0;
+
+ if (disk->alias)
+ ret = snprintf(buf, ALIAS_LEN, "%s\n", disk->alias);
+ return ret;
+}
+
+static ssize_t alias_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct gendisk *disk = dev_to_disk(dev);
+ char *alias;
+ char *envp[] = { NULL, NULL };
+ unsigned char c;
+ int i;
+ ssize_t ret = count;
+
+ if (!count)
+ return -EINVAL;
+
+ if (count >= ALIAS_LEN) {
+ printk(KERN_ERR "alias: alias is too long\n");
+ return -EINVAL;
+ }
+
+ /* Validation check */
+ for (i = 0; i < count; i++) {
+ c = buf[i];
+ if (i == count - 1 && c == '\n')
+ break;
+ if (!isalnum(c) && c != '_' && c != '-') {
+ printk(KERN_ERR "alias: invalid alias\n");
+ return -EINVAL;
+ }
+ }
+
+ if (disk->alias) {
+ printk(KERN_INFO "alias: %s is already assigned (%s)\n",
+ disk->disk_name, disk->alias);
+ return -EINVAL;
+ }
+
+ alias = kasprintf(GFP_KERNEL, "%s", buf);
+ if (!alias)
+ return -ENOMEM;
+
+ if (alias[count - 1] == '\n')
+ alias[count - 1] = '\0';
+
+ envp[0] = kasprintf(GFP_KERNEL, "ALIAS=%s", alias);
+ if (!envp[0]) {
+ kfree(alias);
+ return -ENOMEM;
+ }
+
+ disk->alias = alias;
+ printk(KERN_INFO "alias: assigned %s to %s\n", alias, disk->disk_name);
+
+ kobject_uevent_env(&dev->kobj, KOBJ_ADD, envp);
+
+ kfree(envp[0]);
+ return ret;
+}
+
static ssize_t disk_range_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -968,6 +1037,7 @@ static ssize_t disk_discard_alignment_show(struct device *dev,
return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue));
}
+static DEVICE_ATTR(alias, S_IRUGO|S_IWUSR, alias_show, alias_store);
static DEVICE_ATTR(range, S_IRUGO, disk_range_show, NULL);
static DEVICE_ATTR(ext_range, S_IRUGO, disk_ext_range_show, NULL);
static DEVICE_ATTR(removable, S_IRUGO, disk_removable_show, NULL);
@@ -990,6 +1060,7 @@ static struct device_attribute dev_attr_fail_timeout =
#endif
static struct attribute *disk_attrs[] = {
+ &dev_attr_alias.attr,
&dev_attr_range.attr,
&dev_attr_ext_range.attr,
&dev_attr_removable.attr,
@@ -6713,6 +6713,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy);
EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
+EXPORT_SYMBOL_GPL(__ata_change_queue_depth);
EXPORT_SYMBOL_GPL(sata_scr_valid);
EXPORT_SYMBOL_GPL(sata_scr_read);
EXPORT_SYMBOL_GPL(sata_scr_write);
View
@@ -1215,25 +1215,15 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
}
/**
- * ata_scsi_change_queue_depth - SCSI callback for queue depth config
- * @sdev: SCSI device to configure queue depth for
- * @queue_depth: new queue depth
- * @reason: calling context
- *
- * This is libata standard hostt->change_queue_depth callback.
- * SCSI will call into this callback when user tries to set queue
- * depth via sysfs.
+ * __ata_change_queue_depth - helper for ata_scsi_change_queue_depth
*
- * LOCKING:
- * SCSI layer (we don't care)
+ * libsas and libata have different approaches for associating a sdev to
+ * its ata_port.
*
- * RETURNS:
- * Newly configured queue depth.
*/
-int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
- int reason)
+int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
+ int queue_depth, int reason)
{
- struct ata_port *ap = ata_shost_to_port(sdev->host);
struct ata_device *dev;
unsigned long flags;
@@ -1269,6 +1259,30 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
}
/**
+ * ata_scsi_change_queue_depth - SCSI callback for queue depth config
+ * @sdev: SCSI device to configure queue depth for
+ * @queue_depth: new queue depth
+ * @reason: calling context
+ *
+ * This is libata standard hostt->change_queue_depth callback.
+ * SCSI will call into this callback when user tries to set queue
+ * depth via sysfs.
+ *
+ * LOCKING:
+ * SCSI layer (we don't care)
+ *
+ * RETURNS:
+ * Newly configured queue depth.
+ */
+int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
+ int reason)
+{
+ struct ata_port *ap = ata_shost_to_port(sdev->host);
+
+ return __ata_change_queue_depth(ap, sdev, queue_depth, reason);
+}
+
+/**
* ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
* @qc: Storage for translated ATA taskfile
*
Oops, something went wrong.

0 comments on commit ec7ae51

Please sign in to comment.