mirror of
https://github.com/acpica/acpica/
synced 2025-01-15 22:09:17 +03:00
Allow zero interrupts/dma
date 2002.07.25.20.30.00; author rmoore1; state Exp;
This commit is contained in:
parent
5c6162d383
commit
a9a9a11c12
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: rsio - IO and DMA resource descriptors
|
||||
* $Revision: 1.21 $
|
||||
* $Revision: 1.22 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -491,7 +491,7 @@ AcpiRsDmaResource (
|
||||
Buffer += 1;
|
||||
Temp8 = *Buffer;
|
||||
|
||||
/* Decode the IRQ bits */
|
||||
/* Decode the DMA channel bits */
|
||||
|
||||
for (i = 0, Index = 0; Index < 8; Index++)
|
||||
{
|
||||
@ -501,20 +501,17 @@ AcpiRsDmaResource (
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
/* Zero channels is invalid! */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Found Zero DMA channels in resource list\n"));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
/* Zero DMA channels is valid */
|
||||
|
||||
OutputStruct->Data.Dma.NumberOfChannels = i;
|
||||
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
/*
|
||||
* Calculate the structure size based upon the number of interrupts
|
||||
*/
|
||||
StructSize += ((ACPI_SIZE) OutputStruct->Data.Dma.NumberOfChannels - 1) * 4;
|
||||
StructSize += ((ACPI_SIZE) i - 1) * 4;
|
||||
}
|
||||
|
||||
/*
|
||||
* Point to Byte 2
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: rsirq - IRQ resource descriptors
|
||||
* $Revision: 1.29 $
|
||||
* $Revision: 1.30 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -190,19 +190,16 @@ AcpiRsIrqResource (
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
/* Zero interrupts is invalid! */
|
||||
/* Zero interrupts is valid */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Found Zero interrupt levels in resource list\n"));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
OutputStruct->Data.Irq.NumberOfInterrupts = i;
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
/*
|
||||
* Calculate the structure size based upon the number of interrupts
|
||||
*/
|
||||
StructSize += ((ACPI_SIZE) OutputStruct->Data.Irq.NumberOfInterrupts - 1) * 4;
|
||||
StructSize += ((ACPI_SIZE) i - 1) * 4;
|
||||
}
|
||||
|
||||
/*
|
||||
* Point to Byte 3 if it is used
|
||||
|
Loading…
Reference in New Issue
Block a user