entry.c (249849) | entry.c (250460) |
---|---|
1/* 2 * Copyright (c) 2004-2005 HighPoint Technologies, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2004-2005 HighPoint Technologies, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/hptmv/entry.c 249849 2013-04-24 19:00:45Z mav $"); | 28__FBSDID("$FreeBSD: head/sys/dev/hptmv/entry.c 250460 2013-05-10 16:41:26Z eadler $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/malloc.h> 35#include <sys/resource.h> 36#include <sys/time.h> --- 872 unchanged lines hidden (view full) --- 909 /* Delete previous timers (if multiple drives disconnected in the same time */ 910 /*pAdapter->event_timer_disconnect = timeout(hptmv_handle_event_disconnect, pAdapter, 10*hz); */ 911 /*It is not necessary to wait, handle it directly*/ 912 hptmv_handle_event_disconnect(pAdapter); 913 } 914 else 915 { 916 | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/malloc.h> 35#include <sys/resource.h> 36#include <sys/time.h> --- 872 unchanged lines hidden (view full) --- 909 /* Delete previous timers (if multiple drives disconnected in the same time */ 910 /*pAdapter->event_timer_disconnect = timeout(hptmv_handle_event_disconnect, pAdapter, 10*hz); */ 911 /*It is not necessary to wait, handle it directly*/ 912 hptmv_handle_event_disconnect(pAdapter); 913 } 914 else 915 { 916 |
917 MV_ERROR("RR18xx: illigal value for param1(%d) at " 918 "connect/disconect event, host=%d\n", param1, | 917 MV_ERROR("RR18xx: illegal value for param1(%d) at " 918 "connect/disconnect event, host=%d\n", param1, |
919 pMvSataAdapter->adapterId ); 920 921 } 922 } 923 break; 924 case MV_EVENT_TYPE_ADAPTER_ERROR: 925 KdPrint(("RR18xx: DEVICE error event received, pci cause " 926 "reg=%x, don't how to handle this\n", param1)); --- 51 unchanged lines hidden (view full) --- 978 (((ULONG_PTR)pAdapter->responsesArrayBaseAlignedAddr) & ~(ULONG_PTR)(MV_EDMA_RESPONSE_QUEUE_SIZE - 1)); 979 pAdapter->responsesArrayBaseDmaAlignedAddr = pAdapter->responsesArrayBaseDmaAddr; 980 pAdapter->responsesArrayBaseDmaAlignedAddr += MV_EDMA_RESPONSE_QUEUE_SIZE; 981 pAdapter->responsesArrayBaseDmaAlignedAddr &= ~(ULONG_PTR)(MV_EDMA_RESPONSE_QUEUE_SIZE - 1); 982 983 if ((pAdapter->responsesArrayBaseDmaAlignedAddr - pAdapter->responsesArrayBaseDmaAddr) != 984 (pAdapter->responsesArrayBaseAlignedAddr - pAdapter->responsesArrayBaseAddr)) 985 { | 919 pMvSataAdapter->adapterId ); 920 921 } 922 } 923 break; 924 case MV_EVENT_TYPE_ADAPTER_ERROR: 925 KdPrint(("RR18xx: DEVICE error event received, pci cause " 926 "reg=%x, don't how to handle this\n", param1)); --- 51 unchanged lines hidden (view full) --- 978 (((ULONG_PTR)pAdapter->responsesArrayBaseAlignedAddr) & ~(ULONG_PTR)(MV_EDMA_RESPONSE_QUEUE_SIZE - 1)); 979 pAdapter->responsesArrayBaseDmaAlignedAddr = pAdapter->responsesArrayBaseDmaAddr; 980 pAdapter->responsesArrayBaseDmaAlignedAddr += MV_EDMA_RESPONSE_QUEUE_SIZE; 981 pAdapter->responsesArrayBaseDmaAlignedAddr &= ~(ULONG_PTR)(MV_EDMA_RESPONSE_QUEUE_SIZE - 1); 982 983 if ((pAdapter->responsesArrayBaseDmaAlignedAddr - pAdapter->responsesArrayBaseDmaAddr) != 984 (pAdapter->responsesArrayBaseAlignedAddr - pAdapter->responsesArrayBaseAddr)) 985 { |
986 MV_ERROR("RR18xx[%d]: Error in Response Quueues Alignment\n", | 986 MV_ERROR("RR18xx[%d]: Error in Response Queues Alignment\n", |
987 pAdapter->mvSataAdapter.adapterId); 988 contigfree(pAdapter->requestsArrayBaseAddr, REQUESTS_ARRAY_SIZE, M_DEVBUF); 989 contigfree(pAdapter->responsesArrayBaseAddr, RESPONSES_ARRAY_SIZE, M_DEVBUF); 990 return -1; 991 } 992 return 0; 993} 994 --- 2090 unchanged lines hidden --- | 987 pAdapter->mvSataAdapter.adapterId); 988 contigfree(pAdapter->requestsArrayBaseAddr, REQUESTS_ARRAY_SIZE, M_DEVBUF); 989 contigfree(pAdapter->responsesArrayBaseAddr, RESPONSES_ARRAY_SIZE, M_DEVBUF); 990 return -1; 991 } 992 return 0; 993} 994 --- 2090 unchanged lines hidden --- |