* [PATCH 2/5] s390: qeth driver fixes
From: Frank Pavlic @ 2006-05-24 7:51 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
From: Ursula Braun <braunu@de.ibm.com>
From: Frank Pavlic <fpavlic@de.ibm.com>
- correct checking of sscanf-%n value in qeth_string_to_ipaddr().
- don't use netif_stop_queue outside the hard_start_xmit routine.
Rather use netif_tx_disable.
- don't call qeth_netdev_init on a recovery.
Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
---
drivers/s390/net/qeth.h | 2 +-
drivers/s390/net/qeth_main.c | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
ef153db1ac07db7ec4eba2ec29237c58944b5c7b
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 4df0fcd..65e2b1b 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -1099,7 +1099,7 @@ qeth_string_to_ipaddr4(const char *buf,
rc = sscanf(buf, "%d.%d.%d.%d%n",
&in[0], &in[1], &in[2], &in[3], &count);
- if (rc != 4 || count)
+ if (rc != 4 || count<=0)
return -EINVAL;
for (count = 0; count < 4; count++) {
if (in[count] > 255)
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index cb14642..0f6648f 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -3817,7 +3817,7 @@ qeth_stop(struct net_device *dev)
card = (struct qeth_card *) dev->priv;
- netif_stop_queue(dev);
+ netif_tx_disable(dev);
card->dev->flags &= ~IFF_UP;
if (card->state == CARD_STATE_UP)
card->state = CARD_STATE_SOFTSETUP;
@@ -6359,12 +6359,9 @@ qeth_netdev_init(struct net_device *dev)
dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid;
dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid;
#endif
- dev->hard_header = card->orig_hard_header;
if (qeth_get_netdev_flags(card) & IFF_NOARP) {
dev->rebuild_header = NULL;
dev->hard_header = NULL;
- if (card->options.fake_ll)
- dev->hard_header = qeth_fake_header;
dev->header_cache_update = NULL;
dev->hard_header_cache = NULL;
}
@@ -6477,6 +6474,9 @@ retry:
/*network device will be recovered*/
if (card->dev) {
card->dev->hard_header = card->orig_hard_header;
+ if (card->options.fake_ll &&
+ (qeth_get_netdev_flags(card) & IFF_NOARP))
+ card->dev->hard_header = qeth_fake_header;
return 0;
}
/* at first set_online allocate netdev */
@@ -7031,7 +7031,7 @@ qeth_softsetup_ipv6(struct qeth_card *ca
QETH_DBF_TEXT(trace,3,"softipv6");
- netif_stop_queue(card->dev);
+ netif_tx_disable(card->dev);
rc = qeth_send_startlan(card, QETH_PROT_IPV6);
if (rc) {
PRINT_ERR("IPv6 startlan failed on %s\n",
@@ -7352,7 +7352,8 @@ qeth_set_large_send(struct qeth_card *ca
card->options.large_send = type;
return 0;
}
- netif_stop_queue(card->dev);
+ if (card->state == CARD_STATE_UP)
+ netif_tx_disable(card->dev);
card->options.large_send = type;
switch (card->options.large_send) {
case QETH_LARGE_SEND_EDDP:
@@ -7374,7 +7375,8 @@ qeth_set_large_send(struct qeth_card *ca
card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG);
break;
}
- netif_wake_queue(card->dev);
+ if (card->state == CARD_STATE_UP)
+ netif_wake_queue(card->dev);
return rc;
}
@@ -7427,7 +7429,7 @@ qeth_softsetup_card(struct qeth_card *ca
if ((rc = qeth_setrouting_v6(card)))
QETH_DBF_TEXT_(setup, 2, "5err%d", rc);
out:
- netif_stop_queue(card->dev);
+ netif_tx_disable(card->dev);
return 0;
}
@@ -7736,10 +7738,8 @@ static int
qeth_register_netdev(struct qeth_card *card)
{
QETH_DBF_TEXT(setup, 3, "regnetd");
- if (card->dev->reg_state != NETREG_UNINITIALIZED) {
- qeth_netdev_init(card->dev);
+ if (card->dev->reg_state != NETREG_UNINITIALIZED)
return 0;
- }
/* sysfs magic */
SET_NETDEV_DEV(card->dev, &card->gdev->dev);
return register_netdev(card->dev);
--
1.2.4
^ permalink raw reply related
* [PATCH 1/5] s390: minor fix in cu3088
From: Frank Pavlic @ 2006-05-24 7:51 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
Hi Jeff,
please apply following 5 patches.
Thanks ...
Frank
From: Cornelia Huck <cornelia.huck@de.ibm.com>
In case of a parse error for the cu3088 group attribute,
return -EINVAL instead of count.
Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
---
drivers/s390/net/cu3088.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
99e5e7d1a3245f4416290a336bc9fc8107d05d5e
diff --git a/drivers/s390/net/cu3088.c b/drivers/s390/net/cu3088.c
index b125331..e1b8c9a 100644
--- a/drivers/s390/net/cu3088.c
+++ b/drivers/s390/net/cu3088.c
@@ -77,7 +77,7 @@ group_write(struct device_driver *drv, c
int len;
if (!(end = strchr(start, delim[i])))
- return count;
+ return -EINVAL;
len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1);
strlcpy (bus_ids[i], start, len);
argv[i] = bus_ids[i];
--
1.2.4
^ permalink raw reply related
* What's in netdev-2.6.git
From: Jeff Garzik @ 2006-05-24 7:06 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
The 'upstream' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
contains the following updates (queued for 2.6.18):
Documentation/networking/README.ipw2200 | 10
MAINTAINERS | 6
drivers/net/Kconfig | 33
drivers/net/Makefile | 2
drivers/net/au1000_eth.c | 206 -
drivers/net/cassini.c | 9
drivers/net/e1000/Makefile | 3
drivers/net/e1000/e1000.h | 6
drivers/net/e1000/e1000_ethtool.c | 47
drivers/net/e1000/e1000_hw.c | 115
drivers/net/e1000/e1000_hw.h | 7
drivers/net/e1000/e1000_main.c | 271 --
drivers/net/e1000/e1000_osdep.h | 3
drivers/net/e1000/e1000_param.c | 3
drivers/net/ibmlana.c | 20
drivers/net/ibmlana.h | 6
drivers/net/ibmveth.c | 291 +-
drivers/net/ibmveth.h | 11
drivers/net/ixgb/ixgb.h | 9
drivers/net/ixgb/ixgb_ethtool.c | 55
drivers/net/ixgb/ixgb_hw.h | 1
drivers/net/ixgb/ixgb_ids.h | 4
drivers/net/ixgb/ixgb_main.c | 132 -
drivers/net/ixgb/ixgb_param.c | 24
drivers/net/myri10ge/Makefile | 5
drivers/net/myri10ge/myri10ge.c | 2851 ++++++++++++++++++++++++
drivers/net/myri10ge/myri10ge_mcp.h | 205 +
drivers/net/myri10ge/myri10ge_mcp_gen_header.h | 58
drivers/net/pcmcia/pcnet_cs.c | 42
drivers/net/phy/Kconfig | 6
drivers/net/phy/Makefile | 1
drivers/net/phy/smsc.c | 101
drivers/net/s2io-regs.h | 32
drivers/net/s2io.c | 1476 +++++++++---
drivers/net/s2io.h | 59
drivers/net/sis900.c | 26
drivers/net/sis900.h | 10
drivers/net/sky2.c | 19
drivers/net/smc911x.c | 2307 +++++++++++++++++++
drivers/net/smc911x.h | 835 +++++++
drivers/net/smc91x.h | 18
drivers/net/wan/pci200syn.c | 27
drivers/net/wireless/Kconfig | 30
drivers/net/wireless/airo.c | 271 +-
drivers/net/wireless/bcm43xx/bcm43xx.h | 1
drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | 2
drivers/net/wireless/bcm43xx/bcm43xx_main.c | 35
drivers/net/wireless/hermes.c | 66
drivers/net/wireless/hermes.h | 43
drivers/net/wireless/hostap/hostap_80211_tx.c | 1
drivers/net/wireless/hostap/hostap_ap.c | 11
drivers/net/wireless/hostap/hostap_cs.c | 6
drivers/net/wireless/hostap/hostap_main.c | 2
drivers/net/wireless/ipw2200.c | 849 ++++++-
drivers/net/wireless/ipw2200.h | 83
drivers/net/wireless/orinoco.c | 251 --
drivers/net/wireless/orinoco.h | 19
drivers/net/wireless/orinoco_cs.c | 42
drivers/net/wireless/orinoco_nortel.c | 171 -
drivers/net/wireless/orinoco_pci.c | 210 -
drivers/net/wireless/orinoco_pci.h | 104
drivers/net/wireless/orinoco_plx.c | 223 -
drivers/net/wireless/orinoco_tmd.c | 99
drivers/net/wireless/spectrum_cs.c | 81
drivers/pci/pci.c | 3
drivers/s390/net/Makefile | 3
drivers/s390/net/ctcmain.c | 45
drivers/s390/net/ctcmain.h | 12
drivers/s390/net/ctctty.c | 1259 ----------
drivers/s390/net/ctctty.h | 35
include/linux/pci.h | 2
include/linux/pci_ids.h | 2
include/net/ieee80211.h | 6
include/net/ieee80211softmac.h | 38
include/net/ieee80211softmac_wx.h | 5
net/ieee80211/ieee80211_crypt_tkip.c | 11
net/ieee80211/ieee80211_rx.c | 18
net/ieee80211/ieee80211_tx.c | 63
net/ieee80211/ieee80211_wx.c | 44
net/ieee80211/softmac/ieee80211softmac_assoc.c | 74
net/ieee80211/softmac/ieee80211softmac_auth.c | 3
net/ieee80211/softmac/ieee80211softmac_event.c | 25
net/ieee80211/softmac/ieee80211softmac_module.c | 117
net/ieee80211/softmac/ieee80211softmac_priv.h | 5
net/ieee80211/softmac/ieee80211softmac_wx.c | 36
85 files changed, 10278 insertions(+), 3480 deletions(-)
Adrian Bunk:
ieee80211_wx.c: remove dead code
drivers/net/s2io.c: make bus_speed[] static
Ananda Raju:
s2io: performance improvements
s2io: input parms, output messages update
s2io: fixes
s2io: additional stats
s2io: init/shutdown fixes
Arjan van de Ven:
unused exports in wireless drivers
Auke Kok:
e1000: Remove PM warning DPRINTKs breaking 2.4.x kernels
e1000: Esb2 wol link cycle bug and uninitialized registers
e1000: De-inline functions to benefit from compiler smartness
e1000: Made an adapter struct variable into a local (txb2b)
e1000: Update truesize with the length of the packet for packet split
e1000: Dead variable cleanup
e1000: Buffer optimizations for small MTU
e1000: implement more efficient tx queue locking
e1000: Version bump, contact fix, year string change
{e100{,0},ixgb}: Add Auke Kok as new patch maintainer for e{100,1000} and ixgb
e1000: fix mispatch for media type detect.
e1000: fix mismerge skb_put.
ixgb: fix rare early tso completion
ixgb: remove duplicate code setting duplex and speed
ixgb: fix flow control
ixgb: add NETIF_F_LLTX analogous to e1000
ixgb: add copper 10gig driver id
ixgb: remove hardcoded number
ixgb: use DPRINTK and msglvl, and ethtool to control it
ixgb: add tx timeout counter
ixgb: increment version to 1.0.104-k2
e1000: add shutdown handler back to fix WOL
e1000: remove backslash r debug printfs
e1000: remove leading and trailing whitespace.
e1000: Fix date string in Makefile
e1000: remove changelog in driver
e1000: bump version to 7.0.38-k4
Brice Goglin:
Revive pci_find_ext_capability
Add Myri-10G Ethernet driver
Dan Williams:
wireless/airo: minimal WPA awareness
Daniel Drake:
softmac: deauthentication implies deassociation
softmac: suggest per-frame-type TX rate
Daniele Venzano:
Add VLAN (802.1q) support to sis900 driver
Dustin McIntire:
RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips
Florin Malita:
orinoco: possible null pointer dereference in orinoco_rx_monitor()
Frank Pavlic:
s390: remove tty support from ctc network device driver [1/2]
s390: remove tty support from ctc network device driver [2/2]
Herbert Valerio Riedel:
phy: new SMSC LAN83C185 PHY driver
Jeff Garzik:
[netdrvr smc911x] trim trailing whitespace
[netdrvr pcnet_cs, myri] trim trailing whitespace
[netdrvr ibmlana, ibmveth] trim trailing whitespace
Jiri Benc:
orinoco: fix BAP0 offset error after several days of operation
Johannes Berg:
sungem: Marvell PHY suspend
softmac: add SIOCSIWMLME
softmac: clean up event handling code
Krzysztof Halasa:
Goramo PCI200SYN WAN driver subsystem ID patch
Lennert Buytenhek:
smc91x: add support for LogicPD PXA270 platform
Marc Zyngier:
netdrvr: Convert cassini to pci_iomap
Marcin Juszkiewicz:
hostap: new pcmcia IDs
pcnet_cs: Add TRENDnet TE-CF100 ethernet adapter ID
Michael Buesch:
bcm43xx: use pci_iomap() for convenience.
Michal Schmidt:
wireless/airo: minimal WPA awareness
Pavel Roskin:
orinoco: Remove useless CIS validation
orinoco: remove PCMCIA audio support, it's useless for wireless cards
orinoco: remove underscores from little-endian field names
orinoco: remove tracing code, it's unused
orinoco: remove debug buffer code and userspace include support
orinoco: Symbol card supported by spectrum_cs is LA4137, not LA4100
orinoco: optimize Tx exception handling in orinoco
orinoco: orinoco_xmit() should only return valid symbolic constants
orinoco replace hermes_write_words() with hermes_write_bytes()
orinoco: don't use any padding for Tx frames
orinoco: refactor and clean up Tx error handling
orinoco: simplify 802.3 encapsulation code
orinoco: delay FID allocation after firmware initialization
orinoco_pci: disable device and free IRQ when suspending
orinoco_pci: use pci_iomap() for resources
orinoco: support PCI suspend/resume for Nortel, PLX and TMD adaptors
orinoco: reduce differences between PCI drivers, create orinoco_pci.h
orinoco: further comment cleanup in the PCI drivers
orinoco: bump version to 0.15
orinoco: unregister network device before releasing PCMCIA resources
orinoco: report more relevant data on startup
orinoco: simplify locking, fix error handling in PCMCIA resume
orinoco: eliminate the suspend/resume functions if CONFIG_PM is unset
orinoco: don't put PCI resource data to the network device
Santiago Leon:
ibmveth change buffer pools dynamically
Sergei Shtylyov:
au1000_eth.c probe code straightened up
Stefano Brivio:
bcm43xx: fix whitespace
bcm43xx: add PCI ID for bcm4319
Stephen Hemminger:
sky2: fix jumbo packet support
Zhu Yi:
ieee80211: Fix TKIP MIC calculation for QoS frames
ieee80211: Fix TX code doesn't enable QoS when using WPA + QoS
ieee80211: export list of bit rates with standard WEXT procddures
ieee80211: remove unnecessary CONFIG_WIRELESS_EXT checking
ieee80211: replace debug IEEE80211_WARNING with each own debug macro
ieee80211: update version stamp to 1.1.13
ipw2200: Exponential averaging for signal and noise Level
ipw2200: Fix TX QoS enabled frames problem
ipw2200: generates a scan event after a scan has completed
ipw2200: add module_param support for antenna selection
ipw2200: fix compile warning when !CONFIG_IPW2200_DEBUG
ipw2200: Do not continue loading the firmware if kmalloc fails
ipw2200: turn off signal debug log
ipw2200: Set the 'fixed' flags in wext get_rate
ipw2200: Fix endian issues with v3.0 fw image format
README.ipw2200: rename CONFIG_IPW_DEBUG to CONFIG_IPW2200_DEBUG
ipw2200: Enable rtap interface for RF promiscuous mode while associated
ipw2200: version string rework
ipw2200: update version stamp to 1.1.2
ipw2200: rename CONFIG_IPW_QOS to CONFIG_IPW2200_QOS
wireless Kconfig add IPW2200_RADIOTAP
ipw2200: rename CONFIG_IEEE80211_RADIOTAP to CONFIG_IPW2200_RADIOTAP
ipw2200: remove priv->last_noise reference
ipw2200: Fix wpa_supplicant association problem
^ permalink raw reply
* [git patches] net driver fixes
From: Jeff Garzik @ 2006-05-24 7:04 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following updates:
drivers/net/sky2.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
Stephen Hemminger:
sky2: fix jumbo packet support
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 60779eb..9591096 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -979,6 +979,7 @@ static int sky2_rx_start(struct sky2_por
struct sky2_hw *hw = sky2->hw;
unsigned rxq = rxqaddr[sky2->port];
int i;
+ unsigned thresh;
sky2->rx_put = sky2->rx_next = 0;
sky2_qset(hw, rxq);
@@ -1003,9 +1004,21 @@ static int sky2_rx_start(struct sky2_por
sky2_rx_add(sky2, re->mapaddr);
}
- /* Truncate oversize frames */
- sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), sky2->rx_bufsize - 8);
- sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON);
+
+ /*
+ * The receiver hangs if it receives frames larger than the
+ * packet buffer. As a workaround, truncate oversize frames, but
+ * the register is limited to 9 bits, so if you do frames > 2052
+ * you better get the MTU right!
+ */
+ thresh = (sky2->rx_bufsize - 8) / sizeof(u32);
+ if (thresh > 0x1ff)
+ sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_OFF);
+ else {
+ sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), thresh);
+ sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON);
+ }
+
/* Tell chip about available buffers */
sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put);
^ permalink raw reply related
* Re: [PATCH] phy: new SMSC LAN83C185 PHY driver
From: Jeff Garzik @ 2006-05-24 6:52 UTC (permalink / raw)
To: Herbert Valerio Riedel; +Cc: netdev
In-Reply-To: <E1FimtG-00050T-Co@fencepost.gnu.org>
applied
^ permalink raw reply
* Re: [resend PATCH 1/1] b44: fix ethool link settings support
From: Jeff Garzik @ 2006-05-24 6:41 UTC (permalink / raw)
To: Gary Zambrano; +Cc: netdev
In-Reply-To: <1146065509.28067.52.camel@dhcp-10-7-81-7.broadcom.com>
Gary Zambrano wrote:
> + if (cmd->advertising & ADVERTISE_ALL) {
> + if (cmd->advertising & ADVERTISE_10HALF)
> + bp->flags |= B44_FLAG_ADV_10HALF;
> + if (cmd->advertising & ADVERTISE_10FULL)
> + bp->flags |= B44_FLAG_ADV_10FULL;
> + if (cmd->advertising & ADVERTISE_100HALF)
> + bp->flags |= B44_FLAG_ADV_100HALF;
> + if (cmd->advertising & ADVERTISE_100FULL)
> + bp->flags |= B44_FLAG_ADV_100FULL;
> + } else {
> + bp->flags |= (B44_FLAG_ADV_10HALF |
> + B44_FLAG_ADV_10FULL |
> + B44_FLAG_ADV_100HALF |
> + B44_FLAG_ADV_100FULL);
> + }
The logic above is backwards. I presume the first test should be
if (!(cmd->advertising & ADVERTISE_ALL))
The rest looks OK.
Jeff
^ permalink raw reply
* Re: [PATCH 1/9] [I/OAT] DMA memcpy subsystem
From: Nathan Lynch @ 2006-05-24 6:31 UTC (permalink / raw)
To: Andrew Morton; +Cc: Chris Leech, linux-kernel, netdev
In-Reply-To: <20060523174827.0ce1943b.akpm@osdl.org>
Andrew Morton wrote:
> Chris Leech <christopher.leech@intel.com> wrote:
> >
> > + for_each_cpu(i)
>
> That's about to be deleted. Please use for_each_possible_cpu().
>
> That's if for_each_possible_cpu() is appropriate.
It is -- those loops traverse chan->local, which is alloc_percpu'd,
which allocates for all possible cpus.
^ permalink raw reply
* [PATCH] phy: new SMSC LAN83C185 PHY driver
From: Herbert Valerio Riedel @ 2006-05-07 21:22 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
new SMSC LAN83C185 10BaseT/100BaseTX PHY driver for the PHY subsystem
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
---
just a resend of
http://marc.theaimsgroup.com/?l=linux-netdev&m=114703725817039&w=2
drivers/net/phy/Kconfig | 6 +++
drivers/net/phy/Makefile | 1
drivers/net/phy/smsc.c | 101 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 108 insertions(+), 0 deletions(-)
create mode 100644 drivers/net/phy/smsc.c
549b2b826ddca6a15b39f88cdc9f45e9131eaac0
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index fa39b94..cda3e53 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -45,5 +45,11 @@ config CICADA_PHY
---help---
Currently supports the cis8204
+config SMSC_PHY
+ tristate "Drivers for SMSC PHYs"
+ depends on PHYLIB
+ ---help---
+ Currently supports the LAN83C185 PHY
+
endmenu
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index e4116a5..d961413 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -8,3 +8,4 @@ obj-$(CONFIG_DAVICOM_PHY) += davicom.o
obj-$(CONFIG_CICADA_PHY) += cicada.o
obj-$(CONFIG_LXT_PHY) += lxt.o
obj-$(CONFIG_QSEMI_PHY) += qsemi.o
+obj-$(CONFIG_SMSC_PHY) += smsc.o
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
new file mode 100644
index 0000000..25e31fb
--- /dev/null
+++ b/drivers/net/phy/smsc.c
@@ -0,0 +1,101 @@
+/*
+ * drivers/net/phy/smsc.c
+ *
+ * Driver for SMSC PHYs
+ *
+ * Author: Herbert Valerio Riedel
+ *
+ * Copyright (c) 2006 Herbert Valerio Riedel <hvr@gnu.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/phy.h>
+#include <linux/netdevice.h>
+
+#define MII_LAN83C185_ISF 29 /* Interrupt Source Flags */
+#define MII_LAN83C185_IM 30 /* Interrupt Mask */
+
+#define MII_LAN83C185_ISF_INT1 (1<<1) /* Auto-Negotiation Page Received */
+#define MII_LAN83C185_ISF_INT2 (1<<2) /* Parallel Detection Fault */
+#define MII_LAN83C185_ISF_INT3 (1<<3) /* Auto-Negotiation LP Ack */
+#define MII_LAN83C185_ISF_INT4 (1<<4) /* Link Down */
+#define MII_LAN83C185_ISF_INT5 (1<<5) /* Remote Fault Detected */
+#define MII_LAN83C185_ISF_INT6 (1<<6) /* Auto-Negotiation complete */
+#define MII_LAN83C185_ISF_INT7 (1<<7) /* ENERGYON */
+
+#define MII_LAN83C185_ISF_INT_ALL (0x0e)
+
+#define MII_LAN83C185_ISF_INT_PHYLIB_EVENTS \
+ (MII_LAN83C185_ISF_INT6 | MII_LAN83C185_ISF_INT4)
+
+
+static int lan83c185_config_intr(struct phy_device *phydev)
+{
+ int rc = phy_write (phydev, MII_LAN83C185_IM,
+ ((PHY_INTERRUPT_ENABLED == phydev->interrupts)
+ ? MII_LAN83C185_ISF_INT_PHYLIB_EVENTS
+ : 0));
+
+ return rc < 0 ? rc : 0;
+}
+
+static int lan83c185_ack_interrupt(struct phy_device *phydev)
+{
+ int rc = phy_read (phydev, MII_LAN83C185_ISF);
+
+ return rc < 0 ? rc : 0;
+}
+
+static int lan83c185_config_init(struct phy_device *phydev)
+{
+ return lan83c185_ack_interrupt (phydev);
+}
+
+
+static struct phy_driver lan83c185_driver = {
+ .phy_id = 0x0007c0a0, /* OUI=0x00800f, Model#=0x0a */
+ .phy_id_mask = 0xfffffff0,
+ .name = "SMSC LAN83C185",
+
+ .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
+ | SUPPORTED_Asym_Pause),
+ .flags = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+
+ /* basic functions */
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .config_init = lan83c185_config_init,
+
+ /* IRQ related */
+ .ack_interrupt = lan83c185_ack_interrupt,
+ .config_intr = lan83c185_config_intr,
+
+ .driver = { .owner = THIS_MODULE, }
+};
+
+static int __init smsc_init(void)
+{
+ return phy_driver_register (&lan83c185_driver);
+}
+
+static void __exit smsc_exit(void)
+{
+ phy_driver_unregister (&lan83c185_driver);
+}
+
+MODULE_DESCRIPTION("SMSC PHY driver");
+MODULE_AUTHOR("Herbert Valerio Riedel");
+MODULE_LICENSE("GPL");
+
+module_init(smsc_init);
+module_exit(smsc_exit);
--
1.3.2
^ permalink raw reply related
* Re: Sign-off for the IP1000A driver before inclusion
From: Pekka J Enberg @ 2006-05-24 6:13 UTC (permalink / raw)
To: jesse\(建興\)
Cc: Francois Romieu, David Vrabel, linux-kernel, netdev, david, akpm
In-Reply-To: <044a01c67ef8$9bdd0420$4964a8c0@icplus.com.tw>
On Wed, 24 May 2006, jesse\(??\)\) wrote:
> We had read this document, but we can't find any blank at which we can sign.
> Could you tell us where we can sign it off.
You sign it off in the patch submission. It's enough that you agree on it
and let us know a sign off line:
Signed-off-by: John Doe <john.doe@somewhere.com>
which the patch submitter (probably Francois) adds to the patch
when it is being submitted. There is no actual documentation you need to
sign off. Thanks.
Pekka
^ permalink raw reply
* Re: Sign-off for the IP1000A driver before inclusion
From: jesse\(建興\) @ 2006-05-24 6:09 UTC (permalink / raw)
To: Pekka Enberg
Cc: Francois Romieu, David Vrabel, linux-kernel, netdev, david, akpm
In-Reply-To: <84144f020605230001s32b29f59w8f95c67fad7b380d@mail.gmail.com>
Dear Pekka:
We had read this document, but we can't find any blank at which we can sign.
Could you tell us where we can sign it off.
Thanks!
Jesse
----- Original Message -----
From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "jesse(建興)" <jesse@icplus.com.tw>
Cc: "Francois Romieu" <romieu@fr.zoreil.com>; "David Vrabel"
<dvrabel@cantab.net>; <linux-kernel@vger.kernel.org>;
<netdev@vger.kernel.org>; <david@pleyades.net>; <akpm@osdl.org>
Sent: Tuesday, May 23, 2006 3:01 PM
Subject: Sign-off for the IP1000A driver before inclusion
Hi Jesse,
On 5/23/06, jesse\(建興\) <jesse@icplus.com.tw> wrote:
> If any problem, please feel free to contact me. jesse@icplus.com.tw
As per:
http://marc.theaimsgroup.com/?l=linux-kernel&m=114666027122495
we still need someone from IC Plus to sign off on the IP1000A driver
for it to be merged with mainline Linux.
For more details on the Developer's Certificate of Origin, please
refer to:
http://www.osdl.org/newsroom/press_releases/2004/2004_05_24_dco.html
or Documentation/SubmittingPatches.
Pekka
^ permalink raw reply
* Re: [HAMRADIO] Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
From: Jeff Garzik @ 2006-05-24 5:30 UTC (permalink / raw)
To: Ralf Baechle DL5RB; +Cc: netdev, linux-hams
In-Reply-To: <20060429143413.GA4630@linux-mips.org>
Ralf Baechle DL5RB wrote:
> Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
ACK but does not apply
Applying 'Remove remaining SET_MODULE_OWNER calls from hamradio drivers.'
error: patch failed: drivers/net/hamradio/dmascc.c:582
error: drivers/net/hamradio/dmascc.c: patch does not apply
error: patch failed: drivers/net/hamradio/scc.c:1550
error: drivers/net/hamradio/scc.c: patch does not apply
error: patch failed: drivers/net/hamradio/yam.c:1098
error: drivers/net/hamradio/yam.c: patch does not apply
^ permalink raw reply
* Re: [PATCH] au1000_eth.c: use ether_crc() from <linux/crc32.h>
From: Jeff Garzik @ 2006-05-24 5:29 UTC (permalink / raw)
To: Herbert Valerio Riedel; +Cc: netdev, linux-mips, sshtylyov
In-Reply-To: <E1FaYil-0007A8-HB@fencepost.gnu.org>
Herbert Valerio Riedel wrote:
> since the au1000 driver already selects the CRC32 routines, simply replace
> the internal ether_crc() implementation with the semantically equivalent
> one from <linux/crc32.h>
>
> Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
does not apply, please resend
^ permalink raw reply
* Re: [patch 1/2] spidernet: enable support for bcm5461 ethernet phy
From: Jeff Garzik @ 2006-05-24 5:29 UTC (permalink / raw)
To: Jens.Osterkamp; +Cc: netdev, arndb, utz.bacher
In-Reply-To: <200605041159.41470.Jens.Osterkamp@de.ibm.com>
Jens Osterkamp wrote:
> From: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
>
> A newer board revision changed the type of ethernet phy.
> Moreover, this generalizes the way that a phy gets switched
> into fiber mode when autodetection is not available.
>
> Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
>
> ---
> Index: linus-2.6/drivers/net/sungem_phy.c
> ===================================================================
> --- linus-2.6.orig/drivers/net/sungem_phy.c
> +++ linus-2.6/drivers/net/sungem_phy.c
> @@ -329,6 +329,30 @@ static int bcm5421_init(struct mii_phy*
> return 0;
> }
>
> +static int bcm5421_enable_fiber(struct mii_phy* phy)
> +{
> + /* enable fiber mode */
> + phy_write(phy, MII_NCONFIG, 0x9020);
> + /* LEDs active in both modes, autosense prio = fiber */
> + phy_write(phy, MII_NCONFIG, 0x945f);
> +
> + /* switch off fibre autoneg */
> + phy_write(phy, MII_NCONFIG, 0xfc01);
> + phy_write(phy, 0x0b, 0x0004);
> +
> + return 0;
> +}
> +
> +static int bcm5461_enable_fiber(struct mii_phy* phy)
> +{
> + phy_write(phy, MII_NCONFIG, 0xfc0c);
> + phy_write(phy, MII_BMCR, 0x4140);
> + phy_write(phy, MII_NCONFIG, 0xfc0b);
> + phy_write(phy, MII_BMCR, 0x0140);
NAK, failed to apply. Also, the whitespace above is borked.
Jeff
^ permalink raw reply
* Re: [-mm patch] drivers/net/s2io.c: make bus_speed[] static
From: Jeff Garzik @ 2006-05-24 5:28 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Andrew Morton, Ananda Raju, linux-kernel, netdev
In-Reply-To: <20060516153050.GC5677@stusta.de>
Adrian Bunk wrote:
> On Mon, May 15, 2006 at 12:56:37AM -0700, Andrew Morton wrote:
>> ...
>> Changes since 2.6.17-rc3-mm1:
>> ...
>> git-netdev-all.patch
>> ...
>> git trees
>> ...
>
>
> This patch makes the needlessly global bus_speed[] static.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
applied
^ permalink raw reply
* Re: [PATCH] sky2: fix jumbo packet support
From: Jeff Garzik @ 2006-05-24 4:36 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20060522120342.20f752e5@localhost.localdomain>
Stephen Hemminger wrote:
> The truncate threshold calculation to prevent receiver from getting stuck
> was incorrect, and it didn't take into account the upper limit on bits
> in the register so the jumbo packet support was broken.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
applied
^ permalink raw reply
* Re: Please pull 'upstream' branch of wireless-2.6
From: Jeff Garzik @ 2006-05-24 4:35 UTC (permalink / raw)
To: John W. Linville, netdev
In-Reply-To: <20060522191942.GE13964@tuxdriver.com>
John W. Linville wrote:
> The following changes since commit 01d654d25d23fb73deb7904ce1c0b3a0f5fc2908:
> John W. Linville:
> Merge branch 'upstream-fixes' into upstream
>
> are found in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream
>
> Marcin Juszkiewicz:
> hostap: new pcmcia IDs
>
> drivers/net/wireless/hostap/hostap_cs.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
WTF??? I pull, and see diffstat:
Merge db21e578e551421d76641d72cb3f8296ed3f9e61, made by recursive.
drivers/net/wireless/airo.c | 2
drivers/net/wireless/bcm43xx/bcm43xx_main.c | 8 +-
drivers/net/wireless/hostap/hostap_80211_tx.c | 1
drivers/net/wireless/hostap/hostap_ap.c | 11 --
drivers/net/wireless/hostap/hostap_cs.c | 6 +
drivers/net/wireless/hostap/hostap_main.c | 2
drivers/net/wireless/orinoco_cs.c | 33 ++----
drivers/net/wireless/orinoco_nortel.c | 5 +
drivers/net/wireless/orinoco_pci.c | 5 +
drivers/net/wireless/orinoco_pci.h | 31 +-----
drivers/net/wireless/orinoco_plx.c | 5 +
drivers/net/wireless/orinoco_tmd.c | 5 +
drivers/net/wireless/spectrum_cs.c | 33 ++----
include/net/ieee80211softmac.h | 38 ++++++-
net/ieee80211/ieee80211_wx.c | 2
net/ieee80211/softmac/ieee80211softmac_assoc.c | 72 +++++++-------
net/ieee80211/softmac/ieee80211softmac_auth.c | 3 +
net/ieee80211/softmac/ieee80211softmac_module.c | 117
+++++++++++++++++++----
net/ieee80211/softmac/ieee80211softmac_priv.h | 6 +
net/ieee80211/softmac/ieee80211softmac_wx.c | 6 +
20 files changed, 228 insertions(+), 163 deletions(-)
This is vastly different from any 'pull upstream' email I've received
from you. It is extremely uncool for me to pull, and receive something
other than what your email specified.
Nonetheless, I looked over the changes and they look OK, so I took the
lazy route and kept them.
For the future, I would perhaps recommend creating an upstream-jeff
branch at the time of submission, if you insist upon continuing to push
stuff into the upstream branch in the window between submission and
pull. I do this with Linus: I create an 'upstream-linus' branch,
branched off of 'upstream', at the time of submission. After Linus
pulls, I delete the branch.
Jeff
^ permalink raw reply
* Re: [PATCH] pcnet_cs: Add TRENDnet TE-CF100 ethernet adapter ID
From: Jeff Garzik @ 2006-05-24 4:29 UTC (permalink / raw)
To: Marcin Juszkiewicz; +Cc: netdev, Andrew Morton
In-Reply-To: <200605231115.58969.linux-arm@hrw.one.pl>
Marcin Juszkiewicz wrote:
> From: Marcin Juszkiewicz <openembedded@hrw.one.pl>
>
> Add TRENDnet TE-CF100 ethernet adapter to pcnet_cs list.
>
> product info: "Fast Ethernet", "CF Size PC Card", "1.0", ""
> manfid: 0x0149, 0xc1ab
>
> Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
applied
^ permalink raw reply
* Re: Please pull 'upstream-fixes' branch of wireless-2.6
From: Jeff Garzik @ 2006-05-24 4:26 UTC (permalink / raw)
To: John W. Linville, netdev, akpm
In-Reply-To: <20060522191759.GD13964@tuxdriver.com>
John W. Linville wrote:
> The following changes since commit 353b28bafd1b962359a866ff263a7fad833d29a1:
> David S. Miller:
> [SPARC]: Add robust futex syscall entries.
>
> are found in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-fixes
>
> Florin Malita:
> orinoco: possible null pointer dereference in orinoco_rx_monitor()
skipping, went in via akpm apparently.
Though, it'll dup the changeset when I pull upstream.
Jeff
^ permalink raw reply
* reminder, 2.6.18 window...
From: David Miller @ 2006-05-24 1:22 UTC (permalink / raw)
To: netdev
Some time in the next few weeks, it is likely that the 2.6.18
merge window will open up shortly after a 2.6.17 release.
So if you have major 2.6.18 submissions planned for the networking,
you need to start thinking about getting it to me now.
There is a 2.6.18 tree up at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.18.git
All it has right now is the I/O AT stuff at the moment, and I plan to
put Stephen Hemminger's LLC multicast/datagram changes in there as
well.
Thanks.
^ permalink raw reply
* Re: [PATCH 3/9] [I/OAT] Setup the networking subsystem as a DMA client
From: David Miller @ 2006-05-24 1:13 UTC (permalink / raw)
To: christopher.leech; +Cc: linux-kernel, netdev
In-Reply-To: <20060524002014.19403.93371.stgit@gitlost.site>
From: Chris Leech <christopher.leech@intel.com>
Date: Tue, 23 May 2006 17:20:15 -0700
> +static void net_dma_rebalance(void)
> +{
> + unsigned int cpu, i, n;
> + struct dma_chan *chan;
> +
> + lock_cpu_hotplug();
You can't call lock_cpu_hotplug(), because that sleeps and takes
semaphores and we currently hold a spinlock taken here:
> +static void netdev_dma_event(struct dma_client *client, struct dma_chan *chan,
> + enum dma_event event)
> +{
> + spin_lock(&net_dma_event_lock);
> + switch (event) {
> + case DMA_RESOURCE_ADDED:
> + net_dma_count++;
> + net_dma_rebalance();
> + break;
You'll need to run this DMA rebalancing asynchronously in process
context via keventd or similar to deal with this locking bug.
^ permalink raw reply
* Re: [Bugme-new] [Bug 6610] New: dummy interface broadcast destination hardware address is not ff:ff:ff:ff:ff:ff
From: Herbert Xu @ 2006-05-24 1:10 UTC (permalink / raw)
To: David Miller; +Cc: akpm, bugme-daemon, netdev
In-Reply-To: <20060523.165343.104035136.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@osdl.org>
> Date: Tue, 23 May 2006 16:31:42 -0700
>
>> > Summary: dummy interface broadcast destination hardware address
>> > is not ff:ff:ff:ff:ff:ff
>
> Very strange because the dummy device driver calls
> ether_setup() which does:
It's caused by the NO_ARP flag.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 8/9] [I/OAT] Add a sysctl for tuning the I/OAT offloaded I/O threshold
From: Andrew Morton @ 2006-05-24 1:02 UTC (permalink / raw)
To: Chris Leech; +Cc: linux-kernel, netdev
In-Reply-To: <20060524002021.19403.15607.stgit@gitlost.site>
Chris Leech <christopher.leech@intel.com> wrote:
>
> Any socket recv of less than this ammount will not be offloaded
>
> Signed-off-by: Chris Leech <christopher.leech@intel.com>
> ---
>
> include/linux/sysctl.h | 1 +
> include/net/tcp.h | 1 +
> net/core/user_dma.c | 4 ++++
> net/ipv4/sysctl_net_ipv4.c | 10 ++++++++++
> 4 files changed, 16 insertions(+), 0 deletions(-)
>
Documentation/networking/ip-sysctl.txt too, please.
^ permalink raw reply
* Re: [PATCH 2/9] [I/OAT] Driver for the Intel(R) I/OAT DMA engine
From: Andrew Morton @ 2006-05-24 0:56 UTC (permalink / raw)
To: Chris Leech; +Cc: linux-kernel, netdev
In-Reply-To: <20060524002013.19403.57410.stgit@gitlost.site>
Chris Leech <christopher.leech@intel.com> wrote:
>
> +static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan)
> +{
> + unsigned long phys_complete;
> + struct ioat_desc_sw *desc, *_desc;
> + dma_cookie_t cookie = 0;
> +
> + prefetch(chan->completion_virt);
> +
> + if (!spin_trylock(&chan->cleanup_lock))
> + return;
> +
spin_trylock() is a red flag. It often means that someone screwed their
locking up.
It at least needs a comment explaining its presence.
^ permalink raw reply
* Re: [PATCH 1/9] [I/OAT] DMA memcpy subsystem
From: Andrew Morton @ 2006-05-24 0:51 UTC (permalink / raw)
To: Chris Leech; +Cc: linux-kernel, netdev
In-Reply-To: <20060524002012.19403.50151.stgit@gitlost.site>
Chris Leech <christopher.leech@intel.com> wrote:
>
> +/**
> + * dma_client_chan_free - release a DMA channel
> + * @chan: &dma_chan
> + */
> +void dma_chan_cleanup(struct kref *kref)
> +{
> + struct dma_chan *chan = container_of(kref, struct dma_chan, refcount);
> + chan->device->device_free_chan_resources(chan);
> + chan->client = NULL;
> + kref_put(&chan->device->refcount, dma_async_device_cleanup);
> +}
> +
> +static void dma_chan_free_rcu(struct rcu_head *rcu)
> +{
> + struct dma_chan *chan = container_of(rcu, struct dma_chan, rcu);
> + int bias = 0x7FFFFFFF;
> + int i;
> + for_each_cpu(i)
> + bias -= local_read(&per_cpu_ptr(chan->local, i)->refcount);
> + atomic_sub(bias, &chan->refcount.refcount);
> + kref_put(&chan->refcount, dma_chan_cleanup);
> +}
> +
> +static void dma_client_chan_free(struct dma_chan *chan)
> +{
> + atomic_add(0x7FFFFFFF, &chan->refcount.refcount);
> + chan->slow_ref = 1;
> + call_rcu(&chan->rcu, dma_chan_free_rcu);
> +}
A comment describing this `bias' magic would be nice.
^ permalink raw reply
* Re: [PATCH 1/9] [I/OAT] DMA memcpy subsystem
From: Andrew Morton @ 2006-05-24 0:48 UTC (permalink / raw)
To: Chris Leech; +Cc: linux-kernel, netdev
In-Reply-To: <20060524002012.19403.50151.stgit@gitlost.site>
Chris Leech <christopher.leech@intel.com> wrote:
>
> + for_each_cpu(i)
That's about to be deleted. Please use for_each_possible_cpu().
That's if for_each_possible_cpu() is appropriate. Perhaps it should be
using for_each_present_cpu(), or for_each_online_cpu(). That's why
for_each_cpu() is going away - to make people think about such things..
^ 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