1/* 2 * Copyright (c) 2004-07 Applied Micro Circuits Corporation. 3 * Copyright (c) 2004-05 Vinod Kashyap 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/dev/twa/tw_cl_init.c 172496 2007-10-09 17:43:57Z scottl $ |
28 */ 29 30/* 31 * AMCC'S 3ware driver for 9000 series storage controllers. 32 * 33 * Author: Vinod Kashyap 34 * Modifications by: Adam Radford |
35 * Modifications by: Manjunath Ranganathaiah |
36 */ 37 38 39/* 40 * Common Layer initialization functions. 41 */ 42 43 --- 17 unchanged lines hidden (view full) --- 61 * TW_CL_FALSE-- controller not supported 62 */ 63TW_INT32 64tw_cl_ctlr_supported(TW_INT32 vendor_id, TW_INT32 device_id) 65{ 66 if ((vendor_id == TW_CL_VENDOR_ID) && 67 ((device_id == TW_CL_DEVICE_ID_9K) || 68 (device_id == TW_CL_DEVICE_ID_9K_X) || |
69 (device_id == TW_CL_DEVICE_ID_9K_E) || 70 (device_id == TW_CL_DEVICE_ID_9K_SA))) |
71 return(TW_CL_TRUE); 72 return(TW_CL_FALSE); 73} 74 75 76 77/* 78 * Function name: tw_cl_get_pci_bar_info --- 34 unchanged lines hidden (view full) --- 113 *bar0_offset = 0xC; 114 *bar_size = 8; 115 break; 116 } 117 break; 118 119 case TW_CL_DEVICE_ID_9K_X: 120 case TW_CL_DEVICE_ID_9K_E: |
121 case TW_CL_DEVICE_ID_9K_SA: |
122 switch(bar_type) { 123 case TW_CL_BAR_TYPE_IO: 124 *bar_num = 2; 125 *bar0_offset = 0x10; 126 *bar_size = 4; 127 break; 128 129 case TW_CL_BAR_TYPE_MEM: --- 200 unchanged lines hidden (view full) --- 330 * address. It will then interpret the value written to the control 331 * register as the low cmd pkt address. So, for this case, we will 332 * make a note that we will need to synchronize control register writes 333 * with command register writes. 334 */ 335 if ((ctlr->flags & TW_CL_64BIT_ADDRESSES) && 336 ((ctlr->device_id == TW_CL_DEVICE_ID_9K) || 337 (ctlr->device_id == TW_CL_DEVICE_ID_9K_X) || |
338 (ctlr->device_id == TW_CL_DEVICE_ID_9K_E) || 339 (ctlr->device_id == TW_CL_DEVICE_ID_9K_SA))) { |
340 ctlr->state |= TW_CLI_CTLR_STATE_G66_WORKAROUND_NEEDED; 341 ctlr->intr_lock = ctlr->io_lock; 342 } else { 343 ctlr->intr_lock = &(ctlr->intr_lock_handle); 344 tw_osl_init_lock(ctlr_handle, "tw_cl_intr_lock", 345 ctlr->intr_lock); 346 } 347 --- 397 unchanged lines hidden --- |