Commit Graph

87 Commits

Author SHA1 Message Date
Stephen Hemminger a06631cbdc [PATCH] skge: don't allow transmit ring to be too small
The driver will get stuck (permanent transmit timeout), if the transmit
ring size is set too small.  It needs to have enough ring elements to
hold one maximum size transmit.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:17:07 -04:00
Stephen Hemminger 20e777a2a7 [PATCH] skge: bad checksums on big-endian platforms
Skge driver always causes  bad checksums on big-endian.
The checksum in the receive control block was being swapped
when it doesn't need to be.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:17:07 -04:00
Stephen Hemminger 2d2a387199 [PATCH] Subjec: sky2, skge: correct PCI id for DGE-560T
The Dlink DGE-560T uses Yukon2 chipset so it needs sky2 driver; and
the DGE-530T uses Yukon1 so it uses skge driver.

Bug: http://bugzilla.kernel.org/show_bug.cgi?id=6544

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
Stephen Hemminger 5636f72794 [PATCH] dlink pci cards using wrong driver
This patch fixes the problem of some Dlink cards picking the wrong
driver.  It looks like these cards use Yukon 1 chipset, not Yukon 2.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-04-12 18:04:03 -04:00
Stephen Hemminger eff4b1fe0a [PATCH] skge: version 1.5
Update version to allow tracking of complaints.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger 29b4e886cb [PATCH] skge: compute available ring buffers
Don't need to keep track of available buffers, it is simpler
to just compute the value (ala e1000). Don't need tes on link up
because should always have available buffers then.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger 866b4f3e94 [PATCH] skge: dont free skb until multi-part transmit complete
Don't free transmit buffers until the whole set of transmit descriptors
has been marked as done.  Otherwise, we risk freeing a skb before the
whole transmit is done.

This changes the transmit completion handling from incremental to a
two pass algorithm. First pass scans and records the start of the last
done descriptor, second cleans up until that point.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger 4c180fc424 [PATCH] skge: multicast statistics fix
Fix count of multicast packets.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger 5a01144717 [PATCH] skge: rx_reuse called twice
In the error case we call skge_rx_reuse twice. This is harmless
but unnecessary.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger b5d56ddc3f [PATCH] skge: dont use dev_alloc_skb for rx buffs
The skge driver was using dev_alloc_skb which reserves space for the
Ethernet header. This unnecessary and it should just use alloc_skb,
also by using GFP_KERNEL during startup it won't run into problems when
a user asks for a huge ring size or mtu and potentially drains the
reserved atomic pool.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger 901ccefb2d [PATCH] skge: align receive buffers
The skge driver aligns the header on the initial receive buffers, but
but doesn't on followon receive buffer allocations.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23 17:13:54 -05:00
Stephen Hemminger 9362860fd1 [PATCH] skge: version 1.4
Update version number

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:51 -05:00
Stephen Hemminger b9d64acc82 [PATCH] skge: handle pci errors better
When a PCI error occurs, try and report more info.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:51 -05:00
Stephen Hemminger 203babb650 [PATCH] skge: formmating and whitespace cleanup
Reformat some code to make it easier to read. And whitespace
fixes.

