Commit graph

623 commits

Author SHA1 Message Date
cinap_lenrek 09d3dbc741 ether6105m: increase timeouts for Soekris 5501s (from sources) 2013-08-11 18:32:42 +02:00
cinap_lenrek a269ced358 apply richard millers arm debug fixes (from sources)
From richard:

A couple of patches applied yesterday should make debugging on ARM a
bit more reliable.  Using db or acid on ARM, you may have noticed that
a program being debugged would sometimes execute through a breakpoint
without stopping, or run away while being single stepped.  It turns out,
as often happens, that one symptom had two separate causes.  For details:
	/n/sources/patch/applied/5db-condcode/readme
	/n/sources/patch/applied/arm-bkpt-cond/readme

To take advantage of the patches, rebuild libmach.a, then acid and db.
On machines with a kw kernel (sheevaplug et al), you'll also want to
rebuild /arm/9plug; otherwise breakpoints will stop working at all.
The new 9plug will, however, still work with the old libmach; and
the bcm and teg2 kernels are already compatible with the new libmach.
2013-08-04 01:52:46 +02:00
cinap_lenrek 3904a8357d do not limit kernelpercent IFF *imagemaxmb= is used on a cpu server
the heuristics that limits kernel memory on a cpu server to
a fixed amout (64MB + size for page tables) makes using devdraw
impractical.

if *imagemaxmb= is specified, we can assume that the draw device
will be used so we want to get a reasonable amount (30% default)
of kernel memory.
2013-08-02 17:52:51 +02:00
cinap_lenrek 2353a35dc8 ether82567: determine phy number by probing phy id registers
link status not working on 82567 was due to wrong phy number
used. instead of hardcoding the phy numbers, probe the phys
by reading id1 and id2 registers (code stolen from ethermii).
2013-07-30 22:51:40 +02:00
cinap_lenrek 3b06ca8566 ether82563: make link status work for 82567
on the 82567, reading any phy register just gives 0 back.
however, the card works just fine and no action is required
to (re-)start auto negotiation. so we add maclproc() which just
reads the speed setting and link status from the mac status
register instead of reading the phy registers.

we'v probably seen this symptom on other cards (link: 0) like
82566. we should test if we can make link status work on
these cards as well by just using the maclproc().
2013-07-29 02:32:16 +02:00
cinap_lenrek c23715d268 ether82598, etherigbe: remove receive buffer pool optimization 2013-07-27 12:39:34 +02:00
cinap_lenrek 95b7745419 ether82563: fix mistake (missing buffer alignment) 2013-07-27 10:33:51 +02:00
cinap_lenrek b116a9ad33 ether82563: remove buffer pool optimizations
rx pool exhaustion causes the system to deadlock when netbooted.
queue management should (etheroq) already makes sure the systen
can keep up with the data thowing away buffers.
2013-07-27 09:25:36 +02:00
cinap_lenrek 2009d55643 ether82563, etheriwl, pmmc: fix potential multiprocessor races with wakeup
make sure that the wakeup enable conditions
are seen by different processors before sleep
is called.

the problems havnt been observed so far.
2013-07-26 04:37:32 +02:00
cinap_lenrek ac52599eef ether82563: avoid deadlock due to icansleep() trying to acquire Rbpool.Lock
icansleep() violates the lock ordering due to the following cases:

rbfree(): ilock(Rbpool.Lock) -> wakeup(): spli(), lock(Rbpool.Rendez)
sleep(): splhi(), lock(Rbpool.Rendez) -> icansleep(): ilock(Rbpool.Lock)

erik fixed this moving the wakeup() out of the ilock() in rbfree(),
but i think it is an error to try acquiering a ilock in sleeps wait
condition function in general.

so this is what we do:

in the icansleep() function, we check for the *real* event we care about;
that is, if theres a buffer available in the Rbpool. this is to handle
the case when rbfree() makes a buffer available *before* it sees us
setting p->starve = 1.

p->starve is now just used to gate rbfree() from calling wakeup() as
an optimization.

this might cause spurious wakeups but they are not a problem. missed
wakeups is the thing we have to prevent.
2013-07-26 01:51:03 +02:00
cinap_lenrek 2759b81dec ether82563: work arround for 82579LM on Lenovo X230
dont reset the the phy on reset as this causes the link
to be stuck at 10mbps.
2013-07-24 22:17:13 +02:00
ppatience0 9a5763624f etherrt2860: add rt3090 support and make style more consistent 2013-07-21 18:13:27 -04:00
cinap_lenrek 176569ca4d apply erik quanstros tcp-bdp patch (from sources)
this patch consists of two bits of work submitted as one
patch.

