Lines Matching +full:0 +full:xd8000

281                         (cmd) ? ((cmd)->device->id & 0x0f) : -1, \
282 (cmd) ? ((u8)(cmd)->device->lun & 0x07) : -1
293 #define IRQ_MIN 0
305 not_issued = 0x0001, /* command not yet issued */
306 selecting = 0x0002, /* target is being selected */
307 identified = 0x0004, /* IDENTIFY was sent */
308 disconnected = 0x0008, /* target disconnected */
309 completed = 0x0010, /* target sent COMMAND COMPLETE */
310 aborted = 0x0020, /* ABORT was sent */
311 resetted = 0x0040, /* BUS DEVICE RESET was sent */
312 spiordy = 0x0080, /* waiting for SPIORDY to raise */
313 syncneg = 0x0100, /* synchronous negotiation in progress */
314 aborting = 0x0200, /* ABORT is pending */
315 resetting = 0x0400, /* BUS DEVICE RESET is pending */
316 check_condition = 0x0800, /* requesting sense after CHECK CONDITION */
340 static int io[] = {0, 0};
341 module_param_hw_array(io, int, ioport, NULL, 0);
344 static int irq[] = {0, 0};
345 module_param_hw_array(irq, int, irq, NULL, 0);
349 module_param_array(scsiid, int, NULL, 0);
353 module_param_array(reconnect, int, NULL, 0);
357 module_param_array(parity, int, NULL, 0);
361 module_param_array(sync, int, NULL, 0);
365 module_param_array(delay, int, NULL, 0);
368 static int exttrans[] = {0, 0};
369 module_param_array(exttrans, int, NULL, 0);
372 static int aha152x[] = {0, 11, 7, 1, 1, 0, DELAY_DEFAULT, 0};
373 module_param_array(aha152x, int, NULL, 0);
376 static int aha152x1[] = {0, 11, 7, 1, 1, 0, DELAY_DEFAULT, 0};
377 module_param_array(aha152x1, int, NULL, 0);
383 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1502), 0 },
384 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1505), 0 },
385 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1510), 0 },
386 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1515), 0 },
387 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1520), 0 },
388 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x2015), 0 },
389 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1522), 0 },
390 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x2215), 0 },
391 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1530), 0 },
392 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x3015), 0 },
393 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1532), 0 },
394 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x3215), 0 },
395 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x6360), 0 },
410 idle=0,
484 /* 0: no negotiation;
620 { "idle", NULL, NULL, NULL, 0},
621 { "unknown", NULL, NULL, NULL, 0},
622 { "seldo", NULL, seldo_run, NULL, 0},
623 { "seldi", NULL, seldi_run, NULL, 0},
624 { "selto", NULL, selto_run, NULL, 0},
625 { "busfree", NULL, busfree_run, NULL, 0},
630 { "datai", datai_init, datai_run, datai_end, 0},
631 { "datao", datao_init, datao_run, datao_end, 0},
632 { "parerr", NULL, parerr_run, NULL, 0},
633 { "rsti", NULL, rsti_run, NULL, 0},
743 memset(HOSTDATA(shpnt), 0, sizeof *HOSTDATA(shpnt)); in aha152x_probe_one()
758 HOSTIOPORT0 = setup->io_port+0x10; in aha152x_probe_one()
759 HOSTIOPORT1 = setup->io_port-0x10; in aha152x_probe_one()
779 SETPORT(SCSISEQ, 0); in aha152x_probe_one()
787 "io=0x%03lx (0x%03lx/0x%03lx), " in aha152x_probe_one()
796 GETPORT(REV) & 0x7, in aha152x_probe_one()
807 SETPORT(SIMODE0, 0); in aha152x_probe_one()
808 SETPORT(SIMODE1, 0); in aha152x_probe_one()
815 HOSTDATA(shpnt)->swint = 0; in aha152x_probe_one()
841 SETPORT(SSTAT0, 0x7f); in aha152x_probe_one()
842 SETPORT(SSTAT1, 0xef); in aha152x_probe_one()
904 SETPORT(SIMODE0, ENSELDO | (DISCONNECTED_SC ? ENSELDI : 0)); in setup_expected_interrupts()
907 SETPORT(SIMODE0, (acp->phase & spiordy) ? ENSPIORDY : 0); in setup_expected_interrupts()
911 SETPORT(SIMODE0, 0); in setup_expected_interrupts()
914 SETPORT(SIMODE0, DISCONNECTED_SC ? ENSELDI : 0); in setup_expected_interrupts()
915 SETPORT(SIMODE1, ENSCSIRST | ( (ISSUE_SC||DONE_SC) ? ENBUSFREE : 0)); in setup_expected_interrupts()
936 acp->status = 0x1; /* Illegal status by SCSI standard */ in aha152x_internal_queue()
937 acp->message = 0; in aha152x_internal_queue()
938 acp->sent_command = 0; in aha152x_internal_queue()
964 acp->this_residual = 0; in aha152x_internal_queue()
965 scsi_set_resid(SCpnt, 0); in aha152x_internal_queue()
992 return 0; in aha152x_internal_queue()
1001 return aha152x_internal_queue(SCpnt, NULL, 0); in aha152x_queue_lck()
1044 SETPORT(PORTA, 0); in aha152x_abort()
1091 SCpnt->cmd_len = 0; in aha152x_device_reset()
1110 SETPORT(PORTA, 0); in aha152x_device_reset()
1176 SETPORT(SCSISEQ, 0); in aha152x_bus_reset_host()
1180 if(HOSTDATA(shpnt)->commands==0) in aha152x_bus_reset_host()
1181 SETPORT(PORTA, 0); in aha152x_bus_reset_host()
1208 SETPORT(SCSISEQ, 0); in reset_ports()
1210 SETPORT(SXFRCTL1, 0); in reset_ports()
1211 SETPORT(SCSISIG, 0); in reset_ports()
1212 SETRATE(0); in reset_ports()
1215 SETPORT(SSTAT0, 0x7f); in reset_ports()
1216 SETPORT(SSTAT1, 0xef); in reset_ports()
1220 SETPORT(DMACNTRL0, 0); in reset_ports()
1221 SETPORT(DMACNTRL1, 0); in reset_ports()
1223 SETPORT(BRSTCNTRL, 0xf1); in reset_ports()
1256 info_array[0] = 64; in aha152x_biosparam()
1265 if (scsicam_bios_param(bdev, capacity, info) < 0 || in aha152x_biosparam()
1266 !((info[0] == 64 && info[1] == 32) || (info[0] == 255 && info[1] == 63))) { in aha152x_biosparam()
1271 info_array[0] = 255; in aha152x_biosparam()
1282 info_array[0] = info[0]; in aha152x_biosparam()
1286 if (info[0] == 255 && !EXT_TRANS) { in aha152x_biosparam()
1294 return 0; in aha152x_biosparam()
1360 if ((rev == 0xFF) && (dmacntrl0 == 0xFF)) in intr()
1371 if( HOSTDATA(shpnt)->service==0 ) { in intr()
1392 int action=0; in busfree_run()
1453 SETPORT(PORTA, 0); /* turn led off */ in busfree_run()
1467 scsi_eh_prep_cmnd(ptr, &sc->ses, NULL, 0, ~0); in busfree_run()
1482 SETPORT(PORTA, 0); /* turn led off */ in busfree_run()
1518 SETPORT(SXFRCTL1, (PARITY ? ENSPCHK : 0 ) | ENSTIMER); in busfree_run()
1519 SETPORT(SCSISEQ, ENSELO | ENAUTOATNO | (DISCONNECTED_SC ? ENRESELI : 0)); in busfree_run()
1524 SETPORT(SCSISEQ, DISCONNECTED_SC ? ENRESELI : 0); in busfree_run()
1542 SETPORT(SCSISIG, 0); in seldo_run()
1548 SETPORT(SCSISEQ, 0); in seldo_run()
1565 } else if (SYNCNEG==0 && SYNCHRONOUS) { in seldo_run()
1583 SETPORT(SCSISEQ, 0); in selto_run()
1614 SETPORT(SCSISIG, 0); in seldi_run()
1640 if (selid==0) { in seldi_run()
1656 SETPORT(SCSISEQ, 0); in seldi_run()
1700 if(!(MSGI(0) & IDENTIFY_BASE)) { in msgi_run()
1706 CURRENT_SC = remove_lun_SC(&DISCONNECTED_SC, RECONN_TARGET, MSGI(0) & 0x3f); in msgi_run()
1713 RECONN_TARGET, MSGI(0) & 0x3f); in msgi_run()
1718 acp->message = MSGI(0); in msgi_run()
1721 MSGILEN=0; in msgi_run()
1728 acp->message = MSGI(0); in msgi_run()
1730 switch (MSGI(0)) { in msgi_run()
1781 spi_print_msg(&MSGI(0)); in msgi_run()
1831 for(i=0; i<8; i++) { in msgi_run()
1832 HOSTDATA(shpnt)->syncrate[i]=0; in msgi_run()
1833 HOSTDATA(shpnt)->syncneg[i]=0; in msgi_run()
1849 MSGILEN=0; in msgi_run()
1855 if(MSGILEN>0) in msgi_end()
1860 if (MSGOLEN > 0 && !(GETPORT(SSTAT1) & BUSFREE)) in msgi_end()
1870 if(MSGOLEN==0) { in msgo_init()
1872 SYNCNEG == 2 && SYNCRATE == 0) { in msgo_init()
1927 MSGO_I = 0; in msgo_end()
1928 MSGOLEN = 0; in msgo_end()
1944 CMD_I=0; in cmd_init()
1996 SETPORT(SIMODE0, 0); in datai_init()
1999 DATA_LEN=0; in datai_init()
2043 if (acp->this_residual > 0) { in datai_run()
2044 while (fifodata > 0 && acp->this_residual > 0) { in datai_run()
2065 if (acp->this_residual == 0 && in datai_run()
2073 } else if (fifodata > 0) { in datai_run()
2079 while(fifodata>0) { in datai_run()
2091 GETPORT(FIFOSTAT)>0) { in datai_run()
2115 SETPORT(DMACNTRL0, 0); in datai_end()
2130 SETPORT(SIMODE0, 0); in datao_init()
2143 while (TESTLO(DMASTAT, INTSTAT) && acp->this_residual > 0) { in datao_run()
2171 if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) { in datao_run()
2203 while (done > 0 && !sg_is_last(sg)) { in datao_end()
2218 SETPORT(DMACNTRL0, 0); in datao_end()
2227 int dataphase=0; in update_state()
2236 SETPORT(SCSISEQ,0); in update_state()
2333 if( HOSTDATA(shpnt)->service==0 ) { in is_complete()
2338 HOSTDATA(shpnt)->service = 0; in is_complete()
2371 SETPORT(DMACNTRL0, 0); in is_complete()
2392 SETPORT(DMACNTRL0, 0); in is_complete()
2490 "phase |%s%s%s%s%s%s%s%s%s; next=0x%p", in show_command()
2540 for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++) in get_command()
2541 seq_printf(m, "0x%02x ", ptr->cmnd[i]); in get_command()
2563 seq_printf(m, "; next=0x%p\n", SCNEXT(ptr)); in get_command()
2750 seq_printf(m, "SCSICNT (%d), OFFCNT(%d), ", (s & 0xf0) >> 4, s & 0x0f); in get_ports()
2827 if(!shpnt || !buffer || length<8 || strncmp("aha152x ", buffer, 8)!=0) in aha152x_set_info()
2831 if(length>13 && strncmp("reset", buffer+8, 5)==0) { in aha152x_set_info()
2834 HOSTDATA(shpnt)->total_commands=0; in aha152x_set_info()
2835 HOSTDATA(shpnt)->disconnections=0; in aha152x_set_info()
2836 HOSTDATA(shpnt)->busfree_without_any_action=0; in aha152x_set_info()
2837 HOSTDATA(shpnt)->busfree_without_old_command=0; in aha152x_set_info()
2838 HOSTDATA(shpnt)->busfree_without_new_command=0; in aha152x_set_info()
2839 HOSTDATA(shpnt)->busfree_without_done_command=0; in aha152x_set_info()
2840 HOSTDATA(shpnt)->busfree_with_check_condition=0; in aha152x_set_info()
2842 HOSTDATA(shpnt)->count[i]=0; in aha152x_set_info()
2843 HOSTDATA(shpnt)->count_trans[i]=0; in aha152x_set_info()
2844 HOSTDATA(shpnt)->time[i]=0; in aha152x_set_info()
2867 seq_printf(m, "ioports 0x%04lx to 0x%04lx\n", in aha152x_show_info()
2869 seq_printf(m, "interrupt 0x%02x\n", shpnt->irq); in aha152x_show_info()
2880 for (i = 0; i < 8; i++) in aha152x_show_info()
2881 if (HOSTDATA(shpnt)->syncrate[i] & 0x7f) in aha152x_show_info()
2884 (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2), in aha152x_show_info()
2885 (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2) * 50, in aha152x_show_info()
2886 HOSTDATA(shpnt)->syncrate[i] & 0x0f); in aha152x_show_info()
2933 for(i=0; i<maxstate; i++) { in aha152x_show_info()
2941 return 0; in aha152x_show_info()
2967 static unsigned short ports[] = { 0x340, 0x140 };
2973 0xdc000, /* default first */
2974 0xc8000,
2975 0xcc000,
2976 0xd0000,
2977 0xd4000,
2978 0xd8000,
2979 0xe0000,
2980 0xeb800, /* VTech Platinum SMP */
2981 0xf0000,
2997 { "Adaptec AHA-1520 BIOS", 0x102e, 21 },
2999 { "Adaptec AHA-1520B", 0x000b, 17 },
3001 { "Adaptec AHA-1520B", 0x0026, 17 },
3003 { "Adaptec ASW-B626 BIOS", 0x1029, 21 },
3005 { "Adaptec BIOS: ASW-B626", 0x000f, 22 },
3007 { "Adaptec ASW-B626 S2", 0x2e6c, 19 },
3009 { "Adaptec BIOS:AIC-6360", 0x000c, 21 },
3011 { "ScsiPro SP-360 BIOS", 0x2873, 19 },
3013 { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },
3015 { "Adaptec BIOS:AVA-282X", 0x000c, 21 },
3017 { "Adaptec IBM Dock II SCSI", 0x2edd, 24 },
3019 { "Adaptec BIOS:AHA-1532P", 0x001c, 22 },
3021 { "DTC3520A Host Adapter BIOS", 0x318a, 26 },
3034 SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */ in aha152x_porttest()
3035 for (i = 0; i < 16; i++) in aha152x_porttest()
3038 SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */ in aha152x_porttest()
3039 for (i = 0; i < 16 && GETPORT(io_port + O_STACK) == i; i++) in aha152x_porttest()
3049 SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */ in tc1550_porttest()
3050 for (i = 0; i < 16; i++) in tc1550_porttest()
3053 SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */ in tc1550_porttest()
3054 for (i = 0; i < 16 && GETPORT(io_port + O_TC_STACK) == i; i++) in tc1550_porttest()
3064 for (i = 0; i < ARRAY_SIZE(ports) && (setup->io_port != ports[i]); i++) in checksetup()
3068 return 0; in checksetup()
3071 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port); in checksetup()
3072 return 0; in checksetup()
3076 setup->tc1550=0; in checksetup()
3081 return 0; in checksetup()
3087 return 0; in checksetup()
3089 if ((setup->scsiid < 0) || (setup->scsiid > 7)) in checksetup()
3090 return 0; in checksetup()
3092 if ((setup->reconnect < 0) || (setup->reconnect > 1)) in checksetup()
3093 return 0; in checksetup()
3095 if ((setup->parity < 0) || (setup->parity > 1)) in checksetup()
3096 return 0; in checksetup()
3098 if ((setup->synchronous < 0) || (setup->synchronous > 1)) in checksetup()
3099 return 0; in checksetup()
3101 if ((setup->ext_trans < 0) || (setup->ext_trans > 1)) in checksetup()
3102 return 0; in checksetup()
3122 for (i = 0; i<setup_count; i++) { in aha152x_init()
3135 if (setup_count == 0 || (override.io_port != setup[0].io_port)) { in aha152x_init()
3137 printk(KERN_ERR "\naha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n", in aha152x_init()
3156 if (setup_count == 0 || (override.io_port != setup[0].io_port)) { in aha152x_init()
3158 printk(KERN_ERR "\naha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n", in aha152x_init()
3174 if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) { in aha152x_init()
3175 if(aha152x[0]!=0) { in aha152x_init()
3177 setup[setup_count].io_port = aha152x[0]; in aha152x_init()
3185 } else if (io[0] != 0 || irq[0] != 0) { in aha152x_init()
3186 if(io[0]!=0) setup[setup_count].io_port = io[0]; in aha152x_init()
3187 if(irq[0]!=0) setup[setup_count].irq = irq[0]; in aha152x_init()
3189 setup[setup_count].scsiid = scsiid[0]; in aha152x_init()
3190 setup[setup_count].reconnect = reconnect[0]; in aha152x_init()
3191 setup[setup_count].parity = parity[0]; in aha152x_init()
3192 setup[setup_count].synchronous = sync[0]; in aha152x_init()
3193 setup[setup_count].delay = delay[0]; in aha152x_init()
3194 setup[setup_count].ext_trans = exttrans[0]; in aha152x_init()
3200 …printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,s… in aha152x_init()
3211 if (setup_count<ARRAY_SIZE(setup) && (aha152x1[0]!=0 || io[1]!=0 || irq[1]!=0)) { in aha152x_init()
3212 if(aha152x1[0]!=0) { in aha152x_init()
3214 setup[setup_count].io_port = aha152x1[0]; in aha152x_init()
3222 } else if (io[1] != 0 || irq[1] != 0) { in aha152x_init()
3223 if(io[1]!=0) setup[setup_count].io_port = io[1]; in aha152x_init()
3224 if(irq[1]!=0) setup[setup_count].irq = irq[1]; in aha152x_init()
3236 …printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,s… in aha152x_init()
3249 for(i=0; setup_count<ARRAY_SIZE(setup) && id_table[i].vendor; i++) { in aha152x_init()
3252 if (pnp_device_attach(dev) < 0) in aha152x_init()
3255 if (pnp_activate_dev(dev) < 0) { in aha152x_init()
3260 if (!pnp_port_valid(dev, 0)) { in aha152x_init()
3265 if (setup_count==1 && pnp_port_start(dev, 0)==setup[0].io_port) { in aha152x_init()
3270 setup[setup_count].io_port = pnp_port_start(dev, 0); in aha152x_init()
3271 setup[setup_count].irq = pnp_irq(dev, 0); in aha152x_init()
3277 setup[setup_count].ext_trans = 0; in aha152x_init()
3282 "aha152x: found ISAPnP adapter at io=0x%03x, irq=%d\n", in aha152x_init()
3292 ok = 0; in aha152x_init()
3293 for (i = 0; i < ARRAY_SIZE(addresses) && !ok; i++) { in aha152x_init()
3294 void __iomem *p = ioremap(addresses[i], 0x4000); in aha152x_init()
3297 for (j = 0; j<ARRAY_SIZE(signatures) && !ok; j++) in aha152x_init()
3302 if (!ok && setup_count == 0) in aha152x_init()
3310 ok = 0; in aha152x_init()
3311 for (i = 0; i < ARRAY_SIZE(ports) && setup_count < 2; i++) { in aha152x_init()
3312 if ((setup_count == 1) && (setup[0].io_port == ports[i])) in aha152x_init()
3316 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", ports[i]); in aha152x_init()
3321 setup[setup_count].tc1550 = 0; in aha152x_init()
3345 setup[setup_count].ext_trans = 0; in aha152x_init()
3357 for (i=0; i<setup_count; i++) { in aha152x_init()
3370 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup[i].io_port); in aha152x_init()
3379 return 0; in aha152x_init()
3409 setup[setup_count].io_port = ints[0] >= 1 ? ints[1] : 0x340; in aha152x_setup()
3410 setup[setup_count].irq = ints[0] >= 2 ? ints[2] : 11; in aha152x_setup()
3411 setup[setup_count].scsiid = ints[0] >= 3 ? ints[3] : 7; in aha152x_setup()
3412 setup[setup_count].reconnect = ints[0] >= 4 ? ints[4] : 1; in aha152x_setup()
3413 setup[setup_count].parity = ints[0] >= 5 ? ints[5] : 1; in aha152x_setup()
3414 setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1; in aha152x_setup()
3415 setup[setup_count].delay = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT; in aha152x_setup()
3416 setup[setup_count].ext_trans = ints[0] >= 8 ? ints[8] : 0; in aha152x_setup()
3417 if (ints[0] > 8) in aha152x_setup()