Lines Matching +full:hi +full:- +full:fi

5  *  Copyright (c) 2001-2013 ATTO Technology, Inc.
21 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
40 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
102 #define ESAS2R_COPYRIGHT_YEARS "2001-2013"
127 #define MAKEWORD(lo, hi) ((u16)((u8)(lo) | ((u16)(u8)(hi) << 8))) argument
132 #define MAKEDWORD(lo, hi) ((u32)((u16)(lo) | ((u32)(u16)(hi) << 16))) argument
135 #define LOBIT(x) ((x) & (0 - (x)))
142 readl((void __iomem *)a->regs + (reg) + MW_REG_OFFSET_HWREG)
145 writel(data, (void __iomem *)(a->regs + (reg) + MW_REG_OFFSET_HWREG))
154 readb((void __iomem *)a->data_window + (reg))
188 #define FLS_LENGTH_BOOT (FLS_OFFSET_CPYR - FLS_OFFSET_BOOT)
208 #define MW_REG_PCI_HWREG_DELTA (MW_REG_OFFSET_PCI - MW_REG_OFFSET_HWREG)
691 struct esas2r_flash_img *fi; member
1073 bool esas2r_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi,
1154 spin_lock_irqsave(&a->sg_list_lock, flags); in esas2r_alloc_sgl()
1155 if (likely(!list_empty(&a->free_sg_list_head))) { in esas2r_alloc_sgl()
1156 sgl = a->free_sg_list_head.next; in esas2r_alloc_sgl()
1160 spin_unlock_irqrestore(&a->sg_list_lock, flags); in esas2r_alloc_sgl()
1171 sgc->adapter = a; in esas2r_sgc_init()
1172 sgc->first_req = rq; in esas2r_sgc_init()
1178 sgc->sge.a64.limit = (struct atto_vda_sge *)((u8 *)rq->vrq in esas2r_sgc_init()
1182 - sizeof(struct in esas2r_sgc_init()
1185 sgc->sge.a64.last = in esas2r_sgc_init()
1186 sgc->sge.a64.curr = first; in esas2r_sgc_init()
1187 rq->vrq->scsi.sg_list_offset = (u8) in esas2r_sgc_init()
1188 ((u8 *)first - in esas2r_sgc_init()
1189 (u8 *)rq->vrq); in esas2r_sgc_init()
1191 sgc->sge.a64.last = in esas2r_sgc_init()
1192 sgc->sge.a64.curr = &rq->vrq->scsi.u.sge[0]; in esas2r_sgc_init()
1193 rq->vrq->scsi.sg_list_offset = in esas2r_sgc_init()
1196 sgc->sge.a64.chain = NULL; in esas2r_sgc_init()
1202 union atto_vda_req *vrq = rq->vrq; in esas2r_rq_init_request()
1204 INIT_LIST_HEAD(&rq->sg_table_head); in esas2r_rq_init_request()
1205 rq->data_buf = (void *)(vrq + 1); in esas2r_rq_init_request()
1206 rq->interrupt_cb = NULL; in esas2r_rq_init_request()
1207 rq->comp_cb = esas2r_complete_request_cb; in esas2r_rq_init_request()
1208 rq->flags = 0; in esas2r_rq_init_request()
1209 rq->timeout = 0; in esas2r_rq_init_request()
1210 rq->req_stat = RS_PENDING; in esas2r_rq_init_request()
1211 rq->req_type = RT_INI_REQ; in esas2r_rq_init_request()
1214 rq->func_rsp.dwords[0] = 0; in esas2r_rq_init_request()
1215 rq->func_rsp.dwords[1] = 0; in esas2r_rq_init_request()
1224 rq->vda_req_sz = RQ_SIZE_DEFAULT; in esas2r_rq_init_request()
1226 /* req_table entry should be NULL at this point - if not, halt */ in esas2r_rq_init_request()
1228 if (a->req_table[LOWORD(vrq->scsi.handle)]) { in esas2r_rq_init_request()
1235 a->req_table[LOWORD(vrq->scsi.handle)] = rq; in esas2r_rq_init_request()
1241 vrq->scsi.handle = (a->cmd_ref_no++ << 16) | (u16)vrq->scsi.handle; in esas2r_rq_init_request()
1248 vrq->scsi.function = VDA_FUNC_SCSI; in esas2r_rq_init_request()
1249 vrq->scsi.sense_len = SENSE_DATA_SZ; in esas2r_rq_init_request()
1252 vrq->scsi.sg_list_offset = 0; in esas2r_rq_init_request()
1253 vrq->scsi.chain_offset = 0; in esas2r_rq_init_request()
1254 vrq->scsi.flags = 0; in esas2r_rq_init_request()
1255 vrq->scsi.reserved = 0; in esas2r_rq_init_request()
1258 vrq->scsi.ppsense_buf in esas2r_rq_init_request()
1259 = cpu_to_le64(rq->vrq_md->phys_addr + in esas2r_rq_init_request()
1268 if (list_empty(&rq->sg_table_head)) in esas2r_rq_free_sg_lists()
1271 spin_lock_irqsave(&a->sg_list_lock, flags); in esas2r_rq_free_sg_lists()
1272 list_splice_tail_init(&rq->sg_table_head, &a->free_sg_list_head); in esas2r_rq_free_sg_lists()
1273 spin_unlock_irqrestore(&a->sg_list_lock, flags); in esas2r_rq_free_sg_lists()
1281 a->req_table[LOWORD(rq->vrq->scsi.handle)] = NULL; in esas2r_rq_destroy_request()
1282 rq->data_buf = NULL; in esas2r_rq_destroy_request()
1288 return test_bit(AF_BUSRST_NEEDED, &a->flags) || in esas2r_is_tasklet_pending()
1289 test_bit(AF_BUSRST_DETECTED, &a->flags) || in esas2r_is_tasklet_pending()
1290 test_bit(AF_CHPRST_NEEDED, &a->flags) || in esas2r_is_tasklet_pending()
1291 test_bit(AF_CHPRST_DETECTED, &a->flags) || in esas2r_is_tasklet_pending()
1292 test_bit(AF_PORT_CHANGE, &a->flags); in esas2r_is_tasklet_pending()
1306 if (unlikely(le32_to_cpu(rq->vrq->scsi.length) == 0)) in esas2r_build_sg_list()
1309 return (*a->build_sgl)(a, sgc); in esas2r_build_sg_list()
1314 if (atomic_inc_return(&a->dis_ints_cnt) == 1) in esas2r_disable_chip_interrupts()
1321 if (atomic_dec_return(&a->dis_ints_cnt) == 0) in esas2r_enable_chip_interrupts()
1326 /* Schedule a TASKLET to perform non-interrupt tasks that may require delays
1332 if (!test_and_set_bit(AF_TASKLET_SCHEDULED, &a->flags)) in esas2r_schedule_tasklet()
1333 tasklet_hi_schedule(&a->tasklet); in esas2r_schedule_tasklet()
1338 if (!test_bit(AF_DEGRADED_MODE, &a->flags) && in esas2r_enable_heartbeat()
1339 !test_bit(AF_CHPRST_PENDING, &a->flags) && in esas2r_enable_heartbeat()
1340 (a->nvram->options2 & SASNVR2_HEARTBEAT)) in esas2r_enable_heartbeat()
1341 set_bit(AF_HEARTBEAT_ENB, &a->flags); in esas2r_enable_heartbeat()
1343 clear_bit(AF_HEARTBEAT_ENB, &a->flags); in esas2r_enable_heartbeat()
1348 clear_bit(AF_HEARTBEAT_ENB, &a->flags); in esas2r_disable_heartbeat()
1349 clear_bit(AF_HEARTBEAT, &a->flags); in esas2r_disable_heartbeat()
1359 set_bit(AF_CHPRST_NEEDED, &a->flags); in esas2r_local_reset_adapter()
1360 set_bit(AF_CHPRST_PENDING, &a->flags); in esas2r_local_reset_adapter()
1361 set_bit(AF_DISC_PENDING, &a->flags); in esas2r_local_reset_adapter()
1369 if (a->int_mask == 0) in esas2r_adapter_interrupt_pending()
1374 if ((intstat & a->int_mask) == 0) in esas2r_adapter_interrupt_pending()
1379 a->int_stat = intstat; in esas2r_adapter_interrupt_pending()
1380 a->int_mask = 0; in esas2r_adapter_interrupt_pending()
1388 return (u16)(uintptr_t)(t - a->targetdb); in esas2r_targ_get_id()
1399 spin_lock_irqsave(&a->queue_lock, flags); in esas2r_start_ae_request()
1401 spin_unlock_irqrestore(&a->queue_lock, flags); in esas2r_start_ae_request()