Commit Graph

53 Commits

Author SHA1 Message Date
David S. Miller 7c3ceb4a40 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/iwlwifi/iwl-3945.c
	net/mac80211/mlme.c
2008-07-08 16:30:17 -07:00
Michael Buesch 9e095a687b ssb-pcicore: Fix IRQ-vector init on embedded devices
On embedded devices we must not route the interrupts through
the PCI core, if our host-bus is not PCI.

Reported-by: Steve Brown <sbrown@cortland.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-07 15:31:40 -04:00
Michael Buesch f225763a7d ssb, b43, b43legacy, b44: Rewrite SSB DMA API
This is a rewrite of the DMA API for SSB devices.
This is needed, because the old (non-existing) "API" made too many bad
assumptions on the API of the host-bus (PCI).
This introduces an almost complete SSB-DMA-API that maps to the lowlevel
bus-API based on the bustype.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:15 -04:00
David S. Miller caea902f72 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/rt2x00/Kconfig
	drivers/net/wireless/rt2x00/rt2x00usb.c
	net/sctp/protocol.c
2008-06-16 18:25:48 -07:00
Michael Buesch e6340361f9 ssb: Fix coherent DMA mask for PCI devices
This fixes setting the coherent DMA mask for PCI devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-13 16:14:52 -04:00
David S. Miller 65b53e4cc9 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/tg3.c
	drivers/net/wireless/rt2x00/rt2x00dev.c
	net/mac80211/ieee80211_i.h
2008-06-10 02:22:26 -07:00
Michael Buesch a3bafeedff ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable
This fixes a context assertion in ssb that makes b44 print
out warnings on resume.

This fixes the following kernel oops:
http://www.kerneloops.org/oops.php?number=12732
http://www.kerneloops.org/oops.php?number=11410

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-04 15:57:10 -04:00
Larry.Finger@lwfinger.net 2afc49015d ssb: Allow reading of 440-byte SPROM that is not rev 4
The current code checks for the special signature that signifies
a revision 4 SPROM. Now that a rev. 8 SPROM with a 440-byte length
has been found that may not have any special code, this check could
be relaxed. With this patch, if the CRC is incorrect for a 256-byte
SPROM, the code will immediately check for a 440-byte SPROM. If there
is still a CRC error, the size is set to 440 bytes, which allows dumping
of most of any 512-byte SPROM if one is encountered.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:12 -04:00
Larry Finger 4503183aa3 ssb: Fix all-ones boardflags
In the SSB SPROM a field set to all ones means the value
is not defined in the SPROM.
In case of the boardflags, we need to set them to zero
to avoid confusing drivers. Drivers will only check the
flags by ANDing.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Gabor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:35 -04:00
David S. Miller 1e42198609 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
Michael Buesch 51e8b88590 ssb-pcicore: Remove b44 TPS flag workaround
Now that we fixed the TPS flag assignment in commit
b63009b456
we don't need the workaround for the bcm44xx chip anymore.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 14:53:22 -04:00
Michael Buesch 4ac58469f1 ssb: Fix usage of struct device used for DMAing
This fixes DMA on architectures where DMA is nontrivial, like PPC64.
We must use the host-device's (PCI) struct device for any DMA
operation instead of the SSB device. For this we add a new
struct device pointer to the SSB device structure that will always
point to the right device for DMAing.

Without this patch b43 and b44 drivers won't work on complex-DMA
architectures, that for example need dev->archdata for DMA operations.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-15 15:04:35 -04:00
David S. Miller df39e8ba56 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/ehea/ehea_main.c
	drivers/net/wireless/iwlwifi/Kconfig
	drivers/net/wireless/rt2x00/rt61pci.c
	net/ipv4/inet_timewait_sock.c
	net/ipv6/raw.c
	net/mac80211/ieee80211_sta.c
2008-04-14 02:30:23 -07:00
Michael Buesch 2633da237b ssb-mipscore: Fix interrupt vectors
This fixes assignment of the interrupt vectors on the SSB MIPS core.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-09 10:33:49 -04:00
Larry Finger b63009b456 ssb-pcicore: Fix IRQ TPS flag handling
This fixes the TPS flag handling for the SSB pcicore driver.
This fixes interrupts on some devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-09 10:33:49 -04:00
Michael Buesch d625a29ba6 ssb: Add support for block-I/O
This adds support for block based I/O to SSB.
This is needed in order to efficiently support PIO data
transfers to the card.
The block-I/O support is only compiled, if it's selected by the
weird driver that needs it. So there's no overhead for sane devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Michael Buesch d72bb40fe3 ssb: Fix build for non-PCIhost
This fixes a build error when PCMCIA-host support is built,
but PCI-host support is disabled.
Hell, who on earth would use such a weird configuration. :D

