summaryrefslogtreecommitdiffstats
path: root/drivers/net/sis190.c
Commit message (Collapse)AuthorAgeFilesLines
* WorkStruct: make allyesconfigDavid Howells2006-11-221-5/+8
| | | | | | Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* drivers/net: const-ify ethtool_ops declarationsJeff Garzik2006-09-131-1/+1
| | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'tmp' into upstreamJeff Garzik2006-09-121-3/+0
|\
| * [PATCH] Remove more unnecessary driver printk'sAndy Gospodarek2006-09-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As I promised last week, here is the first pass at removing all unnecessary printk's that exist in network device drivers currently in promiscuous mode. The duplicate messages are not needed so they have been removed. Some of these drivers are quite old and might not need an update, but I did them all anyway. I am currently auditing the remaining conditional printk's and will send out a patch for those soon. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | drivers/net: Remove deprecated use of pci_module_init()Jeff Garzik2006-08-191-1/+1
|/ | | | | | | From: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] irq-flags: drivers/net: Use the new IRQF_ constantsThomas Gleixner2006-07-021-1/+1
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [NET]: Avoid allocating skb in skb_padHerbert Xu2006-06-231-2/+1
| | | | | | | | | | | | | | | | | | | | First of all it is unnecessary to allocate a new skb in skb_pad since the existing one is not shared. More importantly, our hard_start_xmit interface does not allow a new skb to be allocated since that breaks requeueing. This patch uses pskb_expand_head to expand the existing skb and linearize it if needed. Actually, someone should sift through every instance of skb_pad on a non-linear skb as they do not fit the reasons why this was originally created. Incidentally, this fixes a minor bug when the skb is cloned (tcpdump, TCP, etc.). As it is skb_pad will simply write over a cloned skb. Because of the position of the write it is unlikely to cause problems but still it's best if we don't do it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* Massive net driver const-ification.Arjan van de Ven2006-03-031-1/+1
|
* sis190: early setting of the pci driver private dataFrancois Romieu2006-02-161-2/+2
| | | | | | | | Below this point, the error path will proceed through sis190_release_board(). It will happily oops if pci_set_drvdata() has not been issued. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
* [PATCH] turn "const static" into "static const"Jesper Juhl2006-01-101-1/+1
| | | | | | | | | | | | | ICC likes to complain about storage class not being first, GCC doesn't care much (except for cases like "inline static"). have a hard time seeing how it could break anything. Thanks to Gabriel A. Devenyi for pointing out http://linuxicc.sourceforge.net/ which is what made me create this patch. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sis190.c: fix multicast MAC filterAurelien Jarno2005-10-281-1/+1
| | | | | | | | | | Here is a patch that changes the way the MAC filter is computed for the multicast addresses. The computation is taken from the SiS GPL driver. This patch is necessary to get IPv6 working. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: basic sis191 supportFrancois Romieu2005-09-051-3/+3
| | | | | | | | | | | | | | The sis191 is the gigabit brother of the sis190. SiS's driver suggests that the register set is backward compatible: this should hopefully give a basic driver. The device should allow the usual features from a modern ethernet adapter (802.1q, SG, Jumbo frames, TSO, checksum offload). So far the relevant register layout is not documented. SiS's driver does not provide these features either (at least not for Linux). Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: RGMII Tx internal delay fiddlingFrancois Romieu2005-09-051-2/+17
| | | | | | | | Don't ask. The patch is based on SiS's GPLed driver. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: make 10Mbps the default when handling the StationControl ↵Francois Romieu2005-09-051-37/+21
| | | | | | | | | | | | | | | | register This patch does three things: - widen the access to the StationControl register (note the SIS_W16 versus SIS_W32 change); - default to 10Mbps half duplex when the LPA can not be evaluated (reg31->ctl is identical for both). It can be argued that it makes sense as the lowest common denominator when everything else failed. Btw it works better than the current code. :o) - remove some enums: they do not document anymore. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: recent chipsets from SiS include a RGMIIFrancois Romieu2005-09-051-4/+45
| | | | | | | | | | Extracted from SiS's GPLed driver. From the few pdf available at SiS's, it seems that the 965 and the 966 south bridge include this interface whereas the 965L (and anything below) does not. It is expected to be a sis191 related feature and should not hurt the existing sis190 driver. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: unmask the link change eventsFrancois Romieu2005-09-051-1/+2
| | | | | | | | link changes reporting does not work when the driver masks its irq event Signed-off-by: Arnaud Patard <apatard@mandriva.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: complete the mii probe before registering the netdeviceFrancois Romieu2005-08-261-11/+12
| | | | | | | | | The userspace must not be able to issue ethtool command and manage the mii before it is completely initialized. Avoid some pesky "eth%d" messages. Signed-off-by: Arnaud Patard <apatard@mandriva.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: compare the lpa to the local advertisementFrancois Romieu2005-07-301-1/+6
| | | | | | | | | | | The station control register must depend on both the advertisement and the lpa The link partner ability has better be intersected with the current advertised value before it is feed to the station control register. Sight-catched-by: Lars Vahlenberg <lars.vahlenberg@gmail.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: PHY identifier for the K8S-MX motherboard.Francois Romieu2005-07-301-0/+1
| | | | | | | | | | Added PHY identifier for the Asus K8S-MX motherboard Note: the same ID appears in the sis900 driver. Signed-off-by: Lars Vahlenberg <lars.vahlenberg@gmail.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: new PHY detection code.Francois Romieu2005-07-301-7/+209
| | | | | | | New PHY detection code. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: dummy read is required by the status registerFrancois Romieu2005-07-301-1/+8
| | | | | | | | | Add a dummy read before accessing the status register SiS driver suggests it. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: allow a non-hardcoded ID for the PHY.Francois Romieu2005-07-301-20/+18
| | | | | | | | | Allow a non-hardcoded ID for the PHY This is the first step before the driver probes for the PHY address. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: add endian annotations.Francois Romieu2005-07-301-9/+9
| | | | | | | | Add endian annotations. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: extract bits definition from SiS driver.Francois Romieu2005-07-301-28/+74
| | | | | | | | | | extract bits definition from SiS driver - fix the Rx stats; - minor pieces of documentation. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: the size of the Rx buffer is constrainedFrancois Romieu2005-07-301-1/+7
| | | | | | | | | | | | Add a restriction to the size of the Rx buffer SiS driver forces the size of any Rx buffer to be a multiple of 64 bit. I would not be surprized that it goes along with some alignment issues which have been experienced before. So far it does not make much of a difference (both drivers use 1536 bytes buffer). Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: initialisation of MAC address.Francois Romieu2005-07-301-16/+138
| | | | | | | | | | | | Extract some mac addr code from SiS's driver. Some magic may hide beyond the isa bridge. The Rx mac control register is now set without condition. Note: good or bad, this part of the code is quite close to sis900.c. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: remove hardcoded constants.Francois Romieu2005-07-301-10/+18
| | | | | | | | | | Replace hardcoded constants by enumerated values in sis190_read_eeprom The names of the enumerated values have been extracted from SiS'official driver (v1.00.00 published on 2005/07/11). Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: merge some register related information from SiS driver.Francois Romieu2005-07-301-9/+22
| | | | | | | Merge some register related information from SiS driver. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: ethtool/mii support.Francois Romieu2005-07-301-0/+60
| | | | | | | | | | | | | | | ethtool/mii support Bug: disabling autonegotiation and setting the link parameters at the same time does not provide the expected result. More investigation is needed. Note: past the initial probe/open time, the link is managed from user-space or accessed through sis190_phy_task, i.e. in a usermode context. Whence the very limited locking needs. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: netconsole support.Francois Romieu2005-07-301-0/+15
| | | | | | | | | netconsole support. This stuff should be factored out of every driver. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] sis190: resurrectionFrancois Romieu2005-07-301-0/+1359
Raise the sis190 driver from the dead The driver handles the integrated network device found on SiS 965L chipset. It follows the classical (non-napi) interrupt-driven model and provides minimal ethtool support. The code comes from a heavy cleanup/rewrite of the original code which was removed from the kernel on 14/04/2004. Since the r8169 driver does not work too bad and there will probably be (at least) a few months of improvements/testing/fixing, I made the code as close as possible to the r8169 one. Pascal Chapperon <pascal.chapperon@wanadoo.fr> deserves some special credit for testing and bug-catching. Many thanks to Lars Vahlenberg as well. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
OpenPOWER on IntegriCloud