Commit 9251bac97d47fdaea406ea0595c2d0aa50022f12
Committed by
Jesse Barnes
1 parent
cbfddd2093
Exists in
master
and in
7 other branches
PCI: Don't use dmi_name_in_vendors in quirk
Don't use the costly dmi_name_in_vendors() when we know the string we are looking for can only be in the DMI board name field. This is more robust and, more importantly, much faster. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
drivers/pci/quirks.c
... | ... | @@ -2349,8 +2349,11 @@ |
2349 | 2349 | */ |
2350 | 2350 | static void __devinit nvenet_msi_disable(struct pci_dev *dev) |
2351 | 2351 | { |
2352 | - if (dmi_name_in_vendors("P5N32-SLI PREMIUM") || | |
2353 | - dmi_name_in_vendors("P5N32-E SLI")) { | |
2352 | + const char *board_name = dmi_get_system_info(DMI_BOARD_NAME); | |
2353 | + | |
2354 | + if (board_name && | |
2355 | + (strstr(board_name, "P5N32-SLI PREMIUM") || | |
2356 | + strstr(board_name, "P5N32-E SLI"))) { | |
2354 | 2357 | dev_info(&dev->dev, |
2355 | 2358 | "Disabling msi for MCP55 NIC on P5N32-SLI\n"); |
2356 | 2359 | dev->no_msi = 1; |