12 Feb, 2008

21 commits

  • Allow the platform data to specify to the DM9000 driver
    that there is no posibility of an attached EEPROM on the
    device, so default all reads to 0xff and ignore any
    write operations.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • The writing of the data should implicitly truncate
    the data to 8bits, so do not bother with the ands
    in the code.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Remove the cal_CRC as this is basically wrappering the
    ether_crc_le function, and is only being used by the
    multicast hash table functions.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • The code was using a delay of 8ms, when it should have been
    using the EEPROM status flag from the device to indicate the
    EEPROM transaction had finished.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Use the netif_msg_*() macros to enable the debugging based
    on the board's msg_enable field. The output still goes via
    the dev_dbg() macros, so will be tagged and output as
    appropriate.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • We have a perfectly good version control system, so we do not
    need to duplicate change comments in the header for this code.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Ensure we hold the spinlock whilst the registers and being
    modified even though we hold the overall lock. This should
    protect against an interrupt happening whilst we are using
    the device.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Remove the old hack to program an initial EEPROM setting
    into the DM9000 as we now have ethtool support for reading
    and writing the EEPROM.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Allow the msg_enable value to be read and written by
    the ethtool interface.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Add ethtool support to access the configuration EEPROM
    connected to the DM9000.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Add a mutex to serialise access to the chip functions from
    entries such as the ethtool and the MII code. This should
    reduce the amount of time the spinlock is held to protect
    the address register.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • The srom array in the board data is only being used in the device probe
    routines. The probe also only uses the first 6 bytes of an array
    we spend 512ms reading 128 bytes from. Change to reading the
    MAC area directly to the MAC address structure.

    As a side product, we rename the read_srom_word to dm9000_read_eeprom
    to bring it into line with the rest of the driver. No change is made
    to the delay in this function, which will be dealt with in a later
    patch.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • We can use sleeping functions when reading and writing the
    PHY registers, so let us sleep instead of busy waiting for
    the PHY.

    Note, this also fixes a bug reading the PHY where only 100uS
    was being used instead of 150uS

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • The phy read and write routines call udelay() with the board
    lock held, and with the posibility of IRQs being disabled. Since
    these delays can be up to 500usec, and are only required as we
    have to save the chip's address register.

    To improve the behaviour, hold the lock whilst we are writing
    and then restore the state before the delay and then repeat
    the process once the delay has happened.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Add support for ethtool operations for the DM9000.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Remove the timer based MII phy polling, as this is
    currently broken with the new EEPROM code that now
    uses mutexes to protect the phy access.

    This will need to be replaced in the future by some
    form of mutex safe mechanism for reading the MII
    phy status.

    The replacement has not been done here as changing
    this patch, which is early in the sequence has quite
    a knock-on effect. Once this series is merged, then
    a new presentation of an patch to poll the MII link
    status can be added.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Use the flags in the IRQ resource to specify the type of
    IRQ being requested, so that systems which do not have
    level-based interrupts, or change the interrupt in some
    other way can specify this without making an #ifdef mess
    in the driver.

    This is specifically designed to undo the change in commit
    4e4fc05a2b6e7bd2e0facd96e0c18dceb34d9349 which hardwires the
    type for everyone but blackfin to IRQT_RISING, which breaks
    all a number of Simtec boards which use (and setup in the
    bootloader) active low IRQs.

    Note, although there where originally objections due to
    the use of IORESOURCE_IRQ and IRQT_ flags not sharing the
    same definition, at least notes
    these are the same.

    Signed-off-by: Ben Dooks
    CC: Daniel Mack
    CC: Bryan Wu
    CC: Alex Landau
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Change the debug macros to use the compiler to elide any
    unnecessary debug level, and to allow device configurable
    debug control.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Move to using dev_dbg() and friends for the output of
    information to the user.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Patch from: Laurent Pinchart

    This patch adds a flag to the DM9000 platform data which, when set,
    configures the device to use an external PHY.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     
  • Patch from: Laurent Pinchart

    This patch splits the receive status in 8bit wide fields and convert the
    packet length from little endian to CPU byte order.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Ben Dooks
    Signed-off-by: Jeff Garzik

    Ben Dooks
     

11 Feb, 2008

