Lines Matching refs:smid

639 _base_display_reply_info(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,  in _base_display_reply_info()  argument
651 mpt2sas_base_get_msg_frame(ioc, smid)); in _base_display_reply_info()
669 mpt2sas_base_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, in mpt2sas_base_done() argument
705 u16 smid; in _base_async_event() local
717 smid = mpt2sas_base_get_smid(ioc, ioc->base_cb_idx); in _base_async_event()
718 if (!smid) { in _base_async_event()
724 ack_request = mpt2sas_base_get_msg_frame(ioc, smid); in _base_async_event()
731 mpt2sas_base_put_smid_default(ioc, smid); in _base_async_event()
752 _base_get_cb_idx(struct MPT2SAS_ADAPTER *ioc, u16 smid) in _base_get_cb_idx() argument
757 if (smid < ioc->hi_priority_smid) { in _base_get_cb_idx()
758 i = smid - 1; in _base_get_cb_idx()
760 } else if (smid < ioc->internal_smid) { in _base_get_cb_idx()
761 i = smid - ioc->hi_priority_smid; in _base_get_cb_idx()
763 } else if (smid <= ioc->hba_queue_depth) { in _base_get_cb_idx()
764 i = smid - ioc->internal_smid; in _base_get_cb_idx()
832 u16 smid; in _base_interrupt() local
857 smid = le16_to_cpu(rpf->Default.DescriptorTypeDependent1); in _base_interrupt()
872 if (smid) in _base_interrupt()
873 cb_idx = _base_get_cb_idx(ioc, smid); in _base_interrupt()
874 if (smid && cb_idx != 0xFF) { in _base_interrupt()
875 rc = mpt_callbacks[cb_idx](ioc, smid, msix_index, in _base_interrupt()
878 _base_display_reply_info(ioc, smid, msix_index, in _base_interrupt()
881 mpt2sas_base_free_smid(ioc, smid); in _base_interrupt()
883 if (!smid) in _base_interrupt()
1341 mpt2sas_base_get_msg_frame(struct MPT2SAS_ADAPTER *ioc, u16 smid) in mpt2sas_base_get_msg_frame() argument
1343 return (void *)(ioc->request + (smid * ioc->request_sz)); in mpt2sas_base_get_msg_frame()
1354 mpt2sas_base_get_sense_buffer(struct MPT2SAS_ADAPTER *ioc, u16 smid) in mpt2sas_base_get_sense_buffer() argument
1356 return (void *)(ioc->sense + ((smid - 1) * SCSI_SENSE_BUFFERSIZE)); in mpt2sas_base_get_sense_buffer()
1367 mpt2sas_base_get_sense_buffer_dma(struct MPT2SAS_ADAPTER *ioc, u16 smid) in mpt2sas_base_get_sense_buffer_dma() argument
1370 ((smid - 1) * SCSI_SENSE_BUFFERSIZE)); in mpt2sas_base_get_sense_buffer_dma()
1400 u16 smid; in mpt2sas_base_get_smid() local
1413 smid = request->smid; in mpt2sas_base_get_smid()
1416 return smid; in mpt2sas_base_get_smid()
1433 u16 smid; in mpt2sas_base_get_smid_scsiio() local
1447 smid = request->smid; in mpt2sas_base_get_smid_scsiio()
1450 return smid; in mpt2sas_base_get_smid_scsiio()
1465 u16 smid; in mpt2sas_base_get_smid_hpr() local
1476 smid = request->smid; in mpt2sas_base_get_smid_hpr()
1479 return smid; in mpt2sas_base_get_smid_hpr()
1491 mpt2sas_base_free_smid(struct MPT2SAS_ADAPTER *ioc, u16 smid) in mpt2sas_base_free_smid() argument
1498 if (smid < ioc->hi_priority_smid) { in mpt2sas_base_free_smid()
1500 i = smid - 1; in mpt2sas_base_free_smid()
1525 } else if (smid < ioc->internal_smid) { in mpt2sas_base_free_smid()
1527 i = smid - ioc->hi_priority_smid; in mpt2sas_base_free_smid()
1531 } else if (smid <= ioc->hba_queue_depth) { in mpt2sas_base_free_smid()
1533 i = smid - ioc->internal_smid; in mpt2sas_base_free_smid()
1581 mpt2sas_base_put_smid_scsi_io(struct MPT2SAS_ADAPTER *ioc, u16 smid, u16 handle) in mpt2sas_base_put_smid_scsi_io() argument
1589 descriptor.SCSIIO.SMID = cpu_to_le16(smid); in mpt2sas_base_put_smid_scsi_io()
1605 mpt2sas_base_put_smid_hi_priority(struct MPT2SAS_ADAPTER *ioc, u16 smid) in mpt2sas_base_put_smid_hi_priority() argument
1613 descriptor.HighPriority.SMID = cpu_to_le16(smid); in mpt2sas_base_put_smid_hi_priority()
1628 mpt2sas_base_put_smid_default(struct MPT2SAS_ADAPTER *ioc, u16 smid) in mpt2sas_base_put_smid_default() argument
1635 descriptor.Default.SMID = cpu_to_le16(smid); in mpt2sas_base_put_smid_default()
1651 mpt2sas_base_put_smid_target_assist(struct MPT2SAS_ADAPTER *ioc, u16 smid, in mpt2sas_base_put_smid_target_assist() argument
1660 descriptor.SCSITarget.SMID = cpu_to_le16(smid); in mpt2sas_base_put_smid_target_assist()
2891 u16 smid; in mpt2sas_base_sas_iounit_control() local
2928 smid = mpt2sas_base_get_smid(ioc, ioc->base_cb_idx); in mpt2sas_base_sas_iounit_control()
2929 if (!smid) { in mpt2sas_base_sas_iounit_control()
2938 request = mpt2sas_base_get_msg_frame(ioc, smid); in mpt2sas_base_sas_iounit_control()
2939 ioc->base_cmds.smid = smid; in mpt2sas_base_sas_iounit_control()
2944 mpt2sas_base_put_smid_default(ioc, smid); in mpt2sas_base_sas_iounit_control()
2996 u16 smid; in mpt2sas_base_scsi_enclosure_processor() local
3033 smid = mpt2sas_base_get_smid(ioc, ioc->base_cb_idx); in mpt2sas_base_scsi_enclosure_processor()
3034 if (!smid) { in mpt2sas_base_scsi_enclosure_processor()
3043 request = mpt2sas_base_get_msg_frame(ioc, smid); in mpt2sas_base_scsi_enclosure_processor()
3044 ioc->base_cmds.smid = smid; in mpt2sas_base_scsi_enclosure_processor()
3046 mpt2sas_base_put_smid_default(ioc, smid); in mpt2sas_base_scsi_enclosure_processor()
3308 u16 smid; in _base_send_port_enable() local
3318 smid = mpt2sas_base_get_smid(ioc, ioc->base_cb_idx); in _base_send_port_enable()
3319 if (!smid) { in _base_send_port_enable()
3326 mpi_request = mpt2sas_base_get_msg_frame(ioc, smid); in _base_send_port_enable()
3327 ioc->base_cmds.smid = smid; in _base_send_port_enable()
3333 mpt2sas_base_put_smid_default(ioc, smid); in _base_send_port_enable()
3404 u16 smid; in _base_event_notification() local
3417 smid = mpt2sas_base_get_smid(ioc, ioc->base_cb_idx); in _base_event_notification()
3418 if (!smid) { in _base_event_notification()
3424 mpi_request = mpt2sas_base_get_msg_frame(ioc, smid); in _base_event_notification()
3425 ioc->base_cmds.smid = smid; in _base_event_notification()
3433 mpt2sas_base_put_smid_default(ioc, smid); in _base_event_notification()
3681 u16 smid; in _base_make_ioc_operational() local
3703 smid = 1; in _base_make_ioc_operational()
3704 for (i = 0; i < ioc->scsiio_depth; i++, smid++) { in _base_make_ioc_operational()
3707 ioc->scsi_lookup[i].smid = smid; in _base_make_ioc_operational()
3715 smid = ioc->hi_priority_smid; in _base_make_ioc_operational()
3716 for (i = 0; i < ioc->hi_priority_depth; i++, smid++) { in _base_make_ioc_operational()
3718 ioc->hpr_lookup[i].smid = smid; in _base_make_ioc_operational()
3725 smid = ioc->internal_smid; in _base_make_ioc_operational()
3726 for (i = 0; i < ioc->internal_depth; i++, smid++) { in _base_make_ioc_operational()
3728 ioc->internal_lookup[i].smid = smid; in _base_make_ioc_operational()
4029 mpt2sas_base_free_smid(ioc, ioc->transport_cmds.smid); in _base_reset_handler()
4034 mpt2sas_base_free_smid(ioc, ioc->base_cmds.smid); in _base_reset_handler()
4039 mpt2sas_base_free_smid(ioc, ioc->config_cmds.smid); in _base_reset_handler()
4040 ioc->config_cmds.smid = USHRT_MAX; in _base_reset_handler()