Signed-off-by: Stephen Hemminger <sheminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:51 -05:00
Stephen Hemminger c68ce71a34 [PATCH] skge: use mmiowb
Add mmio barriers at the appropriate places, don't have a platform
that needs them, but this is where the documentation of the patch
says to add them.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:51 -05:00
Stephen Hemminger ff7907aede [PATCH] skge: use kcalloc
Use kcalloc when allocating ring data structure.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:51 -05:00
Stephen Hemminger 93aea718c6 [PATCH] skge: dma configuration cleanup
Cleanup of the part of the code that sets up DMA configuration.
Should cause no real change in operation, just clearer.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:50 -05:00
Stephen Hemminger c3da144740 [PATCH] skge: check the allocation of ring buffer
The SysKonnect Genesis and Yukon chip sets have restrictions on the possible
control block area.  The memory needs to not cross 4 Gig boundary, and it needs
to be 8 byte aligned.  This patch checks and fails to bring the device up
if region is unacceptable.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:50 -05:00
Stephen Hemminger cfc3ed796e [PATCH] skge: use auto masking of irqs
Improve performance of skge driver by not touching irq mask
register as much. Since the interrupt source auto-masks, the driver
can just leave it disabled until the end of the soft irq.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:50 -05:00
Stephen Hemminger 00a6cae288 [PATCH] skge: use NAPI for tx cleanup.
Cleanup transmit buffers using NAPI.  This allows the transmit routine
to leave interrupts enabled, and that improves performance.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:50 -05:00
Stephen Hemminger 80dd857dac skge: protect interrupt mask
There is a race between updating the irq mask and setting it
which can be triggered on SMP with a bad cable.
Similar patch from Ingo Molnar and Thomas Gleixner

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-02-23 23:07:08 +01:00
Stephen Hemminger 0781191cf6 skge: genesis phy initialzation
The SysKonnect Genesis based board would fail on initialization
with phy_read errors caused by not waiting for last phy write.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-02-23 23:07:07 +01:00
Stephen Hemminger a9cdab869e skge: NAPI/irq race fix
Fix a race in the receive NAPI, irq handling. The interrupt clear and the
start need to be separated.  Otherwise there is a window between the last
frame received and the NAPI done level handling.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-02-23 23:07:07 +01:00
Stephen Hemminger 564f9abb34 [PATCH] skge: speed setting
This is a clone of John Linville's fixed for speed setting on sky2 driver.
The skge driver has the same code (and bug). It would not allow manually forcing
100 and 10 mbit.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-17 16:15:47 -05:00
Stephen Hemminger 77783a78de [PATCH] skge: fix dma mask setup.
There are a couple of problems in the DMA setup code for skge.
* In the 64 bit case, it doesn't set the consistent mask.
* In the 32 bit case, the error check is backwards!
It likely will only be visible as a bug on 64 bit platforms.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:52:56 -05:00
Linus Torvalds d779188d2b Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2006-01-04 16:31:56 -08:00
Arnaldo Carvalho de Melo 14c850212e [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h
To help in reducing the number of include dependencies, several files were
touched as they were getting needed headers indirectly for stuff they use.

Thanks also to Alan Menegotto for pointing out that net/dccp/proto.c had
linux/dccp.h include twice.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-03 13:11:21 -08:00
Stephen Hemminger edd702e847 [PATCH] skge: error handling on resume
Also have to handle out of memory condition on resume.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 09:38:35 -05:00
Stephen Hemminger f15943f500 [PATCH] skge: version number (1.3)
Enough changes for one version.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 09:36:06 -05:00
Stephen Hemminger 3b8bb472ad [PATCH] skge: handle out of memory on ring parameter change
If changing ring parameters is unable to allocate memory, we need
to return an error and take the device down.

Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=5715
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 09:36:06 -05:00
Stephen Hemminger 7731a4ea1b [PATCH] skge: handle out of memory on MTU size changes
Changing the MTU size causes the receiver to have to reallocate buffers.
If this allocation fails, then we need to return an error, and take
the device offline. It can then be brought back up or reconfigured
for a smaller MTU.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 09:36:05 -05:00
Stephen Hemminger e8df855460 [PATCH] skge: avoid up/down on pause param changes
Change the pause settings doesn't need to cause link to go down/up.
It can be handled by the phy_reset code.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 09:36:05 -05:00
Stephen Hemminger ee294dcda1 [PATCH] skge: avoid up/down on speed changes
Change the speed settings doesn't need to cause link to go down/up.
It can be handled by doing the same logic as nway_reset.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 09:36:05 -05:00
Jeff Garzik 98684a9d91 [netdrvr skge] fix build 2005-12-13 11:35:22 -05:00
Stephen Hemminger ee1c81917a [PATCH] skge: get rid of warning on race
Get rid of warning in case of race with ring full and lockless
tx on the skge driver. It is possible to be in the transmit
routine with no available slots and already stopped.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12 23:33:03 -05:00
Jeff Garzik ea182d4aef [netdrvr skge] fix typo, fix build 2005-12-01 04:31:32 -05:00
Stephen Hemminger 1096e87174 [PATCH] skge: handle VLAN checksum correctly on yukon rev 0
If using UDP over VLAN, with the skge driver there is a possibility
of generating an incorrect checksum. This is a unlikely occurrence
because it is only an issue on Yukon revision 0, and that revision
doesn't seem to exist on any current hardware (probably early prototype).

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-01 02:28:56 -05:00
Stephen Hemminger d7eaee087a [PATCH] skge: increase version number
Increase the driver version number and print version when
probing.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:08 -05:00
Stephen Hemminger 8f3f8193a4 [PATCH] skge: spelling fixes
Fix some of my bad spelling.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:08 -05:00
Stephen Hemminger 1631aef151 [PATCH] skge: use prefetch on receive
Use prefetch() in the interrupt path to try and look ahead
at the next place will be looking at in the ring.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:08 -05:00
Stephen Hemminger 355ec57243 [PATCH] skge: goto low power mode on shutdown
Go into power down mode on shutdown.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:08 -05:00
Stephen Hemminger 2cd8e5d365 [PATCH] skge: add mii ioctl support
Basic MII ioctl support for skge driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:08 -05:00
Stephen Hemminger 7e86306113 [PATCH] skge: use kzalloc
Can use kzalloc in skge driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:08 -05:00
Stephen Hemminger adba9e23b4 [PATCH] skge: clear PCI PHY COMA mode on boot
When skge is booted up, the PHY may be stuck in power down state
by the previous OS. So we may need to turn it on.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-08 23:58:07 -05:00
Jeff Garzik 3c8c7b2f32 Merge branch 'upstream-fixes' 2005-10-03 22:06:19 -04:00
Stephen Hemminger c2681dd8c7 [PATCH] skge: set mac address oops with bonding
Skge driver was bringing link up/down when changing mac
address.  This doesn't work in the bonding environment, and is
more effort than needed.

Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=5271

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-03 21:58:33 -04:00
Stephen Hemminger c886861138 [PATCH] skge: fix Yukon-Lite A0 workaround
This is one of those workarounds sucked over from sk98lin driver.
The skge driver needs to detect the Yukon-Lite A0 chip properly,
and turn of Rx FIFO Flush.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-23 19:07:12 -04:00
Jeff Garzik da192bb50c Merge /spare/repo/linux-2.6/ 2005-09-22 15:43:14 -04:00
Jeff Garzik a3536c839f Merge /spare/repo/linux-2.6/ 2005-09-21 22:34:08 -04:00
Stephen Hemminger 383181ac7e [PATCH] skge: check length from PHY
Cleanup receive buffer allocation and management,
Add more error handling checks from PHY and bump version.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-21 22:32:50 -04:00