11 Jan, 2006

4 commits

  • Allow the ColdFire FEC ethernet driver to be enabled on the M520x CPU
    family.

    Signed-off-by: Greg Ungerer
    Signed-off-by: Linus Torvalds

    Greg Ungerer
     
  • The API and code have been through various bits of initial review by
    serial driver people but they definitely need to live somewhere for a
    while so the unconverted drivers can get knocked into shape, existing
    drivers that have been updated can be better tuned and bugs whacked out.

    This replaces the tty flip buffers with kmalloc objects in rings. In the
    normal situation for an IRQ driven serial port at typical speeds the
    behaviour is pretty much the same, two buffers end up allocated and the
    kernel cycles between them as before.

    When there are delays or at high speed we now behave far better as the
    buffer pool can grow a bit rather than lose characters. This also means
    that we can operate at higher speeds reliably.

    For drivers that receive characters in blocks (DMA based, USB and
    especially virtualisation) the layer allows a lot of driver specific
    code that works around the tty layer with private secondary queues to be
    removed. The IBM folks need this sort of layer, the smart serial port
    people do, the virtualisers do (because a virtualised tty typically
    operates at infinite speed rather than emulating 9600 baud).

    Finally many drivers had invalid and unsafe attempts to avoid buffer
    overflows by directly invoking tty methods extracted out of the innards
    of work queue structs. These are no longer needed and all go away. That
    fixes various random hangs with serial ports on overflow.

    The other change in here is to optimise the receive_room path that is
    used by some callers. It turns out that only one ldisc uses receive room
    except asa constant and it updates it far far less than the value is
    read. We thus make it a variable not a function call.

    I expect the code to contain bugs due to the size alone but I'll be
    watching and squashing them and feeding out new patches as it goes.

    Because the buffers now dynamically expand you should only run out of
    buffering when the kernel runs out of memory for real. That means a lot of
    the horrible hacks high performance drivers used to do just aren't needed any
    more.

    Description:

    tty_insert_flip_char is an old API and continues to work as before, as does
    tty_flip_buffer_push() [this is why many drivers dont need modification]. It
    does now also return the number of chars inserted

    There are also

    tty_buffer_request_room(tty, len)

    which asks for a buffer block of the length requested and returns the space
    found. This improves efficiency with hardware that knows how much to
    transfer.

    and tty_insert_flip_string_flags(tty, str, flags, len)

    to insert a string of characters and flags

    For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

    More description!

    At the moment tty buffers are attached directly to the tty. This is causing a
    lot of the problems related to tty layer locking, also problems at high speed
    and also with bursty data (such as occurs in virtualised environments)

    I'm working on ripping out the flip buffers and replacing them with a pool of
    dynamically allocated buffers. This allows both for old style "byte I/O"
    devices and also helps virtualisation and smart devices where large blocks of
    data suddenely materialise and need storing.

    So far so good. Lots of drivers reference tty->flip.*. Several of them also
    call directly and unsafely into function pointers it provides. This will all
    break. Most drivers can use tty_insert_flip_char which can be kept as an API
    but others need more.

    At the moment I've added the following interfaces, if people think more will
    be needed now is a good time to say

    int tty_buffer_request_room(tty, size)

    Try and ensure at least size bytes are available, returns actual room (may be
    zero). At the moment it just uses the flipbuf space but that will change.
    Repeated calls without characters being added are not cumulative. (ie if you
    call it with 1, 1, 1, and then 4 you'll have four characters of space. The
    other functions will also try and grow buffers in future but this will be a
    more efficient way when you know block sizes.

    int tty_insert_flip_char(tty, ch, flag)

    As before insert a character if there is room. Now returns 1 for success, 0
    for failure.

    int tty_insert_flip_string(tty, str, len)

    Insert a block of non error characters. Returns the number inserted.

    int tty_prepare_flip_string(tty, strptr, len)

    Adjust the buffer to allow len characters to be added. Returns a buffer
    pointer in strptr and the length available. This allows for hardware that
    needs to use functions like insl or mencpy_fromio.

    Signed-off-by: Alan Cox
    Cc: Paul Fulghum
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Serge Hallyn
    Signed-off-by: Jeff Dike
    Signed-off-by: John Hawkes
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • ICC likes to complain about storage class not being first, GCC doesn't
    care much (except for cases like "inline static").
    have a hard time seeing how it could break anything.

    Thanks to Gabriel A. Devenyi for pointing out
    http://linuxicc.sourceforge.net/ which is what made me create this patch.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • This patch contains the following cleanups:
    - make a needlessly global function static
    - remove the unneeded global function irport_probe

    Signed-off-by: Adrian Bunk
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

10 Jan, 2006

10 commits


09 Jan, 2006

26 commits

  • These warnings are emitted if non-modular network drivers are built.
    Fixes just move cleanup_card() definitions into #ifdef MODULE region.

    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/wd.c:131: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/3c503.c:152: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/ne.c:216: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/hp.c:106: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/hp-plus.c:142: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/smc-ultra.c:172: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/e2100.c:144: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/es3210.c:159: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/lne390.c:149: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/lance.c:313: warning: 'cleanup_card' defined but not used
    /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/ac3200.c:127: warning: 'cleanup_card' defined but not used

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

    Denis Vlasenko
     
  • This contains a bug fix for large buffers. Originally, if a tx buffer to
    be sent was larger then the maximum size of the tx descriptor, it would
    overwrite other control bits. In this patch, the buffer is split over
    multiple descriptors. Also, the fragments are now setup in forward order.

    Signed-off-by: Ayaz Abdulla
    Signed-off-by: Manfred Spraul
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Ayaz Abdulla
     
  • Remove bouncing mail address of mv643xx maintainer.

    Signed-off-by: Olaf Hering
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Olaf Hering
     
  • Fix an invalid memory reference in the e1000 driver which would cause
    kernel panic.

    Signed-off-by: Kenji Kaneshige
    Cc: Jeb Cramer
    Cc: John Ronciak
    Cc: Ganesh Venkatesan
    Cc: Jeff Garzik
    Acked-by: Jeff Kirsher
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Kenji Kaneshige
     
  • "extern inline" doesn't make much sense.

    Signed-off-by: Adrian Bunk
    Cc: "David S. Miller"
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Adrian Bunk
     
  • "extern inline" doesn't make much sense.

    Signed-off-by: Adrian Bunk
    Cc: "David S. Miller"
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Adrian Bunk
     
  • This patch fixes a wrong indentation.

    Signed-off-by: Adrian Bunk
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Adrian Bunk
     
  • Add MIPS dependency for dm9000 ethernet controller. Indeed this controller
    is used by some embedded platforms based on MIPS CPUs.

    Signed-off-by: Franck Bui-Huu
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Franck
     
  • A BIOS bug affecting some multiport tulip NICs requires an irq fixup
    in tulip_core.c. This has only been enabled for i686, but it is
    needed for x86_64 as well.

    Signed-off-by: John W. Linville
    Signed-off-by: Jeff Garzik

    Christoph Dworzak
     
  • Disable TX status deferral (EMACx_MR[MWSW=001]) in half-duplex mode.
    I have two reports when EMAC stops transmitting when connected to a
    hub. TX ring debug printouts show complete mess when this happens,
    probably hardware collision handling doesn't work quite well in this
    mode.

    This is relevant only for SoCs with EMAC4 core (440GX, 440SP, 440SPe).
    Tested on 440GX.

    Signed-off-by: Eugene Surovegin
    Signed-off-by: Jeff Garzik

    Eugene Surovegin
     
  • Don't enable the pci device twice (already done in the probe
    routine). Propogate the error codes from pci_request_region
    back to initial probing.

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

    Stephen Hemminger
     
  • The sk98lin driver doesn't do proper error number handling
    during initialization. Note: -EAGAIN is a bogus return value for
    hardware errors.

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

    Stephen Hemminger
     
  • Trivial use of kzalloc.

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

    Stephen Hemminger
     
  • Sk98lin driver error recovery on two port boards is bad.
    If it fails the second allocation, it will not release resources
    properly. Also it registers the second port in the pci driver data

    If second port fails, might as well go with one port.

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

    Stephen Hemminger
     
  • Sk98lin 64bit memory handling is wrong. It doesn't set the
    highdma flag; i.e. the kernel always does bounce buffers.
    It doesn't fallback to 32 bit mask if it can't get 64 bit mask.

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

    Stephen Hemminger
     
  • Sk98lin driver has a routine marked __init that is called from
    the probe code. If using pci hotplug, this could be called after
    the initialization so it needs to be marked __devinit.
    So if you hot added a sk98lin board, the kernel would crash.
    I don't have hot plug hardware to actually try this feat.

    Also, there are two routines, only called from SkGeBoardInit that can
    be marked __devinit.

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

    Stephen Hemminger
     
  • Signed-off-by: Russell King

    Russell King
     
  • Many ARM drivers do not need to include asm/irq.h - remove this
    unnecessary include from some ARM drivers.

    Signed-off-by: Russell King

    Russell King
     
  • Since version 4.1 the gcc is warning about ignored attributes. This patch is
    using the equivalent attribute on the struct instead of on each of the
    structure or union members.

    GCC Manual:
    "Specifying Attributes of Types

    packed
    This attribute, attached to struct or union type definition, specifies
    that
    each member of the structure or union is placed to minimize the memory
    required. When attached to an enum definition, it indicates that the
    smallest integral type should be used.

    Specifying this attribute for struct and union types is equivalent to
    specifying the packed attribute on each of the structure or union
    members."

    Signed-off-by: Jan Blunck
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • Some ARM platforms have the ability to program the interrupt controller to
    detect various interrupt edges and/or levels. For some platforms, this is
    critical to setup correctly, particularly those which the setting is dependent
    on the device.

    Currently, ARM drivers do (eg) the following:

    err = request_irq(irq, ...);

    set_irq_type(irq, IRQT_RISING);

    However, if the interrupt has previously been programmed to be level sensitive
    (for whatever reason) then this will cause an interrupt storm.

    Hence, if we combine set_irq_type() with request_irq(), we can then safely set
    the type prior to unmasking the interrupt. The unfortunate problem is that in
    order to support this, these flags need to be visible outside of the ARM
    architecture - drivers such as smc91x need these flags and they're
    cross-architecture.

    Finally, the SA_TRIGGER_* flag passed to request_irq() should reflect the
    property that the device would like. The IRQ controller code should do its
    best to select the most appropriate supported mode.

    Signed-off-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russell King
     
  • The Kconfig symbol for pnx0105 was recently renamed to ARCH_PNX010X.

    Signed-off-by: Lennert Buytenhek
    Cc: dmitry pervushin
    Cc:
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     
  • PNX010X support for CS89x0 should be conditional on NET_PCI, as it is an 'on
    board controller' and NET_PCI includes that category of NICs. Since
    ARCH_PNX0105 was recently changed to ARCH_PNX010X, incorporate that change as
    well while we're at it.

    Signed-off-by: Lennert Buytenhek
    Cc: dmitry pervushin
    Cc:
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     
  • Implement readwords/writewords that use readword/writeword, and switch the
    rest of the driver over to use these.

    Signed-off-by: Lennert Buytenhek
    Cc: dmitry pervushin
    Cc:
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     
  • Implement suitable versions of the readword/writeword macros for ixdp2x01 and
    pnx0501. Handle the 32-bit spacing of the registers in these functions
    instead of in the header file.

    Signed-off-by: Lennert Buytenhek
    Cc: dmitry pervushin
    Cc:
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     
  • Make readreg/writereg use readword/writeword.

    Signed-off-by: Lennert Buytenhek
    Cc: dmitry pervushin
    Cc:
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     
  • Reverse the order of readreg/writereg and readword/writeword in the
    file, so that we can make readreg/writereg use readword/writeword.

    Signed-off-by: Lennert Buytenhek
    Cc: dmitry pervushin
    Cc:
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek