* Re: [PATCH 3/5] new pcmcia IDs for hostap - D-Link DCF-660W
From: Marcin Juszkiewicz @ 2006-05-12 17:06 UTC (permalink / raw)
To: netdev; +Cc: Jouni Malinen, Pavel Roskin
In-Reply-To: <200605121545.19635.linux-arm@hrw.one.pl>
Updated to not touch orinoco_cs driver.
-----------------------------------------------------------------------
I use D-Link DCF-660W card with WPA protected network. By default
orinoco_cs was loaded for my card so I was not able to connect. This patch
make my card working with hostap_cs (like it was when I used pcmcia-cs).
Card was used with hostap_cs during last year in two Zaurus models (2.4.18
on one and 2.6.11 - 2.6.16 on another).
I do not know does removing card from orinoco_cs is correct way.
Platform: Sharp Zaurus C760 running 2.6.16 and pcmciautils 013.
root@c7x0:~# pccardctl ident
Socket 0:
product info: "D-Link", "DCF-660W", "", ""
manfid: 0xd601, 0x0005
function: 6 (network)
root@c7x0:~# iwconfig wlan0
wlan0 IEEE 802.11b ESSID:"test"
Mode:Master Frequency:2.422 GHz Access Point: 00:80:C8:2C:09:3F
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Index: linux/drivers/net/wireless/hostap/hostap_cs.c
===================================================================
--- linux.orig/drivers/net/wireless/hostap/hostap_cs.c 2006-05-12 15:36:08.000000000 +0200
+++ linux/drivers/net/wireless/hostap/hostap_cs.c 2006-05-12 15:43:36.000000000 +0200
@@ -974,6 +974,8 @@
0x273fe3db, 0x32a1eaee),
PCMCIA_DEVICE_PROD_ID12("Linksys", "Wireless CompactFlash Card",
0x0733cc81, 0x0c52f395),
+ PCMCIA_DEVICE_PROD_ID12("D-Link", "DCF-660W",
+ 0x1a424a1c, 0xe78b6dcc),
PCMCIA_DEVICE_NULL
};
MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
--
JID: hrw-jabber.org
Palmtop: Sharp Zaurus C760
OpenEmbedded/OpenZaurus developer
Woda, której dotykasz w rzekach, jest ostatkiem tej, która przeszła
i początkiem tej, która przyjdzie: tak samo teraźniejszość.
-- Leonardo da Vinci
^ permalink raw reply
* Re: [PATCH 4/6] myri10ge - First half of the driver
From: David S. Miller @ 2006-05-12 17:40 UTC (permalink / raw)
To: johnpol; +Cc: brice, romieu, netdev, linux-kernel, gallatin
In-Reply-To: <20060512064710.GA27065@2ka.mipt.ru>
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Date: Fri, 12 May 2006 10:47:11 +0400
> On Fri, May 12, 2006 at 01:53:44AM +0200, Brice Goglin (brice@myri.com) wrote:
> > > Imho you will want to work directly with pages shortly.
> > >
> >
> > We had thought about doing this, but were a little nervous since we did
> > not know of any other drivers that worked directly with pages. If this
> > is an official direction to work directly with pages, we will.
>
> s2io does. e1000 does it with skb frags.
> If your hardware allows header split and driver can put headers into
> skb->data and real data into frag_list, that allows to create various
> interesting things like receiving zero-copy support and netchannels
> support. It is work in progress, not official direction currently,
> but this definitely will help your driver to support future high
> performance extensions.
The most important impact is not having to use order 1 pages
for jumbo MTU frames, which are more likely to fail allocations
thant order 0 pages under heavy load.
^ permalink raw reply
* Re: [PATCH] ethtool always report port is TP on tg3
From: Karsten Keil @ 2006-05-12 17:46 UTC (permalink / raw)
To: David S. Miller; +Cc: Michael Chan, netdev, Andrew Morton
In-Reply-To: <1147445994.4780.55.camel@rh4>
On Fri, May 12, 2006 at 07:59:54AM -0700, Michael Chan wrote:
>
> ACK. Thanks. Please add sign-off line and send to DaveM.
This time with Signed-off line.
Even with fiber cards ethtool reports that the connected port is TP,
the patch fix this.
Signed-off-by: Karsten Keil <kkeil@suse.de>
---
drivers/net/tg3.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
5ed8e79c778ee803e44a325a1e15c0cb3f52d0ff
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index beeb612..0b5bc93 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7653,21 +7653,23 @@ static int tg3_get_settings(struct net_d
cmd->supported |= (SUPPORTED_1000baseT_Half |
SUPPORTED_1000baseT_Full);
- if (!(tp->tg3_flags2 & TG3_FLG2_ANY_SERDES))
+ if (!(tp->tg3_flags2 & TG3_FLG2_ANY_SERDES)) {
cmd->supported |= (SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full |
SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_MII);
- else
+ cmd->port = PORT_TP;
+ } else {
cmd->supported |= SUPPORTED_FIBRE;
+ cmd->port = PORT_FIBRE;
+ }
cmd->advertising = tp->link_config.advertising;
if (netif_running(dev)) {
cmd->speed = tp->link_config.active_speed;
cmd->duplex = tp->link_config.active_duplex;
}
- cmd->port = 0;
cmd->phy_address = PHY_ADDR;
cmd->transceiver = 0;
cmd->autoneg = tp->link_config.autoneg;
--
Karsten Keil
SuSE Labs
ISDN development
^ permalink raw reply related
* Re: [PATCH] ethtool always report port is TP on tg3
From: David S. Miller @ 2006-05-12 19:49 UTC (permalink / raw)
To: kkeil; +Cc: mchan, netdev, akpm
In-Reply-To: <20060512174623.GA28353@pingi.kke.suse.de>
From: Karsten Keil <kkeil@suse.de>
Date: Fri, 12 May 2006 19:46:23 +0200
> Even with fiber cards ethtool reports that the connected port is TP,
> the patch fix this.
>
> Signed-off-by: Karsten Keil <kkeil@suse.de>
Applied, thanks a lot Karsten.
^ permalink raw reply
* Re: [PATCH] expose simplified skb_checksum_recalc
From: David S. Miller @ 2006-05-12 19:52 UTC (permalink / raw)
To: shemminger; +Cc: netdev, ioe-lkml, netdev
In-Reply-To: <20060511112843.6532bddd@localhost.localdomain>
From: Stephen Hemminger <shemminger@osdl.org>
Date: Thu, 11 May 2006 11:28:43 -0700
> Many users of skb_checksum_help() are just using it to recalculate
> outbound checksum, so why not expose the interface in a more useful
> way. Suggested by Ingo Oeser.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Since you will be adding the first users of skb_checksum_recalc(),
feel free to push this change in via your net driver tree whenever
you feel it is appropriate Stephen.
Thanks.
^ permalink raw reply
* Re: [PATCH] Documentation: add missing operstates.txt
From: Randy.Dunlap @ 2006-05-12 19:57 UTC (permalink / raw)
To: Stefan Rompf; +Cc: netdev
In-Reply-To: <200605071218.59537.stefan@loplof.de>
On Sun, 7 May 2006 12:18:59 +0200 Stefan Rompf wrote:
> Hi,
>
> seems documentation got lost when the RFC2863-patch was applied. Having
> documentation is good, so I resend it ;-)
I have a few comments/questions about this.
> --- /dev/null 2005-03-19 20:36:14.000000000 +0100
> +++ linux-2.6.17-rc3/Documentation/networking/operstates.txt 2006-04-27 22:15:23.000000000 +0200
> @@ -0,0 +1,161 @@
> +
> +1. Introduction
> +
> +Linux distinguishes between administrative and operational state of an
> +interface. Admininstrative state is the result of "ip link set dev
> +<dev> up or down" and reflects whether the administrator wants to use
> +the device for traffic.
> +
> +However, an interface is not usable just because the admin enabled it
Put hyphen/dash at end of previous line, not on next line.
> +- ethernet requires to be plugged into the switch and, depending on
2 small items here, one grammar and the other is that 'switch'
isn't always the link partner device. so maybe:
ethernet requires a physical link partner and, depending on
> +a site's networking policy and configuration, an 802.1X authentication
> +to be performed before user data can be transferred. Operational state
> +shows the ability of an interface to transmit this user data.
> +
> +Thanks to 802.1X, userspace must be granted the possibility to
> +influence operational state. To accommodate this, operational state is
> +split into two parts: Two flags that can be set by the driver only, and
> +a RFC2863 compatible state that is derived from these flags, a policy,
> +and changeable from userspace under certain rules.
> +
> +
> +2. Querying from userspace
> +
> +Both admin and operational state can be queried via the netlink
> +operation RTM_GETLINK. It is also possible to subscribe to RTMGRP_LINK
> +to be notified of updates. This is important for setting from userspace.
> +
> +These values contain interface state:
> +
> +ifinfomsg::if_flags & IFF_UP:
> + Interface is admin up
> +ifinfomsg::if_flags & IFF_RUNNING:
> + Interface is in RFC2863 operational state UP or UNKNOWN. This is for
> + backward compatibility, routing daemons, dhcp clients can use this
> + flag to determine whether they should use the interface.
> +ifinfomsg::if_flags & IFF_LOWER_UP:
> + Driver has signaled netif_carrier_on()
> +ifinfomsg::if_flags & IFF_DORMANT:
> + Driver has signaled netif_dormant_on()
Could above list have more spacing added for readability?
> +These interface flags can also be queried without netlink using the
> +SIOCGIFFLAGS ioctl.
> +
> +TLV IFLA_OPERSTATE
> +
> +contains RFC2863 state of the interface in numeric representation:
> +
> +IF_OPER_UNKNOWN (0):
> + Interface is in unknown state, neither driver nor userspace has set
> + operational state. Interface must be considered for user data as
> + setting operational state has not been implemented in every driver.
> +IF_OPER_NOTPRESENT (1):
> + Unused in current kernel (notpresent interfaces normally disappear),
> + just a numerical placeholder.
> +IF_OPER_DOWN (2):
> + Interface is unable to transfer data on L1, f.e. ethernet is not
> + plugged or interface is ADMIN down.
maybe:
ethernet is not plugged in
or
ethernet is not connected
or
ethernet is not physically connected
Also, is "f.e." well known to mean "for example"?
I think that I see "e.g." more often than "f.e." and I prefer
"e.g.".
> +IF_OPER_LOWERLAYERDOWN (3):
> + Interfaces stacked on an interface that is IF_OPER_DOWN show this
> + state (f.e. VLAN).
> +IF_OPER_TESTING (4):
> + Unused in current kernel.
> +IF_OPER_DORMANT (5):
> + Interface is L1 up, but waiting for an external event, f.e. for a
> + protocol to establish. (802.1X)
> +IF_OPER_UP (6):
> + Interface is operational up and can be used.
> +
> +This TLV can also be queried via sysfs.
What is "TLV"?
> +TLV IFLA_LINKMODE
> +
> +contains link policy. This is needed for userspace interaction
> +described below.
> +
> +This TLV can also be queried via sysfs.
> +
> +
> +3. Kernel driver API
> +
> +Kernel drivers have access to two flags that map to IFF_LOWER_UP and
> +IFF_DORMANT. These flags can be set from everywhere, even from
> +interrupts. It is guaranteed that only the driver has write access,
> +however, if different layers of the driver manipulate the same flag,
> +the driver has to provide the synchronisation needed.
> +
> +__LINK_STATE_NOCARRIER, maps to !IFF_LOWER_UP:
> +
> +The driver uses netif_carrier_on() to clear and netif_carrier_off() to
> +set this flag. On netif_carrier_off(), the scheduler stops sending
> +packets. The name 'carrier' and the inversion are historical, think of
> +it as lower layer.
> +
> +netif_carrier_ok() can be used to query that bit.
> +
> +__LINK_STATE_DORMANT, maps to IFF_DORMANT:
> +
> +Set by the driver to express that the device cannot yet be used
> +because some driver controlled protocol establishment has to
> +complete. Corresponding functions are netif_dormant_on() to set the
> +flag, netif_dormant_off() to clear it and netif_dormant() to query.
> +
> +On device allocation, networking core sets the flags equivalent to
> +netif_carrier_ok() and !netif_dormant().
> +
> +
> +Whenever the driver CHANGES one of these flags, a workqueue event is
> +scheduled to translate the flag combination to IFLA_OPERSTATE as
> +follows:
> +
> +!netif_carrier_ok():
> + IF_OPER_LOWERLAYERDOWN if the interface is stacked, IF_OPER_DOWN
> + otherwise. Kernel can recognise stacked interfaces because their
> + ifindex != iflink.
> +
> +netif_carrier_ok() && netif_dormant():
> + IF_OPER_DORMANT
> +
> +netif_carrier_ok() && !netif_dormant():
> + IF_OPER_UP if userspace interaction is disabled. Otherwise
> + IF_OPER_DORMANT with the possibility for userspace to initiate the
> + IF_OPER_UP transition afterwards.
> +
> +
> +4. Setting from userspace
> +
> +Applications have to use the netlink interface to influence the
> +RFC2863 operational state of an interface. Setting IFLA_LINKMODE to 1
> +via RTM_SETLINK instructs the kernel that an interface should go to
> +IF_OPER_DORMANT instead of IF_OPER_UP when the combination
> +netif_carrier_ok() && !netif_dormant() is set by the
> +driver. Afterwards, the userspace application can set IFLA_OPERSTATE
> +to IF_OPER_DORMANT or IF_OPER_UP as long as the driver does not set
> +netif_carrier_off() or netif_dormant_on(). Changes made by userspace
> +are multicasted on the netlink group RTMGRP_LINK.
> +
> +So basically a 802.1X supplicant interacts with the kernel like this:
> +
> +-subscribe to RTMGRP_LINK
> +-set IFLA_LINKMODE to 1 via RTM_SETLINK
> +-query RTM_GETLINK once to get initial state
> +-if initial flags are not (IFF_LOWER_UP && !IFF_DORMANT), wait until
> + netlink multicast signals this state
> +-do 802.1X, eventually abort if flags go down again
> +-send RTM_SETLINK to set operstate to IF_OPER_UP if authentication
> + succeeds, IF_OPER_DORMANT otherwise
> +-see how operstate and IFF_RUNNING is echoed via netlink multicast
> +-set interface back to IF_OPER_DORMANT if 802.1X reauthentication
> + fails
> +-restart if kernel changes IFF_LOWER_UP or IFF_DORMANT flag
> +
> +if supplicant goes down, bring back IFLA_LINKMODE to 0 and
> +IFLA_OPERSTATE to a sane value.
> +
> +A routing daemon or dhcp client just needs to care for IFF_RUNNING or
> +waiting for operstate to go IF_OPER_UP/IF_OPER_UNKNOWN before
> +considering the interface / querying a DHCP address.
> +
> +
> +For technical questions and/or comments please e-mail to Stefan Rompf
> +(stefan at loplof.de).
Overall that's a really nice & helpful doc. Thanks for doing that.
---
~Randy
^ permalink raw reply
* OOPS in forcedeth
From: Carlos Martín @ 2006-05-12 19:58 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
Hi,
I just saw this last night when my desktop was shutting down. Not all
the OOPS was outputted, but I've found where it happens.
in forcedeth.c:1583 we see:
pci_unmap_single(np->pci_dev, np->rx_dma[i],
np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,
PCI_DMA_FROMDEVICE);
The assembler output is:
movslq %r12d,%rcx # i, i
xorl %edi, %edi # tmp226
movq 320(%rbp,%rcx,8), %rax # <variable>.rx_skbuff, D.20431
movq 1344(%rbp,%rcx,8), %rsi # <variable>.rx_dma, addr
OOPS--->movq 216(%rax), %rdx # <variable>.end, <variable>.end
subq 200(%rax), %rdx # <variable>.data, <variable>.end
movq 256(%rbp), %rax # <variable>.pci_dev, hwdev
testq %rax, %rax # hwdev
leaq 112(%rax), %rcx #, tmp225
movq dma_ops(%rip), %rax # dma_ops, dma_ops
cmovne %rcx, %rdi # tmp225,, tmp226
movl $2, %ecx #,
call *40(%rax) # <variable>.unmap_single
Which I think comes from dereferencing np->rx_skbuff[i]. I've not found
a reproducible way of doing this, and I've at times come back to my
room to find out that this computer has been forcibly shut down.
I'm not familiar with this code. I hope someone here understands how
this can happen. I'll try to find a way to reproduce this meanwhile.
cmn
--
Carlos Martín Nieto | http://www.cmartin.tk
Hobbyist programmer |
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH 1/5] new pcmcia IDs for hostap - ASUS WL-110
From: Pavel Roskin @ 2006-05-12 20:17 UTC (permalink / raw)
To: jt; +Cc: Marcin Juszkiewicz, netdev
In-Reply-To: <20060512165706.GA4079@bougret.hpl.hp.com>
On Fri, 2006-05-12 at 09:57 -0700, Jean Tourrilhes wrote:
> Marcin Juszkiewicz wrote :
> >
> > This time I checked more carefully my changeset and split it into
> > smaller parts. Few of my patches was tested by OpenZaurus users, some
> > are waiting for testing.
>
> I'm sorry, but I will have again to veto part of your patch.
> You are removing IDs from the Orinoco driver. Please don't do
> that, those card work perfectly with the orinoco driver, and some of
> us run them with the orinoco driver (orinoco is one third the
> footprint of hostap).
Once again, I really appreciate your vigilance, Jean :-)
I strongly believe that every driver should list all devices it can
support. In case of multiple drivers supporting one device, the choice
should be done in userspace.
--
Regards,
Pavel Roskin
^ permalink raw reply
* [PATCH] [RFC] net: au1000_eth: PHY framework conversion
From: Herbert Valerio Riedel @ 2006-05-12 20:23 UTC (permalink / raw)
To: netdev; +Cc: linux-mips, ralf, ppopov, sshtylyov, afleming
convert au1000_eth driver to use PHY framework
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
---
drivers/net/Kconfig | 1
drivers/net/au1000_eth.c | 1602 +++++++++++-----------------------------------
drivers/net/au1000_eth.h | 134 ----
3 files changed, 380 insertions(+), 1357 deletions(-)
Index: b/drivers/net/Kconfig
===================================================================
--- a/drivers/net/Kconfig 2006-05-12 21:18:36.000000000 +0200
+++ b/drivers/net/Kconfig 2006-05-12 21:37:42.000000000 +0200
@@ -455,6 +455,7 @@
config MIPS_AU1X00_ENET
bool "MIPS AU1000 Ethernet support"
depends on NET_ETHERNET && SOC_AU1X00
+ select PHYLIB
select CRC32
help
If you have an Alchemy Semi AU1X00 based system
Index: b/drivers/net/au1000_eth.c
===================================================================
--- a/drivers/net/au1000_eth.c 2006-05-12 21:18:36.000000000 +0200
+++ b/drivers/net/au1000_eth.c 2006-05-12 22:05:25.000000000 +0200
@@ -9,6 +9,9 @@
* Update: 2004 Bjoern Riemer, riemer@fokus.fraunhofer.de
* or riemer@riemer-nt.de: fixed the link beat detection with
* ioctls (SIOCGMIIPHY)
+ * Copyright 2006 Herbert Valerio Riedel <hvr@gnu.org>
+ * converted to use linux-2.6.x's PHY framework
+ *
* Author: MontaVista Software, Inc.
* ppopov@mvista.com or source@mvista.com
*
@@ -53,6 +56,7 @@
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/crc32.h>
+#include <linux/phy.h>
#include <asm/mipsregs.h>
#include <asm/irq.h>
#include <asm/io.h>
@@ -88,17 +92,15 @@
static int au1000_rx(struct net_device *);
static irqreturn_t au1000_interrupt(int, void *, struct pt_regs *);
static void au1000_tx_timeout(struct net_device *);
-static int au1000_set_config(struct net_device *dev, struct ifmap *map);
static void set_rx_mode(struct net_device *);
static struct net_device_stats *au1000_get_stats(struct net_device *);
-static void au1000_timer(unsigned long);
static int au1000_ioctl(struct net_device *, struct ifreq *, int);
static int mdio_read(struct net_device *, int, int);
static void mdio_write(struct net_device *, int, int, u16);
-static void dump_mii(struct net_device *dev, int phy_id);
+static void au1000_adjust_link(struct net_device *);
+static void enable_mac(struct net_device *, int);
// externs
-extern void ack_rise_edge_irq(unsigned int);
extern int get_ethernet_addr(char *ethernet_addr);
extern void str2eaddr(unsigned char *ea, unsigned char *str);
extern char * __init prom_getcmdline(void);
@@ -126,705 +128,83 @@
0x00, 0x50, 0xc2, 0x0c, 0x30, 0x00
};
-#define nibswap(x) ((((x) >> 4) & 0x0f) | (((x) << 4) & 0xf0))
-#define RUN_AT(x) (jiffies + (x))
-
-// For reading/writing 32-bit words from/to DMA memory
-#define cpu_to_dma32 cpu_to_be32
-#define dma32_to_cpu be32_to_cpu
-
struct au1000_private *au_macs[NUM_ETH_INTERFACES];
-/* FIXME
- * All of the PHY code really should be detached from the MAC
- * code.
+/*
+ * board-specific configurations
+ *
+ * PHY detection algorithm
+ *
+ * If AU1XXX_PHY_STATIC_CONFIG is undefined, the PHY setup is
+ * autodetected:
+ *
+ * mii_probe() first searches the current MAC's MII bus for a PHY,
+ * selecting the first (or last, if AU1XXX_PHY_SEARCH_HIGHEST_ADDR is
+ * defined) PHY address not already claimed by another netdev.
+ *
+ * If nothing was found that way when searching for the 2nd ethernet
+ * controller's PHY and AU1XXX_PHY1_SEARCH_ON_MAC0 is defined, then
+ * the first MII bus is searched as well for an unclaimed PHY; this is
+ * needed in case of a dual-PHY accessible only through the MAC0's MII
+ * bus.
+ *
+ * Finally, if no PHY is found, then the corresponding ethernet
+ * controller is not registered to the network subsystem.
*/
-/* Default advertise */
-#define GENMII_DEFAULT_ADVERTISE \
- ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | \
- ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \
- ADVERTISED_Autoneg
-
-#define GENMII_DEFAULT_FEATURES \
- SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \
- SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \
- SUPPORTED_Autoneg
-
-int bcm_5201_init(struct net_device *dev, int phy_addr)
-{
- s16 data;
-
- /* Stop auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO);
-
- /* Set advertisement to 10/100 and Half/Full duplex
- * (full capabilities) */
- data = mdio_read(dev, phy_addr, MII_ANADV);
- data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T;
- mdio_write(dev, phy_addr, MII_ANADV, data);
-
- /* Restart auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO;
- mdio_write(dev, phy_addr, MII_CONTROL, data);
-
- if (au1000_debug > 4)
- dump_mii(dev, phy_addr);
- return 0;
-}
-
-int bcm_5201_reset(struct net_device *dev, int phy_addr)
-{
- s16 mii_control, timeout;
-
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET);
- mdelay(1);
- for (timeout = 100; timeout > 0; --timeout) {
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- if ((mii_control & MII_CNTL_RESET) == 0)
- break;
- mdelay(1);
- }
- if (mii_control & MII_CNTL_RESET) {
- printk(KERN_ERR "%s PHY reset timeout !\n", dev->name);
- return -1;
- }
- return 0;
-}
-
-int
-bcm_5201_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- u16 mii_data;
- struct au1000_private *aup;
-
- if (!dev) {
- printk(KERN_ERR "bcm_5201_status error: NULL dev\n");
- return -1;
- }
- aup = (struct au1000_private *) dev->priv;
-
- mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS);
- if (mii_data & MII_STAT_LINK) {
- *link = 1;
- mii_data = mdio_read(dev, aup->phy_addr, MII_AUX_CNTRL);
- if (mii_data & MII_AUX_100) {
- if (mii_data & MII_AUX_FDX) {
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- }
- else {
- *speed = IF_PORT_100BASETX;
- dev->if_port = IF_PORT_100BASETX;
- }
- }
- else {
- *speed = IF_PORT_10BASET;
- dev->if_port = IF_PORT_10BASET;
- }
-
- }
- else {
- *link = 0;
- *speed = 0;
- dev->if_port = IF_PORT_UNKNOWN;
- }
- return 0;
-}
-
-int lsi_80227_init(struct net_device *dev, int phy_addr)
-{
- if (au1000_debug > 4)
- printk("lsi_80227_init\n");
-
- /* restart auto-negotiation */
- mdio_write(dev, phy_addr, MII_CONTROL,
- MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO); // | MII_CNTL_FDX);
- mdelay(1);
-
- /* set up LEDs to correct display */
-#ifdef CONFIG_MIPS_MTX1
- mdio_write(dev, phy_addr, 17, 0xff80);
-#else
- mdio_write(dev, phy_addr, 17, 0xffc0);
-#endif
-
- if (au1000_debug > 4)
- dump_mii(dev, phy_addr);
- return 0;
-}
-
-int lsi_80227_reset(struct net_device *dev, int phy_addr)
-{
- s16 mii_control, timeout;
-
- if (au1000_debug > 4) {
- printk("lsi_80227_reset\n");
- dump_mii(dev, phy_addr);
- }
-
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET);
- mdelay(1);
- for (timeout = 100; timeout > 0; --timeout) {
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- if ((mii_control & MII_CNTL_RESET) == 0)
- break;
- mdelay(1);
- }
- if (mii_control & MII_CNTL_RESET) {
- printk(KERN_ERR "%s PHY reset timeout !\n", dev->name);
- return -1;
- }
- return 0;
-}
-
-int
-lsi_80227_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- u16 mii_data;
- struct au1000_private *aup;
-
- if (!dev) {
- printk(KERN_ERR "lsi_80227_status error: NULL dev\n");
- return -1;
- }
- aup = (struct au1000_private *) dev->priv;
-
- mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS);
- if (mii_data & MII_STAT_LINK) {
- *link = 1;
- mii_data = mdio_read(dev, aup->phy_addr, MII_LSI_PHY_STAT);
- if (mii_data & MII_LSI_PHY_STAT_SPD) {
- if (mii_data & MII_LSI_PHY_STAT_FDX) {
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- }
- else {
- *speed = IF_PORT_100BASETX;
- dev->if_port = IF_PORT_100BASETX;
- }
- }
- else {
- *speed = IF_PORT_10BASET;
- dev->if_port = IF_PORT_10BASET;
- }
-
- }
- else {
- *link = 0;
- *speed = 0;
- dev->if_port = IF_PORT_UNKNOWN;
- }
- return 0;
-}
-
-int am79c901_init(struct net_device *dev, int phy_addr)
-{
- printk("am79c901_init\n");
- return 0;
-}
-
-int am79c901_reset(struct net_device *dev, int phy_addr)
-{
- printk("am79c901_reset\n");
- return 0;
-}
-
-int
-am79c901_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- return 0;
-}
-
-int am79c874_init(struct net_device *dev, int phy_addr)
-{
- s16 data;
-
- /* 79c874 has quit resembled bit assignments to BCM5201 */
- if (au1000_debug > 4)
- printk("am79c847_init\n");
-
- /* Stop auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO);
-
- /* Set advertisement to 10/100 and Half/Full duplex
- * (full capabilities) */
- data = mdio_read(dev, phy_addr, MII_ANADV);
- data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T;
- mdio_write(dev, phy_addr, MII_ANADV, data);
-
- /* Restart auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO;
-
- mdio_write(dev, phy_addr, MII_CONTROL, data);
-
- if (au1000_debug > 4) dump_mii(dev, phy_addr);
- return 0;
-}
-
-int am79c874_reset(struct net_device *dev, int phy_addr)
-{
- s16 mii_control, timeout;
-
- if (au1000_debug > 4)
- printk("am79c874_reset\n");
-
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET);
- mdelay(1);
- for (timeout = 100; timeout > 0; --timeout) {
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- if ((mii_control & MII_CNTL_RESET) == 0)
- break;
- mdelay(1);
- }
- if (mii_control & MII_CNTL_RESET) {
- printk(KERN_ERR "%s PHY reset timeout !\n", dev->name);
- return -1;
- }
- return 0;
-}
-
-int
-am79c874_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- u16 mii_data;
- struct au1000_private *aup;
-
- // printk("am79c874_status\n");
- if (!dev) {
- printk(KERN_ERR "am79c874_status error: NULL dev\n");
- return -1;
- }
-
- aup = (struct au1000_private *) dev->priv;
- mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS);
-
- if (mii_data & MII_STAT_LINK) {
- *link = 1;
- mii_data = mdio_read(dev, aup->phy_addr, MII_AMD_PHY_STAT);
- if (mii_data & MII_AMD_PHY_STAT_SPD) {
- if (mii_data & MII_AMD_PHY_STAT_FDX) {
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- }
- else {
- *speed = IF_PORT_100BASETX;
- dev->if_port = IF_PORT_100BASETX;
- }
- }
- else {
- *speed = IF_PORT_10BASET;
- dev->if_port = IF_PORT_10BASET;
- }
-
- }
- else {
- *link = 0;
- *speed = 0;
- dev->if_port = IF_PORT_UNKNOWN;
- }
- return 0;
-}
-
-int lxt971a_init(struct net_device *dev, int phy_addr)
-{
- if (au1000_debug > 4)
- printk("lxt971a_init\n");
-
- /* restart auto-negotiation */
- mdio_write(dev, phy_addr, MII_CONTROL,
- MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO | MII_CNTL_FDX);
-
- /* set up LEDs to correct display */
- mdio_write(dev, phy_addr, 20, 0x0422);
-
- if (au1000_debug > 4)
- dump_mii(dev, phy_addr);
- return 0;
-}
-
-int lxt971a_reset(struct net_device *dev, int phy_addr)
-{
- s16 mii_control, timeout;
-
- if (au1000_debug > 4) {
- printk("lxt971a_reset\n");
- dump_mii(dev, phy_addr);
- }
-
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET);
- mdelay(1);
- for (timeout = 100; timeout > 0; --timeout) {
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- if ((mii_control & MII_CNTL_RESET) == 0)
- break;
- mdelay(1);
- }
- if (mii_control & MII_CNTL_RESET) {
- printk(KERN_ERR "%s PHY reset timeout !\n", dev->name);
- return -1;
- }
- return 0;
-}
-
-int
-lxt971a_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- u16 mii_data;
- struct au1000_private *aup;
-
- if (!dev) {
- printk(KERN_ERR "lxt971a_status error: NULL dev\n");
- return -1;
- }
- aup = (struct au1000_private *) dev->priv;
-
- mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS);
- if (mii_data & MII_STAT_LINK) {
- *link = 1;
- mii_data = mdio_read(dev, aup->phy_addr, MII_INTEL_PHY_STAT);
- if (mii_data & MII_INTEL_PHY_STAT_SPD) {
- if (mii_data & MII_INTEL_PHY_STAT_FDX) {
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- }
- else {
- *speed = IF_PORT_100BASETX;
- dev->if_port = IF_PORT_100BASETX;
- }
- }
- else {
- *speed = IF_PORT_10BASET;
- dev->if_port = IF_PORT_10BASET;
- }
-
- }
- else {
- *link = 0;
- *speed = 0;
- dev->if_port = IF_PORT_UNKNOWN;
- }
- return 0;
-}
-
-int ks8995m_init(struct net_device *dev, int phy_addr)
-{
- s16 data;
-
-// printk("ks8995m_init\n");
- /* Stop auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO);
-
- /* Set advertisement to 10/100 and Half/Full duplex
- * (full capabilities) */
- data = mdio_read(dev, phy_addr, MII_ANADV);
- data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T;
- mdio_write(dev, phy_addr, MII_ANADV, data);
-
- /* Restart auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO;
- mdio_write(dev, phy_addr, MII_CONTROL, data);
-
- if (au1000_debug > 4) dump_mii(dev, phy_addr);
-
- return 0;
-}
-
-int ks8995m_reset(struct net_device *dev, int phy_addr)
-{
- s16 mii_control, timeout;
-
-// printk("ks8995m_reset\n");
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET);
- mdelay(1);
- for (timeout = 100; timeout > 0; --timeout) {
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- if ((mii_control & MII_CNTL_RESET) == 0)
- break;
- mdelay(1);
- }
- if (mii_control & MII_CNTL_RESET) {
- printk(KERN_ERR "%s PHY reset timeout !\n", dev->name);
- return -1;
- }
- return 0;
-}
-
-int ks8995m_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- u16 mii_data;
- struct au1000_private *aup;
-
- if (!dev) {
- printk(KERN_ERR "ks8995m_status error: NULL dev\n");
- return -1;
- }
- aup = (struct au1000_private *) dev->priv;
-
- mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS);
- if (mii_data & MII_STAT_LINK) {
- *link = 1;
- mii_data = mdio_read(dev, aup->phy_addr, MII_AUX_CNTRL);
- if (mii_data & MII_AUX_100) {
- if (mii_data & MII_AUX_FDX) {
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- }
- else {
- *speed = IF_PORT_100BASETX;
- dev->if_port = IF_PORT_100BASETX;
- }
- }
- else {
- *speed = IF_PORT_10BASET;
- dev->if_port = IF_PORT_10BASET;
- }
-
- }
- else {
- *link = 0;
- *speed = 0;
- dev->if_port = IF_PORT_UNKNOWN;
- }
- return 0;
-}
-
-int
-smsc_83C185_init (struct net_device *dev, int phy_addr)
-{
- s16 data;
-
- if (au1000_debug > 4)
- printk("smsc_83C185_init\n");
-
- /* Stop auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO);
-
- /* Set advertisement to 10/100 and Half/Full duplex
- * (full capabilities) */
- data = mdio_read(dev, phy_addr, MII_ANADV);
- data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T;
- mdio_write(dev, phy_addr, MII_ANADV, data);
-
- /* Restart auto-negotiation */
- data = mdio_read(dev, phy_addr, MII_CONTROL);
- data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO;
-
- mdio_write(dev, phy_addr, MII_CONTROL, data);
-
- if (au1000_debug > 4) dump_mii(dev, phy_addr);
- return 0;
-}
-
-int
-smsc_83C185_reset (struct net_device *dev, int phy_addr)
-{
- s16 mii_control, timeout;
-
- if (au1000_debug > 4)
- printk("smsc_83C185_reset\n");
-
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET);
- mdelay(1);
- for (timeout = 100; timeout > 0; --timeout) {
- mii_control = mdio_read(dev, phy_addr, MII_CONTROL);
- if ((mii_control & MII_CNTL_RESET) == 0)
- break;
- mdelay(1);
- }
- if (mii_control & MII_CNTL_RESET) {
- printk(KERN_ERR "%s PHY reset timeout !\n", dev->name);
- return -1;
- }
- return 0;
-}
-
-int
-smsc_83C185_status (struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- u16 mii_data;
- struct au1000_private *aup;
-
- if (!dev) {
- printk(KERN_ERR "smsc_83C185_status error: NULL dev\n");
- return -1;
- }
-
- aup = (struct au1000_private *) dev->priv;
- mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS);
-
- if (mii_data & MII_STAT_LINK) {
- *link = 1;
- mii_data = mdio_read(dev, aup->phy_addr, 0x1f);
- if (mii_data & (1<<3)) {
- if (mii_data & (1<<4)) {
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- }
- else {
- *speed = IF_PORT_100BASETX;
- dev->if_port = IF_PORT_100BASETX;
- }
- }
- else {
- *speed = IF_PORT_10BASET;
- dev->if_port = IF_PORT_10BASET;
- }
- }
- else {
- *link = 0;
- *speed = 0;
- dev->if_port = IF_PORT_UNKNOWN;
- }
- return 0;
-}
-
-
-#ifdef CONFIG_MIPS_BOSPORUS
-int stub_init(struct net_device *dev, int phy_addr)
-{
- //printk("PHY stub_init\n");
- return 0;
-}
-
-int stub_reset(struct net_device *dev, int phy_addr)
-{
- //printk("PHY stub_reset\n");
- return 0;
-}
+/* autodetection defaults */
+#undef AU1XXX_PHY_SEARCH_HIGHEST_ADDR
+#define AU1XXX_PHY1_SEARCH_ON_MAC0
-int
-stub_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed)
-{
- //printk("PHY stub_status\n");
- *link = 1;
- /* hmmm, revisit */
- *speed = IF_PORT_100BASEFX;
- dev->if_port = IF_PORT_100BASEFX;
- return 0;
-}
-#endif
-
-struct phy_ops bcm_5201_ops = {
- bcm_5201_init,
- bcm_5201_reset,
- bcm_5201_status,
-};
-
-struct phy_ops am79c874_ops = {
- am79c874_init,
- am79c874_reset,
- am79c874_status,
-};
-
-struct phy_ops am79c901_ops = {
- am79c901_init,
- am79c901_reset,
- am79c901_status,
-};
-
-struct phy_ops lsi_80227_ops = {
- lsi_80227_init,
- lsi_80227_reset,
- lsi_80227_status,
-};
-
-struct phy_ops lxt971a_ops = {
- lxt971a_init,
- lxt971a_reset,
- lxt971a_status,
-};
-
-struct phy_ops ks8995m_ops = {
- ks8995m_init,
- ks8995m_reset,
- ks8995m_status,
-};
+/* static PHY setup
+ *
+ * most boards PHY setup should be detectable properly with the
+ * autodetection algorithm in mii_probe(), but in some cases (e.g. if
+ * you have a switch attached, or want to use the PHY's interrupt
+ * notification capabilities) you can provide a static PHY
+ * configuration here
+ *
+ * IRQs may only be set, if a PHY address was configured
+ * If a PHY address is given, also a bus id is required to be set
+ *
+ * ps: make sure the used irqs are configured properly in the board
+ * specific irq-map
+ */
-struct phy_ops smsc_83C185_ops = {
- smsc_83C185_init,
- smsc_83C185_reset,
- smsc_83C185_status,
-};
+#if defined(CONFIG_MIPS_BOSPORUS)
+/*
+ * Micrel/Kendin 5 port switch attached to MAC0,
+ * MAC0 is associated with PHY address 5 (== WAN port)
+ * MAC1 is not associated with any PHY, since it's connected directly
+ * to the switch.
+ * no interrupts are used
+ */
+# define AU1XXX_PHY_STATIC_CONFIG
-#ifdef CONFIG_MIPS_BOSPORUS
-struct phy_ops stub_ops = {
- stub_init,
- stub_reset,
- stub_status,
-};
+# define AU1XXX_PHY0_ADDR 5
+# define AU1XXX_PHY0_BUSID 0
+# undef AU1XXX_PHY0_IRQ
+
+# undef AU1XXX_PHY1_ADDR
+# undef AU1XXX_PHY1_BUSID
+# undef AU1XXX_PHY1_IRQ
#endif
-static struct mii_chip_info {
- const char * name;
- u16 phy_id0;
- u16 phy_id1;
- struct phy_ops *phy_ops;
- int dual_phy;
-} mii_chip_table[] = {
- {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0},
- {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0},
- {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1},
- {"NS DP83847 PHY", 0x2000, 0x5c30, &bcm_5201_ops ,0},
- {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0},
- {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0},
- {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0},
- {"Intel LXT971A Dual Speed PHY",0x0013,0x78e2, &lxt971a_ops,0},
- {"Kendin KS8995M 10/100 BaseT PHY",0x0022,0x1450, &ks8995m_ops,0},
- {"SMSC LAN83C185 10/100 BaseT PHY",0x0007,0xc0a3, &smsc_83C185_ops,0},
-#ifdef CONFIG_MIPS_BOSPORUS
- {"Stub", 0x1234, 0x5678, &stub_ops },
+#if defined(AU1XXX_PHY0_BUSID) && (AU1XXX_PHY0_BUSID > 0)
+# error MAC0-associated PHY attached 2nd MACs MII bus not supported yet
#endif
- {0,},
-};
-static int mdio_read(struct net_device *dev, int phy_id, int reg)
+/*
+ * MII operations
+ */
+static int mdio_read(struct net_device *dev, int phy_addr, int reg)
{
struct au1000_private *aup = (struct au1000_private *) dev->priv;
- volatile u32 *mii_control_reg;
- volatile u32 *mii_data_reg;
+ volatile u32 *const mii_control_reg = &aup->mac->mii_control;
+ volatile u32 *const mii_data_reg = &aup->mac->mii_data;
u32 timedout = 20;
u32 mii_control;
- #ifdef CONFIG_BCM5222_DUAL_PHY
- /* First time we probe, it's for the mac0 phy.
- * Since we haven't determined yet that we have a dual phy,
- * aup->mii->mii_control_reg won't be setup and we'll
- * default to the else statement.
- * By the time we probe for the mac1 phy, the mii_control_reg
- * will be setup to be the address of the mac0 phy control since
- * both phys are controlled through mac0.
- */
- if (aup->mii && aup->mii->mii_control_reg) {
- mii_control_reg = aup->mii->mii_control_reg;
- mii_data_reg = aup->mii->mii_data_reg;
- }
- else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) {
- /* assume both phys are controlled through mac0 */
- mii_control_reg = au_macs[0]->mii->mii_control_reg;
- mii_data_reg = au_macs[0]->mii->mii_data_reg;
- }
- else
- #endif
- {
- /* default control and data reg addresses */
- mii_control_reg = &aup->mac->mii_control;
- mii_data_reg = &aup->mac->mii_data;
- }
-
while (*mii_control_reg & MAC_MII_BUSY) {
mdelay(1);
if (--timedout == 0) {
@@ -835,7 +215,7 @@
}
mii_control = MAC_SET_MII_SELECT_REG(reg) |
- MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_READ;
+ MAC_SET_MII_SELECT_PHY(phy_addr) | MAC_MII_READ;
*mii_control_reg = mii_control;
@@ -851,32 +231,14 @@
return (int)*mii_data_reg;
}
-static void mdio_write(struct net_device *dev, int phy_id, int reg, u16 value)
+static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value)
{
struct au1000_private *aup = (struct au1000_private *) dev->priv;
- volatile u32 *mii_control_reg;
- volatile u32 *mii_data_reg;
+ volatile u32 *const mii_control_reg = &aup->mac->mii_control;
+ volatile u32 *const mii_data_reg = &aup->mac->mii_data;
u32 timedout = 20;
u32 mii_control;
- #ifdef CONFIG_BCM5222_DUAL_PHY
- if (aup->mii && aup->mii->mii_control_reg) {
- mii_control_reg = aup->mii->mii_control_reg;
- mii_data_reg = aup->mii->mii_data_reg;
- }
- else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) {
- /* assume both phys are controlled through mac0 */
- mii_control_reg = au_macs[0]->mii->mii_control_reg;
- mii_data_reg = au_macs[0]->mii->mii_data_reg;
- }
- else
- #endif
- {
- /* default control and data reg addresses */
- mii_control_reg = &aup->mac->mii_control;
- mii_data_reg = &aup->mac->mii_data;
- }
-
while (*mii_control_reg & MAC_MII_BUSY) {
mdelay(1);
if (--timedout == 0) {
@@ -887,165 +249,145 @@
}
mii_control = MAC_SET_MII_SELECT_REG(reg) |
- MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_WRITE;
+ MAC_SET_MII_SELECT_PHY(phy_addr) | MAC_MII_WRITE;
*mii_data_reg = value;
*mii_control_reg = mii_control;
}
+static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
+{
+ /* WARNING: bus->phy_map[phy_addr].attached_dev == dev does
+ * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */
+ struct net_device *const dev = bus->priv;
-static void dump_mii(struct net_device *dev, int phy_id)
+ enable_mac(dev, 0); /* make sure the MAC associated with this
+ * mii_bus is enabled */
+ return mdio_read(dev, phy_addr, regnum);
+}
+
+static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
+ u16 value)
{
- int i, val;
+ struct net_device *const dev = bus->priv;
- for (i = 0; i < 7; i++) {
- if ((val = mdio_read(dev, phy_id, i)) >= 0)
- printk("%s: MII Reg %d=%x\n", dev->name, i, val);
- }
- for (i = 16; i < 25; i++) {
- if ((val = mdio_read(dev, phy_id, i)) >= 0)
- printk("%s: MII Reg %d=%x\n", dev->name, i, val);
- }
+ enable_mac(dev, 0); /* make sure the MAC associated with this
+ * mii_bus is enabled */
+ mdio_write(dev, phy_addr, regnum, value);
+ return 0;
}
-static int mii_probe (struct net_device * dev)
+static int mdiobus_reset(struct mii_bus *bus)
{
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
- int phy_addr;
-#ifdef CONFIG_MIPS_BOSPORUS
- int phy_found=0;
-#endif
+ struct net_device *const dev = bus->priv;
- /* search for total of 32 possible mii phy addresses */
- for (phy_addr = 0; phy_addr < 32; phy_addr++) {
- u16 mii_status;
- u16 phy_id0, phy_id1;
- int i;
+ enable_mac(dev, 0); /* make sure the MAC associated with this
+ * mii_bus is enabled */
+ return 0;
+}
- #ifdef CONFIG_BCM5222_DUAL_PHY
- /* Mask the already found phy, try next one */
- if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) {
- if (au_macs[0]->phy_addr == phy_addr)
- continue;
- }
- #endif
+static int mii_probe (struct net_device *dev)
+{
+ struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+ struct phy_device *phydev = NULL;
- mii_status = mdio_read(dev, phy_addr, MII_STATUS);
- if (mii_status == 0xffff || mii_status == 0x0000)
- /* the mii is not accessable, try next one */
- continue;
-
- phy_id0 = mdio_read(dev, phy_addr, MII_PHY_ID0);
- phy_id1 = mdio_read(dev, phy_addr, MII_PHY_ID1);
-
- /* search our mii table for the current mii */
- for (i = 0; mii_chip_table[i].phy_id1; i++) {
- if (phy_id0 == mii_chip_table[i].phy_id0 &&
- phy_id1 == mii_chip_table[i].phy_id1) {
- struct mii_phy * mii_phy = aup->mii;
-
- printk(KERN_INFO "%s: %s at phy address %d\n",
- dev->name, mii_chip_table[i].name,
- phy_addr);
-#ifdef CONFIG_MIPS_BOSPORUS
- phy_found = 1;
-#endif
- mii_phy->chip_info = mii_chip_table+i;
- aup->phy_addr = phy_addr;
- aup->want_autoneg = 1;
- aup->phy_ops = mii_chip_table[i].phy_ops;
- aup->phy_ops->phy_init(dev,phy_addr);
-
- // Check for dual-phy and then store required
- // values and set indicators. We need to do
- // this now since mdio_{read,write} need the
- // control and data register addresses.
- #ifdef CONFIG_BCM5222_DUAL_PHY
- if ( mii_chip_table[i].dual_phy) {
-
- /* assume both phys are controlled
- * through MAC0. Board specific? */
-
- /* sanity check */
- if (!au_macs[0] || !au_macs[0]->mii)
- return -1;
- aup->mii->mii_control_reg = (u32 *)
- &au_macs[0]->mac->mii_control;
- aup->mii->mii_data_reg = (u32 *)
- &au_macs[0]->mac->mii_data;
- }
- #endif
- goto found;
- }
- }
+#if defined(AU1XXX_PHY_STATIC_CONFIG)
+ BUG_ON(aup->mac_id < 0 || aup->mac_id > 1);
+
+ if(aup->mac_id == 0) { /* get PHY0 */
+# if defined(AU1XXX_PHY0_ADDR)
+ phydev = au_macs[AU1XXX_PHY0_BUSID]->mii_bus.phy_map[AU1XXX_PHY0_ADDR];
+# else
+ printk (KERN_INFO DRV_NAME ":%s: using PHY-less setup\n",
+ dev->name);
+ return 0;
+# endif /* defined(AU1XXX_PHY0_ADDR) */
+ } else if (aup->mac_id == 1) { /* get PHY1 */
+# if defined(AU1XXX_PHY1_ADDR)
+ phydev = au_macs[AU1XXX_PHY1_BUSID]->mii_bus.phy_map[AU1XXX_PHY1_ADDR];
+# else
+ printk (KERN_INFO DRV_NAME ":%s: using PHY-less setup\n",
+ dev->name);
+ return 0;
+# endif /* defined(AU1XXX_PHY1_ADDR) */
}
-found:
-#ifdef CONFIG_MIPS_BOSPORUS
- /* This is a workaround for the Micrel/Kendin 5 port switch
- The second MAC doesn't see a PHY connected... so we need to
- trick it into thinking we have one.
-
- If this kernel is run on another Au1500 development board
- the stub will be found as well as the actual PHY. However,
- the last found PHY will be used... usually at Addr 31 (Db1500).
- */
- if ( (!phy_found) )
- {
- u16 phy_id0, phy_id1;
- int i;
+#else /* defined(AU1XXX_PHY_STATIC_CONFIG) */
+ int phy_addr;
+
+ /* find the first (lowest address) PHY on the current MAC's MII bus */
+ for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++)
+ if (aup->mii_bus.phy_map[phy_addr]) {
+ phydev = aup->mii_bus.phy_map[phy_addr];
+# if !defined(AU1XXX_PHY_SEARCH_HIGHEST_ADDR)
+ break; /* break out with first one found */
+# endif
+ }
- phy_id0 = 0x1234;
- phy_id1 = 0x5678;
+# if defined(AU1XXX_PHY1_SEARCH_ON_MAC0)
+ /* try harder to find a PHY */
+ if (!phydev && (aup->mac_id == 1)) {
+ /* no PHY found, maybe we have a dual PHY? */
+ printk (KERN_INFO DRV_NAME ": no PHY found on MAC1, "
+ "let's see if it's attached to MAC0...\n");
- /* search our mii table for the current mii */
- for (i = 0; mii_chip_table[i].phy_id1; i++) {
- if (phy_id0 == mii_chip_table[i].phy_id0 &&
- phy_id1 == mii_chip_table[i].phy_id1) {
- struct mii_phy * mii_phy;
-
- printk(KERN_INFO "%s: %s at phy address %d\n",
- dev->name, mii_chip_table[i].name,
- phy_addr);
- mii_phy = kmalloc(sizeof(struct mii_phy),
- GFP_KERNEL);
- if (mii_phy) {
- mii_phy->chip_info = mii_chip_table+i;
- aup->phy_addr = phy_addr;
- mii_phy->next = aup->mii;
- aup->phy_ops =
- mii_chip_table[i].phy_ops;
- aup->mii = mii_phy;
- aup->phy_ops->phy_init(dev,phy_addr);
- } else {
- printk(KERN_ERR "%s: out of memory\n",
- dev->name);
- return -1;
- }
- mii_phy->chip_info = mii_chip_table+i;
- aup->phy_addr = phy_addr;
- aup->phy_ops = mii_chip_table[i].phy_ops;
- aup->phy_ops->phy_init(dev,phy_addr);
- break;
- }
+ BUG_ON(!au_macs[0]);
+
+ /* find the first (lowest address) non-attached PHY on
+ * the MAC0 MII bus */
+ for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
+ struct phy_device *const tmp_phydev =
+ au_macs[0]->mii_bus.phy_map[phy_addr];
+
+ if (!tmp_phydev)
+ continue; /* no PHY here... */
+
+ if (tmp_phydev->attached_dev)
+ continue; /* already claimed by MAC0 */
+
+ phydev = tmp_phydev;
+ break; /* found it */
}
}
- if (aup->mac_id == 0) {
- /* the Bosporus phy responds to addresses 0-5 but
- * 5 is the correct one.
- */
- aup->phy_addr = 5;
- }
-#endif
+# endif /* defined(AU1XXX_PHY1_SEARCH_OTHER_BUS) */
- if (aup->mii->chip_info == NULL) {
- printk(KERN_ERR "%s: Au1x No known MII transceivers found!\n",
- dev->name);
+#endif /* defined(AU1XXX_PHY_STATIC_CONFIG) */
+ if (!phydev) {
+ printk (KERN_ERR DRV_NAME ":%s: no PHY found\n", dev->name);
return -1;
}
- printk(KERN_INFO "%s: Using %s as default\n",
- dev->name, aup->mii->chip_info->name);
+ /* now we are supposed to have a proper phydev, to attach to... */
+ BUG_ON(!phydev);
+ BUG_ON(phydev->attached_dev);
+
+ phydev = phy_connect(dev, phydev->dev.bus_id, &au1000_adjust_link, 0);
+
+ if (IS_ERR(phydev)) {
+ printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
+ return PTR_ERR(phydev);
+ }
+
+ /* mask with MAC supported features */
+ phydev->supported &= (SUPPORTED_10baseT_Half
+ | SUPPORTED_10baseT_Full
+ | SUPPORTED_100baseT_Half
+ | SUPPORTED_100baseT_Full
+ | SUPPORTED_Autoneg
+ /* | SUPPORTED_Pause | SUPPORTED_Asym_Pause */
+ | SUPPORTED_MII
+ | SUPPORTED_TP);
+
+ phydev->advertising = phydev->supported;
+
+ aup->old_link = 0;
+ aup->old_speed = 0;
+ aup->old_duplex = -1;
+ aup->phy_dev = phydev;
+
+ printk(KERN_INFO "%s: attached PHY driver [%s] "
+ "(mii_bus:phy_addr=%s, irq=%d)\n",
+ dev->name, phydev->drv->name, phydev->dev.bus_id, phydev->irq);
return 0;
}
@@ -1097,35 +439,38 @@
au_sync_delay(10);
}
-
-static void reset_mac(struct net_device *dev)
+static void enable_mac(struct net_device *dev, int force_reset)
{
- int i;
- u32 flags;
+ unsigned long flags;
struct au1000_private *aup = (struct au1000_private *) dev->priv;
- if (au1000_debug > 4)
- printk(KERN_INFO "%s: reset mac, aup %x\n",
- dev->name, (unsigned)aup);
-
spin_lock_irqsave(&aup->lock, flags);
- if (aup->timer.function == &au1000_timer) {/* check if timer initted */
- del_timer(&aup->timer);
- }
- hard_stop(dev);
- #ifdef CONFIG_BCM5222_DUAL_PHY
- if (aup->mac_id != 0) {
- #endif
- /* If BCM5222, we can't leave MAC0 in reset because then
- * we can't access the dual phy for ETH1 */
+ if(force_reset || (!aup->mac_enabled)) {
*aup->enable = MAC_EN_CLOCK_ENABLE;
au_sync_delay(2);
- *aup->enable = 0;
+ *aup->enable = (MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2
+ | MAC_EN_CLOCK_ENABLE);
au_sync_delay(2);
- #ifdef CONFIG_BCM5222_DUAL_PHY
+
+ aup->mac_enabled = 1;
}
- #endif
+
+ spin_unlock_irqrestore(&aup->lock, flags);
+}
+
+static void reset_mac_unlocked(struct net_device *dev)
+{
+ struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+ int i;
+
+ hard_stop(dev);
+
+ *aup->enable = MAC_EN_CLOCK_ENABLE;
+ au_sync_delay(2);
+ *aup->enable = 0;
+ au_sync_delay(2);
+
aup->tx_full = 0;
for (i = 0; i < NUM_RX_DMA; i++) {
/* reset control bits */
@@ -1135,9 +480,26 @@
/* reset control bits */
aup->tx_dma_ring[i]->buff_stat &= ~0xf;
}
- spin_unlock_irqrestore(&aup->lock, flags);
+
+ aup->mac_enabled = 0;
+
}
+static void reset_mac(struct net_device *dev)
+{
+ struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+ unsigned long flags;
+
+ if (au1000_debug > 4)
+ printk(KERN_INFO "%s: reset mac, aup %x\n",
+ dev->name, (unsigned)aup);
+
+ spin_lock_irqsave(&aup->lock, flags);
+
+ reset_mac_unlocked (dev);
+
+ spin_unlock_irqrestore(&aup->lock, flags);
+}
/*
* Setup the receive and transmit "rings". These pointers are the addresses
@@ -1237,178 +599,31 @@
return 0;
}
-static int au1000_setup_aneg(struct net_device *dev, u32 advertise)
-{
- struct au1000_private *aup = (struct au1000_private *)dev->priv;
- u16 ctl, adv;
-
- /* Setup standard advertise */
- adv = mdio_read(dev, aup->phy_addr, MII_ADVERTISE);
- adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
- if (advertise & ADVERTISED_10baseT_Half)
- adv |= ADVERTISE_10HALF;
- if (advertise & ADVERTISED_10baseT_Full)
- adv |= ADVERTISE_10FULL;
- if (advertise & ADVERTISED_100baseT_Half)
- adv |= ADVERTISE_100HALF;
- if (advertise & ADVERTISED_100baseT_Full)
- adv |= ADVERTISE_100FULL;
- mdio_write(dev, aup->phy_addr, MII_ADVERTISE, adv);
-
- /* Start/Restart aneg */
- ctl = mdio_read(dev, aup->phy_addr, MII_BMCR);
- ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
- mdio_write(dev, aup->phy_addr, MII_BMCR, ctl);
-
- return 0;
-}
-
-static int au1000_setup_forced(struct net_device *dev, int speed, int fd)
-{
- struct au1000_private *aup = (struct au1000_private *)dev->priv;
- u16 ctl;
-
- ctl = mdio_read(dev, aup->phy_addr, MII_BMCR);
- ctl &= ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_ANENABLE);
-
- /* First reset the PHY */
- mdio_write(dev, aup->phy_addr, MII_BMCR, ctl | BMCR_RESET);
-
- /* Select speed & duplex */
- switch (speed) {
- case SPEED_10:
- break;
- case SPEED_100:
- ctl |= BMCR_SPEED100;
- break;
- case SPEED_1000:
- default:
- return -EINVAL;
- }
- if (fd == DUPLEX_FULL)
- ctl |= BMCR_FULLDPLX;
- mdio_write(dev, aup->phy_addr, MII_BMCR, ctl);
-
- return 0;
-}
-
-
-static void
-au1000_start_link(struct net_device *dev, struct ethtool_cmd *cmd)
-{
- struct au1000_private *aup = (struct au1000_private *)dev->priv;
- u32 advertise;
- int autoneg;
- int forced_speed;
- int forced_duplex;
-
- /* Default advertise */
- advertise = GENMII_DEFAULT_ADVERTISE;
- autoneg = aup->want_autoneg;
- forced_speed = SPEED_100;
- forced_duplex = DUPLEX_FULL;
-
- /* Setup link parameters */
- if (cmd) {
- if (cmd->autoneg == AUTONEG_ENABLE) {
- advertise = cmd->advertising;
- autoneg = 1;
- } else {
- autoneg = 0;
-
- forced_speed = cmd->speed;
- forced_duplex = cmd->duplex;
- }
- }
-
- /* Configure PHY & start aneg */
- aup->want_autoneg = autoneg;
- if (autoneg)
- au1000_setup_aneg(dev, advertise);
- else
- au1000_setup_forced(dev, forced_speed, forced_duplex);
- mod_timer(&aup->timer, jiffies + HZ);
-}
+/*
+ * ethtool operations
+ */
static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct au1000_private *aup = (struct au1000_private *)dev->priv;
- u16 link, speed;
- cmd->supported = GENMII_DEFAULT_FEATURES;
- cmd->advertising = GENMII_DEFAULT_ADVERTISE;
- cmd->port = PORT_MII;
- cmd->transceiver = XCVR_EXTERNAL;
- cmd->phy_address = aup->phy_addr;
- spin_lock_irq(&aup->lock);
- cmd->autoneg = aup->want_autoneg;
- aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed);
- if ((speed == IF_PORT_100BASETX) || (speed == IF_PORT_100BASEFX))
- cmd->speed = SPEED_100;
- else if (speed == IF_PORT_10BASET)
- cmd->speed = SPEED_10;
- if (link && (dev->if_port == IF_PORT_100BASEFX))
- cmd->duplex = DUPLEX_FULL;
- else
- cmd->duplex = DUPLEX_HALF;
- spin_unlock_irq(&aup->lock);
- return 0;
+ if (aup->phy_dev)
+ return phy_ethtool_gset(aup->phy_dev, cmd);
+
+ return -EINVAL;
}
static int au1000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
- struct au1000_private *aup = (struct au1000_private *)dev->priv;
- unsigned long features = GENMII_DEFAULT_FEATURES;
+ struct au1000_private *aup = (struct au1000_private *)dev->priv;
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
- if (cmd->autoneg != AUTONEG_ENABLE && cmd->autoneg != AUTONEG_DISABLE)
- return -EINVAL;
- if (cmd->autoneg == AUTONEG_ENABLE && cmd->advertising == 0)
- return -EINVAL;
- if (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL)
- return -EINVAL;
- if (cmd->autoneg == AUTONEG_DISABLE)
- switch (cmd->speed) {
- case SPEED_10:
- if (cmd->duplex == DUPLEX_HALF &&
- (features & SUPPORTED_10baseT_Half) == 0)
- return -EINVAL;
- if (cmd->duplex == DUPLEX_FULL &&
- (features & SUPPORTED_10baseT_Full) == 0)
- return -EINVAL;
- break;
- case SPEED_100:
- if (cmd->duplex == DUPLEX_HALF &&
- (features & SUPPORTED_100baseT_Half) == 0)
- return -EINVAL;
- if (cmd->duplex == DUPLEX_FULL &&
- (features & SUPPORTED_100baseT_Full) == 0)
- return -EINVAL;
- break;
- default:
- return -EINVAL;
- }
- else if ((features & SUPPORTED_Autoneg) == 0)
- return -EINVAL;
-
- spin_lock_irq(&aup->lock);
- au1000_start_link(dev, cmd);
- spin_unlock_irq(&aup->lock);
- return 0;
-}
+ if (aup->phy_dev)
+ return phy_ethtool_sset(aup->phy_dev, cmd);
-static int au1000_nway_reset(struct net_device *dev)
-{
- struct au1000_private *aup = (struct au1000_private *)dev->priv;
-
- if (!aup->want_autoneg)
- return -EINVAL;
- spin_lock_irq(&aup->lock);
- au1000_start_link(dev, NULL);
- spin_unlock_irq(&aup->lock);
- return 0;
+ return -EINVAL;
}
static void
@@ -1423,19 +638,15 @@
info->regdump_len = 0;
}
-static u32 au1000_get_link(struct net_device *dev)
-{
- return netif_carrier_ok(dev);
-}
-
static struct ethtool_ops au1000_ethtool_ops = {
.get_settings = au1000_get_settings,
.set_settings = au1000_set_settings,
.get_drvinfo = au1000_get_drvinfo,
- .nway_reset = au1000_nway_reset,
- .get_link = au1000_get_link
+ .get_link = ethtool_op_get_link,
};
+
+
static struct net_device *
au1000_probe(u32 ioaddr, int irq, int port_num)
{
@@ -1527,24 +738,33 @@
printk(KERN_ERR "%s: bad ioaddr\n", dev->name);
}
- /* bring the device out of reset, otherwise probing the mii
- * will hang */
- *aup->enable = MAC_EN_CLOCK_ENABLE;
- au_sync_delay(2);
- *aup->enable = MAC_EN_RESET0 | MAC_EN_RESET1 |
- MAC_EN_RESET2 | MAC_EN_CLOCK_ENABLE;
- au_sync_delay(2);
+ *aup->enable = 0;
+ aup->mac_enabled = 0;
- aup->mii = kmalloc(sizeof(struct mii_phy), GFP_KERNEL);
- if (!aup->mii) {
- printk(KERN_ERR "%s: out of memory\n", dev->name);
- goto err_out;
- }
- aup->mii->next = NULL;
- aup->mii->chip_info = NULL;
- aup->mii->status = 0;
- aup->mii->mii_control_reg = 0;
- aup->mii->mii_data_reg = 0;
+ aup->mii_bus.priv = dev;
+ aup->mii_bus.read = mdiobus_read;
+ aup->mii_bus.write = mdiobus_write;
+ aup->mii_bus.reset = mdiobus_reset;
+ aup->mii_bus.name = "au1000_eth_mii";
+ aup->mii_bus.id = aup->mac_id;
+ aup->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
+ for(i = 0; i < PHY_MAX_ADDR; ++i)
+ aup->mii_bus.irq[i] = PHY_POLL;
+
+ /* if known, set corresponding PHY IRQs */
+#if defined(AU1XXX_PHY_STATIC_CONFIG)
+# if defined(AU1XXX_PHY0_IRQ)
+ if (AU1XXX_PHY0_BUSID == aup->mii_bus.id)
+ aup->mii_bus.irq[AU1XXX_PHY0_ADDR] = AU1XXX_PHY0_IRQ;
+# endif
+
+# if defined(AU1XXX_PHY1_IRQ)
+ if (AU1XXX_PHY1_BUSID == aup->mii_bus.id)
+ aup->mii_bus.irq[AU1XXX_PHY1_ADDR] = AU1XXX_PHY1_IRQ;
+# endif
+#endif
+
+ mdiobus_register(&aup->mii_bus);
if (mii_probe(dev) != 0) {
goto err_out;
@@ -1590,7 +810,6 @@
dev->set_multicast_list = &set_rx_mode;
dev->do_ioctl = &au1000_ioctl;
SET_ETHTOOL_OPS(dev, &au1000_ethtool_ops);
- dev->set_config = &au1000_set_config;
dev->tx_timeout = au1000_tx_timeout;
dev->watchdog_timeo = ETH_TX_TIMEOUT;
@@ -1606,7 +825,7 @@
/* here we should have a valid dev plus aup-> register addresses
* so we can reset the mac properly.*/
reset_mac(dev);
- kfree(aup->mii);
+
for (i = 0; i < NUM_RX_DMA; i++) {
if (aup->rx_db_inuse[i])
ReleaseDB(aup, aup->rx_db_inuse[i]);
@@ -1640,19 +859,14 @@
u32 flags;
int i;
u32 control;
- u16 link, speed;
if (au1000_debug > 4)
printk("%s: au1000_init\n", dev->name);
- spin_lock_irqsave(&aup->lock, flags);
-
/* bring the device out of reset */
- *aup->enable = MAC_EN_CLOCK_ENABLE;
- au_sync_delay(2);
- *aup->enable = MAC_EN_RESET0 | MAC_EN_RESET1 |
- MAC_EN_RESET2 | MAC_EN_CLOCK_ENABLE;
- au_sync_delay(20);
+ enable_mac(dev, 1);
+
+ spin_lock_irqsave(&aup->lock, flags);
aup->mac->control = 0;
aup->tx_head = (aup->tx_dma_ring[0]->buff_stat & 0xC) >> 2;
@@ -1668,12 +882,16 @@
}
au_sync();
- aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed);
- control = MAC_DISABLE_RX_OWN | MAC_RX_ENABLE | MAC_TX_ENABLE;
+ control = MAC_RX_ENABLE | MAC_TX_ENABLE;
#ifndef CONFIG_CPU_LITTLE_ENDIAN
control |= MAC_BIG_ENDIAN;
#endif
- if (link && (dev->if_port == IF_PORT_100BASEFX)) {
+ if (aup->phy_dev) {
+ if (aup->phy_dev->link && (DUPLEX_FULL == aup->phy_dev->duplex))
+ control |= MAC_FULL_DUPLEX;
+ else
+ control |= MAC_DISABLE_RX_OWN;
+ } else { /* PHY-less op, assume full-duplex */
control |= MAC_FULL_DUPLEX;
}
@@ -1685,57 +903,84 @@
return 0;
}
-static void au1000_timer(unsigned long data)
+static void
+au1000_adjust_link(struct net_device *dev)
{
- struct net_device *dev = (struct net_device *)data;
struct au1000_private *aup = (struct au1000_private *) dev->priv;
- unsigned char if_port;
- u16 link, speed;
+ struct phy_device *phydev = aup->phy_dev;
+ unsigned long flags;
- if (!dev) {
- /* fatal error, don't restart the timer */
- printk(KERN_ERR "au1000_timer error: NULL dev\n");
- return;
- }
+ int status_change = 0;
- if_port = dev->if_port;
- if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) {
- if (link) {
- if (!netif_carrier_ok(dev)) {
- netif_carrier_on(dev);
- printk(KERN_INFO "%s: link up\n", dev->name);
- }
- }
- else {
- if (netif_carrier_ok(dev)) {
- netif_carrier_off(dev);
- dev->if_port = 0;
- printk(KERN_INFO "%s: link down\n", dev->name);
- }
+ BUG_ON(!aup->phy_dev);
+
+ spin_lock_irqsave(&aup->lock, flags);
+
+ if (phydev->link && (aup->old_speed != phydev->speed)) {
+ // speed changed
+
+ switch(phydev->speed) {
+ case SPEED_10:
+ case SPEED_100:
+ break;
+ default:
+ printk(KERN_WARNING
+ "%s: Speed (%d) is not 10/100 ???\n",
+ dev->name, phydev->speed);
+ break;
}
+
+ aup->old_speed = phydev->speed;
+
+ status_change = 1;
}
- if (link && (dev->if_port != if_port) &&
- (dev->if_port != IF_PORT_UNKNOWN)) {
+ if (phydev->link && (aup->old_duplex != phydev->duplex)) {
+ // duplex mode changed
+
+ /* switching duplex mode requires to disable rx and tx! */
hard_stop(dev);
- if (dev->if_port == IF_PORT_100BASEFX) {
- printk(KERN_INFO "%s: going to full duplex\n",
- dev->name);
- aup->mac->control |= MAC_FULL_DUPLEX;
- au_sync_delay(1);
- }
- else {
- aup->mac->control &= ~MAC_FULL_DUPLEX;
- au_sync_delay(1);
- }
+
+ if (DUPLEX_FULL == phydev->duplex)
+ aup->mac->control = ((aup->mac->control
+ | MAC_FULL_DUPLEX)
+ & ~MAC_DISABLE_RX_OWN);
+ else
+ aup->mac->control = ((aup->mac->control
+ & ~MAC_FULL_DUPLEX)
+ | MAC_DISABLE_RX_OWN);
+ au_sync_delay(1);
+
enable_rx_tx(dev);
+ aup->old_duplex = phydev->duplex;
+
+ status_change = 1;
+ }
+
+ if(phydev->link != aup->old_link) {
+ // link state changed
+
+ if (phydev->link) // link went up
+ netif_schedule(dev);
+ else { // link went down
+ aup->old_speed = 0;
+ aup->old_duplex = -1;
+ }
+
+ aup->old_link = phydev->link;
+ status_change = 1;
}
- aup->timer.expires = RUN_AT((1*HZ));
- aup->timer.data = (unsigned long)dev;
- aup->timer.function = &au1000_timer; /* timer handler */
- add_timer(&aup->timer);
+ spin_unlock_irqrestore(&aup->lock, flags);
+ if (status_change) {
+ if (phydev->link)
+ printk(KERN_INFO "%s: link up (%d/%s)\n",
+ dev->name, phydev->speed,
+ DUPLEX_FULL == phydev->duplex ? "Full" : "Half");
+ else
+ printk(KERN_INFO "%s: link down\n", dev->name);
+ }
}
static int au1000_open(struct net_device *dev)
@@ -1746,25 +991,26 @@
if (au1000_debug > 4)
printk("%s: open: dev=%p\n", dev->name, dev);
+ if ((retval = request_irq(dev->irq, &au1000_interrupt, 0,
+ dev->name, dev))) {
+ printk(KERN_ERR "%s: unable to get IRQ %d\n",
+ dev->name, dev->irq);
+ return retval;
+ }
+
if ((retval = au1000_init(dev))) {
printk(KERN_ERR "%s: error in au1000_init\n", dev->name);
free_irq(dev->irq, dev);
return retval;
}
- netif_start_queue(dev);
- if ((retval = request_irq(dev->irq, &au1000_interrupt, 0,
- dev->name, dev))) {
- printk(KERN_ERR "%s: unable to get IRQ %d\n",
- dev->name, dev->irq);
- return retval;
+ if (aup->phy_dev) {
+ /* cause the PHY state machine to schedule a link state check */
+ aup->phy_dev->state = PHY_CHANGELINK;
+ phy_start(aup->phy_dev);
}
- init_timer(&aup->timer); /* used in ioctl() */
- aup->timer.expires = RUN_AT((3*HZ));
- aup->timer.data = (unsigned long)dev;
- aup->timer.function = &au1000_timer; /* timer handler */
- add_timer(&aup->timer);
+ netif_start_queue(dev);
if (au1000_debug > 4)
printk("%s: open: Initialization done.\n", dev->name);
@@ -1774,16 +1020,19 @@
static int au1000_close(struct net_device *dev)
{
- u32 flags;
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
+ unsigned long flags;
+ struct au1000_private *const aup = (struct au1000_private *) dev->priv;
if (au1000_debug > 4)
printk("%s: close: dev=%p\n", dev->name, dev);
- reset_mac(dev);
+ if (aup->phy_dev)
+ phy_stop(aup->phy_dev);
spin_lock_irqsave(&aup->lock, flags);
-
+
+ reset_mac_unlocked (dev);
+
/* stop the device */
netif_stop_queue(dev);
@@ -1805,7 +1054,7 @@
if (dev) {
aup = (struct au1000_private *) dev->priv;
unregister_netdev(dev);
- kfree(aup->mii);
+
for (j = 0; j < NUM_RX_DMA; j++) {
if (aup->rx_db_inuse[j])
ReleaseDB(aup, aup->rx_db_inuse[j]);
@@ -1830,7 +1079,7 @@
struct net_device_stats *ps = &aup->stats;
if (status & TX_FRAME_ABORTED) {
- if (dev->if_port == IF_PORT_100BASEFX) {
+ if (!aup->phy_dev || (DUPLEX_FULL == aup->phy_dev->duplex)) {
if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
/* any other tx errors are only valid
* in half duplex mode */
@@ -2104,126 +1353,15 @@
}
}
-
static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct au1000_private *aup = (struct au1000_private *)dev->priv;
- u16 *data = (u16 *)&rq->ifr_ifru;
-
- switch(cmd) {
- case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */
- case SIOCGMIIPHY:
- if (!netif_running(dev)) return -EINVAL;
- data[0] = aup->phy_addr;
- case SIOCDEVPRIVATE+1: /* Read the specified MII register. */
- case SIOCGMIIREG:
- data[3] = mdio_read(dev, data[0], data[1]);
- return 0;
- case SIOCDEVPRIVATE+2: /* Write the specified MII register */
- case SIOCSMIIREG:
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
- mdio_write(dev, data[0], data[1],data[2]);
- return 0;
- default:
- return -EOPNOTSUPP;
- }
-
-}
-
-
-static int au1000_set_config(struct net_device *dev, struct ifmap *map)
-{
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
- u16 control;
- if (au1000_debug > 4) {
- printk("%s: set_config called: dev->if_port %d map->port %x\n",
- dev->name, dev->if_port, map->port);
- }
+ if (!netif_running(dev)) return -EINVAL;
- switch(map->port){
- case IF_PORT_UNKNOWN: /* use auto here */
- printk(KERN_INFO "%s: config phy for aneg\n",
- dev->name);
- dev->if_port = map->port;
- /* Link Down: the timer will bring it up */
- netif_carrier_off(dev);
-
- /* read current control */
- control = mdio_read(dev, aup->phy_addr, MII_CONTROL);
- control &= ~(MII_CNTL_FDX | MII_CNTL_F100);
-
- /* enable auto negotiation and reset the negotiation */
- mdio_write(dev, aup->phy_addr, MII_CONTROL,
- control | MII_CNTL_AUTO |
- MII_CNTL_RST_AUTO);
+ if (!aup->phy_dev) return -EINVAL; // PHY not controllable
- break;
-
- case IF_PORT_10BASET: /* 10BaseT */
- printk(KERN_INFO "%s: config phy for 10BaseT\n",
- dev->name);
- dev->if_port = map->port;
-
- /* Link Down: the timer will bring it up */
- netif_carrier_off(dev);
-
- /* set Speed to 10Mbps, Half Duplex */
- control = mdio_read(dev, aup->phy_addr, MII_CONTROL);
- control &= ~(MII_CNTL_F100 | MII_CNTL_AUTO |
- MII_CNTL_FDX);
-
- /* disable auto negotiation and force 10M/HD mode*/
- mdio_write(dev, aup->phy_addr, MII_CONTROL, control);
- break;
-
- case IF_PORT_100BASET: /* 100BaseT */
- case IF_PORT_100BASETX: /* 100BaseTx */
- printk(KERN_INFO "%s: config phy for 100BaseTX\n",
- dev->name);
- dev->if_port = map->port;
-
- /* Link Down: the timer will bring it up */
- netif_carrier_off(dev);
-
- /* set Speed to 100Mbps, Half Duplex */
- /* disable auto negotiation and enable 100MBit Mode */
- control = mdio_read(dev, aup->phy_addr, MII_CONTROL);
- control &= ~(MII_CNTL_AUTO | MII_CNTL_FDX);
- control |= MII_CNTL_F100;
- mdio_write(dev, aup->phy_addr, MII_CONTROL, control);
- break;
-
- case IF_PORT_100BASEFX: /* 100BaseFx */
- printk(KERN_INFO "%s: config phy for 100BaseFX\n",
- dev->name);
- dev->if_port = map->port;
-
- /* Link Down: the timer will bring it up */
- netif_carrier_off(dev);
-
- /* set Speed to 100Mbps, Full Duplex */
- /* disable auto negotiation and enable 100MBit Mode */
- control = mdio_read(dev, aup->phy_addr, MII_CONTROL);
- control &= ~MII_CNTL_AUTO;
- control |= MII_CNTL_F100 | MII_CNTL_FDX;
- mdio_write(dev, aup->phy_addr, MII_CONTROL, control);
- break;
- case IF_PORT_10BASE2: /* 10Base2 */
- case IF_PORT_AUI: /* AUI */
- /* These Modes are not supported (are they?)*/
- printk(KERN_ERR "%s: 10Base2/AUI not supported",
- dev->name);
- return -EOPNOTSUPP;
- break;
-
- default:
- printk(KERN_ERR "%s: Invalid media selected",
- dev->name);
- return -EINVAL;
- }
- return 0;
+ return phy_mii_ioctl(aup->phy_dev, if_mii(rq), cmd);
}
static struct net_device_stats *au1000_get_stats(struct net_device *dev)
Index: b/drivers/net/au1000_eth.h
===================================================================
--- a/drivers/net/au1000_eth.h 2006-05-12 21:18:36.000000000 +0200
+++ b/drivers/net/au1000_eth.h 2006-05-12 21:37:42.000000000 +0200
@@ -40,120 +40,6 @@
#define MULTICAST_FILTER_LIMIT 64
-/* FIXME
- * The PHY defines should be in a separate file.
- */
-
-/* MII register offsets */
-#define MII_CONTROL 0x0000
-#define MII_STATUS 0x0001
-#define MII_PHY_ID0 0x0002
-#define MII_PHY_ID1 0x0003
-#define MII_ANADV 0x0004
-#define MII_ANLPAR 0x0005
-#define MII_AEXP 0x0006
-#define MII_ANEXT 0x0007
-#define MII_LSI_PHY_CONFIG 0x0011
-/* Status register */
-#define MII_LSI_PHY_STAT 0x0012
-#define MII_AMD_PHY_STAT MII_LSI_PHY_STAT
-#define MII_INTEL_PHY_STAT 0x0011
-
-#define MII_AUX_CNTRL 0x0018
-/* mii registers specific to AMD 79C901 */
-#define MII_STATUS_SUMMARY = 0x0018
-
-/* MII Control register bit definitions. */
-#define MII_CNTL_FDX 0x0100
-#define MII_CNTL_RST_AUTO 0x0200
-#define MII_CNTL_ISOLATE 0x0400
-#define MII_CNTL_PWRDWN 0x0800
-#define MII_CNTL_AUTO 0x1000
-#define MII_CNTL_F100 0x2000
-#define MII_CNTL_LPBK 0x4000
-#define MII_CNTL_RESET 0x8000
-
-/* MII Status register bit */
-#define MII_STAT_EXT 0x0001
-#define MII_STAT_JAB 0x0002
-#define MII_STAT_LINK 0x0004
-#define MII_STAT_CAN_AUTO 0x0008
-#define MII_STAT_FAULT 0x0010
-#define MII_STAT_AUTO_DONE 0x0020
-#define MII_STAT_CAN_T 0x0800
-#define MII_STAT_CAN_T_FDX 0x1000
-#define MII_STAT_CAN_TX 0x2000
-#define MII_STAT_CAN_TX_FDX 0x4000
-#define MII_STAT_CAN_T4 0x8000
-
-
-#define MII_ID1_OUI_LO 0xFC00 /* low bits of OUI mask */
-#define MII_ID1_MODEL 0x03F0 /* model number */
-#define MII_ID1_REV 0x000F /* model number */
-
-/* MII NWAY Register Bits ...
- valid for the ANAR (Auto-Negotiation Advertisement) and
- ANLPAR (Auto-Negotiation Link Partner) registers */
-#define MII_NWAY_NODE_SEL 0x001f
-#define MII_NWAY_CSMA_CD 0x0001
-#define MII_NWAY_T 0x0020
-#define MII_NWAY_T_FDX 0x0040
-#define MII_NWAY_TX 0x0080
-#define MII_NWAY_TX_FDX 0x0100
-#define MII_NWAY_T4 0x0200
-#define MII_NWAY_PAUSE 0x0400
-#define MII_NWAY_RF 0x2000 /* Remote Fault */
-#define MII_NWAY_ACK 0x4000 /* Remote Acknowledge */
-#define MII_NWAY_NP 0x8000 /* Next Page (Enable) */
-
-/* mii stsout register bits */
-#define MII_STSOUT_LINK_FAIL 0x4000
-#define MII_STSOUT_SPD 0x0080
-#define MII_STSOUT_DPLX 0x0040
-
-/* mii stsics register bits */
-#define MII_STSICS_SPD 0x8000
-#define MII_STSICS_DPLX 0x4000
-#define MII_STSICS_LINKSTS 0x0001
-
-/* mii stssum register bits */
-#define MII_STSSUM_LINK 0x0008
-#define MII_STSSUM_DPLX 0x0004
-#define MII_STSSUM_AUTO 0x0002
-#define MII_STSSUM_SPD 0x0001
-
-/* lsi phy status register */
-#define MII_LSI_PHY_STAT_FDX 0x0040
-#define MII_LSI_PHY_STAT_SPD 0x0080
-
-/* amd phy status register */
-#define MII_AMD_PHY_STAT_FDX 0x0800
-#define MII_AMD_PHY_STAT_SPD 0x0400
-
-/* intel phy status register */
-#define MII_INTEL_PHY_STAT_FDX 0x0200
-#define MII_INTEL_PHY_STAT_SPD 0x4000
-
-/* Auxilliary Control/Status Register */
-#define MII_AUX_FDX 0x0001
-#define MII_AUX_100 0x0002
-#define MII_AUX_F100 0x0004
-#define MII_AUX_ANEG 0x0008
-
-typedef struct mii_phy {
- struct mii_phy * next;
- struct mii_chip_info * chip_info;
- u16 status;
- u32 *mii_control_reg;
- u32 *mii_data_reg;
-} mii_phy_t;
-
-struct phy_ops {
- int (*phy_init) (struct net_device *, int);
- int (*phy_reset) (struct net_device *, int);
- int (*phy_status) (struct net_device *, int, u16 *, u16 *);
-};
-
/*
* Data Buffer Descriptor. Data buffers must be aligned on 32 byte
* boundary for both, receive and transmit.
@@ -200,7 +86,6 @@
struct au1000_private {
-
db_dest_t *pDBfree;
db_dest_t db[NUM_RX_BUFFS+NUM_TX_BUFFS];
volatile rx_dma_t *rx_dma_ring[NUM_RX_DMA];
@@ -213,8 +98,15 @@
u32 tx_full;
int mac_id;
- mii_phy_t *mii;
- struct phy_ops *phy_ops;
+
+ int mac_enabled; /* whether MAC is currently enabled and running (req. for mdio) */
+
+ int old_link; /* used by au1000_adjust_link */
+ int old_speed;
+ int old_duplex;
+
+ struct phy_device *phy_dev;
+ struct mii_bus mii_bus;
/* These variables are just for quick access to certain regs addresses. */
volatile mac_reg_t *mac; /* mac registers */
@@ -223,14 +115,6 @@
u32 vaddr; /* virtual address of rx/tx buffers */
dma_addr_t dma_addr; /* dma address of rx/tx buffers */
- u8 *hash_table;
- u32 hash_mode;
- u32 intr_work_done; /* number of Rx and Tx pkts processed in the isr */
- int phy_addr; /* phy address */
- u32 options; /* User-settable misc. driver options. */
- u32 drv_flags;
- int want_autoneg;
struct net_device_stats stats;
- struct timer_list timer;
spinlock_t lock; /* Serialise access to device */
};
--
^ permalink raw reply
* Re: [PATCH wireless-dev] d80211: Don't discriminate against 802.11b drivers
From: Michael Wu @ 2006-05-12 20:35 UTC (permalink / raw)
To: Jiri Benc; +Cc: John W. Linville, Jouni Malinen, netdev, jkmaline
In-Reply-To: <20060512124703.563dacd6@griffin.suse.cz>
On Friday 12 May 2006 06:47, you wrote:
> > It seems like hw_modes is more useful for saying
> > what modes shouldn't be used than saying what modes are supported by the
> > hardware and should be used.
>
> This is exactly the purpose of hw_modes. This also means you don't need
> any validation.
>
Hm, so why not add something that will tell you what modes are supported by
the hardware?
Only problem with this patch is if the hardware adds any modes after
registration, they will be disabled initially. Hopefully, no drivers will
actually need to do that.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
index ffb7985..e110237 100644
--- a/net/d80211/ieee80211.c
+++ b/net/d80211/ieee80211.c
@@ -3999,19 +3999,24 @@ void ieee80211_if_setup(struct net_devic
}
-static void ieee80211_precalc_rates(struct ieee80211_hw *hw)
+static void ieee80211_precalc_modes(struct ieee80211_hw *hw,
+ struct ieee80211_local *local)
{
struct ieee80211_hw_modes *mode;
struct ieee80211_rate *rate;
int m, r;
+ local->valid_hw_modes = 0;
for (m = 0; m < hw->num_modes; m++) {
mode = &hw->modes[m];
+ local->valid_hw_modes |= 1 << mode->mode;
for (r = 0; r < mode->num_rates; r++) {
rate = &mode->rates[r];
rate->rate_inv = CHAN_UTIL_RATE_LCM / rate->rate;
}
}
+
+ local->hw_modes &= local->valid_hw_modes;
}
@@ -4257,7 +4262,7 @@ int ieee80211_update_hw(struct net_devic
!hw->modes->num_channels || !hw->modes->num_rates)
return -1;
- ieee80211_precalc_rates(hw);
+ ieee80211_precalc_modes(hw, local);
local->conf.phymode = hw->modes[0].mode;
local->curr_rates = hw->modes[0].rates;
local->num_curr_rates = hw->modes[0].num_rates;
diff --git a/net/d80211/ieee80211_i.h b/net/d80211/ieee80211_i.h
index ee0b399..6f33a75 100644
--- a/net/d80211/ieee80211_i.h
+++ b/net/d80211/ieee80211_i.h
@@ -409,7 +409,6 @@ #define IEEE80211_IRQSAFE_QUEUE_LIMIT 12
int scan_oper_antenna_max;
u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
size_t scan_ssid_len;
- int scan_skip_11b;
struct list_head sta_bss_list;
struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE];
spinlock_t sta_bss_lock;
@@ -500,6 +499,8 @@ #endif /* CONFIG_D80211_DEBUG_COUNTERS *
int wifi_wme_noack_test;
unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
+ unsigned int valid_hw_modes; /* bitfield of supported hardware modes;
+ * (1 << MODE_*) */
unsigned int hw_modes; /* bitfield of allowed hardware modes;
* (1 << MODE_*) */
};
diff --git a/net/d80211/ieee80211_ioctl.c b/net/d80211/ieee80211_ioctl.c
index 5d31a8f..89db144 100644
--- a/net/d80211/ieee80211_ioctl.c
+++ b/net/d80211/ieee80211_ioctl.c
@@ -2447,7 +2447,7 @@ static int ieee80211_ioctl_prism2_param(
break;
case PRISM2_PARAM_HW_MODES:
- local->hw_modes = value;
+ local->hw_modes = value & local->valid_hw_modes;
break;
case PRISM2_PARAM_CREATE_IBSS:
diff --git a/net/d80211/ieee80211_sta.c b/net/d80211/ieee80211_sta.c
index 2720f1d..7955767 100644
--- a/net/d80211/ieee80211_sta.c
+++ b/net/d80211/ieee80211_sta.c
@@ -2468,7 +2468,7 @@ static void ieee80211_sta_scan_timer(uns
(sdata->type == IEEE80211_IF_TYPE_IBSS &&
!(chan->flag & IEEE80211_CHAN_W_IBSS)) ||
(local->hw_modes & (1 << MODE_IEEE80211G) &&
- mode->mode == MODE_IEEE80211B && local->scan_skip_11b))
+ mode->mode == MODE_IEEE80211B))
skip = 1;
if (!skip) {
@@ -2566,7 +2566,6 @@ int ieee80211_sta_req_scan(struct net_de
memcpy(local->scan_ssid, ssid, ssid_len);
} else
local->scan_ssid_len = 0;
- local->scan_skip_11b = 1; /* FIX: clear this is 11g is not supported */
local->scan_state = SCAN_SET_CHANNEL;
local->scan_hw_mode_idx = 0;
local->scan_channel_idx = 0;
^ permalink raw reply related
* Patches from Marcin Juszkiewicz
From: Pavel Roskin @ 2006-05-12 20:43 UTC (permalink / raw)
To: netdev, David Gibson
Hello!
As a co-maintainer of Orinoco driver, I'd like to ask the netdev team
not to apply any patch from Marcin Juszkiewicz touching the Orinoco
driver without my or David's explicit approval.
I'm fine with patches that change e.g. all PCMCIA or PCI drivers across
the board, but not with patches that remove IDs for compatible cards
that were carefully collected over the years.
Any patches for Orinoco drivers that don't come from kernel subsystem
maintainers should be sent to the driver mailing list at
orinoco-devel@lists.sourceforge.net
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: [PATCH 1/5] new pcmcia IDs for hostap - ASUS WL-110
From: Pavel Roskin @ 2006-05-12 20:44 UTC (permalink / raw)
To: Marcin Juszkiewicz; +Cc: netdev, Jouni Malinen
In-Reply-To: <200605121521.32410.linux-arm@hrw.one.pl>
On Fri, 2006-05-12 at 15:21 +0200, Marcin Juszkiewicz wrote:
> All patches require 24_hostap_cs_id.diff from Pavel Roskin.
This patch was never submitted. Please ignore the series.
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: Linux v2.6.17-rc4
From: Michael Buesch @ 2006-05-12 20:54 UTC (permalink / raw)
To: Olaf Hering; +Cc: Erik Mouw, netdev
In-Reply-To: <20060512112318.GA2115@suse.de>
On Friday 12 May 2006 13:23, you wrote:
> > > I got assertion failures in the bcm43xx driver:
> > >
> > > bcm43xx: Chip ID 0x4318, rev 0x2
> >
> > That is expected an non-fatal.
>
> Is this one in the same category?
> [ 79.087115] bcm43xx: WARNING: Writing invalid LOpair (low: 46, high: 104, index: 123)
> [ 47.361435] bcm43xx: Chip ID 0x4318, rev 0x2
^^^^^^
Yes, same problem.
--
Greetings Michael.
^ permalink raw reply
* Re: Linux v2.6.17-rc4
From: Michael Buesch @ 2006-05-12 20:58 UTC (permalink / raw)
To: Erik Mouw; +Cc: Linux Kernel Mailing List, netdev, Linus Torvalds
In-Reply-To: <20060512114659.GE30285@harddisk-recovery.com>
On Friday 12 May 2006 13:47, you wrote:
> On Fri, May 12, 2006 at 12:44:22PM +0200, Michael Buesch wrote:
> > On Friday 12 May 2006 12:24, you wrote:
> > > On Thu, May 11, 2006 at 04:44:03PM -0700, Linus Torvalds wrote:
> > > > Ok, I've let the release time between -rc's slide a bit too much again,
> > > > but -rc4 is out there, and this is the time to hunker down for 2.6.17.
> > > >
> > > > If you know of any regressions, please holler now, so that we don't miss
> > > > them.
> > >
> > > I got assertion failures in the bcm43xx driver:
> > >
> > > bcm43xx: Chip ID 0x4318, rev 0x2
> >
> > That is expected an non-fatal.
>
> Assertion failed sounds rather fatal to me.
But it is not fatal. Trust me. I am the author of most of the code.
The worst thing that can happen is that the card does not work.
The best thing that can happen is that it works with some luck.
> > It is no regression.
>
> It is, I didn't see it in 2.6.17-rc3.
You did not look close enough.
> > We are working on it, but there won't be any fix for 2.6.17, as
> > very intrusive changes are needed to fix this.
>
> If it's non-fatal, could you remove the assertion, or make it print
> something that sounds less fatal?
Well, the backtrace could be removed.
But I am for not removing the assertions completely, because
this way people don't see what is going on, if the device does not
work.
It is non-fatal in the sense that it does not crash the machine.
It _may_ be fatal, that the device does not work. The
driver is CONFIG_EXPERIMENTAL for some reason.
To say it again: The 4318 is not completely supported, yet.
It may work with some luck, but it is not guaranteed and only
lower bitrates are supported.
--
Greetings Michael.
^ permalink raw reply
* 2.6.16.13 e1000 reports incorrect PCI-X bus speed?
From: Ben Greear @ 2006-05-12 21:15 UTC (permalink / raw)
To: NetDev
I'm running a slightly modified 2.6.16.13 kernel on FC5-amd64. The motherboard
is SuperMicro H8SSL dual-core AMD system. According to super-micro web site,
the PCI-X slot is 133Mhz. I'm using a 4-port pro/1000 NIC.
dmesg shows a listing of 120Mhz:
Intel(R) PRO/1000 Network Driver - version 6.3.9-k4-NAPI
Copyright (c) 1999-2005 Intel Corporation.
GSI 18 sharing vector 0xB9 and IRQ 18
ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 20 (level, low) -> IRQ 18
e1000: 0000:03:04.0: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bc
e1000: eth2: e1000_probe: Intel(R) PRO/1000 Network Connection
GSI 19 sharing vector 0xC1 and IRQ 19
ACPI: PCI Interrupt 0000:03:04.1[B] -> GSI 21 (level, low) -> IRQ 19
e1000: 0000:03:04.1: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bd
e1000: eth3: e1000_probe: Intel(R) PRO/1000 Network Connection
GSI 20 sharing vector 0xC9 and IRQ 20
ACPI: PCI Interrupt 0000:03:06.0[A] -> GSI 22 (level, low) -> IRQ 20
e1000: 0000:03:06.0: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:be
e1000: eth4: e1000_probe: Intel(R) PRO/1000 Network Connection
GSI 21 sharing vector 0xD1 and IRQ 21
ACPI: PCI Interrupt 0000:03:06.1[B] -> GSI 23 (level, low) -> IRQ 21
e1000: 0000:03:06.1: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bf
e1000: eth5: e1000_probe: Intel(R) PRO/1000 Network Connection
ethtool -d eth3 shows 66Mhz:
....
0x00008: STATUS (Device status register) 0x00003B87
Duplex: full
Link up: link config
TBI mode: disabled
Link speed: 1000Mb/s
Bus type: PCI-X
Bus speed: 66MHz
Bus width: 64-bit
Any idea why I see the slower bus speed reported?
More info available as needed.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: Linux v2.6.17-rc4
From: Alistair John Strachan @ 2006-05-12 21:19 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Kernel Mailing List, aabdulla, jeff, netdev
In-Reply-To: <Pine.LNX.4.64.0605111640010.3866@g5.osdl.org>
On Friday 12 May 2006 00:44, Linus Torvalds wrote:
> Ok, I've let the release time between -rc's slide a bit too much again,
> but -rc4 is out there, and this is the time to hunker down for 2.6.17.
>
> If you know of any regressions, please holler now, so that we don't miss
> them.
>
> -rc4 itself is mainly random driver fixes (sound, infiniband, scsi,
> network drivers), but some splice fixes too and some arch (arm, powerpc,
> mips) updates. Shortlog follows,
Linus,
I've got an oops in the forcedeth driver on shutdown. Sorry for the crappy
camera phone pictures, this board doesn't have RS232 ports:
http://devzero.co.uk/~alistair/oops-20060512/
It was initially difficult to reproduce, but I found I could do so reliably if
I ssh'ed into the box and halted it remotely, then it would always oops on
shutdown. I assume this is because the driver is still active when something
happens to it during halt.
There's been just a single commit since -rc3:
forcedeth: fix multi irq issues
ebf34c9b6fcd22338ef764b039b3ac55ed0e297b
However, it could have just been hidden since before -rc3, so I'll try to work
backwards if nobody has any immediate ideas..
--
Cheers,
Alistair.
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
^ permalink raw reply
* Re: 2.6.16.13 e1000 reports incorrect PCI-X bus speed?
From: Auke Kok @ 2006-05-12 21:33 UTC (permalink / raw)
To: netdev
In-Reply-To: <4464FB01.6070206@candelatech.com>
Ben Greear wrote:
> I'm running a slightly modified 2.6.16.13 kernel on FC5-amd64. The
> motherboard
> is SuperMicro H8SSL dual-core AMD system. According to super-micro web
> site,
> the PCI-X slot is 133Mhz. I'm using a 4-port pro/1000 NIC.
>
> dmesg shows a listing of 120Mhz:
>
> Intel(R) PRO/1000 Network Driver - version 6.3.9-k4-NAPI
> Copyright (c) 1999-2005 Intel Corporation.
> GSI 18 sharing vector 0xB9 and IRQ 18
> ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 20 (level, low) -> IRQ 18
> e1000: 0000:03:04.0: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bc
> e1000: eth2: e1000_probe: Intel(R) PRO/1000 Network Connection
> GSI 19 sharing vector 0xC1 and IRQ 19
> ACPI: PCI Interrupt 0000:03:04.1[B] -> GSI 21 (level, low) -> IRQ 19
> e1000: 0000:03:04.1: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bd
> e1000: eth3: e1000_probe: Intel(R) PRO/1000 Network Connection
> GSI 20 sharing vector 0xC9 and IRQ 20
> ACPI: PCI Interrupt 0000:03:06.0[A] -> GSI 22 (level, low) -> IRQ 20
> e1000: 0000:03:06.0: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:be
> e1000: eth4: e1000_probe: Intel(R) PRO/1000 Network Connection
> GSI 21 sharing vector 0xD1 and IRQ 21
> ACPI: PCI Interrupt 0000:03:06.1[B] -> GSI 23 (level, low) -> IRQ 21
> e1000: 0000:03:06.1: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bf
> e1000: eth5: e1000_probe: Intel(R) PRO/1000 Network Connection
>
> ethtool -d eth3 shows 66Mhz:
> ....
> 0x00008: STATUS (Device status register) 0x00003B87
> Duplex: full
> Link up: link config
> TBI mode: disabled
> Link speed: 1000Mb/s
> Bus type: PCI-X
> Bus speed: 66MHz
> Bus width: 64-bit
>
> Any idea why I see the slower bus speed reported?
ethtool currently doesn't know about some bus speeds, and will report a wrong
speed. Here's what ethtool currently uses: (ethtool-3/e1000.c)
327 (reg & E1000_STATUS_PCIX_MODE) ?
328 ((reg & E1000_STATUS_PCIX_SPEED_133) ? "133MHz" :
329 (reg & E1000_STATUS_PCIX_SPEED_100) ? "100MHz" :
330 "66MHz")> :
obviously 120 is missing, but PCI-E speeds are also missing (2500gbps). The
output of the e1000 module is correct.
Auke
^ permalink raw reply
* Re: 2.6.16.13 e1000 reports incorrect PCI-X bus speed?
From: Rick Jones @ 2006-05-12 21:41 UTC (permalink / raw)
To: Ben Greear; +Cc: NetDev
In-Reply-To: <4464FB01.6070206@candelatech.com>
Ben Greear wrote:
> I'm running a slightly modified 2.6.16.13 kernel on FC5-amd64. The
> motherboard
> is SuperMicro H8SSL dual-core AMD system. According to super-micro web
> site,
> the PCI-X slot is 133Mhz. I'm using a 4-port pro/1000 NIC.
>
> dmesg shows a listing of 120Mhz:
IIRC there is a bridge chip on those four-port cards. Perhaps the
"north" side of the bridge is at 133 MHz, but the south side (since it
is more than one load) is only 120?
> Intel(R) PRO/1000 Network Driver - version 6.3.9-k4-NAPI
> Copyright (c) 1999-2005 Intel Corporation.
> GSI 18 sharing vector 0xB9 and IRQ 18
> ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 20 (level, low) -> IRQ 18
> e1000: 0000:03:04.0: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bc
> e1000: eth2: e1000_probe: Intel(R) PRO/1000 Network Connection
> GSI 19 sharing vector 0xC1 and IRQ 19
> ACPI: PCI Interrupt 0000:03:04.1[B] -> GSI 21 (level, low) -> IRQ 19
> e1000: 0000:03:04.1: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bd
> e1000: eth3: e1000_probe: Intel(R) PRO/1000 Network Connection
> GSI 20 sharing vector 0xC9 and IRQ 20
> ACPI: PCI Interrupt 0000:03:06.0[A] -> GSI 22 (level, low) -> IRQ 20
> e1000: 0000:03:06.0: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:be
> e1000: eth4: e1000_probe: Intel(R) PRO/1000 Network Connection
> GSI 21 sharing vector 0xD1 and IRQ 21
> ACPI: PCI Interrupt 0000:03:06.1[B] -> GSI 23 (level, low) -> IRQ 21
> e1000: 0000:03:06.1: e1000_probe: (PCI-X:120MHz:64-bit) 00:04:23:ad:41:bf
> e1000: eth5: e1000_probe: Intel(R) PRO/1000 Network Connection
>
> ethtool -d eth3 shows 66Mhz:
> ....
> 0x00008: STATUS (Device status register) 0x00003B87
> Duplex: full
> Link up: link config
> TBI mode: disabled
> Link speed: 1000Mb/s
> Bus type: PCI-X
> Bus speed: 66MHz
> Bus width: 64-bit
>
> Any idea why I see the slower bus speed reported?
That one though escapes me.
rick jones
>
> More info available as needed.
>
> Thanks,
> Ben
>
^ permalink raw reply
* Re: network freeze with nforce-A939 integrated rhine card
From: Roger Luethi @ 2006-05-12 21:41 UTC (permalink / raw)
To: David Lang; +Cc: linux-kernel, netdev
In-Reply-To: <Pine.LNX.4.62.0605112235170.2802@qnivq.ynat.uz>
On Thu, 11 May 2006 22:59:44 -0700, David Lang wrote:
> I haven't had time to go back and find where is started (my prior kernel
> was 2.6.15-rc7), but with 2.6.17-rc1/2/3/4 I've been running into a
> problem where when transfering large amounts of data (trying to ftp a TB
"where is started" sounds as if it used to work at some point. In your
second posting, however, you note that the problem goes back at least to
2.6.13. So are there any kernels known not to exhibit the problem you
described?
> when I say shut down I mean that it looses link and requires powering down
> the box (hard power down, not just power off from the front panel),
> disabling the network card in the BIOS, booting (as far as lilo is
> enough), powering down again, enabling the card and booting again.
So there are two problem areas: 1) the chip hangs itself without the driver
noticing and 2) the BIOS fails to bring the chip back to life afterwards.
> there is no indication of trouble before the halt (it's transfering at
> full speed), the only think in the log is
> May 11 22:23:57 david kernel: eth0: link down
> May 11 22:24:00 david kernel: eth0: link up, 100Mbps, full-duplex, lpa
> 0xCDE1
> May 11 22:24:22 david kernel: eth0: link down
>
> if I don't do the disable/enable in the bios cycle and just power cycle
> the system the card does not initialize properly (ethtool reports
> autonegotiation disabled, 10Mb. will generate an 'unsupported' error if I
> try to enable the card)
Any difference in the kernel log when booting with (or ethtooling) a
comatose chip?
> dlang@david:~$ /sbin/lspci
> 00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 0204
> 00:00.1 Host bridge: VIA Technologies, Inc.: Unknown device 1204
> 00:00.2 Host bridge: VIA Technologies, Inc.: Unknown device 2204
> 00:00.3 Host bridge: VIA Technologies, Inc.: Unknown device 3204
> 00:00.4 Host bridge: VIA Technologies, Inc.: Unknown device 4204
> 00:00.7 Host bridge: VIA Technologies, Inc.: Unknown device 7204
> 00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800 South]
> 00:08.0 RAID bus controller: Triones Technologies, Inc. HPT374 (rev 07)
> 00:08.1 RAID bus controller: Triones Technologies, Inc. HPT374 (rev 07)
> 00:0a.0 Ethernet controller: Olicom OC-2326 (rev 01)
> 00:0f.0 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06)
> 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
> 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
> 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
> 00:10.3 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
> 00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
> 00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South]
> 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
> 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
> 00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
> 00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
> 00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
> 00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
> 01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 SE] (rev 01)
Odd. This doesn't look at all like the list I'd expect from an nforce-A939.
I thought Nvidia devices featured rather prominently in the device lists of
nforce-based boards!?
Roger
^ permalink raw reply
* Re: [PATCH] fix IP-over-ATM and ARP interaction - formatting fixed.
From: David S. Miller @ 2006-05-12 21:54 UTC (permalink / raw)
To: simon; +Cc: netdev
In-Reply-To: <E1FcQAK-00054Z-00@thekelleys.org.uk>
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Sat, 06 May 2006 18:02:00 +0100
> This patch adds a new function, neigh_table_init_no_netlink() which
> does everything the neigh_table_init() does, except add the table to
> the netlink all-arp-tables chain. In addition neigh_table_init() has a
> check that all tables on the chain have a distinct address family.
> The init call in clip.c is changed to call neigh_table_init_no_netlink().
>
> Since ATM ARP tables are rather more complicated than can currently be
> handled by the available rtattrs in the netlink protocol, no
> functionality is lost by this patch, and non-ATM ARP manipulation via
> netlink is rescued. A more complete solution would involve a rtattr for
> ATM ARP entries and some way for the netlink code to give neigh_add
> and friends more information than just address family with which to find
> the correct ARP table.
>
> Signed-off-by: Simon Kelley <simon@thekelleys.org.uk>
This is an OK solution to this problem for now. So I will apply
this.
I made a minor change to your patch, I changed the assertion added to
neigh_table_init(). It's not so nice to BUG_ON() with critical locks
held just to get a log of who tried to do the double-registry. It
could cause the machine to deadlock and subsequently the debugging
log we need to analyze such cases is less likely to get reported.
Longer term we should make neigh_table_init() return some kind of
error code to handle cases like this, but that's too large a change
for so close to 2.6.17-final.
Thanks again Simon.
^ permalink raw reply
* Re: 2.6.16.13 e1000 reports incorrect PCI-X bus speed?
From: Ben Greear @ 2006-05-12 22:26 UTC (permalink / raw)
To: Auke Kok; +Cc: netdev
In-Reply-To: <4464FF41.7060000@intel.com>
Auke Kok wrote:
> obviously 120 is missing, but PCI-E speeds are also missing (2500gbps). The
> output of the e1000 module is correct.
Any idea why 120Mhz is used instead of 133? It doesn't
seem to matter in my performance tests, but I am curious...
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: network freeze with nforce-A939 integrated rhine card
From: David Lang @ 2006-05-13 5:21 UTC (permalink / raw)
To: Roger Luethi; +Cc: linux-kernel, netdev
In-Reply-To: <20060512214109.GD2274@k3.hellgate.ch>
On Fri, 12 May 2006, Roger Luethi wrote:
> On Thu, 11 May 2006 22:59:44 -0700, David Lang wrote:
>> I haven't had time to go back and find where is started (my prior kernel
>> was 2.6.15-rc7), but with 2.6.17-rc1/2/3/4 I've been running into a
>> problem where when transfering large amounts of data (trying to ftp a TB
>
> "where is started" sounds as if it used to work at some point. In your
> second posting, however, you note that the problem goes back at least to
> 2.6.13. So are there any kernels known not to exhibit the problem you
> described?
when I posted this origionally I thought it was new in 2.6.17-rc, however
since my testing with older kernels hasn't found me a working one yet I
suspect that other factors have been involved with makeing it work.
these failures have been on multi-gig files ftp'd from the raid array on
my machine to the raid array on the replacement machine. In the past I've
sucessfully transfered similar sized files to/from my tivo (slow network),
my laptop (slow drive), and smaller sets of files to single drives on
other systems (7200rpm drives, but not to arrays).
as I type this I'm starting a test going from a single drive on this
machine to the raid array on the remote machine to transfer ~84G of data.
My suspicion is that this is going to work.
>> when I say shut down I mean that it looses link and requires powering down
>> the box (hard power down, not just power off from the front panel),
>> disabling the network card in the BIOS, booting (as far as lilo is
>> enough), powering down again, enabling the card and booting again.
>
> So there are two problem areas: 1) the chip hangs itself without the driver
> noticing and 2) the BIOS fails to bring the chip back to life afterwards.
yes
>> there is no indication of trouble before the halt (it's transfering at
>> full speed), the only think in the log is
>> May 11 22:23:57 david kernel: eth0: link down
>> May 11 22:24:00 david kernel: eth0: link up, 100Mbps, full-duplex, lpa
>> 0xCDE1
>> May 11 22:24:22 david kernel: eth0: link down
>>
>> if I don't do the disable/enable in the bios cycle and just power cycle
>> the system the card does not initialize properly (ethtool reports
>> autonegotiation disabled, 10Mb. will generate an 'unsupported' error if I
>> try to enable the card)
>
> Any difference in the kernel log when booting with (or ethtooling) a
> comatose chip?
I haven't checked the boot logs, I'll do that. ethtool hasn't generated
any logs that I've seen. after the current transfer finishes I'll trigger
the bug and test this.
>> dlang@david:~$ /sbin/lspci
>> 00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 0204
>> 00:00.1 Host bridge: VIA Technologies, Inc.: Unknown device 1204
>> 00:00.2 Host bridge: VIA Technologies, Inc.: Unknown device 2204
>> 00:00.3 Host bridge: VIA Technologies, Inc.: Unknown device 3204
>> 00:00.4 Host bridge: VIA Technologies, Inc.: Unknown device 4204
>> 00:00.7 Host bridge: VIA Technologies, Inc.: Unknown device 7204
>> 00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800 South]
>> 00:08.0 RAID bus controller: Triones Technologies, Inc. HPT374 (rev 07)
>> 00:08.1 RAID bus controller: Triones Technologies, Inc. HPT374 (rev 07)
>> 00:0a.0 Ethernet controller: Olicom OC-2326 (rev 01)
>> 00:0f.0 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06)
>> 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
>> 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
>> 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
>> 00:10.3 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 81)
>> 00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
>> 00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South]
>> 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
>> 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
>> 00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
>> 00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
>> 00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
>> 00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
>> 01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 SE] (rev 01)
>
> Odd. This doesn't look at all like the list I'd expect from an nforce-A939.
> I thought Nvidia devices featured rather prominently in the device lists of
> nforce-based boards!?
you're right, it's the new server that has the nforce board. I'll have to
check the motherboard version when I reboot it.
David Lang
^ permalink raw reply
* Re: [Bugme-new] [Bug 6530] New: MAINLINE
From: Paul Mackerras @ 2006-05-13 5:27 UTC (permalink / raw)
To: xeb; +Cc: Andy Gay, bugme-daemon, netdev, Andrew Morton
In-Reply-To: <20060510225633.1b53d4f8.akpm@osdl.org>
Andrew Morton writes:
> xeb (who forgot to do reply-to-all) tells me that pptpd uses ptys.
I tried to replicate this using pppd running on a pty, with a
"charshunt" process on the master side of the pty transferring
characters between it and a socket. I didn't see any freezeups in
either direction. So - precise details on how to replicate this would
be appreciated.
Paul.
^ permalink raw reply
* Re: network freeze with nforce-A939 integrated rhine card
From: David Lang @ 2006-05-13 8:26 UTC (permalink / raw)
To: Roger Luethi; +Cc: linux-kernel, netdev
In-Reply-To: <Pine.LNX.4.62.0605122209330.2803@qnivq.ynat.uz>
On Fri, 12 May 2006, David Lang wrote:
> On Fri, 12 May 2006, Roger Luethi wrote:
>
>> On Thu, 11 May 2006 22:59:44 -0700, David Lang wrote:
>>> I haven't had time to go back and find where is started (my prior kernel
>>> was 2.6.15-rc7), but with 2.6.17-rc1/2/3/4 I've been running into a
>>> problem where when transfering large amounts of data (trying to ftp a TB
>>
>> "where is started" sounds as if it used to work at some point. In your
>> second posting, however, you note that the problem goes back at least to
>> 2.6.13. So are there any kernels known not to exhibit the problem you
>> described?
>
> when I posted this origionally I thought it was new in 2.6.17-rc, however
> since my testing with older kernels hasn't found me a working one yet I
> suspect that other factors have been involved with makeing it work.
>
> these failures have been on multi-gig files ftp'd from the raid array on my
> machine to the raid array on the replacement machine. In the past I've
> sucessfully transfered similar sized files to/from my tivo (slow network), my
> laptop (slow drive), and smaller sets of files to single drives on other
> systems (7200rpm drives, but not to arrays).
>
> as I type this I'm starting a test going from a single drive on this machine
> to the raid array on the remote machine to transfer ~84G of data. My
> suspicion is that this is going to work.
I just confirmed this, I was able to transfer 84G with no trouble starting
from /dev/hdb, but starting from /dev/md0 the nic hung in less then 3G
a good boot logs
eth0: VIA Rhine II at 0xe8121000, 00:11:5b:f4:14:a3, IRQ 17.
eth0: MII PHY found at address 1, status 0x7869 advertising 05e1 Link cde1.
root@david:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000001 (1)
Link detected: yes
David Lang
^ permalink raw reply
* Block Http
From: varun @ 2006-05-13 10:03 UTC (permalink / raw)
To: netdev
Hi,
Can anyone suggest me a way in which i can stop http downloads
but not http traffic.
Say iam browsing and downloading a file from internet...my
traffic will go through the gateway. Is there anyway i
as a admin stop the download only but not the other http
traffic.Any suggestions?
Varun
^ 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