Lines Matching full:aac
3 * Adaptec AAC series RAID controller driver
1468 static void aac_schedule_bus_scan(struct aac_dev *aac) in aac_schedule_bus_scan() argument
1470 if (aac->sa_firmware) in aac_schedule_bus_scan()
1471 aac_schedule_safw_scan_worker(aac); in aac_schedule_bus_scan()
1473 aac_schedule_src_reinit_aif_worker(aac); in aac_schedule_bus_scan()
1476 static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) in _aac_reset_adapter() argument
1480 struct Scsi_Host *host = aac->scsi_host_ptr; in _aac_reset_adapter()
1496 aac_adapter_disable_int(aac); in _aac_reset_adapter()
1497 if (aac->thread && aac->thread->pid != current->pid) { in _aac_reset_adapter()
1499 kthread_stop(aac->thread); in _aac_reset_adapter()
1500 aac->thread = NULL; in _aac_reset_adapter()
1508 bled = forced ? 0 : aac_adapter_check_health(aac); in _aac_reset_adapter()
1509 retval = aac_adapter_restart(aac, bled, reset_type); in _aac_reset_adapter()
1518 num_of_fibs = aac->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB; in _aac_reset_adapter()
1521 struct fib *fib = &aac->fibs[index]; in _aac_reset_adapter()
1542 index = aac->cardtype; in _aac_reset_adapter()
1551 aac_free_irq(aac); in _aac_reset_adapter()
1552 aac_fib_map_free(aac); in _aac_reset_adapter()
1553 dma_free_coherent(&aac->pdev->dev, aac->comm_size, aac->comm_addr, in _aac_reset_adapter()
1554 aac->comm_phys); in _aac_reset_adapter()
1555 aac_adapter_ioremap(aac, 0); in _aac_reset_adapter()
1556 aac->comm_addr = NULL; in _aac_reset_adapter()
1557 aac->comm_phys = 0; in _aac_reset_adapter()
1558 kfree(aac->queues); in _aac_reset_adapter()
1559 aac->queues = NULL; in _aac_reset_adapter()
1560 kfree(aac->fsa_dev); in _aac_reset_adapter()
1561 aac->fsa_dev = NULL; in _aac_reset_adapter()
1566 retval = dma_set_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1568 retval = dma_set_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1570 retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1574 retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask); in _aac_reset_adapter()
1580 if ((retval = (*(aac_get_driver_ident(index)->init))(aac))) in _aac_reset_adapter()
1584 aac->thread = kthread_run(aac_command_thread, aac, "%s", in _aac_reset_adapter()
1585 aac->name); in _aac_reset_adapter()
1586 if (IS_ERR(aac->thread)) { in _aac_reset_adapter()
1587 retval = PTR_ERR(aac->thread); in _aac_reset_adapter()
1588 aac->thread = NULL; in _aac_reset_adapter()
1592 (void)aac_get_adapter_info(aac); in _aac_reset_adapter()
1601 aac_get_config_status(aac, 1); in _aac_reset_adapter()
1602 aac_get_containers(aac); in _aac_reset_adapter()
1611 aac->in_reset = 0; in _aac_reset_adapter()
1618 dev_info(&aac->pdev->dev, "Scheduling bus rescan\n"); in _aac_reset_adapter()
1619 aac_schedule_bus_scan(aac); in _aac_reset_adapter()
1628 int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) in aac_reset_adapter() argument
1632 struct Scsi_Host *host = aac->scsi_host_ptr; in aac_reset_adapter()
1635 if (spin_trylock_irqsave(&aac->fib_lock, flagv) == 0) in aac_reset_adapter()
1638 if (aac->in_reset) { in aac_reset_adapter()
1639 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_reset_adapter()
1642 aac->in_reset = 1; in aac_reset_adapter()
1643 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_reset_adapter()
1654 aac_send_shutdown(aac); in aac_reset_adapter()
1658 retval = _aac_reset_adapter(aac, bled, reset_type); in aac_reset_adapter()
1666 struct fib * fibctx = aac_fib_alloc(aac); in aac_reset_adapter()
1701 int aac_check_health(struct aac_dev * aac) in aac_check_health() argument
1707 /* Extending the scope of fib_lock slightly to protect aac->in_reset */ in aac_check_health()
1708 if (spin_trylock_irqsave(&aac->fib_lock, flagv) == 0) in aac_check_health()
1711 if (aac->in_reset || !(BlinkLED = aac_adapter_check_health(aac))) { in aac_check_health()
1712 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_check_health()
1716 aac->in_reset = 1; in aac_check_health()
1723 * aac.aifcmd.data[2] = AifHighPriority = 3 in aac_check_health()
1724 * aac.aifcmd.data[3] = BlinkLED in aac_check_health()
1728 entry = aac->fib_list.next; in aac_check_health()
1736 while (entry != &aac->fib_list) { in aac_check_health()
1761 aac_close_fib_context(aac, fibctx); in aac_check_health()
1775 fib->dev = aac; in aac_check_health()
1807 spin_unlock_irqrestore(&aac->fib_lock, flagv); in aac_check_health()
1811 aac->name, BlinkLED); in aac_check_health()
1815 printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED); in aac_check_health()
1818 aac->in_reset = 0; in aac_check_health()
1822 static inline int is_safw_raid_volume(struct aac_dev *aac, int bus, int target) in is_safw_raid_volume() argument
1824 return bus == CONTAINER_CHANNEL && target < aac->maximum_num_containers; in is_safw_raid_volume()