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
1074 bool esas2r_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi,
1155 spin_lock_irqsave(&a->sg_list_lock, flags); in esas2r_alloc_sgl()
1156 if (likely(!list_empty(&a->free_sg_list_head))) { in esas2r_alloc_sgl()
1157 sgl = a->free_sg_list_head.next; in esas2r_alloc_sgl()
1161 spin_unlock_irqrestore(&a->sg_list_lock, flags); in esas2r_alloc_sgl()
1172 sgc->adapter = a; in esas2r_sgc_init()
1173 sgc->first_req = rq; in esas2r_sgc_init()
1179 sgc->sge.a64.limit = (struct atto_vda_sge *)((u8 *)rq->vrq in esas2r_sgc_init()
1183 - sizeof(struct in esas2r_sgc_init()
1186 sgc->sge.a64.last = in esas2r_sgc_init()
1187 sgc->sge.a64.curr = first; in esas2r_sgc_init()
1188 rq->vrq->scsi.sg_list_offset = (u8) in esas2r_sgc_init()
1189 ((u8 *)first - in esas2r_sgc_init()
1190 (u8 *)rq->vrq); in esas2r_sgc_init()
1192 sgc->sge.a64.last = in esas2r_sgc_init()
1193 sgc->sge.a64.curr = &rq->vrq->scsi.u.sge[0]; in esas2r_sgc_init()
1194 rq->vrq->scsi.sg_list_offset = in esas2r_sgc_init()
1197 sgc->sge.a64.chain = NULL; in esas2r_sgc_init()
1203 union atto_vda_req *vrq = rq->vrq; in esas2r_rq_init_request()
1205 INIT_LIST_HEAD(&rq->sg_table_head); in esas2r_rq_init_request()
1206 rq->data_buf = (void *)(vrq + 1); in esas2r_rq_init_request()
1207 rq->interrupt_cb = NULL; in esas2r_rq_init_request()
1208 rq->comp_cb = esas2r_complete_request_cb; in esas2r_rq_init_request()
1209 rq->flags = 0; in esas2r_rq_init_request()
1210 rq->timeout = 0; in esas2r_rq_init_request()
1211 rq->req_stat = RS_PENDING; in esas2r_rq_init_request()
1212 rq->req_type = RT_INI_REQ; in esas2r_rq_init_request()
1215 rq->func_rsp.dwords[0] = 0; in esas2r_rq_init_request()
1216 rq->func_rsp.dwords[1] = 0; in esas2r_rq_init_request()
1225 rq->vda_req_sz = RQ_SIZE_DEFAULT; in esas2r_rq_init_request()
1227 /* req_table entry should be NULL at this point - if not, halt */ in esas2r_rq_init_request()
1229 if (a->req_table[LOWORD(vrq->scsi.handle)]) { in esas2r_rq_init_request()
1236 a->req_table[LOWORD(vrq->scsi.handle)] = rq; in esas2r_rq_init_request()
1242 vrq->scsi.handle = (a->cmd_ref_no++ << 16) | (u16)vrq->scsi.handle; in esas2r_rq_init_request()
1249 vrq->scsi.function = VDA_FUNC_SCSI; in esas2r_rq_init_request()
1250 vrq->scsi.sense_len = SENSE_DATA_SZ; in esas2r_rq_init_request()
1253 vrq->scsi.sg_list_offset = 0; in esas2r_rq_init_request()
1254 vrq->scsi.chain_offset = 0; in esas2r_rq_init_request()
1255 vrq->scsi.flags = 0; in esas2r_rq_init_request()
1256 vrq->scsi.reserved = 0; in esas2r_rq_init_request()
1259 vrq->scsi.ppsense_buf in esas2r_rq_init_request()
1260 = cpu_to_le64(rq->vrq_md->phys_addr + in esas2r_rq_init_request()
1269 if (list_empty(&rq->sg_table_head)) in esas2r_rq_free_sg_lists()
1272 spin_lock_irqsave(&a->sg_list_lock, flags); in esas2r_rq_free_sg_lists()
1273 list_splice_tail_init(&rq->sg_table_head, &a->free_sg_list_head); in esas2r_rq_free_sg_lists()
1274 spin_unlock_irqrestore(&a->sg_list_lock, flags); in esas2r_rq_free_sg_lists()
1282 a->req_table[LOWORD(rq->vrq->scsi.handle)] = NULL; in esas2r_rq_destroy_request()
1283 rq->data_buf = NULL; in esas2r_rq_destroy_request()
1289 return test_bit(AF_BUSRST_NEEDED, &a->flags) || in esas2r_is_tasklet_pending()
1290 test_bit(AF_BUSRST_DETECTED, &a->flags) || in esas2r_is_tasklet_pending()
1291 test_bit(AF_CHPRST_NEEDED, &a->flags) || in esas2r_is_tasklet_pending()
1292 test_bit(AF_CHPRST_DETECTED, &a->flags) || in esas2r_is_tasklet_pending()
1293 test_bit(AF_PORT_CHANGE, &a->flags); in esas2r_is_tasklet_pending()
1307 if (unlikely(le32_to_cpu(rq->vrq->scsi.length) == 0)) in esas2r_build_sg_list()
1310 return (*a->build_sgl)(a, sgc); in esas2r_build_sg_list()
1315 if (atomic_inc_return(&a->dis_ints_cnt) == 1) in esas2r_disable_chip_interrupts()
1322 if (atomic_dec_return(&a->dis_ints_cnt) == 0) in esas2r_enable_chip_interrupts()
1327 /* Schedule a TASKLET to perform non-interrupt tasks that may require delays
1333 if (!test_and_set_bit(AF_TASKLET_SCHEDULED, &a->flags)) in esas2r_schedule_tasklet()
1334 tasklet_hi_schedule(&a->tasklet); in esas2r_schedule_tasklet()
1339 if (!test_bit(AF_DEGRADED_MODE, &a->flags) && in esas2r_enable_heartbeat()
1340 !test_bit(AF_CHPRST_PENDING, &a->flags) && in esas2r_enable_heartbeat()
1341 (a->nvram->options2 & SASNVR2_HEARTBEAT)) in esas2r_enable_heartbeat()
1342 set_bit(AF_HEARTBEAT_ENB, &a->flags); in esas2r_enable_heartbeat()
1344 clear_bit(AF_HEARTBEAT_ENB, &a->flags); in esas2r_enable_heartbeat()
1349 clear_bit(AF_HEARTBEAT_ENB, &a->flags); in esas2r_disable_heartbeat()
1350 clear_bit(AF_HEARTBEAT, &a->flags); in esas2r_disable_heartbeat()
1360 set_bit(AF_CHPRST_NEEDED, &a->flags); in esas2r_local_reset_adapter()
1361 set_bit(AF_CHPRST_PENDING, &a->flags); in esas2r_local_reset_adapter()
1362 set_bit(AF_DISC_PENDING, &a->flags); in esas2r_local_reset_adapter()
1370 if (a->int_mask == 0) in esas2r_adapter_interrupt_pending()
1375 if ((intstat & a->int_mask) == 0) in esas2r_adapter_interrupt_pending()
1380 a->int_stat = intstat; in esas2r_adapter_interrupt_pending()
1381 a->int_mask = 0; in esas2r_adapter_interrupt_pending()
1389 return (u16)(uintptr_t)(t - a->targetdb); in esas2r_targ_get_id()
1400 spin_lock_irqsave(&a->queue_lock, flags); in esas2r_start_ae_request()
1402 spin_unlock_irqrestore(&a->queue_lock, flags); in esas2r_start_ae_request()