} 
} 
static void DAC960_DestroyAuxiliaryStructures(DAC960_Controller_T *Controller){  int i;  struct pci_pool *ScatterGatherPool = Controller->ScatterGatherPool;  struct pci_pool *RequestSensePool = NULL;  void *ScatterGatherCPU;  dma_addr_t ScatterGatherDMA;  void *RequestSenseCPU;  dma_addr_t RequestSenseDMA;  DAC960_Command_T *CommandGroup = NULL;    if (Controller->FirmwareType == DAC960_V2_Controller)        RequestSensePool = Controller->V2.RequestSensePool;  Controller->FreeCommands = NULL;  for (i = 0; i < Controller->DriverQueueDepth; i++)    {      DAC960_Command_T *Command = Controller->Commands[i];      if (Command == NULL)	  continue;      if (Controller->FirmwareType == DAC960_V1_Controller) {	  ScatterGatherCPU = (void *)Command->V1.ScatterGatherList;	  ScatterGatherDMA = Command->V1.ScatterGatherListDMA;	  RequestSenseCPU = NULL;	  RequestSenseDMA = (dma_addr_t)0;      } else {          ScatterGatherCPU = (void *)Command->V2.ScatterGatherList;	  ScatterGatherDMA = Command->V2.ScatterGatherListDMA;	  RequestSenseCPU = (void *)Command->V2.RequestSense;	  RequestSenseDMA = Command->V2.RequestSenseDMA;      }      if (ScatterGatherCPU != NULL)          pci_pool_free(ScatterGatherPool, ScatterGatherCPU, ScatterGatherDMA);      if (RequestSenseCPU != NULL)          pci_pool_free(RequestSensePool, RequestSenseCPU, RequestSenseDMA);      if ((Command->CommandIdentifier	   % Controller->CommandAllocationGroupSize) == 1) {	   /*	    * We can't free the group of commands until all of the	    * request sense and scatter gather dma structures are free.            * Remember the beginning of the group, but don't free it	    * until we've reached the beginning of the next group.	    */	   if (CommandGroup != NULL)		kfree(CommandGroup);	    CommandGroup = Command;      }      Controller->Commands[i] = NULL;    }  if (CommandGroup != NULL)      kfree(CommandGroup);  if (Controller->CombinedStatusBuffer != NULL)    {      kfree(Controller->CombinedStatusBuffer);      Controller->CombinedStatusBuffer = NULL;      Controller->CurrentStatusBuffer = NULL;    }  if (ScatterGatherPool != NULL)  	pci_pool_destroy(ScatterGatherPool);  if (Controller->FirmwareType == DAC960_V1_Controller) return;  if (RequestSensePool != NULL)	pci_pool_destroy(RequestSensePool);  for (i = 0; i < DAC960_MaxLogicalDrives; i++)    if (Controller->V2.LogicalDeviceInformation[i] != NULL)      {	kfree(Controller->V2.LogicalDeviceInformation[i]);	Controller->V2.LogicalDeviceInformation[i] = NULL;      }  for (i = 0; i < DAC960_V2_MaxPhysicalDevices; i++)    {      if (Controller->V2.PhysicalDeviceInformation[i] != NULL)	{	  kfree(Controller->V2.PhysicalDeviceInformation[i]);	  Controller->V2.PhysicalDeviceInformation[i] = NULL;	}      if (Controller->V2.InquiryUnitSerialNumber[i] != NULL)	{	  kfree(Controller->V2.InquiryUnitSerialNumber[i]);	  Controller->V2.InquiryUnitSerialNumber[i] = NULL;	}    }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6044ec8882c726e325017bd948aa0cd94ad33abc/DAC960.c/clean/drivers/block/DAC960.c