Browse Source

Plan 9 from Bell Labs 2006-02-24

David du Colombier 15 years ago
parent
commit
69c4207e18

+ 36 - 34
dist/replica/_plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1131317303 216948
-386/9loaddebug - 775 sys sys 1135631316 311840
+386/9loaddebug - 775 sys sys 1140726314 312052
 386/9loadlite - 775 sys sys 1131317306 135668
-386/9loadlitedebug - 775 sys sys 1135631317 200089
+386/9loadlitedebug - 775 sys sys 1140726314 200137
 386/9pc - 775 sys sys 1136441425 1894552
 386/9pc.gz - 664 sys sys 1136441426 663936
 386/9pccpu - 775 sys sys 1136441429 1568136
@@ -43,17 +43,17 @@
 386/bin/ascii - 775 sys sys 1135570770 64641
 386/bin/astro - 775 sys sys 1130384233 138837
 386/bin/auth - 20000000775 sys sys 1016920815 0
-386/bin/auth/aescbc - 775 sys sys 1140285589 140475
+386/bin/auth/aescbc - 775 sys sys 1140717381 140495
 386/bin/auth/asn12rsa - 775 sys sys 1135570770 120433
-386/bin/auth/authsrv - 775 sys sys 1135570771 165460
+386/bin/auth/authsrv - 775 sys sys 1140717382 165510
 386/bin/auth/changeuser - 775 sys sys 1135570771 97011
 386/bin/auth/convkeys - 775 sys sys 1140285589 87503
 386/bin/auth/convkeys2 - 775 sys sys 1140285589 87562
-386/bin/auth/cron - 775 sys sys 1140285590 143908
+386/bin/auth/cron - 775 sys sys 1140717382 143928
 386/bin/auth/debug - 775 sys sys 1140285590 101085
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1140285591 318397
+386/bin/auth/factotum - 775 sys sys 1140717383 321439
 386/bin/auth/fgui - 775 sys sys 1138500284 218624
 386/bin/auth/guard.srv - 775 sys sys 1135570774 142833
 386/bin/auth/iam - 775 sys sys 1085076981 50791
@@ -71,9 +71,9 @@
 386/bin/auth/rsafill - 775 sys sys 1140285594 143711
 386/bin/auth/rsagen - 775 sys sys 1135570778 153242
 386/bin/auth/secretpem - 775 sys sys 1045537944 118526
-386/bin/auth/secstore - 775 sys sys 1140285595 195580
-386/bin/auth/secstored - 775 sys sys 1140285595 197007
-386/bin/auth/secuser - 775 sys sys 1140285595 152935
+386/bin/auth/secstore - 775 sys sys 1140717384 195600
+386/bin/auth/secstored - 775 sys sys 1140717384 197027
+386/bin/auth/secuser - 775 sys sys 1140717385 152955
 386/bin/auth/status - 775 sys sys 1020319060 738
 386/bin/auth/uniq - 775 sys sys 1140285596 63092
 386/bin/auth/warning - 775 sys sys 1140285596 101058
@@ -246,7 +246,7 @@
 386/bin/fs/v10fs - 775 sys sys 1134389867 94594
 386/bin/fs/v6fs - 775 sys sys 1134389867 94512
 386/bin/fs/zipfs - 775 sys sys 1134389867 109110
-386/bin/ftpfs - 775 sys sys 1135570813 272811
+386/bin/ftpfs - 775 sys sys 1140717386 272840
 386/bin/games - 20000000775 sys sys 1096298711 0
 386/bin/games/4s - 775 sys sys 1132506854 178226
 386/bin/games/5s - 775 sys sys 1132506855 180514
@@ -269,7 +269,7 @@
 386/bin/gview - 775 sys sys 1136397208 238587
 386/bin/gzip - 775 sys sys 1135570815 84749
 386/bin/hayes - 775 sys sys 1135570815 64550
-386/bin/hget - 775 sys sys 1138075017 233467
+386/bin/hget - 775 sys sys 1140717387 233502
 386/bin/history - 775 sys sys 1136397209 75433
 386/bin/hoc - 775 sys sys 1135570817 99860
 386/bin/html2ms - 775 sys sys 1135570817 66078
@@ -289,7 +289,7 @@
 386/bin/ip/gping - 775 sys sys 1135570820 183130
 386/bin/ip/hogports - 775 sys sys 1130384298 42901
 386/bin/ip/httpd - 20000000775 sys sys 1016920846 0
-386/bin/ip/httpd/httpd - 775 sys sys 1135570821 292534
+386/bin/ip/httpd/httpd - 775 sys sys 1140717388 292569
 386/bin/ip/httpd/imagemap - 775 sys sys 1135570822 114780
 386/bin/ip/httpd/man2html - 775 sys sys 1139680592 123361
 386/bin/ip/httpd/netlib_find - 775 sys sys 1135570822 115637
@@ -297,8 +297,8 @@
 386/bin/ip/httpd/save - 775 sys sys 1135570823 131200
 386/bin/ip/httpd/webls - 775 sys sys 1135570823 131299
 386/bin/ip/httpd/wikipost - 775 sys sys 1135570824 112661
-386/bin/ip/httpfile - 775 sys sys 1138500622 283922
-386/bin/ip/imap4d - 775 sys sys 1135570825 237651
+386/bin/ip/httpfile - 775 sys sys 1140717389 283942
+386/bin/ip/imap4d - 775 sys sys 1140717389 237709
 386/bin/ip/ipconfig - 775 sys sys 1135570825 137844
 386/bin/ip/ping - 775 sys sys 1139680592 76498
 386/bin/ip/ppp - 775 sys sys 1135570826 219950
@@ -425,8 +425,8 @@
 386/bin/telnet - 775 sys sys 1135570847 80400
 386/bin/test - 775 sys sys 1135570847 69841
 386/bin/time - 775 sys sys 1135570848 61372
-386/bin/tlsclient - 775 sys sys 1135570848 198462
-386/bin/tlssrv - 775 sys sys 1135570849 198724
+386/bin/tlsclient - 775 sys sys 1140717390 198501
+386/bin/tlssrv - 775 sys sys 1140717391 198761
 386/bin/togif - 775 sys sys 1135570849 189850
 386/bin/toico - 775 sys sys 1135570849 123639
 386/bin/topng - 775 sys sys 1135570850 138333
@@ -565,7 +565,7 @@
 386/lib/libplumb.a - 664 sys sys 1138501055 19408
 386/lib/libregexp.a - 664 sys sys 1115950157 37464
 386/lib/libscribble.a - 664 sys sys 1138501058 107278
-386/lib/libsec.a - 664 sys sys 1138501064 646888
+386/lib/libsec.a - 664 sys sys 1140717392 646938
 386/lib/libstdio.a - 664 sys sys 1138501067 126186
 386/lib/libsunrpc.a - 664 sys sys 1138501070 355994
 386/lib/libthread.a - 664 sys sys 1138501077 71986
@@ -5422,6 +5422,7 @@ rc/bin/c: - 775 sys sys 1015089511 86
 rc/bin/cpurc - 775 sys sys 1123380857 1306
 rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
+rc/bin/diffy - 775 sys sys 1140694870 277
 rc/bin/dircp - 775 sys sys 1107836261 193
 rc/bin/doc2ps - 775 sys sys 1069793831 244
 rc/bin/doc2txt - 775 sys sys 1025197880 563
@@ -6048,7 +6049,7 @@ sys/lib/acid/power - 664 sys sys 969499633 3058
 sys/lib/acid/sparc - 664 sys sys 944955986 5339
 sys/lib/acid/sparc64 - 664 sys sys 1114524607 5441
 sys/lib/acid/syscall - 664 sys sys 1016926088 5353
-sys/lib/acid/thread - 664 sys sys 1063858106 5979
+sys/lib/acid/thread - 664 sys sys 1140694878 6143
 sys/lib/acid/transcript - 775 sys sys 954614670 752
 sys/lib/acid/trump - 664 sys sys 1014924361 3177
 sys/lib/acid/truss - 664 sys sys 1036381004 5271
@@ -7278,7 +7279,7 @@ sys/man/1/dc - 664 sys sys 1113743325 4834
 sys/man/1/dd - 664 sys sys 1055693436 3346
 sys/man/1/delkey - 664 sys sys 1128483118 779
 sys/man/1/deroff - 664 sys sys 1113743324 1826
-sys/man/1/diff - 664 sys sys 1134556573 3085
+sys/man/1/diff - 664 sys sys 1140694865 3089
 sys/man/1/doc2txt - 664 sys sys 1134556783 2104
 sys/man/1/doctype - 664 sys sys 1113743325 860
 sys/man/1/du - 664 sys sys 1134556965 1358
@@ -7395,7 +7396,7 @@ sys/man/1/who - 664 sys sys 944959674 332
 sys/man/1/winwatch - 664 sys sys 1113252108 723
 sys/man/1/xd - 664 sys sys 944959674 1517
 sys/man/1/yacc - 664 sys sys 944959676 3273
-sys/man/1/yesterday - 664 sys sys 1070288431 2348
+sys/man/1/yesterday - 664 sys sys 1140694868 2607
 sys/man/2 - 20000000775 sys sys 1017423721 0
 sys/man/2/0intro - 664 sys sys 1115941566 11660
 sys/man/2/9p - 664 sys sys 1134335896 15859
@@ -8100,7 +8101,7 @@ sys/src/9/port/latin1.c - 664 sys sys 1015278339 1418
 sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
 sys/src/9/port/lib.h - 664 sys sys 1131289913 6040
 sys/src/9/port/log.c - 664 sys sys 1014931175 2860
-sys/src/9/port/master - 664 sys sys 1138469433 479
+sys/src/9/port/master - 664 sys sys 1140695116 490
 sys/src/9/port/master.local - 664 sys sys 1063856961 130
 sys/src/9/port/mkbootrules - 775 sys sys 1055700518 923
 sys/src/9/port/mkdevc - 775 sys sys 1109202243 3889
