1. 14 6月, 2009 10 次提交
  2. 13 6月, 2009 10 次提交
  3. 12 6月, 2009 8 次提交
  4. 11 6月, 2009 12 次提交
    • S
      bonding: fix multiple module load problem · 130aa61a
      Stephen Hemminger 提交于
      Some users still load bond module multiple times to create bonding
      devices.  This accidentally was broken by a later patch about
      the time sysfs was fixed.  According to Jay, it was broken
      by:
         commit b8a9787e
         Author: Jay Vosburgh <fubar@us.ibm.com>
         Date:   Fri Jun 13 18:12:04 2008 -0700
      
           bonding: Allow setting max_bonds to zero
      
      Note: sysfs and procfs still produce WARN() messages when this is done
      so the sysfs method is the recommended API.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      130aa61a
    • C
      wimax/i2400m: use -EL3RST to indicate device reset instead of -ERESTARTSYS · 0bcfc5ef
      Cindy H Kao 提交于
      When the i2400m device resets, the driver code will force some
      functions to return a -ERESTARTSYS error code, which can is used by
      the caller to determine which recovery actions to take.
      
      However, in certain situations the only thing that can be done is to
      bubble up said error code to user space, for handling.
      
      However, -ERESTARSYS was a poor choice, as it is supposed to be used
      by the kernel only.
      
      As such, replace -ERESTARTSYS with -EL3RST; as well, in
      i2400m_msg_to_dev(), when the device is in boot mode (following a
      recent reset), return -EL3RST instead of -ENODEV (meaning the device
      is in bootrom mode after a reset, not that the device was
      disconnected, and thus, normal commands cannot be executed).
      Signed-off-by: NCindy H Kao <cindy.h.kao@intel.com>
      0bcfc5ef
    • C
      wimax/i2400m: when bootstrap fails, reinitialize the bootrom · 8b5b30ee
      Cindy H Kao 提交于
      When a device reset happens during firmware load [in
      i2400m_dev_bootstrap()], __i2400m_dev_start() will retry a number of
      times. However, for those retries to be able to accomplish anything,
      the device's bootrom has to be reinitialized.
      
      Thus, on the retry path, pass the I2400M_MAC_REINIT to the firmware
      load code.
      Signed-off-by: NCindy H Kao <cindy.h.kao@intel.com>
      8b5b30ee
    • I
      wimax/i2400m/sdio: Move all the RX code to a unified, IRQ based receive routine · 16820c16
      Inaky Perez-Gonzalez 提交于
      The current SDIO code was working in polling mode for boot-mode
      (firmware load) mode. This was causing issues on some hardware.
      
      Moved all the RX code to use a unified IRQ handler that based on the
      type of data the device is sending can discriminate and decide which
      is the right destination.
      
      As well, all the reads from the device are made to be at least the
      block size (256); the driver will ignore the rest when not needed.
      Signed-off-by: NDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      16820c16
    • I
      wimax/i2400m: don't reset device when bootrom init retries are exceeded · 6e053d6c
      Inaky Perez-Gonzalez 提交于
      When i2400m_bootrom_init() fails to put the device into a state of
      being ready to accept firmware, the driver was currently trying to
      reset it if it failed to do so. This is not too useful; as part of
      trying to put the device in the right state a few resets have already
      been tried.
      
      At this point, things are probably fried out and an extra reset might
      do more harm than good (for example causing reseting of other
      functions in the same composite device).
      
      So it is left up to the callers to determine the error path to take
      (at the end this is always i2400m_setup(), who depending on how many
      retries are left, might give up on the device).
      
      From a fix by Cindy H. Kao.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      6e053d6c
    • D
      wimax/i2400m/sdio: Add device specific poke table. · 1c0b2dd7
      Dirk Brandewie 提交于
      Add a poke table for the SDIO device (as it is different than USB).
      Signed-off-by: NDirk Brandewie <dirk.j.brandewie@intel.com>
      1c0b2dd7
    • D
      wimax/i2400m: move boot time poke table out of common driver · 7308a0c2
      Dirk Brandewie 提交于
      This change moves the table of "pokes" performed on the device at boot
      time to the bus specific portion of the driver.
      
      Different models of the i2400m device supported by this driver require
      different poke tables, thus having a single table that works for all
      is impossible. For that, the table is moved to the bus-specific
      driver, who can decide which table to use based on the specifics of
      the device and point the generic driver to it.
      Signed-off-by: NDirk Brandewie <dirk.j.brandewie@intel.com>
      7308a0c2
    • I
      wimax/i2400m: Allow bus-specific driver to specify retry count · ecddfd5e
      Inaky Perez-Gonzalez 提交于
      The code that sets up the i2400m (firmware load and general driver
      setup after it) includes a couple of retry loops.
      
      The SDIO device sometimes can get in more complicated corners than the
      USB one (due to its interaction with other SDIO functions), that
      require trying a few more times.
      
      To solve that, without having a failing USB device taking longer to be
      considered dead, allow the retry counts to be specified by the
      bus-specific driver, which the general driver takes as a parameter.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      ecddfd5e
    • I
      wimax/i2400m: if a device reboot happens during probe, handle it · b4013f91
      Inaky Perez-Gonzalez 提交于
      When a device reboot happens when we are under probe, with init_mutex
      taken, make sure we can recover. Have dev_reset_handle set boot mode
      and i2400m_msg_to_dev() will see it and fail gracefully instead of
      timing out.
      
      Found and diagnosed by Cindy H. Kao.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      b4013f91
    • I
      wimax/i2400m: fix oops when the TX FIFO fills up due to a missing check · 59063afa
      Inaky Perez-Gonzalez 提交于
      When the TX FIFO filled up and i2400m_tx_new() failed to allocate a
      new TX message header, a missing check for said condition was causing a
      kernel oops when trying to dereference a NULL i2400m->tx_msg pointer.
      
      Found and diagnosed by Cindy H. Kao.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      59063afa
    • I
      wimax/i2400m: don't reset device on i2400m_dev_shutdown() · b4bd07e3
      Inaky Perez-Gonzalez 提交于
      i2400m_dev_shutdown() tried to reset the device to put it in a known
      state before shutting down.
      
      But that turned out to be pointless. We reach this case in two paths:
      
       1 - when the device resets, to clean up state
       2 - when the driver is unloaded, for the same
      
      however, in both cases it is pointless; in (1) the device is already
      reset, why do it again? in (2) we can't -- the USB stack, for example,
      doesn't allow communicating with the device when the driver is being
      unbound and if the device is disconnected, the device is gone already.
      
      So just remove it. Leave the function as a placeholder for future
      cleanups that will be done from data allocated by the driver during
      device operation.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      b4bd07e3
    • I
      wimax/i2400m: fix panic due to missed corner cases on tail_room calculation · 2971a5ba
      Inaky Perez-Gonzalez 提交于
      i2400m_tx_skip_tail() needs to handle the special case of being called
      when the tail room that is left over in the FIFO is zero.
      
      This happens when a TX message header was opened at the very end of
      the FIFO (without payloads). The i2400m_tx_close() code already marked
      said TX message (header) to be skipped and this function should be
      doing nothing.
      
      It is called anyway because it is part of a common "corner case" path
      handling which takes care of more cases than only this one.
      
      The tail room computation was also improved to take care of the case
      when tx_in is at the end of the buffer boundary; tail_room has to be
      modded (%) to the buffer size. To do that in a single well-documented
      place, __i2400m_tx_tail_room() is introduced and used.
      
      Treat i2400m->tx_in == 0 as a corner case and handle it accordingly.
      
      Found and diagnosed by Cindy H. Kao.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      2971a5ba