Lines Matching refs:h
146 static cmdlist_t * cmd_alloc(ctlr_info_t *h, int get_from_pool);
147 static void cmd_free(ctlr_info_t *h, cmdlist_t *c, int got_from_pool);
168 static void start_io(ctlr_info_t *h);
249 ctlr_info_t *h = (ctlr_info_t*)data; in ida_proc_get_info() local
255 ctlr = h->ctlr; in ida_proc_get_info()
268 h->devname, in ida_proc_get_info()
269 h->product_name, in ida_proc_get_info()
270 (unsigned long)h->board_id, in ida_proc_get_info()
271 h->firm_rev[0], h->firm_rev[1], h->firm_rev[2], h->firm_rev[3], in ida_proc_get_info()
272 (unsigned long)h->ctlr_sig, (unsigned long)h->vaddr, in ida_proc_get_info()
273 (unsigned int) h->io_mem_addr, (unsigned int)h->intr, in ida_proc_get_info()
274 h->log_drives, h->highest_lun, h->phys_drives, in ida_proc_get_info()
275 h->Qdepth, h->maxQsinceinit); in ida_proc_get_info()
282 for(i=0; i<=h->highest_lun; i++) { in ida_proc_get_info()
283 drv = &h->drv[i]; in ida_proc_get_info()
295 c = h->reqQ; in ida_proc_get_info()
299 while(c && c != h->reqQ) { in ida_proc_get_info()
305 c = h->cmpQ; in ida_proc_get_info()
309 while(c && c != h->cmpQ) { in ida_proc_get_info()
318 h->nr_allocs, h->nr_frees); in ida_proc_get_info()
986 ctlr_info_t *h = q->queuedata; in do_ida_request() local
1006 if (h->ctlr != MAJOR(creq->rq_dev)-MAJOR_NR ) { in do_ida_request()
1008 h->ctlr, creq->rq_dev, creq); in do_ida_request()
1015 if ((c = cmd_alloc(h,1)) == NULL) in do_ida_request()
1024 c->ctlr = h->ctlr; in do_ida_request()
1029 c->req.hdr.blk = hba[h->ctlr]->hd[MINOR(creq->rq_dev)].start_sect in do_ida_request()
1059 h->pci_dev, tmp_sg[i].page, tmp_sg[i].offset, in do_ida_request()
1073 addQ(&h->reqQ, c); in do_ida_request()
1074 h->Qdepth++; in do_ida_request()
1075 if (h->Qdepth > h->maxQsinceinit) in do_ida_request()
1076 h->maxQsinceinit = h->Qdepth; in do_ida_request()
1081 start_io(h); in do_ida_request()
1090 static void start_io(ctlr_info_t *h) in start_io() argument
1094 while((c = h->reqQ) != NULL) { in start_io()
1096 if (h->access.fifo_full(h) == 0) in start_io()
1100 removeQ(&h->reqQ, c); in start_io()
1101 h->Qdepth--; in start_io()
1104 h->access.submit_command(h, c); in start_io()
1107 addQ(&h->cmpQ, c); in start_io()
1159 ctlr_info_t *h = dev_id; in do_ida_intr() local
1165 istat = h->access.intr_pending(h); in do_ida_intr()
1176 while((a = h->access.command_completed(h))) { in do_ida_intr()
1178 if ((c = h->cmpQ) == NULL) in do_ida_intr()
1185 if (c == h->cmpQ) in do_ida_intr()
1193 removeQ(&h->cmpQ, c); in do_ida_intr()
1204 cmd_free(h, c, 1); in do_ida_intr()
1216 do_ida_request(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); in do_ida_intr()
1228 ctlr_info_t *h = (ctlr_info_t*)tdata; in ida_timer() local
1230 h->timer.expires = jiffies + IDA_TIMER; in ida_timer()
1231 add_timer(&h->timer); in ida_timer()
1232 h->misc_tflags = 0; in ida_timer()
1420 ctlr_info_t *h = hba[ctlr]; in ida_ctlr_ioctl() local
1427 if ((c = cmd_alloc(h, 0)) == NULL) in ida_ctlr_ioctl()
1445 cmd_free(h, c, 0); in ida_ctlr_ioctl()
1450 cmd_free(h, c, 0); in ida_ctlr_ioctl()
1453 c->req.hdr.blk = pci_map_single(h->pci_dev, &(io->c), in ida_ctlr_ioctl()
1457 c->req.sg[0].addr = pci_map_single(h->pci_dev, p, in ida_ctlr_ioctl()
1468 cmd_free(h, c, 0); in ida_ctlr_ioctl()
1473 c->req.sg[0].addr = pci_map_single(h->pci_dev, p, in ida_ctlr_ioctl()
1485 cmd_free(h, c, 0); in ida_ctlr_ioctl()
1490 cmd_free(h, c, 0); in ida_ctlr_ioctl()
1494 c->req.sg[0].addr = pci_map_single(h->pci_dev, p, in ida_ctlr_ioctl()
1500 c->req.sg[0].addr = pci_map_single(h->pci_dev,&io->c, in ida_ctlr_ioctl()
1509 addQ(&h->reqQ, c); in ida_ctlr_ioctl()
1510 h->Qdepth++; in ida_ctlr_ioctl()
1511 start_io(h); in ida_ctlr_ioctl()
1518 pci_unmap_single(h->pci_dev, c->req.sg[0].addr, c->req.sg[0].size, in ida_ctlr_ioctl()
1523 pci_unmap_single(h->pci_dev, c->req.hdr.blk, in ida_ctlr_ioctl()
1547 cmd_free(h, c, 0); in ida_ctlr_ioctl()
1560 ctlr_info_t *h = hba[ctlr]; in ida_ctlr_big_ioctl() local
1576 if ((c = cmd_alloc(h, 0)) == NULL) in ida_ctlr_big_ioctl()
1596 cmd_free(h, c, 0); in ida_ctlr_big_ioctl()
1602 cmd_free(h, c, 0); in ida_ctlr_big_ioctl()
1610 cmd_free(h, c, 0); in ida_ctlr_big_ioctl()
1615 c->req.hdr.blk = pci_map_single(h->pci_dev, scsi_param, in ida_ctlr_big_ioctl()
1645 c->req.sg[sg_used].addr = pci_map_single(h->pci_dev, in ida_ctlr_big_ioctl()
1660 addQ(&h->reqQ, c); in ida_ctlr_big_ioctl()
1661 h->Qdepth++; in ida_ctlr_big_ioctl()
1662 start_io(h); in ida_ctlr_big_ioctl()
1669 pci_unmap_single(h->pci_dev, c->req.sg[i].addr, in ida_ctlr_big_ioctl()
1692 pci_unmap_single(h->pci_dev, c->req.hdr.blk, in ida_ctlr_big_ioctl()
1701 cmd_free(h, c, 0); in ida_ctlr_big_ioctl()
1706 pci_unmap_single(h->pci_dev, c->req.hdr.blk, in ida_ctlr_big_ioctl()
1712 pci_unmap_single(h->pci_dev, c->req.sg[i].addr, in ida_ctlr_big_ioctl()
1717 cmd_free(h, c, 0); in ida_ctlr_big_ioctl()
1726 static cmdlist_t * cmd_alloc(ctlr_info_t *h, int get_from_pool) in cmd_alloc() argument
1733 c = (cmdlist_t*)pci_alloc_consistent(h->pci_dev, in cmd_alloc()
1739 i = find_first_zero_bit(h->cmd_pool_bits, NR_CMDS); in cmd_alloc()
1742 } while(test_and_set_bit(i%32, h->cmd_pool_bits+(i/32)) != 0); in cmd_alloc()
1743 c = h->cmd_pool + i; in cmd_alloc()
1744 cmd_dhandle = h->cmd_pool_dhandle + i*sizeof(cmdlist_t); in cmd_alloc()
1745 h->nr_allocs++; in cmd_alloc()
1753 static void cmd_free(ctlr_info_t *h, cmdlist_t *c, int got_from_pool) in cmd_free() argument
1758 pci_free_consistent(h->pci_dev, sizeof(cmdlist_t), c, in cmd_free()
1761 i = c - h->cmd_pool; in cmd_free()
1762 clear_bit(i%32, h->cmd_pool_bits+(i/32)); in cmd_free()
1763 h->nr_frees++; in cmd_free()
1944 ctlr_info_t *h = hba[ctlr]; in deregister_disk() local
1953 if( h->drv[logvol].usage_count > 1) { in deregister_disk()
1957 h->drv[logvol].usage_count++; in deregister_disk()
1974 if (logvol == h->highest_lun) { in deregister_disk()
1977 for(i=0; i<h->highest_lun; i++) { in deregister_disk()
1982 h->highest_lun = newhighest; in deregister_disk()
1985 --h->log_drives; in deregister_disk()
1986 gdev->nr_real = h->highest_lun+1; in deregister_disk()
1988 h->drv[logvol].nr_blks = 0; in deregister_disk()
1989 h->drv[logvol].cylinders = 0; in deregister_disk()
1990 h->drv[logvol].blk_size = 0; in deregister_disk()