the first bit fixed a "pacing" problem, where a tcp connection
rate-limited by the reading process would experience 10%
of the expected throughput, and could even get into live
lock.  it was noticed at the time of this initial work that
the stack often sent tiny grams.  some good bits from nix'
original tcp were merged in.  the test program
	/n/sources/contrib/quanstro/tcptest.c
will verify that under most conditions, a reader-paced connection
now gets the expected throughput.  expected arguments
would be
	tcptest -s1 -n 5000 -l

the second bit is a first step in preparing tcp to handle
modest (1-2MB) bandwidth-delay products.  the strategy
was to completely implement NewReno.  the testing network
was a 7/35/70ms by 100Mbit wan emulator with 0/.05/.1% loss.
here are the performance comparisons from the changes after
the first round "old" to the submitted patch "new".  the
smallest improvement was 80%, the largest was 11x.

loss%	rtt	old	new
0.10	7	4.40	7.85
0.10	35	0.88	1.79
0.10	70	0.47	0.84
0.05	7	4.80	9.38
0.05	35	1.00	2.02
0.05	70	0.52	1.77
0.01	7	5.33	11.87
0.01	35	1.14	10.97
0.01	70	0.54	4.75
0.00	7	4.49	11.92
0.00	35	1.04	11.35
0.00	70	0.58	10.56

since the diff is not very easy to read, i wrote a small
paper detailing the changes

	http://www.quanstro.net/plan9/tcp/tcp.pdf