@@ -9005,7 +9006,7 @@ sys/src/boot/pc/dat.h - 664 sys sys 1109364490 3565
 sys/src/boot/pc/devfloppy.c - 664 sys sys 1032215913 15505
 sys/src/boot/pc/devfloppy.h - 664 sys sys 1032409559 4081
 sys/src/boot/pc/devi82365.c - 664 sys sys 1019533020 23202
-sys/src/boot/pc/devpccard.c - 664 sys sys 1019533020 41357
+sys/src/boot/pc/devpccard.c - 664 sys sys 1140711214 41433
 sys/src/boot/pc/devsd.c - 664 sys sys 1077033681 11262
 sys/src/boot/pc/dma.c - 664 sys sys 1015007949 4972
 sys/src/boot/pc/dosboot.c - 664 sys sys 1097716791 11240
@@ -9028,7 +9029,7 @@ sys/src/boot/pc/etherec2t.c - 664 sys sys 1015007951 3598
 sys/src/boot/pc/etherelnk3.c - 664 sys sys 1034454878 44068
 sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
 sys/src/boot/pc/etherif.h - 664 sys sys 1107882190 1255
-sys/src/boot/pc/etherigbe.c - 664 sys sys 1123445062 40477
+sys/src/boot/pc/etherigbe.c - 664 sys sys 1140710606 40769
 sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
 sys/src/boot/pc/ethermii.h - 664 sys sys 1071175087 3259
 sys/src/boot/pc/etherrhine.c - 664 sys sys 1071175087 12403
@@ -9454,11 +9455,12 @@ sys/src/cmd/auth/factotum - 20000000775 sys sys 1017165894 0
 sys/src/cmd/auth/factotum/apop.c - 664 sys sys 1107706102 6099
 sys/src/cmd/auth/factotum/chap.c - 664 sys sys 1107706103 8967
 sys/src/cmd/auth/factotum/confirm.c - 664 sys sys 1044829586 3103
-sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1121367028 4946
+sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1140694893 4991
 sys/src/cmd/auth/factotum/fgui.c - 664 sys sys 1130425760 15984
-sys/src/cmd/auth/factotum/fs.c - 664 sys sys 1140272941 10544
+sys/src/cmd/auth/factotum/fs.c - 664 sys sys 1140694892 10558
+sys/src/cmd/auth/factotum/httpdigest.c - 664 sys sys 1140694896 3481
 sys/src/cmd/auth/factotum/log.c - 664 sys sys 1046655068 1781
-sys/src/cmd/auth/factotum/mkfile - 664 sys sys 1107706102 481
+sys/src/cmd/auth/factotum/mkfile - 664 sys sys 1140694893 497
 sys/src/cmd/auth/factotum/p9any.c - 664 sys sys 1107706103 8484
 sys/src/cmd/auth/factotum/p9cr.c - 664 sys sys 1107706103 6666
 sys/src/cmd/auth/factotum/p9sk1.c - 664 sys sys 1115143213 9743
@@ -14031,13 +14033,13 @@ sys/src/cmd/upas/vf/mkfile - 664 sys sys 1064393881 241
 sys/src/cmd/upas/vf/vf.c - 664 sys sys 1135083959 20043
 sys/src/cmd/usb - 20000000775 sys sys 1017802022 0
 sys/src/cmd/usb/audio - 20000000775 sys sys 1017802021 0
-sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1100568596 18166
-sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1100568596 6967
+sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1140695061 18208
+sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1140695061 8085
 sys/src/cmd/usb/audio/mkfile - 664 sys sys 1091204980 349
-sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1138027032 9843
-sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1100568597 1861
-sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1101906325 17266
-sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1100568597 600
+sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1140695061 10155
+sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1140695062 1889
+sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1140695062 18245
+sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1140695062 618
 sys/src/cmd/usb/lib - 20000000775 sys sys 1018369393 0
 sys/src/cmd/usb/lib/device.c - 664 sys sys 1137688747 3032
 sys/src/cmd/usb/lib/dump.c - 664 sys sys 1135896862 12915
@@ -15420,7 +15422,7 @@ sys/src/libsec/port/genprime.c - 664 sys sys 984710521 535
 sys/src/libsec/port/genrandom.c - 664 sys sys 984710521 1171
 sys/src/libsec/port/gensafeprime.c - 664 sys sys 1027629124 741
 sys/src/libsec/port/genstrongprime.c - 664 sys sys 984710522 1039
-sys/src/libsec/port/hmac.c - 664 sys sys 1015013579 1167
+sys/src/libsec/port/hmac.c - 664 sys sys 1140694284 1183
 sys/src/libsec/port/hmactest.c - 664 sys sys 984710522 344
 sys/src/libsec/port/md4.c - 664 sys sys 1015013579 4260
 sys/src/libsec/port/md4test.c - 664 sys sys 984710522 537
@@ -15536,7 +15538,7 @@ sys/src/libthread/example.c - 664 sys sys 1041440306 1402
 sys/src/libthread/exec.c - 664 sys sys 1014928157 1844
 sys/src/libthread/exit.c - 664 sys sys 1055700450 1318
 sys/src/libthread/id.c - 664 sys sys 1083523466 1840
-sys/src/libthread/iocall.c - 664 sys sys 1044429928 877
+sys/src/libthread/iocall.c - 664 sys sys 1140695081 880
 sys/src/libthread/ioclose.c - 664 sys sys 1030537962 242
 sys/src/libthread/iodial.c - 664 sys sys 1030537988 438
 sys/src/libthread/ioopen.c - 664 sys sys 1030537962 314

+ 36 - 34
dist/replica/plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1131317303 216948
-386/9loaddebug - 775 sys sys 1135631316 311840
+386/9loaddebug - 775 sys sys 1140726314 312052
 386/9loadlite - 775 sys sys 1131317306 135668
-386/9loadlitedebug - 775 sys sys 1135631317 200089
+386/9loadlitedebug - 775 sys sys 1140726314 200137
 386/9pc - 775 sys sys 1136441425 1894552
 386/9pc.gz - 664 sys sys 1136441426 663936
 386/9pccpu - 775 sys sys 1136441429 1568136
@@ -43,17 +43,17 @@
 386/bin/ascii - 775 sys sys 1135570770 64641
 386/bin/astro - 775 sys sys 1130384233 138837
 386/bin/auth - 20000000775 sys sys 1016920815 0
-386/bin/auth/aescbc - 775 sys sys 1140285589 140475
+386/bin/auth/aescbc - 775 sys sys 1140717381 140495
 386/bin/auth/asn12rsa - 775 sys sys 1135570770 120433
-386/bin/auth/authsrv - 775 sys sys 1135570771 165460
+386/bin/auth/authsrv - 775 sys sys 1140717382 165510
 386/bin/auth/changeuser - 775 sys sys 1135570771 97011
 386/bin/auth/convkeys - 775 sys sys 1140285589 87503
 386/bin/auth/convkeys2 - 775 sys sys 1140285589 87562
-386/bin/auth/cron - 775 sys sys 1140285590 143908
+386/bin/auth/cron - 775 sys sys 1140717382 143928
 386/bin/auth/debug - 775 sys sys 1140285590 101085
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1140285591 318397
+386/bin/auth/factotum - 775 sys sys 1140717383 321439
 386/bin/auth/fgui - 775 sys sys 1138500284 218624
 386/bin/auth/guard.srv - 775 sys sys 1135570774 142833
 386/bin/auth/iam - 775 sys sys 1085076981 50791
@@ -71,9 +71,9 @@
 386/bin/auth/rsafill - 775 sys sys 1140285594 143711
 386/bin/auth/rsagen - 775 sys sys 1135570778 153242
 386/bin/auth/secretpem - 775 sys sys 1045537944 118526
-386/bin/auth/secstore - 775 sys sys 1140285595 195580
-386/bin/auth/secstored - 775 sys sys 1140285595 197007
-386/bin/auth/secuser - 775 sys sys 1140285595 152935
+386/bin/auth/secstore - 775 sys sys 1140717384 195600
+386/bin/auth/secstored - 775 sys sys 1140717384 197027
+386/bin/auth/secuser - 775 sys sys 1140717385 152955
 386/bin/auth/status - 775 sys sys 1020319060 738
 386/bin/auth/uniq - 775 sys sys 1140285596 63092
 386/bin/auth/warning - 775 sys sys 1140285596 101058
@@ -246,7 +246,7 @@
 386/bin/fs/v10fs - 775 sys sys 1134389867 94594
 386/bin/fs/v6fs - 775 sys sys 1134389867 94512
 386/bin/fs/zipfs - 775 sys sys 1134389867 109110
-386/bin/ftpfs - 775 sys sys 1135570813 272811
+386/bin/ftpfs - 775 sys sys 1140717386 272840
 386/bin/games - 20000000775 sys sys 1096298711 0
 386/bin/games/4s - 775 sys sys 1132506854 178226
 386/bin/games/5s - 775 sys sys 1132506855 180514
@@ -269,7 +269,7 @@
 386/bin/gview - 775 sys sys 1136397208 238587
 386/bin/gzip - 775 sys sys 1135570815 84749
 386/bin/hayes - 775 sys sys 1135570815 64550
-386/bin/hget - 775 sys sys 1138075017 233467
+386/bin/hget - 775 sys sys 1140717387 233502
 386/bin/history - 775 sys sys 1136397209 75433
 386/bin/hoc - 775 sys sys 1135570817 99860
 386/bin/html2ms - 775 sys sys 1135570817 66078
@@ -289,7 +289,7 @@
 386/bin/ip/gping - 775 sys sys 1135570820 183130
 386/bin/ip/hogports - 775 sys sys 1130384298 42901
 386/bin/ip/httpd - 20000000775 sys sys 1016920846 0
