net driver fixes
Subsystems (3)
PATCH 1/1 net driver fixes
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
drivers/net/cxgb3/common.h | 7 +- drivers/net/cxgb3/cxgb3_main.c | 16 ++-- drivers/net/cxgb3/cxgb3_offload.c | 14 +--- drivers/net/cxgb3/regs.h | 6 ++ drivers/net/cxgb3/xgmac.c | 107 +++++++++++++++++++------- drivers/net/myri10ge/myri10ge.c | 37 ++++++--- drivers/net/skge.c | 93 ++++++++++++++--------- drivers/net/sky2.c | 12 ++- drivers/net/wireless/bcm43xx/bcm43xx_main.c | 20 +++++- drivers/net/wireless/bcm43xx/bcm43xx_phy.c | 57 ++++++++------ drivers/net/wireless/zd1211rw/zd_chip.c | 12 +-- drivers/net/wireless/zd1211rw/zd_chip.h | 4 +- drivers/net/wireless/zd1211rw/zd_rf_al2230.c | 6 ++ 13 files changed, 257 insertions(+), 134 deletions(-)
Brice Goglin (3):
myri10ge: fix management of the firmware 4KB boundary crossing restriction
myri10ge: more Intel chipsets providing aligned PCIe completions
myri10ge: update driver version to 1.3.0-1.233
Daniel Drake (2):
zd1211rw: Reject AL2230S devices
zd1211rw: Fix E2P_PHY_REG patching
Divy Le Ray (3):
cxgb3 - avoid deadlock with mac watchdog cxgb3 - MAC watchdog update
cxgb3 - missing CPL hanler and register setting.
Larry Finger (2):
bcm43xx: Fix 802.11b/g scan limits to match regulatory reqs
bcm43xx: Fix PPC machine checks and match loopback gain specs
Stephen Hemminger (5):
skge: turn carrier off when down
sky2: turn carrier off when down
sky2: turn on clocks when doing resume
sky2: phy workarounds for Yukon EC-U A1
skge: fix wake on lan
drivers/net/cxgb3/common.h +5 -2
@@ -478,8 +478,11 @@ struct cmac {struct adapter *adapter;unsigned int offset;unsigned int nucast;/* # of address filters for unicast MACs */ -unsigned int tcnt; -unsigned int xcnt; +unsigned int tx_tcnt; +unsigned int tx_xcnt; +u64 tx_mcnt; +unsigned int rx_xcnt; +u64 rx_mcnt;unsigned int toggle_cnt;unsigned int txen;struct mac_stats stats;
drivers/net/cxgb3/cxgb3_main.c +9 -7
@@ -194,15 +194,13 @@ void t3_os_link_changed(struct adapter *adapter, int port_id, int link_stat,if (link_stat !=netif_carrier_ok (dev)) {if (link_stat) { -t3_set_reg_field (adapter, -A_XGM_TXFIFO_CFG + mac->offset, -F_ENDROPPKT ,0 ); +t3_mac_enable (mac,MAC_DIRECTION_RX );netif_carrier_on (dev); }else {netif_carrier_off (dev); -t3_set_reg_field (adapter, -A_XGM_TXFIFO_CFG + mac->offset, -F_ENDROPPKT ,F_ENDROPPKT ); + pi->phy.ops->power_down (&pi->phy,1 ); +t3_mac_disable (mac,MAC_DIRECTION_RX ); +t3_link_start (&pi->phy, mac, &pi->link_config); }link_report (dev);
@@ -772,6 +770,8 @@ static int cxgb_up(struct adapter *adap)if (err) goto out; +t3_write_reg (adap,A_ULPRX_TDDP_PSZ ,V_HPZ0 (PAGE_SHIFT -12 )); + err =setup_sge_qsets (adap);if (err) goto out;
@@ -2119,7 +2119,9 @@ static void check_t3b2_mac(struct adapter *adapter) {int i; -rtnl_lock ();/* synchronize with ifdown */ +if (!rtnl_trylock ())/* synchronize with ifdown */ +return ; +for_each_port (adapter, i) {struct net_device *dev = adapter->port[i];struct port_info *p =netdev_priv (dev);
drivers/net/cxgb3/cxgb3_offload.c +2 -12
@@ -743,17 +743,6 @@ static int do_act_establish(struct t3cdev *dev, struct sk_buff *skb) } } -static int do_set_tcb_rpl (struct t3cdev *dev,struct sk_buff *skb) -{ -struct cpl_set_tcb_rpl *rpl =cplhdr (skb); - -if (rpl->status !=CPL_ERR_NONE ) -printk (KERN_ERR -"Unexpected SET_TCB_RPL status %u for tid %u\n" , - rpl->status,GET_TID (rpl)); -return CPL_RET_BUF_DONE ; -} -static int do_trace (struct t3cdev *dev,struct sk_buff *skb) {struct cpl_trace_pkt *p =cplhdr (skb);
@@ -1215,7 +1204,8 @@ void __init cxgb3_offload_init(void)t3_register_cpl_handler (CPL_CLOSE_CON_RPL , do_hwtid_rpl);t3_register_cpl_handler (CPL_ABORT_REQ_RSS , do_abort_req_rss);t3_register_cpl_handler (CPL_ACT_ESTABLISH , do_act_establish); -t3_register_cpl_handler (CPL_SET_TCB_RPL , do_set_tcb_rpl); +t3_register_cpl_handler (CPL_SET_TCB_RPL , do_hwtid_rpl); +t3_register_cpl_handler (CPL_GET_TCB_RPL , do_hwtid_rpl);t3_register_cpl_handler (CPL_RDMA_TERMINATE , do_term);t3_register_cpl_handler (CPL_RDMA_EC_STATUS , do_hwtid_rpl);t3_register_cpl_handler (CPL_TRACE_PKT , do_trace);
drivers/net/cxgb3/regs.h +6 -0
@@ -1234,9 +1234,15 @@#define A_ULPRX_ISCSI_TAGMASK 0x514 +#define S_HPZ0 0 +#define M_HPZ0 0xf +#define V_HPZ0 (x) ((x) << S_HPZ0) +#define G_HPZ0 (x) (((x) >> S_HPZ0) & M_HPZ0) +#define A_ULPRX_TDDP_LLIMIT 0x51c#define A_ULPRX_TDDP_ULIMIT 0x520 +#define A_ULPRX_TDDP_PSZ 0x528#define A_ULPRX_STAG_LLIMIT 0x52c
drivers/net/cxgb3/xgmac.c +80 -27
147 lines not on this page · raw message
drivers/net/myri10ge/myri10ge.c +25 -12
@@ -71,7 +71,7 @@#include "myri10ge_mcp.h" #include "myri10ge_mcp_gen_header.h" -#define MYRI10GE_VERSION_STR "1.3.0-1.227" +#define MYRI10GE_VERSION_STR "1.3.0-1.233"MODULE_DESCRIPTION ("Myricom 10G driver (10GbE)" );MODULE_AUTHOR ("Maintainer: [email protected]" );
@@ -900,19 +900,9 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,/* try to refill entire ring */ while (rx->fill_cnt != (rx->cnt + rx->mask +1 )) { idx = rx->fill_cnt & rx->mask; - -if ((bytes <MYRI10GE_ALLOC_SIZE /2 ) && - (rx->page_offset + bytes <=MYRI10GE_ALLOC_SIZE )) { +if (rx->page_offset + bytes <=MYRI10GE_ALLOC_SIZE ) {/* we can use part of previous page */ get_page (rx->page); -#if MYRI10GE_ALLOC_SIZE >4096 -/* Firmware cannot cross 4K boundary.. */ -if ((rx->page_offset >>12 ) != - ((rx->page_offset + bytes -1 ) >>12 )) { - rx->page_offset = - (rx->page_offset + bytes) & ~4095 ; - } -#endif }else {/* we need a new page */ page =
@@ -941,6 +931,13 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,/* start next packet on a cacheline boundary */ rx->page_offset +=SKB_DATA_ALIGN (bytes); + +#if MYRI10GE_ALLOC_SIZE >4096 +/* don't cross a 4KB boundary */ +if ((rx->page_offset >>12 ) != + ((rx->page_offset + bytes -1 ) >>12 )) + rx->page_offset = (rx->page_offset +4096 ) & ~4095 ; +#endif rx->fill_cnt++;/* copy 8 descriptors to the firmware at a time */
@@ -2490,6 +2487,10 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)#define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7#define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa +#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1 0x3510 +#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4 0x351b +#define PCI_DEVICE_ID_INTEL_E3000_PCIE 0x2779 +#define PCI_DEVICE_ID_INTEL_E3010_PCIE 0x277a#define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST 0x140#define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST 0x142
@@ -2529,6 +2530,18 @@ static void myri10ge_select_firmware(struct myri10ge_priv *mgp) PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST && bridge->device <= PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST) + /* All Intel E3000/E3010 PCIE ports */ + || (bridge->vendor == PCI_VENDOR_ID_INTEL + && (bridge->device == + PCI_DEVICE_ID_INTEL_E3000_PCIE + || bridge->device == + PCI_DEVICE_ID_INTEL_E3010_PCIE)) + /* All Intel 6310/6311/6321ESB PCIE ports */ + || (bridge->vendor == PCI_VENDOR_ID_INTEL + && bridge->device >= + PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1 + && bridge->device <= + PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4) /* All Intel E5000 PCIE ports */ || (bridge->vendor == PCI_VENDOR_ID_INTEL && bridge->device >=
drivers/net/skge.c +58 -35
150 lines not on this page · raw message
drivers/net/sky2.c +9 -3
@@ -510,9 +510,9 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) ledover &= ~PHY_M_LED_MO_RX ; } -if (hw->chip_id ==CHIP_ID_YUKON_EC_U && hw->chip_rev ==CHIP_REV_YU_EC_A1 ) { +if (hw->chip_id ==CHIP_ID_YUKON_EC_U && + hw->chip_rev ==CHIP_REV_YU_EC_U_A1 ) {/* apply fixes in PHY AFE */ - pg =gm_phy_read (hw, port,PHY_MARV_EXT_ADR );gm_phy_write (hw, port,PHY_MARV_EXT_ADR ,255 );/* increase differential signal amplitude in 10BASE-T */
@@ -524,7 +524,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)gm_phy_write (hw, port,0x17 ,0x2002 );/* set page register to 0 */ -gm_phy_write (hw, port,PHY_MARV_EXT_ADR , pg); +gm_phy_write (hw, port,PHY_MARV_EXT_ADR ,0 ); }else if (hw->chip_id !=CHIP_ID_YUKON_EX ) {gm_phy_write (hw, port,PHY_MARV_LED_CTRL , ledctrl);
@@ -1561,6 +1561,7 @@ static int sky2_down(struct net_device *dev)/* Stop more packets from being queued */ netif_stop_queue (dev); +netif_carrier_off (dev);/* Disable port IRQ */ imask =sky2_read32 (hw,B0_IMSK );
@@ -3769,6 +3770,11 @@ static int sky2_resume(struct pci_dev *pdev) goto out;pci_enable_wake (pdev,PCI_D0 ,0 ); + +/* Re-enable all clocks */ +if (hw->chip_id ==CHIP_ID_YUKON_EX || hw->chip_id ==CHIP_ID_YUKON_EC_U ) +sky2_pci_write32 (hw,PCI_DEV_REG3 ,0 ); +sky2_reset (hw);sky2_write32 (hw,B0_IMSK ,Y2_IS_BASE );
drivers/net/wireless/bcm43xx/bcm43xx_main.c +19 -1
@@ -946,6 +946,7 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm)u8 channel;struct bcm43xx_phyinfo *phy;const char *iso_country; +u8 max_bg_channel; geo =kzalloc (sizeof (*geo),GFP_KERNEL );if (!geo)
@@ -967,6 +968,23 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm) } iso_country =bcm43xx_locale_iso (bcm->sprom.locale); +/* set the maximum channel based on locale set in sprom or witle locale option */ +switch (bcm->sprom.locale) { +case BCM43xx_LOCALE_THAILAND: +case BCM43xx_LOCALE_ISRAEL: +case BCM43xx_LOCALE_JORDAN: +case BCM43xx_LOCALE_USA_CANADA_ANZ: +case BCM43xx_LOCALE_USA_LOW: + max_bg_channel =11 ; +break ; +case BCM43xx_LOCALE_JAPAN: +case BCM43xx_LOCALE_JAPAN_HIGH: + max_bg_channel =14 ; +break ; +default : + max_bg_channel =13 ; + } +if (have_a) {for (i =0 , channel =IEEE80211_52GHZ_MIN_CHANNEL ; channel <=IEEE80211_52GHZ_MAX_CHANNEL ; channel++) {
@@ -978,7 +996,7 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm) }if (have_bg) {for (i =0 , channel =IEEE80211_24GHZ_MIN_CHANNEL ; - channel <=IEEE80211_24GHZ_MAX_CHANNEL ; channel++) { + channel <= max_bg_channel; channel++) { chan = &geo->bg[i++]; chan->freq =bcm43xx_channel_to_freq_bg (channel); chan->channel = channel;
drivers/net/wireless/bcm43xx/bcm43xx_phy.c +32 -25
124 lines not on this page · raw message
drivers/net/wireless/zd1211rw/zd_chip.c +4 -8
@@ -337,6 +337,7 @@ static int read_pod(struct zd_chip *chip, u8 *rf_type) chip->patch_cr157 = (value >>13 ) &0x1 ; chip->patch_6m_band_edge = (value >>21 ) &0x1 ; chip->new_phy_layout = (value >>31 ) &0x1 ; + chip->al2230s_bit = (value >>7 ) &0x1 ; chip->link_led = ((value >>4 ) &1 ) ?LED1 :LED2 ; chip->supports_tx_led =1 ;if (value & (1 <<24 )) {/* LED scenario */
@@ -591,16 +592,16 @@ int zd_chip_unlock_phy_regs(struct zd_chip *chip)return r; } -/* CR157 can be optionally patched by the EEPROM */ +/* CR157 can be optionally patched by the EEPROM for original ZD1211 */ static int patch_cr157 (struct zd_chip *chip) {int r; -u32 value; +u16 value;if (!chip->patch_cr157)return 0 ; - r =zd_ioread32_locked (chip, &value,E2P_PHY_REG ); + r =zd_ioread16_locked (chip, &value,E2P_PHY_REG );if (r)return r;
@@ -790,11 +791,6 @@ static int zd1211b_hw_reset_phy(struct zd_chip *chip) goto out; r =zd_iowrite16a_locked (chip, ioreqs,ARRAY_SIZE (ioreqs)); -if (r) - goto unlock; - - r =patch_cr157 (chip); -unlock: t =zd_chip_unlock_phy_regs (chip);if (t && !r) r = t;
drivers/net/wireless/zd1211rw/zd_chip.h +2 -2
@@ -641,8 +641,8 @@ enum {* also only 11 channels. */ #define E2P_ALLOWED_CHANNEL E2P_DATA(0x18) -#define E2P_PHY_REG E2P_DATA(0x1a)#define E2P_DEVICE_VER E2P_DATA(0x20) +#define E2P_PHY_REG E2P_DATA(0x25)#define E2P_36M_CAL_VALUE1 E2P_DATA(0x28)#define E2P_36M_CAL_VALUE2 E2P_DATA(0x2a)#define E2P_36M_CAL_VALUE3 E2P_DATA(0x2c)
@@ -711,7 +711,7 @@ struct zd_chip {u16 link_led; unsigned int pa_type:4, patch_cck_gain:1, patch_cr157:1, patch_6m_band_edge:1, - new_phy_layout:1, + new_phy_layout:1, al2230s_bit:1, is_zd1211b:1, supports_tx_led:1; };
drivers/net/wireless/zd1211rw/zd_rf_al2230.c +6 -0
@@ -358,6 +358,12 @@ int zd_rf_init_al2230(struct zd_rf *rf) {struct zd_chip *chip =zd_rf_to_chip (rf); +if (chip->al2230s_bit) { +dev_err (zd_chip_dev (chip),"AL2230S devices are not yet " +"supported by this driver.\n" ); +return -ENODEV ; + } + rf->switch_radio_off = al2230_switch_radio_off;if (chip->is_zd1211b) { rf->init_hw = zd1211b_al2230_init_hw;