aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2005-08-31[PATCH] iseries_veth: Add sysfs support for connection structsMichael Ellerman
To aid in field debugging, add sysfs support for iseries_veth's connection structures. At the moment this is all read-only, however we could think about adding write support for some attributes in future. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Fix bogus counting of TX errorsMichael Ellerman
There's a number of problems with the way iseries_veth counts TX errors. Firstly it counts conditions which aren't really errors as TX errors. This includes if we don't have a connection struct for the other LPAR, or if the other LPAR is currently down (or just doesn't want to talk to us). Neither of these should count as TX errors. Secondly, it counts one TX error for each LPAR that fails to accept the packet. This can lead to TX error counts higher than the total number of packets sent through the interface. This is confusing for users. This patch fixes that behaviour. The non-error conditions are no longer counted, and we introduce a new and I think saner meaning to the TX counts. If a packet is successfully transmitted to any LPAR then it is transmitted and tx_packets is incremented by 1. If there is an error transmitting a packet to any LPAR then that is counted as one error, ie. tx_errors is incremented by 1. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Simplify full-queue handlingMichael Ellerman
The iseries_veth driver often has multiple netdevices sending packets over a single connection to another LPAR. If the bandwidth to the other LPAR is exceeded, all the netdevices must have their queues stopped. The current code achieves this by queueing one incoming skb on the per-netdevice port structure. When the connection is able to send more packets we iterate through the port structs and flush any packet that is queued, as well as restarting the associated netdevice's queue. This arrangement makes less sense now that we have per-connection TX timers, rather than the per-netdevice generic TX timer. The new code simply detects when one of the connections is full, and stops the queue of all associated netdevices. Then when a packet is acked on that connection (ie. there is space again) all the queues are woken up. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Add a per-connection ack timerMichael Ellerman
Currently the iseries_veth driver contravenes the specification in Documentation/networking/driver.txt, in that if packets are not acked by the other LPAR they will sit around forever. This patch adds a per-connection timer which fires if we've had no acks for five seconds. This is superior to the generic TX timer because it catches the case of a small number of packets being sent and never acked. This fixes a bug we were seeing on real systems, where some IPv6 neighbour discovery packets would not be acked and then prevent the module from being removed, due to skbs lying around. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Remove TX timeout codeMichael Ellerman
The iseries_veth driver uses the generic TX timeout watchdog, however a better solution is in the works, so remove this code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Use kobjects to track lifecycle of connection structsMichael Ellerman
The iseries_veth driver can attach to multiple vlans, which correspond to multiple net devices. However there is only 1 connection between each LPAR, so the connection structure may be shared by multiple net devices. This makes module removal messy, because we can't deallocate the connections until we know there are no net devices still using them. The solution is to use ref counts on the connections, so we can delete them (actually stop) as soon as the ref count hits zero. This patch fixes (part of) a bug we were seeing with IPv6 sending probes to a dead LPAR, which would then hang us forever due to leftover skbs. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Make init_connection() & destroy_connection() symmetricalMichael Ellerman
This patch makes veth_init_connection() and veth_destroy_connection() symmetrical in that they allocate/deallocate the same data. Currently if there's an error while initialising connections (ie. ENOMEM) we call veth_module_cleanup(), however this will oops because we call driver_unregister() before we've called driver_register(). I've never seen this actually happen though. So instead we explicitly call veth_destroy_connection() for each connection, any that have been set up will be deallocated. We also fix a potential leak if vio_register_driver() fails. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Only call dma_unmap_single() if dma_map_single() succeededMichael Ellerman
The iseries_veth driver unconditionally calls dma_unmap_single() even when the corresponding dma_map_single() may have failed. Rework the code a bit to keep the return value from dma_unmap_single() around, and then check if it's a dma_mapping_error() before we do the dma_unmap_single(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Replace lock-protected atomic with an ordinary variableMichael Ellerman
The iseries_veth driver uses atomic ops to manipulate the in_use field of one of its per-connection structures. However all references to the flag occur while the connection's lock is held, so the atomic ops aren't necessary. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Remove redundant message stack lockMichael Ellerman
The iseries_veth driver keeps a stack of messages for each connection and a lock to protect the stack. However there is also a per-connection lock which makes the message stack lock redundant. Remove the message stack lock and document the fact that callers of the stack-manipulation functions must hold the connection's lock. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Fix broken promiscuous handlingMichael Ellerman
Due to a logic bug, once promiscuous mode is enabled in the iseries_veth driver it is never disabled. The driver keeps two flags, promiscuous and all_mcast which have exactly the same effect. This is because we only ever receive packets destined for us, or multicast packets. So consolidate them into one promiscuous flag for simplicity. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Try to avoid pathological reset behaviourMichael Ellerman
The iseries_veth driver contains a state machine which is used to manage how connections are setup and neogotiated between LPARs. If one side of a connection resets for some reason, the two LPARs can get stuck in a race to re-setup the connection. This can lead to the connection being declared dead by one or both ends. In practice the connection is declared dead by one or both ends approximately 8/10 times a connection is reset, although it is rare for connections to be reset. (an example here: http://michael.ellerman.id.au/files/misc/veth-trace.html) The core of the problem is that the end that resets the connection doesn't wait for the other end to become aware of the reset. So the resetting end starts setting the connection back up, and then receives a reset from the other end (which is the response to the initial reset). And so on. We're severely limited in what we can do to fix this. The protocol between LPARs is essentially fixed, as we have to interoperate with both OS/400 and old Linux drivers. Which also means we need a fix that only changes the code on one end. The only fix I've found given that, is to just blindly sleep for a bit when resetting the connection, in the hope that the other end will get itself sorted. Needless to say I'd love it if someone has a better idea. This does work, I've so far been unable to get it to break, whereas without the fix a reset of one end will lead to a dead connection ~8/10 times. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Remove a FIXME WRT deletion of the ack_timerMichael Ellerman
The iseries_veth driver has a timer which we use to send acks. When the connection is reset or stopped we need to delete the timer. Currently we only call del_timer() when resetting a connection, which means the timer might run again while the connection is being re-setup. As it turns out that's ok, because the flags the timer consults have been reset. It's cleaner though to call del_timer_sync() once we've dropped the lock, although the timer may still run between us dropping the lock and calling del_timer_sync(), but as above that's ok. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31[PATCH] iseries_veth: Cleanup error and debug messagesMichael Ellerman
Currently the iseries_veth driver prints the file name and line number in its error messages. This isn't very useful for most users, so just print "iseries_veth: message" instead. - convert uses of veth_printk() to veth_debug()/veth_error()/veth_info() - make terminology consistent, ie. always refer to LPAR not lpar - be consistent about printing return codes as %d not %x - make format strings fit in 80 columns Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31Auto-update from upstreamTony Luck
2005-08-31[SERIAL] Convert mwave to use serial8250_(un)?register_portAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31[ARM] 2866/1: add i.MX set_mctrl / get_mctrl functionsSascha Hauer
Patch from Sascha Hauer This patch adds support for setting and getting RTS / CTS via set_mtctrl / get_mctrl functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31[netdrvr de2104x] store PCI bus addresses in unsigned longJeff Garzik
BZ# 4475.
2005-08-31[netdrvr tulip] new PCI IDJeff Garzik
Noted in BZ# 2960.
2005-08-31[SERIAL] Clean up and fix tty transmission start/stopingRussell King
The start_tx and stop_tx methods were passed a flag to indicate whether the start/stop was from the tty start/stop callbacks, and some drivers used this flag to decide whether to ask the UART to immediately stop transmission (where the UART supports such a feature.) There are other cases when we wish this to occur - when CTS is lowered, or if we change from soft to hard flow control and CTS is inactive. In these cases, this flag was false, and we would allow the transmitter to drain before stopping. There is really only one case where we want to let the transmitter drain before disabling, and that's when we run out of characters to send. Hence, re-jig the start_tx and stop_tx methods to eliminate this flag, and introduce new functions for the special "disable and allow transmitter to drain" case. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-30[SPARC64]: Use drivers/KconfigDavid S. Miller
And move some other stuff into drivers/sbus/char/Kconfig. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-30[libata] fix ATAPI-enable typoJeff Garzik
Dumb typo spotted by Mark Lord.
2005-08-30Merge refs/heads/upstream from ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
2005-08-30[PATCH] x86: pci_assign_unassigned_resources() updateIvan Kokshaysky
I had some time to think about PCI assign issues in 2.6.13-rc series. The major problem here is that we call pci_assign_unassigned_resources() way too early - at subsys_initcall level. Therefore we give no chances to ACPI and PnP routines (called at fs_initcall level) to reserve their respective resources properly, as the comments in drivers/pnp/system.c and drivers/acpi/motherboard.c suggest: /** * Reserve motherboard resources after PCI claim BARs, * but before PCI assign resources for uninitialized PCI devices */ So I moved the pci_assign_unassigned_resources() call to pcibios_assign_resources() (fs_initcall), which should hopefully fix a lot of problems and make PCIBIOS_MIN_IO tweaks unnecessary. Other changes: - remove resource assignment code from pcibios_assign_resources(), since it duplicates pci_assign_unassigned_resources() functionality and actually does nothing in 2.6.13; - modify ROM assignment code as per Ben's suggestion: try to use firmware settings by default (if PCI_ASSIGN_ROMS is not set); - set CARDBUS_IO_SIZE back to 4K as it's a wonderful stress test for various setups. Confirmed by Tero Roponen <teanropo@cc.jyu.fi> (who had problems with the 4kB CardBus IO size previously). Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-30Merge HEAD from /spare/repo/linux-2.6/.git Jeff Garzik
2005-08-30Auto-update from upstreamTony Luck
2005-08-30Merge refs/heads/drm-latest from ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
2005-08-30[libata] update several drivers to use pci_iomap()/pci_iounmap()Jeff Garzik
2005-08-30[libata] __iomem annotations for various driversJeff Garzik
2005-08-30[libata ahci] minor remove/unplug path cleanupJeff Garzik
Don't bother calling a hook, to call our own module, to call a helper than simply calls ionumap(). If you unroll all that convolution, you get a simple kfree()+iounmap() pair of calls.
2005-08-30[libata] allow ATAPI to be enabled with new atapi_enabled module optionJeff Garzik
ATAPI is getting close to being ready. To increase exposure, we enable the code in the upstream kernel, but default it to off (present behavior). Users must pass atapi_enabled=1 as a module option (if module) or on the kernel command line (if built in) to turn on discovery of their ATAPI devices.
2005-08-29Merge refs/heads/upstream-fixes from ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2005-08-29Merge refs/heads/upstream from ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
2005-08-29Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 Linus Torvalds
2005-08-30[PATCH] s2io build fixAndrew Morton
Damir Perisa <damir.perisa@solnet.ch> reports: drivers/net/s2io.h:765: error: invalid lvalue in assignment drivers/net/s2io.h:766: error: invalid lvalue in assignment That's a gcc4 error. I don't see why the casts are there anyway.. Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-30[PATCH] Make MODULE_DEVICE_TABLE work for vio devicesStephen Rothwell
Make MODULE_DEVICE_TABLE work for vio devices. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-08-30[PATCH] Create vio_bus_opsStephen Rothwell
Create vio_bus_ops so that we just pass a structure to vio_bus_init instead of three separate function pointers. Rearrange vio.h to avoid forward references. vio.h only needs struct device_node from prom.h so remove the include and just declare it. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-08-29[BNX2]: update version and minor fixesMichael Chan
Update version and add 4 minor fixes, the last 2 were suggested by Jeff Garzik: 1. check for a valid ethernet address before setting it 2. zero out bp->regview if init_one encounters an error and unmaps the IO address. This prevents remove_one from unmapping again. 3. use netif_rx_schedule() instead of hand coding the same. 4. use IRQ_HANDLED and IRQ_NONE. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[BNX2]: change irq locks to bh locksMichael Chan
Change all locks from spin_lock_irqsave() to spin_lock_bh(). All places that require spinlocks are in BH context. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[BNX2]: remove atomics in txMichael Chan
Remove atomic operations in the fast tx path. Expensive atomic operations were used to keep track of the number of available tx descriptors. The new code uses the difference between the consumer and producer index to determine the number of free tx descriptors. As suggested by Jeff Garzik, the name of the inline function is changed to all lower case. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[BNX2]: speedup serdes linkupMichael Chan
This speeds up link-up time on 5706 SerDes if the link partner does not autoneg, a rather common scenario in blade servers. Some blade servers use IPMI for keyboard input and it's important to minimize link disruptions. The speedup is achieved by shortening the timer to (HZ / 3) during the transient period right after initiating a SerDes autoneg. If autoneg does not complete, parallel detect can be done sooner. After the transient period is over, the timer goes back to its normal HZ interval. As suggested by Jeff Garzik, the timer initialization is moved to bnx2_init_board() from bnx2_open(). An eeprom bit is also added to allow default forced SerDes speed for even faster link-up time. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[BNX2]: Fix rtnl deadlock in bnx2_closeMichael Chan
This fixes an rtnl deadlock problem when flush_scheduled_work() is called from bnx2_close(). In rare cases, linkwatch_event() may be on the workqueue from a previous close of a different device and it will try to get the rtnl lock which is already held by dev_close(). The fix is to set a flag if we are in the reset task which is run from the workqueue. bnx2_close() will loop until the flag is cleared. As suggested by Jeff Garzik, the loop is changed to call msleep(1) instead of yield() in the original patch. flush_scheduled_work() is also moved to bnx2_remove_one() before the netdev is freed. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29Merge /spare/repo/linux-2.6/Jeff Garzik
2005-08-29[NETLINK]: Add "groups" argument to netlink_kernel_createPatrick McHardy
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[NETLINK]: Convert netlink users to use group numbers instead of bitmasksPatrick McHardy
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[NETLINK]: w1_int.c: fix default netlink groupEvgeniy Polyakov
w1 does not need to multicast its state to several groups at once, and upcoming netlink changes will not allow bitmask for groups anyway. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[NET]: Store skb->timestamp as offset to a base timestampPatrick McHardy
Reduces skb size by 8 bytes on 64-bit. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[BNX2]: Possible sparse fixes, take twoPeter Hagervall
This patch contains the following possible cleanups/fixes: - use C99 struct initializers - make a few arrays and structs static - remove a few uses of literal 0 as NULL pointer - use convenience function instead of cast+dereference in bnx2_ioctl() - remove superfluous casts to u8 * in calls to readl/writel Signed-off-by: Peter Hagervall <hager@cs.umu.se> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[Bluetooth]: Move packet type into the SKB control bufferMarcel Holtmann
This patch moves the usage of packet type into the SKB control buffer. After this patch it is now possible to shrink the sk_buff structure and redefine its pkt_type. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[Bluetooth]: Fix sparse warnings (__nocast type)Victor Fusco
This patch fixes the sparse warnings "implicit cast to nocast type" for the priority or gfp_mask parameters of the memory allocations. Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>