-386/bin/ip/httpd/httpd - 775 sys sys 1135570821 292534
+386/bin/ip/httpd/httpd - 775 sys sys 1140717388 292569
 386/bin/ip/httpd/imagemap - 775 sys sys 1135570822 114780
 386/bin/ip/httpd/man2html - 775 sys sys 1139680592 123361
 386/bin/ip/httpd/netlib_find - 775 sys sys 1135570822 115637
@@ -297,8 +297,8 @@
 386/bin/ip/httpd/save - 775 sys sys 1135570823 131200
 386/bin/ip/httpd/webls - 775 sys sys 1135570823 131299
 386/bin/ip/httpd/wikipost - 775 sys sys 1135570824 112661
-386/bin/ip/httpfile - 775 sys sys 1138500622 283922
-386/bin/ip/imap4d - 775 sys sys 1135570825 237651
+386/bin/ip/httpfile - 775 sys sys 1140717389 283942
+386/bin/ip/imap4d - 775 sys sys 1140717389 237709
 386/bin/ip/ipconfig - 775 sys sys 1135570825 137844
 386/bin/ip/ping - 775 sys sys 1139680592 76498
 386/bin/ip/ppp - 775 sys sys 1135570826 219950
@@ -425,8 +425,8 @@
 386/bin/telnet - 775 sys sys 1135570847 80400
 386/bin/test - 775 sys sys 1135570847 69841
 386/bin/time - 775 sys sys 1135570848 61372
-386/bin/tlsclient - 775 sys sys 1135570848 198462
-386/bin/tlssrv - 775 sys sys 1135570849 198724
+386/bin/tlsclient - 775 sys sys 1140717390 198501
+386/bin/tlssrv - 775 sys sys 1140717391 198761
 386/bin/togif - 775 sys sys 1135570849 189850
 386/bin/toico - 775 sys sys 1135570849 123639
 386/bin/topng - 775 sys sys 1135570850 138333
@@ -565,7 +565,7 @@
 386/lib/libplumb.a - 664 sys sys 1138501055 19408
 386/lib/libregexp.a - 664 sys sys 1115950157 37464
 386/lib/libscribble.a - 664 sys sys 1138501058 107278
-386/lib/libsec.a - 664 sys sys 1138501064 646888
+386/lib/libsec.a - 664 sys sys 1140717392 646938
 386/lib/libstdio.a - 664 sys sys 1138501067 126186
 386/lib/libsunrpc.a - 664 sys sys 1138501070 355994
 386/lib/libthread.a - 664 sys sys 1138501077 71986
@@ -5422,6 +5422,7 @@ rc/bin/c: - 775 sys sys 1015089511 86
 rc/bin/cpurc - 775 sys sys 1123380857 1306
 rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
+rc/bin/diffy - 775 sys sys 1140694870 277
 rc/bin/dircp - 775 sys sys 1107836261 193
 rc/bin/doc2ps - 775 sys sys 1069793831 244
 rc/bin/doc2txt - 775 sys sys 1025197880 563
@@ -6048,7 +6049,7 @@ sys/lib/acid/power - 664 sys sys 969499633 3058
 sys/lib/acid/sparc - 664 sys sys 944955986 5339
 sys/lib/acid/sparc64 - 664 sys sys 1114524607 5441
 sys/lib/acid/syscall - 664 sys sys 1016926088 5353
-sys/lib/acid/thread - 664 sys sys 1063858106 5979
+sys/lib/acid/thread - 664 sys sys 1140694878 6143
 sys/lib/acid/transcript - 775 sys sys 954614670 752
 sys/lib/acid/trump - 664 sys sys 1014924361 3177
 sys/lib/acid/truss - 664 sys sys 1036381004 5271
@@ -7278,7 +7279,7 @@ sys/man/1/dc - 664 sys sys 1113743325 4834
 sys/man/1/dd - 664 sys sys 1055693436 3346
 sys/man/1/delkey - 664 sys sys 1128483118 779
 sys/man/1/deroff - 664 sys sys 1113743324 1826
-sys/man/1/diff - 664 sys sys 1134556573 3085
+sys/man/1/diff - 664 sys sys 1140694865 3089
 sys/man/1/doc2txt - 664 sys sys 1134556783 2104
 sys/man/1/doctype - 664 sys sys 1113743325 860
 sys/man/1/du - 664 sys sys 1134556965 1358
@@ -7395,7 +7396,7 @@ sys/man/1/who - 664 sys sys 944959674 332
 sys/man/1/winwatch - 664 sys sys 1113252108 723
 sys/man/1/xd - 664 sys sys 944959674 1517
 sys/man/1/yacc - 664 sys sys 944959676 3273
-sys/man/1/yesterday - 664 sys sys 1070288431 2348
+sys/man/1/yesterday - 664 sys sys 1140694868 2607
 sys/man/2 - 20000000775 sys sys 1017423721 0
 sys/man/2/0intro - 664 sys sys 1115941566 11660
 sys/man/2/9p - 664 sys sys 1134335896 15859
@@ -8100,7 +8101,7 @@ sys/src/9/port/latin1.c - 664 sys sys 1015278339 1418
 sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
 sys/src/9/port/lib.h - 664 sys sys 1131289913 6040
 sys/src/9/port/log.c - 664 sys sys 1014931175 2860
-sys/src/9/port/master - 664 sys sys 1138469433 479
+sys/src/9/port/master - 664 sys sys 1140695116 490
 sys/src/9/port/master.local - 664 sys sys 1063856961 130
 sys/src/9/port/mkbootrules - 775 sys sys 1055700518 923
 sys/src/9/port/mkdevc - 775 sys sys 1109202243 3889
@@ -9005,7 +9006,7 @@ sys/src/boot/pc/dat.h - 664 sys sys 1109364490 3565
 sys/src/boot/pc/devfloppy.c - 664 sys sys 1032215913 15505
 sys/src/boot/pc/devfloppy.h - 664 sys sys 1032409559 4081
 sys/src/boot/pc/devi82365.c - 664 sys sys 1019533020 23202
-sys/src/boot/pc/devpccard.c - 664 sys sys 1019533020 41357
+sys/src/boot/pc/devpccard.c - 664 sys sys 1140711214 41433
 sys/src/boot/pc/devsd.c - 664 sys sys 1077033681 11262
 sys/src/boot/pc/dma.c - 664 sys sys 1015007949 4972
 sys/src/boot/pc/dosboot.c - 664 sys sys 1097716791 11240
@@ -9028,7 +9029,7 @@ sys/src/boot/pc/etherec2t.c - 664 sys sys 1015007951 3598
 sys/src/boot/pc/etherelnk3.c - 664 sys sys 1034454878 44068
 sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
 sys/src/boot/pc/etherif.h - 664 sys sys 1107882190 1255
-sys/src/boot/pc/etherigbe.c - 664 sys sys 1123445062 40477
+sys/src/boot/pc/etherigbe.c - 664 sys sys 1140710606 40769
 sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
 sys/src/boot/pc/ethermii.h - 664 sys sys 1071175087 3259
 sys/src/boot/pc/etherrhine.c - 664 sys sys 1071175087 12403
@@ -9454,11 +9455,12 @@ sys/src/cmd/auth/factotum - 20000000775 sys sys 1017165894 0
 sys/src/cmd/auth/factotum/apop.c - 664 sys sys 1107706102 6099
 sys/src/cmd/auth/factotum/chap.c - 664 sys sys 1107706103 8967
 sys/src/cmd/auth/factotum/confirm.c - 664 sys sys 1044829586 3103
-sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1121367028 4946
+sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1140694893 4991
 sys/src/cmd/auth/factotum/fgui.c - 664 sys sys 1130425760 15984
-sys/src/cmd/auth/factotum/fs.c - 664 sys sys 1140272941 10544
+sys/src/cmd/auth/factotum/fs.c - 664 sys sys 1140694892 10558
+sys/src/cmd/auth/factotum/httpdigest.c - 664 sys sys 1140694896 3481
 sys/src/cmd/auth/factotum/log.c - 664 sys sys 1046655068 1781
-sys/src/cmd/auth/factotum/mkfile - 664 sys sys 1107706102 481
+sys/src/cmd/auth/factotum/mkfile - 664 sys sys 1140694893 497
 sys/src/cmd/auth/factotum/p9any.c - 664 sys sys 1107706103 8484
 sys/src/cmd/auth/factotum/p9cr.c - 664 sys sys 1107706103 6666
 sys/src/cmd/auth/factotum/p9sk1.c - 664 sys sys 1115143213 9743
@@ -14031,13 +14033,13 @@ sys/src/cmd/upas/vf/mkfile - 664 sys sys 1064393881 241
 sys/src/cmd/upas/vf/vf.c - 664 sys sys 1135083959 20043
 sys/src/cmd/usb - 20000000775 sys sys 1017802022 0
 sys/src/cmd/usb/audio - 20000000775 sys sys 1017802021 0
-sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1100568596 18166
-sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1100568596 6967
+sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1140695061 18208
+sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1140695061 8085
 sys/src/cmd/usb/audio/mkfile - 664 sys sys 1091204980 349
-sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1138027032 9843
-sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1100568597 1861
-sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1101906325 17266
-sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1100568597 600
+sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1140695061 10155
+sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1140695062 1889
+sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1140695062 18245
+sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1140695062 618
 sys/src/cmd/usb/lib - 20000000775 sys sys 1018369393 0
 sys/src/cmd/usb/lib/device.c - 664 sys sys 1137688747 3032
 sys/src/cmd/usb/lib/dump.c - 664 sys sys 1135896862 12915
@@ -15420,7 +15422,7 @@ sys/src/libsec/port/genprime.c - 664 sys sys 984710521 535
 sys/src/libsec/port/genrandom.c - 664 sys sys 984710521 1171
 sys/src/libsec/port/gensafeprime.c - 664 sys sys 1027629124 741
 sys/src/libsec/port/genstrongprime.c - 664 sys sys 984710522 1039
