Lines Matching full:aac

3  *	Adaptec AAC series RAID controller driver
1467 static void aac_schedule_bus_scan(struct aac_dev *aac) in aac_schedule_bus_scan() argument
1469 if (aac->sa_firmware) in aac_schedule_bus_scan()
1470 aac_schedule_safw_scan_worker(aac); in aac_schedule_bus_scan()
1472 aac_schedule_src_reinit_aif_worker(aac); in aac_schedule_bus_scan()
1475 static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) in _aac_reset_adapter() argument
1479 struct Scsi_Host *host = aac->scsi_host_ptr; in _aac_reset_adapter()
1495 aac_adapter_disable_int(aac); in _aac_reset_adapter()
1496 if (aac->thread && aac->thread->pid != current->pid) { in _aac_reset_adapter()
1498 kthread_stop(aac->thread); in _aac_reset_adapter()
1499 aac->thread = NULL; in _aac_reset_adapter()
1507 bled = forced ? 0 : aac_adapter_check_health(aac); in _aac_reset_adapter()
1508 retval = aac_adapter_restart(aac, bled, reset_type); in _aac_reset_adapter()
1517 num_of_fibs = aac->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB; in _aac_reset_adapter()
1520 struct fib *fib = &aac->fibs[index]; in _aac_reset_adapter()
1541 index = aac->cardtype; in _aac_reset_adapter()
1550 aac_free_irq(aac); in _aac_reset_adapter()
1551 aac_fib_map_free(aac); in _aac_reset_adapter()
1552 dma_free_coherent(&aac->pdev->dev, aac->comm_size, aac->comm_addr, in _aac_reset_adapter()
1553 aac->comm_phys); in _aac_reset_adapter()
1554 aac_adapter_ioremap(aac, 0); in _aac_reset_adapter()
1555 aac->comm_addr = NULL; in _aac_reset_adapter()
1556 aac->comm_phys = 0; in _aac_reset_adapter()
1557 kfree(aac->queues); in _aac_reset_adapter()
1558 aac->queues = NULL; in _aac_reset_adapter()
1559 kfree(aac->fsa_dev); in _aac_reset_adapter()
1560 aac->fsa_dev = NULL; in _aac_reset_adapter()
1565 retval = dma_set_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1567 retval = dma_set_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1569 retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1573 retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1579 if ((retval = (*(aac_get_driver_ident(index)->init))(aac))) in _aac_reset_adapter()
1583 aac->thread = kthread_run(aac_command_thread, aac, "%s", in _aac_reset_adapter()
1584 aac->name); in _aac_reset_adapter()
1585 if (IS_ERR(aac->thread)) { in _aac_reset_adapter()
1586 retval = PTR_ERR(aac->thread); in _aac_reset_adapter()
1587 aac->thread = NULL; in _aac_reset_adapter()
1591 (void)aac_get_adapter_info(aac); in _aac_reset_adapter()
1600 aac_get_config_status(aac, 1); in _aac_reset_adapter()
1601 aac_get_containers(aac); in _aac_reset_adapter()
1610 aac->in_reset = 0; in _aac_reset_adapter()
1617 dev_info(&aac->pdev->dev, "Scheduling bus rescan\n"); in _aac_reset_adapter()
1618 aac_schedule_bus_scan(aac); in _aac_reset_adapter()
1627 int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) in aac_reset_adapter() argument
1631 struct Scsi_Host *host = aac->scsi_host_ptr; in aac_reset_adapter()
1634 if (spin_trylock_irqsave(&aac->fib_lock, flagv) == 0) in aac_reset_adapter()
1637 if (aac->in_reset) { in aac_reset_adapter()
1638 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_reset_adapter()
1641 aac->in_reset = 1; in aac_reset_adapter()
1642 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_reset_adapter()
1653 aac_send_shutdown(aac); in aac_reset_adapter()
1657 retval = _aac_reset_adapter(aac, bled, reset_type); in aac_reset_adapter()
1665 struct fib * fibctx = aac_fib_alloc(aac); in aac_reset_adapter()
1700 int aac_check_health(struct aac_dev * aac) in aac_check_health() argument
1706 /* Extending the scope of fib_lock slightly to protect aac->in_reset */ in aac_check_health()
1707 if (spin_trylock_irqsave(&aac->fib_lock, flagv) == 0) in aac_check_health()
1710 if (aac->in_reset || !(BlinkLED = aac_adapter_check_health(aac))) { in aac_check_health()
1711 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_check_health()
1715 aac->in_reset = 1; in aac_check_health()
1722 * aac.aifcmd.data[2] = AifHighPriority = 3 in aac_check_health()
1723 * aac.aifcmd.data[3] = BlinkLED in aac_check_health()
1727 entry = aac->fib_list.next; in aac_check_health()
1735 while (entry != &aac->fib_list) { in aac_check_health()
1760 aac_close_fib_context(aac, fibctx); in aac_check_health()
1774 fib->dev = aac; in aac_check_health()
1806 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_check_health()
1810 aac->name, BlinkLED); in aac_check_health()
1814 printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED); in aac_check_health()
1817 aac->in_reset = 0; in aac_check_health()
1821 static inline int is_safw_raid_volume(struct aac_dev *aac, int bus, int target) in is_safw_raid_volume() argument
1823 return bus == CONTAINER_CHANNEL && target < aac->maximum_num_containers; in is_safw_raid_volume()