Lines Matching refs:ctlr
170 static void cciss_read_capacity(int ctlr, int logvol, int withirq,
172 static void cciss_read_capacity_16(int ctlr, int logvol, int withirq,
174 static void cciss_geometry_inquiry(int ctlr, int logvol,
181 static int sendcmd(__u8 cmd, int ctlr, void *buff, size_t size,
184 static int sendcmd_withirq(__u8 cmd, int ctlr, void *buff, size_t size,
188 static void fail_all_cmds(unsigned long ctlr);
273 cciss_seq_tape_report(seq, h->ctlr); in cciss_seq_show_header()
280 unsigned ctlr = h->ctlr; in cciss_seq_start() local
286 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in cciss_seq_start()
288 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in cciss_seq_start()
292 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in cciss_seq_start()
304 unsigned ctlr = h->ctlr; in cciss_seq_show() local
323 ctlr, (int) *pos, (int)vol_sz, (int)vol_sz_frac, in cciss_seq_show()
398 rc = cciss_engage_scsi(h->ctlr); in cciss_proc_write()
502 c->ctlr = h->ctlr; in cmd_alloc()
747 int ctlr = host->ctlr; in cciss_ioctl() local
802 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
817 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
851 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
867 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
1017 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
1021 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
1169 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
1173 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in cciss_ioctl()
1289 ctlr_info_t *h = hba[cmd->ctlr]; in cciss_softirq_done()
1325 static void cciss_get_serial_no(int ctlr, int logvol, int withirq, in cciss_get_serial_no() argument
1340 rc = sendcmd_withirq(CISS_INQUIRY, ctlr, buf, in cciss_get_serial_no()
1343 rc = sendcmd(CISS_INQUIRY, ctlr, buf, in cciss_get_serial_no()
1355 sprintf(disk->disk_name, "cciss/c%dd%d", h->ctlr, drv_index); in cciss_add_disk()
1398 static void cciss_update_drive_info(int ctlr, int drv_index, int first_time) in cciss_update_drive_info() argument
1400 ctlr_info_t *h = hba[ctlr]; in cciss_update_drive_info()
1425 cciss_read_capacity_16(h->ctlr, drv_index, 1, in cciss_update_drive_info()
1429 cciss_read_capacity(ctlr, drv_index, 1, in cciss_update_drive_info()
1436 cciss_read_capacity_16(ctlr, drv_index, 1, in cciss_update_drive_info()
1446 cciss_geometry_inquiry(ctlr, drv_index, 1, total_size, block_size, in cciss_update_drive_info()
1451 cciss_get_serial_no(ctlr, drv_index, 1, drvinfo->serial_no, in cciss_update_drive_info()
1474 spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); in cciss_update_drive_info()
1476 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); in cciss_update_drive_info()
1531 static int cciss_find_free_drive_index(int ctlr, int controller_node) in cciss_find_free_drive_index() argument
1536 if (hba[ctlr]->drv[i].raid_level == -1) { in cciss_find_free_drive_index()
1537 if (i > hba[ctlr]->highest_lun) in cciss_find_free_drive_index()
1539 hba[ctlr]->highest_lun = i; in cciss_find_free_drive_index()
1559 drv_index = cciss_find_free_drive_index(h->ctlr, controller_node); in cciss_add_gendisk()
1569 h->ctlr, drv_index); in cciss_add_gendisk()
1599 "add disk 0.\n", h->ctlr); in cciss_add_controller_node()
1623 int ctlr = h->ctlr; in rebuild_lun_table() local
1638 spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); in rebuild_lun_table()
1640 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); in rebuild_lun_table()
1644 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); in rebuild_lun_table()
1650 return_code = sendcmd_withirq(CISS_REPORT_LOG, ctlr, ld_buff, in rebuild_lun_table()
1697 spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); in rebuild_lun_table()
1699 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); in rebuild_lun_table()
1738 cciss_update_drive_info(ctlr, drv_index, first_time); in rebuild_lun_table()
1860 static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, size_t size, unsigned in… in fill_cmd() argument
1866 ctlr_info_t *h = hba[ctlr]; in fill_cmd()
1964 "cciss%d: Unknown Command 0x%c\n", ctlr, cmd); in fill_cmd()
1997 "cciss%d: unknown message type %d\n", ctlr, cmd); in fill_cmd()
2002 "cciss%d: unknown command type %d\n", ctlr, cmd_type); in fill_cmd()
2019 int ctlr, in sendcmd_withirq() argument
2025 ctlr_info_t *h = hba[ctlr]; in sendcmd_withirq()
2034 return_status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num, in sendcmd_withirq()
2044 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in sendcmd_withirq()
2048 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in sendcmd_withirq()
2100 "cciss%d: unsolicited abort %p\n", ctlr, c); in sendcmd_withirq()
2103 "cciss%d: retrying %p\n", ctlr, c); in sendcmd_withirq()
2130 static void cciss_geometry_inquiry(int ctlr, int logvol, in cciss_geometry_inquiry() argument
2141 return_code = sendcmd_withirq(CISS_INQUIRY, ctlr, in cciss_geometry_inquiry()
2145 return_code = sendcmd(CISS_INQUIRY, ctlr, inq_buff, in cciss_geometry_inquiry()
2182 cciss_read_capacity(int ctlr, int logvol, int withirq, sector_t *total_size, in cciss_read_capacity() argument
2196 ctlr, buf, sizeof(ReadCapdata_struct), in cciss_read_capacity()
2200 ctlr, buf, sizeof(ReadCapdata_struct), in cciss_read_capacity()
2217 cciss_read_capacity_16(int ctlr, int logvol, int withirq, sector_t *total_size, unsigned int *b… in cciss_read_capacity_16() argument
2230 ctlr, buf, sizeof(ReadCapdata_struct_16), in cciss_read_capacity_16()
2235 ctlr, buf, sizeof(ReadCapdata_struct_16), in cciss_read_capacity_16()
2277 cciss_read_capacity(h->ctlr, logvol, 1, in cciss_revalidate()
2280 cciss_read_capacity_16(h->ctlr, logvol, 1, in cciss_revalidate()
2283 cciss_geometry_inquiry(h->ctlr, logvol, 1, total_size, block_size, in cciss_revalidate()
2298 static unsigned long pollcomplete(int ctlr) in pollcomplete() argument
2306 done = hba[ctlr]->access.command_completed(hba[ctlr]); in pollcomplete()
2316 static int add_sendcmd_reject(__u8 cmd, int ctlr, unsigned long complete) in add_sendcmd_reject() argument
2332 struct sendcmd_reject_list *srl = &hba[ctlr]->scsi_rejects; in add_sendcmd_reject()
2340 ctlr, complete); in add_sendcmd_reject()
2348 if (srl->ncompletions >= (hba[ctlr]->nr_cmds + 2)) { in add_sendcmd_reject()
2351 "reject list overflow, command lost!\n", ctlr); in add_sendcmd_reject()
2365 static int sendcmd(__u8 cmd, int ctlr, void *buff, size_t size, unsigned int use_unit_num, /* 0: ad… in sendcmd() argument
2374 ctlr_info_t *info_p = hba[ctlr]; in sendcmd()
2382 status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num, in sendcmd()
2409 " waiting!\n", ctlr); in sendcmd()
2417 complete = pollcomplete(ctlr); in sendcmd()
2426 "No command list address returned!\n", ctlr); in sendcmd()
2451 ctlr, c); in sendcmd()
2455 ctlr, c); in sendcmd()
2466 "many times\n", ctlr, c); in sendcmd()
2474 ctlr); in sendcmd()
2479 " Error %x \n", ctlr, in sendcmd()
2484 ctlr, in sendcmd()
2497 if (add_sendcmd_reject(cmd, ctlr, complete) != 0) { in sendcmd()
2720 "abort %p\n", h->ctlr, cmd); in complete_command()
2724 "cciss%d: retrying %p\n", h->ctlr, cmd); in complete_command()
2729 "many times\n", h->ctlr, cmd); in complete_command()
2884 printk(KERN_WARNING "cciss%d: bad request type %d\n", h->ctlr, creq->cmd_type); in do_cciss_request()
2960 spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); in do_cciss_intr()
2969 h->ctlr); in do_cciss_intr()
2970 fail_all_cmds(h->ctlr); in do_cciss_intr()
3007 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); in do_cciss_intr()
3636 hba[i]->ctlr = i; in cciss_init_one()
3804 i = tmp_ptr->ctlr; in cciss_shutdown()
3832 i = tmp_ptr->ctlr; in cciss_remove_one()
3923 static void fail_all_cmds(unsigned long ctlr) in fail_all_cmds() argument
3926 ctlr_info_t *h = hba[ctlr]; in fail_all_cmds()
3930 printk(KERN_WARNING "cciss%d: controller not responding.\n", h->ctlr); in fail_all_cmds()
3933 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); in fail_all_cmds()
3959 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); in fail_all_cmds()