drivers/built-in.o: In function `ssb_attr_sprom_store':
(.text+0x1c4b79): undefined reference to `ssb_devices_freeze'
drivers/built-in.o: In function `ssb_attr_sprom_store':
(.text+0x1c4bb3): undefined reference to `ssb_devices_thaw'
make[1]: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Michael Buesch 8fe2b65a18 ssb: Turn suspend/resume upside down
Turn the SSB bus suspend mechanism upside down.
Instead of deciding by an internal reference count when to suspend/resume,
let the parent bus call us in their suspend/resume routine.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:57 -04:00
Michael Buesch 9788ba7500 ssb-pcmcia: IRQ and DMA related fixes
Here come some IRQ and DMA related fixes for the ssb PCMCIA-host code.
Not much to say, actually. I think the patch explains itself.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
Stefano Brivio 881400a20c b43legacy: fix bcm4303 crash
This fixes an hard crash which happened upon driver loading on bcm4303 rev.
2 devices.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-07 22:19:29 -04:00
Michael Buesch e7ec2e3230 ssb: Add SPROM/invariants support for PCMCIA devices
This adds support for reading/writing the SPROM invariants
for PCMCIA based devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 19:32:32 -04:00
Michael Buesch aab547ce0d ssb: Add Gigabit Ethernet driver
This adds the Gigabit Ethernet driver for the SSB
Gigabit Ethernet core. This driver actually is a frontend to
the Tigon3 driver. So the real work is done by tg3.
This device is used in the Linksys WRT350N.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:43 -05:00
David S. Miller 255333c1db Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	net/mac80211/rc80211_pid_algo.c
2008-03-05 12:26:41 -08:00
Yoichi Yuasa dc63644b0e ssb: Add pcibios_enable_device() return value check
This patch has added pcibios_enable_device() return value check.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:35 -05:00
Aurelien Jarno 28de57d1a9 ssb: Add CHIPCO IRQ access functions
This patch adds functions to setup and read the CHIPCO IRQ.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:43 -05:00
Michael Buesch ffc7689dda ssb: Add support for 8bit register access
This adds support for 8bit wide register reads/writes.
This is needed in order to support the gigabit ethernet core.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:26 -05:00
Aurelien Jarno 2d8d4fdf78 SSB PCI core driver: use new SPROM data structure
Switch the SSB PCI core driver to the new SPROM data structure now that
the old one has been removed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:29:58 -05:00
Alexey Zaytsev c7084535c9 Use a separate config option for the b43 pci to ssb bridge.
The bridge code was unnecessary enabled by the b44
driver, but it prevents the bcm43xx driver from
being loaded, as the bridge claims the same pci ids.

Now we enable the birdge only if the b43{legacy}
drivers are selected.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:10 -05:00
Michael Buesch fc71acc846 ssb: Fix support for PCI devices behind a SSB->PCI bridge
We must pin all resources and make sure the PCI subsystem
won't relocate us, as the addresses are hardwired into hardware.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:55 -05:00
Michael Buesch 7cb4461520 ssb: Fix pcicore cardbus mode
This fixes the pcicore driver to not die a horrible
crash death when inserting a cardbus card.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:49 -05:00
Michael Buesch 53521d8c90 ssb: Make the GPIO API reentrancy safe
This fixes the GPIO API to be reentrancy safe.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:49 -05:00
Michael Buesch c2bcbe65fc ssb: Fix the GPIO API
This fixes the GPIO API to be usable.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:49 -05:00
Michael Buesch 42bfad4f71 ssb: Fix watchdog access for devices without a chipcommon
This fixes the SSB watchdog access for devices without a chipcommon.
These devices have the watchdog on the extif.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:49 -05:00
Michael Buesch 58ff70d4fe ssb: Fix serial console on new bcm47xx devices
This fixes the baud settings for new devices
like the Linksys WRT350n.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:48 -05:00
Joe Perches b8c268d104 drivers/ssb/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:30:25 +02:00
Michael Buesch af4b745078 ssb: Add boardflags_hi field to the sprom data structure
Add boardflags-high.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:09:52 -08:00
Michael Buesch ca08a965a6 b43-ssb-bridge: Add PCI ID for BCM43XG
This adds the PCI ID 0x4329 for the BCM43XG.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:09:19 -08:00
Michael Buesch 993e1c780b ssb: Fix PCMCIA lowlevel register access
This fixes lowlevel register access for PCMCIA based devices.

