30 Apr, 2010

2 commits

  • Merge reason:
    Conflict between LOCK_PREFIX_HERE and relative alternatives
    pointers

    Resolved Conflicts:
    arch/x86/include/asm/alternative.h
    arch/x86/kernel/alternative.c

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • Checkin b3ac891b67bd4b1fc728d1c784cad1212dea433d:
    x86: Add support for lock prefix in alternatives

    ... did not define LOCK_PREFIX_HERE in the case of a uniprocessor
    build. As a result, it would cause any of the usages of this macro to
    fail on a uniprocessor build. Fix this by defining LOCK_PREFIX_HERE
    as a null string.

    Signed-off-by: H. Peter Anvin
    Cc: Luca Barbieri
    LKML-Reference:

    H. Peter Anvin
     

29 Apr, 2010

13 commits

  • Reduce the SMP locks table size by using relative pointers instead of
    absolute ones, thus cutting the table size by half.

    Signed-off-by: Jan Beulich
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Jan Beulich
     
  • ... generating slightly smaller code.

    Signed-off-by: Jan Beulich
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Jan Beulich
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
    regulator: fix enabling regulator issue on max8925

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
    sfc: Change falcon_probe_board() to fail for unsupported boards
    sfc: Always close net device at the end of a disabling reset
    sfc: Wait at most 10ms for the MC to finish reading out MAC statistics
    sctp: Fix oops when sending queued ASCONF chunks
    sctp: fix to calc the INIT/INIT-ACK chunk length correctly is set
    sctp: per_cpu variables should be in bh_disabled section
    sctp: fix potential reference of a freed pointer
    sctp: avoid irq lock inversion while call sk->sk_data_ready()
    Revert "tcp: bind() fix when many ports are bound"
    net/usb: add sierra_net.c driver
    cdc_ether: fix autosuspend for mbm devices
    bluetooth: handle l2cap_create_connless_pdu() errors
    gianfar: Wait for both RX and TX to stop
    ipheth: potential null dereferences on error path
    smc91c92_cs: spin_unlock_irqrestore before calling smc_interrupt()
    drivers/usb/net/kaweth.c: add device "Allied Telesyn AT-USB10 USB Ethernet Adapter"
    bnx2: Update version to 2.0.9.
    bnx2: Prevent "scheduling while atomic" warning with cnic, bonding and vlan.
    bnx2: Fix lost MSI-X problem on 5709 NICs.
    cxgb3: Wait longer for control packets on initialization
    ...

    Linus Torvalds
     
  • The driver needs specific PHY and board support code for each SFC4000
    board; there is no point trying to continue if it is missing.
    Currently unsupported boards can trigger an 'oops'.

    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • This fixes a regression introduced by commit
    eb9f6744cbfa97674c13263802259b5aa0034594 "sfc: Implement ethtool
    reset operation".

    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • The original code would wait indefinitely if MAC stats DMA failed.

    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • When we finish processing ASCONF_ACK chunk, we try to send
    the next queued ASCONF. This action runs the sctp state
    machine recursively and it's not prepared to do so.

    kernel BUG at kernel/timer.c:790!
    invalid opcode: 0000 [#1] SMP
    last sysfs file: /sys/module/ipv6/initstate
    Modules linked in: sha256_generic sctp libcrc32c ipv6 dm_multipath
    uinput 8139too i2c_piix4 8139cp mii i2c_core pcspkr virtio_net joydev
    floppy virtio_blk virtio_pci [last unloaded: scsi_wait_scan]

    Pid: 0, comm: swapper Not tainted 2.6.34-rc4 #15 /Bochs
    EIP: 0060:[] EFLAGS: 00010286 CPU: 0
    EIP is at add_timer+0xd/0x1b
    EAX: cecbab14 EBX: 000000f0 ECX: c0957b1c EDX: 03595cf4
    ESI: cecba800 EDI: cf276f00 EBP: c0957aa0 ESP: c0957aa0
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Process swapper (pid: 0, ti=c0956000 task=c0988ba0 task.ti=c0956000)
    Stack:
    c0957ae0 d1851214 c0ab62e4 c0ab5f26 0500ffff 00000004 00000005 00000004
    00000000 d18694fd 00000004 1666b892 cecba800 cecba800 c0957b14
    00000004
    c0957b94 d1851b11 ceda8b00 cecba800 cf276f00 00000001 c0957b14
    000000d0
    Call Trace:
    [] ? sctp_side_effects+0x607/0xdfc [sctp]
    [] ? sctp_do_sm+0x108/0x159 [sctp]
    [] ? sctp_pname+0x0/0x1d [sctp]
    [] ? sctp_primitive_ASCONF+0x36/0x3b [sctp]
    [] ? sctp_process_asconf_ack+0x2a4/0x2d3 [sctp]
    [] ? sctp_sf_do_asconf_ack+0x1dd/0x2b4 [sctp]
    [] ? sctp_do_sm+0xb8/0x159 [sctp]
    [] ? sctp_cname+0x0/0x52 [sctp]
    [] ? sctp_assoc_bh_rcv+0xac/0xe1 [sctp]
    [] ? sctp_inq_push+0x2d/0x30 [sctp]
    [] ? sctp_rcv+0x797/0x82e [sctp]

    Tested-by: Wei Yongjun
    Signed-off-by: Yuansong Qiao
    Signed-off-by: Shuaijun Zhang
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • When calculating the INIT/INIT-ACK chunk length, we should not
    only account the length of parameters, but also the parameters
    zero padding length, such as AUTH HMACS parameter and CHUNKS
    parameter. Without the parameters zero padding length we may get
    following oops.

    skb_over_panic: text:ce2068d2 len:130 put:6 head:cac3fe00 data:cac3fe00 tail:0xcac3fe82 end:0xcac3fe80 dev:
    ------------[ cut here ]------------
    kernel BUG at net/core/skbuff.c:127!
    invalid opcode: 0000 [#2] SMP
    last sysfs file: /sys/module/aes_generic/initstate
    Modules linked in: authenc ......

    Pid: 4102, comm: sctp_darn Tainted: G D 2.6.34-rc2 #6
    EIP: 0060:[] EFLAGS: 00010282 CPU: 0
    EIP is at skb_over_panic+0x37/0x3e
    EAX: 00000078 EBX: c07c024b ECX: c07c02b9 EDX: cb607b78
    ESI: 00000000 EDI: cac3fe7a EBP: 00000002 ESP: cb607b74
    DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    Process sctp_darn (pid: 4102, ti=cb607000 task=cabdc990 task.ti=cb607000)
    Stack:
    c07c02b9 ce2068d2 00000082 00000006 cac3fe00 cac3fe00 cac3fe82 cac3fe80
    c07c024b cac3fe7c cac3fe7a c0608dec ca986e80 ce2068d2 00000006 0000007a
    cb8120ca ca986e80 cb812000 00000003 cb8120c4 ce208a25 cb8120ca cadd9400
    Call Trace:
    [] ? sctp_addto_chunk+0x45/0x85 [sctp]
    [] ? skb_put+0x2e/0x32
    [] ? sctp_addto_chunk+0x45/0x85 [sctp]
    [] ? sctp_make_init+0x279/0x28c [sctp]
    [] ? apic_timer_interrupt+0x2a/0x30
    [] ? sctp_sf_do_prm_asoc+0x2b/0x7b [sctp]
    [] ? sctp_do_sm+0xa0/0x14a [sctp]
    [] ? sctp_pname+0x0/0x14 [sctp]
    [] ? sctp_primitive_ASSOCIATE+0x2b/0x31 [sctp]
    [] ? sctp_sendmsg+0x7a0/0x9eb [sctp]
    [] ? inet_sendmsg+0x3b/0x43
    [] ? task_tick_fair+0x2d/0xd9
    [] ? sock_sendmsg+0xa7/0xc1
    [] ? smp_apic_timer_interrupt+0x6b/0x75
    [] ? dequeue_task_fair+0x34/0x19b
    [] ? sched_clock_local+0x17/0x11e
    [] ? _copy_from_user+0x2b/0x10c
    [] ? verify_iovec+0x3c/0x6a
    [] ? sys_sendmsg+0x186/0x1e2
    [] ? __wake_up_common+0x34/0x5b
    [] ? __wake_up+0x2c/0x3b
    [] ? tty_wakeup+0x43/0x47
    [] ? remove_wait_queue+0x16/0x24
    [] ? n_tty_read+0x5b8/0x65e
    [] ? default_wake_function+0x0/0x8
    [] ? sys_socketcall+0x17f/0x1cd
    [] ? sysenter_do_call+0x12/0x22
    Code: 0f 45 de 53 ff b0 98 00 00 00 ff b0 94 ......
    EIP: [] skb_over_panic+0x37/0x3e SS:ESP 0068:cb607b74

    To reproduce:

    # modprobe sctp
    # echo 1 > /proc/sys/net/sctp/addip_enable
    # echo 1 > /proc/sys/net/sctp/auth_enable
    # sctp_test -H 3ffe:501:ffff:100:20c:29ff:fe4d:f37e -P 800 -l
    # sctp_darn -H 3ffe:501:ffff:100:20c:29ff:fe4d:f37e -P 900 -h 192.168.0.21 -p 800 -I -s -t
    sctp_darn ready to send...
    3ffe:501:ffff:100:20c:29ff:fe4d:f37e:900-192.168.0.21:800 Interactive mode> bindx-add=192.168.0.21
    3ffe:501:ffff:100:20c:29ff:fe4d:f37e:900-192.168.0.21:800 Interactive mode> bindx-add=192.168.1.21
    3ffe:501:ffff:100:20c:29ff:fe4d:f37e:900-192.168.0.21:800 Interactive mode> snd=10

    ------------------------------------------------------------------
    eth0 has addresses: 3ffe:501:ffff:100:20c:29ff:fe4d:f37e and 192.168.0.21
    eth1 has addresses: 192.168.1.21
    ------------------------------------------------------------------

    Reported-by: George Cheimonidis
    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • Since the change of the atomics to percpu variables, we now
    have to disable BH in process context when touching percpu variables.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • When sctp attempts to update an assocition, it removes any
    addresses that were not in the updated INITs. However, the loop
    may attempt to refrence a transport with address after removing it.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • sk->sk_data_ready() of sctp socket can be called from both BH and non-BH
    contexts, but the default sk->sk_data_ready(), sock_def_readable(), can
    not be used in this case. Therefore, we have to make a new function
    sctp_data_ready() to grab sk->sk_data_ready() with BH disabling.

    =========================================================
    [ INFO: possible irq lock inversion dependency detected ]
    2.6.33-rc6 #129
    ---------------------------------------------------------
    sctp_darn/1517 just changed the state of lock:
    (clock-AF_INET){++.?..}, at: [] sock_def_readable+0x20/0x80
    but this lock took another, SOFTIRQ-unsafe lock in the past:
    (slock-AF_INET){+.-...}

    and interrupts could create inverse lock ordering between them.

    other info that might help us debug this:
    1 lock held by sctp_darn/1517:
    #0: (sk_lock-AF_INET){+.+.+.}, at: [] sctp_sendmsg+0x23d/0xc00 [sctp]

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • This reverts two commits:

    fda48a0d7a8412cedacda46a9c0bf8ef9cd13559
    tcp: bind() fix when many ports are bound

    and a follow-on fix for it:

    6443bb1fc2050ca2b6585a3fa77f7833b55329ed
    ipv6: Fix inet6_csk_bind_conflict()

    It causes problems with binding listening sockets when time-wait
    sockets from a previous instance still are alive.

    It's too late to keep fiddling with this so late in the -rc
    series, and we'll deal with it in net-next-2.6 instead.

    Signed-off-by: David S. Miller

    David S. Miller
     

28 Apr, 2010

25 commits

  • * 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
    pcmcia: fix matching rules for pseudo-multi-function cards
    pcmcia: pcmcia_dev_present bugfix

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    coda: move backing-dev.h kernel include inside __KERNEL__
    mtd: ensure that bdi entries are properly initialized and registered
    Move mtd_bdi_*mappable to mtdcore.c
    btrfs: convert to using bdi_setup_and_register()
    Catch filesystems lacking s_bdi
    drbd: Terminate a connection early if sending the protocol fails
    drbd: fix memory leak
    Fix JFFS2 sync silent failure
    smbfs: add bdi backing to mount session
    ncpfs: add bdi backing to mount session
    exofs: add bdi backing to mount session
    ecryptfs: add bdi backing to mount session
    coda: add bdi backing to mount session
    cifs: add bdi backing to mount session
    afs: add bdi backing to mount session.
    9p: add bdi backing to mount session
    bdi: add helper function for doing init and register of a bdi for a file system
    block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    watchdog: booke_wdt: fix build - unconstify watchdog_info
    watchdog: sbc_fitpc2_wdt: fixed "scheduling while atomic" bug.
    watchdog: sbc_fitpc2_wdt: fixed I/O operations order
    Watchdog: sb_wdog.c: Fix sibyte watchdog initialization

    Linus Torvalds
     
  • Fix regulator enabling issue that is caused by typo error in is_enabled().

    Signed-off-by: Haojian Zhuang
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Haojian Zhuang
     
  • Otherwise we must export backing-dev.h as well, which doesn't make
    any sense.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Re-submitted based on comments from netdev community.
    Summary of the changes:
    1. Improved error handling.
    2. Added the missing timeout arguments to usb_control_msg().

    The following is a new Linux driver which exposes certain models of Sierra
    Wireless modems to the operating system as Network Interface Cards (NICs).

    This driver requires a version of the sierra.c driver which supports
    blacklisting to work properly. The blacklist in sierra.c rejects the interfaces
    claimed by sierra_net.c. Likewise, the sierra_net.c driver only accepts
    (i.e. whitelists) the interface(s) used for USB-to-WWAN traffic.
    The version of sierra.c which supports blacklisting is
    available from the sierra wireless knowledge base page for older kernels. It is
    also available in Linux kernel starting from version 2.6.31.

    This driver works with all Sierra Wireless devices configured with PID=68A3
    like USB305, USB306 provided the corresponding firmware version is I2.0
    (for USB305) or M3.0 (for USB306) and later.
    This driver will not work with earlier firmware versions than the ones shown
    above. In this case the driver will issue an error message indicating
    incompatibility and will not serve the device's USB-to-WWAN interface.

    Sierra_net.c sits atop a pre-existing Linux driver called usbnet.c.
    A series of hook functions are provided in sierra_net.c which are called by
    usbnet.c in response to a particular condition such as receipt or transmission
    of a data packet. As such, usbnet.c does most of the work of making
    a modem appear to the system as a network device and for properly exchanging
    traffic between the USB subsystem and the Network card interface.
    Sierra_net.c is concerned with managing the data exchanged between the
    USB-to-WWAN interface and the upper layers of the operating system.

    Signed-off-by: Elina Pasheva
    Signed-off-by: Rory Filer
    Signed-off-by: David S. Miller

    Elina Pasheva
     
  • Autosuspend works until you bring the wwan interface up, then the
    device does not enter autosuspend anymore.

    The following patch fixes the problem by setting the .manage_power
    field in the mbm_info struct to the same as in the cdc_info struct
    (cdc_manager_power).

    Signed-off-by: Torgny Johansson
    Signed-off-by: David S. Miller

    Torgny Johansson
     
  • l2cap_create_connless_pdu() can sometimes return ERR_PTR(-ENOMEM) or
    ERR_PTR(-EFAULT).

    Signed-off-by: Dan Carpenter
    Acked-by: Marcel Holtmann
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • When gracefully stopping the controller, the driver was continuing if
    *either* RX or TX had stopped. We need to wait for both, or the
    controller could get into an invalid state.

    Signed-off-by: Andy Fleming
    Signed-off-by: David S. Miller

    Andy Fleming
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    keys: don't need to use RCU in keyring_read() as semaphore is held

    Linus Torvalds
     
  • * 'for-2.6.34' of git://linux-nfs.org/~bfields/linux:
    nfsd4: bug in read_buf

    Linus Torvalds
     
  • The request_key() system call and request_key_and_link() should make a
    link from an existing key to the destination keyring (if supplied), not
    just from a new key to the destination keyring.

    This can be tested by:

    ring=`keyctl newring fred @s`
    keyctl request2 user debug:a a
    keyctl request user debug:a $ring
    keyctl list $ring

    If it says:

    keyring is empty

    then it didn't work. If it shows something like:

    1 key in keyring:
    1070462727: --alswrv 0 0 user: debug:a

    then it did.

    request_key() system call is meant to recursively search all your keyrings for
    the key you desire, and, optionally, if it doesn't exist, call out to userspace
    to create one for you.

    If request_key() finds or creates a key, it should, optionally, create a link
    to that key from the destination keyring specified.

    Therefore, if, after a successful call to request_key() with a desination
    keyring specified, you see the destination keyring empty, the code didn't work
    correctly.

    If you see the found key in the keyring, then it did - which is what the patch
    is required for.

    Signed-off-by: David Howells
    Cc: James Morris
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Bill Gatliff reported the following bug when using the irq_chip facility
    of the pca953x driver on a PPC platform:

    BUG: scheduling while atomic: insmod/1530/0x00000002

    He traced it back to an i2c transaction in pca953x_irq_set_type(), which
    can be called with interrupt disabled (from __setup_irq()). As the i2c
    controller can sleep while sending a message, this qualifies as a bad
    idea.

    This patch moves the i2c transaction to pca953x_irq_bus_sync_unlock(),
    where it is actually safe to send an i2c message.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Marc Zyngier
    Reported-by: Bill Gatliff
    Cc: Eric Miao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marc Zyngier
     
  • Correct the file_operations struct in fdinfo entry of tid_base_stuff[].

    Presently /proc/*/task/*/fdinfo contains symlinks to opened files like
    /proc/*/fd/.

    Signed-off-by: Jerome Marchand
    Cc: Alexander Viro
    Cc: Miklos Szeredi
    Cc: Alexey Dobriyan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jerome Marchand
     
  • This patch fixes a build failure introduced by 1d8393171 ("avr32: use
    generic ptrace_resume code") which had the static keyword as a leftover.

    arch/avr32/kernel/ptrace.c:32: error: static declaration of `user_enable_single_step' follows non-static declaration
    include/linux/ptrace.h:268: error: previous declaration of `user_enable_single_step' was here

    References:
    [1]http://kisskb.ellerman.id.au/kisskb/buildresult/2448162/

    Signed-off-by: Peter Huewe
    Cc: Haavard Skinnemoen
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Huewe
     
  • keyring_read() doesn't need to use rcu_dereference() to access the keyring
    payload as the caller holds the key semaphore to prevent modifications
    from happening whilst the data is read out.

    This should solve the following warning:

    ===================================================
    [ INFO: suspicious rcu_dereference_check() usage. ]
    ---------------------------------------------------
    security/keys/keyring.c:204 invoked rcu_dereference_check() without protection!

    other info that might help us debug this:

    rcu_scheduler_active = 1, debug_locks = 0
    1 lock held by keyctl/2144:
    #0: (&key->sem){+++++.}, at: [] keyctl_read_key+0x9c/0xcf

    stack backtrace:
    Pid: 2144, comm: keyctl Not tainted 2.6.34-rc2-cachefs #113
    Call Trace:
    [] lockdep_rcu_dereference+0xaa/0xb2
    [] keyring_read+0x4d/0xe7
    [] keyctl_read_key+0xac/0xcf
    [] sys_keyctl+0x75/0xb9
    [] system_call_fastpath+0x16/0x1b

    Signed-off-by: David Howells
    Cc: Herbert Xu
    Signed-off-by: Andrew Morton
    Signed-off-by: James Morris

    David Howells
     
  • The calls to usb_free_buffer() dereference rx_urb and tx_urb in the
    parameter list but those could be NULL.

    Signed-off-by: Dan Carpenter
    Acked-by: L. Alberto Giménez
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • smc91c92_cs:
    * spin_unlock_irqrestore before calling smc_interrupt() in media_check()
    to avoid lockup.
    * use spin_lock_irqsave for ethtool function.

    Signed-off-by: Ken Kawasaki
    Signed-off-by: David S. Miller

    Ken Kawasaki
     
  • akpm: reluctantly typed in from
    https://bugzilla.kernel.org/show_bug.cgi?id=15599

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andreas Hartmann
     
  • Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The bonding driver calls ndo_vlan_rx_register() while holding bond->lock.
    The bnx2 driver calls bnx2_netif_stop() to stop the rx handling while
    changing the vlgrp. The call also stops the cnic driver which sleeps
    while the bond->lock is held and cause the warning.

    This code path only needs to stop the NAPI rx handling while we are
    changing the vlgrp. Since no reset is going to occur, there is no need
    to stop cnic in this case. By adding a parameter to bnx2_netif_stop()
    to skip stopping cnic, we can avoid the warning.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • It has been reported that under certain heavy traffic conditions in MSI-X
    mode, the driver can lose an MSI-X vector causing all packets in the
    associated rx/tx ring pair to be dropped. The problem is caused by
    the chip dropping the write to unmask the MSI-X vector by the kernel
    (when migrating the IRQ for example).

    This can be prevented by increasing the GRC timeout value for these
    register read and write operations.

    Thanks to Dell for helping us debug this problem.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • In some Power7 platforms, when using VIOS (Virtual I/O Server), we
    need to wait longer for control packets to finish transfer during
    initialization.
    Without this change, initialization may fail prematurely.

    Signed-off-by: Wen Xiong
    Signed-off-by: Andre Detsch
    Acked-by: Divy Le Ray
    Signed-off-by: David S. Miller

    Andre Detsch
     
  • Prompted by a previous patch submitted by Matthew Garret ,
    further digging into errata documentation reveals the current enabling or
    disabling of ASPM L0s and L1 states for certain parts supported by this
    driver are incorrect. 82571 and 82572 should always disable L1. For
    standard frames, 82573/82574/82583 can enable L1 but L0s must be disabled,
    and for jumbo frames 82573/82574 must disable L1. This allows for some
    parts to enable L1 in certain configurations leading to better power
    savings.

    Also according to the same errata, Early Receive (ERT) should be disabled
    on 82573 when using jumbo frames.

    Cc: Matthew Garret
    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • The PHY laser is still on during driver init. It's allowing
    garbage to hit our FIFO, which eventually can cause the entire
    device to die. Power down the laser while setting up the device,
    and re-enable the laser before getting link.

    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Peter Waskiewicz