19 commits

  • 1. Add common code for stopping queue.
    2. No need to call netif_stop_queue followed by netif_wake_queue (and
    infact a netif_start_queue could have been used instead), instead
    call stop_queue if required, and remove code under USE_GTS macro.
    3. There is no need to check for netif_queue_stopped, as the network
    core guarantees that for us (I am sure every driver could remove
    that check, eg e1000 - I have tested that path a few billion times
    with about a few hundred thousand qstops but the condition never
    hit even once).

    Signed-off-by: Krishna Kumar
    Signed-off-by: Jeff Garzik

    Krishna Kumar
     
  • The e1000 driver stores the content of the PCI resources into
    unsigned long's before ioremapping. This breaks on 32 bits
    platforms that support 64 bits MMIO resources such as ppc 44x.

    This fixes it by removing those temporary variables and passing
    directly the result of pci_resource_start/len to ioremap.

    The side effect is that I removed the assignments to the netdev
    fields mem_start, mem_end and base_addr, which are totally useless
    for PCI devices.

    Signed-off-by: Benjamin Herrenschmidt
    --

    drivers/net/e1000/e1000_main.c | 18 +++++-------------
    1 file changed, 5 insertions(+), 13 deletions(-)
    Signed-off-by: Jeff Garzik

    Benjamin Herrenschmidt
     
  • Signed-off-by: Masakazu Mokuno
    Acked-by: Dan Williams
    Acked-by: John W. Linville
    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • Add support for dual network (net_device) interface so that ethernet
    and wireless can own separate ethX interfaces.

    V2
    - Fix the bug that bringing down and up the interface keeps rx
    disabled.
    - Make 'gelic_net_poll_controller()' extern , as David Woodhouse
    pointed out at the previous submission.
    - Fix weird usage of member names for the rx descriptor chain
    V1
    - Export functions which are convenient for both interfaces
    - Move irq allocation/release code to driver probe/remove handlers
    because interfaces share interrupts.
    - Allocate skbs by using dev_alloc_skb() instead of netdev_alloc_skb()
    as the interfaces share the hardware rx queue.
    - Add gelic_port struct in order to abstract dual interface handling
    - Change handlers for hardware queues so that they can handle dual
    {source,destination} interfaces.
    - Use new NAPI functions
    This is a prerequisite for the new PS3 wireless support.

    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • Add support for interrupt driven port link status detection.

    Signed-off-by: Masakazu Mokuno
    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • Remove some ethtool handlers, which duplicate functionality that was already
    provided by the common ethtool handlers.

    Signed-off-by: Masakazu Mokuno
    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • Code cleanup:
    - Use appropriate prefixes for names instead of fixed 'gelic_net'
    so that objects of the functions, variables and constants can be estimated.
    - Remove definitions for IPSec offload to the gelic hardware. This
    functionality is never supported on PS3.
    - Group constants with enum.
    - Use bitwise constants for interrupt status, instead of bit numbers to
    eliminate shift operations.
    - Style fixes.
    Signed-off-by: Masakazu Mokuno
    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • Mark the members of the structure for DMA descriptors with proper endian
    annotations and use the appropriate accessor macros.
    As the gelic driver works only on PS3, all these macros will be
    expanded to null.

    Signed-off-by: Masakazu Mokuno
    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • The device id for lv1_net_set_interrupt_status_indicator() is wrong.
    This path would be invoked only in the case of an initialization failure.

    Signed-off-by: Masakazu Mokuno
    Signed-off-by: Jeff Garzik

    Masakazu Mokuno
     
  • Updates the 8139too driver to work with recently added
    (a724605cb7a66d423a494a395f9a8ba871b8a1eb) declared coherent memory
    patch for the Dreamcast.

    Signed-off-by: Adrian McMenamin
    Signed-off-by: Jeff Garzik

    Adrian McMenamin
     
  • To kill the volatiles also switch it to stop poking ISA memory directly
    without going through readb and friends.

    Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Signed-off-by: Joe Perches
    Acked-by: Don Fry
    Signed-off-by: Jeff Garzik

    Don Fry
     
  • Change hard coded 2 to NET_IP_ALIGN. Added new #define with comments.
    Tested amd_64

    Signed-off-by: Don Fry
    Signed-off-by: Jeff Garzik

    Don Fry
     
  • .. and I really need to call it something else. Maybe it is time to
    bring back the weasel series, since weasels always make me feel good
    about a kernel.

    Linus Torvalds
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
    [ARM] constify function pointer tables
    [ARM] 4823/1: AT91 section fix
    [ARM] 4824/1: pxa: clear RDH bit after any reset
    [ARM] pxa: remove debugging PM: printk
    ARM: OMAP1: Misc clean-up
    ARM: OMAP1: Update defconfigs for omap1
    ARM: OMAP1: Palm Tungsten E board clean-up
    ARM: OMAP1: Use I2C bus registration helper for omap1
    ARM: OMAP1: Remove omap_sram_idle()
    ARM: OMAP1: PM fixes for OMAP1
    ARM: OMAP1: Use MMC multislot structures for Siemens SX1 board
    ARM: OMAP1: Make omap1 use MMC multislot structures
    ARM: OMAP1: Change the comments to C style
    ARM: OMAP1: Make omap1 boards to use omap_nand_platform_data
    ARM: OMAP: Add helper module for board specific I2C bus registration
    ARM: OMAP: Add dmtimer support for OMAP3
    ARM: OMAP: Pre-3430 clean-up for dmtimer.c
    ARM: OMAP: Add DMA support for chaining and 3430
    ARM: OMAP: Add 24xx GPIO debounce support
    ARM: OMAP: Get rid of unnecessary ifdefs in GPIO code
    ...

    Linus Torvalds
     
  • We want to allow different implementations of pci_raw_ops for standard
    and extended config space on x86. Rather than clutter generic code with
    knowledge of this, we make pci_raw_ops private to x86 and use it to
    implement the new raw interface -- raw_pci_read() and raw_pci_write().

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • Thanks to Loic Prylli , who originally proposed
    this idea.

    Always using legacy configuration mechanism for the legacy config space
    and extended mechanism (mmconf) for the extended config space is
    a simple and very logical approach. It's supposed to resolve all
    known mmconf problems. It still allows per-device quirks (tweaking
    dev->cfg_size). It also allows to get rid of mmconf fallback code.

    Signed-off-by: Ivan Kokshaysky
    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    [PKT_SCHED] ematch: Fix build warning.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
    hrtimer: don't modify restart_block->fn in restart functions
    hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()
    hrtimer: fix *rmtp handling in hrtimer_nanosleep()
    ntp: correct inconsistent interval/tick_length usage

    Linus Torvalds