1. 05 4月, 2013 7 次提交
    • E
      Revert "af_unix: dont send SCM_CREDENTIAL when dest socket is NULL" · 25da0e3e
      Eric W. Biederman 提交于
      This reverts commit 14134f65.
      
      The problem that the above patch was meant to address is that af_unix
      messages are not being coallesced because we are sending unnecesarry
      credentials.  Not sending credentials in maybe_add_creds totally
      breaks unconnected unix domain sockets that wish to send credentails
      to other sockets.
      
      In practice this break some versions of udev because they receive a
      message and the sending uid is bogus so they drop the message.
      Reported-by: NSven Joachim <svenjoac@gmx.de>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25da0e3e
    • V
      bonding: remove sysfs before removing devices · 4de79c73
      Veaceslav Falico 提交于
      We have a race condition if we try to rmmod bonding and simultaneously add
      a bond master through sysfs. In bonding_exit() we first remove the devices
      (through rtnl_link_unregister() ) and only after that we remove the sysfs.
      If we manage to add a device through sysfs after that the devices were
      removed - we'll end up with that device/sysfs structure and with the module
      unloaded.
      
      Fix this by first removing the sysfs and only after that calling
      rtnl_link_unregister().
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4de79c73
    • H
      atl1e: limit gso segment size to prevent generation of wrong ip length fields · 31d1670e
      Hannes Frederic Sowa 提交于
      The limit of 0x3c00 is taken from the windows driver.
      Suggested-by: NHuang, Xiong <xiong@qca.qualcomm.com>
      Cc: Huang, Xiong <xiong@qca.qualcomm.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31d1670e
    • V
      net: count hw_addr syncs so that unsync works properly. · 4543fbef
      Vlad Yasevich 提交于
      A few drivers use dev_uc_sync/unsync to synchronize the
      address lists from master down to slave/lower devices.  In
      some cases (bond/team) a single address list is synched down
      to multiple devices.  At the time of unsync, we have a leak
      in these lower devices, because "synced" is treated as a
      boolean and the address will not be unsynced for anything after
      the first device/call.
      
      Treat "synced" as a count (same as refcount) and allow all
      unsync calls to work.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4543fbef
    • H
      r8169: fix auto speed down issue · e2409d83
      hayeswang 提交于
      It would cause no link after suspending or shutdowning when the
      nic changes the speed to 10M and connects to a link partner which
      forces the speed to 100M.
      
      Check the link partner ability to determine which speed to set.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Acked-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2409d83
    • D
      Merge branch 'master' of git://1984.lsi.us.es/nf · 4f4ecd5f
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      The following patchset contains netfilter updates for your net tree,
      they are:
      
      * Fix missing the skb->trace reset in nf_reset, noticed by Gao Feng
        while using the TRACE target with several net namespaces.
      
      * Fix prefix translation in IPv6 NPT if non-multiple of 32 prefixes
        are used, from Matthias Schiffer.
      
      * Fix invalid nfacct objects with empty name, they are now rejected
        with -EINVAL, spotted by Michael Zintakis, patch from myself.
      
      * A couple of fixes for wrong return values in the error path of
        nfnetlink_queue and nf_conntrack, from Wei Yongjun.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f4ecd5f
    • D
      Merge branch 'for-davem' of... · 518314ff
      David S. Miller 提交于
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into wireless
      
      John W. Linville says:
      
      ====================
      Here are some more fixes intended for the 3.9 stream...
      
      Regarding the mac80211 bits, Johannes says:
      
      "I had changed the idle handling to simplify it, but broken the
      sequencing of commands, at least for ath9k-htc, one patch restores the
      sequence. The other patch fixes a crash Jouni found while stress-testing
      the remain-on-channel code, when an item is deleted the work struct can
      run twice and crash the second time."
      
      As for the iwlwifi bits, Johannes says:
      
      "The only fix here is to the passive-no-RX firmware regulatory
      enforcement driver support code to not drop auth frames in quick
      succession, leading to not being able to connect to APs on passive
      channels in certain circumstances."
      
      Don't forget the NFC bits, about which Samuel says:
      
      "This time we have:
      
      - A crash fix for when a DGRAM LLCP socket is listening while the NFC adapter
        is physically removed.
      - A potential double skb free when the LLCP socket receive queue is full.
      - A fix for properly handling multiple and consecutive LLCP connections, and
        not trash the socket ack log.
      - A build failure for the MEI microread physical layer, now that the MEI bus
        APIs have been merged into char-misc-next."
      
      On top of that, Stone Piao provides an mwifiex fix to avoid accessing
      beyond the end of a buffer.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      518314ff
  2. 04 4月, 2013 1 次提交
  3. 03 4月, 2013 14 次提交
  4. 02 4月, 2013 12 次提交
    • L
      Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 118c9a45
      Linus Torvalds 提交于
      Pull ARM SoC bug fixes from Arnd Bergmann:
       "After a quiet set of fixes for 3.9-rc4, a lot of people woke up and
        sent urgent fixes for 3.9.  I pushed back on a number of them that got
        deferred to 3.10, but these are the ones that seemed important.
      
        Regression in 3.9:
      
         - Multiple regressions in OMAP2+ clock cleanup
         - SH-Mobile frame buffer bug fix that merged here because of
           maintainer MIA
         - ux500 prcmu changes broke DT booting
         - MMCI duplicated regulator setup on ux500
         - New ux500 clock driver broke ethernet on snowball
         - Local interrupt driver for mvebu broke ethernet
         - MVEBU GPIO driver did not get set up right on Orion DT
         - incorrect interrupt number on Orion crypto for DT
      
        Long-standing bugs, including candidates for stable:
      
         - Kirkwood MMC needs to disable invalid card detect pins
         - MV SDIO pinmux was wrong on Mirabox
         - GoFlex Net board file needs to set NAND chip delay
         - MSM timer restart race
         - ep93xx early debug code broke in 3.7
         - i.MX CPU hotplug race
         - Incorrect clock setup for OMAP1 USB
         - Workaround for bad clock setup by some old OMAP4 boot loaders
         - Static I/O mappings on cns3xxx since 3.2"
      
      * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: cns3xxx: fix mapping of private memory region
        arm: mvebu: Fix pinctrl for Armada 370 Mirabox SDIO port.
        arm: orion5x: correct IRQ used in dtsi for mv_cesa
        arm: orion5x: fix orion5x.dtsi gpio parameters
        ARM: Kirkwood: fix unused mvsdio gpio pins
        arm: mvebu: Use local interrupt only for the timer 0
        ARM: kirkwood: Fix chip-delay for GoFlex Net
        ARM: ux500: Enable the clock controlling Ethernet on Snowball
        ARM: ux500: Stop passing ios_handler() as an MMCI power controlling call-back
        ARM: ux500: Apply the TCPM and TCDM locations and sizes to dbx5x0 DT
        fbdev: sh_mobile_lcdc: fixup B side hsync adjust settings
        ARM: OMAP: clocks: Delay clk inits atleast until slab is initialized
        ARM: imx: fix sync issue between imx_cpu_die and imx_cpu_kill
        ARM: msm: Stop counting before reprogramming clockevent
        ARM: ep93xx: Fix wait for UART FIFO to be empty
        ARM: OMAP4: PM: fix PM regression introduced by recent clock cleanup
        ARM: OMAP3: hwmod data: keep MIDLEMODE in force-standby for musb
        ARM: OMAP4: clock data: lock USB DPLL on boot
        ARM: OMAP1: fix USB host on 1710
      118c9a45
    • L
      Merge branch 'for-3.9' of git://linux-nfs.org/~bfields/linux · f8e9248d
      Linus Torvalds 提交于
      Pull nfsd bugfix from J Bruce Fields:
       "An xdr decoding error--thanks, Toralf Förster, and Trinity!"
      
      * 'for-3.9' of git://linux-nfs.org/~bfields/linux:
        nfsd4: reject "negative" acl lengths
      f8e9248d
    • A
      Merge tag 'v3.9-rc1_cns3xxx_fixes' of git://git.infradead.org/users/cbou/linux-cns3xxx into fixes · 06d1d8c8
      Arnd Bergmann 提交于
      From Anton Vorontsov <anton@enomsg.org>:
      
      This tag includes Mac Lin's work to revive CNS3xxx booting:
      
       "Since commit 0536bdf3 (ARM: move iotable mappings within the vmalloc
       region), [...] the pre-defined iotable mappings is not in the vmalloc
       region. [...] move the iotable mappings into the vmalloc region, and
       merge the MPCore private memory region (containing the SCU, the GIC and
       the TWD) as a single region."
      
      Plus there is a small cosmetic fix, also from Mac Lin.
      
      * tag 'v3.9-rc1_cns3xxx_fixes' of git://git.infradead.org/users/cbou/linux-cns3xxx:
        ARM: cns3xxx: fix mapping of private memory region
      
      [arnd: dropped the cosmetic fix from the merge as it is not needed for 3.9]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      06d1d8c8
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · fefcdbe4
      Linus Torvalds 提交于
      Pull virtio fixes from Rusty Russell:
       "One reversion, a tiny leak fix, and a cc:stable locking fix, in two
        parts"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        virtio: console: add locking around c_ovq operations
        virtio: console: rename cvq_lock to c_ivq_lock
        hw_random: free rng_buffer at module exit
        Revert "virtio_console: Initialize guest_connected=true for rproc_serial"
      fefcdbe4
    • A
      loop: prevent bdev freeing while device in use · c1681bf8
      Anatol Pomozov 提交于
      struct block_device lifecycle is defined by its inode (see fs/block_dev.c) -
      block_device allocated first time we access /dev/loopXX and deallocated on
      bdev_destroy_inode. When we create the device "losetup /dev/loopXX afile"
      we want that block_device stay alive until we destroy the loop device
      with "losetup -d".
      
      But because we do not hold /dev/loopXX inode its counter goes 0, and
      inode/bdev can be destroyed at any moment. Usually it happens at memory
      pressure or when user drops inode cache (like in the test below). When later in
      loop_clr_fd() we want to use bdev we have use-after-free error with following
      stack:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000280
        bd_set_size+0x10/0xa0
        loop_clr_fd+0x1f8/0x420 [loop]
        lo_ioctl+0x200/0x7e0 [loop]
        lo_compat_ioctl+0x47/0xe0 [loop]
        compat_blkdev_ioctl+0x341/0x1290
        do_filp_open+0x42/0xa0
        compat_sys_ioctl+0xc1/0xf20
        do_sys_open+0x16e/0x1d0
        sysenter_dispatch+0x7/0x1a
      
      To prevent use-after-free we need to grab the device in loop_set_fd()
      and put it later in loop_clr_fd().
      
      The issue is reprodusible on current Linus head and v3.3. Here is the test:
      
        dd if=/dev/zero of=loop.file bs=1M count=1
        while [ true ]; do
          losetup /dev/loop0 loop.file
          echo 2 > /proc/sys/vm/drop_caches
          losetup -d /dev/loop0
        done
      
      [ Doing bdgrab/bput in loop_set_fd/loop_clr_fd is safe, because every
        time we call loop_set_fd() we check that loop_device->lo_state is
        Lo_unbound and set it to Lo_bound If somebody will try to set_fd again
        it will get EBUSY.  And if we try to loop_clr_fd() on unbound loop
        device we'll get ENXIO.
      
        loop_set_fd/loop_clr_fd (and any other loop ioctl) is called under
        loop_device->lo_ctl_mutex. ]
      Signed-off-by: NAnatol Pomozov <anatol.pomozov@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c1681bf8
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux · aae92db9
      Linus Torvalds 提交于
      Pull tegra clock driver fix from Mike Turquette:
       "Missing base address in Tegra clock driver results in non-operational
        PCIe.  On some devices this means that Ethernet will go uninitialized
        and other devices will fail.  This pull request fixes it with a single
        patch to pass the proper base address in the Tegra clock driver."
      
      * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
        clk: tegra: Allow PLLE training to succeed
      aae92db9
    • L
      Merge tag 'for-3.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rwlove/fcoe · dc543f9e
      Linus Torvalds 提交于
      Pull FCoE fixes from Robert Love:
       "Critical patches to fix FCoE VN2VN mode with new interfaces targeting
        3.9-rc"
      
      * tag 'for-3.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rwlove/fcoe:
        libfcoe: Fix fcoe_sysfs VN2VN mode
        libfc, fcoe, bnx2fc: Split fc_disc_init into fc_disc_{init, config}
        libfc, fcoe, bnx2fc: Always use fcoe_disc_init for discovery layer initialization
        fcoe: Fix deadlock between create and destroy paths
        bnx2fc: Make the fcoe_cltr the SCSI host parent
      dc543f9e
    • S
      mwifiex: limit channel number not to overflow memory · 901ceba4
      Stone Piao 提交于
      Limit the channel number in scan request, or the driver scan
      config structure memory will be overflowed.
      
      Cc: <stable@vger.kernel.org> # 3.5+
      Signed-off-by: NStone Piao <piaoyun@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      901ceba4
    • J
      Merge tag 'nfc-fixes-3.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-fixes · b0bb9b39
      John W. Linville 提交于
      Samuel Ortiz <sameo@linux.intel.com> says:
      
      "This is the 2nd batch of NFC fixes for 3.9. This time we have:
      
      - A crash fix for when a DGRAM LLCP socket is listening while the NFC adapter
        is physically removed.
      - A potential double skb free when the LLCP socket receive queue is full.
      - A fix for properly handling multiple and consecutive LLCP connections, and
        not trash the socket ack log.
      - A build failure for the MEI microread physical layer, now that the MEI bus
        APIs have been merged into char-misc-next."
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b0bb9b39
    • J
    • J
    • T
      clk: tegra: Allow PLLE training to succeed · 0f1bc12e
      Thierry Reding 提交于
      Under some circumstances the PLLE needs to be retrained, in which case
      access to the PMC registers is required. Fix this by passing a pointer
      to the PMC registers instead of NULL when registering the PLLE clock.
      Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
      Acked-By: NPeter De Schrijver <pdeschrijver@nvidia.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      0f1bc12e
  5. 01 4月, 2013 6 次提交
    • L
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 3658f360
      Linus Torvalds 提交于
      Pull arch/tile fix from Chris Metcalf:
       "This change allows newer Tilera boot tools to work correctly with
        current (and stable) kernels by using the right filename to get the
        initramfs from the Tilera hypervisor filesystem."
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        tile: expect new initramfs name from hypervisor file system
      3658f360
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ff3421de
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) sadb_msg prepared for IPSEC userspace forgets to initialize the
          satype field, fix from Nicolas Dichtel.
      
       2) Fix mac80211 synchronization during station removal, from Johannes
          Berg.
      
       3) Fix IPSEC sequence number notifications when they wrap, from Steffen
          Klassert.
      
       4) Fix cfg80211 wdev tracing crashes when add_virtual_intf() returns an
          error pointer, from Johannes Berg.
      
       5) In mac80211, don't call into the channel context code with the
          interface list mutex held.  From Johannes Berg.
      
       6) In mac80211, if we don't actually associate, do not restart the STA
          timer, otherwise we can crash.  From Ben Greear.
      
       7) Missing dma_mapping_error() check in e1000, ixgb, and e1000e.  From
          Christoph Paasch.
      
       8) Fix sja1000 driver defines to not conflict with SH port, from Marc
          Kleine-Budde.
      
       9) Don't call il4965_rs_use_green with a NULL station, from Colin Ian
          King.
      
      10) Suspend/Resume in the FEC driver fail because the buffer descriptors
          are not initialized at all the moments in which they should.  Fix
          from Frank Li.
      
      11) cpsw and davinci_emac drivers both use the wrong interface to
          restart a stopped TX queue.  Use netif_wake_queue not
          netif_start_queue, the latter is for initialization/bringup not
          active management of the queue.  From Mugunthan V N.
      
      12) Fix regression in rate calculations done by
          psched_ratecfg_precompute(), missing u64 type promotion.  From
          Sergey Popovich.
      
      13) Fix length overflow in tg3 VPD parsing, from Kees Cook.
      
      14) AOE driver fails to allocate enough headroom, resulting in crashes.
          Fix from Eric Dumazet.
      
      15) RX overflow happens too quickly in sky2 driver because pause packet
          thresholds are not programmed correctly.  From Mirko Lindner.
      
      16) Bonding driver manages arp_interval and miimon settings incorrectly,
          disabling one unintentionally disables both.  Fix from Nikolay
          Aleksandrov.
      
      17) smsc75xx drivers don't program the RX mac properly for jumbo frames.
          Fix from Steve Glendinning.
      
      18) Fix off-by-one in Codel packet scheduler.  From Vijay Subramanian.
      
      19) Fix packet corruption in atl1c by disabling MSI support, from Hannes
          Frederic Sowa.
      
      20) netdev_rx_handler_unregister() needs a synchronize_net() to fix
          crashes in bonding driver unload stress tests.  From Eric Dumazet.
      
      21) rxlen field of ks8851 RX packet descriptors not interpreted
          correctly (it is 12 bits not 16 bits, so needs to be masked after
          shifting the 32-bit value down 16 bits).  Fix from Max Nekludov.
      
      22) Fix missed RX/TX enable in sh_eth driver due to mishandling of link
          change indications.  From Sergei Shtylyov.
      
      23) Fix crashes during spurious ECI interrupts in sh_eth driver, also
          from Sergei Shtylyov.
      
      24) dm9000 driver initialization is done wrong for revision B devices
          with DSP PHY, from Joseph CHANG.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (53 commits)
        DM9000B: driver initialization upgrade
        sh_eth: make 'link' field of 'struct sh_eth_private' *int*
        sh_eth: workaround for spurious ECI interrupt
        sh_eth: fix handling of no LINK signal
        ks8851: Fix interpretation of rxlen field.
        net: add a synchronize_net() in netdev_rx_handler_unregister()
        MAINTAINERS: Update netxen_nic maintainers list
        atl1e: drop pci-msi support because of packet corruption
        net: fq_codel: Fix off-by-one error
        net: calxedaxgmac: Wake-on-LAN fixes
        net: calxedaxgmac: fix rx ring handling when OOM
        net: core: Remove redundant call to 'nf_reset' in 'dev_forward_skb'
        smsc75xx: fix jumbo frame support
        net: fix the use of this_cpu_ptr
        bonding: fix disabling of arp_interval and miimon
        ipv6: don't accept node local multicast traffic from the wire
        sky2: Threshold for Pause Packet is set wrong
        sky2: Receive Overflows not counted
        aoe: reserve enough headroom on skbs
        line up comment for ndo_bridge_getlink
        ...
      ff3421de
    • J
      DM9000B: driver initialization upgrade · 6741f40d
      Joseph CHANG 提交于
      Fix bug for DM9000 revision B which contain a DSP PHY
      
      DM9000B use DSP PHY instead previouse DM9000 revisions' analog PHY,
      So need extra change in initialization, For
      explicity PHY Reset and PHY init parameter, and
      first DM9000_NCR reset need NCR_MAC_LBK bit by dm9000_probe().
      
      Following DM9000_NCR reset cause by dm9000_open() clear the
      NCR_MAC_LBK bit.
      
      Without this fix, Power-up FIFO pointers error happen around 2%
      rate among Davicom's customers' boards. With this fix, All above
      cases can be solved.
      Signed-off-by: NJoseph CHANG <josright123@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6741f40d
    • S
      sh_eth: make 'link' field of 'struct sh_eth_private' *int* · 3340d2aa
      Sergei Shtylyov 提交于
      The 'link' field of 'struct sh_eth_private' has type 'enum phy_state' while the
      'link' field of 'struct phy_device' is merely *int* (having values 0 and 1) and
      the former field gets assigned from the latter. Make the field match, getting
      rid of incorrectly used PHY_DOWN value in assignments/comparisons.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3340d2aa
    • S
      sh_eth: workaround for spurious ECI interrupt · 3893b273
      Sergei Shtylyov 提交于
      At least on Renesas R8A7778, EESR.ECI interrupt seems to fire regardless of its
      mask in EESIPR register. I can 100% reproduce it with the following scenario:
      target is booted with 'ip=on' option, and so IP-Config opens SoC Ether device
      but doesn't get a proper reply and then succeeds with on-board SMC chip; then
      I login and try to bring up the SoC Ether device with 'ifconfig', and I get
      an ECI interrupt once request_irq() is called by sh_eth_open() (while interrupt
      mask in EESIPR register is all 0), if that interrupt is accompanied by a pending
      EESR.FRC (frame receive completion) interrupt, I get kernel oops in sh_eth_rx()
      because sh_eth_ring_init() hasn't been called yet!
      
      The solution I worked out is the following: in sh_eth_interrupt(), mask the
      interrupt status from EESR register with the interrupt mask from EESIPR register
      in order not to handle the disabled interrupts -- but forcing EESIPR.M_ECI bit
      in this mask set because we always need to fully handle EESR.ECI interrupt in
      sh_eth_error() in order to quench it (as it doesn't get cleared by just writing
      1 to the this bit as all the other interrupts).
      
      While at it, remove unneeded initializer for 'intr_status' variable and give it
      *unsigned long* type, matching the type of sh_eth_read()'s result; fix comment.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: NMax Filippov <max.filippov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3893b273
    • S
      sh_eth: fix handling of no LINK signal · 1e1b812b
      Sergei Shtylyov 提交于
      The code handling the absent LINK signal (or the absent PSR register -- which
      reflects the state of this signal) is quite naive and has probably never really
      worked.  It's probably enough to say that this code is executed only on the LINK
      change interrupt (sic!) but even if we actually have the signal and choose to
      ignore it (it might be connected to PHY's link/activity LED output as on the
      Renesas BOCK-W board), sh_eth_adjust_link() on which this code relies to update
      'mdp->link' gets executed later than the LINK change interrupt where it is
      checked, and so RX/TX never get enabled via ECMR register.
      
      So, ignore the LINK changed interrupt iff LINK signal is absent (or just chosen
      not to be used) or PSR register is absent, and enable/disable RX/TX directly in
      sh_eth_adjust_link() in this case.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e1b812b