Skip to contentSkip to conversation

resubmitting intr urb in 2.4 and 2.6 kernels

DISCUSSION Sergej Pupykin 3 participants 3 messages Jun 14, 2006 – Jun 15, 2006

lore
Share & tools
lore
#0 lore raw

Hi!

Could anybody explain the reason why intr urb auto resubmitting was removed from 2.6 kernels?

Or just tell me, it was removed because of some technical problems in it or only for better architecure?

If it was architecure cleanup, why autoresubmitting was implemented in 2.4?

Thanks.

#1 lore raw
Quoted 10 lines · Sergej Pupykin

Hi!

Could anybody explain the reason why intr urb auto resubmitting was removed from 2.6 kernels?

Or just tell me, it was removed because of some technical problems in it or only for better architecure?

If it was architecure cleanup, why autoresubmitting was implemented in 2.4?

Consistancy, now all urbs work the same way, and you don't have to remember special things depending on the type of the endpoint. Search the archives of the linux-usb-devel mailing list early in the 2.5 development series for the details if you are curious.

thanks,

greg k-h

#2 lore raw

re: [PATCH] PCI: add proper MCFG table parsing to ACPI core.

Hey Greg,

This a bit late (yours patch was posted about a year ago), but a co-worker of spotted part of the code that looks like a memory leak. Looking at the code it seems that pci_mmcfg_config should be free-ed if MMCONFIG is above 4GB.

Review

Quoted 10 lines

+/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */

(quoted diff) +8 -0
+     config_size = pci_mmcfg_config_num * sizeof(*pci_mmcfg_config);
+     pci_mmcfg_config = kmalloc(config_size, GFP_KERNEL);
+     memcpy(pci_mmcfg_config, &mcfg->config, config_size);
+     for (i = 0; i < pci_mmcfg_config_num; ++i) {
+             if (mcfg->config[i].base_reserved) {
+                     printk(KERN_ERR PREFIX
+                            "MMCONFIG not in low 4GB of memory\n");
+                     return -ENODEV;

Here is a proposed patch. What are your thoughts?

arch/i386/kernel/acpi/boot.c +2 -0
index 40e5aba..fbe9308 100644
@@ -202,6 +202,8 @@ int __init acpi_parse_mcfg(unsigned long
 		if (mcfg->config[i].base_reserved) {
 			printk(KERN_ERR PREFIX
 			       "MMCONFIG not in low 4GB of memory\n");
+			kfree(pci_mmcfg_config);
+			pci_mmcfg_config_num = 0;
 			return -ENODEV;
 		}
 	}