Commit graph

670 commits

Author SHA1 Message Date
Matt Carlson c7ebfdaca0 tg3: Update version to 3.114
This patch updates the tg3 version to 3.114.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:45 -07:00
Matt Carlson 7cb32cf23c tg3: Add extend rx ring sizes for 5717 and 5719
This patch increases the rx ring sizes for those asic revs that support
them.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:44 -07:00
Matt Carlson 2c49a44df3 tg3: Prepare for larger rx ring sizes
This patch adds two new variables to track the size of the standard and
jumbo rx producer ring sizes.  The code is then pivoted to these
variables from preprocessor constants.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:44 -07:00
Matt Carlson 1da85aa3db tg3: Futureproof the loopback test
There are other multiqueue modes 5717 and 5719 devices can assume.  This
patch makes sure that the loopback test is safe, should those other
modes be enabled in the future.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:43 -07:00
Matt Carlson 37a949c548 tg3: Cleanup missing VPD partno section
This patch cleans up the default VPD partno section.  New entries for
5717 asic rev devices were also added.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:43 -07:00
Matt Carlson f51a8903f1 tg3: Remove 5724 device ID
This product was never released to the public.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:42 -07:00
Matt Carlson d309a46e42 tg3: 5719: Prevent tx data corruption
This patch enables a bit that prevents read DMA overflows and adjusts
the txmbuf margin from the hardware default.  The combination of these
modifications prevents a tx data corruption issue we were seeing on the
5719.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:42 -07:00
Matt Carlson 66cfd1bd05 tg3: Fix potential netpoll crash
Up until now the tg3 driver would call netif_napi_add() for the maximum
number of NAPI instances the driver could use.  The problem is that
netpoll could call tg3_poll() on instances that are not active.  The net
effect is that the driver will crash attempting to dereference
uninitialized pointers.

The fix is to only allocate as many NAPI instances as the driver would
use in tg3_open() and deleted them in tg3_close().

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01 00:24:41 -07:00
Ben Hutchings 2ddaad397c tg3: Use netif_set_real_num_{rx,tx}_queues()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-27 22:11:51 -07:00
Eric Dumazet 807540baae drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;"

return is not a function, parentheses are not required.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-26 18:34:29 -07:00
Matt Carlson f833c4c181 tg3: phy tmp variable roundup
The tg3's phy routines define temporary variables in many locations
within the same routine.  This patch unifies all temporary variables
into one location.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:15 -07:00
Matt Carlson a4a8bb15ae tg3: Dynamically allocate VPD data memory
This patch eases stack pressure by dynamically allocating the memory
used to temporarily store VPD data.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:15 -07:00
Matt Carlson 02e96080af tg3: Use skb_is_gso_v6()
This patch converts the driver to prefer the skb_is_gso_v6() helper over
the explicit inlined version.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:14 -07:00
Matt Carlson 8fea32b955 tg3: Move producer ring struct to tg3_napi
Now that each NAPI instance has its own producer ring, it no longer
makes sense to keep the producer ring structure external.  This patch
migrates the producer ring struct to tg3_napi and pivots the code to the
new implementation.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:13 -07:00
Matt Carlson 6fd45cb814 tg3: Clarify semantics of TG3_IRQ_MAX_VECS
TG3_IRQ_MAX_VECS should be seen as the maximum number of vectors that
any device could be expected to use.  tp->irq_max represents the maximum
number of vectors the current device can use.  This patch clarifies the
semantics of the code to match the above description.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:13 -07:00
Matt Carlson 2e9f7a7408 tg3: Unlock 5717 B0+ support
This patch adjusts the driver to use the tg3_start_xmit_dma_bug()
transmit routine for all revisions of 5717 asic rev devices and then
allows the driver to attach to B0 and later devices.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:12 -07:00
Matt Carlson dc6d074457 tg3: Don't send APE events for NCSI firmware
NCSI firmware does not accept APE events.  It relies on a "driver state"
location in shared memory to tell it what the driver's current state is.

This patch pivots the code to use the new driver state scheme.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:12 -07:00
Matt Carlson f0392d2448 tg3: Disable TSS
It was recently discovered that enabling TSS can lockup the device.
This patch disables the feature until a suitable workaround can be
found.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:11 -07:00
Matt Carlson 41a8a7ee4a tg3: Fix read DMA FIFO overruns on recent devices
Earlier versions of tg3 devices had a problem where the read DMA FIFO
could be overrun in certain edge conditions.  The fix was to limit the
number of rx BDs the hardware would fetch at a time.  For later devices
(5761, 5784 and later ASIC revs), there is a hardware fix that must be
enabled to fix the same problem.  This patch adds that hardware fix.

