aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/pasemi_mac.c
AgeCommit message (Collapse)Author
2007-10-10pasemi_mac: Fix RX checksum flagsOlof Johansson
RX side flag to use is CHECKSUM_UNNECESSARY, not CHECKSUM_COMPLETE. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10pasemi_mac: Fix TX ring wrap checkingOlof Johansson
The old logic didn't detect full (tx) ring cases properly, causing overruns and general badness. Clean it up a bit and abstract out the ring size checks, always making sure to leave 1 slot open. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10pasemi_mac: Batch up TX buffer freesOlof Johansson
Postpone pci unmap and skb free of the transmitted buffers to outside of the tx ring lock, batching them up 32 at a time. Also increase the count threshold to 128. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10pasemi_mac: RX performance tweaksOlof Johansson
Various RX performance tweaks, do some explicit prefetching of packet data, etc. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10pasemi_mac: Fix memcpy amount for short receivesOlof Johansson
Fix up memcpy for short receives. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10pasemi_mac: Enable L2 caching of packet headersOlof Johansson
Enable settings to target l2 for the first few cachelines of the packet, since we'll access them to get to the various headers. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10pasemi_mac: Stop using the pci config space accessors for register read/writesOlof Johansson
Move away from using the pci config access functions for simple register access. Our device has all of the registers in the config space (hey, from the hardware point of view it looks reasonable :-), so we need to somehow get to it. Newer firmwares have it in the device tree such that we can just get it and ioremap it there (in case it ever moves in future products). For now, provide a hardcoded fallback for older firmwares. [ Resolved napi_struct conflicts... -DaveM ] Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10pasemi_mac: Abstract out register accessOlof Johansson
Abstract out the PCI config read/write accesses into reg read/write ones, still calling the pci accessors on the back end. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger
Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-08pasemi_mac: Fix TX interrupt thresholdOlof Johansson
It was mistakenly set to interrupt on the second packet instead of first, causing some interesting latency behaviour. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-15pasemi_mac: Fix local-mac-address parsingolof@lixom.net
Turns out we have an old version of firmware that stores the mac address in 'mac-address' as a string instead of a byte array. All versions that use local-mac-address should have it as byte array, so no need to do string parsing for that case. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-15pasemi_mac: Terminate PCI ID listolof@lixom.net
This caused some very interesting behaviour depending on what happened to be built at the same time. Add terminating empty entry to the list of IDs. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-15pasemi_mac: Interrupt ack fixesOlof Johansson
Interrupt ack fixes Fix the packet count resets at interrupt time, using the cacheable packet count status to set number of processed/received packets, since the ack count is the cumulative number of packets processed, and not incremental. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08Merge branch 'upstream-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (40 commits) [netdrvr] atl1: fix build pasemi_mac: Use local-mac-address instead of mac-address if available pasemi_mac: PHY support pasemi_mac: Add msglevel support and "debug" module param pasemi_mac: Logic cleanup / rx performance improvements pasemi_mac: Minor cleanup / define fixes pasemi_mac: Add SKB reuse / copy-break pasemi_mac: Timer and interrupt fixes pasemi_mac: Abstract and fix up interrupt restart routines pasemi_mac: Move the IRQ mapping from the PCI layer to the driver tc35815: Remove unnecessary skb->dev assignment drivers/net/dm9000: Convert to generic boolean AT91RM9200 Ethernet: Fix multicast addressing AT91RM9200 Ethernet: Support additional PHYs PCMCIA-NETDEV : xirc2ps_cs: bugfix of multicast code sky2: re-enable 88E8056 for most motherboards MIPS: Drop unnecessary CONFIG_ISA from RBTX49XX ne: MIPS: Use platform_driver for ne on RBTX49XX ne: Add NEEDS_PORTLIST to control ISA auto-probe ne: Misc fixes for platform driver. ... Fix conflict in drivers/net/pasemi_mac.c (get_property() got renamed to of_get_property()) manually. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08pasemi_mac: Use local-mac-address instead of mac-address if availableOlof Johansson
Use local-mac-address in the device tree instead. Fall back to mac-address for older firmware. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: PHY supportOlof Johansson
PHY support for pasemi_mac. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Add msglevel support and "debug" module paramOlof Johansson
Add msglevel support for pasemi_mac. Move the MODULE_* defines to the top to go together with the variable (similar to tg3). Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Logic cleanup / rx performance improvementsOlof Johansson
Logic cleanup and some performance enhancements to the RX path. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Minor cleanup / define fixesOlof Johansson
* Remove some unused defines * Fix a couple of wrong chip register defines, and add a few more fields that might be used in the near future. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Add SKB reuse / copy-breakOlof Johansson
Add a copy-break and recycle the SKB in the driver for small packets. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Timer and interrupt fixesOlof Johansson
Timer and interrupt fixes: * Be pickier with what kind of interrupts are acked to avoid the device to get out of sync with the driver state * Set RX count threshhold to 1 (for NAPI interrupted mode), TX count threshold to 32. * Set timer thresholds to current max (~16ms). Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Abstract and fix up interrupt restart routinesOlof Johansson
Abstract out (and fix up) the interrupt restart routines, making sure we start out in a consistent state. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: Move the IRQ mapping from the PCI layer to the driverOlof Johansson
Fixes for ethernet IRQ mapping, to be done in the driver instead of in the platform setup code. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-08pasemi_mac: A couple of minor bugfixes.Olof Johansson
Bugfixes: * Move the wake_queue logic from tx_intr to clean_tx * Always do wake_queue even if queue wasn't full before clean since it's safe to do * Fix polarity in checks in pasemi_mac_close Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-02[POWERPC] Rename get_property to of_get_property: driversStephen Rothwell
These are all the remaining instances of get_property. Simple rename of get_property to of_get_property. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-25[SK_BUFF]: Introduce skb_network_header_lenArnaldo Carvalho de Melo
For the common sequence "skb->h.raw - skb->nh.raw", similar to skb->mac_len, that is precalculated tho, don't think we need to bloat skb with one more member, so just use this new helper, reducing the number of non-skbuff.h references to the layer headers even more. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iphArnaldo Carvalho de Melo
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[SK_BUFF]: Introduce skb_network_header()Arnaldo Carvalho de Melo
For the places where we need a pointer to the network header, it is still legal to touch skb->nh.raw directly if just adding to, subtracting from or setting it to another layer header. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[ETH]: Make eth_type_trans set skb->dev like the other *_type_transArnaldo Carvalho de Melo
One less thing for drivers writers to worry about. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-05PA Semi PWRficient Ethernet driverOlof Johansson
Driver for the PA Semi PWRficient on-chip Ethernet (1/10G) Basic enablement, will be complemented with performance enhancements over time. PHY support will be added as well. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>