We intend this patch to improve spidernet interrupt handling to be
more strict. We had following problem and this patch solves it.
-when CONFIG_DEBUG_SHIRQ=y, request_irq() calls handler().
-when spider_net_open() is called, it calls request_irq() which calls
spider_net_interrupt().
-if some specific interrupt bit is set at this timing, it calls
netif_rx_schedule() and spider_net_poll() is scheduled.
-spider_net_open() calls netif_poll_enable() which clears the bit
__LINK_STATE_RX_SCHED.
-when spider_net_poll() is called, it calls netif_rx_complete() which
causes BUG_ON() because __LINK_STATE_RX_SCHED is not set.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The 3cSOHO100-TX needs a mdio_sync() before mdio_read() to read the MII
transceiver registers properly. Adding EXTRA_PREAMBLE to drv_flags of the
3cSOHO100-TX will force this.
This problem exists already for years (I checked back to 2.6.8).
Setting duplex for the 3cSOHO100-TX was more or less a random process.
Till 2.6.15 it was more likely that the diver ends up in half
duplex mode, after the code change in 2.6.16 it was more likely
to end up in full duplex mode. I wonder why nobody noticed this earier.
Hopefully addresses
Bug 7454 3c59x (3cSOHO100-TX Hurricane) slow network bug
http://bugzilla.kernel.org/show_bug.cgi?id=7454
and
Bug 3654 3cSOHO100-TX: No MII transceiver present
http://bugzilla.kernel.org/show_bug.cgi?id=3654
Cc: Jonas Sandberg <jonassa@gmail.com>
Cc: Jon Sanchez <bugs@niluje.net>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use roundup() macro to size receive buffer.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
If packet larger than MTU is received, the driver uses hardware to
truncate the packet. Use the status registers to catch/drop them.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Simplify receive buffer refill logic. Rather than trying to update
incrementally; do receive ring refill at end of receive processing.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch avoids generating another IRQ if more packets
arrive while in the NAPI poll routine. Before marking device as
finished, it rechecks that the status ring is empty.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add an optional debug interface for displaying state of transmit/receive
rings. Creates a file debugfs/sky2/ethX for each device that is up.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Make sky2 handle carrier similar to other drivers,
eliminate some possible races in carrier state transistions.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch restores a couple of workarounds from 2.6.16:
* restart transmit moderation timer in case it expires during IRQ routine
* default to having 10 HZ watchdog timer.
At this point it more important not to hang than to worry about the
power cost.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Adding the defines/macros activates the existing code in the tty layer and
allows this platform to use the arbitary speed ioctl setting layer
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Remove the deactivated code for checking for pread() and pwrite()
calls on the PPC-based BRIQ.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Check to make sure ppc_md.init_IRQ has been set before calling it.
Signed-off-by: Sonny Rao <sonny@burdell.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Found 2 instances of return one right after each other in
arch_add_memory(). This removes the superfluous one.
Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Disable auto-select of CONFIG_EMBEDDED. ELECTRA_IDE selects
PATA_PLATFORM which should be sufficient.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Rename the pasemi platform to "pasemi" to be in line with the
platform's directory name.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
With !CONFIG_NUMA, these are static inlines in the header file so
don't generate exports for them in that case.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
When booting a current kernel with CONFIG_PRINTK_TIME enabled you'll
see messages like:
[ 0.000000] time_init: decrementer frequency = 188.044000 MHz
[ 0.000000] time_init: processor frequency = 1504.352000 MHz
[3712914.436297] Console: colour dummy device 80x25
This cause by the initialisation of tb_to_ns_scale in time_init(), suddenly the
multiplication in sched_clock() now does something :). This patch modifies
sched_clock() to report the offset since the machine booted so the same
printk's now look like:
[ 0.000000] time_init: decrementer frequency = 188.044000 MHz
[ 0.000000] time_init: processor frequency = 1504.352000 MHz
[ 0.000135] Console: colour dummy device 80x25
Effectivly including the uptime in printk()s.
This patch makes tb_to_ns_scale and tb_to_ns_shift static and
read_mostly for good measure.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This simply prevents a build error if no platform is selected.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Add support to build the PS3 flash rom image and remove some unneeded
lmb calls.
The PS3's lv1 loader supports loading gzipped binary images from flash
rom to addr zero. The loader enters the image at addr 0x100.
In this implementation a bootwrapper overlay is use to arrange for the
kernel to be loaded to addr zero and to have a suitable bootwrapper
entry at 0x100. To construct the rom image, 0x100 bytes from offset
0x100 in the kernel is copied to the bootwrapper symbol
__system_reset_kernel. The 0x100 bytes at the bootwrapper symbol
__system_reset_overlay is then copied to offset 0x100. At runtime the
bootwrapper program copies the 0x100 bytes at __system_reset_kernel to
addr 0x100.
zImage.ps3 is a wrapped image that contains a flat device tree, an lv1
compatible entry point, and an optional initrd. otheros.bld is the gzip
compresed rom image built from zImage.ps3. otheros.bld is suitable for
programming into the PS3 boot flash memory.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Convert the semaphores in low_i2c that are used as mutexes to real
mutexes.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The arch/ppc tree has been in a semi-nebulous "bug fix only" state for a
few kernel releases now. The patch below officially declares this as of
the 2.6.22 kernel release and schedules arch/ppc for removal in June of
2008.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The 750 CPU_FTR macros have quite a bit of duplication in them. Consolidate
them to use CPU_FTRS_750 and only list the unique features for derivatives.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Oprofile enhanced instruction sampling support.
When performing instruction sampling, the mmcra[SLOT] field can be used to
more accurately identify the address of the sampled instruction.
Tested on power4, js20, power5 and power5+.
Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
cc: Maynard Johnson <maynardj@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The prom.c debugging code creates a "powerpc" directory in debugfs,
which is nice, but doesn't allow any other debugging code to stick things
under "powerpc" in debugfs. So make it global.
While we're there we should make the prom.c debugging code depend on
CONFIG_DEBUG_FS, because it doesn't work otherwise.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The device tree for the MPC8641 HPCN does not implement the device type
property for I8042 nodes.
In addition to checking the I8042 node's device type, also match the
keyboard and/or mouse nodes' compatible property.
Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
When the refcount for a device node goes to 0, we call the
destructor - of_node_release(). This should only happen if we've
already detached the node from the device tree.
So add a flag OF_DETACHED which tracks detached-ness, and if we
find ourselves in of_node_release() without it set, issue a
warning and don't free the device_node. To avoid warning
continuously reinitialise the kref to a sane value.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The struct device_node currently has a _flags variable, although
it's only used for one flag - OF_DYNAMIC. Generalise the flag
accessors so we can use them with other flags in future.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
It's not sensible to call of_detach_node() on the root node,
but we should check for it just to be safe.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
When adding the cputable entry for 440SPe Rev. B, we also need to
adjust the existing entries for 440SP Rev. A and 440SPe Rev. B so that
they look more bits of the PVR. The 440SPe Rev. B has PVR 53421891,
which would match the current 440SP Rev. A pattern of 53xxx891. To
distinguish between 440SP and 440SPe, we need to use the first three
digits of the PVR, which are respectively 532 and 534.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The powerpc arch uses CONFIG_PPC instead of CONFIG_POWERPC. This fixes
drivers/rtc/Kconfig to use the correct config option.
Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Currently, of_serial driver supports only 8250 compatible ports, but
prepares that others can easily be added. Yet unregister routine
assumes port is 8250. This corrects unregister routine to check
port type.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Current of_serial driver assumes unknown serial port to be 8250. But
this behavior may cause fatal problems when the serial port is not
8250. This corrects probe routine to ignore unknown serial port.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Replace the old-style member initializers with the newer designated
initializers.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
do_signal is never used in modular code (obviously), and no other
architecture exports it either.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>