diff options
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 32 |
1 files changed, 32 insertions, 0 deletions
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; |