11 Oct, 2007

5 commits

  • These have been superceded by the new ->get_sset_count() hook.

    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Jeff Garzik
     
  • Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • This is nicer than the MAC_FMT stuff.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • It's been a useless no-op for long enough in 2.6 so I figured it's time to
    remove it. The number of people that could object because they're
    maintaining unified 2.4 and 2.6 drivers is probably rather small.

    [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]

    Signed-off-by: Ralf Baechle
    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Ralf Baechle
     
  • Several devices have multiple independant RX queues per net
    device, and some have a single interrupt doorbell for several
    queues.

    In either case, it's easier to support layouts like that if the
    structure representing the poll is independant from the net
    device itself.

    The signature of the ->poll() call back goes from:

    int foo_poll(struct net_device *dev, int *budget)

    to

    int foo_poll(struct napi_struct *napi, int budget)

    The caller is returned the number of RX packets processed (or
    the number of "NAPI credits" consumed if you want to get
    abstract). The callee no longer messes around bumping
    dev->quota, *budget, etc. because that is all handled in the
    caller upon return.

    The napi_struct is to be embedded in the device driver private data
    structures.

    Furthermore, it is the driver's responsibility to disable all NAPI
    instances in it's ->stop() device close handler. Since the
    napi_struct is privatized into the driver's private data structures,
    only the driver knows how to get at all of the napi_struct instances
    it may have per-device.

    With lots of help and suggestions from Rusty Russell, Roland Dreier,
    Michael Chan, Jeff Garzik, and Jamal Hadi Salim.

    Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
    Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.

    [ Ported to current tree and all drivers converted. Integrated
    Stephen's follow-on kerneldoc additions, and restored poll_list
    handling to the old style to fix mutual exclusion issues. -DaveM ]

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

01 Aug, 2007

1 commit


20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

09 Jul, 2007

4 commits


26 Apr, 2007

2 commits


04 Apr, 2007

1 commit

  • If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than
    B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast
    messages. This is because the __b44_set_mac_addr call sets the zeroth CAM
    entry to the MAC address of the device, and then the loop at line 1722
    proceeds to overwrite it unless the value of i is set by the __b44_load_mcast
    call. However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set
    to zero.

    Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC
    address.

    Signed-off-by: Bill Helfinstine
    Signed-off-by: Jeff Garzik

    Bill Helfinstine
     

18 Feb, 2007

2 commits

  • The b44 Enet control disable bit may take longer to clear on some
    systems, so the loop count is increased with this patch. Functionality
    is not compromised, but a debug message can be seen when the bit is not
    cleared within the count value.
    Thanks to Vasileios Lourdas who reported the problem.

    Signed-off by: Gary Zambrano

    Signed-off-by: Jeff Garzik

    Gary Zambrano
     
  • Replaced B44_DMA_MASK with DMA_30BIT_MASK.

    Signed-off by: Gary Zambrano

    Signed-off-by: Jeff Garzik

    Gary Zambrano
     

07 Feb, 2007

1 commit


30 Jan, 2007

3 commits

  • Some issues in b44_resume().

    - Return value of pci_enable_device() was ignored.

    - If request_irq() has failed we have to just disable device and exit.

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

    Dmitriy Monakhov
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • This fixes the issue of frequent link changes under heavy traffic reported
    below:

    http://bugzilla.kernel.org/show_bug.cgi?id=7696
    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216338

    The b44 chip occasionally needs to be reset when ISTAT_ERRORS are
    encountered. The reset sequence includes a PHY reset that will take many
    seconds to complete and cause the link to go down and up. By skipping the
    PHY reset, it will greatly reduce the interruption when ISTAT_ERRORS are
    encountered.

    Change the full_reset parameter to reset_kind parameter in b44_init_hw().
    This will allow PHY reset to be skipped when ISTAT_ERRORS are encountered.

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

    Michael Chan
     

27 Dec, 2006

1 commit


07 Nov, 2006

1 commit

  • Through some experimentation with the similarly built bcm43xx I came to
    the conclusion that if the hw/firmware sets a bit in the interrupt
    register, an interrupt will only be raised if that bit is included in
    the interrupt mask. Hence, the interrupt mask is more like an interrupt
    control mask.

    This patch changes the comment to reflect that.

    Signed-off-by: Johannes Berg
    Signed-off-by: Jeff Garzik

    Johannes Berg
     

11 Oct, 2006

2 commits

  • This fixes eeprom read on big-endian architectures.

    readw returns the data in CPU order. With cpu_to_le16 we convert it to little
    endian, because "ptr" is a pointer to a _byte_ arrray. See the cast above. A
    byte array is little endian.

    The bug is:

    Reading u16 values with readw, casting them into an u8 array and accessing
    this u8 array as an u8 (byte) array. The correct fix is to swap the
    CPU-ordering value returned by readw into little endian, as the u8 array is
    little endian.

    This compiles to nothing on little endian hardware (so it does not change b44
    code on LE hardware), but _fixes_ code on BE hardware.

    Signed-off-by: Michael Buesch
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Michael Buesch
     
  • Jeff Garzik
     

05 Oct, 2006

2 commits

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     
  • If there are more than B44_MCAST_TABLE_SIZE groups in the dev->mc_list,
    it will only listen to the first B44_MCAST_TABLE_SIZE that it sees.

    This change makes the driver go into RXCONFIG_ALLMULTI mode if there
    are more than B44_MCAST_TABLE_SIZE groups being subscribed to, similar
    to other network drivers.

    Noticed by Bill Helfinstine

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

14 Sep, 2006

1 commit


20 Aug, 2006

1 commit


06 Jul, 2006

2 commits


03 Jul, 2006

1 commit


23 Jun, 2006

5 commits


16 May, 2006

1 commit


13 Apr, 2006

3 commits