Lines Matching +full:0 +full:xf100
89 FT_HBADRVR, 0, OEM_DPT, OS_LINUX, CAP_OVERLAP, DEV_ALL,
90 ADF_ALL_SC5, 0, 0, DPT_VERSION, DPT_REVISION, DPT_SUBREVISION,
110 static int hba_count = 0;
141 static u32 adpt_post_wait_id = 0;
168 if( readb(host->FwDebugBLEDflag_P) == 0xbc ){ in adpt_read_blink_led()
172 return 0; in adpt_read_blink_led()
184 { 0, }
215 if (adpt_i2o_activate_hba(pHba) < 0) { in adpt_detect()
225 return 0; in adpt_detect()
231 if (adpt_i2o_build_sys_table() < 0) { in adpt_detect()
233 return 0; in adpt_detect()
240 if (adpt_i2o_online_hba(pHba) < 0) { in adpt_detect()
253 if (adpt_i2o_lct_get(pHba) < 0){ in adpt_detect()
258 if (adpt_i2o_parse_lct(pHba) < 0){ in adpt_detect()
273 if (adpt_scsi_host_alloc(pHba, sht) < 0){ in adpt_detect()
296 return 0; in adpt_detect()
327 memset(msg, 0, sizeof(msg)); in adpt_inquiry()
333 memset((void*)buf, 0, 36); in adpt_inquiry()
336 direction = 0x00000000; in adpt_inquiry()
337 scsidir =0x40000000; // DATA IN (iop<--dev) in adpt_inquiry()
344 msg[0] = reqlen<<16 | SGL_OFFSET_12; in adpt_inquiry()
345 msg[1] = (0xff<<24|HOST_TID<<12|ADAPTER_TID); in adpt_inquiry()
346 msg[2] = 0; in adpt_inquiry()
347 msg[3] = 0; in adpt_inquiry()
355 msg[6] = scsidir|0x20a00000| 6 /* cmd len*/; in adpt_inquiry()
359 memset(scb, 0, sizeof(scb)); in adpt_inquiry()
361 scb[0] = INQUIRY; in adpt_inquiry()
362 scb[1] = 0; in adpt_inquiry()
363 scb[2] = 0; in adpt_inquiry()
364 scb[3] = 0; in adpt_inquiry()
366 scb[5] = 0; in adpt_inquiry()
376 *mptr++ = (0x7C<<24)+(2<<16)+0x02; /* Enable 64 bit */ in adpt_inquiry()
378 *mptr++ = 0xD0000000|direction|len; in adpt_inquiry()
382 *mptr++ = 0xD0000000|direction|len; in adpt_inquiry()
388 if (rcode != 0) { in adpt_inquiry()
394 memset(pHba->detail, 0, sizeof(pHba->detail)); in adpt_inquiry()
400 pHba->detail[48] = '\0'; /* precautionary */ in adpt_inquiry()
416 return 0; in adpt_slave_configure()
432 if ((cmd->cmnd[0] == REQUEST_SENSE) && (cmd->sense_buffer[0] != 0)) { in adpt_queue_lck()
435 return 0; in adpt_queue_lck()
438 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; in adpt_queue_lck()
460 return 0; in adpt_queue_lck()
488 if (capacity < 0x2000 ) { // floppy in DEF_SCSI_QCMD()
492 // else if between 0x2000 and 0x20000 in DEF_SCSI_QCMD()
493 else if (capacity < 0x20000) { in DEF_SCSI_QCMD()
497 // else if between 0x20000 and 0x40000 in DEF_SCSI_QCMD()
498 else if (capacity < 0x40000) { in DEF_SCSI_QCMD()
502 // else if between 0x4000 and 0x80000 in DEF_SCSI_QCMD()
503 else if (capacity < 0x80000) { in DEF_SCSI_QCMD()
507 // else if greater than 0x80000 in DEF_SCSI_QCMD()
521 geom[0] = heads; in DEF_SCSI_QCMD()
526 return 0; in DEF_SCSI_QCMD()
534 pHba = (adpt_hba *) host->hostdata[0]; in adpt_info()
555 return 0; in adpt_show_info()
567 for(chan = 0; chan < MAX_CHANNEL; chan++) { in adpt_show_info()
568 for(id = 0; id < MAX_ID; id++) { in adpt_show_info()
582 return 0; in adpt_show_info()
593 ulong flags = 0; in adpt_ioctl_to_context()
598 for (i = 0; i < nr; i++) { in adpt_ioctl_to_context()
642 pHba = (adpt_hba*) cmd->device->host->hostdata[0]; in adpt_abort()
649 memset(msg, 0, sizeof(msg)); in adpt_abort()
650 msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_abort()
652 msg[2] = 0; in adpt_abort()
653 msg[3]= 0; in adpt_abort()
661 if (rcode != 0) { in adpt_abort()
674 #define I2O_DEVICE_RESET 0x27
686 pHba = (void*) cmd->device->host->hostdata[0]; in adpt_device_reset()
692 memset(msg, 0, sizeof(msg)); in adpt_device_reset()
693 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_device_reset()
695 msg[2] = 0; in adpt_device_reset()
696 msg[3] = 0; in adpt_device_reset()
706 if (rcode != 0) { in adpt_device_reset()
720 #define I2O_HBA_BUS_RESET 0x87
728 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; in adpt_bus_reset()
729 memset(msg, 0, sizeof(msg)); in adpt_bus_reset()
731 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_bus_reset()
733 msg[2] = 0; in adpt_bus_reset()
734 msg[3] = 0; in adpt_bus_reset()
740 if (rcode != 0) { in adpt_bus_reset()
756 pHba = (adpt_hba*)cmd->device->host->hostdata[0]; in __adpt_reset()
760 if(rcode == 0){ in __adpt_reset()
788 if ((rcode=adpt_i2o_activate_hba(pHba)) < 0) { in adpt_hba_reset()
794 if ((rcode=adpt_i2o_build_sys_table()) < 0) { in adpt_hba_reset()
800 if ((rcode=adpt_i2o_online_hba(pHba)) < 0) { in adpt_hba_reset()
806 if ((rcode=adpt_i2o_lct_get(pHba)) < 0){ in adpt_hba_reset()
811 if ((rcode=adpt_i2o_reparse_lct(pHba)) < 0){ in adpt_hba_reset()
818 return 0; /* return success */ in adpt_hba_reset()
864 ulong base_addr0_phys = 0; in adpt_install_hba()
865 ulong base_addr1_phys = 0; in adpt_install_hba()
866 u32 hba_map0_area_size = 0; in adpt_install_hba()
867 u32 hba_map1_area_size = 0; in adpt_install_hba()
870 int dma64 = 0; in adpt_install_hba()
890 dma_set_mask(&pDev->dev, DMA_BIT_MASK(64)) == 0) in adpt_install_hba()
893 if (!dma64 && dma_set_mask(&pDev->dev, DMA_BIT_MASK(32)) != 0) in adpt_install_hba()
899 base_addr0_phys = pci_resource_start(pDev,0); in adpt_install_hba()
900 hba_map0_area_size = pci_resource_len(pDev,0); in adpt_install_hba()
904 if(pDev->subsystem_device >=0xc032 && pDev->subsystem_device <= 0xc03b){ in adpt_install_hba()
906 hba_map0_area_size = 0x400000; in adpt_install_hba()
908 if(hba_map0_area_size > 0x100000 ){ in adpt_install_hba()
909 hba_map0_area_size = 0x100000; in adpt_install_hba()
988 pHba->irq_mask = base_addr_virt+0x30; in adpt_install_hba()
989 pHba->post_port = base_addr_virt+0x40; in adpt_install_hba()
990 pHba->reply_port = base_addr_virt+0x44; in adpt_install_hba()
994 pHba->lct_size = 0; in adpt_install_hba()
996 pHba->post_count = 0; in adpt_install_hba()
1006 if(raptorFlag == 0){ in adpt_install_hba()
1026 return 0; in adpt_install_hba()
1091 for(i = 0 ; i < pHba->top_scsi_channel ; i++){ in adpt_i2o_delete_hba()
1092 for(j = 0; j < MAX_ID; j++){ in adpt_i2o_delete_hba()
1107 if(hba_count <= 0){ in adpt_i2o_delete_hba()
1124 if(!d || d->tid == 0) { in adpt_find_device()
1149 int status = 0; in adpt_i2o_post_wait()
1150 ulong flags = 0; in adpt_i2o_post_wait()
1169 adpt_post_wait_id &= 0x7fff; in adpt_i2o_post_wait()
1178 msg[2] |= 0x80000000 | ((u32)wait_data->id); in adpt_i2o_post_wait()
1180 if((status = adpt_i2o_post_this(pHba, msg, len)) == 0){ in adpt_i2o_post_wait()
1188 if (timeout == 0) { in adpt_i2o_post_wait()
1257 return 0; in adpt_i2o_post_this()
1277 context &= 0x7fff; in adpt_i2o_post_wait_complete()
1332 msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_reset_hba()
1334 msg[2]=0; in adpt_i2o_reset_hba()
1335 msg[3]=0; in adpt_i2o_reset_hba()
1336 msg[4]=0; in adpt_i2o_reset_hba()
1337 msg[5]=0; in adpt_i2o_reset_hba()
1346 while(*status == 0){ in adpt_i2o_reset_hba()
1359 if(*status == 0x01 /*I2O_EXEC_IOP_RESET_IN_PROGRESS*/) { in adpt_i2o_reset_hba()
1383 if(*status == 0x02 || in adpt_i2o_reset_hba()
1397 return 0; in adpt_i2o_reset_hba()
1408 u8 bus_no = 0; in adpt_i2o_parse_lct()
1423 for(i=0;i<max;i++) { in adpt_i2o_parse_lct()
1424 if( lct->lct_entry[i].user_tid != 0xfff){ in adpt_i2o_parse_lct()
1439 if(adpt_i2o_query_scalar(pHba, tid, 0x8000, -1, buf, 32)<0) { in adpt_i2o_parse_lct()
1442 bus_no = buf[0]>>16; in adpt_i2o_parse_lct()
1476 d->flags = 0; in adpt_i2o_parse_lct()
1481 bus_no = 0; in adpt_i2o_parse_lct()
1493 if(adpt_i2o_query_scalar(pHba, tid, 0x0200, -1, buf, 28)>=0) in adpt_i2o_parse_lct()
1516 if(adpt_i2o_query_scalar(pHba, tid, 0x8000, -1, buf, 32)>=0) { in adpt_i2o_parse_lct()
1517 bus_no = buf[0]>>16; in adpt_i2o_parse_lct()
1548 pDev->type = (buf[0])&0xff; in adpt_i2o_parse_lct()
1549 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_parse_lct()
1563 return 0; in adpt_i2o_parse_lct()
1583 *d->dev_name = 0; in adpt_i2o_install_device()
1586 return 0; in adpt_i2o_install_device()
1623 return 0; in adpt_open()
1646 pHba->in_use = 0; in adpt_close()
1648 return 0; in adpt_close()
1656 u32 size = 0; in adpt_i2o_passthru()
1657 u32 reply_size = 0; in adpt_i2o_passthru()
1661 u32 sg_offset = 0; in adpt_i2o_passthru()
1662 u32 sg_count = 0; in adpt_i2o_passthru()
1663 int sg_index = 0; in adpt_i2o_passthru()
1664 u32 i = 0; in adpt_i2o_passthru()
1665 u32 rcode = 0; in adpt_i2o_passthru()
1668 ulong flags = 0; in adpt_i2o_passthru()
1670 memset(&msg, 0, MAX_MESSAGE_SIZE*4); in adpt_i2o_passthru()
1672 if(get_user(size, &user_msg[0])){ in adpt_i2o_passthru()
1687 get_user(reply_size, &user_reply[0]); in adpt_i2o_passthru()
1698 sg_offset = (msg[0]>>4)&0xf; in adpt_i2o_passthru()
1699 msg[2] = 0x40000000; // IOCTL context in adpt_i2o_passthru()
1721 for(i = 0; i < sg_count; i++) { in adpt_i2o_passthru()
1724 if (!(sg[i].flag_count & 0x10000000 /*I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT*/)) { in adpt_i2o_passthru()
1729 sg_size = sg[i].flag_count & 0xffffff; in adpt_i2o_passthru()
1740 if(sg[i].flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR*/) { in adpt_i2o_passthru()
1763 if (rcode != 0) in adpt_i2o_passthru()
1784 memset(&msg, 0, MAX_MESSAGE_SIZE*4); in adpt_i2o_passthru()
1786 if(get_user(size, &user_msg[0])){ in adpt_i2o_passthru()
1805 for (j = 0; j < sg_count; j++) { in adpt_i2o_passthru()
1807 if(! (sg[j].flag_count & 0x4000000 /*I2O_SGL_FLAGS_DIR*/)) { in adpt_i2o_passthru()
1808 sg_size = sg[j].flag_count & 0xffffff; in adpt_i2o_passthru()
1840 sg[sg_index].flag_count & 0xffffff, in adpt_i2o_passthru()
1918 memset(&si, 0, sizeof(si)); in adpt_system_info()
1921 si.osMajorVersion = 0; in adpt_system_info()
1922 si.osMinorVersion = 0; in adpt_system_info()
1923 si.osRevision = 0; in adpt_system_info()
1936 si.processorType = 0xff ; in adpt_system_info()
1943 return 0; in adpt_system_info()
1949 int error = 0; in adpt_ioctl()
1951 ulong flags = 0; in adpt_ioctl()
1985 #define FLG_OSD_PCI_VALID 0x0001 in adpt_ioctl()
1986 #define FLG_OSD_DMA 0x0002 in adpt_ioctl()
1987 #define FLG_OSD_I2O 0x0004 in adpt_ioctl()
1988 memset(&HbaInfo, 0, sizeof(HbaInfo)); in adpt_ioctl()
2065 case (DPT_TARGET_BUSY & 0xFFFF): in compat_adpt_ioctl()
2085 u32 status=0; in adpt_isr()
2087 ulong flags = 0; in adpt_isr()
2088 int handled = 0; in adpt_isr()
2125 if(old_m >= 0x100000){ in adpt_isr()
2130 // Transaction context is 0 in failed reply frame in adpt_isr()
2137 if(context & 0x40000000){ // IOCTL in adpt_isr()
2144 if(context & 0x80000000){ // Post wait message in adpt_isr()
2147 status &= 0xffff; /* Get detail status */ in adpt_isr()
2151 if(!(context & 0x40000000)) { in adpt_isr()
2154 * as the firmware might treat a 0 tag as invalid in adpt_isr()
2166 * as the firmware might treat a 0 tag as invalid in adpt_isr()
2200 memset(msg, 0 , sizeof(msg)); in adpt_scsi_to_i2o()
2202 direction = 0x00000000; in adpt_scsi_to_i2o()
2204 scsidir = 0x00000000; // DATA NO XFER in adpt_scsi_to_i2o()
2209 * Note: Do not have to verify index is less than 0 since in adpt_scsi_to_i2o()
2210 * cmd->cmnd[0] is an unsigned char in adpt_scsi_to_i2o()
2214 scsidir =0x40000000; // DATA IN (iop<--dev) in adpt_scsi_to_i2o()
2217 direction=0x04000000; // SGL OUT in adpt_scsi_to_i2o()
2218 scsidir =0x80000000; // DATA OUT (iop-->dev) in adpt_scsi_to_i2o()
2223 scsidir =0x40000000; // DATA IN (iop<--dev) in adpt_scsi_to_i2o()
2227 printk(KERN_WARNING"%s: scsi opcode 0x%x not supported.\n", in adpt_scsi_to_i2o()
2228 pHba->name, cmd->cmnd[0]); in adpt_scsi_to_i2o()
2231 return 0; in adpt_scsi_to_i2o()
2234 // msg[0] is set later in adpt_scsi_to_i2o()
2236 msg[1] = ((0xff<<24)|(HOST_TID<<12)|d->tid); in adpt_scsi_to_i2o()
2237 msg[2] = 0; in adpt_scsi_to_i2o()
2248 msg[6] = scsidir|0x20a00000|cmd->cmd_len; in adpt_scsi_to_i2o()
2253 memset(mptr, 0, 16); in adpt_scsi_to_i2o()
2259 *mptr++ = (0x7C<<24)+(2<<16)+0x02; /* Enable 64 bit */ in adpt_scsi_to_i2o()
2267 BUG_ON(nseg < 0); in adpt_scsi_to_i2o()
2271 len = 0; in adpt_scsi_to_i2o()
2274 *mptr++ = direction|0x10000000|sg_dma_len(sg); in adpt_scsi_to_i2o()
2282 *lptr = direction|0xD0000000|sg_dma_len(sg); in adpt_scsi_to_i2o()
2292 *lenptr = len = 0; in adpt_scsi_to_i2o()
2297 msg[0] = reqlen<<16 | ((reqlen > 12) ? SGL_OFFSET_12 : SGL_OFFSET_0); in adpt_scsi_to_i2o()
2301 if (rcode == 0) { in adpt_scsi_to_i2o()
2302 return 0; in adpt_scsi_to_i2o()
2317 host->hostdata[0] = (unsigned long)pHba; in adpt_scsi_host_alloc()
2324 host->io_port = 0; in adpt_scsi_host_alloc()
2325 host->n_io_port = 0; in adpt_scsi_host_alloc()
2335 return 0; in adpt_scsi_host_alloc()
2344 u32 reply_flags = readl(reply) & 0xff00; // Leave it shifted up 8 bits in adpt_i2o_scsi_complete()
2348 u16 detailed_status = readl(reply+16) &0xffff; in adpt_i2o_scsi_complete()
2349 dev_status = (detailed_status & 0xff); in adpt_i2o_scsi_complete()
2355 pHba = (adpt_hba*) cmd->device->host->hostdata[0]; in adpt_i2o_scsi_complete()
2357 cmd->sense_buffer[0] = '\0'; // initialize sense valid flag to false in adpt_i2o_scsi_complete()
2378 …printk(KERN_WARNING"%s: SCSI Timeout-Device (%d,%d,%llu) hba status=0x%x, dev status=0x%x, cmd=0x%… in adpt_i2o_scsi_complete()
2379 …md->device->channel, (u32)cmd->device->id, cmd->device->lun, hba_status, dev_status, cmd->cmnd[0]); in adpt_i2o_scsi_complete()
2418 …printk(KERN_WARNING"%s: SCSI error %0x-Device(%d,%d,%llu) hba_status=0x%x, dev_status=0x%x, cmd=0x… in adpt_i2o_scsi_complete()
2420 hba_status, dev_status, cmd->cmnd[0]); in adpt_i2o_scsi_complete()
2431 if(cmd->sense_buffer[0] == 0x70 /* class 7 */ && in adpt_i2o_scsi_complete()
2435 …RN_WARNING"%s: SCSI Data Protect-Device (%d,%d,%llu) hba_status=0x%x, dev_status=0x%x, cmd=0x%x\n", in adpt_i2o_scsi_complete()
2437 hba_status, dev_status, cmd->cmnd[0]); in adpt_i2o_scsi_complete()
2447 printk(KERN_WARNING"%s: I2O MSG_FAIL - Device (%d,%d,%llu) tid=%d, cmd=0x%x\n", in adpt_i2o_scsi_complete()
2449 ((struct adpt_device*)(cmd->device->hostdata))->tid, cmd->cmnd[0]); in adpt_i2o_scsi_complete()
2463 ulong flags = 0; in adpt_rescan()
2467 if ((rcode=adpt_i2o_lct_get(pHba)) < 0) in adpt_rescan()
2469 if ((rcode=adpt_i2o_reparse_lct(pHba)) < 0) in adpt_rescan()
2471 rcode = 0; in adpt_rescan()
2485 u8 bus_no = 0; in adpt_i2o_reparse_lct()
2512 for(i=0;i<max;i++) { in adpt_i2o_reparse_lct()
2513 if( lct->lct_entry[i].user_tid != 0xfff){ in adpt_i2o_reparse_lct()
2521 if(adpt_i2o_query_scalar(pHba, tid, 0x8000, -1, buf, 32)<0) { in adpt_i2o_reparse_lct()
2525 bus_no = buf[0]>>16; in adpt_i2o_reparse_lct()
2557 d->flags = 0; in adpt_i2o_reparse_lct()
2587 pDev->type = (buf[0])&0xff; in adpt_i2o_reparse_lct()
2588 pDev->flags = (buf[0]>>8)&0xff; in adpt_i2o_reparse_lct()
2641 return 0; in adpt_i2o_reparse_lct()
2659 if (adpt_i2o_status_get(pHba) < 0) { in adpt_i2o_activate_hba()
2660 if((rcode = adpt_i2o_reset_hba(pHba)) != 0){ in adpt_i2o_activate_hba()
2664 if (adpt_i2o_status_get(pHba) < 0) { in adpt_i2o_activate_hba()
2680 if (adpt_i2o_status_get(pHba) < 0 || pHba->status_block->iop_state != ADAPTER_STATE_RESET) { in adpt_i2o_activate_hba()
2686 if((rcode = adpt_i2o_reset_hba(pHba)) != 0){ in adpt_i2o_activate_hba()
2693 if (adpt_i2o_init_outbound_q(pHba) < 0) { in adpt_i2o_activate_hba()
2699 if (adpt_i2o_hrt_get(pHba) < 0) { in adpt_i2o_activate_hba()
2703 return 0; in adpt_i2o_activate_hba()
2712 if (adpt_i2o_systab_send(pHba) < 0) in adpt_i2o_online_hba()
2716 if (adpt_i2o_enable_hba(pHba) < 0) in adpt_i2o_online_hba()
2720 return 0; in adpt_i2o_online_hba()
2741 writel( THREE_WORD_MSG_SIZE | SGL_OFFSET_0,&msg[0]); in adpt_send_nop()
2742 writel( I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | 0,&msg[1]); in adpt_send_nop()
2743 writel( 0,&msg[2]); in adpt_send_nop()
2748 return 0; in adpt_send_nop()
2784 writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]); in adpt_i2o_init_outbound_q()
2786 writel(0, &msg[2]); in adpt_i2o_init_outbound_q()
2787 writel(0x0106, &msg[3]); /* Transaction context */ in adpt_i2o_init_outbound_q()
2789 writel((REPLY_FRAME_SIZE)<<16|0x80, &msg[5]); /* Outbound msg frame size and Initcode */ in adpt_i2o_init_outbound_q()
2790 writel(0xD0000004, &msg[6]); /* Simple SG LE, EOB */ in adpt_i2o_init_outbound_q()
2799 if (*status != 0x01 /*I2O_EXEC_OUTBOUND_INIT_IN_PROGRESS*/) { in adpt_i2o_init_outbound_q()
2817 if(*status != 0x04 /*I2O_EXEC_OUTBOUND_INIT_COMPLETE*/) { in adpt_i2o_init_outbound_q()
2837 for(i = 0; i < pHba->reply_fifo_size; i++) { in adpt_i2o_init_outbound_q()
2843 return 0; in adpt_i2o_init_outbound_q()
2876 memset(pHba->status_block, 0, sizeof(i2o_status_block)); in adpt_i2o_status_get()
2896 writel(NINE_WORD_MSG_SIZE|SGL_OFFSET_0, &msg[0]); in adpt_i2o_status_get()
2899 writel(0, &msg[3]); in adpt_i2o_status_get()
2900 writel(0, &msg[4]); in adpt_i2o_status_get()
2901 writel(0, &msg[5]); in adpt_i2o_status_get()
2910 while(status_block[87]!=0xff){ in adpt_i2o_status_get()
2951 case 0x01: in adpt_i2o_status_get()
2954 case 0x02: in adpt_i2o_status_get()
2957 case 0x04: in adpt_i2o_status_get()
2960 case 0x05: in adpt_i2o_status_get()
2963 case 0x08: in adpt_i2o_status_get()
2966 case 0x10: in adpt_i2o_status_get()
2969 case 0x11: in adpt_i2o_status_get()
2976 return 0; in adpt_i2o_status_get()
2988 if ((pHba->lct_size == 0) || (pHba->lct == NULL)){ in adpt_i2o_lct_get()
3002 memset(pHba->lct, 0, pHba->lct_size); in adpt_i2o_lct_get()
3004 msg[0] = EIGHT_WORD_MSG_SIZE|SGL_OFFSET_6; in adpt_i2o_lct_get()
3006 msg[2] = 0; in adpt_i2o_lct_get()
3007 msg[3] = 0; in adpt_i2o_lct_get()
3008 msg[4] = 0xFFFFFFFF; /* All devices */ in adpt_i2o_lct_get()
3009 msg[5] = 0x00000000; /* Report now */ in adpt_i2o_lct_get()
3010 msg[6] = 0xD0000000|pHba->lct_size; in adpt_i2o_lct_get()
3032 if(adpt_i2o_query_scalar(pHba, 0 , 0x8000, -1, buf, sizeof(buf))>=0) { in adpt_i2o_lct_get()
3034 pHba->FwDebugBuffer_P = ioremap(pHba->base_addr_phys + buf[0], in adpt_i2o_lct_get()
3045 pHba->FwDebugFlags = 0; in adpt_i2o_lct_get()
3049 return 0; in adpt_i2o_lct_get()
3055 int count = 0; in adpt_i2o_build_sys_table()
3085 sys_tbl->iops[count].seg_num = 0; in adpt_i2o_build_sys_table()
3092 addr = pHba->base_addr_phys + 0x40; in adpt_i2o_build_sys_table()
3103 for(count = 0; count < (sys_tbl_len >>2); count++) { in adpt_i2o_build_sys_table()
3104 printk(KERN_INFO "sys_tbl[%d] = %0#10x\n", in adpt_i2o_build_sys_table()
3110 return 0; in adpt_i2o_build_sys_table()
3125 if(adpt_i2o_query_scalar(pHba, unit, 0xF100, 3, buf, 16)>=0) in adpt_i2o_report_hba_unit()
3127 buf[16]=0; in adpt_i2o_report_hba_unit()
3130 if(adpt_i2o_query_scalar(pHba, unit, 0xF100, 4, buf, 16)>=0) in adpt_i2o_report_hba_unit()
3132 buf[16]=0; in adpt_i2o_report_hba_unit()
3135 if(adpt_i2o_query_scalar(pHba, unit, 0xF100, 6, buf, 8)>=0) in adpt_i2o_report_hba_unit()
3137 buf[8]=0; in adpt_i2o_report_hba_unit()
3142 printk(KERN_INFO "\tSubclass: 0x%04X\n", d->lct_data.sub_class); in adpt_i2o_report_hba_unit()
3145 if(d->lct_data.device_flags&(1<<0)) in adpt_i2o_report_hba_unit()
3184 switch(class&0xFFF) { in adpt_i2o_get_class_name()
3186 idx = 0; break; in adpt_i2o_get_class_name()
3238 msg[0]= SIX_WORD_MSG_SIZE| SGL_OFFSET_4; in adpt_i2o_hrt_get()
3240 msg[2]= 0; in adpt_i2o_hrt_get()
3241 msg[3]= 0; in adpt_i2o_hrt_get()
3242 msg[4]= (0xD0000000 | size); /* Simple transaction */ in adpt_i2o_hrt_get()
3258 return 0; in adpt_i2o_hrt_get()
3267 u16 opblk[] = { 1, 0, I2O_PARAMS_FIELD_GET, group, 1, field }; in adpt_i2o_query_scalar()
3316 if (size < 0) in adpt_i2o_query_scalar()
3339 msg[0] = NINE_WORD_MSG_SIZE | SGL_OFFSET_5; in adpt_i2o_issue_params()
3341 msg[2] = 0; in adpt_i2o_issue_params()
3342 msg[3] = 0; in adpt_i2o_issue_params()
3343 msg[4] = 0; in adpt_i2o_issue_params()
3344 msg[5] = 0x54000000 | oplen; /* OperationBlock */ in adpt_i2o_issue_params()
3346 msg[7] = 0xD0000000 | reslen; /* ResultBlock */ in adpt_i2o_issue_params()
3354 if (res[1]&0x00FF0000) { /* BlockStatus != SUCCESS */ in adpt_i2o_issue_params()
3355 printk(KERN_WARNING "%s: %s - Error:\n ErrorInfoSize = 0x%02x, " in adpt_i2o_issue_params()
3356 "BlockStatus = 0x%02x, BlockSize = 0x%04x\n", in adpt_i2o_issue_params()
3360 res[1]>>24, (res[1]>>16)&0xFF, res[1]&0xFFFF); in adpt_i2o_issue_params()
3361 return -((res[1] >> 16) & 0xFF); /* -BlockStatus */ in adpt_i2o_issue_params()
3364 return 4 + ((res[1] & 0x0000FFFF) << 2); /* bytes used in resblk */ in adpt_i2o_issue_params()
3379 return 0; in adpt_i2o_quiesce_hba()
3382 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_quiesce_hba()
3384 msg[2] = 0; in adpt_i2o_quiesce_hba()
3385 msg[3] = 0; in adpt_i2o_quiesce_hba()
3413 return 0; in adpt_i2o_enable_hba()
3418 msg[0]=FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_enable_hba()
3420 msg[2]= 0; in adpt_i2o_enable_hba()
3421 msg[3]= 0; in adpt_i2o_enable_hba()
3440 msg[0] = I2O_MESSAGE_SIZE(12) | SGL_OFFSET_6; in adpt_i2o_systab_send()
3442 msg[2] = 0; in adpt_i2o_systab_send()
3443 msg[3] = 0; in adpt_i2o_systab_send()
3444 msg[4] = (0<<16) | ((pHba->unit+2) << 12); /* Host 0 IOP ID (unit + 2) */ in adpt_i2o_systab_send()
3445 msg[5] = 0; /* Segment 0 */ in adpt_i2o_systab_send()
3452 msg[6] = 0x54000000 | sys_tbl_len; in adpt_i2o_systab_send()
3454 msg[8] = 0x54000000 | 0; in adpt_i2o_systab_send()
3455 msg[9] = 0; in adpt_i2o_systab_send()
3456 msg[10] = 0xD4000000 | 0; in adpt_i2o_systab_send()
3457 msg[11] = 0; in adpt_i2o_systab_send()
3484 for (i = 0; i < millisec; i++) { in adpt_delay()
3516 if (error < 0) in adpt_init()
3527 return 0; in adpt_init()