The patch also adds a temporary workaround for the device mac address.
It simply adds generation of a random address. The real SPROM extraction
will follow in another patch.
The temporary workaround will be removed then, but for now it's OK.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:09:16 -08:00
Michael Buesch e861b98d5e ssb: Fix extraction of values from SPROM
This fixes extraction of some values from the SPROM.
It mainly fixes extraction of antenna related values, which
is needed for another b43 fix sent later.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:09:14 -08:00
Larry Finger d3c319f9c8 ssb: Remove the old, now unused, data structures
The old, now unused, data structures and SPROM extraction routines
are removed.

Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:44 -08:00
Larry Finger c272ef4403 ssb: Convert to use of the new SPROM structure
In disagreement with the SPROM specs, revision 3 devices appear to have
moved the MAC address.

Change ssb to handle the revision 4 SPROM, which is a different size.
This change in size is handled by adding a new variable to the ssb_sprom
struct and using it whenever possible. For those routines that do not
have access to this structure, a 'u16 size' argument is added.

The new PCI_ID for the BCM4328 is also added.

Testing of the Revision 4 SPROM, which is used on the BCM4328, was done
by Michael Gerdau <mgerdau@tiscali.de>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:41 -08:00
Larry Finger ac82fab44f ssb: Add new SPROM structure while keeping the old
The SPROM's for various devices utilizing the Sonics Silicon Backplane come
with various revisions. The Revision 2 SPROM inherited the data layout of 1, and
Revision 3 inherited the layout of 2. The first instance of Revision 4 has
now been found in a BCM4328 wireless LAN card. This device does not inherit any
layout from previous versions. Although it was possible to create a data
structure that kept all the old layouts, we decided to start fresh, keep only
those SPROM variables that are used by the drivers that utilize ssb, and to
do the conversion in such a manner that neither compilation or execution will
be affected if a bisection lands in the middle of these changes, while keeping
the patches as small as possible.

In this patch, the sprom structures are changed while maintaining the old ones.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:40 -08:00
Michael Buesch 87c4ac841c ssb: Fix probing of PCI cores if PCI and PCIE core is available
This will make sure that always the correct core is selected, even if
there are both a PCI and PCI-E core on a PCI or PCI-E card.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-08 23:30:10 -08:00
Michael Buesch 60d78c4473 ssb: Fix PCMCIA-host lowlevel bus access
This fixes the lowlevel bus access routines for
PCMCIA based devices.

There are still a few issues with register access sideeffects after
this patch. This will be addressed in a later patch.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 22:01:53 -08:00
Michael Buesch 8d8c90e3fd ssb: Fix initcall ordering
ssb must init after PCI but before the ssb drivers.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Christian Casteyde <casteyde.christian@free.fr>
Fixes-bug: #9219
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 21:58:58 -08:00
Ingo Molnar 9be4bfb974 [PATCH] ssb: fix build failure
fix build failure if PCMCIA=m but SSB=y:

drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'

(fix symmetric bug for PCI too.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-16 21:04:11 -04:00
Felix Fietkau 7007d00cac [PATCH] ssb: Fix a null pointer check in mipscore init
Fix a null pointer check in ssb mipscore init

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-16 21:04:11 -04:00
Al Viro 409f243520 missing include in ssb
Using readw() and friends => needs to pull io.h and not all targets are
doing that via indirect chains.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14 08:53:33 -07:00
Al Viro 7ac0326c3f uevent environment changes fallout
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14 08:53:33 -07:00
Geert Uytterhoeven 6faf035cf9 ssb bus needs <linux/io.h>
ssb bus needs <linux/io.h>

  linux/drivers/ssb/main.c: In function 'ssb_ssb_read16':
  linux/drivers/ssb/main.c:518: error: implicit declaration of function 'readw'
  linux/drivers/ssb/main.c: In function 'ssb_ssb_read32':
  linux/drivers/ssb/main.c:526: error: implicit declaration of function 'readl'
  linux/drivers/ssb/main.c: In function 'ssb_ssb_write16':
  linux/drivers/ssb/main.c:534: error: implicit declaration of function 'writew'
  linux/drivers/ssb/main.c: In function 'ssb_ssb_write32':
  linux/drivers/ssb/main.c:542: error: implicit declaration of function 'writel'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-13 09:41:03 -07:00