diff options
author | mav <mav@FreeBSD.org> | 2009-07-08 06:00:21 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-07-08 06:00:21 +0000 |
commit | d6e9263657a71e8fc7276631f1c7017f960e0d05 (patch) | |
tree | 65bbf1e1bfb076bd175f47749a111bd422851a89 | |
parent | 8fa709769a72b5c4b2e95bf92bb0b53836b4881a (diff) | |
download | FreeBSD-src-d6e9263657a71e8fc7276631f1c7017f960e0d05.zip FreeBSD-src-d6e9263657a71e8fc7276631f1c7017f960e0d05.tar.gz |
Fix kernel panic, when ataahci driver is used on system with increased
MAXPHYS. Current ataahci driver memory allocation scheme includes only
64 items in DMA S/G table, and so not guarantied to support transactions
with more then 252K data.
Approved by: re (kensmith)
MFC after: 2 weeks
-rw-r--r-- | sys/dev/ata/chipsets/ata-ahci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ata/chipsets/ata-ahci.c b/sys/dev/ata/chipsets/ata-ahci.c index eb490ab..79544bb 100644 --- a/sys/dev/ata/chipsets/ata-ahci.c +++ b/sys/dev/ata/chipsets/ata-ahci.c @@ -914,7 +914,7 @@ ata_ahci_dmainit(device_t dev) ata_dmainit(dev); /* note start and stop are not used here */ ch->dma.setprd = ata_ahci_dmasetprd; - ch->dma.max_iosize = 8192 * DEV_BSIZE; + ch->dma.max_iosize = (ATA_AHCI_DMA_ENTRIES - 1) * PAGE_SIZE; if (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_64BIT) ch->dma.max_address = BUS_SPACE_MAXADDR; } |