Lines Matching refs:irq_index
75 irq_index: u16, //要install的中断号在PCI设备中的irq_vector的index field
278 if msg.irq_common_message.irq_index as usize > irq_vector.len() { in irq_install()
280 msg.irq_common_message.irq_index, in irq_install()
321 self.irq_vector_mut().unwrap()[msg.irq_common_message.irq_index as usize]; in msi_install()
344 if common_msg.irq_index == 0 { in msi_install()
470 self.irq_vector_mut().unwrap()[msg.irq_common_message.irq_index as usize]; in msix_install()
511 + msg.irq_common_message.irq_index as usize * size_of::<MsixEntry>(); in msix_install()
651 fn irq_mask(&mut self, irq_index: u16) -> Result<u8, PciError> { in irq_mask()
655 return self.msix_mask(irq_index); in irq_mask()
658 return self.msi_mask(irq_index); in irq_mask()
673 fn msi_mask(&mut self, irq_index: u16) -> Result<u8, PciError> { in msi_mask()
682 if irq_index >= irq_max_num { in msi_mask()
684 irq_index, in msi_mask()
694 mask |= 1 << irq_index; in msi_mask()
706 mask |= 1 << irq_index; in msi_mask()
731 fn msix_mask(&mut self, irq_index: u16) -> Result<u8, PciError> { in msix_mask()
740 if irq_index >= irq_max_num { in msix_mask()
742 irq_index, in msix_mask()
752 + irq_index as usize * size_of::<MsixEntry>(); in msix_mask()
772 fn irq_unmask(&mut self, irq_index: u16) -> Result<u8, PciError> { in irq_unmask()
776 return self.msix_unmask(irq_index); in irq_unmask()
779 return self.msi_unmask(irq_index); in irq_unmask()
794 fn msi_unmask(&mut self, irq_index: u16) -> Result<u8, PciError> { in msi_unmask()
803 if irq_index >= irq_max_num { in msi_unmask()
805 irq_index, in msi_unmask()
815 mask &= !(1 << irq_index); in msi_unmask()
827 mask &= !(1 << irq_index); in msi_unmask()
851 fn msix_unmask(&mut self, irq_index: u16) -> Result<u8, PciError> { in msix_unmask()
860 if irq_index >= irq_max_num { in msix_unmask()
862 irq_index, in msix_unmask()
872 + irq_index as usize * size_of::<MsixEntry>(); in msix_unmask()
893 fn irq_check_pending(&mut self, irq_index: u16) -> Result<bool, PciError> { in irq_check_pending()
897 return self.msix_check_pending(irq_index); in irq_check_pending()
900 return self.msi_check_pending(irq_index); in irq_check_pending()
916 fn msi_check_pending(&mut self, irq_index: u16) -> Result<bool, PciError> { in msi_check_pending()
925 if irq_index >= irq_max_num { in msi_check_pending()
927 irq_index, in msi_check_pending()
937 pend &= 1 << irq_index; in msi_check_pending()
945 pend &= 1 << irq_index; in msi_check_pending()
965 fn msix_check_pending(&mut self, irq_index: u16) -> Result<bool, PciError> { in msix_check_pending()
974 if irq_index >= irq_max_num { in msix_check_pending()
976 irq_index, in msix_check_pending()
986 + (irq_index as usize / 64) * size_of::<PendingEntry>(); in msix_check_pending()
989 return Ok(pending_entry & (1 << (irq_index as u64 % 64)) != 0); in msix_check_pending()