-sys/src/libsec/port/hmac.c - 664 sys sys 1015013579 1167
+sys/src/libsec/port/hmac.c - 664 sys sys 1140694284 1183
 sys/src/libsec/port/hmactest.c - 664 sys sys 984710522 344
 sys/src/libsec/port/md4.c - 664 sys sys 1015013579 4260
 sys/src/libsec/port/md4test.c - 664 sys sys 984710522 537
@@ -15536,7 +15538,7 @@ sys/src/libthread/example.c - 664 sys sys 1041440306 1402
 sys/src/libthread/exec.c - 664 sys sys 1014928157 1844
 sys/src/libthread/exit.c - 664 sys sys 1055700450 1318
 sys/src/libthread/id.c - 664 sys sys 1083523466 1840
-sys/src/libthread/iocall.c - 664 sys sys 1044429928 877
+sys/src/libthread/iocall.c - 664 sys sys 1140695081 880
 sys/src/libthread/ioclose.c - 664 sys sys 1030537962 242
 sys/src/libthread/iodial.c - 664 sys sys 1030537988 438
 sys/src/libthread/ioopen.c - 664 sys sys 1030537962 314

+ 36 - 0
dist/replica/plan9.log

@@ -27817,3 +27817,39 @@
 1140616917 1 c sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1140615970 31488
 1140631323 0 c 386/bin/aux/vga - 775 sys sys 1140631128 333747
 1140656409 0 c sys/games/lib/fortunes - 664 sys sys 1140655027 257628
+1140694220 0 c sys/src/libsec/port/hmac.c - 664 sys sys 1140694284 1183
+1140696020 0 a rc/bin/diffy - 775 sys sys 1140694870 277
+1140696020 1 c sys/lib/acid/thread - 664 sys sys 1140694878 6143
+1140696020 2 c sys/man/1/yesterday - 664 sys sys 1140694868 2607
+1140696020 3 c sys/man/1/diff - 664 sys sys 1140694865 3089
+1140696020 4 c sys/src/9/port/master - 664 sys sys 1140695116 490
+1140696020 5 c sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1140694893 4991
+1140696020 6 c sys/src/cmd/auth/factotum/fs.c - 664 sys sys 1140694892 10558
+1140696020 7 a sys/src/cmd/auth/factotum/httpdigest.c - 664 sys sys 1140694896 3481
+1140696020 8 c sys/src/cmd/auth/factotum/mkfile - 664 sys sys 1140694893 497
+1140696020 9 c sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1140695061 18208
+1140696020 10 c sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1140695061 8085
+1140696020 11 c sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1140695061 10155
+1140696020 12 c sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1140695062 1889
+1140696020 13 c sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1140695062 18245
+1140696020 14 c sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1140695062 618
+1140696020 15 c sys/src/libthread/iocall.c - 664 sys sys 1140695081 880
+1140712225 0 c sys/src/boot/pc/devpccard.c - 664 sys sys 1140711214 41433
+1140712225 1 c sys/src/boot/pc/etherigbe.c - 664 sys sys 1140710606 40769
+1140717627 0 c 386/bin/hget - 775 sys sys 1140717387 233502
+1140717627 1 c 386/bin/ftpfs - 775 sys sys 1140717386 272840
+1140717627 2 c 386/bin/auth/aescbc - 775 sys sys 1140717381 140495
+1140717627 3 c 386/bin/auth/authsrv - 775 sys sys 1140717382 165510
+1140717627 4 c 386/bin/auth/cron - 775 sys sys 1140717382 143928
+1140717627 5 c 386/bin/auth/factotum - 775 sys sys 1140717383 321439
+1140717627 6 c 386/bin/auth/secstore - 775 sys sys 1140717384 195600
+1140717627 7 c 386/bin/auth/secstored - 775 sys sys 1140717384 197027
+1140717627 8 c 386/bin/auth/secuser - 775 sys sys 1140717385 152955
+1140717627 9 c 386/bin/ip/httpd/httpd - 775 sys sys 1140717388 292569
+1140717627 10 c 386/bin/ip/httpfile - 775 sys sys 1140717389 283942
+1140717627 11 c 386/bin/ip/imap4d - 775 sys sys 1140717389 237709
+1140717627 12 c 386/bin/tlsclient - 775 sys sys 1140717390 198501
+1140717627 13 c 386/bin/tlssrv - 775 sys sys 1140717391 198761
+1140717627 14 c 386/lib/libsec.a - 664 sys sys 1140717392 646938
+1140726629 0 c 386/9loaddebug - 775 sys sys 1140726314 312052
+1140726629 1 c 386/9loadlitedebug - 775 sys sys 1140726314 200137

+ 14 - 0
rc/bin/diffy

