Changeset 33919 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Nov 9, 2010 5:27:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r33540 r33919 4939 4939 int rc = VINF_SUCCESS; 4940 4940 char *pszCtrlType = NULL; 4941 char szDevTag[20], szTaggedText[64]; 4941 4942 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 4942 4943 … … 4987 4988 N_("LsiLogic configuration error: failed to read ControllerType as string")); 4988 4989 Log(("%s: ControllerType=%s\n", __FUNCTION__, pszCtrlType)); 4989 4990 4990 4991 rc = lsilogicGetCtrlTypeFromString(pThis, pszCtrlType); 4991 4992 MMR3HeapFree(pszCtrlType); 4993 4994 RTStrPrintf(szDevTag, sizeof(szDevTag), "LSILOGIC%s-%d", 4995 pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI ? "SPI" : "SAS", 4996 iInstance); 4997 4992 4998 4993 4999 if (RT_FAILURE(rc)) … … 5087 5093 5088 5094 /* Initialize task queue. (Need two items to handle SMP guest concurrency.) */ 5095 RTStrPrintf(szTaggedText, sizeof(szTaggedText), "%s-Task", szDevTag); 5089 5096 rc = PDMDevHlpQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 2, 0, 5090 5097 lsilogicNotifyQueueConsumer, true, 5091 pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI 5092 ? "LsiLogic-Task" 5093 : "LsiLogicSAS-Task", 5098 szTaggedText, 5094 5099 &pThis->pNotificationQueueR3); 5095 5100 if (RT_FAILURE(rc)) … … 5114 5119 * Create critical sections protecting the reply post and free queues. 5115 5120 */ 5121 RTStrPrintf(szTaggedText, sizeof(szTaggedText), "%sRFQ", szDevTag); 5116 5122 rc = PDMDevHlpCritSectInit(pDevIns, &pThis->ReplyFreeQueueCritSect, RT_SRC_POS, 5117 pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI 5118 ? "LsiLogicRFQ" 5119 : "LsiLogicSasRFQ"); 5123 szTaggedText); 5120 5124 if (RT_FAILURE(rc)) 5121 5125 return PDMDEV_SET_ERROR(pDevIns, rc, 5122 5126 N_("LsiLogic: cannot create critical section for reply free queue")); 5123 5127 5128 RTStrPrintf(szTaggedText, sizeof(szTaggedText), "%sRPQ", szDevTag); 5124 5129 rc = PDMDevHlpCritSectInit(pDevIns, &pThis->ReplyPostQueueCritSect, RT_SRC_POS, 5125 pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI 5126 ? "LsiLogicRPQ" 5127 : "LsiLogicSasRPQ"); 5130 szTaggedText); 5128 5131 if (RT_FAILURE(rc)) 5129 5132 return PDMDEV_SET_ERROR(pDevIns, rc, … … 5207 5210 AssertRC(rc); 5208 5211 5209 /* Register I/O port space in ISA region for BIOS access. */ 5210 if (pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI) 5211 rc = PDMDevHlpIOPortRegister(pDevIns, LSILOGIC_ISA_IO_PORT, 3, NULL, 5212 lsilogicIsaIOPortWrite, lsilogicIsaIOPortRead, 5213 lsilogicIsaIOPortWriteStr, lsilogicIsaIOPortReadStr, 5214 "LsiLogic BIOS"); 5215 else if (pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SAS) 5216 rc = PDMDevHlpIOPortRegister(pDevIns, LSILOGIC_SAS_ISA_IO_PORT, 3, NULL, 5217 lsilogicIsaIOPortWrite, lsilogicIsaIOPortRead, 5218 lsilogicIsaIOPortWriteStr, lsilogicIsaIOPortReadStr, 5219 "LsiLogic SAS BIOS"); 5220 else 5221 AssertMsgFailed(("Invalid controller type %d\n", pThis->enmCtrlType)); 5222 5223 if (RT_FAILURE(rc)) 5224 return PDMDEV_SET_ERROR(pDevIns, rc, N_("LsiLogic cannot register legacy I/O handlers")); 5212 /* Register I/O port space in ISA region for BIOS access, only for first controller. */ 5213 if (iInstance == 0) 5214 { 5215 if (pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI) 5216 rc = PDMDevHlpIOPortRegister(pDevIns, LSILOGIC_ISA_IO_PORT, 3, NULL, 5217 lsilogicIsaIOPortWrite, lsilogicIsaIOPortRead, 5218 lsilogicIsaIOPortWriteStr, lsilogicIsaIOPortReadStr, 5219 "LsiLogic BIOS"); 5220 else if (pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SAS) 5221 rc = PDMDevHlpIOPortRegister(pDevIns, LSILOGIC_SAS_ISA_IO_PORT, 3, NULL, 5222 lsilogicIsaIOPortWrite, lsilogicIsaIOPortRead, 5223 lsilogicIsaIOPortWriteStr, lsilogicIsaIOPortReadStr, 5224 "LsiLogic SAS BIOS"); 5225 else 5226 AssertMsgFailed(("Invalid controller type %d\n", pThis->enmCtrlType)); 5227 5228 if (RT_FAILURE(rc)) 5229 return PDMDEV_SET_ERROR(pDevIns, rc, N_("LsiLogic cannot register legacy I/O handlers")); 5230 } 5225 5231 5226 5232 /* Register save state handlers. */
Note:
See TracChangeset
for help on using the changeset viewer.