summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ATM]: track and close listen sockets when sigd exitsChas Williams2005-09-293-6/+7
| | | | Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
* [ATM]: net/atm/ioctl.c: autoload pppoatm and br2684Roman Kagan2005-09-291-8/+26
| | | | | Signed-off-by: Roman Kagan <rkagan@mail.ru> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
* [TCP]: Fix init_cwnd calculations in tcp_select_initial_window()David S. Miller2005-09-291-5/+6
| | | | | | | Match it up to what RFC2414 really specifies. Noticed by Rick Jones. Signed-off-by: David S. Miller <davem@davemloft.net>
* [APPLETALK]: Fix broadcast bug.Oliver Dawid2005-09-281-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Oliver Dawid <oliver@helios.de> we found a bug in net/appletalk/ddp.c concerning broadcast packets. In kernel 2.4 it was working fine. The bug first occured 4 years ago when switching to new SNAP layer handling. This bug can be splitted up into a sending(1) and reception(2) problem: Sending(1) In kernel 2.4 broadcast packets were sent to a matching ethernet device and atalk_rcv() was called to receive it as "loopback" (so loopback packets were shortcutted and handled in DDP layer). When switching to the new SNAP structure, this shortcut was removed and the loopback packet was send to SNAP layer. The author forgot to replace the remote device pointer by the loopback device pointer before sending the packet to SNAP layer (by calling ddp_dl->request() ) therfor the packet was not sent back by underlying layers to ddp's atalk_rcv(). Reception(2) In atalk_rcv() a packet received by this loopback mechanism contains now the (rigth) loopback device pointer (in Kernel 2.4 it was the (wrong) remote ethernet device pointer) and therefor no matching socket will be found to deliver this packet to. Because a broadcast packet should be send to the first matching socket (as it is done in many other protocols (?)), we removed the network comparison in broadcast case. Below you will find a patch to correct this bug. Its diffed to kernel 2.6.14-rc1 Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Slightly optimize ethernet address comparison.David S. Miller2005-09-281-10/+21
| | | | | | | | | We know the thing is at least 2-byte aligned, so take advantage of that instead of invoking memcmp() which results in truly horrifically inefficient code because it can't assume anything about alignment. Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix GCC4 compile error: sysctl in linux/if_ether.hBen Dooks2005-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | | The following is generated when compiling a recent (2.6.14-rc2-git5) kernel configured for ARM, with GCC4. CC init/main.o In file included from include/linux/netdevice.h:29, from include/net/sock.h:48, from init/main.c:50: include/linux/if_ether.h:114: error: array type has incomplete element type It seems that if CONFIG_SYSCTL is not set, then the compiler will throw an error due to the definition of the ether_table[] array Attached is a solution to the problem Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: fix typo (regeistration)Alexey Dobriyan2005-09-281-1/+1
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: check rose_ndevs earlierAlexey Dobriyan2005-09-281-9/+11
| | | | | | | | * Don't bother with proto registering if rose_ndevs is bad. * Make escape structure more coherent. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: return sane -E* from rose_proto_init()Alexey Dobriyan2005-09-281-4/+6
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: do proto_unregister() on exit pathsAlexey Dobriyan2005-09-281-0/+2
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Add Sun Cassini driver.David S. Miller2005-09-285-0/+9747
| | | | | | | | Written by Adrian Sun (asun@darksunrising.com). Ported to 2.6.x by Tom 'spot' Callaway <tcallawa@redhat.com>. Further cleaned up and integrated by David S. Miller Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix module reference counts for loadable protocol modulesFrank Filz2005-09-282-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have been experimenting with loadable protocol modules, and ran into several issues with module reference counting. The first issue was that __module_get failed at the BUG_ON check at the top of the routine (checking that my module reference count was not zero) when I created the first socket. When sk_alloc() is called, my module reference count was still 0. When I looked at why sctp didn't have this problem, I discovered that sctp creates a control socket during module init (when the module ref count is not 0), which keeps the reference count non-zero. This section has been updated to address the point Stephen raised about checking the return value of try_module_get(). The next problem arose when my socket init routine returned an error. This resulted in my module reference count being decremented below 0. My socket ops->release routine was also being called. The issue here is that sock_release() calls the ops->release routine and decrements the ref count if sock->ops is not NULL. Since the socket probably didn't get correctly initialized, this should not be done, so we will set sock->ops to NULL because we will not call try_module_get(). While searching for another bug, I also noticed that sys_accept() has a possibility of doing a module_put() when it did not do an __module_get so I re-ordered the call to security_socket_accept(). Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Reorder some hot fields of struct net_deviceEric Dumazet2005-09-281-34/+55
| | | | | | | | | | | | | | | | | | | | | | | Place them on separate cache lines in SMP to lower memory bouncing between multiple CPU accessing the device. - One part is mostly used on receive path (including eth_type_trans()) (poll_list, poll, quota, weight, last_rx, dev_addr, broadcast) - One part is mostly used on queue transmit path (qdisc) (queue_lock, qdisc, qdisc_sleeping, qdisc_list, tx_queue_len) - One part is mostly used on xmit path (device) (xmit_lock, xmit_lock_owner, priv, hard_start_xmit, trans_start) 'features' is placed outside of these hot points, in a location that may be shared by all cpus (because mostly read) name_hlist is moved close to name[IFNAMSIZ] to speedup __dev_get_by_name() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Prefetch dev->qdisc_lock in dev_queue_xmit()Eric Dumazet2005-09-281-0/+2
| | | | | | | We know the lock is going to be taken. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Use non-recursive algorithm in skb_copy_datagram_iovec()Daniel Phillips2005-09-281-55/+26Star
| | | | | | | | Use iteration instead of recursion. Fraglists within fraglists should never occur, so we BUG check this. Signed-off-by: Daniel Phillips <phillips@istop.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds2005-09-2728-1192/+908Star
|\
| * [SPARC64]: Do not do TLB pre-filling any more.David S. Miller2005-09-272-35/+0Star
| | | | | | | | | | | | | | | | | | | | | | In order to do it correctly on UltraSPARC-III+ and later we'd need to add some complicated code to set the TAG access extension register before loading the TLB. Since this optimization gives questionable gains, it's best to just remove it for now instead of adding the fix for Ultra-III+ Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Simplify Spitfire D-cache page flush.David S. Miller2005-09-271-46/+23Star
| | | | | | | | | | | | | | | | | | | | It tries to batch up the tag loads and comparisons, and then the stores. And this is just complicated instead of efficient. Also, make the symbol of the Cheetah version more grepable. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Probe D/I/E-cache config and use.David S. Miller2005-09-266-23/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At boot time, determine the D-cache, I-cache and E-cache size and line-size. Use them in cache flushes when appropriate. This change was motivated by discovering that the D-cache on UltraSparc-IIIi and later are 64K not 32K, and the flushes done by the Cheetah error handlers were assuming a 32K size. There are still some pieces of code that are hard coding things and will need to be fixed up at some point. While we're here, fix the D-cache and I-cache parity error handlers to run with interrupts disabled, and when the trap occurs at trap level > 1 log the event via a counter displayed in /proc/cpuinfo. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Add CONFIG_DEBUG_PAGEALLOC support.David S. Miller2005-09-267-15/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The trick is that we do the kernel linear mapping TLB miss starting with an instruction sequence like this: ba,pt %xcc, kvmap_load xor %g2, %g4, %g5 succeeded by an instruction sequence which performs a full page table walk starting at swapper_pg_dir. We first take over the trap table from the firmware. Then, using this constant PTE generation for the linear mapping area above, we build the kernel page tables for the linear mapping. After this is setup, we patch that branch above into a "nop", which will cause TLB misses to fall through to the full page table walk. With this, the page unmapping for CONFIG_DEBUG_PAGEALLOC is trivial. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Fix mask formation in tomatillo_wsync_handler()David S. Miller2005-09-251-1/+1
| | | | | | | | | | | | "1" needs to be "1UL", this is a 64-bit mask we're creating. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Mark functions called by paging_init() as __init.David S. Miller2005-09-231-6/+6
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Kill unused variable in setup_arch()David S. Miller2005-09-231-7/+0Star
| | | | | | | | | | | | 'highest_paddr' is set, but never actually used. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Fix comment typo in head.SDavid S. Miller2005-09-231-1/+1
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Rewrite bootup sequence.David S. Miller2005-09-2314-644/+254Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of all of this cpu-specific code to remap the kernel to the correct location, use portable firmware calls to do this instead. What we do now is the following in position independant assembler: chosen_node = prom_finddevice("/chosen"); prom_mmu_ihandle_cache = prom_getint(chosen_node, "mmu"); vaddr = 4MB_ALIGN(current_text_addr()); prom_translate(vaddr, &paddr_high, &paddr_low, &mode); prom_boot_mapping_mode = mode; prom_boot_mapping_phys_high = paddr_high; prom_boot_mapping_phys_low = paddr_low; prom_map(-1, 8 * 1024 * 1024, KERNBASE, paddr_low); and that replaces the massive amount of by-hand TLB probing and programming we used to do here. The new code should also handle properly the case where the kernel is mapped at the correct address already (think: future kexec support). Consequently, the bulk of remap_kernel() dies as does the entirety of arch/sparc64/prom/map.S We try to share some strings in the PROM library with the ones used at bootup, and while we're here mark input strings to oplib.h routines with "const" when appropriate. There are many more simplifications now possible. For one thing, we can consolidate the two copies we now have of a lot of cpu setup code sitting in head.S and trampoline.S. This is a significant step towards CONFIG_DEBUG_PAGEALLOC support. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Kill readjust_prom_translations()David S. Miller2005-09-221-35/+0Star
| | | | | | | | | | | | | | Testing shows that the prom_unmap() calls do absolutely nothing. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Remove unnecessary paging_init() cruft.David S. Miller2005-09-221-99/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we don't access the PAGE_OFFSET linear mappings any longer before we take over the trap table from the firmware, we don't need to load dummy mappings there into the TLB and we don't need the bootmap_base hack any longer either. While we are here, check for a larger than 8MB kernel and halt the boot with an error message. We know that doesn't work, so instead of failing mysteriously we should let the user know exactly what's wrong. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Do not allocate OBP page tables using bootmemDavid S. Miller2005-09-221-47/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | Just allocate them physically starting from the end of the kernel image. This incredibly simplifies our MM bootstrap in that we don't need any mappings in the linear PAGE_OFFSET area working in order to bootstrap ourselves and take over the trap table from the firmware. Many further simplifications are possible now, and this also sets the stage for CONFIG_DEBUG_PAGEALLOC support. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Break up inherit_prom_mappings() into it's constituent parts.David S. Miller2005-09-221-141/+160
| | | | | | | | | | | | This thing was just a huge monolithic mess, so chop it up. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Do not allocate prom translations using bootmem.David S. Miller2005-09-221-28/+26Star
| | | | | | | | | | | | Use __initdata instead. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Remove ktlb.S instruction patching.David S. Miller2005-09-222-39/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was kind of ugly, and actually buggy. The bug was that we didn't handle a machine with memory starting > 4GB. If the 'prompmd' was allocated in physical memory > 4GB we'd croak because the obp_iaddr_patch and obp_daddr_patch things only supported a 32-bit physical address. So fix this by just loading the appropriate values from two variables in the kernel image, which is locked into the TLB and thus accesses to them can't cause a recursive TLB miss. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Kill SZ_BITS define from dtlb_backend.SDavid S. Miller2005-09-221-12/+1Star
| | | | | | | | | | | | | | This is just a replica of the existing _PAGE_SZBITS, and thus unnecessary. Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SPARC64]: Move kernel TLB miss handling into a seperate file.David S. Miller2005-09-224-157/+179
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2005-09-273-24/+94
|\ \
| * | [TG3]: Update driver version and release date.David S. Miller2005-09-271-2/+2
| | | | | | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [TG3]: misc. fixesMichael Chan2005-09-271-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix interrupt test handler by adding check for IRQ assertion in PCI_STATE register in addition to the status block updated bit. Add test for valid ethernet address in tg3_set_mac_addr(). Add tg3_bus_string() to setup the PCI bus speed/width string for all PCI/PCIX/PCI Express devices. This is used to print the bus type during init_one(). Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [TG3]: 5780 PHY fixesMichael Chan2005-09-272-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 5780 PHY related problems: 1. MAC_RX_MODE reset must be done before setting up the MAC_MODE register on 5705_PLUS chips or the chip will stop receiving after a while. The MAC_RX_MODE reset is needed to prevent intermittently losing the first receive packet on serdes chips. 2. Skip MAC loopback test on 5780 because of hardware errata. Normal traffic including PHY loopback is not affected by the errata. 3. PHY loopback fails intermittently on 5708S and this is fixed by putting the PHY in loopback mode first before programming the MAC mode register. A MAC_RX_MODE reset is also added. 4. Return -EINVAL in tg3_nway_reset() if device is in TBI mode. Allow nway_reset if 5780S is in parallel detect mode. 5. Add missing PHY IDs in KNOWN_PHY_ID() macro. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [NEIGH]: Add debugging check when adding timers.David S. Miller2005-09-271-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | If we double-add a neighbour entry timer, which should be impossible but has been reported, dump the current state of the entry so that we can debug this. Signed-off-by: David S. Miller <davem@davemloft.net>
* | | [PATCH] Make POSIX message queue sys_mq_open() honor umaskKrzysztof Benedyczak2005-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We ignored umask when creating new queues via mq_open (when creating with open() on mqueue fs it is ok of course). According to the specification this a bug. This trivial patch fixes this. Signed-off-by: Krzysztof Benedyczak <golbi@mat.uni.torun.pl> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2005-09-2733-717/+992
|\| |
| * | Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/llc-2.6David S. Miller2005-09-2722-614/+875
| |\ \
| | * | [LLC]: fix llc_ui_recvmsg, making it behave like tcp_recvmsgArnaldo Carvalho de Melo2005-09-225-36/+154
| | | | | | | | | | | | | | | | | | | | | | | | In fact it is an exact copy of the parts that makes sense to LLC :-) Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Fix the accept pathArnaldo Carvalho de Melo2005-09-227-93/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Borrowing the structure of TCP/IP for this. On the receive of new connections I was bh_lock_socking the _new_ sock, not the listening one, duh, now it survives the ssh connections storm I've been using to test this specific bug. Also fixes send side skb sock accounting. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Fix sparse warningsArnaldo Carvalho de Melo2005-09-227-16/+19
| | | | | | | | | | | | | | | | Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [TR]: Set correct frame type for SNAP packetsJochen Friedrich2005-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Fix llc_fixup_skb() bugJochen Friedrich2005-09-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | llc_fixup_skb() had a bug dropping 3 bytes packets (like UA frames). Token ring doesn't pad these frames. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Fix for Bugzilla ticket #5157Jochen Friedrich2005-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Fix for Bugzilla ticket #5156Jochen Friedrich2005-09-222-0/+8
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Use refcounting with struct llc_sapArnaldo Carvalho de Melo2005-09-229-48/+56
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * | [LLC]: Do better struct sock accounting on skbsArnaldo Carvalho de Melo2005-09-225-14/+18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>