There is a gap in the ASIC revision lineage where neither fix is
applied.  This is intentional as these ASIC revisions are not afflicted
by the bug.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:16:10 -07:00
Eric Dumazet bc8acf2c8c drivers/net: avoid some skb->ip_summed initializations
fresh skbs have ip_summed set to CHECKSUM_NONE (0)

We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers.

Introduce skb_checksum_none_assert() helper so that we keep this
assertion documented in driver sources.

Change most occurrences of :

skb->ip_summed = CHECKSUM_NONE;

by :

skb_checksum_none_assert(skb);

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-02 19:06:22 -07:00
Matt Carlson 9ed6eda4fa tg3: Update version to 3.113
This patch updates the tg3 version to 3.113.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:33 -07:00
Matt Carlson f07e9af31e tg3: Migrate tg3_flags to phy_flags
This patch moves most of the phy related flag definitions over to the
phyflags member and changes the code accordingly.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:33 -07:00
Matt Carlson 80096068bc tg3: Create phy_flags and migrate phy_is_low_power
This patch deletes the link_config.phy_is_low_power flag and creates a
new phy_flags device member to store all phy related settings.  All the
code is converted accordingly.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:32 -07:00
Matt Carlson f08aa1a8b8 tg3: Add phy-related preprocessor constants
This patch replaces some instances of hardcoded phy register values with
preprocessor equivalents.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:32 -07:00
Matt Carlson 6ee7c0a0a5 tg3: Add error reporting to tg3_phydsp_write()
This patch adds error reporting to the tg3_phydsp_write() function and
converts a few more locations to use this function over the inlined
equivalent.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:31 -07:00
Matt Carlson f65aac166f tg3: Improve small packet performance
smp_mb() inside tg3_tx_avail() is used twice in the normal
tg3_start_xmit() path (see illustration below).  The full memory
barrier is only necessary during race conditions with tx completion.
We can speed up the tx path by replacing smp_mb() in tg3_tx_avail()
with a compiler barrier.  The compiler barrier is to force the
compiler to fetch the tx_prod and tx_cons from memory.

In the race condition between tg3_start_xmit() and tg3_tx(),
we have the following situation:

tg3_start_xmit()                       tg3_tx()
    if (!tg3_tx_avail())
        BUG();

    ...

    if (!tg3_tx_avail())
        netif_tx_stop_queue();         update_tx_index();
        smp_mb();                      smp_mb();
        if (tg3_tx_avail())            if (netif_tx_queue_stopped() &&
            netif_tx_wake_queue();         tg3_tx_avail())

With smp_mb() removed from tg3_tx_avail(), we need to add smp_mb() to
tg3_start_xmit() as shown above to properly order netif_tx_stop_queue()
and tg3_tx_avail() to check the ring index.  If it is not strictly
ordered, the tx queue can be stopped forever.

This improves performance by about 3% with 2 ports running
bi-directional 64-byte packets.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:31 -07:00
Matt Carlson 67b284d476 tg3: Remove 5720, 5750, and 5750M
These devices were never released to the public.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:30 -07:00
Matt Carlson ecc796486f tg3: Detect APE firmware types
This patch adds code to determine the APE firmware type and report this
along with the firmware version.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:29 -07:00
Matt Carlson 8c69b1e702 tg3: Restrict ASPM workaround devlist
The ASPM workaround setting obtained from NVRAM only works with devices
older than 5717.  This patch enforces the restriction.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:29 -07:00
Matt Carlson f37500d3f6 tg3: Manage gphy power for CPMU-less devs only
This patch changes the code to only manage the PCIe gphy power for
CPMU-less devices only.  The CPMU takes over management for newer
chips.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:28 -07:00
Matt Carlson 88075d915b tg3: Don't access phy test ctrl reg for 5717+
The phy test register location has been repurposed for 5717+ devices.
This patch changes the code to avoid this location for these devices.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:28 -07:00
Matt Carlson c885e82469 tg3: Create TG3_FLG3_5717_PLUS flag
This patch creates a TG3_FLG3_5717_PLUS flag to collectively describe
the set of changes in the ASIC that will apply to all future chip
revisions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:27 -07:00
Matt Carlson 774ee7525f tg3: Disable TSS also during tg3_close()
The TSS flag needs to be turned off during tg3_close().  If the device
fails to allocate more than one MSI-X vector the next time the device is
brought up, transmits will fail.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:27 -07:00
Matt Carlson 6de34cb963 tg3: Add 5784 ASIC rev to earlier PCIe MPS fix
tg3 commit e712699734 entitled
"tg3: Preserve PCIe MPS setting for new devs" attempted to ensure the
PCIe link negotiated Maximum Payload Size (MPS) setting was 128 bytes
for all devices that didn't support higher speeds.  The 5784 device was
mistakenly added to this list when it shouldn't have.  This patch
removes the 5784 ASIC rev devices from that list.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-02 15:46:26 -07:00
Richard Cochran 28b041139e net: preserve ifreq parameter when calling generic phy_mii_ioctl().
The phy_mii_ioctl() function unnecessarily throws away the original ifreq.
We need access to the ifreq in order to support PHYs that can perform
hardware time stamping.

Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl().
This is unnecessary since phylib will check the command in any case.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-18 19:15:25 -07:00
Matt Carlson 98e32a9cee tg3: Update version to 3.112
This patch updates the tg3 version to 3.112.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:44 -07:00
Matt Carlson be98da6a10 tg3: Fix some checkpatch errors
This patch fixes the following checkpatch errors:

