Lines Matching +full:0 +full:xdc000
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()
757 HOSTIOPORT0 = setup->io_port+0x10; in aha152x_probe_one()
758 HOSTIOPORT1 = setup->io_port-0x10; in aha152x_probe_one()
778 SETPORT(SCSISEQ, 0); in aha152x_probe_one()
786 "io=0x%03lx (0x%03lx/0x%03lx), " in aha152x_probe_one()
795 GETPORT(REV) & 0x7, in aha152x_probe_one()
806 SETPORT(SIMODE0, 0); in aha152x_probe_one()
807 SETPORT(SIMODE1, 0); in aha152x_probe_one()
814 HOSTDATA(shpnt)->swint = 0; in aha152x_probe_one()
840 SETPORT(SSTAT0, 0x7f); in aha152x_probe_one()
841 SETPORT(SSTAT1, 0xef); in aha152x_probe_one()
903 SETPORT(SIMODE0, ENSELDO | (DISCONNECTED_SC ? ENSELDI : 0)); in setup_expected_interrupts()
906 SETPORT(SIMODE0, (acp->phase & spiordy) ? ENSPIORDY : 0); in setup_expected_interrupts()
910 SETPORT(SIMODE0, 0); in setup_expected_interrupts()
913 SETPORT(SIMODE0, DISCONNECTED_SC ? ENSELDI : 0); in setup_expected_interrupts()
914 SETPORT(SIMODE1, ENSCSIRST | ( (ISSUE_SC||DONE_SC) ? ENBUSFREE : 0)); in setup_expected_interrupts()
935 acp->status = 0x1; /* Illegal status by SCSI standard */ in aha152x_internal_queue()
936 acp->message = 0; in aha152x_internal_queue()
937 acp->sent_command = 0; in aha152x_internal_queue()
963 acp->this_residual = 0; in aha152x_internal_queue()
964 scsi_set_resid(SCpnt, 0); in aha152x_internal_queue()
991 return 0; in aha152x_internal_queue()
1000 return aha152x_internal_queue(SCpnt, NULL, 0); in aha152x_queue_lck()
1043 SETPORT(PORTA, 0); in aha152x_abort()
1090 SCpnt->cmd_len = 0; in aha152x_device_reset()
1109 SETPORT(PORTA, 0); in aha152x_device_reset()
1175 SETPORT(SCSISEQ, 0); in aha152x_bus_reset_host()
1179 if(HOSTDATA(shpnt)->commands==0) in aha152x_bus_reset_host()
1180 SETPORT(PORTA, 0); in aha152x_bus_reset_host()
1207 SETPORT(SCSISEQ, 0); in reset_ports()
1209 SETPORT(SXFRCTL1, 0); in reset_ports()
1210 SETPORT(SCSISIG, 0); in reset_ports()
1211 SETRATE(0); in reset_ports()
1214 SETPORT(SSTAT0, 0x7f); in reset_ports()
1215 SETPORT(SSTAT1, 0xef); in reset_ports()
1219 SETPORT(DMACNTRL0, 0); in reset_ports()
1220 SETPORT(DMACNTRL1, 0); in reset_ports()
1222 SETPORT(BRSTCNTRL, 0xf1); in reset_ports()
1255 info_array[0] = 64; in aha152x_biosparam()
1264 if (scsicam_bios_param(bdev, capacity, info) < 0 || in aha152x_biosparam()
1265 !((info[0] == 64 && info[1] == 32) || (info[0] == 255 && info[1] == 63))) { in aha152x_biosparam()
1270 info_array[0] = 255; in aha152x_biosparam()
1281 info_array[0] = info[0]; in aha152x_biosparam()
1285 if (info[0] == 255 && !EXT_TRANS) { in aha152x_biosparam()
1293 return 0; in aha152x_biosparam()
1359 if ((rev == 0xFF) && (dmacntrl0 == 0xFF)) in intr()
1370 if( HOSTDATA(shpnt)->service==0 ) { in intr()
1391 int action=0; in busfree_run()
1452 SETPORT(PORTA, 0); /* turn led off */ in busfree_run()
1466 scsi_eh_prep_cmnd(ptr, &sc->ses, NULL, 0, ~0); in busfree_run()
1481 SETPORT(PORTA, 0); /* turn led off */ in busfree_run()
1517 SETPORT(SXFRCTL1, (PARITY ? ENSPCHK : 0 ) | ENSTIMER); in busfree_run()
1518 SETPORT(SCSISEQ, ENSELO | ENAUTOATNO | (DISCONNECTED_SC ? ENRESELI : 0)); in busfree_run()
1523 SETPORT(SCSISEQ, DISCONNECTED_SC ? ENRESELI : 0); in busfree_run()
1541 SETPORT(SCSISIG, 0); in seldo_run()
1547 SETPORT(SCSISEQ, 0); in seldo_run()
1564 } else if (SYNCNEG==0 && SYNCHRONOUS) { in seldo_run()
1582 SETPORT(SCSISEQ, 0); in selto_run()
1613 SETPORT(SCSISIG, 0); in seldi_run()
1639 if (selid==0) { in seldi_run()
1655 SETPORT(SCSISEQ, 0); in seldi_run()
1699 if(!(MSGI(0) & IDENTIFY_BASE)) { in msgi_run()
1705 CURRENT_SC = remove_lun_SC(&DISCONNECTED_SC, RECONN_TARGET, MSGI(0) & 0x3f); in msgi_run()
1712 RECONN_TARGET, MSGI(0) & 0x3f); in msgi_run()
1717 acp->message = MSGI(0); in msgi_run()
1720 MSGILEN=0; in msgi_run()
1727 acp->message = MSGI(0); in msgi_run()
1729 switch (MSGI(0)) { in msgi_run()
1780 spi_print_msg(&MSGI(0)); in msgi_run()
1830 for(i=0; i<8; i++) { in msgi_run()
1831 HOSTDATA(shpnt)->syncrate[i]=0; in msgi_run()
1832 HOSTDATA(shpnt)->syncneg[i]=0; in msgi_run()
1848 MSGILEN=0; in msgi_run()
1854 if(MSGILEN>0) in msgi_end()
1859 if (MSGOLEN > 0 && !(GETPORT(SSTAT1) & BUSFREE)) in msgi_end()
1869 if(MSGOLEN==0) { in msgo_init()
1871 SYNCNEG == 2 && SYNCRATE == 0) { in msgo_init()
1926 MSGO_I = 0; in msgo_end()
1927 MSGOLEN = 0; in msgo_end()
1943 CMD_I=0; in cmd_init()
1995 SETPORT(SIMODE0, 0); in datai_init()
1998 DATA_LEN=0; in datai_init()
2042 if (acp->this_residual > 0) { in datai_run()
2043 while (fifodata > 0 && acp->this_residual > 0) { in datai_run()
2064 if (acp->this_residual == 0 && in datai_run()
2072 } else if (fifodata > 0) { in datai_run()
2078 while(fifodata>0) { in datai_run()
2090 GETPORT(FIFOSTAT)>0) { in datai_run()
2114 SETPORT(DMACNTRL0, 0); in datai_end()
2129 SETPORT(SIMODE0, 0); in datao_init()
2142 while (TESTLO(DMASTAT, INTSTAT) && acp->this_residual > 0) { in datao_run()
2170 if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) { in datao_run()
2202 while (done > 0 && !sg_is_last(sg)) { in datao_end()
2217 SETPORT(DMACNTRL0, 0); in datao_end()
2226 int dataphase=0; in update_state()
2235 SETPORT(SCSISEQ,0); in update_state()
2332 if( HOSTDATA(shpnt)->service==0 ) { in is_complete()
2337 HOSTDATA(shpnt)->service = 0; in is_complete()
2370 SETPORT(DMACNTRL0, 0); in is_complete()
2391 SETPORT(DMACNTRL0, 0); in is_complete()
2489 "phase |%s%s%s%s%s%s%s%s%s; next=0x%p", in show_command()
2539 for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++) in get_command()
2540 seq_printf(m, "0x%02x ", ptr->cmnd[i]); in get_command()
2562 seq_printf(m, "; next=0x%p\n", SCNEXT(ptr)); in get_command()
2749 seq_printf(m, "SCSICNT (%d), OFFCNT(%d), ", (s & 0xf0) >> 4, s & 0x0f); in get_ports()
2826 if(!shpnt || !buffer || length<8 || strncmp("aha152x ", buffer, 8)!=0) in aha152x_set_info()
2830 if(length>13 && strncmp("reset", buffer+8, 5)==0) { in aha152x_set_info()
2833 HOSTDATA(shpnt)->total_commands=0; in aha152x_set_info()
2834 HOSTDATA(shpnt)->disconnections=0; in aha152x_set_info()
2835 HOSTDATA(shpnt)->busfree_without_any_action=0; in aha152x_set_info()
2836 HOSTDATA(shpnt)->busfree_without_old_command=0; in aha152x_set_info()
2837 HOSTDATA(shpnt)->busfree_without_new_command=0; in aha152x_set_info()
2838 HOSTDATA(shpnt)->busfree_without_done_command=0; in aha152x_set_info()
2839 HOSTDATA(shpnt)->busfree_with_check_condition=0; in aha152x_set_info()
2841 HOSTDATA(shpnt)->count[i]=0; in aha152x_set_info()
2842 HOSTDATA(shpnt)->count_trans[i]=0; in aha152x_set_info()
2843 HOSTDATA(shpnt)->time[i]=0; in aha152x_set_info()
2866 seq_printf(m, "ioports 0x%04lx to 0x%04lx\n", in aha152x_show_info()
2868 seq_printf(m, "interrupt 0x%02x\n", shpnt->irq); in aha152x_show_info()
2879 for (i = 0; i < 8; i++) in aha152x_show_info()
2880 if (HOSTDATA(shpnt)->syncrate[i] & 0x7f) in aha152x_show_info()
2883 (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2), in aha152x_show_info()
2884 (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2) * 50, in aha152x_show_info()
2885 HOSTDATA(shpnt)->syncrate[i] & 0x0f); in aha152x_show_info()
2932 for(i=0; i<maxstate; i++) { in aha152x_show_info()
2940 return 0; in aha152x_show_info()
2946 return 0; in aha152x_adjust_queue()
2973 static unsigned short ports[] = { 0x340, 0x140 };
2979 0xdc000, /* default first */
2980 0xc8000,
2981 0xcc000,
2982 0xd0000,
2983 0xd4000,
2984 0xd8000,
2985 0xe0000,
2986 0xeb800, /* VTech Platinum SMP */
2987 0xf0000,
3003 { "Adaptec AHA-1520 BIOS", 0x102e, 21 },
3005 { "Adaptec AHA-1520B", 0x000b, 17 },
3007 { "Adaptec AHA-1520B", 0x0026, 17 },
3009 { "Adaptec ASW-B626 BIOS", 0x1029, 21 },
3011 { "Adaptec BIOS: ASW-B626", 0x000f, 22 },
3013 { "Adaptec ASW-B626 S2", 0x2e6c, 19 },
3015 { "Adaptec BIOS:AIC-6360", 0x000c, 21 },
3017 { "ScsiPro SP-360 BIOS", 0x2873, 19 },
3019 { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },
3021 { "Adaptec BIOS:AVA-282X", 0x000c, 21 },
3023 { "Adaptec IBM Dock II SCSI", 0x2edd, 24 },
3025 { "Adaptec BIOS:AHA-1532P", 0x001c, 22 },
3027 { "DTC3520A Host Adapter BIOS", 0x318a, 26 },
3040 SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */ in aha152x_porttest()
3041 for (i = 0; i < 16; i++) in aha152x_porttest()
3044 SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */ in aha152x_porttest()
3045 for (i = 0; i < 16 && GETPORT(io_port + O_STACK) == i; i++) in aha152x_porttest()
3055 SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */ in tc1550_porttest()
3056 for (i = 0; i < 16; i++) in tc1550_porttest()
3059 SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */ in tc1550_porttest()
3060 for (i = 0; i < 16 && GETPORT(io_port + O_TC_STACK) == i; i++) in tc1550_porttest()
3070 for (i = 0; i < ARRAY_SIZE(ports) && (setup->io_port != ports[i]); i++) in checksetup()
3074 return 0; in checksetup()
3077 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port); in checksetup()
3078 return 0; in checksetup()
3082 setup->tc1550=0; in checksetup()
3087 return 0; in checksetup()
3093 return 0; in checksetup()
3095 if ((setup->scsiid < 0) || (setup->scsiid > 7)) in checksetup()
3096 return 0; in checksetup()
3098 if ((setup->reconnect < 0) || (setup->reconnect > 1)) in checksetup()
3099 return 0; in checksetup()
3101 if ((setup->parity < 0) || (setup->parity > 1)) in checksetup()
3102 return 0; in checksetup()
3104 if ((setup->synchronous < 0) || (setup->synchronous > 1)) in checksetup()
3105 return 0; in checksetup()
3107 if ((setup->ext_trans < 0) || (setup->ext_trans > 1)) in checksetup()
3108 return 0; in checksetup()
3128 for (i = 0; i<setup_count; i++) { in aha152x_init()
3141 if (setup_count == 0 || (override.io_port != setup[0].io_port)) { in aha152x_init()
3143 printk(KERN_ERR "\naha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n", in aha152x_init()
3162 if (setup_count == 0 || (override.io_port != setup[0].io_port)) { in aha152x_init()
3164 printk(KERN_ERR "\naha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n", in aha152x_init()
3180 if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) { in aha152x_init()
3181 if(aha152x[0]!=0) { in aha152x_init()
3183 setup[setup_count].io_port = aha152x[0]; in aha152x_init()
3191 } else if (io[0] != 0 || irq[0] != 0) { in aha152x_init()
3192 if(io[0]!=0) setup[setup_count].io_port = io[0]; in aha152x_init()
3193 if(irq[0]!=0) setup[setup_count].irq = irq[0]; in aha152x_init()
3195 setup[setup_count].scsiid = scsiid[0]; in aha152x_init()
3196 setup[setup_count].reconnect = reconnect[0]; in aha152x_init()
3197 setup[setup_count].parity = parity[0]; in aha152x_init()
3198 setup[setup_count].synchronous = sync[0]; in aha152x_init()
3199 setup[setup_count].delay = delay[0]; in aha152x_init()
3200 setup[setup_count].ext_trans = exttrans[0]; in aha152x_init()
3206 …printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,s… in aha152x_init()
3217 if (setup_count<ARRAY_SIZE(setup) && (aha152x1[0]!=0 || io[1]!=0 || irq[1]!=0)) { in aha152x_init()
3218 if(aha152x1[0]!=0) { in aha152x_init()
3220 setup[setup_count].io_port = aha152x1[0]; in aha152x_init()
3228 } else if (io[1] != 0 || irq[1] != 0) { in aha152x_init()
3229 if(io[1]!=0) setup[setup_count].io_port = io[1]; in aha152x_init()
3230 if(irq[1]!=0) setup[setup_count].irq = irq[1]; in aha152x_init()
3242 …printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,s… in aha152x_init()
3255 for(i=0; setup_count<ARRAY_SIZE(setup) && id_table[i].vendor; i++) { in aha152x_init()
3258 if (pnp_device_attach(dev) < 0) in aha152x_init()
3261 if (pnp_activate_dev(dev) < 0) { in aha152x_init()
3266 if (!pnp_port_valid(dev, 0)) { in aha152x_init()
3271 if (setup_count==1 && pnp_port_start(dev, 0)==setup[0].io_port) { in aha152x_init()
3276 setup[setup_count].io_port = pnp_port_start(dev, 0); in aha152x_init()
3277 setup[setup_count].irq = pnp_irq(dev, 0); in aha152x_init()
3283 setup[setup_count].ext_trans = 0; in aha152x_init()
3288 "aha152x: found ISAPnP adapter at io=0x%03x, irq=%d\n", in aha152x_init()
3298 ok = 0; in aha152x_init()
3299 for (i = 0; i < ARRAY_SIZE(addresses) && !ok; i++) { in aha152x_init()
3300 void __iomem *p = ioremap(addresses[i], 0x4000); in aha152x_init()
3303 for (j = 0; j<ARRAY_SIZE(signatures) && !ok; j++) in aha152x_init()
3308 if (!ok && setup_count == 0) in aha152x_init()
3316 ok = 0; in aha152x_init()
3317 for (i = 0; i < ARRAY_SIZE(ports) && setup_count < 2; i++) { in aha152x_init()
3318 if ((setup_count == 1) && (setup[0].io_port == ports[i])) in aha152x_init()
3322 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", ports[i]); in aha152x_init()
3327 setup[setup_count].tc1550 = 0; in aha152x_init()
3351 setup[setup_count].ext_trans = 0; in aha152x_init()
3363 for (i=0; i<setup_count; i++) { in aha152x_init()
3376 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup[i].io_port); in aha152x_init()
3385 return 0; in aha152x_init()
3415 setup[setup_count].io_port = ints[0] >= 1 ? ints[1] : 0x340; in aha152x_setup()
3416 setup[setup_count].irq = ints[0] >= 2 ? ints[2] : 11; in aha152x_setup()
3417 setup[setup_count].scsiid = ints[0] >= 3 ? ints[3] : 7; in aha152x_setup()
3418 setup[setup_count].reconnect = ints[0] >= 4 ? ints[4] : 1; in aha152x_setup()
3419 setup[setup_count].parity = ints[0] >= 5 ? ints[5] : 1; in aha152x_setup()
3420 setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1; in aha152x_setup()
3421 setup[setup_count].delay = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT; in aha152x_setup()
3422 setup[setup_count].ext_trans = ints[0] >= 8 ? ints[8] : 0; in aha152x_setup()
3423 if (ints[0] > 8) in aha152x_setup()