PERFORCE change 164939 for review
Alexander Motin
mav at FreeBSD.org
Tue Jun 23 07:01:44 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164939
Change 164939 by mav at mav_mavbook on 2009/06/23 07:01:13
Enable single vector MSI by default.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#35 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#35 (text+ko) ====
@@ -297,16 +297,17 @@
ahci_setup_interrupt(device_t dev)
{
struct ahci_controller *ctlr = device_get_softc(dev);
- int i, msi = 0;
+ int i, msi = 1;
/* Process hints. */
- if (resource_int_value(device_get_name(dev),
- device_get_unit(dev), "msi", &i) == 0) {
- if (i == 1)
- msi = min(1, pci_msi_count(dev));
- else if (i > 1)
- msi = pci_msi_count(dev);
- }
+ resource_int_value(device_get_name(dev),
+ device_get_unit(dev), "msi", &msi);
+ if (msi < 0)
+ msi = 0;
+ else if (msi == 1)
+ msi = min(1, pci_msi_count(dev));
+ else if (msi > 1)
+ msi = pci_msi_count(dev);
/* Allocate MSI if needed/present. */
if (msi && pci_alloc_msi(dev, &msi) == 0) {
ctlr->numirqs = msi;
More information about the p4-projects
mailing list