06 Feb, 2008

40 commits

  • David S. Miller
     
  • I got the following oops during interface ifup. Unfortunately its not
    easily reproducable so I cant say for sure that my fix fixes this
    problem, but I am confident and I think its correct anyway:

    kernel BUG at /space/kvm/drivers/virtio/virtio_ring.c:234!
    illegal operation: 0001 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 Not tainted 2.6.24zlive-guest-07293-gf1ca151-dirty #91
    Process swapper (pid: 0, task: 0000000000800938, ksp: 000000000084ddb8)
    Krnl PSW : 0404300180000000 0000000000466374 (vring_disable_cb+0x30/0x34)
    R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:3 PM:0 EA:3
    Krnl GPRS: 0000000000000001 0000000000000001 0000000010003800 0000000000466344
    000000000e980900 00000000008848b0 000000000084e748 0000000000000000
    000000000087b300 0000000000001237 0000000000001237 000000000f85bdd8
    000000000e980920 00000000001137c0 0000000000464754 000000000f85bdd8
    Krnl Code: 0000000000466368: e3b0b0700004 lg %r11,112(%r11)
    000000000046636e: 07fe bcr 15,%r14
    0000000000466370: a7f40001 brc 15,466372
    >0000000000466374: a7f4fff6 brc 15,466360
    0000000000466378: eb7ff0500024 stmg %r7,%r15,80(%r15)
    000000000046637e: a7f13e00 tmll %r15,15872
    0000000000466382: b90400ef lgr %r14,%r15
    0000000000466386: a7840001 brc 8,466388
    Call Trace:
    ([] 0x201500f85c000)
    [] vring_interrupt+0x72/0x88
    [] kvm_extint_handler+0x34/0x44
    [] do_extint+0xbc/0xf8
    [] ext_no_vtime+0x16/0x1a
    [] cpu_idle+0x216/0x238
    ([] cpu_idle+0x1f6/0x238)
    [] rest_init+0xaa/0xb8
    [] start_kernel+0x3fc/0x490
    [] _stext+0x20/0x80

    Kernel panic - not syncing: Fatal exception in interrupt

    After looking at the code and the dump I think the following scenario
    happened: Ifup was running on cpu2 and the interrupt arrived on cpu0.
    Now virtnet_open on cpu 2 managed to execute napi_enable and disable_cb
    but did not execute rx_schedule. Meanwhile on cpu 0 skb_recv_done was
    called by vring_interrupt, executed netif_rx_schedule_prep, which
    succeeded and therefore called disable_cb. This triggered the BUG_ON,
    as interrupts were already disabled by cpu 2.

    I think the proper solution is to make the call to disable_cb depend on
    the atomic update of NAPI_STATE_SCHED by using netif_rx_schedule_prep
    in the same way as skb_recv_done.

    Signed-off-by: Christian Borntraeger
    Acked-by: Rusty Russell
    Signed-off-by: Jeff Garzik

    Christian Borntraeger
     
  • The PHY Lib now uses mutexes instead of spin_locks. ucc_geth
    and gianfar both grab the locks in their mdio_reset functions,
    so they need to use mutex_(un)lock instead. This was not caught
    until someone tested it on an SMP system.

    Signed-off-by: Andy Fleming
    Signed-off-by: Jeff Garzik

    Andy Fleming
     
  • Various registers need to be preserved before resetting the device.

    Signed-off-by: Ayaz Abdulla
    Signed-off-by: Jeff Garzik

    Ayaz Abdulla
     
  • The driver needs to ack only the phy status bits that it is currently
    handling and preserve the other bits for the other handlers. For
    example, when reading/writing from the phy, it should not clear the link
    change interrupt bit. This will cause a missing link change interrupt.

    Signed-off-by: Ayaz Abdulla
    Signed-off-by: Jeff Garzik

    Ayaz Abdulla
     
  • This patch fixes the issue where the transmitter and receiver must be
    restarted when applying new changes to certain registers.

    Signed-off-by: Ayaz Abdulla
    Signed-off-by: Jeff Garzik

    Ayaz Abdulla
     
  • David S. Miller
     
  • When CONFIG_PROC_FS is not set and CONFIG_PPPOL2TP is set,
    we have the following warning in build:
    drivers/net/pppol2tp.c: In function 'pppol2tp_init':
    drivers/net/pppol2tp.c:2472: warning: label
    'out_unregister_pppox_proto' defined but not used

    This patches fixes this warning by adding appropriate #ifdef.

    Signed-off-by: Rami Rosen
    Acked-by: James Chapman
    Signed-off-by: David S. Miller

    Rami Rosen
     
  • This checks if the DMA address is bigger than what the controller can manage.
    It will reallocate the buffers in the GFP_DMA zone in that case.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • This patch fixes two off-by-one errors resulting in array overflows
    spotted by the Coverity checker.

    Signed-off-by: Adrian Bunk
    Signed-off-by: John W. Linville

    Adrian Bunk
     
  • This fixes four resource leakages.
    In any error path we must deallocate the DMA frame slots we
    previously allocated by request_slot().
    This is done by storing the ring pointers before doing any ring
    allocation and restoring the old pointers in case of an error.

    This patch by Michael Buesch has been ported to b43legacy.

    Cc: Michael Buesch
    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville

    Stefano Brivio
     
  • We must drop any packets we are not able to encrypt.
    We must not send them unencrypted or with an all-zero-key (which
    basically is the same as unencrypted, from a security point of view).

    This might only trigger shortly after resume before mac80211 reassociated
    and reconfigured the keys.

    It is safe to drop these packets, as the association they belong to
    is not guaranteed anymore anyway.
    This is a security fix in the sense that it prevents information leakage.

    This patch by Michael Buesch has been ported to b43legacy.

    Cc: Michael Buesch
    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville

    Stefano Brivio
     
  • This patch makes suspend/resume work with the b43legacy driver.
    We must not overwrite the MAC addresses in the init function, as this
    would also overwrite the MAC on resume. With an all-zero MAC the device
    firmware is not able to ACK any received packets anymore.
    Fix this by moving the initializion stuff that must be done on init but
    not on resume to the start function.
    Also zero out filter_flags to make sure we don't have some flags
    from a previous instance for a tiny timeframe until mac80211 reconfigures
    them.

    This patch by Michael Buesch has been ported to b43legacy.

    Cc: Michael Buesch
    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville

    Stefano Brivio
     
  • Fix the crash reported below, which seems to happen on bcm4306 rev. 2 devices
    only while using PIO:

    Oops: 0000 [#1] PREEMPT
    Modules linked in: b43(F) rfkill(F) led_class(F) input_polldev(F) arc4 b43legacy mac80211 cfg80211 i915 drm snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device ohci1394 ieee1394 ssb pcmcia snd_intel8x0m ehci_hcd uhci_hcd evdev

    Pid: 0, comm: swapper Tainted: GF (2.6.24st3 #2)
    EIP: 0060:[] EFLAGS: 00010002 CPU: 0
    EIP is at b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy]
    EAX: 0000049b EBX: f11f8044 ECX: 00000001 EDX: 00000000
    ESI: f1ff8000 EDI: 00000000 EBP: f11f8040 ESP: c04f4ef4
    DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
    Process swapper (pid: 0, ti=c04f4000 task=c0488300 task.ti=c04b8000)
    Stack: f90f2788 c05009f0 c0500900 000010f7 f1053823 c04f4f24 dfb8e800 00000003
    f1368000 00000007 00000296 f90f1975 00001000 010c0800 01000000 00000007
    f90f6391 f11f8000 00000082 c04f4f4a 00000000 00004fd0 10f70000 8c061000
    Call Trace:
    [] b43legacy_debugfs_log_txstat+0x48/0xb0 [b43legacy]
    [] b43legacy_handle_hwtxstatus+0x75/0x80 [b43legacy]
    [] b43legacy_pio_rx+0x201/0x280 [b43legacy]
    [] b43legacy_interrupt_tasklet+0x2e3/0x870 [b43legacy]
    [] tasklet_action+0x27/0x60
    [] __do_softirq+0x54/0xb0
    [] do_softirq+0x7b/0xe0
    [] handle_level_irq+0x0/0x110
    [] handle_level_irq+0x0/0x110
    [] irq_exit+0x38/0x40
    [] do_IRQ+0x83/0xd0
    [] __update_rq_clock+0x4f/0x180
    [] common_interrupt+0x23/0x28
    [] wakeup_code+0x7b/0xde
    [] acpi_processor_idle+0x24a/0x3c9
    [] cpu_idle+0x47/0x80
    [] start_kernel+0x205/0x290
    [] unknown_bootoption+0x0/0x1f0
    =======================
    Code: 0f 00 00 81 fb ff 00 00 00 0f 87 36 01 00 00 8d 04 db 85 ff 8d 6c c6 40 8d 5d 04 0f 85 ef 00 00 00 fe 4e 0e 0f b7 46 0c 8b 53 04 4a 50 29 c8 83 e8 52 66 89 46 0c 8b 54 24 14 80 7a 0b 00 74
    EIP: [] b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy] SS:ESP 0068:c04f4ef4
    Kernel panic - not syncing: Fatal exception in interrupt

    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville

    Stefano Brivio
     
  • Generic HDLC now uses random_ether_addr() for generating MAC addresse
    for Ethernet-alike interfaces.

    Signed-off-by: Krzysztof Halasa
    Signed-off-by: Jeff Garzik

    Krzysztof Halasa
     
  • Removes now unneeded struct hdlc_device_desc

    Signed-off-by: Krzysztof Halasa
    Signed-off-by: Jeff Garzik

    Krzysztof Halasa
     
  • Fixes kernel panic in Frame Relay mode

    Signed-off-by: Krzysztof Halasa
    Signed-off-by: Jeff Garzik

    Krzysztof Halasa
     
  • Just like our other drivers before we can switch ixgbe to
    provide real-time packet/byte counters to the stack easily.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • Several counters behave differently on 82598 causing them to display
    incorrect values. Adjust the accounting so the reported numbers
    make sense and do not double count or represent the wrong item.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • We were not returning CHECKSUM_NONE in a lot of cases which is
    wrong. Move common exit points in this function and error code
    up before the actual work in this function.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • A gap was left in the FW release/grab code in up/down path. Fix
    it by making the release/grab code a function and calling it in
    appropriate locations.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • The i82598 can support various media types but this ethtool
    code only was coded for fiber just yet.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • This ports Herbert Xu's "maybe_stop_tx" code and removes the tx_lock
    which is not needed.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • After testing we confirmed that the irq_sem can safely be
    removed from ixgbe.

    Add strict state checking code to various ethtool parts to
    properly protect against races between various driver reset
    paths.

    Signed-off-by: Ayyappan Veeraiyan
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Ayyappan Veeraiyan
     
  • Changes in other networking paths uncovered a bug in the xircom_cb
    driver which made the kernel spew lots of the following error messages:

    BUG eth1 code -5 qlen 0

    It turned out that the driver returned -EIO when there was no
    descriptor available for sending packets. It should return
    NETDEV_TX_BUSY instead. This was discussed on the netdev list before,
    see http://thread.gmane.org/gmane.linux.network/84603 .

    Signed-off-by: Erik Mouw
    Signed-off-by: Jeff Garzik

    Erik Mouw
     
  • Add a check for the pci_register_driver() return value. Removed unused
    variable pad_allocated.

    The aim of this patch is to remove the following warning messages:
    drivers/net/tlan.c: In function 'tlan_probe':
    drivers/net/tlan.c:486: warning: ignoring return value of 'pci_register_driver', declared with attribute warn_unused_result

    Signed-off-by: Leonardo Potenza
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Leonardo Potenza
     
  • The Marvell Orion system on chips have an integrated mv643xx MAC. On these
    little endian ARM devices mv643xx will oops when checksum offload is
    enabled. Swapping the byte order of the protocol and checksum solves this
    problem.

    Signed-off-by: Byron Bradley
    Cc: Dale Farnsworth
    Cc: Manish Lachwani
    Cc: Jeff Garzik
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Byron Bradley
     
  • The Yukon FE chip has a ram buffer therefore it needs the alignment
    restriction and hang check workarounds.

    Therefore:
    * Autodetect the prescence/absence of ram buffer
    * Rename the flag value to reflect this
    * Use it consistently (ie don't reread register)

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • WARNING: vmlinux.o(.text+0x25dca0): Section mismatch in reference from the function .veth_probe() to the function .init.text:.veth_probe_one()

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Jeff Garzik

    Stephen Rothwell
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
    [PKT_SCHED]: vlan tag match
    [NET]: Add if_addrlabel.h to sanitized headers.
    [NET] rtnetlink.c: remove no longer used functions
    [ICMP]: Restore pskb_pull calls in receive function
    [INET]: Fix accidentally broken inet(6)_hash_connect's port offset calculations.
    [NET]: Remove further references to net-modules.txt
    bluetooth rfcomm tty: destroy before tty_close()
    bluetooth: blacklist another Broadcom BCM2035 device
    drivers/bluetooth/btsdio.c: fix double-free
    drivers/bluetooth/bpa10x.c: fix memleak
    bluetooth: uninlining
    bluetooth: hidp_process_hid_control remove unnecessary parameter dealing
    tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
    hamradio: fix dmascc section mismatch
    [SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier
    [SCTP]: Fix kernel panic while received AUTH chunk while enabled auth
    [IPV4]: Formatting fix for /proc/net/fib_trie.
    [IPV6]: Fix sysctl compilation error.
    [NET_SCHED]: Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest git broken build)
    [IPV4]: Fix compile error building without CONFIG_FS_PROC
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    RDMA/nes: Add a driver for NetEffect RNICs
    IB/mthca: Return proper error codes from mthca_fmr_alloc()
    IB: Avoid marking __devinitdata as const
    IB/mlx4: Actually print out the driver version
    IB/ib_mthca: Pre-link receive WQEs in Tavor mode
    IB/mthca: Remove checks for srq->first_free < 0
    IB/fmr_pool: Allocate page list for pool FMRs only when caching enabled
    IB/srp: Retry stale connections
    mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
    IB/mthca: Don't read reserved fields in mthca_QUERY_ADAPTER()
    IPoIB: Remove a misleading debug print
    IPoIB: Handle bonding failover race for connected neighbours too
    IB/mthca: Fix and simplify page size calculation in mthca_reg_phys_mr()
    IB/ehca: Add PMA support
    IB/ehca: Update sma_attr also in case of disruptive config change
    IB/ehca: Prevent sending UD packets to QP0
    IB/cm: Add interim support for routed paths
    mlx4_core: Fix more section mismatches

    Linus Torvalds
     
  • Modify the b43 driver to avoid deadlocking suspend and resume, which happens
    as a result of attempting to unregister device objects locked by the PM core
    during suspend/resume cycles. Also, make it use a suspend-safe method of
    unregistering device object in the resume error path.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Michael Buesch
    Cc: Pavel Machek
    Cc: "John W. Linville"
    Cc: Alan Stern
    Cc: Len Brown
    Cc: Greg KH
    Cc: Kay Sievers
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Replace latency.c use with pm_qos_params use.

    Signed-off-by: mark gross
    Cc: "John W. Linville"
    Cc: Len Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Gross
     
  • Checking if an address is a vmalloc address is done in a couple of places.
    Define a common version in mm.h and replace the other checks.

    Again the include structures suck. The definition of VMALLOC_START and
    VMALLOC_END is not available in vmalloc.h since highmem.c cannot be included
    there.

    Signed-off-by: Christoph Lameter
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Fixing:
    CHECK drivers/net/pcmcia/pcnet_cs.c
    drivers/net/pcmcia/pcnet_cs.c:523:15: warning: symbol 'hw_info' shadows an earlier one
    drivers/net/pcmcia/pcnet_cs.c:148:18: originally declared here

    Signed-off-by: Richard Knutsson
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Knutsson
     
  • Fixing:
    CHECK drivers/net/pcmcia/fmvj18x_cs.c
    drivers/net/pcmcia/fmvj18x_cs.c:1205:6: warning: symbol 'i' shadows an earlier one
    drivers/net/pcmcia/fmvj18x_cs.c:1179:9: originally declared here

    Signed-off-by: Richard Knutsson
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Knutsson
     
  • Use 'max(x,y)' instead of 'x < y ? y : x'.

    Signed-off-by: Richard Knutsson
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Knutsson
     
  • Fixing:
    CHECK drivers/net/pcmcia/axnet_cs.c
    drivers/net/pcmcia/axnet_cs.c:994:5: warning: symbol 'ax_close' was not declared. Should it be static?
    drivers/net/pcmcia/axnet_cs.c:1017:6: warning: symbol 'ei_tx_timeout' was not declared. Should it be static?

    Signed-off-by: Richard Knutsson
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Knutsson
     
  • Fixing:
    CHECK drivers/net/pcmcia/3c574_cs.c
    drivers/net/pcmcia/3c574_cs.c:695:7: warning: symbol 'i' shadows an earlier one
    drivers/net/pcmcia/3c574_cs.c:636:6: originally declared here

    Signed-off-by: Richard Knutson
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Knutsson