- erik
2013-07-21 14:41:51 +02:00
cinap_lenrek b6122a4c42 wifi: make "auth" command non-blocking, let aux/wpa do the waiting for bss scan to complete. 2013-07-18 15:30:53 +02:00
cinap_lenrek 0ca4c2ea45 pmmc: remove unsued initfreq vairables 2013-07-14 01:56:51 +02:00
cinap_lenrek aa671181e8 add ricoh pci sdmmc host controller driver for X230
the driver should work for standard sdhc
(see http://www.sdcard.org/) controllers,
but matches for the ricoh controller only
as it was the only one i have for testing.
2013-07-14 01:33:07 +02:00
cinap_lenrek 7b08f4496b pci: add Intel 82hm67 southbridge 2013-07-12 00:32:59 +02:00
cinap_lenrek 4102ba93d6 increase MaxEther to 64 avoiding "too many ether cards" panic 2013-07-09 19:17:38 +02:00
cinap_lenrek 2d101158e4 add erik quanstros yukon2 ethernet driver 2013-07-09 18:52:01 +02:00
Alexander Polakov 6cf9d283ed Add Ralink RT2860 wireless driver 2013-07-09 16:16:28 +04:00
Alexander Polakov 22cc50307b wifi: make wifihdrlen() public
Required for upcoming RT2860 driver
2013-07-09 16:12:04 +04:00
cinap_lenrek bb11bb1c1f vesa: fix blank/unblank wakeups
it could happen that we unblanked while vesaproc was
currently blanking (when manually blanking using vgactl
for example). the wakeup of the unblank is lost.
2013-07-07 21:02:46 +02:00
cinap_lenrek e32940f726 acpi: skip disabled LAPIC entries
disabled LAPIC entries overwrote the bootstrap processor
apic causing the machine panic with: "no bootstrap processor".
(problem with lenovo X230)

just ignore entries that are disabled or collide with
entries already found. (should not happen)
2013-07-07 12:44:30 +02:00
cinap_lenrek c333697c41 pci: add intel panter point lpc south bridge 2013-07-06 15:19:15 +02:00
cinap_lenrek b31d6f0665 audiohda: x230 pci magic 2013-07-06 13:44:25 +02:00
cinap_lenrek 6d24cced8f mtrr: fix mtrr index out of range for vcnt > Nmtrr 2013-07-05 00:55:48 +02:00
cinap_lenrek 3fbf35112f wifi: move scanning/probe into wifi layer, avoid associating with wpa network until rsne is setup 2013-07-04 00:04:47 +02:00
cinap_lenrek 82ccf5b26a wifi: send probe requests for hidden ssid 2013-07-01 00:55:34 +02:00
cinap_lenrek 6c2e9a98e2 wifi: handle authentication independent of current bss to allow multiple ap's (roaming) 2013-07-01 23:32:21 +02:00
cinap_lenrek cf38ab75fc reintroduce *notsc= option
the issues with the previous tsc change where not related to the tsc
but where problems with timesync using an old frequency file. a
patch to fix timesync was commited, so so we reintroduce the *notsc=
again.
2013-06-25 20:32:43 +02:00
cinap_lenrek 5165864dbb wifi: add watchdog to drop bss if stuck in ap association or get deauthenticated by the ap 2013-06-24 17:24:50 +02:00
cinap_lenrek 196b39126c etheriwl: add rxon() debug print 2013-06-24 17:20:08 +02:00
cinap_lenrek a3b35c224b wifi: fix debug print #l1 -> #1 2013-06-24 23:22:05 +02:00
cinap_lenrek 4da4785412 wifi: signal ap deassociation to aux/wpa with a zero length read.
aux/wpa needs to reset its reply counter on deassociation to
properly restart key negotiation. we signal this with a zero
length read on the connections filtering for eapol protocol.
2013-06-24 22:47:07 +02:00
cinap_lenrek 5c0106b7cf etheriwl: allow switching channels in promisc mode
promisc mode prevented the call to rxon() in transmit
possibly causing association to fail while running snoopy.
2013-06-23 18:27:17 +02:00
cinap_lenrek f39374b47e wifi: fix missed eapol frames
allow the driver to associate the node with a new aid right after
we receive the association response, not just when we transmit
a packet which usualy does not happen as eapol is initiated by
the access point so there are no transmit calls. we just call
transmit from the wifiproc with a nil block to introduce the node.
2013-06-23 07:14:52 +02:00
cinap_lenrek fb22c34833 wifi: simplify 2013-06-23 01:01:36 +02:00
ppatience0 9f3cdd7249 wifi: fix typo 2013-06-22 20:36:56 -04:00
cinap_lenrek 677746244d wifi: have to check for both, bssid/essid in wifictl too 2013-06-23 00:32:16 +02:00
cinap_lenrek a8cc5cff0e wifi: allow selecting specific access point with bssid= parameter and wifictl command 2013-06-23 23:54:15 +02:00
cinap_lenrek 43323512f0 wifi: add a debug flag and printing
add a debug flag that can be set in the ethernet options which
causes status transitions and wifictl messages to be printed.
2013-06-23 22:09:16 +02:00
cinap_lenrek 58f8d7874b alarm: run checkalarms() only on cpu0 (from eriks alarm-once patch) 2013-06-22 09:53:14 +02:00
cinap_lenrek 04b7803291 apic: eleminate splhi and apictimerlock, per cpu apictimer structure
the splhi() and apictimerlock in the Mach isnt neccesary, as
portclock always holds the ilock of the per mach timer queue
when calling timerset().

as fastticks() and the portclock timers are all handled on a
per processor basis, i think it should be theoretically possible
for the lapics to run at different frequencies. so we measure
the lapic frequency for each individual lapic and keep them in
a per processor Apictimer structure instead of assuming them
to be the same.
2013-06-22 09:50:34 +02:00
cinap_lenrek e38938384f wifi: add list of setup encryption key ciphers and lengths into ifstats file
it is usefull to see what encryption keys have been
estabished by aux/wpa.
2013-06-22 01:22:57 +02:00
cinap_lenrek 769fcc82ef devcons: change /dev/kmesg buffer back to normal 16K
this makes it consistent with the manual again.
2013-06-22 01:18:27 +02:00
cinap_lenrek 3487653524 apic: fix lapic timer divider (fixes wrong lapic frequency on boot)
loading the divider before programming one shot mode *sometimes*
gives the wrong frequency. (X200s got 192Mhz vs. 266Mhz, after
5 boot attempts)

also reload the divider after programming periodic mode. (from
http://wiki.osdev.org/APIC_timer)
2013-06-22 00:47:24 +02:00
cinap_lenrek 49c9955aea reverting *notsc= option, this needs another revision 2013-06-21 02:49:08 +02:00
cinap_lenrek 8da4c8dcde plan9.ini: add *notsc= option to disable use of TSC as righ resolution clock
we previously used tsc only on cpu kernel. now that
we use it on terminal kernel too, there might be some
surprises ahead.

so make it possible to disable tsc for machines where
the tsc rate is not kept constant across cores or is
dynamically adjusted by power management.
2013-06-19 20:56:01 +02:00
cinap_lenrek 5bb8203bf6 acpi: use Tblsz enum instead of sizeof(Tbl) due to alignment, enable use tsc on terminal kernel (thank erik) 2013-06-19 22:26:27 +02:00
cinap_lenrek d7c7c7e4b3 devsrv, devshr: wstat permissions
update permissions last in wstat so it will only get changed when there was
no error.
2013-06-18 22:09:40 +02:00