diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index a81c5b99daf3..7f8429284fab 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -1060,33 +1060,8 @@ static int msi_free_vector(struct pci_dev* dev, int vector, int reassign) | |||
1060 | entry_nr * PCI_MSIX_ENTRY_SIZE + | 1060 | entry_nr * PCI_MSIX_ENTRY_SIZE + |
1061 | PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); | 1061 | PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); |
1062 | 1062 | ||
1063 | if (head == vector) { | 1063 | if (head == vector) |
1064 | /* | ||
1065 | * Detect last MSI-X vector to be released. | ||
1066 | * Release the MSI-X memory-mapped table. | ||
1067 | */ | ||
1068 | #if 0 | ||
1069 | int pos, nr_entries; | ||
1070 | unsigned long phys_addr; | ||
1071 | u32 table_offset; | ||
1072 | u16 control; | ||
1073 | u8 bir; | ||
1074 | |||
1075 | pos = pci_find_capability(dev, PCI_CAP_ID_MSIX); | ||
1076 | pci_read_config_word(dev, msi_control_reg(pos), | ||
1077 | &control); | ||
1078 | nr_entries = multi_msix_capable(control); | ||
1079 | pci_read_config_dword(dev, msix_table_offset_reg(pos), | ||
1080 | &table_offset); | ||
1081 | bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); | ||
1082 | table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; | ||
1083 | phys_addr = pci_resource_start(dev, bir) + table_offset; | ||
1084 | /* | ||
1085 | * FIXME! and what did you want to do with phys_addr? | ||
1086 | */ | ||
1087 | #endif | ||
1088 | iounmap(base); | 1064 | iounmap(base); |
1089 | } | ||
1090 | } | 1065 | } |
1091 | 1066 | ||
1092 | return 0; | 1067 | return 0; |
@@ -1360,24 +1335,6 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev) | |||
1360 | } | 1335 | } |
1361 | msi_free_vector(dev, vector, 0); | 1336 | msi_free_vector(dev, vector, 0); |
1362 | if (warning) { | 1337 | if (warning) { |
1363 | /* Force to release the MSI-X memory-mapped table */ | ||
1364 | #if 0 | ||
1365 | unsigned long phys_addr; | ||
1366 | u32 table_offset; | ||
1367 | u16 control; | ||
1368 | u8 bir; | ||
1369 | |||
1370 | pci_read_config_word(dev, msi_control_reg(pos), | ||
1371 | &control); | ||
1372 | pci_read_config_dword(dev, msix_table_offset_reg(pos), | ||
1373 | &table_offset); | ||
1374 | bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); | ||
1375 | table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; | ||
1376 | phys_addr = pci_resource_start(dev, bir) + table_offset; | ||
1377 | /* | ||
1378 | * FIXME! and what did you want to do with phys_addr? | ||
1379 | */ | ||
1380 | #endif | ||
1381 | iounmap(base); | 1338 | iounmap(base); |
1382 | printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() " | 1339 | printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() " |
1383 | "called without free_irq() on all MSI-X vectors\n", | 1340 | "called without free_irq() on all MSI-X vectors\n", |