ace 224 drivers/block/xsysace.c u16(*in) (struct ace_device * ace, int reg); ace 225 drivers/block/xsysace.c void (*out) (struct ace_device * ace, int reg, u16 val); ace 226 drivers/block/xsysace.c void (*datain) (struct ace_device * ace); ace 227 drivers/block/xsysace.c void (*dataout) (struct ace_device * ace); ace 231 drivers/block/xsysace.c static u16 ace_in_8(struct ace_device *ace, int reg) ace 233 drivers/block/xsysace.c void __iomem *r = ace->baseaddr + reg; ace 237 drivers/block/xsysace.c static void ace_out_8(struct ace_device *ace, int reg, u16 val) ace 239 drivers/block/xsysace.c void __iomem *r = ace->baseaddr + reg; ace 244 drivers/block/xsysace.c static void ace_datain_8(struct ace_device *ace) ace 246 drivers/block/xsysace.c void __iomem *r = ace->baseaddr + 0x40; ace 247 drivers/block/xsysace.c u8 *dst = ace->data_ptr; ace 251 drivers/block/xsysace.c ace->data_ptr = dst; ace 254 drivers/block/xsysace.c static void ace_dataout_8(struct ace_device *ace) ace 256 drivers/block/xsysace.c void __iomem *r = ace->baseaddr + 0x40; ace 257 drivers/block/xsysace.c u8 *src = ace->data_ptr; ace 261 drivers/block/xsysace.c ace->data_ptr = src; ace 272 drivers/block/xsysace.c static u16 ace_in_be16(struct ace_device *ace, int reg) ace 274 drivers/block/xsysace.c return in_be16(ace->baseaddr + reg); ace 277 drivers/block/xsysace.c static void ace_out_be16(struct ace_device *ace, int reg, u16 val) ace 279 drivers/block/xsysace.c out_be16(ace->baseaddr + reg, val); ace 282 drivers/block/xsysace.c static void ace_datain_be16(struct ace_device *ace) ace 285 drivers/block/xsysace.c u16 *dst = ace->data_ptr; ace 287 drivers/block/xsysace.c *dst++ = in_le16(ace->baseaddr + 0x40); ace 288 drivers/block/xsysace.c ace->data_ptr = dst; ace 291 drivers/block/xsysace.c static void ace_dataout_be16(struct ace_device *ace) ace 294 drivers/block/xsysace.c u16 *src = ace->data_ptr; ace 296 drivers/block/xsysace.c out_le16(ace->baseaddr + 0x40, *src++); ace 297 drivers/block/xsysace.c ace->data_ptr = src; ace 301 drivers/block/xsysace.c static u16 ace_in_le16(struct ace_device *ace, int reg) ace 303 drivers/block/xsysace.c return in_le16(ace->baseaddr + reg); ace 306 drivers/block/xsysace.c static void ace_out_le16(struct ace_device *ace, int reg, u16 val) ace 308 drivers/block/xsysace.c out_le16(ace->baseaddr + reg, val); ace 311 drivers/block/xsysace.c static void ace_datain_le16(struct ace_device *ace) ace 314 drivers/block/xsysace.c u16 *dst = ace->data_ptr; ace 316 drivers/block/xsysace.c *dst++ = in_be16(ace->baseaddr + 0x40); ace 317 drivers/block/xsysace.c ace->data_ptr = dst; ace 320 drivers/block/xsysace.c static void ace_dataout_le16(struct ace_device *ace) ace 323 drivers/block/xsysace.c u16 *src = ace->data_ptr; ace 325 drivers/block/xsysace.c out_be16(ace->baseaddr + 0x40, *src++); ace 326 drivers/block/xsysace.c ace->data_ptr = src; ace 343 drivers/block/xsysace.c static inline u16 ace_in(struct ace_device *ace, int reg) ace 345 drivers/block/xsysace.c return ace->reg_ops->in(ace, reg); ace 348 drivers/block/xsysace.c static inline u32 ace_in32(struct ace_device *ace, int reg) ace 350 drivers/block/xsysace.c return ace_in(ace, reg) | (ace_in(ace, reg + 2) << 16); ace 353 drivers/block/xsysace.c static inline void ace_out(struct ace_device *ace, int reg, u16 val) ace 355 drivers/block/xsysace.c ace->reg_ops->out(ace, reg, val); ace 358 drivers/block/xsysace.c static inline void ace_out32(struct ace_device *ace, int reg, u32 val) ace 360 drivers/block/xsysace.c ace_out(ace, reg, val); ace 361 drivers/block/xsysace.c ace_out(ace, reg + 2, val >> 16); ace 393 drivers/block/xsysace.c static void ace_dump_regs(struct ace_device *ace) ace 395 drivers/block/xsysace.c dev_info(ace->dev, ace 399 drivers/block/xsysace.c ace_in32(ace, ACE_CTRL), ace 400 drivers/block/xsysace.c ace_in(ace, ACE_SECCNTCMD), ace 401 drivers/block/xsysace.c ace_in(ace, ACE_VERSION), ace 402 drivers/block/xsysace.c ace_in32(ace, ACE_STATUS), ace 403 drivers/block/xsysace.c ace_in32(ace, ACE_MPULBA), ace 404 drivers/block/xsysace.c ace_in(ace, ACE_BUSMODE), ace 405 drivers/block/xsysace.c ace_in32(ace, ACE_ERROR), ace 406 drivers/block/xsysace.c ace_in32(ace, ACE_CFGLBA), ace_in(ace, ACE_FATSTAT)); ace 446 drivers/block/xsysace.c static inline void ace_fsm_yield(struct ace_device *ace) ace 448 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_fsm_yield()\n"); ace 449 drivers/block/xsysace.c tasklet_schedule(&ace->fsm_tasklet); ace 450 drivers/block/xsysace.c ace->fsm_continue_flag = 0; ace 454 drivers/block/xsysace.c static inline void ace_fsm_yieldirq(struct ace_device *ace) ace 456 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_fsm_yieldirq()\n"); ace 458 drivers/block/xsysace.c if (!ace->irq) ace 460 drivers/block/xsysace.c tasklet_schedule(&ace->fsm_tasklet); ace 461 drivers/block/xsysace.c ace->fsm_continue_flag = 0; ace 466 drivers/block/xsysace.c struct ace_device *ace = q->queuedata; ace 468 drivers/block/xsysace.c return !list_empty(&ace->rq_list); ace 474 drivers/block/xsysace.c struct ace_device *ace = q->queuedata; ace 477 drivers/block/xsysace.c rq = list_first_entry_or_null(&ace->rq_list, struct request, queuelist); ace 486 drivers/block/xsysace.c static void ace_fsm_dostate(struct ace_device *ace) ace 494 drivers/block/xsysace.c dev_dbg(ace->dev, "fsm_state=%i, id_req_count=%i\n", ace 495 drivers/block/xsysace.c ace->fsm_state, ace->id_req_count); ace 500 drivers/block/xsysace.c status = ace_in32(ace, ACE_STATUS); ace 502 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDLE; ace 503 drivers/block/xsysace.c ace->media_change = 1; ace 504 drivers/block/xsysace.c set_capacity(ace->gd, 0); ace 505 drivers/block/xsysace.c dev_info(ace->dev, "No CF in slot\n"); ace 508 drivers/block/xsysace.c if (ace->req) { ace 509 drivers/block/xsysace.c blk_mq_end_request(ace->req, BLK_STS_IOERR); ace 510 drivers/block/xsysace.c ace->req = NULL; ace 512 drivers/block/xsysace.c while ((req = ace_get_next_request(ace->queue)) != NULL) ace 516 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDLE; ace 517 drivers/block/xsysace.c ace->id_result = -EIO; ace 518 drivers/block/xsysace.c while (ace->id_req_count) { ace 519 drivers/block/xsysace.c complete(&ace->id_completion); ace 520 drivers/block/xsysace.c ace->id_req_count--; ace 524 drivers/block/xsysace.c switch (ace->fsm_state) { ace 527 drivers/block/xsysace.c if (ace->id_req_count || ace_has_next_request(ace->queue)) { ace 528 drivers/block/xsysace.c ace->fsm_iter_num++; ace 529 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_REQ_LOCK; ace 530 drivers/block/xsysace.c mod_timer(&ace->stall_timer, jiffies + HZ); ace 531 drivers/block/xsysace.c if (!timer_pending(&ace->stall_timer)) ace 532 drivers/block/xsysace.c add_timer(&ace->stall_timer); ace 535 drivers/block/xsysace.c del_timer(&ace->stall_timer); ace 536 drivers/block/xsysace.c ace->fsm_continue_flag = 0; ace 540 drivers/block/xsysace.c if (ace_in(ace, ACE_STATUS) & ACE_STATUS_MPULOCK) { ace 542 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_WAIT_CFREADY; ace 547 drivers/block/xsysace.c val = ace_in(ace, ACE_CTRL); ace 548 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, val | ACE_CTRL_LOCKREQ); ace 549 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_WAIT_LOCK; ace 553 drivers/block/xsysace.c if (ace_in(ace, ACE_STATUS) & ACE_STATUS_MPULOCK) { ace 555 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_WAIT_CFREADY; ace 560 drivers/block/xsysace.c ace_fsm_yield(ace); ace 564 drivers/block/xsysace.c status = ace_in32(ace, ACE_STATUS); ace 568 drivers/block/xsysace.c ace_fsm_yield(ace); ace 573 drivers/block/xsysace.c if (ace->id_req_count) ace 574 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDENTIFY_PREPARE; ace 576 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_REQ_PREPARE; ace 581 drivers/block/xsysace.c ace->fsm_task = ACE_TASK_IDENTIFY; ace 582 drivers/block/xsysace.c ace->data_ptr = ace->cf_id; ace 583 drivers/block/xsysace.c ace->data_count = ACE_BUF_PER_SECTOR; ace 584 drivers/block/xsysace.c ace_out(ace, ACE_SECCNTCMD, ACE_SECCNTCMD_IDENTIFY); ace 587 drivers/block/xsysace.c val = ace_in(ace, ACE_CTRL); ace 588 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, val | ACE_CTRL_CFGRESET); ace 592 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDENTIFY_TRANSFER; ace 593 drivers/block/xsysace.c ace_fsm_yieldirq(ace); ace 598 drivers/block/xsysace.c status = ace_in32(ace, ACE_STATUS); ace 600 drivers/block/xsysace.c dev_dbg(ace->dev, "CFBSY set; t=%i iter=%i dc=%i\n", ace 601 drivers/block/xsysace.c ace->fsm_task, ace->fsm_iter_num, ace 602 drivers/block/xsysace.c ace->data_count); ace 603 drivers/block/xsysace.c ace_fsm_yield(ace); ace 607 drivers/block/xsysace.c ace_fsm_yield(ace); ace 612 drivers/block/xsysace.c ace->reg_ops->datain(ace); ace 613 drivers/block/xsysace.c ace->data_count--; ace 616 drivers/block/xsysace.c if (ace->data_count != 0) { ace 617 drivers/block/xsysace.c ace_fsm_yieldirq(ace); ace 622 drivers/block/xsysace.c dev_dbg(ace->dev, "identify finished\n"); ace 623 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDENTIFY_COMPLETE; ace 627 drivers/block/xsysace.c ace_fix_driveid(ace->cf_id); ace 628 drivers/block/xsysace.c ace_dump_mem(ace->cf_id, 512); /* Debug: Dump out disk ID */ ace 630 drivers/block/xsysace.c if (ace->data_result) { ace 632 drivers/block/xsysace.c ace->media_change = 1; ace 633 drivers/block/xsysace.c set_capacity(ace->gd, 0); ace 634 drivers/block/xsysace.c dev_err(ace->dev, "error fetching CF id (%i)\n", ace 635 drivers/block/xsysace.c ace->data_result); ace 637 drivers/block/xsysace.c ace->media_change = 0; ace 640 drivers/block/xsysace.c set_capacity(ace->gd, ace 641 drivers/block/xsysace.c ata_id_u32(ace->cf_id, ATA_ID_LBA_CAPACITY)); ace 642 drivers/block/xsysace.c dev_info(ace->dev, "capacity: %i sectors\n", ace 643 drivers/block/xsysace.c ata_id_u32(ace->cf_id, ATA_ID_LBA_CAPACITY)); ace 647 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDLE; ace 648 drivers/block/xsysace.c ace->id_result = ace->data_result; ace 649 drivers/block/xsysace.c while (ace->id_req_count) { ace 650 drivers/block/xsysace.c complete(&ace->id_completion); ace 651 drivers/block/xsysace.c ace->id_req_count--; ace 656 drivers/block/xsysace.c req = ace_get_next_request(ace->queue); ace 658 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDLE; ace 663 drivers/block/xsysace.c dev_dbg(ace->dev, ace 669 drivers/block/xsysace.c ace->req = req; ace 670 drivers/block/xsysace.c ace->data_ptr = bio_data(req->bio); ace 671 drivers/block/xsysace.c ace->data_count = blk_rq_cur_sectors(req) * ACE_BUF_PER_SECTOR; ace 672 drivers/block/xsysace.c ace_out32(ace, ACE_MPULBA, blk_rq_pos(req) & 0x0FFFFFFF); ace 677 drivers/block/xsysace.c dev_dbg(ace->dev, "write data\n"); ace 678 drivers/block/xsysace.c ace->fsm_task = ACE_TASK_WRITE; ace 679 drivers/block/xsysace.c ace_out(ace, ACE_SECCNTCMD, ace 683 drivers/block/xsysace.c dev_dbg(ace->dev, "read data\n"); ace 684 drivers/block/xsysace.c ace->fsm_task = ACE_TASK_READ; ace 685 drivers/block/xsysace.c ace_out(ace, ACE_SECCNTCMD, ace 690 drivers/block/xsysace.c val = ace_in(ace, ACE_CTRL); ace 691 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, val | ACE_CTRL_CFGRESET); ace 696 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_REQ_TRANSFER; ace 697 drivers/block/xsysace.c if (ace->fsm_task == ACE_TASK_READ) ace 698 drivers/block/xsysace.c ace_fsm_yieldirq(ace); /* wait for data ready */ ace 703 drivers/block/xsysace.c status = ace_in32(ace, ACE_STATUS); ace 705 drivers/block/xsysace.c dev_dbg(ace->dev, ace 707 drivers/block/xsysace.c ace->fsm_task, ace->fsm_iter_num, ace 708 drivers/block/xsysace.c blk_rq_cur_sectors(ace->req) * 16, ace 709 drivers/block/xsysace.c ace->data_count, ace->in_irq); ace 710 drivers/block/xsysace.c ace_fsm_yield(ace); /* need to poll CFBSY bit */ ace 714 drivers/block/xsysace.c dev_dbg(ace->dev, ace 716 drivers/block/xsysace.c ace->fsm_task, ace->fsm_iter_num, ace 717 drivers/block/xsysace.c blk_rq_cur_sectors(ace->req) * 16, ace 718 drivers/block/xsysace.c ace->data_count, ace->in_irq); ace 719 drivers/block/xsysace.c ace_fsm_yieldirq(ace); ace 724 drivers/block/xsysace.c if (ace->fsm_task == ACE_TASK_WRITE) ace 725 drivers/block/xsysace.c ace->reg_ops->dataout(ace); ace 727 drivers/block/xsysace.c ace->reg_ops->datain(ace); ace 728 drivers/block/xsysace.c ace->data_count--; ace 731 drivers/block/xsysace.c if (ace->data_count != 0) { ace 732 drivers/block/xsysace.c ace_fsm_yieldirq(ace); ace 737 drivers/block/xsysace.c if (blk_update_request(ace->req, BLK_STS_OK, ace 738 drivers/block/xsysace.c blk_rq_cur_bytes(ace->req))) { ace 743 drivers/block/xsysace.c ace->data_ptr = bio_data(ace->req->bio); ace 744 drivers/block/xsysace.c ace->data_count = blk_rq_cur_sectors(ace->req) * 16; ace 745 drivers/block/xsysace.c ace_fsm_yieldirq(ace); ace 749 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_REQ_COMPLETE; ace 753 drivers/block/xsysace.c ace->req = NULL; ace 756 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDLE; ace 760 drivers/block/xsysace.c ace->fsm_state = ACE_FSM_STATE_IDLE; ace 767 drivers/block/xsysace.c struct ace_device *ace = (void *)data; ace 770 drivers/block/xsysace.c spin_lock_irqsave(&ace->lock, flags); ace 773 drivers/block/xsysace.c ace->fsm_continue_flag = 1; ace 774 drivers/block/xsysace.c while (ace->fsm_continue_flag) ace 775 drivers/block/xsysace.c ace_fsm_dostate(ace); ace 777 drivers/block/xsysace.c spin_unlock_irqrestore(&ace->lock, flags); ace 782 drivers/block/xsysace.c struct ace_device *ace = from_timer(ace, t, stall_timer); ace 785 drivers/block/xsysace.c dev_warn(ace->dev, ace 787 drivers/block/xsysace.c ace->fsm_state, ace->fsm_task, ace->fsm_iter_num, ace 788 drivers/block/xsysace.c ace->data_count); ace 789 drivers/block/xsysace.c spin_lock_irqsave(&ace->lock, flags); ace 793 drivers/block/xsysace.c mod_timer(&ace->stall_timer, jiffies + HZ); ace 796 drivers/block/xsysace.c ace->fsm_continue_flag = 1; ace 797 drivers/block/xsysace.c while (ace->fsm_continue_flag) ace 798 drivers/block/xsysace.c ace_fsm_dostate(ace); ace 800 drivers/block/xsysace.c spin_unlock_irqrestore(&ace->lock, flags); ace 806 drivers/block/xsysace.c static int ace_interrupt_checkstate(struct ace_device *ace) ace 808 drivers/block/xsysace.c u32 sreg = ace_in32(ace, ACE_STATUS); ace 809 drivers/block/xsysace.c u16 creg = ace_in(ace, ACE_CTRL); ace 814 drivers/block/xsysace.c dev_err(ace->dev, "transfer failure\n"); ace 815 drivers/block/xsysace.c ace_dump_regs(ace); ace 825 drivers/block/xsysace.c struct ace_device *ace = dev_id; ace 828 drivers/block/xsysace.c spin_lock(&ace->lock); ace 829 drivers/block/xsysace.c ace->in_irq = 1; ace 832 drivers/block/xsysace.c creg = ace_in(ace, ACE_CTRL); ace 833 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, creg | ACE_CTRL_RESETIRQ); ace 834 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, creg); ace 837 drivers/block/xsysace.c if (ace_interrupt_checkstate(ace)) ace 838 drivers/block/xsysace.c ace->data_result = -EIO; ace 840 drivers/block/xsysace.c if (ace->fsm_task == 0) { ace 841 drivers/block/xsysace.c dev_err(ace->dev, ace 843 drivers/block/xsysace.c ace_in32(ace, ACE_STATUS), ace_in32(ace, ACE_CTRL), ace 844 drivers/block/xsysace.c ace_in(ace, ACE_SECCNTCMD)); ace 845 drivers/block/xsysace.c dev_err(ace->dev, "fsm_task=%i fsm_state=%i data_count=%i\n", ace 846 drivers/block/xsysace.c ace->fsm_task, ace->fsm_state, ace->data_count); ace 850 drivers/block/xsysace.c ace->fsm_continue_flag = 1; ace 851 drivers/block/xsysace.c while (ace->fsm_continue_flag) ace 852 drivers/block/xsysace.c ace_fsm_dostate(ace); ace 855 drivers/block/xsysace.c ace->in_irq = 0; ace 856 drivers/block/xsysace.c spin_unlock(&ace->lock); ace 867 drivers/block/xsysace.c struct ace_device *ace = hctx->queue->queuedata; ace 875 drivers/block/xsysace.c spin_lock_irq(&ace->lock); ace 876 drivers/block/xsysace.c list_add_tail(&req->queuelist, &ace->rq_list); ace 877 drivers/block/xsysace.c spin_unlock_irq(&ace->lock); ace 879 drivers/block/xsysace.c tasklet_schedule(&ace->fsm_tasklet); ace 885 drivers/block/xsysace.c struct ace_device *ace = gd->private_data; ace 886 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_check_events(): %i\n", ace->media_change); ace 888 drivers/block/xsysace.c return ace->media_change ? DISK_EVENT_MEDIA_CHANGE : 0; ace 893 drivers/block/xsysace.c struct ace_device *ace = gd->private_data; ace 896 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_revalidate_disk()\n"); ace 898 drivers/block/xsysace.c if (ace->media_change) { ace 899 drivers/block/xsysace.c dev_dbg(ace->dev, "requesting cf id and scheduling tasklet\n"); ace 901 drivers/block/xsysace.c spin_lock_irqsave(&ace->lock, flags); ace 902 drivers/block/xsysace.c ace->id_req_count++; ace 903 drivers/block/xsysace.c spin_unlock_irqrestore(&ace->lock, flags); ace 905 drivers/block/xsysace.c tasklet_schedule(&ace->fsm_tasklet); ace 906 drivers/block/xsysace.c wait_for_completion(&ace->id_completion); ace 909 drivers/block/xsysace.c dev_dbg(ace->dev, "revalidate complete\n"); ace 910 drivers/block/xsysace.c return ace->id_result; ace 915 drivers/block/xsysace.c struct ace_device *ace = bdev->bd_disk->private_data; ace 918 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_open() users=%i\n", ace->users + 1); ace 921 drivers/block/xsysace.c spin_lock_irqsave(&ace->lock, flags); ace 922 drivers/block/xsysace.c ace->users++; ace 923 drivers/block/xsysace.c spin_unlock_irqrestore(&ace->lock, flags); ace 933 drivers/block/xsysace.c struct ace_device *ace = disk->private_data; ace 937 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_release() users=%i\n", ace->users - 1); ace 940 drivers/block/xsysace.c spin_lock_irqsave(&ace->lock, flags); ace 941 drivers/block/xsysace.c ace->users--; ace 942 drivers/block/xsysace.c if (ace->users == 0) { ace 943 drivers/block/xsysace.c val = ace_in(ace, ACE_CTRL); ace 944 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, val & ~ACE_CTRL_LOCKREQ); ace 946 drivers/block/xsysace.c spin_unlock_irqrestore(&ace->lock, flags); ace 952 drivers/block/xsysace.c struct ace_device *ace = bdev->bd_disk->private_data; ace 953 drivers/block/xsysace.c u16 *cf_id = ace->cf_id; ace 955 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_getgeo()\n"); ace 980 drivers/block/xsysace.c static int ace_setup(struct ace_device *ace) ace 986 drivers/block/xsysace.c dev_dbg(ace->dev, "ace_setup(ace=0x%p)\n", ace); ace 987 drivers/block/xsysace.c dev_dbg(ace->dev, "physaddr=0x%llx irq=%i\n", ace 988 drivers/block/xsysace.c (unsigned long long)ace->physaddr, ace->irq); ace 990 drivers/block/xsysace.c spin_lock_init(&ace->lock); ace 991 drivers/block/xsysace.c init_completion(&ace->id_completion); ace 992 drivers/block/xsysace.c INIT_LIST_HEAD(&ace->rq_list); ace 997 drivers/block/xsysace.c ace->baseaddr = ioremap(ace->physaddr, 0x80); ace 998 drivers/block/xsysace.c if (!ace->baseaddr) ace 1004 drivers/block/xsysace.c tasklet_init(&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long)ace); ace 1005 drivers/block/xsysace.c timer_setup(&ace->stall_timer, ace_stall_timer, 0); ace 1010 drivers/block/xsysace.c ace->queue = blk_mq_init_sq_queue(&ace->tag_set, &ace_mq_ops, 2, ace 1012 drivers/block/xsysace.c if (IS_ERR(ace->queue)) { ace 1013 drivers/block/xsysace.c rc = PTR_ERR(ace->queue); ace 1014 drivers/block/xsysace.c ace->queue = NULL; ace 1017 drivers/block/xsysace.c ace->queue->queuedata = ace; ace 1019 drivers/block/xsysace.c blk_queue_logical_block_size(ace->queue, 512); ace 1020 drivers/block/xsysace.c blk_queue_bounce_limit(ace->queue, BLK_BOUNCE_HIGH); ace 1025 drivers/block/xsysace.c ace->gd = alloc_disk(ACE_NUM_MINORS); ace 1026 drivers/block/xsysace.c if (!ace->gd) ace 1029 drivers/block/xsysace.c ace->gd->major = ace_major; ace 1030 drivers/block/xsysace.c ace->gd->first_minor = ace->id * ACE_NUM_MINORS; ace 1031 drivers/block/xsysace.c ace->gd->fops = &ace_fops; ace 1032 drivers/block/xsysace.c ace->gd->events = DISK_EVENT_MEDIA_CHANGE; ace 1033 drivers/block/xsysace.c ace->gd->queue = ace->queue; ace 1034 drivers/block/xsysace.c ace->gd->private_data = ace; ace 1035 drivers/block/xsysace.c snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a'); ace 1038 drivers/block/xsysace.c if (ace->bus_width == ACE_BUS_WIDTH_16) { ace 1040 drivers/block/xsysace.c ace_out_le16(ace, ACE_BUSMODE, 0x0101); ace 1043 drivers/block/xsysace.c if (ace_in_le16(ace, ACE_BUSMODE) == 0x0001) ace 1044 drivers/block/xsysace.c ace->reg_ops = &ace_reg_le16_ops; ace 1046 drivers/block/xsysace.c ace->reg_ops = &ace_reg_be16_ops; ace 1048 drivers/block/xsysace.c ace_out_8(ace, ACE_BUSMODE, 0x00); ace 1049 drivers/block/xsysace.c ace->reg_ops = &ace_reg_8_ops; ace 1053 drivers/block/xsysace.c version = ace_in(ace, ACE_VERSION); ace 1058 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, ACE_CTRL_FORCECFGMODE | ace 1062 drivers/block/xsysace.c if (ace->irq) { ace 1063 drivers/block/xsysace.c rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace); ace 1066 drivers/block/xsysace.c dev_err(ace->dev, "request_irq failed\n"); ace 1067 drivers/block/xsysace.c ace->irq = 0; ace 1072 drivers/block/xsysace.c val = ace_in(ace, ACE_CTRL); ace 1074 drivers/block/xsysace.c ace_out(ace, ACE_CTRL, val); ace 1077 drivers/block/xsysace.c dev_info(ace->dev, "Xilinx SystemACE revision %i.%i.%i\n", ace 1079 drivers/block/xsysace.c dev_dbg(ace->dev, "physaddr 0x%llx, mapped to 0x%p, irq=%i\n", ace 1080 drivers/block/xsysace.c (unsigned long long) ace->physaddr, ace->baseaddr, ace->irq); ace 1082 drivers/block/xsysace.c ace->media_change = 1; ace 1083 drivers/block/xsysace.c ace_revalidate_disk(ace->gd); ace 1086 drivers/block/xsysace.c add_disk(ace->gd); ace 1092 drivers/block/xsysace.c ace->gd->queue = NULL; ace 1093 drivers/block/xsysace.c put_disk(ace->gd); ace 1095 drivers/block/xsysace.c blk_cleanup_queue(ace->queue); ace 1096 drivers/block/xsysace.c blk_mq_free_tag_set(&ace->tag_set); ace 1098 drivers/block/xsysace.c iounmap(ace->baseaddr); ace 1100 drivers/block/xsysace.c dev_info(ace->dev, "xsysace: error initializing device at 0x%llx\n", ace 1101 drivers/block/xsysace.c (unsigned long long) ace->physaddr); ace 1105 drivers/block/xsysace.c static void ace_teardown(struct ace_device *ace) ace 1107 drivers/block/xsysace.c if (ace->gd) { ace 1108 drivers/block/xsysace.c del_gendisk(ace->gd); ace 1109 drivers/block/xsysace.c put_disk(ace->gd); ace 1112 drivers/block/xsysace.c if (ace->queue) { ace 1113 drivers/block/xsysace.c blk_cleanup_queue(ace->queue); ace 1114 drivers/block/xsysace.c blk_mq_free_tag_set(&ace->tag_set); ace 1117 drivers/block/xsysace.c tasklet_kill(&ace->fsm_tasklet); ace 1119 drivers/block/xsysace.c if (ace->irq) ace 1120 drivers/block/xsysace.c free_irq(ace->irq, ace); ace 1122 drivers/block/xsysace.c iounmap(ace->baseaddr); ace 1128 drivers/block/xsysace.c struct ace_device *ace; ace 1138 drivers/block/xsysace.c ace = kzalloc(sizeof(struct ace_device), GFP_KERNEL); ace 1139 drivers/block/xsysace.c if (!ace) { ace 1144 drivers/block/xsysace.c ace->dev = dev; ace 1145 drivers/block/xsysace.c ace->id = id; ace 1146 drivers/block/xsysace.c ace->physaddr = physaddr; ace 1147 drivers/block/xsysace.c ace->irq = irq; ace 1148 drivers/block/xsysace.c ace->bus_width = bus_width; ace 1151 drivers/block/xsysace.c rc = ace_setup(ace); ace 1155 drivers/block/xsysace.c dev_set_drvdata(dev, ace); ace 1160 drivers/block/xsysace.c kfree(ace); ace 1169 drivers/block/xsysace.c struct ace_device *ace = dev_get_drvdata(dev); ace 1172 drivers/block/xsysace.c if (ace) { ace 1173 drivers/block/xsysace.c ace_teardown(ace); ace 1175 drivers/block/xsysace.c kfree(ace); ace 330 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_rule *ace) ace 333 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_vlan *tag = &ace->vlan; ace 349 drivers/net/ethernet/mscc/ocelot_ace.c if (ace->prio != 0) ace 355 drivers/net/ethernet/mscc/ocelot_ace.c VCAP_KEY_SET(IGR_PORT_MASK, 0, ~BIT(ace->chip_port)); ace 358 drivers/net/ethernet/mscc/ocelot_ace.c VCAP_KEY_BIT_SET(L2_MC, ace->dmac_mc); ace 359 drivers/net/ethernet/mscc/ocelot_ace.c VCAP_KEY_BIT_SET(L2_BC, ace->dmac_bc); ace 365 drivers/net/ethernet/mscc/ocelot_ace.c switch (ace->type) { ace 367 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_frame_etype *etype = &ace->frame.etype; ace 382 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_frame_llc *llc = &ace->frame.llc; ace 395 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_frame_snap *snap = &ace->frame.snap; ace 401 drivers/net/ethernet/mscc/ocelot_ace.c ace->frame.snap.snap.value, ace 402 drivers/net/ethernet/mscc/ocelot_ace.c ace->frame.snap.snap.mask); ace 406 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_frame_arp *arp = &ace->frame.arp; ace 443 drivers/net/ethernet/mscc/ocelot_ace.c if (ace->type == OCELOT_ACE_TYPE_IPV4) { ace 444 drivers/net/ethernet/mscc/ocelot_ace.c ipv4 = &ace->frame.ipv4; ace 465 drivers/net/ethernet/mscc/ocelot_ace.c ipv6 = &ace->frame.ipv6; ace 567 drivers/net/ethernet/mscc/ocelot_ace.c is2_action_set(&data, ace->action); ace 569 drivers/net/ethernet/mscc/ocelot_ace.c ace->stats.pkts); ace 646 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_rule *ace; ace 657 drivers/net/ethernet/mscc/ocelot_ace.c ace = ocelot_ace_rule_get_rule_index(acl_block, i); ace 658 drivers/net/ethernet/mscc/ocelot_ace.c is2_entry_set(rule->port->ocelot, i, ace); ace 686 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_ace_rule *ace; ace 699 drivers/net/ethernet/mscc/ocelot_ace.c ace = ocelot_ace_rule_get_rule_index(acl_block, i); ace 700 drivers/net/ethernet/mscc/ocelot_ace.c is2_entry_set(rule->port->ocelot, i, ace); ace 3492 fs/cifs/cifssmb.c static void cifs_convert_ace(struct posix_acl_xattr_entry *ace, ace 3496 fs/cifs/cifssmb.c ace->e_perm = cpu_to_le16(cifs_ace->cifs_e_perm); ace 3497 fs/cifs/cifssmb.c ace->e_tag = cpu_to_le16(cifs_ace->cifs_e_tag); ace 3498 fs/cifs/cifssmb.c ace->e_id = cpu_to_le32(le64_to_cpu(cifs_ace->cifs_uid)); ace 3554 fs/cifs/cifssmb.c struct posix_acl_xattr_entry *ace = (void *)(local_acl + 1); ace 3558 fs/cifs/cifssmb.c cifs_convert_ace(&ace[i], pACE); ace 3589 fs/cifs/cifssmb.c struct posix_acl_xattr_entry *ace = (void *)(local_acl + 1); ace 3616 fs/cifs/cifssmb.c convert_ace_to_cifs_ace(&cifs_acl->ace_array[i], &ace[i]); ace 3219 fs/nfs/nfs4xdr.c static int decode_ace(struct xdr_stream *xdr, void *ace) ace 45 fs/nfs_common/nfsacl.c struct posix_acl_entry ace[4]; ace 237 fs/nfsd/nfs4acl.c struct nfs4_ace *ace; ace 247 fs/nfsd/nfs4acl.c ace = acl->aces + acl->naces; ace 257 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_DENIED_ACE_TYPE; ace 258 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 259 fs/nfsd/nfs4acl.c ace->access_mask = deny_mask_from_posix(deny, flags); ace 260 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_OWNER; ace 261 fs/nfsd/nfs4acl.c ace++; ace 265 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE; ace 266 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 267 fs/nfsd/nfs4acl.c ace->access_mask = mask_from_posix(pa->e_perm, flags | NFS4_ACL_OWNER); ace 268 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_OWNER; ace 269 fs/nfsd/nfs4acl.c ace++; ace 277 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_DENIED_ACE_TYPE; ace 278 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 279 fs/nfsd/nfs4acl.c ace->access_mask = deny_mask_from_posix(deny, flags); ace 280 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_NAMED; ace 281 fs/nfsd/nfs4acl.c ace->who_uid = pa->e_uid; ace 282 fs/nfsd/nfs4acl.c ace++; ace 285 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE; ace 286 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 287 fs/nfsd/nfs4acl.c ace->access_mask = mask_from_posix(pa->e_perm & pas.mask, ace 289 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_NAMED; ace 290 fs/nfsd/nfs4acl.c ace->who_uid = pa->e_uid; ace 291 fs/nfsd/nfs4acl.c ace++; ace 303 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE; ace 304 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 305 fs/nfsd/nfs4acl.c ace->access_mask = mask_from_posix(pas.group, flags); ace 306 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_GROUP; ace 307 fs/nfsd/nfs4acl.c ace++; ace 312 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE; ace 313 fs/nfsd/nfs4acl.c ace->flag = eflag | NFS4_ACE_IDENTIFIER_GROUP; ace 314 fs/nfsd/nfs4acl.c ace->access_mask = mask_from_posix(pa->e_perm & pas.mask, ace 316 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_NAMED; ace 317 fs/nfsd/nfs4acl.c ace->who_gid = pa->e_gid; ace 318 fs/nfsd/nfs4acl.c ace++; ace 329 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_DENIED_ACE_TYPE; ace 330 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 331 fs/nfsd/nfs4acl.c ace->access_mask = deny_mask_from_posix(deny, flags); ace 332 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_GROUP; ace 333 fs/nfsd/nfs4acl.c ace++; ace 342 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_DENIED_ACE_TYPE; ace 343 fs/nfsd/nfs4acl.c ace->flag = eflag | NFS4_ACE_IDENTIFIER_GROUP; ace 344 fs/nfsd/nfs4acl.c ace->access_mask = deny_mask_from_posix(deny, flags); ace 345 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_NAMED; ace 346 fs/nfsd/nfs4acl.c ace->who_gid = pa->e_gid; ace 347 fs/nfsd/nfs4acl.c ace++; ace 355 fs/nfsd/nfs4acl.c ace->type = NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE; ace 356 fs/nfsd/nfs4acl.c ace->flag = eflag; ace 357 fs/nfsd/nfs4acl.c ace->access_mask = mask_from_posix(pa->e_perm, flags); ace 358 fs/nfsd/nfs4acl.c ace->whotype = NFS4_ACL_WHO_EVERYONE; ace 622 fs/nfsd/nfs4acl.c struct nfs4_ace *ace) ace 624 fs/nfsd/nfs4acl.c u32 mask = ace->access_mask; ace 629 fs/nfsd/nfs4acl.c switch (ace2type(ace)) { ace 631 fs/nfsd/nfs4acl.c if (ace->type == NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE) { ace 638 fs/nfsd/nfs4acl.c i = find_uid(state, ace->who_uid); ace 639 fs/nfsd/nfs4acl.c if (ace->type == NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE) { ace 648 fs/nfsd/nfs4acl.c if (ace->type == NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE) { ace 660 fs/nfsd/nfs4acl.c i = find_gid(state, ace->who_gid); ace 661 fs/nfsd/nfs4acl.c if (ace->type == NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE) { ace 674 fs/nfsd/nfs4acl.c if (ace->type == NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE) { ace 697 fs/nfsd/nfs4acl.c struct nfs4_ace *ace; ace 707 fs/nfsd/nfs4acl.c for (ace = acl->aces; ace < acl->aces + acl->naces; ace++) { ace 708 fs/nfsd/nfs4acl.c if (ace->type != NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE && ace 709 fs/nfsd/nfs4acl.c ace->type != NFS4_ACE_ACCESS_DENIED_ACE_TYPE) ace 711 fs/nfsd/nfs4acl.c if (ace->flag & ~NFS4_SUPPORTED_FLAGS) ace 713 fs/nfsd/nfs4acl.c if ((ace->flag & NFS4_INHERITANCE_FLAGS) == 0) { ace 714 fs/nfsd/nfs4acl.c process_one_v4_ace(&effective_acl_state, ace); ace 724 fs/nfsd/nfs4acl.c process_one_v4_ace(&default_acl_state, ace); ace 726 fs/nfsd/nfs4acl.c if (!(ace->flag & NFS4_ACE_INHERIT_ONLY_ACE)) ace 727 fs/nfsd/nfs4acl.c process_one_v4_ace(&effective_acl_state, ace); ace 806 fs/nfsd/nfs4acl.c ace2type(struct nfs4_ace *ace) ace 808 fs/nfsd/nfs4acl.c switch (ace->whotype) { ace 810 fs/nfsd/nfs4acl.c return (ace->flag & NFS4_ACE_IDENTIFIER_GROUP ? ace 353 fs/nfsd/nfs4xdr.c struct nfs4_ace *ace; ace 371 fs/nfsd/nfs4xdr.c for (ace = (*acl)->aces; ace < (*acl)->aces + nace; ace++) { ace 373 fs/nfsd/nfs4xdr.c ace->type = be32_to_cpup(p++); ace 374 fs/nfsd/nfs4xdr.c ace->flag = be32_to_cpup(p++); ace 375 fs/nfsd/nfs4xdr.c ace->access_mask = be32_to_cpup(p++); ace 380 fs/nfsd/nfs4xdr.c ace->whotype = nfs4_acl_get_whotype(buf, dummy32); ace 382 fs/nfsd/nfs4xdr.c if (ace->whotype != NFS4_ACL_WHO_NAMED) ace 384 fs/nfsd/nfs4xdr.c else if (ace->flag & NFS4_ACE_IDENTIFIER_GROUP) ace 386 fs/nfsd/nfs4xdr.c buf, dummy32, &ace->who_gid); ace 389 fs/nfsd/nfs4xdr.c buf, dummy32, &ace->who_uid); ace 2270 fs/nfsd/nfs4xdr.c struct nfs4_ace *ace) ace 2272 fs/nfsd/nfs4xdr.c if (ace->whotype != NFS4_ACL_WHO_NAMED) ace 2273 fs/nfsd/nfs4xdr.c return nfs4_acl_write_who(xdr, ace->whotype); ace 2274 fs/nfsd/nfs4xdr.c else if (ace->flag & NFS4_ACE_IDENTIFIER_GROUP) ace 2275 fs/nfsd/nfs4xdr.c return nfsd4_encode_group(xdr, rqstp, ace->who_gid); ace 2277 fs/nfsd/nfs4xdr.c return nfsd4_encode_user(xdr, rqstp, ace->who_uid); ace 2626 fs/nfsd/nfs4xdr.c struct nfs4_ace *ace; ace 2641 fs/nfsd/nfs4xdr.c for (ace = acl->aces; ace < acl->aces + acl->naces; ace++) { ace 2645 fs/nfsd/nfs4xdr.c *p++ = cpu_to_be32(ace->type); ace 2646 fs/nfsd/nfs4xdr.c *p++ = cpu_to_be32(ace->flag); ace 2647 fs/nfsd/nfs4xdr.c *p++ = cpu_to_be32(ace->access_mask & ace 2649 fs/nfsd/nfs4xdr.c status = nfsd4_encode_aclname(xdr, rqstp, ace); ace 32 fs/xfs/xfs_acl.c const struct xfs_acl_entry *ace; ace 47 fs/xfs/xfs_acl.c ace = &aclp->acl_entry[i]; ace 55 fs/xfs/xfs_acl.c acl_e->e_tag = be32_to_cpu(ace->ae_tag); ace 56 fs/xfs/xfs_acl.c acl_e->e_perm = be16_to_cpu(ace->ae_perm); ace 60 fs/xfs/xfs_acl.c acl_e->e_uid = xfs_uid_to_kuid(be32_to_cpu(ace->ae_id)); ace 63 fs/xfs/xfs_acl.c acl_e->e_gid = xfs_gid_to_kgid(be32_to_cpu(ace->ae_id)); ace 85 fs/xfs/xfs_acl.c struct xfs_acl_entry *ace; ace 90 fs/xfs/xfs_acl.c ace = &aclp->acl_entry[i]; ace 93 fs/xfs/xfs_acl.c ace->ae_tag = cpu_to_be32(acl_e->e_tag); ace 96 fs/xfs/xfs_acl.c ace->ae_id = cpu_to_be32(xfs_kuid_to_uid(acl_e->e_uid)); ace 99 fs/xfs/xfs_acl.c ace->ae_id = cpu_to_be32(xfs_kgid_to_gid(acl_e->e_gid)); ace 102 fs/xfs/xfs_acl.c ace->ae_id = cpu_to_be32(ACL_UNDEFINED_ID); ace 106 fs/xfs/xfs_acl.c ace->ae_perm = cpu_to_be16(acl_e->e_perm);