summaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet
Commit message (Collapse)AuthorAgeFilesLines
* arcnet/com20020: add LEDS_CLASS dependencyArnd Bergmann2015-11-031-0/+1
| | | | | | | | | | | | | | | | | | The newly added led trigger support in the com20020-pci driver causes build errors when CONFIG_LEDS_CLASS is disabled: drivers/built-in.o: In function `com20020pci_probe': (.text+0x185dc4): undefined reference to `devm_led_classdev_register' (.text+0x185dd8): undefined reference to `devm_led_classdev_register' This adds a Kconfig dependency to prevent the invalid configurations. Other drivers appear to be split 50:50 between 'select' and 'depends on' for this symbol, I picked 'depends on' as I could not find a common policy and it generally causes fewer problems. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 8890624a4e8c ("arcnet: com20020-pci: add led trigger support") Signed-off-by: David S. Miller <davem@davemloft.net>
* arcnet: add netif_carrier_on/off for reconnectMichael Grzeschik2015-10-262-0/+27
| | | | | | | | | | The arcnet device has no interrupt to detect if the link has changed from disconnected to connected. This patch adds an timer to toggle the link detection. The timer will get retriggered as long as the reconnection interrupts accure. If the recon interrupts hold off for >1s we define the connection stable again. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: com20020-pci: add led trigger supportMichael Grzeschik2015-10-264-0/+174
| | | | | | | | The EAE PLX-PCI card has special leds on the the main io pci resource bar. This patch adds support to trigger the conflict and data leds with the packages. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: com20020-pci: add rotary index supportMichael Grzeschik2015-10-262-0/+37
| | | | | | | | | The EAE PLX-PCI card has a special rotary encoder to configure the address of every card individually. We take this information for the initial setup of the cards dev_id. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: com20020-pci: set dev_port to the subdevice indexMichael Grzeschik2015-10-261-0/+1
| | | | | | | | This patch sets the dev_port according to the index of the card. This can be used by udev to name the ports in userspace. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: com20020: add enable and disable device on open/closeMichael Grzeschik2015-10-261-10/+29
| | | | | | | | | This patch changes the driver to properly work with the linux netif interface. The controller gets enabled on open and disabled on close. Therefor it removes every bogus start of the xceiver. It only gets enabled on com20020_open and disabled on com20020_close. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: move dev_free_skb to its only userMichael Grzeschik2015-10-261-8/+2
| | | | | | | | The call for dev_free_skb is done only once. This patch moves its call to its only user and removes the obsolete condition variable. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-09-261-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: net/ipv4/arp.c The net/ipv4/arp.c conflict was one commit adding a new local variable while another commit was deleting one. Signed-off-by: David S. Miller <davem@davemloft.net>
| * ARCNET: fix hard_header_len limitMichael Grzeschik2015-09-171-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>
* | arcnet: capmode: remove extra functionMichael Grzeschik2015-09-231-6/+3
| | | | | | | | | | | | | | This patch cleans the capmode protocol module. It removes the obsolete function arcnet_cap_init and replaces printk with pr_info. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* | arcnet: arc-rawmode: reorder module functionsMichael Grzeschik2015-09-231-46/+38
| | | | | | | | | | | | | | This patch moves the module_init and module_exit patches to the end of the file. It also replaces the printk with pr_info. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* | arcnet: com20020: replace magic numbers with readable macrosMichael Grzeschik2015-09-233-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>
* | arcnet: reformat structs to C99 formatMichael Grzeschik2015-09-232-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>
* | arcnet: Remove unused arcnet_<I/O>w macrosJoe Perches2015-09-231-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>
* | arcnet: Add com9026.h to standardize COM9026_REG_<foo>Joe Perches2015-09-235-34/+21
| | | | | | | | | | | | | | Deduplicate the COM9026 registers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* | arcnet: Remove function pointer macro indirectionsJoe Perches2015-09-232-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>
* | arcnet: com90xx: Use arcnet_readb/writeb routinesJoe Perches2015-09-231-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>
* | arcnet: arc-rimi: Use arcnet_<I/O> routinesJoe Perches2015-09-231-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>
* | arcnet: arcdevice.h: Add arcnet_readb and arcnet_writebJoe Perches2015-09-231-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>
* | arcnet: com90xx: Use arcnet_<I/O> routinesJoe Perches2015-09-231-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>
* | arcnet: com90io: Use arcnet_<I/O> routinesJoe Perches2015-09-231-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>
* | arcnet: com20020: Use arcnet_<I/O> routinesJoe Perches2015-09-236-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>
* | arcnet: Add arcnet_<I/O> macrosJoe Perches2015-09-231-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>
* | arcnet: Make a char * array const char * constJoe Perches2015-09-231-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>
* | arcnet: Move files out of include/linuxJoe Perches2015-09-2314-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>
* | arcnet: Wrap some long linesJoe Perches2015-09-2310-46/+75
| | | | | | | | | | | | | | Just neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* | arcnet: Remove pointer comparisons to NULLJoe Perches2015-09-234-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>
* | arcnet: Remove assignments from ifsJoe Perches2015-09-233-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>
* | arcnet: Remove unnecessary OOM messagesJoe Perches2015-09-235-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>
* | arcnet: Move EXPORT_SYMBOL after declarationsJoe Perches2015-09-231-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>
* | arcnet: Convert printk to pr_<level>Joe Perches2015-09-2312-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>
* | arcnet: Convert BUGMSG and BUGMSG2 to arc_prink and arc_contJoe Perches2015-09-2311-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>
* | arcnet: Expand odd BUGLVL macro with if and usesJoe Perches2015-09-2311-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>
* | arcnet: Use network block comment styleJoe Perches2015-09-2311-132/+95
| | | | | | | | | | | | | | Conformity can be useful. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* | arcnet: Use include/linux path for asmJoe Perches2015-09-237-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>
* | arcnet: Coalesce string fragmentsJoe Perches2015-09-236-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>
* | arcnet: Use normal kernel brace styleJoe Perches2015-09-238-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>
* | arcnet: Add and remove blank linesJoe Perches2015-09-2312-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>
* | arcnet: Use normal kernel spacing styleJoe Perches2015-09-2312-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>
* drivers/net: remove all references to obsolete Ethernet-HOWTOPaul Gortmaker2015-06-231-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>
* net: Kill dev_rebuild_headerEric W. Biederman2015-03-021-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>
* com20020-pci: add support for eae single cardMichael Grzeschik2015-02-151-3/+18
| | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ARCNET: Add missing error check for devm_kzallocKiran Padwal2015-02-051-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>
* ARCNET: enable eae arcnet card supportMichael Grzeschik2014-09-291-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>
* ARCNET: add support for multi interfaces on com20020Michael Grzeschik2014-09-292-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>
* ARCNET: add com20020 PCI IDs with metadataMichael Grzeschik2014-09-291-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>
* ARCNET: add com20020_set_hwddr to change addressMichael Grzeschik2014-09-291-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>
* ARCNET: return IRQ_NONE if the interface isn't runningMichael Grzeschik2014-09-291-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>
* Merge tag 'pci-v3.17-changes-2' of ↵Linus Torvalds2014-08-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci 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
| * PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine2014-08-121-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>
OpenPOWER on IntegriCloud