aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/message/fusion/Kconfig1
-rw-r--r--drivers/message/fusion/mptbase.c32
-rw-r--r--drivers/message/fusion/mptbase.h29
-rw-r--r--drivers/message/fusion/mptspi.c2
4 files changed, 64 insertions, 0 deletions
diff --git a/drivers/message/fusion/Kconfig b/drivers/message/fusion/Kconfig
index f55cc03a75c9..3c44a2fc4efb 100644
--- a/drivers/message/fusion/Kconfig
+++ b/drivers/message/fusion/Kconfig
@@ -20,6 +20,7 @@ config FUSION_SPI
20 LSI53C1020A 20 LSI53C1020A
21 LSI53C1030 21 LSI53C1030
22 LSI53C1035 22 LSI53C1035
23 ATTO UL4D
23 24
24config FUSION_FC 25config FUSION_FC
25 tristate "Fusion MPT ScsiHost drivers for FC" 26 tristate "Fusion MPT ScsiHost drivers for FC"
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 414c109f4cf5..828f0ca7c1b3 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -4888,6 +4888,38 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum)
4888 /* Nvram data is left with INVALID mark 4888 /* Nvram data is left with INVALID mark
4889 */ 4889 */
4890 rc = 1; 4890 rc = 1;
4891 } else if (ioc->pcidev->vendor == PCI_VENDOR_ID_ATTO) {
4892
4893 /* This is an ATTO adapter, read Page2 accordingly
4894 */
4895 ATTO_SCSIPortPage2_t *pPP2 = (ATTO_SCSIPortPage2_t *) pbuf;
4896 ATTODeviceInfo_t *pdevice = NULL;
4897 u16 ATTOFlags;
4898
4899 /* Save the Port Page 2 data
4900 * (reformat into a 32bit quantity)
4901 */
4902 for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) {
4903 pdevice = &pPP2->DeviceSettings[ii];
4904 ATTOFlags = le16_to_cpu(pdevice->ATTOFlags);
4905 data = 0;
4906
4907 /* Translate ATTO device flags to LSI format
4908 */
4909 if (ATTOFlags & ATTOFLAG_DISC)
4910 data |= (MPI_SCSIPORTPAGE2_DEVICE_DISCONNECT_ENABLE);
4911 if (ATTOFlags & ATTOFLAG_ID_ENB)
4912 data |= (MPI_SCSIPORTPAGE2_DEVICE_ID_SCAN_ENABLE);
4913 if (ATTOFlags & ATTOFLAG_LUN_ENB)
4914 data |= (MPI_SCSIPORTPAGE2_DEVICE_LUN_SCAN_ENABLE);
4915 if (ATTOFlags & ATTOFLAG_TAGGED)
4916 data |= (MPI_SCSIPORTPAGE2_DEVICE_TAG_QUEUE_ENABLE);
4917 if (!(ATTOFlags & ATTOFLAG_WIDE_ENB))
4918 data |= (MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE);
4919
4920 data = (data << 16) | (pdevice->Period << 8) | 10;
4921 ioc->spi_data.nvram[ii] = data;
4922 }
4891 } else { 4923 } else {
4892 SCSIPortPage2_t *pPP2 = (SCSIPortPage2_t *) pbuf; 4924 SCSIPortPage2_t *pPP2 = (SCSIPortPage2_t *) pbuf;
4893 MpiDeviceInfo_t *pdevice = NULL; 4925 MpiDeviceInfo_t *pdevice = NULL;
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 15ff22645844..a8c80805e170 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -194,6 +194,35 @@
194 194
195/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 195/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
196/* 196/*
197 * ATTO UL4D associated structures and defines
198 */
199#define ATTOFLAG_DISC 0x0001
200#define ATTOFLAG_TAGGED 0x0002
201#define ATTOFLAG_WIDE_ENB 0x0008
202#define ATTOFLAG_ID_ENB 0x0010
203#define ATTOFLAG_LUN_ENB 0x0060
204
205typedef struct _ATTO_DEVICE_INFO
206{
207 u8 Offset; /* 00h */
208 u8 Period; /* 01h */
209 u16 ATTOFlags; /* 02h */
210} ATTO_DEVICE_INFO, MPI_POINTER PTR_ATTO_DEVICE_INFO,
211 ATTODeviceInfo_t, MPI_POINTER pATTODeviceInfo_t;
212
213typedef struct _ATTO_CONFIG_PAGE_SCSI_PORT_2
214{
215 CONFIG_PAGE_HEADER Header; /* 00h */
216 u16 PortFlags; /* 04h */
217 u16 Unused1; /* 06h */
218 u32 Unused2; /* 08h */
219 ATTO_DEVICE_INFO DeviceSettings[16]; /* 0Ch */
220} fATTO_CONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_ATTO_CONFIG_PAGE_SCSI_PORT_2,
221 ATTO_SCSIPortPage2_t, MPI_POINTER pATTO_SCSIPortPage2_t;
222
223
224/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
225/*
197 * MPT protocol driver defs... 226 * MPT protocol driver defs...
198 */ 227 */
199typedef enum { 228typedef enum {
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 8c98420640a5..25df3bfdcb0b 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -1190,6 +1190,8 @@ static struct spi_function_template mptspi_transport_functions = {
1190static struct pci_device_id mptspi_pci_table[] = { 1190static struct pci_device_id mptspi_pci_table[] = {
1191 { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1030, 1191 { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1030,
1192 PCI_ANY_ID, PCI_ANY_ID }, 1192 PCI_ANY_ID, PCI_ANY_ID },
1193 { PCI_VENDOR_ID_ATTO, MPI_MANUFACTPAGE_DEVID_53C1030,
1194 PCI_ANY_ID, PCI_ANY_ID },
1193 { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1035, 1195 { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1035,
1194 PCI_ANY_ID, PCI_ANY_ID }, 1196 PCI_ANY_ID, PCI_ANY_ID },
1195 {0} /* Terminating entry */ 1197 {0} /* Terminating entry */