diff options
author | Salyzyn, Mark <mark_salyzyn@adaptec.com> | 2007-07-17 11:15:08 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-18 12:17:41 -0400 |
commit | 9ad5204d68a3b48b92907d88d1c28d33fde6ba2a (patch) | |
tree | 8de411c26fa4f10e3f7593eafca8a7df986dd002 /drivers | |
parent | fd622b1b4ef976fab4d2ac1cd5c8f4aece805765 (diff) |
[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 <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 d510839c0bb2..bb870906b4cf 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) | |||
80 | 80 | ||
81 | void aac_fib_map_free(struct aac_dev *dev) | 81 | void aac_fib_map_free(struct aac_dev *dev) |
82 | { | 82 | { |
83 | 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); | 83 | pci_free_consistent(dev->pdev, |
84 | dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), | ||
85 | dev->hw_fib_va, dev->hw_fib_pa); | ||
86 | dev->hw_fib_va = NULL; | ||
87 | dev->hw_fib_pa = 0; | ||
84 | } | 88 | } |
85 | 89 | ||
86 | /** | 90 | /** |
@@ -1087,8 +1091,6 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced) | |||
1087 | * case. | 1091 | * case. |
1088 | */ | 1092 | */ |
1089 | aac_fib_map_free(aac); | 1093 | aac_fib_map_free(aac); |
1090 | aac->hw_fib_va = NULL; | ||
1091 | aac->hw_fib_pa = 0; | ||
1092 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); | 1094 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); |
1093 | aac->comm_addr = NULL; | 1095 | aac->comm_addr = NULL; |
1094 | aac->comm_phys = 0; | 1096 | aac->comm_phys = 0; |
@@ -1098,12 +1100,12 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced) | |||
1098 | kfree(aac->fsa_dev); | 1100 | kfree(aac->fsa_dev); |
1099 | aac->fsa_dev = NULL; | 1101 | aac->fsa_dev = NULL; |
1100 | if (aac_get_driver_ident(index)->quirks & AAC_QUIRK_31BIT) { | 1102 | if (aac_get_driver_ident(index)->quirks & AAC_QUIRK_31BIT) { |
1101 | if (((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) || | 1103 | if (((retval = pci_set_dma_mask(aac->pdev, DMA_31BIT_MASK))) || |
1102 | ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_32BIT_MASK)))) | 1104 | ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_31BIT_MASK)))) |
1103 | goto out; | 1105 | goto out; |
1104 | } else { | 1106 | } else { |
1105 | if (((retval = pci_set_dma_mask(aac->pdev, 0x7FFFFFFFULL))) || | 1107 | if (((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) || |
1106 | ((retval = pci_set_consistent_dma_mask(aac->pdev, 0x7FFFFFFFULL)))) | 1108 | ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_32BIT_MASK)))) |
1107 | goto out; | 1109 | goto out; |
1108 | } | 1110 | } |
1109 | if ((retval = (*(aac_get_driver_ident(index)->init))(aac))) | 1111 | if ((retval = (*(aac_get_driver_ident(index)->init))(aac))) |