Lines Matching refs:tmport
55 unsigned int workport, tmport, tmport1;
65 tmport = dev->ioport[c] + 0x1f;
66 j = inb(tmport);
103 tmport -= 0x08;
105 i = inb(tmport);
113 tmport -= 0x02;
114 target_id = inb(tmport);
115 tmport += 0x02;
143 tmport -= 0x05;
145 ((unsigned char *) &adrcnt)[2] = inb(tmport++);
146 ((unsigned char *) &adrcnt)[1] = inb(tmport++);
147 ((unsigned char *) &adrcnt)[0] = inb(tmport);
156 printk("tmport = %x dev->id[c][target_id].last_len = %d dev->id[c][target_id].tran_len = %d\n",tmport,dev->id[c][target_id].last_len,dev->id[c][target_id].tran_len);
164 tmport = workport + 0x1b;
165 outb(0x01, tmport);
166 while ((inb(tmport) & 0x01) != 0x01) {
167 outb(0x01, tmport);
202 tmport -= 0x05;
204 ((unsigned char *) &adrcnt)[2] = inb(tmport++);
205 ((unsigned char *) &adrcnt)[1] = inb(tmport++);
206 ((unsigned char *) &adrcnt)[0] = inb(tmport);
211 tmport -= 0x04;
212 outb(0x41, tmport);
213 tmport += 0x08;
214 outb(0x08, tmport);
233 tmport -= 0x07;
235 tmport += 0x0d;
236 lun = inb(tmport) & 0x07;
245 tmport += 0x02;
247 ((unsigned char *) &adrcnt)[2] = inb(tmport++);
248 ((unsigned char *) &adrcnt)[1] = inb(tmport++);
249 ((unsigned char *) &adrcnt)[0] = inb(tmport);
254 tmport += 0x04;
255 outb(0x08, tmport);
262 outb(0x46, tmport);
264 tmport += 0x02;
265 outb(0x00, tmport++);
266 outb(0x00, tmport++);
267 outb(0x00, tmport++);
268 tmport += 0x03;
269 outb(0x08, tmport);
280 tmport = workport + 0x16;
282 tmport = workport + 0x10;
283 outb(0x45, tmport);
284 tmport += 0x06;
287 target_id = inb(tmport);
297 tmport = workport + 0x10;
298 outb(0x45, tmport);
308 tmport = workport + 0x0f;
309 outb(lun, tmport);
310 tmport += 0x02;
311 outb(dev->id[c][target_id].devsp, tmport++);
315 outb(((unsigned char *) &k)[2], tmport++);
316 outb(((unsigned char *) &k)[1], tmport++);
317 outb(((unsigned char *) &k)[0], tmport++);
319 printk("k %x, k[0] 0x%x k[1] 0x%x k[2] 0x%x\n", k, inb(tmport-1), inb(tmport-2), inb(tmport-3));
328 outb(j, tmport++);
329 outb(0x80,tmport);
342 tmport = workport - 0x05;
344 outb((unsigned char) ((inb(tmport) & 0x3f) | 0xc0), tmport);
346 outb((unsigned char) (inb(tmport) & 0x3f), tmport);
349 tmport = workport + 0x3a;
351 outb((unsigned char) ((inb(tmport) & 0xf3) | 0x08), tmport);
353 outb((unsigned char) (inb(tmport) & 0xf3), tmport);
356 tmport = workport + 0x1b;
366 outb(j, tmport);
367 while ((inb(tmport) & 0x01) != j) {
368 outb(j,tmport);
371 tmport = workport + 0x18;
372 outb(0x08, tmport);
418 tmport = workport + 0x18;
423 outb(0x08, tmport);
431 outb(0x08, tmport);
460 tmport -= 0x08;
461 errstus = inb(tmport);
492 tmport = workport + 0x1b;
493 outb(0x01, tmport);
494 while ((inb(tmport) & 0x01) != 0x01) {
495 outb(0x01, tmport);
527 tmport = workport + 0x10;
528 outb(0x41, tmport);
530 tmport += 2;
532 outb((unsigned char) (((unsigned char *) (&k))[2]), tmport++);
533 outb((unsigned char) (((unsigned char *) (&k))[1]), tmport++);
534 outb((unsigned char) (((unsigned char *) (&k))[0]), tmport);
536 tmport += 0x04;
539 tmport += 0x08;
541 outb(0x08, tmport);
553 tmport = workport + 0x10;
554 outb(0x41, tmport);
556 tmport += 2;
558 outb((unsigned char) (((unsigned char *) (&k))[2]), tmport++);
559 outb((unsigned char) (((unsigned char *) (&k))[1]), tmport++);
560 outb((unsigned char) (((unsigned char *) (&k))[0]), tmport++);
562 tmport += 5;
564 outb((unsigned char) (inb(tmport) | 0x20), tmport);
566 tmport += 0x03;
567 outb(0x08, tmport);
572 tmport -= 0x07;
574 outb(0x30, tmport);
576 outb(0x46, tmport);
579 tmport += 0x02;
580 outb(0x00, tmport++);
581 outb(0x00, tmport++);
582 outb(0x00, tmport++);
583 tmport += 0x03;
584 outb(0x08, tmport);
588 // tmport = workport + 0x17;
589 // inb(tmport);
612 unsigned int tmport,m;
681 tmport = dev->ioport[c] + 0x1c;
683 printk("dev->ioport[c] = %x inb(tmport) = %x dev->in_int[%d] = %d dev->in_snd[%d] = %d\n",dev->ioport[c],inb(tmport),c,dev->in_int[c],c,dev->in_snd[c]);
685 if ((inb(tmport) == 0) && (dev->in_int[c] == 0) && (dev->in_snd[c] == 0)) {
708 unsigned int tmport;
762 tmport = workport + 0x1f;
763 if ((inb(tmport) & 0xb0) != 0) {
766 tmport = workport + 0x1c;
767 if (inb(tmport) == 0) {
802 tmport = workport + 0x1b;
814 outb(j, tmport);
815 while ((inb(tmport) & 0x01) != j) {
816 outb(j,tmport);
825 tmport = workport;
826 outb(workreq->cmd_len, tmport++);
827 outb(0x2c, tmport++);
829 outb(0x7f, tmport++);
831 outb(0xcf, tmport++);
834 outb(workreq->cmnd[i], tmport++);
836 tmport = workport + 0x0f;
837 outb(workreq->device->lun, tmport);
838 tmport += 0x02;
842 outb(dev->id[c][target_id].devsp, tmport++);
851 outb((unsigned char) (((unsigned char *) (&l))[2]), tmport++);
852 outb((unsigned char) (((unsigned char *) (&l))[1]), tmport++);
853 outb((unsigned char) (((unsigned char *) (&l))[0]), tmport++);
870 outb((unsigned char) (j | 0x20), tmport++);
872 outb(j, tmport++);
874 outb((unsigned char) (inb(tmport) | 0x80), tmport);
875 outb(0x80, tmport);
876 tmport = workport + 0x1c;
879 if (inb(tmport) == 0) {
880 tmport = workport + 0x18;
884 outb(0x08, tmport);
949 tmport = workport - 0x05;
951 outb((unsigned char) ((inb(tmport) & 0x3f) | 0xc0), tmport);
953 outb((unsigned char) (inb(tmport) & 0x3f), tmport);
957 tmport = workport + 0x3a;
959 outb((inb(tmport) & 0xf3) | 0x08, tmport);
961 outb(inb(tmport) & 0xf3, tmport);
964 tmport = workport + 0x1c;
968 if (inb(tmport) == 0) {
969 tmport = workport + 0x18;
970 outb(0x08, tmport);
981 if (inb(tmport) == 0) {
982 tmport = workport + 0x18;
983 outb(0x08, tmport);
998 unsigned int tmport;
1002 tmport = dev->ioport[0] + 0x1c;
1003 outw(*val, tmport);
1006 k = inw(tmport);
1013 outw(*val, tmport);
1015 outw(*val, tmport);
1018 if ((inw(tmport) & 0x2000) != 0) { /* DB5 all release? */
1024 outw(*val, tmport);
1026 outw(*val, tmport);
1029 if ((inw(tmport) & 0x4000) != 0) { /* DB6 all release? */
1040 unsigned int tmport;
1057 tmport = dev->ioport[0] + 1;
1058 outb(0x08, tmport++);
1059 outb(0x7f, tmport);
1060 tmport = dev->ioport[0] + 0x11;
1061 outb(0x20, tmport);
1074 tmport = dev->ioport[0] + 0x02;
1075 outb(0x02, tmport++); /* 2*2=4ms,3EH 2/32*3E=3.9ms */
1076 outb(0, tmport++);
1077 outb(0, tmport++);
1078 outb(0, tmport++);
1079 outb(0, tmport++);
1080 outb(0, tmport++);
1081 outb(0, tmport++);
1089 tmport = dev->ioport[0] + 0x0f;
1090 outb(0, tmport++);
1091 tmport += 0x02;
1092 outb(0, tmport++);
1093 outb(0, tmport++);
1094 outb(0, tmport++);
1100 outb(k, tmport++);
1101 tmport = dev->ioport[0] + 0x1b;
1103 outb(0x01, tmport);
1105 outb(0x00, tmport);
1108 tmport = dev->ioport[0] + 0x18;
1109 outb(0x09, tmport);
1110 tmport += 0x07;
1112 while ((inb(tmport) & 0x80) == 0x00)
1114 tmport -= 0x08;
1115 k = inb(tmport);
1120 tmport = dev->ioport[0] + 0x10;
1121 outb(0x41, tmport);
1127 tmport = dev->ioport[0] + 0x02;
1128 outb(0x7f, tmport);
1129 tmport = dev->ioport[0] + 0x1b;
1130 outb(0x02, tmport);
1135 tmport = dev->ioport[0] + 0x1c;
1136 outw(val, tmport);
1138 outw(val, tmport);
1140 outw(val, tmport);
1143 outw(val, tmport);
1146 outw(val, tmport);
1148 if ((inb(tmport) & 0x04) != 0) {
1154 if ((inb(tmport) & 0x80) != 0) { /* bsy ? */
1161 if ((inb(tmport) & 0x81) == 0x0081) {
1169 outw(val, tmport);
1172 outw(val, tmport);
1176 if ((inb(tmport) & 0x80) == 0x00) { /* bsy ? */
1177 outw(0, tmport--);
1178 outb(0, tmport);
1179 tmport = dev->ioport[0] + 0x15;
1180 outb(0, tmport);
1181 tmport += 0x03;
1182 outb(0x09, tmport);
1183 tmport += 0x07;
1184 while ((inb(tmport) & 0x80) == 0)
1186 tmport -= 0x08;
1187 inb(tmport);
1201 if ((inw(tmport) & 0x2000) == 0) {
1283 unsigned int tmport;
1294 tmport = wkport + 0x3a;
1295 outb((unsigned char) (inb(tmport) | 0x10), tmport);
1310 tmport = wkport + 0x1b;
1312 outb(0x01, tmport);
1314 outb(0x00, tmport);
1316 tmport = wkport + 1;
1317 outb(0x08, tmport++);
1318 outb(0x7f, tmport++);
1319 outb(satn[0], tmport++);
1320 outb(satn[1], tmport++);
1321 outb(satn[2], tmport++);
1322 outb(satn[3], tmport++);
1323 outb(satn[4], tmport++);
1324 outb(satn[5], tmport++);
1325 tmport += 0x06;
1326 outb(0, tmport);
1327 tmport += 0x02;
1328 outb(dev->id[0][i].devsp, tmport++);
1329 outb(0, tmport++);
1330 outb(satn[6], tmport++);
1331 outb(satn[7], tmport++);
1336 outb(j, tmport);
1337 tmport += 0x03;
1338 outb(satn[8], tmport);
1339 tmport += 0x07;
1341 while ((inb(tmport) & 0x80) == 0x00)
1344 tmport -= 0x08;
1345 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
1348 while (inb(tmport) != 0x8e)
1353 tmport = wkport + 0x10;
1354 outb(0x30, tmport);
1355 tmport = wkport + 0x04;
1356 outb(0x00, tmport);
1359 tmport = wkport + 0x18;
1360 outb(0x08, tmport);
1361 tmport += 0x07;
1362 while ((inb(tmport) & 0x80) == 0x00)
1364 tmport -= 0x08;
1365 j = inb(tmport);
1367 tmport = wkport + 0x10;
1368 outb(0x41, tmport);
1372 tmport = wkport + 3;
1373 outb(inqd[0], tmport++);
1374 outb(inqd[1], tmport++);
1375 outb(inqd[2], tmport++);
1376 outb(inqd[3], tmport++);
1377 outb(inqd[4], tmport++);
1378 outb(inqd[5], tmport);
1379 tmport += 0x07;
1380 outb(0, tmport);
1381 tmport += 0x02;
1382 outb(dev->id[0][i].devsp, tmport++);
1383 outb(0, tmport++);
1384 outb(inqd[6], tmport++);
1385 outb(inqd[7], tmport++);
1386 tmport += 0x03;
1387 outb(inqd[8], tmport);
1388 tmport += 0x07;
1390 while ((inb(tmport) & 0x80) == 0x00)
1393 tmport -= 0x08;
1394 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
1397 while (inb(tmport) != 0x8e)
1400 tmport = wkport + 0x1b;
1402 outb(0x00, tmport);
1404 tmport = wkport + 0x18;
1405 outb(0x08, tmport);
1406 tmport += 0x07;
1409 k = inb(tmport);
1411 tmport -= 0x06;
1412 mbuf[j++] = inb(tmport);
1413 tmport += 0x06;
1419 tmport -= 0x08;
1420 j = inb(tmport);
1424 tmport = wkport + 0x10;
1425 outb(0x46, tmport);
1426 tmport += 0x02;
1427 outb(0, tmport++);
1428 outb(0, tmport++);
1429 outb(0, tmport++);
1430 tmport += 0x03;
1431 outb(0x08, tmport);
1432 tmport += 0x07;
1434 while ((inb(tmport) & 0x80) == 0x00)
1437 tmport -= 0x08;
1438 if (inb(tmport) != 0x16) {
1456 tmport = wkport + 0x1b;
1457 outb(0x01, tmport);
1458 tmport = wkport + 3;
1459 outb(satn[0], tmport++);
1460 outb(satn[1], tmport++);
1461 outb(satn[2], tmport++);
1462 outb(satn[3], tmport++);
1463 outb(satn[4], tmport++);
1464 outb(satn[5], tmport++);
1465 tmport += 0x06;
1466 outb(0, tmport);
1467 tmport += 0x02;
1468 outb(dev->id[0][i].devsp, tmport++);
1469 outb(0, tmport++);
1470 outb(satn[6], tmport++);
1471 outb(satn[7], tmport++);
1472 tmport += 0x03;
1473 outb(satn[8], tmport);
1474 tmport += 0x07;
1476 while ((inb(tmport) & 0x80) == 0x00)
1479 tmport -= 0x08;
1480 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
1483 while (inb(tmport) != 0x8e)
1488 tmport = wkport + 0x14;
1489 outb(0x05, tmport);
1490 tmport += 0x04;
1491 outb(0x20, tmport);
1492 tmport += 0x07;
1494 while ((inb(tmport) & 0x80) == 0) {
1495 if ((inb(tmport) & 0x01) != 0) {
1496 tmport -= 0x06;
1497 outb(wide[j++], tmport);
1498 tmport += 0x06;
1501 tmport -= 0x08;
1503 while ((inb(tmport) & 0x80) == 0x00)
1506 j = inb(tmport) & 0x0f;
1518 tmport = wkport + 0x18;
1519 outb(0x20, tmport);
1520 tmport += 0x07;
1521 while ((inb(tmport) & 0x80) == 0) {
1522 if ((inb(tmport) & 0x01) != 0) {
1523 tmport -= 0x06;
1524 outb(0, tmport);
1525 tmport += 0x06;
1528 tmport -= 0x08;
1529 j = inb(tmport) & 0x0f;
1541 tmport = wkport + 0x14;
1542 outb(0xff, tmport);
1543 tmport += 0x04;
1544 outb(0x20, tmport);
1545 tmport += 0x07;
1548 j = inb(tmport);
1550 tmport -= 0x06;
1551 mbuf[k++] = inb(tmport);
1552 tmport += 0x06;
1558 tmport -= 0x08;
1559 j = inb(tmport) & 0x0f;
1571 tmport = wkport + 0x10;
1572 outb(0x30, tmport);
1573 tmport = wkport + 0x14;
1574 outb(0x00, tmport);
1575 tmport += 0x04;
1576 outb(0x08, tmport);
1577 tmport += 0x07;
1579 while ((inb(tmport) & 0x80) == 0x00)
1582 tmport -= 0x08;
1583 j = inb(tmport);
1611 tmport = wkport + 0x1b;
1616 outb(j, tmport);
1617 tmport = wkport + 3;
1618 outb(satn[0], tmport++);
1619 outb(satn[1], tmport++);
1620 outb(satn[2], tmport++);
1621 outb(satn[3], tmport++);
1622 outb(satn[4], tmport++);
1623 outb(satn[5], tmport++);
1624 tmport += 0x06;
1625 outb(0, tmport);
1626 tmport += 0x02;
1627 outb(dev->id[0][i].devsp, tmport++);
1628 outb(0, tmport++);
1629 outb(satn[6], tmport++);
1630 outb(satn[7], tmport++);
1631 tmport += 0x03;
1632 outb(satn[8], tmport);
1633 tmport += 0x07;
1635 while ((inb(tmport) & 0x80) == 0x00)
1638 tmport -= 0x08;
1639 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
1642 while (inb(tmport) != 0x8e)
1647 tmport = wkport + 0x14;
1648 outb(0x06, tmport);
1649 tmport += 0x04;
1650 outb(0x20, tmport);
1651 tmport += 0x07;
1653 while ((inb(tmport) & 0x80) == 0) {
1654 if ((inb(tmport) & 0x01) != 0) {
1655 tmport -= 0x06;
1657 outb(synw[j++], tmport);
1660 outb(synu[j++], tmport);
1662 outb(synn[j++], tmport);
1665 tmport += 0x06;
1668 tmport -= 0x08;
1670 while ((inb(tmport) & 0x80) == 0x00)
1673 j = inb(tmport) & 0x0f;
1685 tmport = wkport + 0x18;
1686 outb(0x20, tmport);
1687 tmport += 0x07;
1688 while ((inb(tmport) & 0x80) == 0x00) {
1689 if ((inb(tmport) & 0x01) != 0x00) {
1690 tmport -= 0x06;
1691 outb(0x00, tmport);
1692 tmport += 0x06;
1695 tmport -= 0x08;
1696 j = inb(tmport);
1712 tmport = wkport + 0x14;
1713 outb(0xff, tmport);
1714 tmport += 0x04;
1715 outb(0x20, tmport);
1716 tmport += 0x07;
1719 j = inb(tmport);
1721 tmport -= 0x06;
1722 mbuf[k++] = inb(tmport);
1723 tmport += 0x06;
1729 tmport -= 0x08;
1731 while ((inb(tmport) & 0x80) == 0x00)
1734 j = inb(tmport);
1750 tmport = wkport + 0x10;
1751 outb(0x30, tmport);
1753 tmport = wkport + 0x14;
1754 outb(0x00, tmport);
1755 tmport += 0x04;
1756 outb(0x08, tmport);
1757 tmport += 0x07;
1759 while ((inb(tmport) & 0x80) == 0x00)
1762 tmport -= 0x08;
1763 j = inb(tmport);
1803 tmport = wkport + 0x3a;
1804 outb((unsigned char) (inb(tmport) & 0xef), tmport);
1809 unsigned int tmport;
1834 tmport = wkport + 0x5b;
1835 outb(0x01, tmport);
1836 tmport = wkport + 0x41;
1837 outb(0x08, tmport++);
1838 outb(0x7f, tmport++);
1839 outb(satn[0], tmport++);
1840 outb(satn[1], tmport++);
1841 outb(satn[2], tmport++);
1842 outb(satn[3], tmport++);
1843 outb(satn[4], tmport++);
1844 outb(satn[5], tmport++);
1845 tmport += 0x06;
1846 outb(0, tmport);
1847 tmport += 0x02;
1848 outb(dev->id[0][i].devsp, tmport++);
1849 outb(0, tmport++);
1850 outb(satn[6], tmport++);
1851 outb(satn[7], tmport++);
1856 outb(j, tmport);
1857 tmport += 0x03;
1858 outb(satn[8], tmport);
1859 tmport += 0x07;
1861 while ((inb(tmport) & 0x80) == 0x00)
1864 tmport -= 0x08;
1865 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
1868 while (inb(tmport) != 0x8e)
1873 tmport = wkport + 0x50;
1874 outb(0x30, tmport);
1875 tmport = wkport + 0x54;
1876 outb(0x00, tmport);
1879 tmport = wkport + 0x58;
1880 outb(0x08, tmport);
1881 tmport += 0x07;
1883 while ((inb(tmport) & 0x80) == 0x00)
1886 tmport -= 0x08;
1887 j = inb(tmport);
1889 tmport = wkport + 0x50;
1890 outb(0x41, tmport);
1894 tmport = wkport + 0x43;
1895 outb(inqd[0], tmport++);
1896 outb(inqd[1], tmport++);
1897 outb(inqd[2], tmport++);
1898 outb(inqd[3], tmport++);
1899 outb(inqd[4], tmport++);
1900 outb(inqd[5], tmport);
1901 tmport += 0x07;
1902 outb(0, tmport);
1903 tmport += 0x02;
1904 outb(dev->id[0][i].devsp, tmport++);
1905 outb(0, tmport++);
1906 outb(inqd[6], tmport++);
1907 outb(inqd[7], tmport++);
1908 tmport += 0x03;
1909 outb(inqd[8], tmport);
1910 tmport += 0x07;
1912 while ((inb(tmport) & 0x80) == 0x00)
1915 tmport -= 0x08;
1916 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
1919 while (inb(tmport) != 0x8e)
1922 tmport = wkport + 0x5b;
1923 outb(0x00, tmport);
1924 tmport = wkport + 0x58;
1925 outb(0x08, tmport);
1926 tmport += 0x07;
1929 k = inb(tmport);
1931 tmport -= 0x06;
1932 mbuf[j++] = inb(tmport);
1933 tmport += 0x06;
1939 tmport -= 0x08;
1940 j = inb(tmport);
1944 tmport = wkport + 0x50;
1945 outb(0x46, tmport);
1946 tmport += 0x02;
1947 outb(0, tmport++);
1948 outb(0, tmport++);
1949 outb(0, tmport++);
1950 tmport += 0x03;
1951 outb(0x08, tmport);
1952 tmport += 0x07;
1953 while ((inb(tmport) & 0x80) == 0x00)
1956 tmport -= 0x08;
1957 if (inb(tmport) != 0x16)
1980 tmport = wkport + 0x5b;
1981 outb(0x01, tmport);
1982 tmport = wkport + 0x43;
1983 outb(satn[0], tmport++);
1984 outb(satn[1], tmport++);
1985 outb(satn[2], tmport++);
1986 outb(satn[3], tmport++);
1987 outb(satn[4], tmport++);
1988 outb(satn[5], tmport++);
1989 tmport += 0x06;
1990 outb(0, tmport);
1991 tmport += 0x02;
1992 outb(dev->id[0][i].devsp, tmport++);
1993 outb(0, tmport++);
1994 outb(satn[6], tmport++);
1995 outb(satn[7], tmport++);
1996 tmport += 0x03;
1997 outb(satn[8], tmport);
1998 tmport += 0x07;
2000 while ((inb(tmport) & 0x80) == 0x00)
2003 tmport -= 0x08;
2005 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
2008 while (inb(tmport) != 0x8e)
2013 tmport = wkport + 0x54;
2014 outb(0x09, tmport);
2015 tmport += 0x04;
2016 outb(0x20, tmport);
2017 tmport += 0x07;
2019 while ((inb(tmport) & 0x80) == 0) {
2020 if ((inb(tmport) & 0x01) != 0) {
2021 tmport -= 0x06;
2022 outb(u3[j++], tmport);
2023 tmport += 0x06;
2026 tmport -= 0x08;
2028 while ((inb(tmport) & 0x80) == 0x00)
2031 j = inb(tmport) & 0x0f;
2043 tmport = wkport + 0x58;
2044 outb(0x20, tmport);
2045 tmport += 0x07;
2046 while ((inb(tmport) & 0x80) == 0) {
2047 if ((inb(tmport) & 0x01) != 0) {
2048 tmport -= 0x06;
2049 outb(0, tmport);
2050 tmport += 0x06;
2053 tmport -= 0x08;
2054 j = inb(tmport) & 0x0f;
2066 tmport = wkport + 0x54;
2067 outb(0x09, tmport);
2068 tmport += 0x04;
2069 outb(0x20, tmport);
2070 tmport += 0x07;
2073 j = inb(tmport);
2075 tmport -= 0x06;
2076 mbuf[k++] = inb(tmport);
2077 tmport += 0x06;
2083 tmport -= 0x08;
2084 j = inb(tmport) & 0x0f;
2096 tmport = wkport + 0x50;
2097 outb(0x30, tmport);
2098 tmport = wkport + 0x54;
2099 outb(0x00, tmport);
2100 tmport += 0x04;
2101 outb(0x08, tmport);
2102 tmport += 0x07;
2104 while ((inb(tmport) & 0x80) == 0x00)
2107 tmport -= 0x08;
2108 j = inb(tmport);
2132 tmport = wkport + 0x5b;
2133 outb(0x01, tmport);
2134 tmport = wkport + 0x43;
2135 outb(satn[0], tmport++);
2136 outb(satn[1], tmport++);
2137 outb(satn[2], tmport++);
2138 outb(satn[3], tmport++);
2139 outb(satn[4], tmport++);
2140 outb(satn[5], tmport++);
2141 tmport += 0x06;
2142 outb(0, tmport);
2143 tmport += 0x02;
2144 outb(dev->id[0][i].devsp, tmport++);
2145 outb(0, tmport++);
2146 outb(satn[6], tmport++);
2147 outb(satn[7], tmport++);
2148 tmport += 0x03;
2149 outb(satn[8], tmport);
2150 tmport += 0x07;
2152 while ((inb(tmport) & 0x80) == 0x00)
2155 tmport -= 0x08;
2156 if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
2159 while (inb(tmport) != 0x8e)
2164 tmport = wkport + 0x54;
2165 outb(0x05, tmport);
2166 tmport += 0x04;
2167 outb(0x20, tmport);
2168 tmport += 0x07;
2170 while ((inb(tmport) & 0x80) == 0) {
2171 if ((inb(tmport) & 0x01) != 0) {
2172 tmport -= 0x06;
2173 outb(wide[j++], tmport);
2174 tmport += 0x06;
2177 tmport -= 0x08;
2178 while ((inb(tmport) & 0x80) == 0x00)
2181 j = inb(tmport) & 0x0f;
2193 tmport = wkport + 0x58;
2194 outb(0x20, tmport);
2195 tmport += 0x07;
2196 while ((inb(tmport) & 0x80) == 0) {
2197 if ((inb(tmport) & 0x01) != 0) {
2198 tmport -= 0x06;
2199 outb(0, tmport);
2200 tmport += 0x06;
2203 tmport -= 0x08;
2204 j = inb(tmport) & 0x0f;
2216 tmport = wkport + 0x54;
2217 outb(0xff, tmport);
2218 tmport += 0x04;
2219 outb(0x20, tmport);
2220 tmport += 0x07;
2223 j = inb(tmport);
2225 tmport -= 0x06;
2226 mbuf[k++] = inb(tmport);
2227 tmport += 0x06;
2233 tmport -= 0x08;
2234 j = inb(tmport) & 0x0f;
2246 tmport = wkport + 0x50;
2247 outb(0x30, tmport);
2248 tmport = wkport + 0x54;
2249 outb(0x00, tmport);
2250 tmport += 0x04;
2251 outb(0x08, tmport);
2252 tmport += 0x07;
2254 while ((inb(tmport) & 0x80) == 0x00)
2257 tmport -= 0x08;
2258 j = inb(tmport);
2299 tmport = wkport + 0x5b;
2304 outb(j, tmport);
2305 tmport = wkport + 0x43;
2306 outb(satn[0], tmport++);
2307 outb(satn[1], tmport++);
2308 outb(satn[2], tmport++);
2309 outb(satn[3], tmport++);
2310 outb(satn[4], tmport++);
2311 outb(satn[5], tmport++);
2312 tmport += 0x06;
2313 outb(0, tmport);
2314 tmport += 0x02;
2315 outb(dev->id[0][i].devsp, tmport++);
2316 outb(0, tmport++);
2317 outb(satn[6], tmport++);
2318 outb(satn[7], tmport++);
2319 tmport += 0x03;
2320 outb(satn[8], tmport);
2321 tmport += 0x07;
2323 while ((inb(tmport) & 0x80) == 0x00)
2326 tmport -= 0x08;
2327 if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
2330 while (inb(tmport) != 0x8e)
2335 tmport = wkport + 0x54;
2336 outb(0x06, tmport);
2337 tmport += 0x04;
2338 outb(0x20, tmport);
2339 tmport += 0x07;
2341 while ((inb(tmport) & 0x80) == 0) {
2342 if ((inb(tmport) & 0x01) != 0) {
2343 tmport -= 0x06;
2346 outb(synuw[j++], tmport);
2348 outb(synw[j++], tmport);
2352 outb(synu[j++], tmport);
2354 outb(synn[j++], tmport);
2357 tmport += 0x06;
2360 tmport -= 0x08;
2362 while ((inb(tmport) & 0x80) == 0x00)
2365 j = inb(tmport) & 0x0f;
2377 tmport = wkport + 0x58;
2378 outb(0x20, tmport);
2379 tmport += 0x07;
2380 while ((inb(tmport) & 0x80) == 0x00) {
2381 if ((inb(tmport) & 0x01) != 0x00) {
2382 tmport -= 0x06;
2383 outb(0x00, tmport);
2384 tmport += 0x06;
2387 tmport -= 0x08;
2388 j = inb(tmport);
2404 tmport = wkport + 0x54;
2405 outb(0x06, tmport);
2406 tmport += 0x04;
2407 outb(0x20, tmport);
2408 tmport += 0x07;
2411 j = inb(tmport);
2413 tmport -= 0x06;
2414 mbuf[k++] = inb(tmport);
2415 tmport += 0x06;
2421 tmport -= 0x08;
2423 while ((inb(tmport) & 0x80) == 0x00)
2426 j = inb(tmport);
2442 tmport = wkport + 0x50;
2443 outb(0x30, tmport);
2445 tmport = wkport + 0x54;
2446 outb(0x00, tmport);
2447 tmport += 0x04;
2448 outb(0x08, tmport);
2449 tmport += 0x07;
2451 while ((inb(tmport) & 0x80) == 0x00)
2454 tmport -= 0x08;
2455 j = inb(tmport);
2558 unsigned int base_io, tmport, error,n;
2616 tmport = base_io + 0x22;
2617 atpdev->scam_on = inb(tmport);
2618 tmport += 0x13;
2619 atpdev->global_map[0] = inb(tmport);
2620 tmport += 0x07;
2621 atpdev->ultra_map[0] = inw(tmport);
2696 tmport = base_io + 0x38;
2697 k = inb(tmport) & 0x80;
2698 outb(k, tmport);
2699 tmport += 0x03;
2700 outb(0x20, tmport);
2702 outb(0, tmport);
2704 tmport = base_io + 0x5b;
2705 inb(tmport);
2706 tmport -= 0x04;
2707 inb(tmport);
2708 tmport = base_io + 0x40;
2709 outb((host_id | 0x08), tmport);
2710 tmport += 0x18;
2711 outb(0, tmport);
2712 tmport += 0x07;
2713 while ((inb(tmport) & 0x80) == 0)
2715 tmport -= 0x08;
2716 inb(tmport);
2717 tmport = base_io + 0x41;
2718 outb(8, tmport++);
2719 outb(0x7f, tmport);
2720 tmport = base_io + 0x51;
2721 outb(0x20, tmport);
2725 tmport = base_io + 0x38;
2726 outb(0xb0, tmport);
2840 tmport = base_io + 0x80;
2845 outb(k, tmport);
2846 tmport += 0x18;
2847 outb(0, tmport);
2848 tmport += 0x07;
2850 while ((inb(tmport) & 0x80) == 0)
2853 tmport -= 0x08;
2854 inb(tmport);
2855 tmport = base_io + 0x81;
2856 outb(8, tmport++);
2857 outb(0x7f, tmport);
2858 tmport = base_io + 0x91;
2859 outb(0x20, tmport);
2861 tmport = base_io + 0xc0;
2866 outb(k, tmport);
2867 tmport += 0x18;
2868 outb(0, tmport);
2869 tmport += 0x07;
2871 while ((inb(tmport) & 0x80) == 0)
2874 tmport -= 0x08;
2875 inb(tmport);
2876 tmport = base_io + 0xc1;
2877 outb(8, tmport++);
2878 outb(0x7f, tmport);
2879 tmport = base_io + 0xd1;
2880 outb(0x20, tmport);
2918 tmport = base_io + 0x22;
2919 atpdev->scam_on = inb(tmport);
2920 tmport += 0x0b;
2921 atpdev->global_map[0] = inb(tmport++);
2922 atpdev->ultra_map[0] = inw(tmport);
2950 tmport = base_io + 0x3e;
2951 outb(0x00, tmport);
2954 tmport = base_io + 0x3a;
2955 k = (inb(tmport) & 0xf3) | 0x10;
2956 outb(k, tmport);
2957 outb((k & 0xdf), tmport);
2959 outb(k, tmport);
2961 tmport = base_io;
2962 outb((host_id | 0x08), tmport);
2963 tmport += 0x18;
2964 outb(0, tmport);
2965 tmport += 0x07;
2966 while ((inb(tmport) & 0x80) == 0)
2969 tmport -= 0x08;
2970 inb(tmport);
2971 tmport = base_io + 1;
2972 outb(8, tmport++);
2973 outb(0x7f, tmport);
2974 tmport = base_io + 0x11;
2975 outb(0x20, tmport);
2979 tmport = base_io + 0x3a;
2980 outb((inb(tmport) & 0xef), tmport);
2981 tmport++;
2982 outb((inb(tmport) | 0x20), tmport);
3048 unsigned int tmport;
3058 tmport = dev->ioport[c];
3060 printk(" r%2x=%2x", j, inb(tmport++));
3062 tmport += 0x04;
3063 printk(" r1c=%2x", inb(tmport));
3064 tmport += 0x03;
3065 printk(" r1f=%2x in_snd=%2x ", inb(tmport), dev->in_snd[c]);
3066 tmport= dev->pciport[c];
3067 printk(" d00=%2x", inb(tmport));
3068 tmport += 0x02;
3069 printk(" d02=%2x", inb(tmport));
3236 unsigned int tmport;
3261 tmport = wkport + 0x1b;
3262 outb(0x01, tmport);
3263 tmport = wkport + 0x01;
3264 outb(0x08, tmport++);
3265 outb(0x7f, tmport++);
3266 outb(satn[0], tmport++);
3267 outb(satn[1], tmport++);
3268 outb(satn[2], tmport++);
3269 outb(satn[3], tmport++);
3270 outb(satn[4], tmport++);
3271 outb(satn[5], tmport++);
3272 tmport += 0x06;
3273 outb(0, tmport);
3274 tmport += 0x02;
3275 outb(dev->id[c][i].devsp, tmport++);
3277 outb(0, tmport++);
3278 outb(satn[6], tmport++);
3279 outb(satn[7], tmport++);
3284 outb(j, tmport);
3285 tmport += 0x03;
3286 outb(satn[8], tmport);
3287 tmport += 0x07;
3289 while ((inb(tmport) & 0x80) == 0x00)
3291 tmport -= 0x08;
3292 if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
3295 while (inb(tmport) != 0x8e)
3299 tmport = wkport + 0x10;
3300 outb(0x30, tmport);
3301 tmport = wkport + 0x14;
3302 outb(0x00, tmport);
3305 tmport = wkport + 0x18;
3306 outb(0x08, tmport);
3307 tmport += 0x07;
3308 while ((inb(tmport) & 0x80) == 0x00)
3310 tmport -= 0x08;
3311 j = inb(tmport);
3313 tmport = wkport + 0x10;
3314 outb(0x41, tmport);
3318 tmport = wkport + 0x03;
3319 outb(inqd[0], tmport++);
3320 outb(inqd[1], tmport++);
3321 outb(inqd[2], tmport++);
3322 outb(inqd[3], tmport++);
3323 outb(inqd[4], tmport++);
3324 outb(inqd[5], tmport);
3325 tmport += 0x07;
3326 outb(0, tmport);
3327 tmport += 0x02;
3328 outb(dev->id[c][i].devsp, tmport++);
3329 outb(0, tmport++);
3330 outb(inqd[6], tmport++);
3331 outb(inqd[7], tmport++);
3332 tmport += 0x03;
3333 outb(inqd[8], tmport);
3334 tmport += 0x07;
3335 while ((inb(tmport) & 0x80) == 0x00)
3337 tmport -= 0x08;
3338 if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
3341 while (inb(tmport) != 0x8e)
3343 tmport = wkport + 0x1b;
3344 outb(0x00, tmport);
3345 tmport = wkport + 0x18;
3346 outb(0x08, tmport);
3347 tmport += 0x07;
3350 k = inb(tmport);
3352 tmport -= 0x06;
3353 mbuf[j++] = inb(tmport);
3354 tmport += 0x06;
3360 tmport -= 0x08;
3361 j = inb(tmport);
3365 tmport = wkport + 0x10;
3366 outb(0x46, tmport);
3367 tmport += 0x02;
3368 outb(0, tmport++);
3369 outb(0, tmport++);
3370 outb(0, tmport++);
3371 tmport += 0x03;
3372 outb(0x08, tmport);
3373 tmport += 0x07;
3374 while ((inb(tmport) & 0x80) == 0x00)
3376 tmport -= 0x08;
3377 if (inb(tmport) != 0x16) {
3399 tmport = wkport + 0x1b;
3400 outb(0x01, tmport);
3401 tmport = wkport + 0x03;
3402 outb(satn[0], tmport++);
3403 outb(satn[1], tmport++);
3404 outb(satn[2], tmport++);
3405 outb(satn[3], tmport++);
3406 outb(satn[4], tmport++);
3407 outb(satn[5], tmport++);
3408 tmport += 0x06;
3409 outb(0, tmport);
3410 tmport += 0x02;
3411 outb(dev->id[c][i].devsp, tmport++);
3412 outb(0, tmport++);
3413 outb(satn[6], tmport++);
3414 outb(satn[7], tmport++);
3415 tmport += 0x03;
3416 outb(satn[8], tmport);
3417 tmport += 0x07;
3419 while ((inb(tmport) & 0x80) == 0x00)
3421 tmport -= 0x08;
3422 if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
3425 while (inb(tmport) != 0x8e)
3429 tmport = wkport + 0x14;
3430 outb(0x09, tmport);
3431 tmport += 0x04;
3432 outb(0x20, tmport);
3433 tmport += 0x07;
3435 while ((inb(tmport) & 0x80) == 0) {
3436 if ((inb(tmport) & 0x01) != 0) {
3437 tmport -= 0x06;
3438 outb(u3[j++], tmport);
3439 tmport += 0x06;
3443 tmport -= 0x08;
3444 while ((inb(tmport) & 0x80) == 0x00)
3446 j = inb(tmport) & 0x0f;
3458 tmport = wkport + 0x18;
3459 outb(0x20, tmport);
3460 tmport += 0x07;
3461 while ((inb(tmport) & 0x80) == 0) {
3462 if ((inb(tmport) & 0x01) != 0) {
3463 tmport -= 0x06;
3464 outb(0, tmport);
3465 tmport += 0x06;
3469 tmport -= 0x08;
3470 j = inb(tmport) & 0x0f;
3482 tmport = wkport + 0x14;
3483 outb(0x09, tmport);
3484 tmport += 0x04;
3485 outb(0x20, tmport);
3486 tmport += 0x07;
3489 j = inb(tmport);
3491 tmport -= 0x06;
3492 mbuf[k++] = inb(tmport);
3493 tmport += 0x06;
3499 tmport -= 0x08;
3500 j = inb(tmport) & 0x0f;
3512 tmport = wkport + 0x10;
3513 outb(0x30, tmport);
3514 tmport = wkport + 0x14;
3515 outb(0x00, tmport);
3516 tmport += 0x04;
3517 outb(0x08, tmport);
3518 tmport += 0x07;
3519 while ((inb(tmport) & 0x80) == 0x00);
3520 tmport -= 0x08;
3521 j = inb(tmport);
3548 tmport = wkport + 0x1b;
3549 outb(0x01, tmport);
3550 tmport = wkport + 0x03;
3551 outb(satn[0], tmport++);
3552 outb(satn[1], tmport++);
3553 outb(satn[2], tmport++);
3554 outb(satn[3], tmport++);
3555 outb(satn[4], tmport++);
3556 outb(satn[5], tmport++);
3557 tmport += 0x06;
3558 outb(0, tmport);
3559 tmport += 0x02;
3560 outb(dev->id[c][i].devsp, tmport++);
3561 outb(0, tmport++);
3562 outb(satn[6], tmport++);
3563 outb(satn[7], tmport++);
3564 tmport += 0x03;
3565 outb(satn[8], tmport);
3566 tmport += 0x07;
3568 while ((inb(tmport) & 0x80) == 0x00)
3570 tmport -= 0x08;
3571 if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
3574 while (inb(tmport) != 0x8e)
3578 tmport = wkport + 0x14;
3579 outb(0x05, tmport);
3580 tmport += 0x04;
3581 outb(0x20, tmport);
3582 tmport += 0x07;
3584 while ((inb(tmport) & 0x80) == 0) {
3585 if ((inb(tmport) & 0x01) != 0) {
3586 tmport -= 0x06;
3587 outb(wide[j++], tmport);
3588 tmport += 0x06;
3592 tmport -= 0x08;
3593 while ((inb(tmport) & 0x80) == 0x00)
3595 j = inb(tmport) & 0x0f;
3607 tmport = wkport + 0x18;
3608 outb(0x20, tmport);
3609 tmport += 0x07;
3610 while ((inb(tmport) & 0x80) == 0) {
3611 if ((inb(tmport) & 0x01) != 0) {
3612 tmport -= 0x06;
3613 outb(0, tmport);
3614 tmport += 0x06;
3618 tmport -= 0x08;
3619 j = inb(tmport) & 0x0f;
3631 tmport = wkport + 0x14;
3632 outb(0xff, tmport);
3633 tmport += 0x04;
3634 outb(0x20, tmport);
3635 tmport += 0x07;
3638 j = inb(tmport);
3640 tmport -= 0x06;
3641 mbuf[k++] = inb(tmport);
3642 tmport += 0x06;
3648 tmport -= 0x08;
3649 j = inb(tmport) & 0x0f;
3661 tmport = wkport + 0x10;
3662 outb(0x30, tmport);
3663 tmport = wkport + 0x14;
3664 outb(0x00, tmport);
3665 tmport += 0x04;
3666 outb(0x08, tmport);
3667 tmport += 0x07;
3668 while ((inb(tmport) & 0x80) == 0x00)
3670 tmport -= 0x08;
3671 j = inb(tmport);
3713 tmport = wkport + 0x1b;
3718 outb(j, tmport);
3719 tmport = wkport + 0x03;
3720 outb(satn[0], tmport++);
3721 outb(satn[1], tmport++);
3722 outb(satn[2], tmport++);
3723 outb(satn[3], tmport++);
3724 outb(satn[4], tmport++);
3725 outb(satn[5], tmport++);
3726 tmport += 0x06;
3727 outb(0, tmport);
3728 tmport += 0x02;
3729 outb(dev->id[c][i].devsp, tmport++);
3730 outb(0, tmport++);
3731 outb(satn[6], tmport++);
3732 outb(satn[7], tmport++);
3733 tmport += 0x03;
3734 outb(satn[8], tmport);
3735 tmport += 0x07;
3737 while ((inb(tmport) & 0x80) == 0x00)
3739 tmport -= 0x08;
3740 if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
3743 while (inb(tmport) != 0x8e)
3747 tmport = wkport + 0x14;
3748 outb(0x06, tmport);
3749 tmport += 0x04;
3750 outb(0x20, tmport);
3751 tmport += 0x07;
3753 while ((inb(tmport) & 0x80) == 0) {
3754 if ((inb(tmport) & 0x01) != 0) {
3755 tmport -= 0x06;
3758 outb(synuw[j++], tmport);
3760 outb(synw[j++], tmport);
3764 outb(synu[j++], tmport);
3766 outb(synn[j++], tmport);
3769 tmport += 0x06;
3772 tmport -= 0x08;
3773 while ((inb(tmport) & 0x80) == 0x00)
3775 j = inb(tmport) & 0x0f;
3787 tmport = wkport + 0x18;
3788 outb(0x20, tmport);
3789 tmport += 0x07;
3790 while ((inb(tmport) & 0x80) == 0x00) {
3791 if ((inb(tmport) & 0x01) != 0x00) {
3792 tmport -= 0x06;
3793 outb(0x00, tmport);
3794 tmport += 0x06;
3798 tmport -= 0x08;
3799 j = inb(tmport);
3815 tmport = wkport + 0x14;
3816 outb(0x06, tmport);
3817 tmport += 0x04;
3818 outb(0x20, tmport);
3819 tmport += 0x07;
3822 j = inb(tmport);
3824 tmport -= 0x06;
3825 mbuf[k++] = inb(tmport);
3826 tmport += 0x06;
3832 tmport -= 0x08;
3833 while ((inb(tmport) & 0x80) == 0x00);
3834 j = inb(tmport);
3850 tmport = wkport + 0x10;
3851 outb(0x30, tmport);
3853 tmport = wkport + 0x14;
3854 outb(0x00, tmport);
3855 tmport += 0x04;
3856 outb(0x08, tmport);
3857 tmport += 0x07;
3858 while ((inb(tmport) & 0x80) == 0x00)
3860 tmport -= 0x08;
3861 j = inb(tmport);
3908 tmport = wkport + 0x16;
3909 outb(0x80, tmport);