Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ad5204d68a3b48b92907d88d1c28d33fde6ba2a
Commit:     9ad5204d68a3b48b92907d88d1c28d33fde6ba2a
Parent:     fd622b1b4ef976fab4d2ac1cd5c8f4aece805765
Author:     Salyzyn, Mark <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 11:15:08 2007 -0400
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 11:17:41 2007 -0500

    [SCSI] aacraid: incorrect dma mapping mask during blinkled recover or user 
initiated reset
    
    Incorrect dma mask was used for blinkled (firmware assert) recovery or
    user initiated reset during initialization portion. Ensure that all
    callers of aac_fib_map_free null out the fib allocation references to
    prevent multiple free. Although serious sounding, no reports of these
    problems have surfaced...
    
    Signed-off-by: Mark Salyzyn <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/aacraid/commsup.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index d510839..bb87090 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -80,7 +80,11 @@ static int fib_map_alloc(struct aac_dev *dev)
 
 void aac_fib_map_free(struct aac_dev *dev)
 {
-       pci_free_consistent(dev->pdev, dev->max_fib_size * 
(dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), dev->hw_fib_va, 
dev->hw_fib_pa);
+       pci_free_consistent(dev->pdev,
+         dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB),
+         dev->hw_fib_va, dev->hw_fib_pa);
+       dev->hw_fib_va = NULL;
+       dev->hw_fib_pa = 0;
 }
 
 /**
@@ -1087,8 +1091,6 @@ static int _aac_reset_adapter(struct aac_dev *aac, int 
forced)
         * case.
         */
        aac_fib_map_free(aac);
-       aac->hw_fib_va = NULL;
-       aac->hw_fib_pa = 0;
        pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, 
aac->comm_phys);
        aac->comm_addr = NULL;
        aac->comm_phys = 0;
@@ -1098,12 +1100,12 @@ static int _aac_reset_adapter(struct aac_dev *aac, int 
forced)
        kfree(aac->fsa_dev);
        aac->fsa_dev = NULL;
        if (aac_get_driver_ident(index)->quirks & AAC_QUIRK_31BIT) {
-               if (((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) ||
-                 ((retval = pci_set_consistent_dma_mask(aac->pdev, 
DMA_32BIT_MASK))))
+               if (((retval = pci_set_dma_mask(aac->pdev, DMA_31BIT_MASK))) ||
+                 ((retval = pci_set_consistent_dma_mask(aac->pdev, 
DMA_31BIT_MASK))))
                        goto out;
        } else {
-               if (((retval = pci_set_dma_mask(aac->pdev, 0x7FFFFFFFULL))) ||
-                 ((retval = pci_set_consistent_dma_mask(aac->pdev, 
0x7FFFFFFFULL))))
+               if (((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) ||
+                 ((retval = pci_set_consistent_dma_mask(aac->pdev, 
DMA_32BIT_MASK))))
                        goto out;
        }
        if ((retval = (*(aac_get_driver_ident(index)->init))(aac)))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to