* [patch 2.6.14-rc3 1/3] sundance: remove if (1) { ... } block in sundance_probe1
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
In-Reply-To: <10182005213101.12694@bilbo.tuxdriver.com>
Remove an if (1) { ... } block in sundance_probe1. Its purpose seems
to be only to allow for delaring some extra local variables. But, it also
adds ugly indentation without adding any meaning to the code.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/sundance.c | 48 +++++++++++++++++++++++-------------------------
1 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -518,6 +518,7 @@ static int __devinit sundance_probe1 (st
#else
int bar = 1;
#endif
+ int phy, phy_idx = 0;
/* when built into the kernel, we only print version if device is found */
@@ -605,33 +606,30 @@ static int __devinit sundance_probe1 (st
printk("%2.2x:", dev->dev_addr[i]);
printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
- if (1) {
- int phy, phy_idx = 0;
- np->phys[0] = 1; /* Default setting */
- np->mii_preamble_required++;
- for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
- int mii_status = mdio_read(dev, phy, MII_BMSR);
- if (mii_status != 0xffff && mii_status != 0x0000) {
- np->phys[phy_idx++] = phy;
- np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE);
- if ((mii_status & 0x0040) == 0)
- np->mii_preamble_required++;
- printk(KERN_INFO "%s: MII PHY found at address %d, status "
- "0x%4.4x advertising %4.4x.\n",
- dev->name, phy, mii_status, np->mii_if.advertising);
- }
- }
- np->mii_preamble_required--;
-
- if (phy_idx == 0) {
- printk(KERN_INFO "%s: No MII transceiver found, aborting. ASIC status %x\n",
- dev->name, ioread32(ioaddr + ASICCtrl));
- goto err_out_unregister;
- }
-
- np->mii_if.phy_id = np->phys[0];
+ np->phys[0] = 1; /* Default setting */
+ np->mii_preamble_required++;
+ for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
+ int mii_status = mdio_read(dev, phy, MII_BMSR);
+ if (mii_status != 0xffff && mii_status != 0x0000) {
+ np->phys[phy_idx++] = phy;
+ np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE);
+ if ((mii_status & 0x0040) == 0)
+ np->mii_preamble_required++;
+ printk(KERN_INFO "%s: MII PHY found at address %d, status "
+ "0x%4.4x advertising %4.4x.\n",
+ dev->name, phy, mii_status, np->mii_if.advertising);
+ }
+ }
+ np->mii_preamble_required--;
+
+ if (phy_idx == 0) {
+ printk(KERN_INFO "%s: No MII transceiver found, aborting. ASIC status %x\n",
+ dev->name, ioread32(ioaddr + ASICCtrl));
+ goto err_out_unregister;
}
+ np->mii_if.phy_id = np->phys[0];
+
/* Parse override configuration */
np->an_enable = 1;
if (card_idx < MAX_UNITS) {
^ permalink raw reply
* [patch 2.6.14-rc3 2/3] sundance: probe PHYs from MII address 0
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
In-Reply-To: <10182005213101.12750@bilbo.tuxdriver.com>
Probe for PHYs starting at MII address 0 instead of MII address 1.
This covers the entire range of MII addresses.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/sundance.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -608,7 +608,7 @@ static int __devinit sundance_probe1 (st
np->phys[0] = 1; /* Default setting */
np->mii_preamble_required++;
- for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
+ for (phy = 0; phy < 32 && phy_idx < MII_CNT; phy++) {
int mii_status = mdio_read(dev, phy, MII_BMSR);
if (mii_status != 0xffff && mii_status != 0x0000) {
np->phys[phy_idx++] = phy;
^ permalink raw reply
* [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
work_done is overwritten each time through the rx_action loop in
epic_poll. This screws-up the NAPI accounting if the loop is executed
more than once.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/epic100.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -1334,7 +1334,7 @@ static void epic_rx_err(struct net_devic
static int epic_poll(struct net_device *dev, int *budget)
{
struct epic_private *ep = dev->priv;
- int work_done, orig_budget;
+ int work_done = 0, orig_budget;
long ioaddr = dev->base_addr;
orig_budget = (*budget > dev->quota) ? dev->quota : *budget;
@@ -1343,7 +1343,7 @@ rx_action:
epic_tx(dev, ep);
- work_done = epic_rx(dev, *budget);
+ work_done += epic_rx(dev, *budget);
epic_rx_err(dev, ep);
^ permalink raw reply
* [patch 2.6.14-rc3 0/3] misc fixes/cleanups for sundance
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
Just a little cleanup from me, and some fixes snarfed from the
ICPlus (chip vendor) version of the driver.
-- Get rid of if (1) { ... } block in sundance_probe1
-- Change PHY probing to start from MII address 0
-- Expand the mask used when resetting the chip
Patches to follow...
^ permalink raw reply
* [patch 2.6.14-rc4] via-rhine: change mdelay to msleep and remove from ISR path
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik, rl
Get rid of the mdelay call in rhine_disable_linkmon. The function
is called from the via-rhine versions of mdio_read and mdio_write.
Those functions are indirectly called from rhine_check_media and
rhine_tx_timeout, both of which can be called in interrupt context.
So, create tx_timeout_task and check_media_task as instances of struct
work_struct inside of rhine_private. Then, change rhine_tx_timeout to
invoke schedule_work for tx_timeout_task (i.e. rhine_tx_timeout_task),
moving the work to process context. Also, change rhine_error (invoked
from rhine_interrupt) to invoke schedule_work for check_media_task
(i.e. rhine_check_media_task), which simply calls rhine_check media
in process context. Finally, add a call to flush_scheduled_work in
rhine_close to avoid any resource conflicts with pending work items.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/via-rhine.c | 34 +++++++++++++++++++++++++++++++---
1 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -490,6 +490,8 @@ struct rhine_private {
u8 tx_thresh, rx_thresh;
struct mii_if_info mii_if;
+ struct work_struct tx_timeout_task;
+ struct work_struct check_media_task;
void __iomem *base;
};
@@ -497,6 +499,8 @@ static int mdio_read(struct net_device
static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
static int rhine_open(struct net_device *dev);
static void rhine_tx_timeout(struct net_device *dev);
+static void rhine_tx_timeout_task(struct net_device *dev);
+static void rhine_check_media_task(struct net_device *dev);
static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
static void rhine_tx(struct net_device *dev);
@@ -850,6 +854,12 @@ static int __devinit rhine_init_one(stru
if (rp->quirks & rqRhineI)
dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
+ INIT_WORK(&rp->tx_timeout_task,
+ (void (*)(void *))rhine_tx_timeout_task, dev);
+
+ INIT_WORK(&rp->check_media_task,
+ (void (*)(void *))rhine_check_media_task, dev);
+
/* dev->name not defined before register_netdev()! */
rc = register_netdev(dev);
if (rc)
@@ -1076,6 +1086,11 @@ static void rhine_check_media(struct net
ioaddr + ChipCmd1);
}
+static void rhine_check_media_task(struct net_device *dev)
+{
+ rhine_check_media(dev, 0);
+}
+
static void init_registers(struct net_device *dev)
{
struct rhine_private *rp = netdev_priv(dev);
@@ -1129,8 +1144,8 @@ static void rhine_disable_linkmon(void _
if (quirks & rqRhineI) {
iowrite8(0x01, ioaddr + MIIRegAddr); // MII_BMSR
- /* Can be called from ISR. Evil. */
- mdelay(1);
+ /* Do not call from ISR! */
+ msleep(1);
/* 0x80 must be set immediately before turning it off */
iowrite8(0x80, ioaddr + MIICmd);
@@ -1220,6 +1235,16 @@ static int rhine_open(struct net_device
static void rhine_tx_timeout(struct net_device *dev)
{
struct rhine_private *rp = netdev_priv(dev);
+
+ /*
+ * Move bulk of work outside of interrupt context
+ */
+ schedule_work(&rp->tx_timeout_task);
+}
+
+static void rhine_tx_timeout_task(struct net_device *dev)
+{
+ struct rhine_private *rp = netdev_priv(dev);
void __iomem *ioaddr = rp->base;
printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status "
@@ -1625,7 +1650,7 @@ static void rhine_error(struct net_devic
spin_lock(&rp->lock);
if (intr_status & IntrLinkChange)
- rhine_check_media(dev, 0);
+ schedule_work(&rp->check_media_task);
if (intr_status & IntrStatsMax) {
rp->stats.rx_crc_errors += ioread16(ioaddr + RxCRCErrs);
rp->stats.rx_missed_errors += ioread16(ioaddr + RxMissed);
@@ -1872,6 +1897,9 @@ static int rhine_close(struct net_device
spin_unlock_irq(&rp->lock);
free_irq(rp->pdev->irq, dev);
+
+ flush_scheduled_work();
+
free_rbufs(dev);
free_tbufs(dev);
free_ring(dev);
^ permalink raw reply
* [patch 2.6.14-rc3 3/3] sundance: expand reset mask
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
In-Reply-To: <10182005213101.12810@bilbo.tuxdriver.com>
Expand the mask used when reseting the chip to include the GlobalReset
bit. This fix comes from ICPlus and seems to be required for some
cards.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/sundance.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -690,7 +690,7 @@ static int __devinit sundance_probe1 (st
/* Reset the chip to erase previous misconfiguration. */
if (netif_msg_hw(np))
printk("ASIC Control is %x.\n", ioread32(ioaddr + ASICCtrl));
- iowrite16(0x007f, ioaddr + ASICCtrl + 2);
+ iowrite16(0x00ff, ioaddr + ASICCtrl + 2);
if (netif_msg_hw(np))
printk("ASIC Control is now %x.\n", ioread32(ioaddr + ASICCtrl));
^ permalink raw reply
* [patch 2.6.14-rc4] e1000: Driver version, white space, comments, device id & other
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: jgarzik, john.ronciak, ganesh.venkatesan, mallikarjuna.chilakala
From: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Driver version, white space, comments, device id & other
Originally posted on 8/31 (and perhaps before)...I think it has not
been committed because the patch from that posting was damaged. I'm
reposting to make sure it gets in... :-)
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/e1000/e1000_main.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -43,7 +43,7 @@ char e1000_driver_string[] = "Intel(R) P
#else
#define DRIVERNAPI "-NAPI"
#endif
-#define DRV_VERSION "6.0.60-k2"DRIVERNAPI
+#define DRV_VERSION "6.1.16-k2"DRIVERNAPI
char e1000_driver_version[] = DRV_VERSION;
char e1000_copyright[] = "Copyright (c) 1999-2005 Intel Corporation.";
@@ -80,6 +80,9 @@ static struct pci_device_id e1000_pci_tb
INTEL_E1000_ETHERNET_DEVICE(0x1026),
INTEL_E1000_ETHERNET_DEVICE(0x1027),
INTEL_E1000_ETHERNET_DEVICE(0x1028),
+ INTEL_E1000_ETHERNET_DEVICE(0x105E),
+ INTEL_E1000_ETHERNET_DEVICE(0x105F),
+ INTEL_E1000_ETHERNET_DEVICE(0x1060),
INTEL_E1000_ETHERNET_DEVICE(0x1075),
INTEL_E1000_ETHERNET_DEVICE(0x1076),
INTEL_E1000_ETHERNET_DEVICE(0x1077),
@@ -88,10 +91,13 @@ static struct pci_device_id e1000_pci_tb
INTEL_E1000_ETHERNET_DEVICE(0x107A),
INTEL_E1000_ETHERNET_DEVICE(0x107B),
INTEL_E1000_ETHERNET_DEVICE(0x107C),
+ INTEL_E1000_ETHERNET_DEVICE(0x107D),
+ INTEL_E1000_ETHERNET_DEVICE(0x107E),
+ INTEL_E1000_ETHERNET_DEVICE(0x107F),
INTEL_E1000_ETHERNET_DEVICE(0x108A),
INTEL_E1000_ETHERNET_DEVICE(0x108B),
INTEL_E1000_ETHERNET_DEVICE(0x108C),
- INTEL_E1000_ETHERNET_DEVICE(0x1099),
+ INTEL_E1000_ETHERNET_DEVICE(0x109A),
/* required last entry */
{0,}
};
@@ -366,8 +372,7 @@ e1000_down(struct e1000_adapter *adapter
e1000_clean_tx_ring(adapter);
e1000_clean_rx_ring(adapter);
- /* If WoL is not enabled
- * and management mode is not IAMT
+ /* If WoL is not enabled and management mode is not IAMT
* Power down the PHY so no link is implied when interface is down */
if(!adapter->wol && adapter->hw.mac_type >= e1000_82540 &&
adapter->hw.media_type == e1000_media_type_copper &&
^ permalink raw reply
* Re: [patch 2.6.14-rc4 0/3] sk98lin: neuter and prepare for removal
From: Stephen Hemminger @ 2005-10-19 1:38 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, jgarzik, mlindner, rroesler
In-Reply-To: <10182005213059.12304@bilbo.tuxdriver.com>
John W. Linville wrote:
>These patches take steps towards removing sk98lin from the upstream
>kernel.
>
> -- Remove sk98lin's MODULE_DEVICE_TABLE to avoid
> confusing userland tools about which driver to load;
>
> -- Mark sk98lin as Obsolete in the MAINTAINERS file; and,
>
> -- Add sk98lin to the feature-removal-schedule.txt file in the
> Documentation directory.
>
>I accept the possibility that I may be jumping the gun on this.
>However, I think it is worth opening this discussion.
>
>Patches to follow...
>
>
I applaud the initiative, but this it is too premature to obsolete the
existing driver. There may be lots of chip versions and other variables
that make
the existing driver a better choice. Maybe eepro100 is a better target
for removal right now.
^ permalink raw reply
* Re: [patch 2.6.14-rc4 0/3] sk98lin: neuter and prepare for removal
From: John W. Linville @ 2005-10-19 1:41 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: linux-kernel, netdev, jgarzik, mlindner, rroesler
In-Reply-To: <4355A390.9090309@osdl.org>
On Tue, Oct 18, 2005 at 06:38:24PM -0700, Stephen Hemminger wrote:
> John W. Linville wrote:
>
> >These patches take steps towards removing sk98lin from the upstream
> >kernel.
> >
> > -- Remove sk98lin's MODULE_DEVICE_TABLE to avoid
> > confusing userland tools about which driver to load;
> I applaud the initiative, but this it is too premature to obsolete the
> existing driver. There may be lots of chip versions and other variables
> that make
> the existing driver a better choice. Maybe eepro100 is a better target
> for removal right now.
That's cool...but I still think the first one (removing the
MODULE_DEVICE_TABLE) is worthwhile. At least that gets more testers
for skge.
What do you think?
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply
* Re: [patch 2.6.14-rc4] e1000: Driver version, white space, comments, device id & other
From: Jeff Garzik @ 2005-10-19 2:24 UTC (permalink / raw)
To: John W. Linville
Cc: linux-kernel, netdev, john.ronciak, ganesh.venkatesan,
mallikarjuna.chilakala
In-Reply-To: <10182005213103.13099@bilbo.tuxdriver.com>
John W. Linville wrote:
> From: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
>
> Driver version, white space, comments, device id & other
>
> Originally posted on 8/31 (and perhaps before)...I think it has not
> been committed because the patch from that posting was damaged. I'm
> reposting to make sure it gets in... :-)
>
> Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
> Signed-off-by: John Ronciak <john.ronciak@intel.com>
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
patch is ok, but doesn't apply to 'upstream' branch of netdev-2.6.git,
which has several e1000 patches in it.
Jeff
^ permalink raw reply
* Re: [patch 2.6.14-rc4] via-rhine: change mdelay to msleep and remove from ISR path
From: Jeff Garzik @ 2005-10-19 2:26 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, rl
In-Reply-To: <10182005213102.12948@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll
From: Jeff Garzik @ 2005-10-19 2:26 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev
In-Reply-To: <10182005213101.12633@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc3] 8139too: fix resume for Realtek 8100B/8139D
From: Jeff Garzik @ 2005-10-19 2:26 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev
In-Reply-To: <10182005213100.12557@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc4] bonding: fix typos in bonding documentation
From: Jeff Garzik @ 2005-10-19 2:26 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, ctindel, fubar, bonding-devel
In-Reply-To: <10182005213059.12167@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc4] b44: alternate allocation option for DMA descriptors
From: Jeff Garzik @ 2005-10-19 2:27 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, pp
In-Reply-To: <10182005213059.12243@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding
From: Jeff Garzik @ 2005-10-19 2:27 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, proski, hermes, orinoco-devel
In-Reply-To: <10182005213058.12015@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc4] bonding: cleanup comment for mode 1 IGMP xmit hack
From: Jeff Garzik @ 2005-10-19 2:27 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, ctindel, fubar, bonding-devel
In-Reply-To: <10182005213058.12091@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc4 0/3] sk98lin: neuter and prepare for removal
From: Jeff Garzik @ 2005-10-19 2:28 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev, shemminger, mlindner, rroesler
In-Reply-To: <10182005213059.12304@bilbo.tuxdriver.com>
John W. Linville wrote:
> These patches take steps towards removing sk98lin from the upstream
> kernel.
>
> -- Remove sk98lin's MODULE_DEVICE_TABLE to avoid
> confusing userland tools about which driver to load;
>
> -- Mark sk98lin as Obsolete in the MAINTAINERS file; and,
>
> -- Add sk98lin to the feature-removal-schedule.txt file in the
> Documentation directory.
>
> I accept the possibility that I may be jumping the gun on this.
> However, I think it is worth opening this discussion.
I'll let Stephen make the call on this one (as he did...).
Jeff
^ permalink raw reply
* Re: [patch 2.6.14-rc3 1/3] sundance: remove if (1) { ... } block in sundance_probe1
From: Jeff Garzik @ 2005-10-19 2:29 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev
In-Reply-To: <10182005213101.12750@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc3 3/3] sundance: expand reset mask
From: Jeff Garzik @ 2005-10-19 2:29 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev
In-Reply-To: <10182005213102.12871@bilbo.tuxdriver.com>
applied
^ permalink raw reply
* Re: [patch 2.6.14-rc3 2/3] sundance: probe PHYs from MII address 0
From: Jeff Garzik @ 2005-10-19 2:31 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev
In-Reply-To: <10182005213101.12810@bilbo.tuxdriver.com>
John W. Linville wrote:
> Probe for PHYs starting at MII address 0 instead of MII address 1.
> This covers the entire range of MII addresses.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
>
> drivers/net/sundance.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
> --- a/drivers/net/sundance.c
> +++ b/drivers/net/sundance.c
> @@ -608,7 +608,7 @@ static int __devinit sundance_probe1 (st
>
> np->phys[0] = 1; /* Default setting */
> np->mii_preamble_required++;
> - for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
> + for (phy = 0; phy < 32 && phy_idx < MII_CNT; phy++) {
NAK. MII address 0 should be scanned _last_, after all other addresses.
In some phys, it is a ghost, mirroring another address.
Take a look at some of the original Becker MII scan code from
ftp://ftp.scyld.com/pub/network/ to see an elegant method for this.
Becker's scan code would utilize a mask to keep the loop nice and
elegant, eliminating an "if (phy == 32) phy = 0;" test.
Jeff
^ permalink raw reply
* group Global trusts pharmaceutical. exalt
From: travis schoborg @ 2005-10-19 3:28 UTC (permalink / raw)
To: Carson Serrett
Cc: owner-linux-xfs, tucker, netdev, lockmeter, murray, ljp, arnold,
dev
Hard to locate meddiccine, get them all at this site.
Allay your pressure by consuming our finest tablet.
Fully Tracked Parcel will arrive to you normally in 46hrs.
Therapy your discomfort at much affordable expenditure.
FOC check up details with our qualified physician.
3 words for you! You are amazing. Daisy G --Florida.
http://uk.geocities.com/abilitystrutb/?hfobh
He is gradually emerging from Tom-all-Alone's in the morning light,
thinking about it, when he hears running feet behind him, and looking round,
sees the boy scouring towards him at great speed, followed by the woman.
"Stop him, stop him." cries the woman, almost breath less. "Stop him, sir."
felhevizi erutsop fbmtab sz03 fixraw fkq
"I can't help it, Charley."
^ permalink raw reply
* Re: [patch 2.6.14-rc3 2/3] sundance: probe PHYs from MII address 0
From: John W. Linville @ 2005-10-19 12:00 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel, netdev
In-Reply-To: <4355B017.4040509@pobox.com>
On Tue, Oct 18, 2005 at 10:31:51PM -0400, Jeff Garzik wrote:
> John W. Linville wrote:
> >--- a/drivers/net/sundance.c
> >+++ b/drivers/net/sundance.c
> >@@ -608,7 +608,7 @@ static int __devinit sundance_probe1 (st
> >
> > np->phys[0] = 1; /* Default setting */
> > np->mii_preamble_required++;
> >- for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
> >+ for (phy = 0; phy < 32 && phy_idx < MII_CNT; phy++) {
>
> NAK. MII address 0 should be scanned _last_, after all other addresses.
> In some phys, it is a ghost, mirroring another address.
>
> Take a look at some of the original Becker MII scan code from
> ftp://ftp.scyld.com/pub/network/ to see an elegant method for this.
Hmmm...that is clever...patch to follow...
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply
* [patch 2.6.14-rc3] sundance: include MII address 0 in PHY probe
From: John W. Linville @ 2005-10-19 12:07 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
In-Reply-To: <20051019120022.GA15438@tuxdriver.com>
Include MII address 0 at the end of the PHY scan. This covers the
entire range of possible MII addresses.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/sundance.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -608,16 +608,17 @@ static int __devinit sundance_probe1 (st
np->phys[0] = 1; /* Default setting */
np->mii_preamble_required++;
- for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
+ for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) {
int mii_status = mdio_read(dev, phy, MII_BMSR);
+ int phyx = phy & 0x1f;
if (mii_status != 0xffff && mii_status != 0x0000) {
- np->phys[phy_idx++] = phy;
- np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE);
+ np->phys[phy_idx++] = phyx;
+ np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE);
if ((mii_status & 0x0040) == 0)
np->mii_preamble_required++;
printk(KERN_INFO "%s: MII PHY found at address %d, status "
"0x%4.4x advertising %4.4x.\n",
- dev->name, phy, mii_status, np->mii_if.advertising);
+ dev->name, phyx, mii_status, np->mii_if.advertising);
}
}
np->mii_preamble_required--;
^ permalink raw reply
* Re: [patch 2.6.14-rc4] e1000: Driver version, white space, comments, device id & other
From: John W. Linville @ 2005-10-19 14:31 UTC (permalink / raw)
To: Jeff Garzik
Cc: linux-kernel, netdev, john.ronciak, ganesh.venkatesan,
mallikarjuna.chilakala
In-Reply-To: <4355AE62.7080605@pobox.com>
On Tue, Oct 18, 2005 at 10:24:34PM -0400, Jeff Garzik wrote:
> John W. Linville wrote:
> >From: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
> >
> >Driver version, white space, comments, device id & other
> patch is ok, but doesn't apply to 'upstream' branch of netdev-2.6.git,
> which has several e1000 patches in it.
I see...looks like some fuzz...I'll rediff and repost...
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox