aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-09-23arcnet: com20020: replace magic numbers with readable macrosMichael Grzeschik3-8/+11
This patch replaces all magic numbers in the driver with proper named macros. For the case of XTOcfg and STARTIOcmd it introduces the new macros. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: reformat structs to C99 formatMichael Grzeschik2-14/+35
This patch changes the macro definitions to match the C99 formating. This improves the readability. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Remove unused arcnet_<I/O>w macrosJoe Perches1-10/+0
The word length macros are unused. Remove them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Add com9026.h to standardize COM9026_REG_<foo>Joe Perches5-34/+21
Deduplicate the COM9026 registers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Remove function pointer macro indirectionsJoe Perches2-37/+32
It's clearer to use function pointer calls directly instead of the macro indirections of ARCRESET, ACOMMAND, ASTATUS, and AINTMASK. Remove the now unused macros too. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: com90xx: Use arcnet_readb/writeb routinesJoe Perches1-12/+17
Simplify and make consistent the current uses of readb/writeb by using the newly introduced arcnet_<I/O> equivalents. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: arc-rimi: Use arcnet_<I/O> routinesJoe Perches1-30/+25
Simplify and make consistent the current uses of readb/writeb by using the newly introduced arcnet_<I/O> equivalents. o Add new #defines for register offsets o Remove old #defines that included the ioaddr o Remove obfuscating macros by expanding them in-place where appropriate Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: arcdevice.h: Add arcnet_readb and arcnet_writebJoe Perches1-0/+5
Use the same indirection as the other arcnet_<I/O> macros. Neither of these new macros add the BUS_ALIGN use for 8 bit devices on 16 bit busses. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: com90xx: Use arcnet_<I/O> routinesJoe Perches1-34/+33
Simplify and make consistent the current uses of inb/outb by using the newly introduced arcnet_<I/O> equivalents. o Add new #defines for register offsets o Remove old #defines that included the ioaddr o Remove obfuscating macros by expanding them in-place where appropriate Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: com90io: Use arcnet_<I/O> routinesJoe Perches1-53/+48
Simplify and make consistent the current uses of inb/outb by using the newly introduced arcnet_<I/O> equivalents. o Add new #defines for register offsets o Remove old #defines that included the ioaddr o Remove obfuscating macros by expanding them in-place where appropriate Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: com20020: Use arcnet_<I/O> routinesJoe Perches6-122/+114
Simplify and make consistent the current uses of inb/outb by using the newly introduced arcnet_<I/O> equivalents. o Add new #defines for register offsets There is an register offset, 8, that is unnamed and used as-is. o Remove old #defines that included the ioaddr o Remove obfuscating macros by expanding them in-place where appropriate o Create static inline com20020_set_subaddress for the SET_SUBADR macro There is an unused arcnet config entry CONFIGSA100_CT6001 which added a special #define BUS_ALIGN which was introduced but never used in fullhist git tree commit 22cfce4b82b0 ("[ARCNET]: Fixes.") in Nov 2004 for Linux v2.6.10. This BUS_ALIGN #define tries to allow 8 bit devices to work on a 16 bit bus by aligning addresses to 16 bit boundaries. Move this currently unused CONFIG_SA1100_CT6001 BUS_ALIGN macro from com20020.h to arcdevice.h. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Add arcnet_<I/O> macrosJoe Perches1-0/+25
arcnet uses an I/O scheme which can align I/O addresses to word boundaries on different architectures. Add arcnet specific macros which can hide this alignment calculation. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Make a char * array const char * constJoe Perches1-5/+10
Might as well be specific about the use of this array. Add a commment questioning the indexing too. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Move files out of include/linuxJoe Perches14-21/+519
These #include files don't need to be in the include/linux directory as they can be local to drivers/net/arcnet/ Move them and update the #include statements. Update the MAINTAINERS file pattern by deleting arcdevice from the NETWORKING block as arcnet is currently unmaintained. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Wrap some long linesJoe Perches10-46/+75
Just neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Remove pointer comparisons to NULLJoe Perches4-6/+6
Use direct tests of pointer instead. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Remove assignments from ifsJoe Perches3-3/+7
Move the assignment above the if like general kernel style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Remove unnecessary OOM messagesJoe Perches5-10/+2
Alloc failures have generic stack dumps so these are redundant. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Move EXPORT_SYMBOL after declarationsJoe Perches1-15/+18
Use the normal kernel style for EXPORT_SYMBOL. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Convert printk to pr_<level>Joe Perches12-64/+65
Use the more current logging style. Remove #define VERSION, use pr_info normally. Add pr_fmt with "arcnet:" prefixes and KBUILD_MODNAME. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Convert BUGMSG and BUGMSG2 to arc_prink and arc_contJoe Perches11-312/+338
These macros don't actually represent BUG uses but are more commonly used as logging macros, so use a more kernel style macro. Convert the BUGMSG from a netdev_ like use to actually use netdev_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Expand odd BUGLVL macro with if and usesJoe Perches11-50/+84
Don't hide what should be obvious. Make the macro a simple test instead of using if and test. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Use network block comment styleJoe Perches11-132/+95
Conformity can be useful. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Use include/linux path for asmJoe Perches7-7/+7
Use the preferred kernel include path for asm paths. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Coalesce string fragmentsJoe Perches6-36/+22
Using coalesced strings helps grep for specific messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Use normal kernel brace styleJoe Perches8-71/+52
Move braces normal kernel locations. Add missing braces. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Add and remove blank linesJoe Perches12-81/+13
Use a more current kernel line style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-23arcnet: Use normal kernel spacing styleJoe Perches12-349/+349
Standardized spacing is easier to read. git diff -w shows no differences. objdiff shows no differences. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2015-09-17ARCNET: fix hard_header_len limitMichael Grzeschik1-1/+1
For arcnet the bare minimum header only contains the 4 bytes to specify source, dest and offset (1, 1 and 2 bytes respectively). The corresponding struct is struct arc_hardware. The struct archdr contains additionally a union of possible soft headers. When doing $insertusecasehere packets might well include short (or even no?) soft headers. For this reason only use arc_hardware instead of archdr to determine the hard_header_len for an arcnet device. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-23drivers/net: remove all references to obsolete Ethernet-HOWTOPaul Gortmaker1-4/+0
This howto made sense in the 1990s when users had to manually configure ISA cards with jumpers or vendor utilities, but with the implementation of PCI it became increasingly less and less relevant, to the point where it has been well over a decade since I last updated it. And there is no value in anyone else taking over updating it either. However the references to it continue to spread as boiler plate text from one Kconfig file into the next. We are not doing end users any favours by pointing them at this old document, so lets kill it with fire, once and for all, to hopefully stop any further spread. No code is changed in this commit, just Kconfig help text. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-02net: Kill dev_rebuild_headerEric W. Biederman1-55/+0
Now that there are no more users kill dev_rebuild_header and all of it's implementations. This is long overdue. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-15com20020-pci: add support for eae single cardMichael Grzeschik1-3/+18
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-05ARCNET: Add missing error check for devm_kzallocKiran Padwal1-0/+3
This patch add a missing check on the return value of devm_kzalloc, which would cause a NULL pointer dereference in a OOM situation. Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-29ARCNET: enable eae arcnet card supportMichael Grzeschik1-0/+16
This patch adds support for the EAE arcnet cards which has two Interfaces. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-29ARCNET: add support for multi interfaces on com20020Michael Grzeschik2-58/+95
The com20020-pci driver is currently designed to instance one netdev with one pci device. This patch adds support to instance many cards with one pci device, depending on the device data in the private data. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-29ARCNET: add com20020 PCI IDs with metadataMichael Grzeschik1-35/+181
This patch adds metadata for the com20020 to prepare for devices with multiple io address areas with multi card interfaces. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-29ARCNET: add com20020_set_hwddr to change addressMichael Grzeschik1-0/+14
This patch adds com20020_set_hwaddr to make it possible to change the hwaddr on runtime. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-29ARCNET: return IRQ_NONE if the interface isn't runningMichael Grzeschik1-1/+1
The interrupt handler needs to return IRQ_NONE in case two devices are used with the shared interrupt handler. Otherwise it could steal interrupts from the other interface. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-14Merge tag 'pci-v3.17-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pciLinus Torvalds1-1/+1
Pull DEFINE_PCI_DEVICE_TABLE removal from Bjorn Helgaas: "Part two of the PCI changes for v3.17: - Remove DEFINE_PCI_DEVICE_TABLE macro use (Benoit Taine) It's a mechanical change that removes uses of the DEFINE_PCI_DEVICE_TABLE macro. I waited until later in the merge window to reduce conflicts, but it's possible you'll still see a few" * tag 'pci-v3.17-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine1-1/+1
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-08-11com20020_cs: Remove typedef com20020_dev_tHimangi Saraogi1-8/+8
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for com20020_dev_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-15net: set name_assign_type in alloc_netdev()Tom Gundersen1-1/+2
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert all users to pass NET_NAME_UNKNOWN. Coccinelle patch: @@ expression sizeof_priv, name, setup, txqs, rxqs, count; @@ ( -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs) +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs) | -alloc_netdev_mq(sizeof_priv, name, setup, count) +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count) | -alloc_netdev(sizeof_priv, name, setup) +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup) ) v9: move comments here from the wrong commit Signed-off-by: Tom Gundersen <teg@jklm.no> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16drivers/net: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. This covers everything under drivers/net except for wireless, which has been submitted separately. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-19arcnet: cleanup sizeof parameterDan Carpenter1-1/+1
This patch doesn't change the compiled code because ARC_HDR_SIZE is 4 and sizeof(int) is 4, but the intent was to use the header size and not the sizeof the header size. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-15drivers/net: use module_pcmcia_driver() in pcmcia driversH Hartley Sweeten1-13/+1
Use the new module_pcmcia_driver() macro to remove the boilerplate module init/exit code in the pcmcia drivers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03ARCNET: remove __dev* attributesBill Pemberton1-3/+3
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-17arcnet: rimi: Fix device name in debug outputJiri Kosina1-4/+4
arcrimi_probe() calls BUGMSG() before register_netdev() happens. BUGMSG() itself prints dev->name, but as the format string hasn't been expanded by register_netdev() yet, the output contains bogus device name such as arc%d: Given: node 00h, shmem 0h, irq 0 As we don't know the device name yet, just drop the prefix completely from the debugging messages. Reported-by: Steven Young <sdyoung@vt220.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-28Remove all #inclusions of asm/system.hDavid Howells1-1/+0
Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
2011-11-26net: Revert ARCNET and PHYLIB to tristate optionsBen Hutchings1-1/+1
commit 88491d8103498a6166f70d5999902fec70924314 ("drivers/net: Kconfig & Makefile cleanup") changed the type of these options to bool, but they select code that could (and still can) be built as modules. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-27drivers/net: Kconfig & Makefile cleanupJeff Kirsher1-1/+1
The is does a general cleanup of the drivers/net/ Kconfig and Makefile. This patch create a "core" option and places all the networking core drivers into this option (default is yes for this option). In addition, it alphabitizes the Kconfig driver options. As a side cleanup, found that the arcnet, token ring, and PHY Kconfig options were a tri-state option and should have been a bool option. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>