浏览代码

[SCSI] fusion - mptctl - adding support for bus_type=SAS

Add bus_type recognization in ioctl path for SAS.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Moore, Eric 19 年之前
父节点
当前提交
9cc1cfbc67
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 5 3
      drivers/message/fusion/mptctl.c
  2. 3 1
      drivers/message/fusion/mptctl.h

+ 5 - 3
drivers/message/fusion/mptctl.c

@@ -1145,7 +1145,9 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
 	/* Fill in the data and return the structure to the calling
 	/* Fill in the data and return the structure to the calling
 	 * program
 	 * program
 	 */
 	 */
-	if (ioc->bus_type == FC)
+	if (ioc->bus_type == SAS)
+		karg->adapterType = MPT_IOCTL_INTERFACE_SAS;
+	else if (ioc->bus_type == FC)
 		karg->adapterType = MPT_IOCTL_INTERFACE_FC;
 		karg->adapterType = MPT_IOCTL_INTERFACE_FC;
 	else
 	else
 		karg->adapterType = MPT_IOCTL_INTERFACE_SCSI;
 		karg->adapterType = MPT_IOCTL_INTERFACE_SCSI;
@@ -2391,7 +2393,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
 
 
 	karg.base_io_addr = pci_resource_start(pdev, 0);
 	karg.base_io_addr = pci_resource_start(pdev, 0);
 
 
-	if (ioc->bus_type == FC)
+	if ((ioc->bus_type == SAS) || (ioc->bus_type == FC))
 		karg.bus_phys_width = HP_BUS_WIDTH_UNK;
 		karg.bus_phys_width = HP_BUS_WIDTH_UNK;
 	else
 	else
 		karg.bus_phys_width = HP_BUS_WIDTH_16;
 		karg.bus_phys_width = HP_BUS_WIDTH_16;
@@ -2480,7 +2482,7 @@ mptctl_hp_targetinfo(unsigned long arg)
 
 
 	/*  There is nothing to do for FCP parts.
 	/*  There is nothing to do for FCP parts.
 	 */
 	 */
-	if (ioc->bus_type == FC)
+	if ((ioc->bus_type == SAS) || (ioc->bus_type == FC))
 		return 0;
 		return 0;
 
 
 	if ((ioc->spi_data.sdp0length == 0) || (ioc->sh == NULL))
 	if ((ioc->spi_data.sdp0length == 0) || (ioc->sh == NULL))

+ 3 - 1
drivers/message/fusion/mptctl.h

@@ -169,8 +169,10 @@ struct mpt_ioctl_pci_info2 {
  *  Read only.
  *  Read only.
  *  Data starts at offset 0xC
  *  Data starts at offset 0xC
  */
  */
-#define MPT_IOCTL_INTERFACE_FC		(0x01)
 #define MPT_IOCTL_INTERFACE_SCSI	(0x00)
 #define MPT_IOCTL_INTERFACE_SCSI	(0x00)
+#define MPT_IOCTL_INTERFACE_FC		(0x01)
+#define MPT_IOCTL_INTERFACE_FC_IP	(0x02)
+#define MPT_IOCTL_INTERFACE_SAS		(0x03)
 #define MPT_IOCTL_VERSION_LENGTH	(32)
 #define MPT_IOCTL_VERSION_LENGTH	(32)
 
 
 struct mpt_ioctl_iocinfo {
 struct mpt_ioctl_iocinfo {