aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/macsonic.c
AgeCommit message (Collapse)Author
2009-11-06macsonic: fix crash on PowerBook 520Finn Thain
No-one seems to know where the PowerBook 500 series store their ethernet MAC addresses. So, rather than crash, use a MAC address from the SONIC CAM. Failing that, generate a random one. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-21macsonic, jazzsonic: fix oops on module unloadFinn Thain
Set the driver data before using it. Fixes an oops when doing rmmod. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-21macsonic: move probe function to .devinit.textUwe Kleine-König
A pointer to mac_sonic_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. Various other functions that are called by mac_sonic_probe need to move to .devinit.text, too. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-13macsonic: convert to net_device_opsAlexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-24net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: davem@davemloft.net Cc: netdev@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2008-10-27net: convert print_mac to %pMJohannes Berg
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-11drivers/net/macsonic.c: make functions staticAdrian Bunk
This patch makes the following needlessly global functions static: - macsonic_init() - mac_onboard_sonic_ethernet_addr() - mac_onboard_sonic_probe() - mac_nubus_sonic_ethernet_addr() - macsonic_ident() - mac_nubus_sonic_probe() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
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 <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-04SONIC interrupt handlingFinn Thain
Install the built-in macsonic interrupt handler on both IRQs when using via_alt_mapping. Otherwise the rare interrupt that still comes from the nubus slot will wedge the nubus. $ cat /proc/interrupts auto 2: 89176 via2 auto 3: 744367 sonic auto 4: 0 scc auto 6: 318363 via1 auto 7: 0 NMI mac 9: 119413 framebuffer vbl mac 10: 1971 ADB mac 14: 198517 timer mac 17: 89104 nubus mac 19: 72 Mac ESP SCSI mac 56: 629 sonic mac 62: 1142593 ide0 Version 1 of this patch had a bug where a nubus sonic card would register two interrupt handlers. Only a built-in sonic needs both. Versions 2 and 3 needed some cleanups, as Raylynn Knight and Christoph Hellwig pointed out (thanks). Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04SONIC: small fix and cleanupFinn Thain
Fix a potential problem in the timeout handling: don't free the DMA buffers before resetting the chip. Also a trivial cleanup. Bring macsonic and jazzsonic into sync. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04NuBus header updateFinn Thain
Sync the nubus defines with the latest code in the mac68k repo. Some of these are needed for DP8390 driver update in the next patch. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09[PATCH] missing include in macsonicAl Viro
Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-05net: use bitrev8Akinobu Mita
Use bitrev8 for bmac, mace, macmace, macsonic, and skfp drivers. [akpm@osdl.org: use the API, not the array] Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mirko Lindner <mlindner@syskonnect.de> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-13drivers/net: Trim trailing whitespaceJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-01-28[PATCH] macsonic.c: missed s/driver_unregister/platform_driver_unregister/Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2005-11-09[DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-05[DRIVER MODEL] Fix macsonicRussell King
Release code in driver modules is a potential cause of oopsen. The device may be in use by a userspace process, which will keep a reference to the device. If the module is unloaded, the module text will be freed. Subsequently, when the last reference is dropped, the release code will be called, which no longer exists. Use generic platform device allocation/release code in modules. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29Create platform_device.h to contain all the platform device details.Russell King
Convert everyone who uses platform_bus_type to include linux/platform_device.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-23[PATCH] macsonic/jazzsonic network drivers updateFinn Thain
The purpose of this patch: - Adopt the DMA API (jazzsonic, macsonic & core driver). - Adopt the driver model (macsonic). This part was cribbed from jazzsonic. As a consequence, macsonic once again works as a module. Driver model is also used by the DMA calls. - Support 16 bit cards (macsonic & core driver, also affects jazzsonic) This code was adapted from the mac68k linux 2.2 kernel, where it has languished for a long time. - Support more 32-bit mac cards (macsonic) Also from mac68k repo. - Zero-copy buffer handling (core driver) Provides a nice performance improvement. The new algorithm incidentally helped to replace the old Jazz DMA code. The patch was tested on a variety of macs (several 32-bit quadra built-in NICs, a 16-bit LC PDS NIC and a 16-bit comm-slot NIC), and also on MIPS Jazz. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!