ERROR: do not use assignment in if condition
+	if ((mss = skb_shinfo(skb)->gso_size) != 0) {

ERROR: do not use assignment in if condition
+	if ((mss = skb_shinfo(skb)->gso_size) != 0) {

ERROR: space prohibited after that '!' (ctx:BxW)
+			if (! netif_carrier_ok(tp->dev) &&
 			    ^

ERROR: space required after that ',' (ctx:VxV)
+#define GET_REG32_LOOP(base,len)		\
                            ^

ERROR: "(foo*)" should be "(foo *)"
+		memcpy(data, ((char*)&val) + b_offset, b_count);

ERROR: do not use assignment in if condition
+		if ((err = tg3_do_mem_test(tp, mem_tbl[i].offset,

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:43 -07:00
Matt Carlson 702e52ccd3 tg3: Revert PCIe tx glitch fix
This patch reverts commit 52cdf8526f,
entitled "tg3: Prevent a PCIe tx glitch".  The problem does not have
any visible side-effects and happens too early for the driver to do
anything about it.  The proper place for this code is within the
device's bootcode.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:43 -07:00
Matt Carlson 6867c84381 tg3: Report driver version to firmware
This patch changes the code so that the driver version can be reported
to the firmware in addition to the current use.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:42 -07:00
Matt Carlson 2138c00217 tg3: Relax 5717 serdes restriction
tg3 is coded to refuse to attach to 5717 serdes devices.  Now that the
hardware is better supported, we can relax this restriction.  This patch
also fixes a recently introduced bug which will cause serdes parallel
detection not to work with 5780 class devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:42 -07:00
Matt Carlson 34195c3dce tg3: Fix IPv6 TSO code in tg3_start_xmit_dma_bug()
The tg3_start_xmit_dma_bug() function was missing code to process IPv6
TSO packets.  This patch adds the missing support.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:41 -07:00
Matt Carlson 20d7375c1f tg3: Fix single MSI-X vector coalescing
The interrupt coalescing setup code used the TG3_FLG2_USING_MSIX flag to
determine whether or not to configure the rx coalescing parameters.
This is incorrect for the single MSI-X vector case.  This patch changes
the code to look at the TG3_FLG3_ENABLE_RSS instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:41 -07:00
Matt Carlson 5efeeea1cf tg3: Revert RSS indir tbl setup change
This patch reverts commit 2601d8a004.  A
spectacular set of coincidences made it look as though the table was
setup incorrectly.  The original version was correct.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-11 17:07:40 -07:00
Eric Dumazet 7fe876af92 tg3: allow TSO on vlan devices
Similar to commit 72dccb01e8 (bnx2: Update vlan_features)

In order to enable TSO on vlan devices, tg3 needs to update
dev->vlan_features.

Tested on HP NC326m (aka BCM5715S (rev a3))

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-08 23:12:28 -07:00
Eric Dumazet 511d22247b tg3: 64 bit stats on all arches
Now core network is able to handle 64 bit netdevice stats on 32 bit
arches, we can provide them for tg3, since hardware maintains 64 bit
counters.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-08 23:12:28 -07:00
Matt Carlson 83038a2a70 tg3: Update version to 3.111
This patch updates the tg3 version to 3.111.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-06 17:56:03 -07:00
Matt Carlson 302b500b27 tg3: Add 5719 PCI device and phy IDs
This patch adds the 5719 PCI device and phy IDs.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-06 17:56:03 -07:00
Matt Carlson a50d0796b0 tg3: Add 5719 ASIC rev
This patch adds the 5719 ASIC revision.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-06 17:56:02 -07:00
Matt Carlson 9c7df91578 tg3: Use devfn to determine function number
The driver sometimes needs to know which function number the current
device is.  This patch changes the code to use devfn over internal
register values.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-06 17:56:01 -07:00
Matt Carlson 57d8b88030 tg3: 5717: Allow serdes link via parallel detect
The 5717 serdes phy brings link up via parallel detection without any
additional help from the driver.  This patch changes the
tg3_setup_fiber_mii_phy() function to detect and allow the use of this
feature.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-06 17:56:01 -07:00