@@ -0,0 +1,14 @@
+#!/bin/rc
+# diffy [diff-opts] file... - diff file against yesterday's version(s)
+rfork e
+diffopts=()
+while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){
+	diffopts=($diffopts $1)
+	shift
+}
+if(~ $1 --)
+	shift
+if(! ~ $#* 1)
+	diffopts=($diffopts -m)
+for(f)
+	diff $diffopts `{yesterday $f} $f

+ 11 - 3
sys/lib/acid/thread

@@ -72,7 +72,9 @@ defn fnname(a){
 			return sym[0];
 		s = tail s;
 	}
-	return itoa(a, "%x");
+	if a == {} then
+		return "{}";
+	return itoa(a\X, "%x");
 }
 
 stkignorelist = {};
@@ -82,7 +84,7 @@ defn stkignore(s){
 }
 
 defn threadstkline(T){
-	local stk, frame, pc, pc0, file, lastpc0, s, sym, i, stop;
+	local ostk, stk, frame, pc, pc0, file, lastpc0, s, sym, i, stop;
 
 	if T.state == Running then{
 		pc = *PC;
@@ -91,16 +93,22 @@ defn threadstkline(T){
 		pc = labpc(T.sched);
 		stk = strace(labpc(T.sched), labsp(T.sched), 0);
 	}
+	firstpc = pc;
 	lastpc0 = 0;
 	pc0 = 0;
 	stop = 0;
+	ostk = stk;
 	while stk && !stop do {
 		file = pcfile(pc);
 		if !regexp("^/sys/src/libc/", file)
 		&& !regexp("^/sys/src/libthread/", file) 
 		&& match(file, stkignore)==-1 then
 			stop = 1;
-		else{
+		else if stk[0][1] == 0xfefefefe then {
+			pc = ostk[0][1];
+			pc0 = ostk[1][0];
+			stop = 1;
+		}else{
 			lastpc0 = pc0;
 			frame = head stk;
 			stk = tail stk;

+ 2 - 1
sys/man/1/diff

@@ -5,7 +5,8 @@ diff \- differential file comparator
 .B diff
 [
 .B -abcefmnrw
-] file1 ... file2
+] 
+.I file1 ... file2
 .SH DESCRIPTION
 .I Diff
 tells what lines must be changed in two files to bring them

+ 20 - 1
sys/man/1/yesterday

@@ -1,6 +1,6 @@
 .TH YESTERDAY 1
 .SH NAME
-yesterday \- print file names from the dump
+yesterday, diffy \- print file names from the dump
 .SH SYNOPSIS
 .B yesterday
 [
@@ -12,6 +12,12 @@ yesterday \- print file names from the dump
 .I \-date
 ]
 .I files ...
+.PP
+.I diffy
+[
+.B -abcefmnrw
+]
+.I files ...
 .SH DESCRIPTION
 .I Yesterday
 prints the names of the
@@ -98,6 +104,13 @@ than dumps.
 .PP
 .I Yesterday
 does not guarantee that the string it prints represents an existing file.
+.PP
+.I Diffy
+runs
+.IR diff (1)
+with the given options
+to compare yesterday's version of each of the named files
+with today's.
 .SH EXAMPLES
 .PP
 Back up to yesterday's MIPS binary of
@@ -122,6 +135,12 @@ Find what has changed in the C library since March 1:
 .EX
 yesterday -d -0301 /sys/src/libc/port/*.c
 .EE
+.PP
+Find what has changed in the source tree today:
+.IP
+.EX
+diffy -r /sys/src
+.EE
 .SH FILES
 .B /n/dump
 .SH SOURCE

+ 1 - 0
sys/src/9/port/master

@@ -19,6 +19,7 @@ T	lm78
 U	usb
 V	lml
 V	tv
+X	loopback
 Y	pccard
 a	tls
 b	irq

+ 31 - 27
sys/src/boot/pc/devpccard.c

@@ -56,6 +56,9 @@ enum {
 	Ricoh_476_did = 0x0476,
 	Ricoh_478_did = 0x0478,
 
+	O2_vid = 0x1217,
+	O2_OZ711M3_did = 0x7134,
+
 	Nslots = 4,		/* Maximum number of CardBus slots to use */
 
 	K = 1024,
@@ -65,7 +68,7 @@ enum {
 	NUMEVENTS = 10,
 
 	TI1131xSC = 0x80,		// system control
-		TI122X_SC_INTRTIE	= 1 << 29,
+		TI122X_SC_INTRTIE = 1 << 29,
 	TI12xxIM = 0x8c,		// 
 	TI1131xCC = 0x91,		// card control
 		TI113X_CC_RIENB = 1 << 7,
@@ -87,10 +90,11 @@ typedef struct {
 static variant_t variant[] = {
 {	Ricoh_vid,	Ricoh_476_did,	"Ricoh 476 PCI/Cardbus bridge",	},
 {	Ricoh_vid,	Ricoh_478_did,	"Ricoh 478 PCI/Cardbus bridge",	},
-{	TI_vid,		TI_1131_did,		"TI PCI-1131 Cardbus Controller",	},
-{	TI_vid,		TI_1250_did,		"TI PCI-1250 Cardbus Controller",	},
-{	TI_vid,		TI_1450_did,		"TI PCI-1450 Cardbus Controller",	},
-{	TI_vid,		TI_1251A_did,		"TI PCI-1251A Cardbus Controller",	},
+{	TI_vid,		TI_1131_did,	"TI PCI-1131 Cardbus Controller", },
+{	TI_vid,		TI_1250_did,	"TI PCI-1250 Cardbus Controller", },
+{	TI_vid,		TI_1450_did,	"TI PCI-1450 Cardbus Controller", },
+{	TI_vid,		TI_1251A_did,	"TI PCI-1251A Cardbus Controller", },
+{	O2_vid,		O2_OZ711M3_did,	"O2Micro OZ711M3 MemoryCardBus", },
 };
 
 /* Cardbus registers */
@@ -135,10 +139,10 @@ enum {
 };
 
 static char *chipname[] = {
-[Ti82365]		"Intel 82365SL",
+[Ti82365]	"Intel 82365SL",
 [Tpd6710]	"Cirrus Logic PD6710",
 [Tpd6720]	"Cirrus Logic PD6720",
-[Tvg46x]		"Vadem VG-46x",
+[Tvg46x]	"Vadem VG-46x",
 };
 
 /*
@@ -255,16 +259,16 @@ struct PCMconftab
 };
 
 typedef struct {
-	char			pi_verstr[512];		/* Version string */
+	char		pi_verstr[512];		/* Version string */
 	PCMmap		pi_mmap[4];		/* maps, last is always for the kernel */
 	ulong		pi_conf_addr;		/* Config address */
 	uchar		pi_conf_present;	/* Config register present */
-	int			pi_nctab;			/* In use configuration tables */
+	int		pi_nctab;		/* In use configuration tables */
 	PCMconftab	pi_ctab[8];		/* Configuration tables */
 	PCMconftab	*pi_defctab;		/* Default conftab */
 
-	int			pi_port;			/* Actual port usage */
-	int			pi_irq;			/* Actual IRQ usage */
+	int		pi_port;		/* Actual port usage */
+	int		pi_irq;			/* Actual IRQ usage */
 } pcminfo_t;
 
 #define qlock(i)	{/* nothing to do */;}
@@ -273,19 +277,19 @@ typedef struct QLock { int r; } QLock;
 
 typedef struct {
 	QLock;
-	variant_t		*cb_variant;		/* Which CardBus chipset */
-	Pcidev		*cb_pci;			/* The bridge itself */
-	ulong		*cb_regs;			/* Cardbus registers */
-	int			cb_ltype;			/* Legacy type */
-	int			cb_lindex;		/* Legacy port index address */
-	int			cb_ldata;			/* Legacy port data address */
-	int			cb_lbase;			/* Base register for this socket */
-
-	int			cb_state;			/* Current state of card */
-	int			cb_type;			/* Type of card */
-	pcminfo_t	cb_linfo;			/* PCMCIA slot info */
-
-	int			cb_refs;			/* Number of refs to slot */
+	variant_t	*cb_variant;		/* Which CardBus chipset */
+	Pcidev		*cb_pci;		/* The bridge itself */
+	ulong		*cb_regs;		/* Cardbus registers */
+	int		cb_ltype;		/* Legacy type */
+	int		cb_lindex;		/* Legacy port index address */
+	int		cb_ldata;		/* Legacy port data address */
+	int		cb_lbase;		/* Base register for this socket */
+
+	int		cb_state;		/* Current state of card */
+	int		cb_type;		/* Type of card */
+	pcminfo_t	cb_linfo;		/* PCMCIA slot info */
+
+	int		cb_refs;		/* Number of refs to slot */
 	QLock		cb_refslock;		/* inc/dev ref lock */
 } cb_t;
 
@@ -361,7 +365,7 @@ enum {
 
 static char *states[] = {
 [SlotEmpty]		"SlotEmpty",
-[SlotFull]			"SlotFull",
+[SlotFull]		"SlotFull",
 [SlotPowered]		"SlotPowered",
 [SlotConfigured]	"SlotConfigured",
 };
@@ -1740,10 +1744,10 @@ timing(Cisdat *cis, PCMconftab *ct)
 		ct->maxwait = ttiming(cis, i);		/* max wait */
 	i = (c>>2)&0x7;
 	if(i != 7)
-		ct->readywait = ttiming(cis, i);		/* max ready/busy wait */
+		ct->readywait = ttiming(cis, i);	/* max ready/busy wait */
 	i = (c>>5)&0x7;
 	if(i != 7)
-		ct->otherwait = ttiming(cis, i);		/* reserved wait */
+		ct->otherwait = ttiming(cis, i);	/* reserved wait */
 }
 
 static void

+ 23 - 15
sys/src/boot/pc/etherigbe.c

@@ -34,14 +34,14 @@ enum {
 	i82542     = (0x1000<<16)|0x8086,
 	i82543gc   = (0x1004<<16)|0x8086,
 	i82544ei   = (0x1008<<16)|0x8086,
-	i82547ei   = (0x1019<<16)|0x8086,
 	i82540em   = (0x100E<<16)|0x8086,
+	i82546eb   = (0x1010<<16)|0x8086,
+	i82547ei   = (0x1019<<16)|0x8086,
 	i82540eplp = (0x101E<<16)|0x8086,
 	i82547gi   = (0x1075<<16)|0x8086,
 	i82541gi   = (0x1076<<16)|0x8086,
 	i82546gb   = (0x1079<<16)|0x8086,
 	i82541pi   = (0x107c<<16)|0x8086,
-	i82546eb   = (0x1010<<16)|0x8086,
 };
 
 /* compatibility with cpu kernels */
@@ -169,7 +169,9 @@ enum {					/* Eecd */
 	Do		= 0x00000008,	/* Data Output from the EEPROM */
 	Areq		= 0x00000040,	/* EEPROM Access Request */
 	Agnt		= 0x00000080,	/* EEPROM Access Grant */
+	Eepresent	= 0x00000100,	/* EEPROM Present */
 	Eesz256		= 0x00000200,	/* EEPROM is 256 words not 64 */
+	Eeszaddr	= 0x00000400,	/* EEPROM size for 8254[17] */
 	Spi		= 0x00002000,	/* EEPROM is SPI not Microwire */
 };
 
@@ -385,8 +387,8 @@ enum {					/* Tdesc status */
 };
 
 enum {
-	Nrdesc		= 128,		/* multiple of 8 */
-	Ntdesc		= 128,		/* multiple of 8 */
+	Nrdesc		= 32,		/* multiple of 8 */
+	Ntdesc		= 8,		/* multiple of 8 */
 };
 
 typedef struct Ctlr Ctlr;
@@ -845,10 +847,10 @@ igbeinit(Ether* edev)
 	case i82540em:
 	case i82540eplp:
 	case i82541gi:
+	case i82541pi:
 	case i82546gb:
 	case i82546eb:
 	case i82547gi:
-	case i82541pi:
 		csr32w(ctlr, Radv, 64);
 		break;
 	}
@@ -925,10 +927,10 @@ igbeinit(Ether* edev)
 	case i82540em:
 	case i82540eplp:
 	case i82547gi:
+	case i82541pi:
 	case i82546gb:
 	case i82546eb:
 	case i82541gi:
-	case i82541pi:
 		r = csr32r(ctlr, Txdctl);
 		r &= ~WthreshMASK;
 		r |= Gran|(4<<WthreshSHIFT);
@@ -1200,13 +1202,13 @@ igbemii(Ctlr* ctlr)
 		r |= 0x0060;			/* auto-crossover all speeds */
 		r |= 0x0002;			/* polarity reversal enabled */
 		miimiw(ctlr->mii, 16, r);
-	
+
 		r = miimir(ctlr->mii, 20);
 		r |= 0x0070;			/* +25MHz clock */
 		r &= ~0x0F00;
 		r |= 0x0100;			/* 1x downshift */
 		miimiw(ctlr->mii, 20, r);
-	
+
 		miireset(ctlr->mii);
 		break;
 	}
@@ -1288,7 +1290,7 @@ at93c46io(Ctlr* ctlr, char* op, int data)
 			break;
 		}
 		csr32w(ctlr, Eecd, eecd);
-		microdelay(1);
+		microdelay(50);
 	}
 	if(loop >= 0)
 		return -1;
@@ -1307,12 +1309,10 @@ at93c46r(Ctlr* ctlr)
 		print("igbe: SPI EEPROM access not implemented\n");
 		return 0;
 	}
-	if(eecd & Eesz256)
+	if(eecd & (Eeszaddr|Eesz256))
 		bits = 8;
 	else
 		bits = 6;
-	snprint(rop, sizeof(rop), "S :%dDCc;", bits+3);
-
 	sum = 0;
 
 	switch(ctlr->id){
@@ -1339,6 +1339,7 @@ at93c46r(Ctlr* ctlr)
 		}
 		break;
 	}
+	snprint(rop, sizeof(rop), "S :%dDCc;", bits+3);
 
 	for(addr = 0; addr < 0x40; addr++){
 		/*
@@ -1355,7 +1356,12 @@ at93c46r(Ctlr* ctlr)
 		at93c46io(ctlr, "sic", 0);
 		ctlr->eeprom[addr] = data;
 		sum += data;
+
+		if(addr && ((addr & 0x07) == 0))
+			print("\n");
+		print(" %4.4ux", data);
 	}
+	print("\n");
 
 release:
 	if(areq)
@@ -1377,7 +1383,7 @@ detach(Ctlr *ctlr)
 	csr32w(ctlr, Rctl, 0);
 	csr32w(ctlr, Tctl, 0);
 
-	delay(10);
+	delay(20);
 
 	csr32w(ctlr, Ctrl, Devrst);
 	/* apparently needed on multi-GHz processors to avoid infinite loops */
@@ -1451,6 +1457,8 @@ igbereset(Ctlr* ctlr)
 	if ((ctlr->id == i82546gb || ctlr->id == i82546eb) && BUSFNO(ctlr->pcidev->tbdf) == 1)
 		ctlr->eeprom[Ea+2] += 0x100;	// second interface
 	for(i = Ea; i < Eaddrlen/2; i++){
+if(i == Ea && ctlr->id == i82541gi && ctlr->eeprom[i] == 0xFFFF)
+    ctlr->eeprom[i] = 0xD000;
 		ctlr->ra[2*i] = ctlr->eeprom[i];
 		ctlr->ra[2*i+1] = ctlr->eeprom[i]>>8;
 	}
@@ -1480,7 +1488,7 @@ igbereset(Ctlr* ctlr)
 		txcw &= ~(TxcwAne|TxcwPauseMASK|TxcwFd);
 		ctrl = csr32r(ctlr, Ctrl);
 		ctrl &= ~(SwdpioloMASK|Frcspd|Ilos|Lrst|Fd);
-	
+
 		if(ctlr->eeprom[Icw1] & 0x0400){
 			ctrl |= Fd;
 			txcw |= TxcwFd;
@@ -1502,7 +1510,7 @@ igbereset(Ctlr* ctlr)
 			ctrl |= Ips;
 		ctrl |= swdpio<<SwdpiohiSHIFT;
 		csr32w(ctlr, Ctrlext, ctrl);
-	
+
 		if(ctlr->eeprom[Icw2] & 0x0800)
 			txcw |= TxcwAne;
 		pause = (ctlr->eeprom[Icw2] & 0x3000)>>12;

+ 1 - 0
sys/src/cmd/auth/factotum/dat.h

@@ -234,3 +234,4 @@ extern Proto pass;			/* pass.c */
 extern Proto rsa;			/* rsa.c */
 extern Proto wep;			/* wep.c */
 /* extern Proto srs;			/* srs.c */
+extern Proto httpdigest;		/* httpdigest.c */

+ 1 - 0
sys/src/cmd/auth/factotum/fs.c

@@ -29,6 +29,7 @@ prototab[] =
 	&apop,
 	&chap,
 	&cram,
+	&httpdigest,
 	&mschap,
 	&p9any,
 	&p9cr,

+ 184 - 0
sys/src/cmd/auth/factotum/httpdigest.c

@@ -0,0 +1,184 @@
+/*
+ * HTTPDIGEST - MD5 challenge/response authentication (RFC 2617)
+ *
+ * Client protocol:
+ *	write challenge: nonce method uri 
+ *	read response: 2*MD5dlen hex digits
+ *
+ * Server protocol:
+ *	unimplemented
+ */
+#include "dat.h"
+
+enum
+{
+	CNeedChal,
+	CHaveResp,
+
+	Maxphase,
+};
+
+static char *phasenames[Maxphase] = {
+[CNeedChal]	"CNeedChal",
+[CHaveResp]	"CHaveResp",
+};
+
+struct State
+{
+	char resp[MD5dlen*2+1];
+};
+
+static int
+hdinit(Proto *p, Fsstate *fss)
+{
+	int iscli;
+	State *s;
+
+	if((iscli = isclient(_strfindattr(fss->attr, "role"))) < 0)
+		return failure(fss, nil);
+	if(!iscli)
+		return failure(fss, "%s server not supported", p->name);
+
+	s = emalloc(sizeof *s);
+	fss->phasename = phasenames;
+	fss->maxphase = Maxphase;
+	fss->phase = CNeedChal;
+	fss->ps = s;
+	return RpcOk;
+}
+
+static void
+strtolower(char *s)
+{
+	while(*s){
+		*s = tolower(*s);
+		s++;
+	}
+}
+
+static void
+digest(char *user, char *realm, char *passwd,
+	char *nonce, char *method, char *uri,
+	char *dig)
+{
+	uchar b[MD5dlen];
+	char ha1[MD5dlen*2+1];
+	char ha2[MD5dlen*2+1];
+	DigestState *s;
+
+	/*
+	 *  H(A1) = MD5(uid + ":" + realm ":" + passwd)
+	 */
+	s = md5((uchar*)user, strlen(user), nil, nil);
+	md5((uchar*)":", 1, nil, s);
+	md5((uchar*)realm, strlen(realm), nil, s);
+	md5((uchar*)":", 1, nil, s);
+	md5((uchar*)passwd, strlen(passwd), b, s);
+	enc16(ha1, sizeof(ha1), b, MD5dlen);
+	strtolower(ha1);
+
+	/*
+	 *  H(A2) = MD5(method + ":" + uri)
+	 */
+	s = md5((uchar*)method, strlen(method), nil, nil);
+	md5((uchar*)":", 1, nil, s);
+	md5((uchar*)uri, strlen(uri), b, s);
+	enc16(ha2, sizeof(ha2), b, MD5dlen);
+	strtolower(ha2);
+
+	/*
+	 *  digest = MD5(H(A1) + ":" + nonce + ":" + H(A2))
+	 */
+	s = md5((uchar*)ha1, MD5dlen*2, nil, nil);
+	md5((uchar*)":", 1, nil, s);
+	md5((uchar*)nonce, strlen(nonce), nil, s);
+	md5((uchar*)":", 1, nil, s);
+	md5((uchar*)ha2, MD5dlen*2, b, s);
+	enc16(dig, MD5dlen*2+1, b, MD5dlen);
+	strtolower(dig);
+}
+
+static int
+hdwrite(Fsstate *fss, void *va, uint n)
+{
+	State *s;
+	int ret;
+	char *a, *p, *r, *u, *t;
+	char *tok[4];
+	Key *k;
+	Keyinfo ki;
+	Attr *attr;
+
+	s = fss->ps;
+	a = va;
+
+	if(fss->phase != CNeedChal)
+		return phaseerror(fss, "write");
+
+	attr = _delattr(_copyattr(fss->attr), "role");
+	mkkeyinfo(&ki, fss, attr);
+	ret = findkey(&k, &ki, "%s", fss->proto->keyprompt);
+	_freeattr(attr);
+	if(ret != RpcOk)
+		return ret;
+	p = _strfindattr(k->privattr, "!password");
+	if(p == nil)
+		return failure(fss, "key has no password");
+	r = _strfindattr(k->attr, "realm");
+	if(r == nil)
+		return failure(fss, "key has no realm");
+	u = _strfindattr(k->attr, "user");
+	if(u == nil)
+		return failure(fss, "key has no user");
+	setattrs(fss->attr, k->attr);
+
+	/* copy in case a is not null-terminated */
+	t = emalloc(n+1);
+	memcpy(t, a, n);
+	t[n] = 0;
+
+	/* get nonce, method, uri */
+	if(tokenize(t, tok, 4) != 3)
+		return failure(fss, "bad challenge");
+
+	digest(u, r, p, tok[0], tok[1], tok[2], s->resp);
+
+	free(t);
+	closekey(k);
+	fss->phase = CHaveResp;
+	return RpcOk;
+}
+
+static int
+hdread(Fsstate *fss, void *va, uint *n)
+{
+	State *s;
+
+	s = fss->ps;
+	if(fss->phase != CHaveResp)
+		return phaseerror(fss, "read");
+	if(*n > strlen(s->resp))
+		*n = strlen(s->resp);
+	memmove(va, s->resp, *n);
+	fss->phase = Established;
+	fss->haveai = 0;
+	return RpcOk;
+}
+
+static void
+hdclose(Fsstate *fss)
+{
+	State *s;
+	s = fss->ps;
+	free(s);
+}
+
+Proto httpdigest = {
+.name=		"httpdigest",
+.init=		hdinit,
+.write=		hdwrite,
+.read=		hdread,
+.close=		hdclose,
+.addkey=	replacekey,
+.keyprompt=	"user? realm? !password?"
+};

+ 1 - 0
sys/src/cmd/auth/factotum/mkfile

@@ -6,6 +6,7 @@ TARG=factotum\
 PROTO=\
 	apop.$O\
 	chap.$O\
+	httpdigest.$O\
 	p9any.$O\
 	p9cr.$O\
 	p9sk1.$O\

+ 6 - 5
sys/src/cmd/usb/audio/audiofs.c

@@ -8,6 +8,8 @@
 #include "usbaudio.h"
 #include "usbaudioctl.h"
 
+int attachok;
+
 #define STACKSIZE 16*1024
 
 enum
@@ -154,7 +156,7 @@ post(char *name, char *envname, int srvfd)
 	int fd;
 	char buf[32];
 
-	fd = create(name, OWRITE, 0600);
+	fd = create(name, OWRITE, attachok?0666:0600);
 	if(fd < 0)
 		return;
 	sprint(buf, "%d",srvfd);
@@ -271,7 +273,7 @@ rattach(Fid *f)
 	f->flags |= Busy;
 	f->dir = &dirs[Qdir];
 	rhdr.qid = f->dir->qid;
-	if(strcmp(thdr.uname, user) != 0)
+	if(attachok == 0 && strcmp(thdr.uname, user) != 0)
 		return Eperm;
 	return 0;
 }
@@ -386,9 +388,8 @@ ropen(Fid *f)
 
 	if(f->dir == &dirs[Qaudio] || f->dir == &dirs[Qaudioin])
 		return Eperm;
-	if(thdr.mode != OREAD)
-		if((f->dir->mode & 0x2) == 0)
-			return Eperm;
+	if(thdr.mode != OREAD && (f->dir->mode & 0x2) == 0)
+		return Eperm;
 	qlock(f);
 	if(f->dir == &dirs[Qaudioctl] && f->fiddata == nil)
 		f->fiddata = allocaudioctldata();

+ 35 - 1
sys/src/cmd/usb/audio/audiosub.c

@@ -97,6 +97,39 @@ audio_interface(Device *d, int n, ulong csp, void *bb, int nb) {
 		case 0x04:
 			if (verbose)
 				fprint(2, "Audio Mixer Unit %d\n", b[3]);
+			if (debug & Dbginfo){
+				fprint(2, "\t%d bytes:", nb);
+				for(ctl = 0; ctl < nb; ctl++)
+					fprint(2, " 0x%2.2x", b[ctl]);
+				fprint(2, "\n\tbUnitId %d, bNrInPins %d", b[3], b[4]);
+			}
+			if (b[4]){
+				if(debug & Dbginfo) fprint(2, ", baSourceIDs: [%d", b[5]);
+				u = findunit(b[5]);
+				for (ctl = 1; ctl < b[4]; ctl++){
+					if (u < 0)
+						u = findunit(b[5+ctl]);
+					else if ((x = findunit(b[5+ctl])) >= 0 && u != x && verbose)
+						fprint(2, "\tMixer %d for output AND input\n", b[3]);
+					if (debug & Dbginfo) fprint(2, ", %d", b[5+ctl]);
+				}
+				if (debug & Dbginfo) fprint(2, "]\n");
+				if (u >= 0){
+					units[u][nunits[u]++] = b[3];
+					if (mixerid[u] >= 0)
+						fprint(2, "Second mixer (%d, %d) on %s\n", mixerid[u], b[3], u?"record":"playback");
+					mixerid[u] = b[3];
+				}
+				if (debug & Dbginfo){
+					fprint(2, "Channels %d, config %d, ",
+						b[ctl+5], b[ctl+5+1] | b[ctl+5+2] << 8);
+					x = b[ctl+5] * b[4];
+					fprint(2, "programmable: %d bits, 0x", x);
+					x = (x + 7) >> 3;
+					while(x--)
+						fprint(2, "%2.2x", b[ctl+x+5+4]);
+				}
+			}
 			break;
 		case 0x05:
 			if (verbose)
@@ -104,8 +137,9 @@ audio_interface(Device *d, int n, ulong csp, void *bb, int nb) {
 			if (debug & Dbginfo)
 				fprint(2, "\tbUnitId %d, bNrInPins %d", b[3], b[4]);
 			if (b[4]){
-				if (debug & Dbginfo) fprint(2, ", baSourceIDs: [%d", b[5]);
 				u = findunit(b[5]);
+				if (debug & Dbginfo) fprint(2, ", baSourceIDs: %s [%d",
+					u?"record":"playback", b[5]);
 				for (ctl = 1; ctl < b[4]; ctl++){
 					if (u < 0)
 						u = findunit(b[5+ctl]);

+ 10 - 0
sys/src/cmd/usb/audio/usbaudio.c

@@ -252,6 +252,7 @@ threadmain(int argc, char **argv)
 	long volume[8];
 	Audiocontrol *c;
 	char buf[32], *p, line[256];
+	extern int attachok;
 
 	ctlrno = -1;
 	id = -1;
@@ -281,6 +282,9 @@ threadmain(int argc, char **argv)
 	case 's':
 		srvpost = EARGF(usage());
 		break;
+	case 'p':
+		attachok++;
+		break;
 	default:
 		usage();
 	}ARGEND
@@ -329,6 +333,9 @@ threadmain(int argc, char **argv)
 	findendpoints();
 
 	if (endpt[Play] >= 0){
+		if(verbose)
+			fprint(2, "Setting default play parameters: %d Hz, %d channels at %d bits\n",
+				defaultspeed[Play], 2, 16);
 		if(findalt(Play, 2, 16, defaultspeed[Play]) < 0){
 			if(findalt(Play, 2, 16, 48000) < 0)
 				sysfatal("Can't configure playout for %d or %d Hz", defaultspeed[Play], 48000);
@@ -345,6 +352,9 @@ threadmain(int argc, char **argv)
 	}
 
 	if (endpt[Record] >= 0){
+		if(verbose)
+			fprint(2, "Setting default record parameters: %d Hz, %d channels at %d bits\n",
+				defaultspeed[Play], 2, 16);
 		if(findalt(Record, 2, 16, defaultspeed[Record]) < 0){
 			if(findalt(Record, 2, 16, 48000) < 0)
 				sysfatal("Can't configure record for %d or %d Hz", defaultspeed[Record], 48000);

+ 3 - 1
sys/src/cmd/usb/audio/usbaudio.h

@@ -13,10 +13,12 @@ enum {
 	Delay_control		= 0x08,
 	Bassboost_control	= 0x09,
 	Loudness_control	= 0x0a,
-	/* Items below are define by implementation: */
+	/* Items below are defined by implementation: */
 	Channel_control		= 0x0b,
 	Resolution_control	= 0x0c,
 	Ncontrol,
+	Selector_control	= 0x0d,
+
 	sampling_freq_control	= 0x01,
 };
 

+ 85 - 56
sys/src/cmd/usb/audio/usbaudioctl.c

@@ -9,6 +9,7 @@ int endpt[2] =		{-1, -1};
 int interface[2] =	{-1, -1};
 int featureid[2] =	{-1, -1};
 int selectorid[2] =	{-1, -1};
+int mixerid[2] =	{-1, -1};
 int curalt[2] =		{-1, -1};
 int buttonendpt =	-1;
 
@@ -17,33 +18,35 @@ Device *ad;
 
 Audiocontrol controls[2][Ncontrol] = {
 	{
-	[Speed_control] = {		"speed",		0, {0}, 0,	44100,	Undef},
-	[Mute_control] = {		"mute",		0, {0}, 0,	0,		Undef},
-	[Volume_control] = {	"volume",		0, {0}, 0,	0,		Undef},
-	[Bass_control] = {		"bass",		0, {0}, 0,	0,		Undef},
-	[Mid_control] = {		"mid",		0, {0}, 0,	0,		Undef},
-	[Treble_control] = {		"treble",		0, {0}, 0,	0,		Undef},
-	[Equalizer_control] = {	"equalizer",	0, {0}, 0,	0,		Undef},
-	[Agc_control] = {		"agc",		0, {0}, 0,	0,		Undef},
-	[Delay_control] = {		"delay",		0, {0}, 0,	0,		Undef},
-	[Bassboost_control] = {	"bassboost",	0, {0}, 0,	0,		Undef},
-	[Loudness_control] = {	"loudness",	0, {0}, 0,	0,		Undef},
-	[Channel_control] = {	"channels",	0, {0}, 0,	2,		Undef},
-	[Resolution_control] = {	"resolution",	0, {0}, 0,	16,		Undef},
+	[Speed_control] = {		"speed",	0, {0}, 0,	44100,	Undef},
+	[Mute_control] = {		"mute",		0, {0}, 0,	0,	Undef},
+	[Volume_control] = {		"volume",	0, {0}, 0,	0,	Undef},
+	[Bass_control] = {		"bass",		0, {0}, 0,	0,	Undef},
+	[Mid_control] = {		"mid",		0, {0}, 0,	0,	Undef},
+	[Treble_control] = {		"treble",	0, {0}, 0,	0,	Undef},
+	[Equalizer_control] = {		"equalizer",	0, {0}, 0,	0,	Undef},
+	[Agc_control] = {		"agc",		0, {0}, 0,	0,	Undef},
+	[Delay_control] = {		"delay",	0, {0}, 0,	0,	Undef},
+	[Bassboost_control] = {		"bassboost",	0, {0}, 0,	0,	Undef},
+	[Loudness_control] = {		"loudness",	0, {0}, 0,	0,	Undef},
+	[Channel_control] = {		"channels",	0, {0}, 0,	2,	Undef},
+	[Resolution_control] = {	"resolution",	0, {0}, 0,	16,	Undef},
+//	[Selector_control] = {		"selector",	0, {0}, 0,	0,	Undef},
 	}, {
-	[Speed_control] = {		"speed",		0, {0}, 0,	44100,	Undef},
-	[Mute_control] = {		"mute",		0, {0}, 0,	0,		Undef},
-	[Volume_control] = {	"volume",		0, {0}, 0,	0,		Undef},
-	[Bass_control] = {		"bass",		0, {0}, 0,	0,		Undef},
-	[Mid_control] = {		"mid",		0, {0}, 0,	0,		Undef},
-	[Treble_control] = {		"treble",		0, {0}, 0,	0,		Undef},
-	[Equalizer_control] = {	"equalizer",	0, {0}, 0,	0,		Undef},
-	[Agc_control] = {		"agc",		0, {0}, 0,	0,		Undef},
-	[Delay_control] = {		"delay",		0, {0}, 0,	0,		Undef},
-	[Bassboost_control] = {	"bassboost",	0, {0}, 0,	0,		Undef},
-	[Loudness_control] = {	"loudness",	0, {0}, 0,	0,		Undef},
-	[Channel_control] = {	"channels",	0, {0}, 0,	2,		Undef},
-	[Resolution_control] = {	"resolution",	0, {0}, 0,	16,		Undef},
+	[Speed_control] = {		"speed",	0, {0}, 0,	44100,	Undef},
+	[Mute_control] = {		"mute",		0, {0}, 0,	0,	Undef},
+	[Volume_control] = {		"volume",	0, {0}, 0,	0,	Undef},
+	[Bass_control] = {		"bass",		0, {0}, 0,	0,	Undef},
+	[Mid_control] = {		"mid",		0, {0}, 0,	0,	Undef},
+	[Treble_control] = {		"treble",	0, {0}, 0,	0,	Undef},
+	[Equalizer_control] = {		"equalizer",	0, {0}, 0,	0,	Undef},
+	[Agc_control] = {		"agc",		0, {0}, 0,	0,	Undef},
+	[Delay_control] = {		"delay",	0, {0}, 0,	0,	Undef},
+	[Bassboost_control] = {		"bassboost",	0, {0}, 0,	0,	Undef},
+	[Loudness_control] = {		"loudness",	0, {0}, 0,	0,	Undef},
+	[Channel_control] = {		"channels",	0, {0}, 0,	2,	Undef},
+	[Resolution_control] = {	"resolution",	0, {0}, 0,	16,	Undef},
+//	[Selector_control] = {		"selector",	0, {0}, 0,	0,	Undef},
 	}
 };
 
@@ -130,7 +133,7 @@ findalt(int rec, int nchan, int res, int speed)
 int
 setspeed(int rec, int speed)
 {
-	int ps, n, no;
+	int ps, n, no, dist, i;
 	Audioalt *a;
 	Dalt *da;
 	Endpt *ep;
@@ -150,10 +153,13 @@ setspeed(int rec, int speed)
 		sysfatal("curalt[%s] not set\n", rec?"Record":"Playback");
 	da = ep->iface->dalt[curalt[rec]];
 	a = da->devspec;
-	no = -1;
 	if (a->caps & onefreq){
+		if (debug & Dbgcontrol)
+			fprint(2, "setspeed %d: onefreq\n", speed);
 		speed = a->freqs[0];		/* speed not settable, but packet size must still be set */
 	}else if (a->caps & has_contfreq){
+		if (debug & Dbgcontrol)
+			fprint(2, "setspeed %d: contfreq\n", speed);
 		if (speed < a->minfreq)
 			speed = a->minfreq;
 		else if (speed > a->maxfreq)
@@ -162,7 +168,8 @@ setspeed(int rec, int speed)
 			fprint(2, "Setting continuously variable %s speed to %d\n",
 				rec?"record":"playback", speed);
 	}else if (a->caps & has_discfreq){
-		int dist, i;
+		if (debug & Dbgcontrol)
+			fprint(2, "setspeed %d: discfreq\n", speed);
 		dist = 1000000;
 		no = -1;
 		for (i = 0; a->freqs[i] > 0; i++)
@@ -186,25 +193,22 @@ setspeed(int rec, int speed)
 	}
 	if (a->caps & has_setspeed){
 		if (debug & Dbgcontrol)
-			fprint(2, "Setting %s speed to %d Hz;",
-				rec?"record":"playback", speed);
-		if (a->caps & has_discfreq){
-			buf[0] = no;
-			buf[1] = 0;
-			buf[2] = 0;
-		}else{
-			buf[0] = speed;
-			buf[1] = speed >> 8;
-			buf[2] = speed >> 16;
-		}
-		if (setupcmd(ad->ep[0], RH2D|Rclass|Rendpt, SET_CUR, sampling_freq_control<<8, endpt[rec], buf, 3) < 0)
+			fprint(2, "Setting %s speed to %d Hz;", rec?"record":"playback", speed);
+		buf[0] = speed;
+		buf[1] = speed >> 8;
+		buf[2] = speed >> 16;
+		if(setupcmd(ad->ep[0], RH2D|Rclass|Rendpt, SET_CUR, sampling_freq_control<<8, endpt[rec], buf, 3) < 0){
+			fprint(2, "Error in setupcmd\n");
 			return Undef;
-		if (setupreq(ad->ep[0], RD2H|Rclass|Rendpt, GET_CUR, sampling_freq_control<<8, endpt[rec], 3) < 0)
+		}
+		if (setupreq(ad->ep[0], RD2H|Rclass|Rendpt, GET_CUR, sampling_freq_control<<8, endpt[rec], 3) < 0){
+			fprint(2, "Error in setupreq\n");
 			return Undef;
+		}
 		n = setupreply(ad->ep[0], buf, 3);
 		if (n != 3)
-			return Undef;
-		if (buf[2]){
+			fprint(2, "Error in setupreply: %d\n", n);
+		else if (buf[2]){
 			if (debug & Dbgcontrol)
 				fprint(2, "Speed out of bounds %d (0x%x)\n",
 					buf[0] | buf[1] << 8 | buf[2] << 16,
@@ -251,6 +255,8 @@ getspeed(int rec, int which)
 	}
 	if (endpt[rec] < 0)
 		sysfatal("endpt[%s] not set\n", rec?"Record":"Playback");
+	if(debug & Dbgcontrol)
+		fprint(2, "getspeed: curalt[%d] == %d\n", rec, endpt[rec]);
 	ep = ad->ep[endpt[rec]];
 	if (ep->iface == nil)
 		sysfatal("no interface");
@@ -259,23 +265,33 @@ getspeed(int rec, int which)
 	da = ep->iface->dalt[curalt[rec]];
 	a = da->devspec;
 	if (a->caps & onefreq){
+		if(debug & Dbgcontrol)
+			fprint(2, "getspeed: onefreq\n");
 		if (which == GET_RES)
 			return Undef;
 		return a->freqs[0];		/* speed not settable */
-	}else if (a->caps & has_setspeed){
+	}
+	if (a->caps & has_setspeed){
+		if(debug & Dbgcontrol)
+			fprint(2, "getspeed: has_setspeed, ask\n");
 		if (setupreq(ad->ep[0], RD2H|Rclass|Rendpt, which, sampling_freq_control<<8, endpt[rec], 3) < 0)
 			return Undef;
 		n = setupreply(ad->ep[0], buf, 3);
-		if (n != 3)
-			return Undef;
-		if (buf[2]){
-			if (debug & Dbgcontrol)
-				fprint(2, "Speed out of bounds\n");
-			if ((a->caps & has_discfreq) && (buf[0] | buf[1] << 8) < 8)
-				return a->freqs[buf[0] | buf[1] << 8];
+		if(n == 3){
+			if(buf[2]){
+				if (debug & Dbgcontrol)
+					fprint(2, "Speed out of bounds\n");
+				if ((a->caps & has_discfreq) && (buf[0] | buf[1] << 8) < 8)
+					return a->freqs[buf[0] | buf[1] << 8];
+			}
+			return buf[0] | buf[1] << 8 | buf[2] << 16;
 		}
-		return buf[0] | buf[1] << 8 | buf[2] << 16;
-	}else if (a->caps & has_contfreq){
+		if(debug & Dbgcontrol)
+			fprint(2, "getspeed: n = %d\n", n);
+	}
+	if (a->caps & has_contfreq){
+		if(debug & Dbgcontrol)
+			fprint(2, "getspeed: has_contfreq\n");
 		if (which == GET_CUR)
 			return controls[rec][Speed_control].value[0];
 		if (which == GET_MIN)
@@ -284,7 +300,10 @@ getspeed(int rec, int which)
 			return a->maxfreq;
 		if (which == GET_RES)
 			return 1;
-	}else if (a->caps & has_discfreq){
+	}
+	if (a->caps & has_discfreq){
+		if(debug & Dbgcontrol)
+			fprint(2, "getspeed: has_discfreq\n");
 		if (which == GET_CUR)
 			return controls[rec][Speed_control].value[0];
 		if (which == GET_MIN)
@@ -390,6 +409,11 @@ setcontrol(int rec, char *name, long *value)
 		control = ctl<<8;
 		index = featureid[rec]<<8;
 		break;
+	case Selector_control:
+		type = RH2D|Rclass|Rinterface;
+		control = ctl<<8;
+		index = selectorid[rec];
+		break;
 	case Channel_control:
 		control = findalt(rec, value[0], controls[rec][Resolution_control].value[0], defaultspeed[rec]);
 		if(control < 0 || setaudioalt(rec, c, control) < 0){
@@ -401,7 +425,7 @@ setcontrol(int rec, char *name, long *value)
 		controls[rec][Speed_control].value[0] = defaultspeed[rec];
 		return 0;
 	}
-	if (c->chans){
+	if(c->chans){
 		for (i = 1; i < 8; i++)
 			if (c->chans & 1 << i){
 				switch(count){
@@ -476,6 +500,11 @@ getspecialcontrol(int rec, int ctl, int req, long *value)
 		control = ctl<<8;
 		index = featureid[rec]<<8;
 		break;
+	case Selector_control:
+		type = RD2H|Rclass|Rinterface;
+		control = ctl<<8;
+		index = selectorid[rec];
+		break;
 	}
 	if (controls[rec][ctl].chans){
 		m = 0;

+ 4 - 4
sys/src/cmd/usb/audio/usbaudioctl.h

@@ -7,20 +7,20 @@ enum{
 typedef struct Audiocontrol Audiocontrol;
 
 struct Audiocontrol {
-	char		*name;
+	char	*name;
 	uchar	readable;
 	uchar	settable;
 	uchar	chans;		/* 0 is master, non-zero is bitmap */
-	long		value[8];		/* 0 is master; value[0] == Undef -> all values Undef */
-	long		min, max, step;
+	long	value[8];	/* 0 is master; value[0] == Undef -> all values Undef */
+	long	min, max, step;
 };
 
-
 extern Audiocontrol controls[2][Ncontrol];
 extern int endpt[2];
 extern int interface[2];
 extern int featureid[2];
 extern int selectorid[2];
+extern int mixerid[2];
 extern int buttonendpt;
 
 int	ctlparse(char *s, Audiocontrol *c, long *v);

+ 2 - 2
sys/src/libsec/port/hmac.c

@@ -16,13 +16,13 @@ hmac_x(uchar *p, ulong len, uchar *key, ulong klen, uchar *digest, DigestState *
 		return nil;
 
 	/* first time through */
-	if(s == nil){
+	if(s == nil || s->seeded == 0){
 		for(i=0; i<64; i++)
 			pad[i] = 0x36;
 		pad[64] = 0;
 		for(i=0; i<klen; i++)
 			pad[i] ^= key[i];
-		s = (*x)(pad, 64, nil, nil);
+		s = (*x)(pad, 64, nil, s);
 		if(s == nil)
 			return nil;
 	}

+ 1 - 1
sys/src/libthread/iocall.c

@@ -29,7 +29,7 @@ iocall(Ioproc *io, long (*op)(va_list*), ...)
 	}
 
 	/*
-	 * If we get interrupted, we have stick around so that
+	 * If we get interrupted, we have to stick around so that
 	 * the IO proc has someone to talk to.  Send it an interrupt
 	 * and try again.
 	 */