From owner-svn-src-all@FreeBSD.ORG Thu Feb 9 17:50:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F63C106566B; Thu, 9 Feb 2012 17:50:25 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1808D8FC17; Thu, 9 Feb 2012 17:50:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19HoPNS016159; Thu, 9 Feb 2012 17:50:25 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19HoO0D016145; Thu, 9 Feb 2012 17:50:24 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201202091750.q19HoO0D016145@svn.freebsd.org> From: Jim Harris Date: Thu, 9 Feb 2012 17:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231296 - in head/sys: dev/isci dev/isci/scil modules/isci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 17:50:25 -0000 Author: jimharris Date: Thu Feb 9 17:50:24 2012 New Revision: 231296 URL: http://svn.freebsd.org/changeset/base/231296 Log: Remove explicit CC assignment in isci(4) Makefile to allow for building with clang. Also fix a number of warnings uncovered when building with clang around some implicit enum conversions. Sponsored by: Intel Approved by: scottl Modified: head/sys/dev/isci/isci.h head/sys/dev/isci/isci_io_request.c head/sys/dev/isci/isci_remote_device.c head/sys/dev/isci/scil/sati_abort_task_set.c head/sys/dev/isci/scil/scic_sds_controller.c head/sys/dev/isci/scil/scif_sas_controller.c head/sys/dev/isci/scil/scif_sas_controller_state_handlers.c head/sys/dev/isci/scil/scif_sas_io_request.c head/sys/dev/isci/scil/scif_sas_remote_device_ready_substates.c head/sys/dev/isci/scil/scif_sas_smp_remote_device.c head/sys/dev/isci/scil/scif_sas_stp_io_request.c head/sys/dev/isci/scil/scif_sas_stp_task_request.c head/sys/modules/isci/Makefile Modified: head/sys/dev/isci/isci.h ============================================================================== --- head/sys/dev/isci/isci.h Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/isci.h Thu Feb 9 17:50:24 2012 (r231296) @@ -160,7 +160,6 @@ struct ISCI_REQUEST struct ISCI_IO_REQUEST { struct ISCI_REQUEST parent; - SCI_STATUS status; SCI_IO_REQUEST_HANDLE_T sci_object; union ccb *ccb; uint32_t num_segments; Modified: head/sys/dev/isci/isci_io_request.c ============================================================================== --- head/sys/dev/isci/isci_io_request.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/isci_io_request.c Thu Feb 9 17:50:24 2012 (r231296) @@ -626,16 +626,16 @@ isci_io_request_construct(void *arg, bus return; } - io_request->status = scif_io_request_construct( + status = scif_io_request_construct( io_request->parent.controller_handle, io_request->parent.remote_device_handle, SCI_CONTROLLER_INVALID_IO_TAG, (void *)io_request, (void *)((char*)io_request + sizeof(struct ISCI_IO_REQUEST)), &io_request->sci_object); - if (io_request->status != SCI_SUCCESS) { + if (status != SCI_SUCCESS) { isci_io_request_complete(io_request->parent.controller_handle, - device, io_request, io_request->status); + device, io_request, (SCI_IO_STATUS)status); return; } @@ -650,7 +650,7 @@ isci_io_request_construct(void *arg, bus if (status != SCI_SUCCESS) { isci_io_request_complete(io_request->parent.controller_handle, - device, io_request, status); + device, io_request, (SCI_IO_STATUS)status); return; } @@ -900,7 +900,7 @@ isci_io_request_execute_smp_io(union ccb if (status != SCI_SUCCESS) { isci_io_request_complete(controller->scif_controller_handle, - smp_device_handle, io_request, status); + smp_device_handle, io_request, (SCI_IO_STATUS)status); return; } @@ -912,7 +912,7 @@ isci_io_request_execute_smp_io(union ccb if (status != SCI_SUCCESS) { isci_io_request_complete(controller->scif_controller_handle, - smp_device_handle, io_request, status); + smp_device_handle, io_request, (SCI_IO_STATUS)status); return; } Modified: head/sys/dev/isci/isci_remote_device.c ============================================================================== --- head/sys/dev/isci/isci_remote_device.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/isci_remote_device.c Thu Feb 9 17:50:24 2012 (r231296) @@ -195,7 +195,7 @@ isci_remote_device_reset(struct ISCI_REM if (status != SCI_SUCCESS) { isci_task_request_complete(controller->scif_controller_handle, remote_device->sci_object, task_request->sci_object, - status); + (SCI_TASK_STATUS)status); return; } @@ -207,7 +207,7 @@ isci_remote_device_reset(struct ISCI_REM isci_task_request_complete( controller->scif_controller_handle, remote_device->sci_object, task_request->sci_object, - status); + (SCI_TASK_STATUS)status); return; } } Modified: head/sys/dev/isci/scil/sati_abort_task_set.c ============================================================================== --- head/sys/dev/isci/scil/sati_abort_task_set.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/sati_abort_task_set.c Thu Feb 9 17:50:24 2012 (r231296) @@ -124,8 +124,8 @@ SATI_STATUS sati_abort_task_set_translat for (tag_index = 0; tag_index < 32; tag_index++) { - void * matching_command; - SCI_STATUS completion_status; + void * matching_command; + SCI_IO_STATUS completion_status; sati_cb_device_get_request_by_ncq_tag( scsi_task, tag_index, @@ -141,7 +141,7 @@ SATI_STATUS sati_abort_task_set_translat ) { sati_translate_error(sequence, matching_command, log->error); - completion_status = SCI_FAILURE_IO_RESPONSE_VALID; + completion_status = SCI_IO_FAILURE_RESPONSE_VALID; if(sequence->state == SATI_SEQUENCE_STATE_READ_ERROR) { @@ -159,7 +159,7 @@ SATI_STATUS sati_abort_task_set_translat } else { - completion_status = SCI_FAILURE_IO_TERMINATED; + completion_status = SCI_IO_FAILURE_TERMINATED; } sati_cb_io_request_complete(matching_command, completion_status); Modified: head/sys/dev/isci/scil/scic_sds_controller.c ============================================================================== --- head/sys/dev/isci/scil/scic_sds_controller.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scic_sds_controller.c Thu Feb 9 17:50:24 2012 (r231296) @@ -4165,7 +4165,7 @@ SCI_IO_STATUS scic_controller_start_io( U16 io_tag ) { - SCI_IO_STATUS status; + SCI_STATUS status; SCIC_SDS_CONTROLLER_T *this_controller; this_controller = (SCIC_SDS_CONTROLLER_T *)controller; @@ -4183,7 +4183,7 @@ SCI_IO_STATUS scic_controller_start_io( io_tag ); - return status; + return (SCI_IO_STATUS)status; } // --------------------------------------------------------------------------- @@ -4253,7 +4253,7 @@ SCI_TASK_STATUS scic_controller_start_ta U16 task_tag ) { - SCI_TASK_STATUS status = SCI_FAILURE_INVALID_STATE; + SCI_STATUS status = SCI_FAILURE_INVALID_STATE; SCIC_SDS_CONTROLLER_T *this_controller; this_controller = (SCIC_SDS_CONTROLLER_T *)controller; @@ -4282,7 +4282,7 @@ SCI_TASK_STATUS scic_controller_start_ta )); } - return status; + return (SCI_TASK_STATUS)status; } // --------------------------------------------------------------------------- Modified: head/sys/dev/isci/scil/scif_sas_controller.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_controller.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_controller.c Thu Feb 9 17:50:24 2012 (r231296) @@ -271,6 +271,7 @@ SCI_IO_STATUS scif_controller_start_io( ) { SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller; + SCI_STATUS status; SCIF_LOG_TRACE(( sci_base_object_get_logger(controller), @@ -284,7 +285,7 @@ SCI_IO_STATUS scif_controller_start_io( || scif_sas_controller_sufficient_resource(controller) ) { - return fw_controller->state_handlers->start_io_handler( + status = fw_controller->state_handlers->start_io_handler( (SCI_BASE_CONTROLLER_T*) controller, (SCI_BASE_REMOTE_DEVICE_T*) remote_device, (SCI_BASE_REQUEST_T*) io_request, @@ -292,7 +293,9 @@ SCI_IO_STATUS scif_controller_start_io( ); } else - return SCI_FAILURE_INSUFFICIENT_RESOURCES; + status = SCI_FAILURE_INSUFFICIENT_RESOURCES; + + return (SCI_IO_STATUS)status; } // --------------------------------------------------------------------------- @@ -305,13 +308,14 @@ SCI_TASK_STATUS scif_controller_start_ta ) { SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller; + SCI_STATUS status; // Validate the user supplied parameters. if ( (controller == SCI_INVALID_HANDLE) || (remote_device == SCI_INVALID_HANDLE) || (task_request == SCI_INVALID_HANDLE) ) { - return SCI_FAILURE_INVALID_PARAMETER_VALUE; + return SCI_TASK_FAILURE_INVALID_PARAMETER_VALUE; } SCIF_LOG_TRACE(( @@ -323,7 +327,7 @@ SCI_TASK_STATUS scif_controller_start_ta if (scif_sas_controller_sufficient_resource(controller)) { - return fw_controller->state_handlers->start_task_handler( + status = fw_controller->state_handlers->start_task_handler( (SCI_BASE_CONTROLLER_T*) controller, (SCI_BASE_REMOTE_DEVICE_T*) remote_device, (SCI_BASE_REQUEST_T*) task_request, @@ -331,7 +335,9 @@ SCI_TASK_STATUS scif_controller_start_ta ); } else - return SCI_FAILURE_INSUFFICIENT_RESOURCES; + status = SCI_FAILURE_INSUFFICIENT_RESOURCES; + + return (SCI_TASK_STATUS)status; } // --------------------------------------------------------------------------- Modified: head/sys/dev/isci/scil/scif_sas_controller_state_handlers.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_controller_state_handlers.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_controller_state_handlers.c Thu Feb 9 17:50:24 2012 (r231296) @@ -586,7 +586,7 @@ SCI_STATUS scif_sas_controller_ready_sta if (status == SCI_SUCCESS) { // Ask the core to start processing for this IO request. - status = scic_controller_start_io( + status = (SCI_STATUS)scic_controller_start_io( fw_controller->core_object, fw_device->core_object, fw_io->parent.core_object, @@ -903,7 +903,7 @@ SCI_STATUS scif_sas_controller_ready_sta } // Ask the core to start processing for this task request. - status = scic_controller_start_task( + status = (SCI_STATUS)scic_controller_start_task( fw_controller->core_object, fw_device->core_object, fw_task->parent.core_object, @@ -1072,7 +1072,7 @@ SCI_STATUS scif_sas_controller_common_st if (status == SCI_SUCCESS) { // Ask the core to start processing for this IO request. - status = scic_controller_start_io( + status = (SCI_STATUS)scic_controller_start_io( fw_controller->core_object, fw_device->core_object, fw_io->parent.core_object, @@ -1683,7 +1683,7 @@ SCI_STATUS scif_sas_controller_failed_st &((SCIF_SAS_CONTROLLER_T *)controller)->parent.state_machine) )); - return SCI_IO_FAILURE; + return SCI_FAILURE; } #define scif_sas_controller_stopping_complete_io_handler \ Modified: head/sys/dev/isci/scil/scif_sas_io_request.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_io_request.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_io_request.c Thu Feb 9 17:50:24 2012 (r231296) @@ -811,7 +811,7 @@ SCI_STATUS scif_sas_io_request_continue( ); //start the new constructed IO. - return scif_controller_start_io( + return (SCI_STATUS)scif_controller_start_io( (SCI_CONTROLLER_HANDLE_T) fw_controller, (SCI_REMOTE_DEVICE_HANDLE_T) fw_device, (SCI_IO_REQUEST_HANDLE_T) fw_request, Modified: head/sys/dev/isci/scil/scif_sas_remote_device_ready_substates.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_remote_device_ready_substates.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_remote_device_ready_substates.c Thu Feb 9 17:50:24 2012 (r231296) @@ -255,7 +255,7 @@ void scif_sas_remote_device_ready_ncq_er } } - status = scif_controller_start_task( + scif_controller_start_task( fw_controller, fw_device, fw_request, Modified: head/sys/dev/isci/scil/scif_sas_smp_remote_device.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_smp_remote_device.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_smp_remote_device.c Thu Feb 9 17:50:24 2012 (r231296) @@ -1853,7 +1853,7 @@ void scif_sas_smp_remote_device_terminat )); scif_sas_smp_remote_device_decode_smp_response( - fw_device, fw_request, NULL, SCI_FAILURE_RETRY_REQUIRED + fw_device, fw_request, NULL, SCI_IO_FAILURE_RETRY_REQUIRED ); } Modified: head/sys/dev/isci/scil/scif_sas_stp_io_request.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_stp_io_request.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_stp_io_request.c Thu Feb 9 17:50:24 2012 (r231296) @@ -396,7 +396,7 @@ SCI_STATUS scif_sas_stp_io_request_const fw_io->parent.protocol_complete_handler = scif_sas_stp_core_cb_io_request_complete_handler; // Done with translation - sci_status = SATI_SUCCESS; + sci_status = SCI_SUCCESS; } else if (sati_status == SATI_COMPLETE) sci_status = SCI_SUCCESS_IO_COMPLETE_BEFORE_START; Modified: head/sys/dev/isci/scil/scif_sas_stp_task_request.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_stp_task_request.c Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/dev/isci/scil/scif_sas_stp_task_request.c Thu Feb 9 17:50:24 2012 (r231296) @@ -254,7 +254,7 @@ void scif_sas_stp_task_request_abort_tas fw_domain->controller, fw_device, pending_request, - SCI_FAILURE_IO_TERMINATED + SCI_IO_FAILURE_TERMINATED ); } //otherwise, the abort succeeded. Since the waiting flag is cleared, Modified: head/sys/modules/isci/Makefile ============================================================================== --- head/sys/modules/isci/Makefile Thu Feb 9 17:38:08 2012 (r231295) +++ head/sys/modules/isci/Makefile Thu Feb 9 17:50:24 2012 (r231296) @@ -87,6 +87,4 @@ SRCS += \ SRCS += opt_scsi.h opt_cam.h opt_isci.h SRCS += device_if.h bus_if.h pci_if.h -CC = gcc - .include