Lines Matching defs:ibi

16 #include "ibi.h"
132 struct hci_pio_ibi_data ibi;
759 struct hci_pio_ibi_data *ibi = &pio->ibi;
763 p = ibi->data_ptr;
764 p += (ibi->seg_len - ibi->seg_cnt) / 4;
766 while ((nr_words = ibi->seg_cnt/4)) {
775 ibi->seg_cnt -= nr_words * 4;
776 DBG("now %d left %d", nr_words * 4, ibi->seg_cnt);
781 if (ibi->seg_cnt) {
794 DBG("trailing %d", ibi->seg_cnt);
797 while (ibi->seg_cnt--) {
808 struct hci_pio_ibi_data *ibi = &pio->ibi;
818 * ibi->slot == NULL that means the data payload has to be
824 ibi->addr = FIELD_GET(IBI_TARGET_ADDR, ibi_status);
826 dev_err(&hci->master.dev, "IBI error from %#x\n", ibi->addr);
830 ibi->last_seg = ibi_status & IBI_LAST_STATUS;
831 ibi->seg_len = FIELD_GET(IBI_DATA_LENGTH, ibi_status);
832 ibi->seg_cnt = ibi->seg_len;
834 dev = i3c_hci_addr_to_dev(hci, ibi->addr);
837 "IBI for unknown device %#x\n", ibi->addr);
843 ibi->max_len = dev_ibi->max_len;
845 if (ibi->seg_len > ibi->max_len) {
847 ibi->seg_len, ibi->max_len);
851 ibi->slot = i3c_generic_ibi_get_free_slot(dev_ibi->pool);
852 if (!ibi->slot) {
855 ibi->slot->len = 0;
856 ibi->data_ptr = ibi->slot->data;
863 struct hci_pio_ibi_data *ibi = &pio->ibi;
866 if (ibi->slot) {
867 dev_ibi = ibi->slot->dev->common.master_priv;
868 i3c_generic_ibi_recycle_slot(dev_ibi->pool, ibi->slot);
869 ibi->slot = NULL;
875 struct hci_pio_ibi_data *ibi = &pio->ibi;
877 if (!ibi->slot && !ibi->seg_cnt && ibi->last_seg)
885 if (ibi->slot) {
888 ibi->slot->len += ibi->seg_len;
889 ibi->data_ptr += ibi->seg_len;
890 if (ibi->last_seg) {
892 i3c_master_queue_ibi(ibi->slot->dev, ibi->slot);
893 ibi->slot = NULL;
897 } else if (ibi->seg_cnt) {
909 } while (--ibi->seg_cnt);
910 if (ibi->last_seg)
920 if (ibi->addr != ibi_addr) {
924 ibi->addr, ibi_addr);
927 ibi->last_seg = ibi_status & IBI_LAST_STATUS;
928 ibi->seg_len = FIELD_GET(IBI_DATA_LENGTH, ibi_status);
929 ibi->seg_cnt = ibi->seg_len;
930 if (ibi->slot && ibi->slot->len + ibi->seg_len > ibi->max_len) {
933 ibi->slot->len + ibi->seg_len, ibi->max_len);