smc911x: Fix undefined CONFIG_ symbol warning
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0c4581b68922157da4e8071781b210043839a74 Commit: d0c4581b68922157da4e8071781b210043839a74 Parent: 3defd0ee74b8bec6977a34aae99939af6c007f84 Author: Peter Korsgaard <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 15:28:06 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:00 2007 -0500 smc911x: Fix undefined CONFIG_ symbol warning elif defined(CONFIG_*) should be used instead of elif CONFIG_* so GCC doesn't give warnings about undefined symbols when the config option is disabled. Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/smc911x.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 16a0edc..d04e4fa 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h @@ -37,7 +37,7 @@ #define SMC_USE_16BIT0 #define SMC_USE_32BIT1 #define SMC_IRQ_SENSEIRQF_TRIGGER_FALLING -#elif CONFIG_SH_MAGIC_PANEL_R2 +#elif defined(CONFIG_SH_MAGIC_PANEL_R2) #define SMC_USE_SH_DMA 0 #define SMC_USE_16BIT0 #define SMC_USE_32BIT1 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
smc911x: Fix unused variable warning.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9b121c4df04d7fb508384480bb93f04916fb820 Commit: a9b121c4df04d7fb508384480bb93f04916fb820 Parent: d0c4581b68922157da4e8071781b210043839a74 Author: Peter Korsgaard <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 15:34:15 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:01 2007 -0500 smc911x: Fix unused variable warning. The smc911x_local pointer in smc911x_rcv is only used in the SMC_USE_DMA case. Move it under the #ifdef so GCC doesn't generate a warning in the non-DMA case. Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/smc911x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index dd18af0..69a78b3 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -428,7 +428,6 @@ static inline void smc911x_drop_pkt(struct net_device *dev) */ static inline void smc911x_rcv(struct net_device *dev) { - struct smc911x_local *lp = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; unsigned int pkt_len, status; struct sk_buff *skb; @@ -473,6 +472,7 @@ static inline void smc911x_rcv(struct net_device *dev) skb_put(skb,pkt_len-4); #ifdef SMC_USE_DMA { + struct smc911x_local *lp = netdev_priv(dev); unsigned int fifo; /* Lower the FIFO threshold if possible */ fifo = SMC_GET_FIFO_INT(); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ehea: Improve tx packets counting
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7393b87c9a538045c241d3eb5e2abf37e25ca3d3 Commit: 7393b87c9a538045c241d3eb5e2abf37e25ca3d3 Parent: a9b121c4df04d7fb508384480bb93f04916fb820 Author: Thomas Klein <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 17:37:58 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:01 2007 -0500 ehea: Improve tx packets counting Using own tx_packets counter instead of firmware counters. Signed-off-by: Thomas Klein <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea.h |2 +- drivers/net/ehea/ehea_main.c |9 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index f78e5bf..ea67615 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -40,7 +40,7 @@ #include #define DRV_NAME "ehea" -#define DRV_VERSION"EHEA_0080" +#define DRV_VERSION"EHEA_0082" /* eHEA capability flags */ #define DLPAR_PORT_ADD_REM 1 diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index f0319f1..d2f715d 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -136,7 +136,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev) struct ehea_port *port = netdev_priv(dev); struct net_device_stats *stats = &port->stats; struct hcp_ehea_port_cb2 *cb2; - u64 hret, rx_packets; + u64 hret, rx_packets, tx_packets; int i; memset(stats, 0, sizeof(*stats)); @@ -162,7 +162,11 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev) for (i = 0; i < port->num_def_qps; i++) rx_packets += port->port_res[i].rx_packets; - stats->tx_packets = cb2->txucp + cb2->txmcp + cb2->txbcp; + tx_packets = 0; + for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) + tx_packets += port->port_res[i].tx_packets; + + stats->tx_packets = tx_packets; stats->multicast = cb2->rxmcp; stats->rx_errors = cb2->rxuerr; stats->rx_bytes = cb2->rxo; @@ -2000,6 +2004,7 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) } ehea_post_swqe(pr->qp, swqe); + pr->tx_packets++; if (unlikely(atomic_read(&pr->swqe_avail) <= 1)) { spin_lock_irqsave(&pr->netif_queue, flags); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: disable rx checksum on Yukon XL
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b31cfbcd1b54362ef06c85beb40e65a349169a2 Commit: 8b31cfbcd1b54362ef06c85beb40e65a349169a2 Parent: 58dd8258fccbb68e0d0e1898038442822cb833c0 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 14:55:26 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:01 2007 -0500 sky2: disable rx checksum on Yukon XL The Marvell Yukon XL chipset appears to have a hardware glitch where it will repeat the checksum of the last packet. Of course, this is timing sensitive and only happens sometimes... More info: http://bugzilla.kernel.org/show_bug.cgi?id=9381 As a workaround just disable hardware checksumming by default on this chip version. The earlier workaround for PCIX, dual port was also on Yukon XL so don't need to disable checksumming there. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/sky2.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a2070db..8c4c743 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1320,15 +1320,11 @@ static int sky2_up(struct net_device *dev) */ if (otherdev && netif_running(otherdev) && (cap = pci_find_capability(hw->pdev, PCI_CAP_ID_PCIX))) { - struct sky2_port *osky2 = netdev_priv(otherdev); u16 cmd; pci_read_config_word(hw->pdev, cap + PCI_X_CMD, &cmd); cmd &= ~PCI_X_CMD_MAX_SPLIT; pci_write_config_word(hw->pdev, cap + PCI_X_CMD, cmd); - - sky2->rx_csum = 0; - osky2->rx_csum = 0; } if (netif_msg_ifup(sky2)) @@ -4013,7 +4009,7 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, sky2->duplex = -1; sky2->speed = -1; sky2->advertising = sky2_supported_modes(hw); - sky2->rx_csum = 1; + sky2->rx_csum = (hw->chip_id != CHIP_ID_YUKON_XL); sky2->wol = wol; spin_lock_init(&sky2->phy_lock); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ehea: Reworked rcv queue handling to log only fatal errors
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58dd8258fccbb68e0d0e1898038442822cb833c0 Commit: 58dd8258fccbb68e0d0e1898038442822cb833c0 Parent: 7393b87c9a538045c241d3eb5e2abf37e25ca3d3 Author: Thomas Klein <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 17:42:27 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:01 2007 -0500 ehea: Reworked rcv queue handling to log only fatal errors Prevent driver from brawly logging packet checksum errors. Signed-off-by: Thomas Klein <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea.h |2 +- drivers/net/ehea/ehea_main.c | 11 +-- drivers/net/ehea/ehea_qmr.h |4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index ea67615..5f82a46 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -40,7 +40,7 @@ #include #define DRV_NAME "ehea" -#define DRV_VERSION"EHEA_0082" +#define DRV_VERSION"EHEA_0083" /* eHEA capability flags */ #define DLPAR_PORT_ADD_REM 1 diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index d2f715d..869e160 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -410,11 +410,6 @@ static int ehea_treat_poll_error(struct ehea_port_res *pr, int rq, if (cqe->status & EHEA_CQE_STAT_ERR_CRC) pr->p_stats.err_frame_crc++; - if (netif_msg_rx_err(pr->port)) { - ehea_error("CQE Error for QP %d", pr->qp->init_attr.qp_nr); - ehea_dump(cqe, sizeof(*cqe), "CQE"); - } - if (rq == 2) { *processed_rq2 += 1; skb = get_skb_by_index(pr->rq2_skba.arr, pr->rq2_skba.len, cqe); @@ -426,7 +421,11 @@ static int ehea_treat_poll_error(struct ehea_port_res *pr, int rq, } if (cqe->status & EHEA_CQE_STAT_FAT_ERR_MASK) { - ehea_error("Critical receive error. Resetting port."); + if (netif_msg_rx_err(pr->port)) { + ehea_error("Critical receive error for QP %d. " + "Resetting port.", pr->qp->init_attr.qp_nr); + ehea_dump(cqe, sizeof(*cqe), "CQE"); + } schedule_work(&pr->port->reset_task); return 1; } diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h index 562de0e..bc62d38 100644 --- a/drivers/net/ehea/ehea_qmr.h +++ b/drivers/net/ehea/ehea_qmr.h @@ -145,8 +145,8 @@ struct ehea_rwqe { #define EHEA_CQE_VLAN_TAG_XTRACT 0x0400 #define EHEA_CQE_TYPE_RQ 0x60 -#define EHEA_CQE_STAT_ERR_MASK 0x720F -#define EHEA_CQE_STAT_FAT_ERR_MASK 0x1F +#define EHEA_CQE_STAT_ERR_MASK 0x700F +#define EHEA_CQE_STAT_FAT_ERR_MASK 0xF #define EHEA_CQE_STAT_ERR_TCP 0x4000 #define EHEA_CQE_STAT_ERR_IP 0x2000 #define EHEA_CQE_STAT_ERR_CRC 0x1000 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
amd8111e: don't call napi_enable if configured w/o NAPI
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3defd0ee74b8bec6977a34aae99939af6c007f84 Commit: 3defd0ee74b8bec6977a34aae99939af6c007f84 Parent: 77b6901573066d6eadfcf66161a5768f3d2de9e9 Author: Jiri Bohac <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 13:40:07 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:00 2007 -0500 amd8111e: don't call napi_enable if configured w/o NAPI The amd8111e network driver was broken by bea3348eef27e6044b6161fd04c3152215f96411, which makes the driver call napi_enable() and napi_disable() even if the driver had been configured without CONFIG_AMD8111E_NAPI, and thus netif_napi_add() had not been called on initialization. This triggers a BUG in napi_enable(). This patch fixes the problem. Please apply. Signed-off-by: Jiri Bohac <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/amd8111e.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index eebf5bb..e7fdd81 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c @@ -1340,7 +1340,9 @@ static int amd8111e_close(struct net_device * dev) struct amd8111e_priv *lp = netdev_priv(dev); netif_stop_queue(dev); +#ifdef CONFIG_AMD8111E_NAPI napi_disable(&lp->napi); +#endif spin_lock_irq(&lp->lock); @@ -1372,7 +1374,9 @@ static int amd8111e_open(struct net_device * dev ) dev->name, dev)) return -EAGAIN; +#ifdef CONFIG_AMD8111E_NAPI napi_enable(&lp->napi); +#endif spin_lock_irq(&lp->lock); @@ -1380,7 +1384,9 @@ static int amd8111e_open(struct net_device * dev ) if(amd8111e_restart(dev)){ spin_unlock_irq(&lp->lock); +#ifdef CONFIG_AMD8111E_NAPI napi_disable(&lp->napi); +#endif if (dev->irq) free_irq(dev->irq, dev); return -ENOMEM; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
smc911x: Fix multicast handling
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b31f7ffa9ed7ba5fbe1cab8fb17a8c545e6a0eb Commit: 7b31f7ffa9ed7ba5fbe1cab8fb17a8c545e6a0eb Parent: 8b31cfbcd1b54362ef06c85beb40e65a349169a2 Author: Peter Korsgaard <[EMAIL PROTECTED]> AuthorDate: Thu Nov 22 12:25:13 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:01 2007 -0500 smc911x: Fix multicast handling smc911x_set_multicast_list fails to fill out the multicast hash table correctly; Bit 1 was used rather than bit 5 to decide if the lower or upper register should be used. The function is at the same time cleaned up by calling ether_crc rather than using it's own bit reversal table. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/smc911x.c | 17 - 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 69a78b3..1a3d80b 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -1379,13 +1379,6 @@ static void smc911x_set_multicast_list(struct net_device *dev) unsigned int multicast_table[2]; unsigned int mcr, update_multicast = 0; unsigned long flags; - /* table for flipping the order of 5 bits */ - static const unsigned char invert5[] = - {0x00, 0x10, 0x08, 0x18, 0x04, 0x14, 0x0C, 0x1C, -0x02, 0x12, 0x0A, 0x1A, 0x06, 0x16, 0x0E, 0x1E, -0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0D, 0x1D, -0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F}; - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); @@ -1432,7 +1425,7 @@ static void smc911x_set_multicast_list(struct net_device *dev) cur_addr = dev->mc_list; for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) { - int position; + u32 position; /* do we have a pointer here? */ if (!cur_addr) @@ -1442,12 +1435,10 @@ static void smc911x_set_multicast_list(struct net_device *dev) if (!(*cur_addr->dmi_addr & 1)) continue; - /* only use the low order bits */ - position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f; + /* upper 6 bits are used as hash index */ + position = ether_crc(ETH_ALEN, cur_addr->dmi_addr)>>26; - /* do some messy swapping to put the bit in the right spot */ - multicast_table[invert5[position&0x1F]&0x1] |= - (1<>1)&0x1F]); + multicast_table[position>>5] |= 1 << (position&0x1f); } /* be sure I get rid of flags I might have set */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Blackfin SMC91x Driver: punt CONFIG_BFIN -- we already have CONFIG_BLACKFIN
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=95af9feb493daf1d07223acdaaea9a3c9cc7a943 Commit: 95af9feb493daf1d07223acdaaea9a3c9cc7a943 Parent: 65809b5125d61e0c8a7f6c0a5431450eaf853820 Author: Mike Frysinger <[EMAIL PROTECTED]> AuthorDate: Fri Nov 23 17:55:50 2007 +0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:02 2007 -0500 Blackfin SMC91x Driver: punt CONFIG_BFIN -- we already have CONFIG_BLACKFIN Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/Kconfig |2 +- drivers/net/smc91x.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index e8d69b0..1437b37 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -888,7 +888,7 @@ config SMC91X tristate "SMC 91C9x/91C1xxx support" select CRC32 select MII - depends on ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || SOC_AU1X00 || BFIN + depends on ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || SOC_AU1X00 || BLACKFIN help This is a driver for SMC's 91x series of Ethernet chipsets, including the SMC91C94 and the SMC91C111. Say Y if you want it diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index db34e1e..07b7f71 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -55,7 +55,7 @@ #define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) -#elif defined(CONFIG_BFIN) +#elif defined(CONFIG_BLACKFIN) #define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH #define RPC_LSA_DEFAULTRPC_LED_100_10 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Blackfin EMAC driver: fix bug - NAT doesn't work with bfin_mac driver
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=00ff49a91e524ec5cb593380186d5d514876c417 Commit: 00ff49a91e524ec5cb593380186d5d514876c417 Parent: 95af9feb493daf1d07223acdaaea9a3c9cc7a943 Author: Vitja Makarov <[EMAIL PROTECTED]> AuthorDate: Fri Nov 23 17:55:51 2007 +0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:02 2007 -0500 Blackfin EMAC driver: fix bug - NAT doesn't work with bfin_mac driver https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&thread_id=23114&_forum_action=ForumMessageBrowse Today I was dealing with the same problem, on my custom bf537 board, and bfin_mac driver. I found that the problem is in setting ip_summed flag of skbuff structure, Signed-off-by: Vitja Makarov <[EMAIL PROTECTED]> Signed-off-by: Sonic Zhang <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/bfin_mac.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 084acfd..f0f8516 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c @@ -676,7 +676,7 @@ static void bf537mac_rx(struct net_device *dev) skb->protocol = eth_type_trans(skb, dev); #if defined(BFIN_MAC_CSUM_OFFLOAD) skb->csum = current_rx_ptr->status.ip_payload_csum; - skb->ip_summed = CHECKSUM_PARTIAL; + skb->ip_summed = CHECKSUM_COMPLETE; #endif netif_rx(skb); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
dmfe: checkpatch fix (add whitespace)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a31e23e15cbb9734c5883a4a7f58d8712d303e0b Commit: a31e23e15cbb9734c5883a4a7f58d8712d303e0b Parent: 00ff49a91e524ec5cb593380186d5d514876c417 Author: Jeff Garzik <[EMAIL PROTECTED]> AuthorDate: Fri Nov 23 22:13:19 2007 -0500 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:13:19 2007 -0500 dmfe: checkpatch fix (add whitespace) Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/tulip/dmfe.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 208dae7..b4891ca 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c @@ -2119,7 +2119,7 @@ static int dmfe_suspend(struct pci_dev *pci_dev, pm_message_t state) /* Power down device*/ pci_save_state(pci_dev); - pci_set_power_state(pci_dev, pci_choose_state (pci_dev,state)); + pci_set_power_state(pci_dev, pci_choose_state (pci_dev, state)); return 0; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
iwlwifi: fix possible NULL dereference in iwl_set_rate()
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4ba9621f4f241f8c4d4f620ad4257af59d21f3e Commit: c4ba9621f4f241f8c4d4f620ad4257af59d21f3e Parent: d9f8bcbf67a0ee67c8cb0734f003dfe916bb5248 Author: Saleem Abdulrasool <[EMAIL PROTECTED]> AuthorDate: Sun Nov 18 23:59:08 2007 -0800 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:51 2007 -0500 iwlwifi: fix possible NULL dereference in iwl_set_rate() Signed-off-by: Saleem Abdulrasool <[EMAIL PROTECTED]> Signed-off-by: Zhu Yi <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/iwlwifi/iwl3945-base.c |4 drivers/net/wireless/iwlwifi/iwl4965-base.c |4 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 465da4f..5751c89 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -2915,6 +2915,10 @@ static void iwl_set_rate(struct iwl_priv *priv) int i; hw = iwl_get_hw_mode(priv, priv->phymode); + if (!hw) { + IWL_ERROR("Failed to set rate: unable to get hw mode\n"); + return; + } priv->active_rate = 0; priv->active_rate_basic = 0; diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 9918780..0b22e01 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -3003,6 +3003,10 @@ static void iwl_set_rate(struct iwl_priv *priv) int i; hw = iwl_get_hw_mode(priv, priv->phymode); + if (!hw) { + IWL_ERROR("Failed to set rate: unable to get hw mode\n"); + return; + } priv->active_rate = 0; priv->active_rate_basic = 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
b43/b43legacy: fix left-over URLs and ifdefs
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=354807e0dd24fa6ad25df614419c1ae8f1a23b47 Commit: 354807e0dd24fa6ad25df614419c1ae8f1a23b47 Parent: c4ba9621f4f241f8c4d4f620ad4257af59d21f3e Author: Stefano Brivio <[EMAIL PROTECTED]> AuthorDate: Mon Nov 19 20:21:31 2007 +0100 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:51 2007 -0500 b43/b43legacy: fix left-over URLs and ifdefs Fix some left-over URLs and ifdefs in b43 and b43legacy drivers. Signed-off-by: Stefano Brivio <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/b43/main.c |2 +- drivers/net/wireless/b43legacy/dma.c |2 +- drivers/net/wireless/b43legacy/main.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 2b17c1d..b45eecc 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -1566,7 +1566,7 @@ static void b43_release_firmware(struct b43_wldev *dev) static void b43_print_fw_helptext(struct b43_wl *wl) { b43err(wl, "You must go to " - "http://linuxwireless.org/en/users/Drivers/bcm43xx#devicefirmware " + "http://linuxwireless.org/en/users/Drivers/b43#devicefirmware " "and download the correct firmware (version 4).\n"); } diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index 8cb3dc4..83161d9 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c @@ -996,7 +996,7 @@ int b43legacy_dma_init(struct b43legacy_wldev *dev) err = ssb_dma_set_mask(dev->dev, dmamask); if (err) { -#ifdef BCM43XX_PIO +#ifdef CONFIG_B43LEGACY_PIO b43legacywarn(dev->wl, "DMA for this device not supported. " "Falling back to PIO\n"); dev->__using_pio = 1; diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 3bde1e9..32d5e17 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -1419,7 +1419,7 @@ static void b43legacy_release_firmware(struct b43legacy_wldev *dev) static void b43legacy_print_fw_helptext(struct b43legacy_wl *wl) { b43legacyerr(wl, "You must go to http://linuxwireless.org/en/users/"; -"Drivers/bcm43xx#devicefirmware " +"Drivers/b43#devicefirmware " "and download the correct firmware (version 3).\n"); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
NET: dmfe: don't access configuration space in D3 state
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=65809b5125d61e0c8a7f6c0a5431450eaf853820 Commit: 65809b5125d61e0c8a7f6c0a5431450eaf853820 Parent: 7b31f7ffa9ed7ba5fbe1cab8fb17a8c545e6a0eb Author: Maxim Levitsky <[EMAIL PROTECTED]> AuthorDate: Fri Nov 23 01:30:15 2007 +0200 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 22:09:01 2007 -0500 NET: dmfe: don't access configuration space in D3 state Accidently I reversed the order of pci_save_state and pci_set_power_state in .suspend()/.resume() callbacks Signed-off-by: Maxim Levitsky <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/tulip/dmfe.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index ca90566..208dae7 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c @@ -2118,8 +2118,8 @@ static int dmfe_suspend(struct pci_dev *pci_dev, pm_message_t state) pci_enable_wake(pci_dev, PCI_D3cold, 1); /* Power down device*/ - pci_set_power_state(pci_dev, pci_choose_state (pci_dev,state)); pci_save_state(pci_dev); + pci_set_power_state(pci_dev, pci_choose_state (pci_dev,state)); return 0; } @@ -2129,8 +2129,8 @@ static int dmfe_resume(struct pci_dev *pci_dev) struct net_device *dev = pci_get_drvdata(pci_dev); u32 tmp; - pci_restore_state(pci_dev); pci_set_power_state(pci_dev, PCI_D0); + pci_restore_state(pci_dev); /* Re-initilize DM910X board */ dmfe_init_dm910x(dev); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
drivers/net/wireless: Add missing "space"
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8376e7a3c2cbf2c91215c35fec9988f581fc699a Commit: 8376e7a3c2cbf2c91215c35fec9988f581fc699a Parent: 354807e0dd24fa6ad25df614419c1ae8f1a23b47 Author: Joe Perches <[EMAIL PROTECTED]> AuthorDate: Mon Nov 19 17:48:27 2007 -0800 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:51 2007 -0500 drivers/net/wireless: Add missing "space" Signed-off-by: Joe Perches <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/b43/phy.c |2 +- drivers/net/wireless/b43legacy/phy.c |2 +- drivers/net/wireless/bcm43xx/bcm43xx_phy.c |2 +- drivers/net/wireless/libertas/wext.c |2 +- drivers/net/wireless/netwave_cs.c |2 +- drivers/net/wireless/p54usb.c |2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c index 3d4ed64..7ff091e 100644 --- a/drivers/net/wireless/b43/phy.c +++ b/drivers/net/wireless/b43/phy.c @@ -2214,7 +2214,7 @@ int b43_phy_init_tssi2dbm_table(struct b43_wldev *dev) } dyn_tssi2dbm = kmalloc(64, GFP_KERNEL); if (dyn_tssi2dbm == NULL) { - b43err(dev->wl, "Could not allocate memory" + b43err(dev->wl, "Could not allocate memory " "for tssi2dbm table\n"); return -ENOMEM; } diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c index 22a4b3d..491e518 100644 --- a/drivers/net/wireless/b43legacy/phy.c +++ b/drivers/net/wireless/b43legacy/phy.c @@ -2020,7 +2020,7 @@ int b43legacy_phy_init_tssi2dbm_table(struct b43legacy_wldev *dev) phy->idle_tssi = 62; dyn_tssi2dbm = kmalloc(64, GFP_KERNEL); if (dyn_tssi2dbm == NULL) { - b43legacyerr(dev->wl, "Could not allocate memory" + b43legacyerr(dev->wl, "Could not allocate memory " "for tssi2dbm table\n"); return -ENOMEM; } diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index b37f1e3..af3de33 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c @@ -2149,7 +2149,7 @@ int bcm43xx_phy_init_tssi2dbm_table(struct bcm43xx_private *bcm) } dyn_tssi2dbm = kmalloc(64, GFP_KERNEL); if (dyn_tssi2dbm == NULL) { - printk(KERN_ERR PFX "Could not allocate memory" + printk(KERN_ERR PFX "Could not allocate memory " "for tssi2dbm table\n"); return -ENOMEM; } diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index c6f5aa3..395b788 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c @@ -1528,7 +1528,7 @@ static int wlan_set_encodeext(struct net_device *dev, && (ext->key_len != KEY_LEN_WPA_TKIP)) || ((alg == IW_ENCODE_ALG_CCMP) && (ext->key_len != KEY_LEN_WPA_AES))) { - lbs_deb_wext("invalid size %d for key of alg" + lbs_deb_wext("invalid size %d for key of alg " "type %d\n", ext->key_len, alg); diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 2402cb8..d2fa079 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c @@ -806,7 +806,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { for (i = 0; i < 6; i++) dev->dev_addr[i] = readb(ramBase + NETWAVE_EREG_PA + i); -printk(KERN_INFO "%s: Netwave: port %#3lx, irq %d, mem %lx" +printk(KERN_INFO "%s: Netwave: port %#3lx, irq %d, mem %lx, " "id %c%c, hw_addr %s\n", dev->name, dev->base_addr, dev->irq, (u_long) ramBase, diff --git a/drivers/net/wireless/p54usb.c b/drivers/net/wireless/p54usb.c index 755482a..60d286e 100644 --- a/drivers/net/wireless/p54usb.c +++ b/drivers/net/wireless/p54usb.c @@ -308,7 +308,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev) buf = kmalloc(0x2020, GFP_KERNEL); if (!buf) { - printk(KERN_ERR "prism54usb: cannot allocate memory for" + printk(KERN_ERR "prism54usb: cannot allocate memory for " "eeprom readback!\n"); return -ENOMEM; } - To unsubscribe from this list: send the line "unsubscribe git
libertas: Don't set NETIF_F_IPV6_CSUM in dev->features
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0a689575102641149e67595e45ab006dbbb4a0d Commit: d0a689575102641149e67595e45ab006dbbb4a0d Parent: 8376e7a3c2cbf2c91215c35fec9988f581fc699a Author: David Woodhouse <[EMAIL PROTECTED]> AuthorDate: Sat Nov 24 19:48:17 2007 + Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:52 2007 -0500 libertas: Don't set NETIF_F_IPV6_CSUM in dev->features I'm not sure why it was doing this, and I'm not sure I _want_ to know why. But calling it NETIF_F_DYNALLOC doesn't change the fact that the kernel believes it to be NETIF_F_IPV6_CSUM, and that IPv6 communication is hence buggered. Signed-off-by: David Woodhouse <[EMAIL PROTECTED]> Acked-by: Dan Williams <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/libertas/main.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 5ead083..1823b48 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -1165,8 +1165,6 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev) #ifdef WIRELESS_EXT dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; #endif -#define NETIF_F_DYNALLOC 16 - dev->features |= NETIF_F_DYNALLOC; dev->flags |= IFF_BROADCAST | IFF_MULTICAST; dev->set_multicast_list = libertas_set_multicast_list; @@ -1348,8 +1346,6 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev) #ifdef WIRELESS_EXT mesh_dev->wireless_handlers = (struct iw_handler_def *)&mesh_handler_def; #endif -#define NETIF_F_DYNALLOC 16 - /* Register virtual mesh interface */ ret = register_netdev(mesh_dev); if (ret) { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libertas: let more than one MAC event through
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6591e36a1c52445f95f26738394909ee9bf94390 Commit: 6591e36a1c52445f95f26738394909ee9bf94390 Parent: d0a689575102641149e67595e45ab006dbbb4a0d Author: Holger Schurig <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 09:35:44 2007 +0100 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:52 2007 -0500 libertas: let more than one MAC event through lbs_mac_event_disconnected() was called once and then never again upon a hardware MAC event. The reason was that the driver didn't clean the correct bit in the interrupt cause register of the chip. Signed-off-by: Holger Schurig <[EMAIL PROTECTED]> Acked-by: Dan Williams <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/libertas/if_cs.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index ec89dab..ba4fc2b 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c @@ -170,7 +170,8 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r #define IF_CS_H_IC_TX_OVER 0x0001 #define IF_CS_H_IC_RX_OVER 0x0002 #define IF_CS_H_IC_DNLD_OVER 0x0004 -#define IF_CS_H_IC_HOST_EVENT 0x0008 +#define IF_CS_H_IC_POWER_DOWN 0x0008 +#define IF_CS_H_IC_HOST_EVENT 0x0010 #define IF_CS_H_IC_MASK0x001f #define IF_CS_H_INT_MASK 0x0004 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
iwlwifi: fix iwl_mac_add_interface handler
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=864792e3d93a89496e02ca21b2e2eeba0aa857ad Commit: 864792e3d93a89496e02ca21b2e2eeba0aa857ad Parent: 6591e36a1c52445f95f26738394909ee9bf94390 Author: Tomas Winkler <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 21:00:52 2007 +0200 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:53 2007 -0500 iwlwifi: fix iwl_mac_add_interface handler This patch fixes iwl_mac_add_interface. 1. Currently only one interface is supported, instead of silently retuning 0 now it returns -EOPNOTSUPP (By Johannes Berg) 2. It enables changing mac address from user space (By Ian Schram) Signed-off-by: Tomas Winkler <[EMAIL PROTECTED]> Cc: Zhu Yi <[EMAIL PROTECTED]> Cc: Reinette Chatre <[EMAIL PROTECTED]> Cc: linux-wireless <[EMAIL PROTECTED] Cc: Ian Schram <[EMAIL PROTECTED]> Cc: Johannes Berg <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/iwlwifi/iwl3945-base.c | 11 +++ drivers/net/wireless/iwlwifi/iwl4965-base.c |8 +--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 5751c89..ae89a0f 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6940,13 +6940,10 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, DECLARE_MAC_BUF(mac); IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); - if (conf->mac_addr) - IWL_DEBUG_MAC80211("enter: MAC %s\n", - print_mac(mac, conf->mac_addr)); if (priv->interface_id) { IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); - return 0; + return -EOPNOTSUPP; } spin_lock_irqsave(&priv->lock, flags); @@ -6955,6 +6952,12 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, spin_unlock_irqrestore(&priv->lock, flags); mutex_lock(&priv->mutex); + + if (conf->mac_addr) { + IWL_DEBUG_MAC80211("Set: %s\n", print_mac(mac, conf->mac_addr)); + memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); + } + iwl_set_mode(priv, conf->type); IWL_DEBUG_MAC80211("leave\n"); diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 0b22e01..22d3bbc 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -7330,9 +7330,6 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, DECLARE_MAC_BUF(mac); IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); - if (conf->mac_addr) - IWL_DEBUG_MAC80211("enter: MAC %s\n", - print_mac(mac, conf->mac_addr)); if (priv->interface_id) { IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); @@ -7345,6 +7342,11 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, spin_unlock_irqrestore(&priv->lock, flags); mutex_lock(&priv->mutex); + + if (conf->mac_addr) { + IWL_DEBUG_MAC80211("Set %s\n", print_mac(mac, conf->mac_addr)); + memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); + } iwl_set_mode(priv, conf->type); IWL_DEBUG_MAC80211("leave\n"); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
iwlwifi 3945 Fix race conditional panic.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e47eb6ad41e8fc4c2696665512b70d1fd4cf3f22 Commit: e47eb6ad41e8fc4c2696665512b70d1fd4cf3f22 Parent: 864792e3d93a89496e02ca21b2e2eeba0aa857ad Author: Joonwoo Park <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 10:42:49 2007 +0900 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:54 2007 -0500 iwlwifi 3945 Fix race conditional panic. Signed-off-by: Joonwoo Park <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/iwlwifi/iwl3945-base.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index ae89a0f..4bdf237 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -8277,6 +8277,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv) { iwl_hw_cancel_deferred_work(priv); + cancel_delayed_work_sync(&priv->init_alive_start); cancel_delayed_work(&priv->scan_check); cancel_delayed_work(&priv->alive_start); cancel_delayed_work(&priv->post_associate); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
iwlwifi 4965 Fix race conditional panic.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ae6a054553ee8b7f74bf7de8904022b26705778 Commit: 3ae6a054553ee8b7f74bf7de8904022b26705778 Parent: e47eb6ad41e8fc4c2696665512b70d1fd4cf3f22 Author: Joonwoo Park <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 10:43:16 2007 +0900 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:34:54 2007 -0500 iwlwifi 4965 Fix race conditional panic. Signed-off-by: Joonwoo Park <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/iwlwifi/iwl4965-base.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 22d3bbc..8f85564 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -8870,6 +8870,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv) { iwl_hw_cancel_deferred_work(priv); + cancel_delayed_work_sync(&priv->init_alive_start); cancel_delayed_work(&priv->scan_check); cancel_delayed_work(&priv->alive_start); cancel_delayed_work(&priv->post_associate); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
S2io: Fixed the case when the card initialization fails on mtu change
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f74ffdebf3f81cb69e6c90026c6cff89e57c262 Commit: 9f74ffdebf3f81cb69e6c90026c6cff89e57c262 Parent: 85b161a826f1954e9605deb3e6faa4be4d285a34 Author: Sreenivasa Honnur <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 01:46:08 2007 -0500 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:28 2007 -0500 S2io: Fixed the case when the card initialization fails on mtu change Fix the case when the card initialization fails on a mtu change and then close is called (due to ifdown), which frees non existent rx buffers. - Returning appropriate error codes in init_nic function. - In s2io_close function s2io_card_down is called only when device is up. - In s2io_change_mtu function return value of s2io_card_up function is checked and returned if it failed. Signed-off-by: Surjit Reang <[EMAIL PROTECTED]> Signed-off-by: Sreenivasa Honnur <[EMAIL PROTECTED]> Signed-off-by: Ramkrishna Vepa <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/s2io.c | 32 +++- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 6326667..d5113dd 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -1081,7 +1081,7 @@ static int init_nic(struct s2io_nic *nic) /* to set the swapper controle on the card */ if(s2io_set_swapper(nic)) { DBG_PRINT(ERR_DBG,"ERROR: Setting Swapper failed\n"); - return -1; + return -EIO; } /* @@ -1503,7 +1503,7 @@ static int init_nic(struct s2io_nic *nic) DBG_PRINT(ERR_DBG, "%s: failed rts ds steering", dev->name); DBG_PRINT(ERR_DBG, "set on codepoint %d\n", i); - return FAILURE; + return -ENODEV; } } @@ -1570,7 +1570,7 @@ static int init_nic(struct s2io_nic *nic) if (time > 10) { DBG_PRINT(ERR_DBG, "%s: TTI init Failed\n", dev->name); - return -1; + return -ENODEV; } msleep(50); time++; @@ -1623,7 +1623,7 @@ static int init_nic(struct s2io_nic *nic) if (time > 10) { DBG_PRINT(ERR_DBG, "%s: RTI init Failed\n", dev->name); - return -1; + return -ENODEV; } time++; msleep(50); @@ -3914,6 +3914,12 @@ static int s2io_close(struct net_device *dev) { struct s2io_nic *sp = dev->priv; + /* Return if the device is already closed * + * Can happen when s2io_card_up failed in change_mtu* + */ + if (!is_s2io_card_up(sp)) + return 0; + netif_stop_queue(dev); napi_disable(&sp->napi); /* Reset card, kill tasklet and free Tx and Rx buffers. */ @@ -6355,6 +6361,7 @@ static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) static int s2io_change_mtu(struct net_device *dev, int new_mtu) { struct s2io_nic *sp = dev->priv; + int ret = 0; if ((new_mtu < MIN_MTU) || (new_mtu > S2IO_JUMBO_SIZE)) { DBG_PRINT(ERR_DBG, "%s: MTU size is invalid.\n", @@ -6366,9 +6373,11 @@ static int s2io_change_mtu(struct net_device *dev, int new_mtu) if (netif_running(dev)) { s2io_card_down(sp); netif_stop_queue(dev); - if (s2io_card_up(sp)) { + ret = s2io_card_up(sp); + if (ret) { DBG_PRINT(ERR_DBG, "%s: Device bring up failed\n", __FUNCTION__); + return ret; } if (netif_queue_stopped(dev)) netif_wake_queue(dev); @@ -6379,7 +6388,7 @@ static int s2io_change_mtu(struct net_device *dev, int new_mtu) writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); } - return 0; + return ret; } /** @@ -6777,6 +6786,9 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io) unsigned long flags; register u64 val64 = 0; + if (!is_s2io_card_up(sp)) + return; + del_timer_sync(&sp->alarm_timer); /* If s2io_set_link task is executing, wait till it completes. */ while (test_and_set_bit(__S2IO_STATE_LINK_TASK, &(sp->state))) { @@ -6850,11 +6862,13 @@ static int s2io_card_up(struct s2io_nic * sp) u16 interruptible; /* Initialize the H/W I/O registers */ - if (init_nic(sp) != 0) { +
ctc: make use of alloc_netdev()
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c1478859017452a1179dbbdf7b9eb5b48438746 Commit: 1c1478859017452a1179dbbdf7b9eb5b48438746 Parent: 9f74ffdebf3f81cb69e6c90026c6cff89e57c262 Author: Peter Tiedemann <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 17:36:27 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:28 2007 -0500 ctc: make use of alloc_netdev() Currently ctc-device initialization is broken (kernel bug in ctc_new_device). The new network namespace code reveals a deficiency of the ctc driver. It should make use of alloc_netdev() as described in Documentation/networking/netdevices.txt. Signed-off-by: Peter Tiedemann <[EMAIL PROTECTED]> Signed-off-by: Ursula Braun <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/s390/net/ctcmain.c | 45 +++ 1 files changed, 16 insertions(+), 29 deletions(-) diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 6bf3ebb..b3b6f65 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c @@ -2782,35 +2782,14 @@ ctc_probe_device(struct ccwgroup_device *cgdev) } /** - * Initialize everything of the net device except the name and the - * channel structs. + * Device setup function called by alloc_netdev(). + * + * @param dev Device to be setup. */ -static struct net_device * -ctc_init_netdevice(struct net_device * dev, int alloc_device, - struct ctc_priv *privptr) +void ctc_init_netdevice(struct net_device * dev) { - if (!privptr) - return NULL; - DBF_TEXT(setup, 3, __FUNCTION__); - if (alloc_device) { - dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); - if (!dev) - return NULL; - } - - dev->priv = privptr; - privptr->fsm = init_fsm("ctcdev", dev_state_names, - dev_event_names, CTC_NR_DEV_STATES, CTC_NR_DEV_EVENTS, - dev_fsm, DEV_FSM_LEN, GFP_KERNEL); - if (privptr->fsm == NULL) { - if (alloc_device) - kfree(dev); - return NULL; - } - fsm_newstate(privptr->fsm, DEV_STATE_STOPPED); - fsm_settimer(privptr->fsm, &privptr->restart_timer); if (dev->mtu == 0) dev->mtu = CTC_BUFSIZE_DEFAULT - LL_HEADER_LENGTH - 2; dev->hard_start_xmit = ctc_tx; @@ -2823,7 +2802,7 @@ ctc_init_netdevice(struct net_device * dev, int alloc_device, dev->type = ARPHRD_SLIP; dev->tx_queue_len = 100; dev->flags = IFF_POINTOPOINT | IFF_NOARP; - return dev; + SET_MODULE_OWNER(dev); } @@ -2879,14 +2858,22 @@ ctc_new_device(struct ccwgroup_device *cgdev) "ccw_device_set_online (cdev[1]) failed with ret = %d\n", ret); } - dev = ctc_init_netdevice(NULL, 1, privptr); - + dev = alloc_netdev(0, "ctc%d", ctc_init_netdevice); if (!dev) { ctc_pr_warn("ctc_init_netdevice failed\n"); goto out; } + dev->priv = privptr; - strlcpy(dev->name, "ctc%d", IFNAMSIZ); + privptr->fsm = init_fsm("ctcdev", dev_state_names, + dev_event_names, CTC_NR_DEV_STATES, CTC_NR_DEV_EVENTS, + dev_fsm, DEV_FSM_LEN, GFP_KERNEL); + if (privptr->fsm == NULL) { + free_netdev(dev); + goto out; + } + fsm_newstate(privptr->fsm, DEV_STATE_STOPPED); + fsm_settimer(privptr->fsm, &privptr->restart_timer); for (direction = READ; direction <= WRITE; direction++) { privptr->channel[direction] = - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: receive flush logic
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d08b9bdf0264a8134677373f97641712062c603f Commit: d08b9bdf0264a8134677373f97641712062c603f Parent: 29816d9aa55c99d463bd5507a46535b5fe79c33a Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 11:54:49 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:29 2007 -0500 skge: receive flush logic Receive FIFO overrun is not catastrophic condition, so don't flush when it happens. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 14f06ae..82edf44 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -1801,11 +1801,6 @@ static void genesis_mac_intr(struct skge_hw *hw, int port) xm_write32(hw, port, XM_MODE, XM_MD_FTF); ++dev->stats.tx_fifo_errors; } - - if (status & XM_IS_RXF_OV) { - xm_write32(hw, port, XM_MODE, XM_MD_FRF); - ++dev->stats.rx_fifo_errors; - } } static void genesis_link_up(struct skge_port *skge) @@ -1862,9 +1857,9 @@ static void genesis_link_up(struct skge_port *skge) xm_write32(hw, port, XM_MODE, mode); - /* Turn on detection of Tx underrun, Rx overrun */ + /* Turn on detection of Tx underrun */ msk = xm_read16(hw, port, XM_IMSK); - msk &= ~(XM_IS_RXF_OV | XM_IS_TXF_UR); + msk &= ~XM_IS_TXF_UR; xm_write16(hw, port, XM_IMSK, msk); xm_read16(hw, port, XM_ISRC); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: retry on MAC shutdown
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=799b21d2bddd43145130e509efb92339eabafef9 Commit: 799b21d2bddd43145130e509efb92339eabafef9 Parent: d08b9bdf0264a8134677373f97641712062c603f Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 11:54:50 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:29 2007 -0500 skge: retry on MAC shutdown Make sure and retry when shutting down the MAC. This code is copied from sk98lin driver. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c | 19 --- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 82edf44..b680cb0 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -1713,7 +1713,7 @@ static void genesis_stop(struct skge_port *skge) { struct skge_hw *hw = skge->hw; int port = skge->port; - u32 reg; + unsigned retries = 1000; genesis_reset(hw, port); @@ -1721,20 +1721,17 @@ static void genesis_stop(struct skge_port *skge) skge_write16(hw, B3_PA_CTRL, port == 0 ? PA_CLR_TO_TX1 : PA_CLR_TO_TX2); - /* -* If the transfer sticks at the MAC the STOP command will not -* terminate if we don't flush the XMAC's transmit FIFO ! -*/ - xm_write32(hw, port, XM_MODE, - xm_read32(hw, port, XM_MODE)|XM_MD_FTF); - - /* Reset the MAC */ - skge_write16(hw, SK_REG(port, TX_MFF_CTRL1), MFF_SET_MAC_RST); + skge_write16(hw, SK_REG(port, TX_MFF_CTRL1), MFF_CLR_MAC_RST); + do { + skge_write16(hw, SK_REG(port, TX_MFF_CTRL1), MFF_SET_MAC_RST); + if (!(skge_read16(hw, SK_REG(port, TX_MFF_CTRL1)) & MFF_SET_MAC_RST)) + break; + } while (--retries > 0); /* For external PHYs there must be special handling */ if (hw->phy_type != SK_PHY_XMAC) { - reg = skge_read32(hw, B2_GP_IO); + u32 reg = skge_read32(hw, B2_GP_IO); if (port == 0) { reg |= GP_DIR_0; reg &= ~GP_IO_0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: fiber link up/down fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21d7f67700ad7a4523d35d43ce95755e40eae5b7 Commit: 21d7f67700ad7a4523d35d43ce95755e40eae5b7 Parent: 799b21d2bddd43145130e509efb92339eabafef9 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 11:54:51 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:29 2007 -0500 skge: fiber link up/down fix The driver would not work over fibre if other end when down then came back up (would require reloading driver). The correct way to manage the link the same way for both TP and fibre. Resloves problem described in: http://lkml.org/lkml/2007/11/6/395 Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index b680cb0..73a4246 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -1095,16 +1095,9 @@ static void xm_link_down(struct skge_hw *hw, int port) { struct net_device *dev = hw->dev[port]; struct skge_port *skge = netdev_priv(dev); - u16 cmd = xm_read16(hw, port, XM_MMU_CMD); xm_write16(hw, port, XM_IMSK, XM_IMSK_DISABLE); - cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX); - xm_write16(hw, port, XM_MMU_CMD, cmd); - - /* dummy read to ensure writing */ - xm_read16(hw, port, XM_MMU_CMD); - if (netif_carrier_ok(dev)) skge_link_down(skge); } @@ -1194,6 +1187,7 @@ static void genesis_init(struct skge_hw *hw) static void genesis_reset(struct skge_hw *hw, int port) { const u8 zero[8] = { 0 }; + u32 reg; skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0); @@ -1209,6 +1203,11 @@ static void genesis_reset(struct skge_hw *hw, int port) xm_write16(hw, port, PHY_BCOM_INT_MASK, 0x); xm_outhash(hw, port, XM_HSM, zero); + + /* Flush TX and RX fifo */ + reg = xm_read32(hw, port, XM_MODE); + xm_write32(hw, port, XM_MODE, reg | XM_MD_FTF); + xm_write32(hw, port, XM_MODE, reg | XM_MD_FRF); } @@ -1714,6 +1713,12 @@ static void genesis_stop(struct skge_port *skge) struct skge_hw *hw = skge->hw; int port = skge->port; unsigned retries = 1000; + u16 cmd; + + /* Disable Tx and Rx */ + cmd = xm_read16(hw, port, XM_MMU_CMD); + cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX); + xm_write16(hw, port, XM_MMU_CMD, cmd); genesis_reset(hw, port); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: increase TX threshold for Jumbo
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=485982a99a8a0b547aebedc3d0017dbffc3a44c0 Commit: 485982a99a8a0b547aebedc3d0017dbffc3a44c0 Parent: 21d7f67700ad7a4523d35d43ce95755e40eae5b7 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 11:54:52 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:29 2007 -0500 skge: increase TX threshold for Jumbo Need to increase TX threshold when doing Jumbo frames on dual port board to avoid underruns. (Code from sk98lin). Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 73a4246..f7e0fbb 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -1633,15 +1633,14 @@ static void genesis_mac_init(struct skge_hw *hw, int port) } xm_write16(hw, port, XM_RX_CMD, r); - /* We want short frames padded to 60 bytes. */ xm_write16(hw, port, XM_TX_CMD, XM_TX_AUTO_PAD); - /* -* Bump up the transmit threshold. This helps hold off transmit -* underruns when we're blasting traffic from both ports at once. -*/ - xm_write16(hw, port, XM_TX_THR, 512); + /* Increase threshold for jumbo frames on dual port */ + if (hw->ports > 1 && jumbo) + xm_write16(hw, port, XM_TX_THR, 1020); + else + xm_write16(hw, port, XM_TX_THR, 512); /* * Enable the reception of all error frames. This is is - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge version 1.13
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bf9f56d585c1e4cab6c44270fa5865237751dbda Commit: bf9f56d585c1e4cab6c44270fa5865237751dbda Parent: 485982a99a8a0b547aebedc3d0017dbffc3a44c0 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 11:54:53 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:29 2007 -0500 skge version 1.13 Version for 2.6.24 Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index f7e0fbb..5935940 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -44,7 +44,7 @@ #include "skge.h" #define DRV_NAME "skge" -#define DRV_VERSION"1.12" +#define DRV_VERSION"1.13" #define PFXDRV_NAME " " #define DEFAULT_TX_RING_SIZE 128 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: serial mode register values
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=44c7fccec4098772b9451a252d162faea4f0cc34 Commit: 44c7fccec4098772b9451a252d162faea4f0cc34 Parent: bf9f56d585c1e4cab6c44270fa5865237751dbda Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 14:23:01 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:30 2007 -0500 skge: serial mode register values For compatiablity with sk98lin, make sure and set same values in serial mode register. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 5935940..53d2059 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -2190,9 +2190,12 @@ static void yukon_mac_init(struct skge_hw *hw, int port) TX_JAM_IPG_VAL(TX_JAM_IPG_DEF) | TX_IPG_JAM_DATA(TX_IPG_JAM_DEF)); - /* serial mode register */ - reg = GM_SMOD_VLAN_ENA | IPG_DATA_VAL(IPG_DATA_DEF); - if (hw->dev[port]->mtu > 1500) + /* configure the Serial Mode Register */ + reg = DATA_BLIND_VAL(DATA_BLIND_DEF) + | GM_SMOD_VLAN_ENA + | IPG_DATA_VAL(IPG_DATA_DEF); + + if (hw->dev[port]->mtu > ETH_DATA_LEN) reg |= GM_SMOD_JUMBO_ENA; gma_write16(hw, port, GM_SERIAL_MODE, reg); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: MTU changing fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a8098be987d3fa00c9fe9d2b68154675df49112 Commit: 1a8098be987d3fa00c9fe9d2b68154675df49112 Parent: 44c7fccec4098772b9451a252d162faea4f0cc34 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 14:25:05 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:30 2007 -0500 skge: MTU changing fix The code to change MTU doesn't correctly handle all the chip variations and requirements for restarting. On Genesis chips changing MTU would just cause receiver to hang. Use a simpler approach of just taking link down/up if needed. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c | 35 ++- 1 files changed, 2 insertions(+), 33 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 53d2059..186eb8e 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -2896,11 +2896,7 @@ static void skge_tx_timeout(struct net_device *dev) static int skge_change_mtu(struct net_device *dev, int new_mtu) { - struct skge_port *skge = netdev_priv(dev); - struct skge_hw *hw = skge->hw; - int port = skge->port; int err; - u16 ctl, reg; if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU) return -EINVAL; @@ -2910,40 +2906,13 @@ static int skge_change_mtu(struct net_device *dev, int new_mtu) return 0; } - skge_write32(hw, B0_IMSK, 0); - dev->trans_start = jiffies; /* prevent tx timeout */ - netif_stop_queue(dev); - napi_disable(&skge->napi); - - ctl = gma_read16(hw, port, GM_GP_CTRL); - gma_write16(hw, port, GM_GP_CTRL, ctl & ~GM_GPCR_RX_ENA); - - skge_rx_clean(skge); - skge_rx_stop(hw, port); + skge_down(dev); dev->mtu = new_mtu; - reg = GM_SMOD_VLAN_ENA | IPG_DATA_VAL(IPG_DATA_DEF); - if (new_mtu > 1500) - reg |= GM_SMOD_JUMBO_ENA; - gma_write16(hw, port, GM_SERIAL_MODE, reg); - - skge_write8(hw, RB_ADDR(rxqaddr[port], RB_CTRL), RB_ENA_OP_MD); - - err = skge_rx_fill(dev); - wmb(); - if (!err) - skge_write8(hw, Q_ADDR(rxqaddr[port], Q_CSR), CSR_START | CSR_IRQ_CL_F); - skge_write32(hw, B0_IMSK, hw->intr_mask); - + err = skge_up(dev); if (err) dev_close(dev); - else { - gma_write16(hw, port, GM_GP_CTRL, ctl); - - napi_enable(&skge->napi); - netif_wake_queue(dev); - } return err; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
phylib: add PHY interface modes for internal delay for tx and rx only
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7d400a4c589749bf5b5e544aee07b3c489b54d02 Commit: 7d400a4c589749bf5b5e544aee07b3c489b54d02 Parent: 1a8098be987d3fa00c9fe9d2b68154675df49112 Author: Kim Phillips <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 16:17:48 2007 -0600 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:30 2007 -0500 phylib: add PHY interface modes for internal delay for tx and rx only Allow phylib specification of cases where hardware needs to configure PHYs for Internal Delay only on either RX or TX (not both). Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> Tested-by: Anton Vorontsov <[EMAIL PROTECTED]> Acked-by: Li Yang <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- include/linux/phy.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/phy.h b/include/linux/phy.h index f0742b6..e10763d 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -58,6 +58,8 @@ typedef enum { PHY_INTERFACE_MODE_RMII, PHY_INTERFACE_MODE_RGMII, PHY_INTERFACE_MODE_RGMII_ID, + PHY_INTERFACE_MODE_RGMII_RXID, + PHY_INTERFACE_MODE_RGMII_TXID, PHY_INTERFACE_MODE_RTBI } phy_interface_t; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
skge: FIFO Ram calculation error
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=29816d9aa55c99d463bd5507a46535b5fe79c33a Commit: 29816d9aa55c99d463bd5507a46535b5fe79c33a Parent: 1c1478859017452a1179dbbdf7b9eb5b48438746 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 11:54:48 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:29 2007 -0500 skge: FIFO Ram calculation error The calculation of usable FIFO RAM is wrong in the skge driver. First, is doesn't take into account the reserved area on the original SysKonnect Genesis boards. Second it has an off-by-one error because hw->ports is either 1 or 2. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/skge.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 6d62250..14f06ae 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -2619,8 +2619,8 @@ static int skge_up(struct net_device *dev) yukon_mac_init(hw, port); spin_unlock_bh(&hw->phy_lock); - /* Configure RAMbuffers */ - chunk = hw->ram_size / ((hw->ports + 1)*2); + /* Configure RAMbuffers - equally between ports and tx/rx */ + chunk = (hw->ram_size - hw->ram_offset) / (hw->ports * 2); ram_addr = hw->ram_offset + 2 * chunk * port; skge_ramset(hw, rxqaddr[port], ram_addr, chunk); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type parameters
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd0ceaab86d3f0e3916b3b7868cfe20de490eebc Commit: bd0ceaab86d3f0e3916b3b7868cfe20de490eebc Parent: 9daf5a7695f70b60c498aac079f908c81ffe4d15 Author: Kim Phillips <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 16:17:58 2007 -0600 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:30 2007 -0500 ucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type parameters Extend the RGMII-Internal Delay specification case to include TX-only and RX-only variants. Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> Tested-by: Anton Vorontsov <[EMAIL PROTECTED]> Acked-by: Li Yang <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/ucc_geth.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index a3ff270..7f68990 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -1460,6 +1460,8 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth) if ((ugeth->phy_interface == PHY_INTERFACE_MODE_RMII) || (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII) || (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_ID) || + (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) || + (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) || (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) { upsmr |= UPSMR_RPM; switch (ugeth->max_speed) { @@ -1557,6 +1559,8 @@ static void adjust_link(struct net_device *dev) if ((ugeth->phy_interface == PHY_INTERFACE_MODE_RMII) || (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII) || (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_ID) || + (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) || + (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) || (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) { if (phydev->speed == SPEED_10) upsmr |= UPSMR_R10M; @@ -3795,6 +3799,10 @@ static phy_interface_t to_phy_interface(const char *phy_connection_type) return PHY_INTERFACE_MODE_RGMII; if (strcasecmp(phy_connection_type, "rgmii-id") == 0) return PHY_INTERFACE_MODE_RGMII_ID; + if (strcasecmp(phy_connection_type, "rgmii-txid") == 0) + return PHY_INTERFACE_MODE_RGMII_TXID; + if (strcasecmp(phy_connection_type, "rgmii-rxid") == 0) + return PHY_INTERFACE_MODE_RGMII_RXID; if (strcasecmp(phy_connection_type, "rtbi") == 0) return PHY_INTERFACE_MODE_RTBI; @@ -3889,6 +3897,8 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma case PHY_INTERFACE_MODE_GMII: case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII_ID: + case PHY_INTERFACE_MODE_RGMII_RXID: + case PHY_INTERFACE_MODE_RGMII_TXID: case PHY_INTERFACE_MODE_TBI: case PHY_INTERFACE_MODE_RTBI: max_speed = SPEED_1000; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
cxgb - fix T2 GSO
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7832ee034b6ef78aab020c9ec1348544cd65ccbd Commit: 7832ee034b6ef78aab020c9ec1348544cd65ccbd Parent: bd0ceaab86d3f0e3916b3b7868cfe20de490eebc Author: Divy Le Ray <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 13:30:09 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:31 2007 -0500 cxgb - fix T2 GSO The patch ensures that a GSO skb has enough headroom to push an encapsulating cpl_tx_pkt_lso header. Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/chelsio/cxgb2.c |3 ++- drivers/net/chelsio/sge.c | 34 +++--- drivers/net/chelsio/sge.h |1 + 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c old mode 100644 new mode 100755 index 2dbf8dc..2461f91 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c @@ -401,7 +401,8 @@ static char stats_strings[][ETH_GSTRING_LEN] = { "TxTso", "RxVlan", "TxVlan", - + "TxNeedHeadroom", + /* Interrupt stats */ "rx drops", "pure_rsps", diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c old mode 100644 new mode 100755 index 4436662..e8b1036 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c @@ -991,6 +991,7 @@ void t1_sge_get_port_stats(const struct sge *sge, int port, ss->tx_packets += st->tx_packets; ss->tx_cso += st->tx_cso; ss->tx_tso += st->tx_tso; + ss->tx_need_hdrroom += st->tx_need_hdrroom; ss->vlan_xtract += st->vlan_xtract; ss->vlan_insert += st->vlan_insert; } @@ -1848,7 +1849,8 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct adapter *adapter = dev->priv; struct sge *sge = adapter->sge; - struct sge_port_stats *st = per_cpu_ptr(sge->port_stats[dev->if_port], smp_processor_id()); + struct sge_port_stats *st = per_cpu_ptr(sge->port_stats[dev->if_port], + smp_processor_id()); struct cpl_tx_pkt *cpl; struct sk_buff *orig_skb = skb; int ret; @@ -1856,6 +1858,18 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) if (skb->protocol == htons(ETH_P_CPL5)) goto send; + /* +* We are using a non-standard hard_header_len. +* Allocate more header room in the rare cases it is not big enough. +*/ + if (unlikely(skb_headroom(skb) < dev->hard_header_len - ETH_HLEN)) { + skb = skb_realloc_headroom(skb, sizeof(struct cpl_tx_pkt_lso)); + ++st->tx_need_hdrroom; + dev_kfree_skb_any(orig_skb); + if (!skb) + return NETDEV_TX_OK; + } + if (skb_shinfo(skb)->gso_size) { int eth_type; struct cpl_tx_pkt_lso *hdr; @@ -1889,24 +1903,6 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) return NETDEV_TX_OK; } - /* -* We are using a non-standard hard_header_len and some kernel -* components, such as pktgen, do not handle it right. -* Complain when this happens but try to fix things up. -*/ - if (unlikely(skb_headroom(skb) < dev->hard_header_len - ETH_HLEN)) { - pr_debug("%s: headroom %d header_len %d\n", dev->name, -skb_headroom(skb), dev->hard_header_len); - - if (net_ratelimit()) - printk(KERN_ERR "%s: inadequate headroom in " - "Tx packet\n", dev->name); - skb = skb_realloc_headroom(skb, sizeof(*cpl)); - dev_kfree_skb_any(orig_skb); - if (!skb) - return NETDEV_TX_OK; - } - if (!(adapter->flags & UDP_CSUM_CAPABLE) && skb->ip_summed == CHECKSUM_PARTIAL && ip_hdr(skb)->protocol == IPPROTO_UDP) { diff --git a/drivers/net/chelsio/sge.h b/drivers/net/chelsio/sge.h old mode 100644 new mode 100755 index 713d9c5..285bbb2 --- a/drivers/net/chelsio/sge.h +++ b/drivers/net/chelsio/sge.h @@ -64,6 +64,7 @@ struct sge_port_stats { u64 tx_tso; /* # of TSO requests */ u64 vlan_xtract; /* # of VLAN tag extractions */ u64 vlan_insert; /* # of VLAN tag insertions */ + u64 tx_need_hdrroom; /* # of TX skbs in need of more header room */ }; struct sk_buff; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL
cxgb - fix NAPI
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=445cf803ca757a5c43f4e11fdfba70355d510841 Commit: 445cf803ca757a5c43f4e11fdfba70355d510841 Parent: 7832ee034b6ef78aab020c9ec1348544cd65ccbd Author: Divy Le Ray <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 13:30:15 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:31 2007 -0500 cxgb - fix NAPI netif_rx_complete() should be called only when work_done < budget. Signed-off-by: Divy Le ray <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/chelsio/sge.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c old mode 100755 new mode 100644 index e8b1036..4b6258f --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c @@ -1625,11 +1625,9 @@ int t1_poll(struct napi_struct *napi, int budget) { struct adapter *adapter = container_of(napi, struct adapter, napi); struct net_device *dev = adapter->port[0].dev; - int work_done; - - work_done = process_responses(adapter, budget); + int work_done = process_responses(adapter, budget); - if (likely(!responses_pending(adapter))) { + if (likely(work_done < budget)) { netif_rx_complete(dev, napi); writel(adapter->sge->respQ.cidx, adapter->regs + A_SG_SLEEPING); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
cxgb - fix stats
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0348b9ae5374f9a24424ae680bcd80724415f60 Commit: e0348b9ae5374f9a24424ae680bcd80724415f60 Parent: 445cf803ca757a5c43f4e11fdfba70355d510841 Author: Divy Le Ray <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 13:30:20 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:31 2007 -0500 cxgb - fix stats Fix MAC stats accounting. Fix get_stats. Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/chelsio/cxgb2.c | 67 +++-- drivers/net/chelsio/pm3393.c | 112 +- drivers/net/chelsio/sge.c|4 -- drivers/net/chelsio/sge.h|2 - 4 files changed, 96 insertions(+), 89 deletions(-) diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 2461f91..c597504 100755 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c @@ -374,7 +374,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = { "TxInternalMACXmitError", "TxFramesWithExcessiveDeferral", "TxFCSErrors", - + "TxJumboFramesOk", + "TxJumboOctetsOk", + "RxOctetsOK", "RxOctetsBad", "RxUnicastFramesOK", @@ -392,11 +394,11 @@ static char stats_strings[][ETH_GSTRING_LEN] = { "RxInRangeLengthErrors", "RxOutOfRangeLengthField", "RxFrameTooLongErrors", + "RxJumboFramesOk", + "RxJumboOctetsOk", /* Port stats */ - "RxPackets", "RxCsumGood", - "TxPackets", "TxCsumOffload", "TxTso", "RxVlan", @@ -464,23 +466,56 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats, const struct cmac_statistics *s; const struct sge_intr_counts *t; struct sge_port_stats ss; - unsigned int len; s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); - - len = sizeof(u64)*(&s->TxFCSErrors + 1 - &s->TxOctetsOK); - memcpy(data, &s->TxOctetsOK, len); - data += len; - - len = sizeof(u64)*(&s->RxFrameTooLongErrors + 1 - &s->RxOctetsOK); - memcpy(data, &s->RxOctetsOK, len); - data += len; - + t = t1_sge_get_intr_counts(adapter->sge); t1_sge_get_port_stats(adapter->sge, dev->if_port, &ss); - memcpy(data, &ss, sizeof(ss)); - data += sizeof(ss); - t = t1_sge_get_intr_counts(adapter->sge); + *data++ = s->TxOctetsOK; + *data++ = s->TxOctetsBad; + *data++ = s->TxUnicastFramesOK; + *data++ = s->TxMulticastFramesOK; + *data++ = s->TxBroadcastFramesOK; + *data++ = s->TxPauseFrames; + *data++ = s->TxFramesWithDeferredXmissions; + *data++ = s->TxLateCollisions; + *data++ = s->TxTotalCollisions; + *data++ = s->TxFramesAbortedDueToXSCollisions; + *data++ = s->TxUnderrun; + *data++ = s->TxLengthErrors; + *data++ = s->TxInternalMACXmitError; + *data++ = s->TxFramesWithExcessiveDeferral; + *data++ = s->TxFCSErrors; + *data++ = s->TxJumboFramesOK; + *data++ = s->TxJumboOctetsOK; + + *data++ = s->RxOctetsOK; + *data++ = s->RxOctetsBad; + *data++ = s->RxUnicastFramesOK; + *data++ = s->RxMulticastFramesOK; + *data++ = s->RxBroadcastFramesOK; + *data++ = s->RxPauseFrames; + *data++ = s->RxFCSErrors; + *data++ = s->RxAlignErrors; + *data++ = s->RxSymbolErrors; + *data++ = s->RxDataErrors; + *data++ = s->RxSequenceErrors; + *data++ = s->RxRuntErrors; + *data++ = s->RxJabberErrors; + *data++ = s->RxInternalMACRcvError; + *data++ = s->RxInRangeLengthErrors; + *data++ = s->RxOutOfRangeLengthField; + *data++ = s->RxFrameTooLongErrors; + *data++ = s->RxJumboFramesOK; + *data++ = s->RxJumboOctetsOK; + + *data++ = ss.rx_cso_good; + *data++ = ss.tx_cso; + *data++ = ss.tx_tso; + *data++ = ss.vlan_xtract; + *data++ = ss.vlan_insert; + *data++ = ss.tx_need_hdrroom; + *data++ = t->rx_drops; *data++ = t->pure_rsps; *data++ = t->unhandled_irqs; diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c old mode 100644 new mode 100755 index 678778a..2117c4f --- a/drivers/net/chelsio/pm3393.c +++ b/drivers/net/chelsio/pm3393.c @@ -45,7 +45,7 @@ #include -#define OFFSET(REG_ADDR)(REG_ADDR << 2) +#define OFFSET(REG_ADDR)((REG_ADDR) << 2) /* Max frame size PM3393 can handle. Includes Ethernet header and CRC. */ #define MAX_FRAME_SIZE 9600 @@ -428,69 +428,26 @@ static int pm3393_set_speed_duplex_fc(struct cmac *cmac, int speed, int duplex, return 0; } -static void pm3393_rmon_update(struct adapter *adapter, u32 offs, u64 *val, - int over) -{ - u32 val0, val1, val2; - - t1_
sky2: revert to access PCI config via device space
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b32f40c4853cdbe3d722a959fb0dd1ea048b50d0 Commit: b32f40c4853cdbe3d722a959fb0dd1ea048b50d0 Parent: e0348b9ae5374f9a24424ae680bcd80724415f60 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 10:57:27 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:31 2007 -0500 sky2: revert to access PCI config via device space Using the hardware window into PCI config space is more reliable and smaller/faster than using the pci_config routines. It avoids issues with MMCONFIG etc. Reverts: 167f53d05fccb47b6eeadac7f6705b3f2f042d03 Please apply for 2.6.24 Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/sky2.c | 73 +--- drivers/net/sky2.h | 21 +++ 2 files changed, 56 insertions(+), 38 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 8c4c743..65071e4 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -240,22 +240,21 @@ static void sky2_power_on(struct sky2_hw *hw) sky2_write8(hw, B2_Y2_CLK_GATE, 0); if (hw->flags & SKY2_HW_ADV_POWER_CTL) { - struct pci_dev *pdev = hw->pdev; u32 reg; - pci_write_config_dword(pdev, PCI_DEV_REG3, 0); + sky2_pci_write32(hw, PCI_DEV_REG3, 0); - pci_read_config_dword(pdev, PCI_DEV_REG4, ®); + reg = sky2_pci_read32(hw, PCI_DEV_REG4); /* set all bits to 0 except bits 15..12 and 8 */ reg &= P_ASPM_CONTROL_MSK; - pci_write_config_dword(pdev, PCI_DEV_REG4, reg); + sky2_pci_write32(hw, PCI_DEV_REG4, reg); - pci_read_config_dword(pdev, PCI_DEV_REG5, ®); + reg = sky2_pci_read32(hw, PCI_DEV_REG5); /* set all bits to 0 except bits 28 & 27 */ reg &= P_CTL_TIM_VMAIN_AV_MSK; - pci_write_config_dword(pdev, PCI_DEV_REG5, reg); + sky2_pci_write32(hw, PCI_DEV_REG5, reg); - pci_write_config_dword(pdev, PCI_CFG_REG_1, 0); + sky2_pci_write32(hw, PCI_CFG_REG_1, 0); /* Enable workaround for dev 4.107 on Yukon-Ultra & Extreme */ reg = sky2_read32(hw, B2_GP_IO); @@ -619,12 +618,11 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) { - struct pci_dev *pdev = hw->pdev; u32 reg1; static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD }; static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA }; - pci_read_config_dword(pdev, PCI_DEV_REG1, ®1); + reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); /* Turn on/off phy power saving */ if (onoff) reg1 &= ~phy_power[port]; @@ -634,8 +632,8 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) if (onoff && hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) reg1 |= coma_mode[port]; - pci_write_config_dword(pdev, PCI_DEV_REG1, reg1); - pci_read_config_dword(pdev, PCI_DEV_REG1, ®1); + sky2_pci_write32(hw, PCI_DEV_REG1, reg1); + reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); udelay(100); } @@ -704,9 +702,9 @@ static void sky2_wol_init(struct sky2_port *sky2) sky2_write16(hw, WOL_REGS(port, WOL_CTRL_STAT), ctrl); /* Turn on legacy PCI-Express PME mode */ - pci_read_config_dword(hw->pdev, PCI_DEV_REG1, ®1); + reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); reg1 |= PCI_Y2_PME_LEGACY; - pci_write_config_dword(hw->pdev, PCI_DEV_REG1, reg1); + sky2_pci_write32(hw, PCI_DEV_REG1, reg1); /* block receiver */ sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); @@ -1322,9 +1320,10 @@ static int sky2_up(struct net_device *dev) (cap = pci_find_capability(hw->pdev, PCI_CAP_ID_PCIX))) { u16 cmd; - pci_read_config_word(hw->pdev, cap + PCI_X_CMD, &cmd); + cmd = sky2_pci_read16(hw, cap + PCI_X_CMD); cmd &= ~PCI_X_CMD_MAX_SPLIT; - pci_write_config_word(hw->pdev, cap + PCI_X_CMD, cmd); + sky2_pci_write16(hw, cap + PCI_X_CMD, cmd); + } if (netif_msg_ifup(sky2)) @@ -2422,12 +2421,12 @@ static void sky2_hw_intr(struct sky2_hw *hw) if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { u16 pci_err; - pci_read_config_word(pdev, PCI_STATUS, &pci_err); + pci_err = sky2_pci_read16(hw, PCI_STATUS); if (net_ratelimit()) dev_err(&pdev->dev, "PCI hardware error (0x%x)\n",
phylib: marvell: add support for TX-only and RX-only Internal Delay
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9daf5a7695f70b60c498aac079f908c81ffe4d15 Commit: 9daf5a7695f70b60c498aac079f908c81ffe4d15 Parent: 7d400a4c589749bf5b5e544aee07b3c489b54d02 Author: Kim Phillips <[EMAIL PROTECTED]> AuthorDate: Mon Nov 26 16:17:52 2007 -0600 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:30 2007 -0500 phylib: marvell: add support for TX-only and RX-only Internal Delay Previously, Internal Delay specification implied the delay be applied to both TX and RX. This patch allows for separate TX/RX-only internal delay specification. Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> Tested-by: Anton Vorontsov <[EMAIL PROTECTED]> Acked-by: Li Yang <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/phy/marvell.c | 26 +- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 035fd41..f057407 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -143,21 +143,29 @@ static int m88e_config_init(struct phy_device *phydev) int err; if ((phydev->interface == PHY_INTERFACE_MODE_RGMII) || - (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)) { + (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) || + (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) || + (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)) { int temp; - if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { - temp = phy_read(phydev, MII_M_PHY_EXT_CR); - if (temp < 0) - return temp; + temp = phy_read(phydev, MII_M_PHY_EXT_CR); + if (temp < 0) + return temp; + if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { temp |= (MII_M_RX_DELAY | MII_M_TX_DELAY); - - err = phy_write(phydev, MII_M_PHY_EXT_CR, temp); - if (err < 0) - return err; + } else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { + temp &= ~MII_M_TX_DELAY; + temp |= MII_M_RX_DELAY; + } else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { + temp &= ~MII_M_RX_DELAY; + temp |= MII_M_TX_DELAY; } + err = phy_write(phydev, MII_M_PHY_EXT_CR, temp); + if (err < 0) + return err; + temp = phy_read(phydev, MII_M_PHY_EXT_SR); if (temp < 0) return temp; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: don't use AER routines
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7782c8c4d764dfe1b96e02e73d4d5f622fb4a389 Commit: 7782c8c4d764dfe1b96e02e73d4d5f622fb4a389 Parent: b32f40c4853cdbe3d722a959fb0dd1ea048b50d0 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 11:02:32 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:31 2007 -0500 sky2: don't use AER routines Using PCIE advanced error recovery stuff creates more user problems than it's worth. The AER stuff depends on MMCONFIG and in many configurations it just doesn't work. Plus it doesn't add any real functionality to the driver. The sky2 driver handles its own errors fine as is. This reverts 555382cbfc6d2187b53888190755e56f52308cd6 Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/sky2.c | 37 +++-- 1 files changed, 7 insertions(+), 30 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 65071e4..a42f1c7 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -2432,26 +2431,15 @@ static void sky2_hw_intr(struct sky2_hw *hw) if (status & Y2_IS_PCI_EXP) { /* PCI-Express uncorrectable Error occurred */ - int aer = pci_find_aer_capability(hw->pdev); u32 err; - if (aer) { - pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, - &err); - pci_cleanup_aer_uncorrect_error_status(pdev); - } else { - /* Either AER not configured, or not working -* because of bad MMCONFIG, so just do recover -* manually. -*/ - err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); - sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, -0xul); - } - + err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); + sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, +0xul); if (net_ratelimit()) dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); + sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); } if (status & Y2_HWE_L1_MASK) @@ -2806,24 +2794,13 @@ static void sky2_reset(struct sky2_hw *hw) cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); if (cap) { - if (pci_find_aer_capability(pdev)) { - /* Check for advanced error reporting */ - pci_cleanup_aer_uncorrect_error_status(pdev); - pci_cleanup_aer_correct_error_status(pdev); - } else { - dev_warn(&pdev->dev, - "PCI Express Advanced Error Reporting" - " not configured or MMCONFIG problem?\n"); - - sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, -0xul); - } + sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, +0xul); /* If error bit is stuck on ignore it */ if (sky2_read32(hw, B0_HWE_ISRC) & Y2_IS_PCI_EXP) dev_info(&pdev->dev, "ignoring stuck error report bit\n"); - - else if (pci_enable_pcie_error_reporting(pdev)) + else hwe_mask |= Y2_IS_PCI_EXP; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: turn of dynamic Tx watermark workaround (FE+ only)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e970d1f8106514ea619d7a9005b1dc92c6049b32 Commit: e970d1f8106514ea619d7a9005b1dc92c6049b32 Parent: 7782c8c4d764dfe1b96e02e73d4d5f622fb4a389 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 11:02:07 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:31 2007 -0500 sky2: turn of dynamic Tx watermark workaround (FE+ only) Add workaround for issues FE+ (A0) transmit watermark. This is copied verbatim from vendor driver sk98lin (10.22.4.3). Don't have that chip version and no more information seems to be available. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/sky2.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a42f1c7..3d1dfc9 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -845,6 +845,13 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) sky2_set_tx_stfwd(hw, port); } + if (hw->chip_id == CHIP_ID_YUKON_FE_P && + hw->chip_rev == CHIP_REV_YU_FE2_A0) { + /* disable dynamic watermark */ + reg = sky2_read16(hw, SK_REG(port, TX_GMF_EA)); + reg &= ~TX_DYN_WM_ENA; + sky2_write16(hw, SK_REG(port, TX_GMF_EA), reg); + } } /* Assign Ram Buffer allocation to queue */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
e1000: Fix NAPI state bug when Rx complete
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f7bbb9098315d712351aba7861a8c9fcf6bf0213 Commit: f7bbb9098315d712351aba7861a8c9fcf6bf0213 Parent: e970d1f8106514ea619d7a9005b1dc92c6049b32 Author: Auke Kok <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 16:26:36 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:32 2007 -0500 e1000: Fix NAPI state bug when Rx complete Don't exit polling when we have not yet used our budget, this causes the NAPI system to end up with a messed up poll list. Signed-off-by: Auke Kok <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/e1000/e1000_main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index cf39473..4f37506 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3942,7 +3942,7 @@ e1000_clean(struct napi_struct *napi, int budget) &work_done, budget); /* If no Tx and not enough Rx work done, exit the polling mode */ - if ((!tx_cleaned && (work_done < budget)) || + if ((!tx_cleaned && (work_done == 0)) || !netif_running(poll_dev)) { quit_polling: if (likely(adapter->itr_setting & 3)) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
net: smc911x: only enable for mpr2 on sh.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0313d9884f3aaa540ec387125dde58bba01f10a5 Commit: 0313d9884f3aaa540ec387125dde58bba01f10a5 Parent: f7bbb9098315d712351aba7861a8c9fcf6bf0213 Author: Paul Mundt <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 18:24:59 2007 +0900 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:32:32 2007 -0500 net: smc911x: only enable for mpr2 on sh. The smc911x.h is a bit of a mess, not supporting any sort of generic configuration. For the moment only ARCH_PXA and SH_MAGIC_PANEL_R2 have suitable definitions, so we reflect this in the Kconfig also. While there are other SH boards that will likely turn this on in the 2.6.25 time frame, it's not worth trying to stub around at the moment. Fixes up the allmodconfig build, as noted by akpm. Signed-off-by: Paul Mundt <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 1437b37..d9107e5 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -926,7 +926,7 @@ config SMC911X tristate "SMSC LAN911[5678] support" select CRC32 select MII - depends on ARCH_PXA || SUPERH + depends on ARCH_PXA || SH_MAGIC_PANEL_R2 help This is a driver for SMSC's LAN911x series of Ethernet chipsets including the new LAN9115, LAN9116, LAN9117, and LAN9118. - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SET_NETDEV_DEV() in fec_mpc52xx.c
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d26e69533e4df45d03c0b9fa0b3f7e84980b873 Commit: 3d26e69533e4df45d03c0b9fa0b3f7e84980b873 Parent: 0313d9884f3aaa540ec387125dde58bba01f10a5 Author: David Woodhouse <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 18:04:31 2007 + Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:35:51 2007 -0500 SET_NETDEV_DEV() in fec_mpc52xx.c This helps to allow the Fedora installer to use the built-in Ethernet on the Efika for a network install. Signed-off-by: David Woodhouse <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/fec_mpc52xx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index a8a0ee2..bf5a7ca 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -971,6 +971,8 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) mpc52xx_fec_reset_stats(ndev); + SET_NETDEV_DEV(ndev, &op->dev); + /* Register the new network device */ rv = register_netdev(ndev); if (rv < 0) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Stop phy code from returning success to unknown ioctls.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dda93b486a25009456fca6b9c925ab4d7c6b6d6a Commit: dda93b486a25009456fca6b9c925ab4d7c6b6d6a Parent: 3d26e69533e4df45d03c0b9fa0b3f7e84980b873 Author: David Woodhouse <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 19:56:34 2007 + Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:35:51 2007 -0500 Stop phy code from returning success to unknown ioctls. This kind of sucks, and prevents the Fedora installer from using the device for network installs... [EMAIL PROTECTED] phy]# iwconfig eth0 Warning: Driver for device eth0 has been compiled with an ancient version of Wireless Extension, while this program support version 11 and later. Some things may be broken... eth0ESSID:off/any Nickname:"" NWID:0 Channel:0 Access Point: 00:00:BF:81:14:E0 Bit Rate:-1.08206e+06 kb/s Sensitivity=0/0 RTS thr:off Fragment thr:off Encryption key: Power Management:off Signed-off-by: David Woodhouse <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/phy/phy.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 9bc1177..7c9e6e3 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -406,6 +406,9 @@ int phy_mii_ioctl(struct phy_device *phydev, && phydev->drv->config_init) phydev->drv->config_init(phydev); break; + + default: + return -ENOTTY; } return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
via-velocity: don't oops on MTU change (resend)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48f6b053613b62fed7a2fe3255e5568260a8d615 Commit: 48f6b053613b62fed7a2fe3255e5568260a8d615 Parent: dda93b486a25009456fca6b9c925ab4d7c6b6d6a Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 14:20:16 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:35:51 2007 -0500 via-velocity: don't oops on MTU change (resend) The VIA veloicty driver needs the following to allow changing MTU when down. The buffer size needs to be computed when device is brought up, not when device is initialized. This also fixes a bug where the buffer size was computed differently on change_mtu versus initial setting. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/via-velocity.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 450e29d..35cd65d 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -1242,6 +1242,9 @@ static int velocity_rx_refill(struct velocity_info *vptr) static int velocity_init_rd_ring(struct velocity_info *vptr) { int ret; + int mtu = vptr->dev->mtu; + + vptr->rx_buf_sz = (mtu <= ETH_DATA_LEN) ? PKT_BUF_SZ : mtu + 32; vptr->rd_info = kcalloc(vptr->options.numrx, sizeof(struct velocity_rd_info), GFP_KERNEL); @@ -1898,8 +1901,6 @@ static int velocity_open(struct net_device *dev) struct velocity_info *vptr = netdev_priv(dev); int ret; - vptr->rx_buf_sz = (dev->mtu <= 1504 ? PKT_BUF_SZ : dev->mtu + 32); - ret = velocity_init_rings(vptr); if (ret < 0) goto out; @@ -1978,12 +1979,6 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu) velocity_free_rd_ring(vptr); dev->mtu = new_mtu; - if (new_mtu > 8192) - vptr->rx_buf_sz = 9 * 1024; - else if (new_mtu > 4096) - vptr->rx_buf_sz = 8192; - else - vptr->rx_buf_sz = 4 * 1024; ret = velocity_init_rd_ring(vptr); if (ret < 0) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
LIB82596: correct data types for hardware addresses
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ec46c6dae343688ff1136a0899b6a3c5e95e44b Commit: 9ec46c6dae343688ff1136a0899b6a3c5e95e44b Parent: 48f6b053613b62fed7a2fe3255e5568260a8d615 Author: Thomas Bogendoerfer <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 23:13:16 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 16:38:28 2007 -0500 LIB82596: correct data types for hardware addresses dma_addr_t is 64bit wide on some architectures (for example 64bit MIPS), so it's not a good idea to use it for 32bit wide addresses in descriptors. Signed-off-by: Thomas Bogendoerfer <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/lib82596.c | 50 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c index 9a855e5..b59f442 100644 --- a/drivers/net/lib82596.c +++ b/drivers/net/lib82596.c @@ -176,8 +176,8 @@ struct i596_reg { struct i596_tbd { unsigned short size; unsigned short pad; - dma_addr_t next; - dma_addr_t data; + u32next; + u32data; u32 cache_pad[5]; /* Total 32 bytes... */ }; @@ -195,12 +195,12 @@ struct i596_cmd { struct i596_cmd *v_next;/* Address from CPUs viewpoint */ unsigned short status; unsigned short command; - dma_addr_t b_next; /* Address from i596 viewpoint */ + u32b_next; /* Address from i596 viewpoint */ }; struct tx_cmd { struct i596_cmd cmd; - dma_addr_t tbd; + u32tbd; unsigned short size; unsigned short pad; struct sk_buff *skb;/* So we can free it after tx */ @@ -237,8 +237,8 @@ struct cf_cmd { struct i596_rfd { unsigned short stat; unsigned short cmd; - dma_addr_t b_next; /* Address from i596 viewpoint */ - dma_addr_t rbd; + u32b_next; /* Address from i596 viewpoint */ + u32rbd; unsigned short count; unsigned short size; struct i596_rfd *v_next;/* Address from CPUs viewpoint */ @@ -249,18 +249,18 @@ struct i596_rfd { }; struct i596_rbd { -/* hardware data */ -unsigned short count; -unsigned short zero1; -dma_addr_t b_next; -dma_addr_t b_data; /* Address from i596 viewpoint */ -unsigned short size; -unsigned short zero2; -/* driver data */ -struct sk_buff *skb; -struct i596_rbd *v_next; -dma_addr_t b_addr; /* This rbd addr from i596 view */ -unsigned char *v_data; /* Address from CPUs viewpoint */ + /* hardware data */ + unsigned short count; + unsigned short zero1; + u32b_next; + u32b_data; /* Address from i596 viewpoint */ + unsigned short size; + unsigned short zero2; + /* driver data */ + struct sk_buff *skb; + struct i596_rbd *v_next; + u32b_addr; /* This rbd addr from i596 view */ + unsigned char *v_data; /* Address from CPUs viewpoint */ /* Total 32 bytes... */ #ifdef __LP64__ u32 cache_pad[4]; @@ -275,8 +275,8 @@ struct i596_rbd { struct i596_scb { unsigned short status; unsigned short command; - dma_addr_tcmd; - dma_addr_trfd; + u32 cmd; + u32 rfd; u32 crc_err; u32 align_err; u32 resource_err; @@ -288,14 +288,14 @@ struct i596_scb { }; struct i596_iscp { - u32 stat; - dma_addr_tscb; + u32 stat; + u32 scb; }; struct i596_scp { - u32 sysbus; - u32 pad; - dma_addr_tiscp; + u32 sysbus; + u32 pad; + u32 iscp; }; struct i596_dma { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SUNGEM]: Fix NAPI regression with reset work
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dde655c9df02ee07ed090dfdb7ae8741bf299e14 Commit: dde655c9df02ee07ed090dfdb7ae8741bf299e14 Parent: 5dba4797115c8fa05c1a4d12927a6ae0b33ffc41 Author: Johannes Berg <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 21:51:36 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 21:51:36 2007 +1100 [SUNGEM]: Fix NAPI regression with reset work sungem's gem_reset_task() will unconditionally try to disable NAPI even when it's called while the interface is not operating and hence the NAPI struct isn't enabled. Make napi_disable() depend on gp->running. Also removes a superfluous test of gp->running in the same function. Signed-off-by: Johannes Berg <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- drivers/net/sungem.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index f6fedcc..6887214 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c @@ -2281,14 +2281,12 @@ static void gem_reset_task(struct work_struct *work) mutex_lock(&gp->pm_mutex); - napi_disable(&gp->napi); + if (gp->opened) + napi_disable(&gp->napi); spin_lock_irq(&gp->lock); spin_lock(&gp->tx_lock); - if (gp->running == 0) - goto not_running; - if (gp->running) { netif_stop_queue(gp->dev); @@ -2298,13 +2296,14 @@ static void gem_reset_task(struct work_struct *work) gem_set_link_modes(gp); netif_wake_queue(gp->dev); } - not_running: + gp->reset_task_pending = 0; spin_unlock(&gp->tx_lock); spin_unlock_irq(&gp->lock); - napi_enable(&gp->napi); + if (gp->opened) + napi_enable(&gp->napi); mutex_unlock(&gp->pm_mutex); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[VLAN]: Fix nested VLAN transmit bug
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ab3b487db77fa98a24560f11a5a8e744b98d877 Commit: 6ab3b487db77fa98a24560f11a5a8e744b98d877 Parent: dde655c9df02ee07ed090dfdb7ae8741bf299e14 Author: Joonwoo Park <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 22:16:41 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 22:16:41 2007 +1100 [VLAN]: Fix nested VLAN transmit bug Fix misbehavior of vlan_dev_hard_start_xmit() for recursive encapsulations. Signed-off-by: Joonwoo Park <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/8021q/vlan_dev.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 7a36878..4f99bb8 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -462,7 +462,8 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs... */ - if (veth->h_vlan_proto != htons(ETH_P_8021Q)) { + if (veth->h_vlan_proto != htons(ETH_P_8021Q) || + VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) { int orig_headroom = skb_headroom(skb); unsigned short veth_TCI; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[BRIDGE]: Lost call to br_fdb_fini() in br_init() error path
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17efdd45755c0eb8d1418a1368ef7c7ebbe98c6e Commit: 17efdd45755c0eb8d1418a1368ef7c7ebbe98c6e Parent: 0a11225887fe6cbccd882404dc36ddc50f47daf9 Author: Pavel Emelyanov <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 23:41:43 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 23:41:43 2007 +1100 [BRIDGE]: Lost call to br_fdb_fini() in br_init() error path In case the br_netfilter_init() (or any subsequent call) fails, the br_fdb_fini() must be called to free the allocated in br_fdb_init() br_fdb_cache kmem cache. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/bridge/br.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/bridge/br.c b/net/bridge/br.c index 93867bb..a901828 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c @@ -39,7 +39,7 @@ static int __init br_init(void) err = br_fdb_init(); if (err) - goto err_out1; + goto err_out; err = br_netfilter_init(); if (err) @@ -65,6 +65,8 @@ err_out3: err_out2: br_netfilter_fini(); err_out1: + br_fdb_fini(); +err_out: llc_sap_put(br_stp_sap); return err; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[UNIX]: EOF on non-blocking SOCK_SEQPACKET
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a11225887fe6cbccd882404dc36ddc50f47daf9 Commit: 0a11225887fe6cbccd882404dc36ddc50f47daf9 Parent: 6ab3b487db77fa98a24560f11a5a8e744b98d877 Author: Florian Zumbiehl <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 23:19:23 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 23:19:23 2007 +1100 [UNIX]: EOF on non-blocking SOCK_SEQPACKET I am not absolutely sure whether this actually is a bug (as in: I've got no clue what the standards say or what other implementations do), but at least I was pretty surprised when I noticed that a recv() on a non-blocking unix domain socket of type SOCK_SEQPACKET (which is connection oriented, after all) where the remote end has closed the connection returned -1 (EAGAIN) rather than 0 to indicate end of file. This is a test case: | #include | #include | #include | #include | #include | #include | #include | | int main(){ | int sock; | struct sockaddr_un addr; | char buf[4096]; | int pfds[2]; | | pipe(pfds); | sock=socket(PF_UNIX,SOCK_SEQPACKET,0); | addr.sun_family=AF_UNIX; | strcpy(addr.sun_path,"/tmp/foobar_testsock"); | bind(sock,(struct sockaddr *)&addr,sizeof(addr)); | listen(sock,1); | if(fork()){ | close(sock); | sock=socket(PF_UNIX,SOCK_SEQPACKET,0); | connect(sock,(struct sockaddr *)&addr,sizeof(addr)); | fcntl(sock,F_SETFL,fcntl(sock,F_GETFL)|O_NONBLOCK); | close(pfds[1]); | read(pfds[0],buf,sizeof(buf)); | recv(sock,buf,sizeof(buf),0); // <-- this one | }else accept(sock,NULL,NULL); | exit(0); | } If you try it, make sure /tmp/foobar_testsock doesn't exist. The marked recv() returns -1 (EAGAIN) on 2.6.23.9. Below you find a patch that fixes that. Signed-off-by: Florian Zumbiehl <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/unix/af_unix.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index e835da8..060bba4 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1637,8 +1637,15 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, mutex_lock(&u->readlock); skb = skb_recv_datagram(sk, flags, noblock, &err); - if (!skb) + if (!skb) { + unix_state_lock(sk); + /* Signal EOF on disconnected non-blocking SEQPACKET socket. */ + if (sk->sk_type == SOCK_SEQPACKET && err == -EAGAIN && + (sk->sk_shutdown & RCV_SHUTDOWN)) + err = 0; + unix_state_unlock(sk); goto out_unlock; + } wake_up_interruptible_sync(&u->peer_wait); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[INET]: Fix inet_diag register vs rcv race
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=076931989fe96823a577259cc6bc205d7ec31754 Commit: 076931989fe96823a577259cc6bc205d7ec31754 Parent: 82de382ce8e1c7645984616728dc7aaa057821e4 Author: Pavel Emelyanov <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 00:08:14 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 00:08:14 2007 +1100 [INET]: Fix inet_diag register vs rcv race The following race is possible when one cpu unregisters the handler while other one is trying to receive a message and call this one: CPU1: CPU2: inet_diag_rcv() inet_diag_unregister() mutex_lock(&inet_diag_mutex); netlink_rcv_skb(skb, &inet_diag_rcv_msg); if (inet_diag_table[nlh->nlmsg_type] == NULL) /* false handler is still registered */ ... netlink_dump_start(idiagnl, skb, nlh, inet_diag_dump, NULL); cb = kzalloc(sizeof(*cb), GFP_KERNEL); /* sleep here freeing memory * or preempt * or sleep later on nlk->cb_mutex */ spin_lock(&inet_diag_register_lock); inet_diag_table[type] = NULL; ... spin_unlock(&inet_diag_register_lock); synchronize_rcu(); /* CPU1 is sleeping - RCU quiescent * state is passed */ return; /* inet_diag_dump is finally called: */ inet_diag_dump() handler = inet_diag_table[cb->nlh->nlmsg_type]; BUG_ON(handler == NULL); /* OOPS! While we slept the unregister has set * handler to NULL :( */ Grep showed, that the register/unregister functions are called from init/fini module callbacks for tcp_/dccp_diag, so it's OK to use the inet_diag_mutex to synchronize manipulations with the inet_diag_table and the access to it. Besides, as Herbert pointed out, asynchronous dumps should hold this mutex as well, and thus, we provide the mutex as cb_mutex one. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/inet_diag.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index b017073..6b3fffb 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -853,8 +853,6 @@ static void inet_diag_rcv(struct sk_buff *skb) mutex_unlock(&inet_diag_mutex); } -static DEFINE_SPINLOCK(inet_diag_register_lock); - int inet_diag_register(const struct inet_diag_handler *h) { const __u16 type = h->idiag_type; @@ -863,13 +861,13 @@ int inet_diag_register(const struct inet_diag_handler *h) if (type >= INET_DIAG_GETSOCK_MAX) goto out; - spin_lock(&inet_diag_register_lock); + mutex_lock(&inet_diag_mutex); err = -EEXIST; if (inet_diag_table[type] == NULL) { inet_diag_table[type] = h; err = 0; } - spin_unlock(&inet_diag_register_lock); + mutex_unlock(&inet_diag_mutex); out: return err; } @@ -882,11 +880,9 @@ void inet_diag_unregister(const struct inet_diag_handler *h) if (type >= INET_DIAG_GETSOCK_MAX) return; - spin_lock(&inet_diag_register_lock); + mutex_lock(&inet_diag_mutex); inet_diag_table[type] = NULL; - spin_unlock(&inet_diag_register_lock); - - synchronize_rcu(); + mutex_unlock(&inet_diag_mutex); } EXPORT_SYMBOL_GPL(inet_diag_unregister); @@ -901,7 +897,7 @@ static int __init inet_diag_init(void) goto out; idiagnl = netlink_kernel_create(&init_net, NETLINK_INET_DIAG, 0, - inet_diag_rcv, NULL, THIS_MODULE); + inet_diag_rcv, &inet_diag_mutex, THIS_MODULE); if (idiagnl == NULL) goto out_free_table; err = 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[BRIDGE]: Properly dereference the br_should_route_hook
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82de382ce8e1c7645984616728dc7aaa057821e4 Commit: 82de382ce8e1c7645984616728dc7aaa057821e4 Parent: 17efdd45755c0eb8d1418a1368ef7c7ebbe98c6e Author: Pavel Emelyanov <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 23:58:58 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 23:58:58 2007 +1100 [BRIDGE]: Properly dereference the br_should_route_hook This hook is protected with the RCU, so simple if (br_should_route_hook) br_should_route_hook(...) is not enough on some architectures. Use the rcu_dereference/rcu_assign_pointer in this case. Fixed Stephen's comment concerning using the typeof(). Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/bridge/br_input.c |7 --- net/bridge/netfilter/ebtable_broute.c |4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 3cedd4e..0ee79a7 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c @@ -122,6 +122,7 @@ static inline int is_link_local(const unsigned char *dest) struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) { const unsigned char *dest = eth_hdr(skb)->h_dest; + int (*rhook)(struct sk_buff *skb); if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) goto drop; @@ -147,9 +148,9 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) switch (p->state) { case BR_STATE_FORWARDING: - - if (br_should_route_hook) { - if (br_should_route_hook(skb)) + rhook = rcu_dereference(br_should_route_hook); + if (rhook != NULL) { + if (rhook(skb)) return skb; dest = eth_hdr(skb)->h_dest; } diff --git a/net/bridge/netfilter/ebtable_broute.c b/net/bridge/netfilter/ebtable_broute.c index e44519e..be6f186 100644 --- a/net/bridge/netfilter/ebtable_broute.c +++ b/net/bridge/netfilter/ebtable_broute.c @@ -70,13 +70,13 @@ static int __init ebtable_broute_init(void) if (ret < 0) return ret; /* see br_input.c */ - br_should_route_hook = ebt_broute; + rcu_assign_pointer(br_should_route_hook, ebt_broute); return ret; } static void __exit ebtable_broute_fini(void) { - br_should_route_hook = NULL; + rcu_assign_pointer(br_should_route_hook, NULL); synchronize_net(); ebt_unregister_table(&broute_table); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[TCP] illinois: Incorrect beta usage
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a357dde9df33f28611e6a3d4f88265e39bcc8880 Commit: a357dde9df33f28611e6a3d4f88265e39bcc8880 Parent: 5e5234ff17ef98932688116025b30958bd28a940 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 01:10:55 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 01:10:55 2007 +1100 [TCP] illinois: Incorrect beta usage Lachlan Andrew observed that my TCP-Illinois implementation uses the beta value incorrectly: The parameter beta in the paper specifies the amount to decrease *by*: that is, on loss, W <- W - beta*W but in tcp_illinois_ssthresh() uses beta as the amount to decrease *to*: W <- beta*W This bug makes the Linux TCP-Illinois get less-aggressive on uncongested network, hurting performance. Note: since the base beta value is .5, it has no impact on a congested network. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/tcp_illinois.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 64f1cba..5aa5f54 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c @@ -298,7 +298,7 @@ static u32 tcp_illinois_ssthresh(struct sock *sk) struct illinois *ca = inet_csk_ca(sk); /* Multiplicative decrease */ - return max((tp->snd_cwnd * ca->beta) >> BETA_SHIFT, 2U); + return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->beta) >> BETA_SHIFT), 2U); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IPSEC]: Fix uninitialised dst warning in __xfrm_lookup
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e5234ff17ef98932688116025b30958bd28a940 Commit: 5e5234ff17ef98932688116025b30958bd28a940 Parent: 076931989fe96823a577259cc6bc205d7ec31754 Author: Herbert Xu <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 00:50:31 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 00:50:31 2007 +1100 [IPSEC]: Fix uninitialised dst warning in __xfrm_lookup Andrew Morton reported that __xfrm_lookup generates this warning: net/xfrm/xfrm_policy.c: In function '__xfrm_lookup': net/xfrm/xfrm_policy.c:1449: warning: 'dst' may be used uninitialized in this function This is because if policy->action is of an unexpected value then dst will not be initialised. Of course, in practice this should never happen since the input layer xfrm_user/af_key will filter out all illegal values. But the compiler doesn't know that of course. So this patch fixes this by taking the conservative approach and treat all unknown actions the same as a blocking action. Thanks to Andrew for finding this and providing an initial fix. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/xfrm/xfrm_policy.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index b702bd8..9a4cf2e 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1344,6 +1344,7 @@ restart: xfrm_nr += pols[0]->xfrm_nr; switch (policy->action) { + default: case XFRM_POLICY_BLOCK: /* Prohibit the flow */ err = -EPERM; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SCTP: Fix the number of HB transmissions.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd10279bc7405c4f1e47a008686d3d9ad71d7f6d Commit: fd10279bc7405c4f1e47a008686d3d9ad71d7f6d Parent: a357dde9df33f28611e6a3d4f88265e39bcc8880 Author: Vlad Yasevich <[EMAIL PROTECTED]> AuthorDate: Thu Nov 15 12:13:32 2007 -0500 Committer: Vlad Yasevich <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 10:17:41 2007 -0500 SCTP: Fix the number of HB transmissions. Our treatment of Heartbeats is special in that the inital HB chunk counts against the error count for the association, where as for other chunks, only retransmissions or timeouts count against us. As a result, we had an off-by-1 situation with a number of Heartbeats we could send. Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]> --- net/sctp/sm_statefuns.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index b8bbb96..5fb8477 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -959,7 +959,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep, { struct sctp_transport *transport = (struct sctp_transport *) arg; - if (asoc->overall_error_count >= asoc->max_retrans) { + if (asoc->overall_error_count > asoc->max_retrans) { sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ETIMEDOUT)); /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SCTP: Fix SCTP-AUTH to correctly add HMACS paramter.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9baffaa689a50ef9480ecd9017ffd1480c807328 Commit: 9baffaa689a50ef9480ecd9017ffd1480c807328 Parent: fd10279bc7405c4f1e47a008686d3d9ad71d7f6d Author: Vlad Yasevich <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 08:44:34 2007 -0500 Committer: Vlad Yasevich <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 10:17:41 2007 -0500 SCTP: Fix SCTP-AUTH to correctly add HMACS paramter. There was a typo that cleared the HMACS parameters when no authenticated chunks were specified. We whould be clearing the chunks pointer instead of the hmacs. Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]> --- net/sctp/sm_make_chunk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 5a9783c..a139469 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -243,7 +243,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, if (auth_chunks->length) chunksize += ntohs(auth_chunks->length); else - auth_hmacs = NULL; + auth_chunks = NULL; extensions[num_ext] = SCTP_CID_AUTH; num_ext += 1; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SCTP: Fix the supported extensions paramter
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8ee4be37e8ac28e79ae673d441e83c1f51e7ecfd Commit: 8ee4be37e8ac28e79ae673d441e83c1f51e7ecfd Parent: 9baffaa689a50ef9480ecd9017ffd1480c807328 Author: Vlad Yasevich <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 08:50:35 2007 -0500 Committer: Vlad Yasevich <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 10:17:41 2007 -0500 SCTP: Fix the supported extensions paramter Supported extensions parameter was not coded right and ended up over-writing memory or causing skb overflows. First, remove the FWD_TSN support from as it shouldn't be there and also fix the paramter encoding. Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]> --- net/sctp/sm_make_chunk.c | 23 --- 1 files changed, 8 insertions(+), 15 deletions(-) diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index a139469..f487629 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -77,6 +77,8 @@ static int sctp_process_param(struct sctp_association *asoc, union sctp_params param, const union sctp_addr *peer_addr, gfp_t gfp); +static void *sctp_addto_param(struct sctp_chunk *chunk, int len, + const void *data); /* What was the inbound interface for this chunk? */ int sctp_chunk_iif(const struct sctp_chunk *chunk) @@ -207,11 +209,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, chunksize = sizeof(init) + addrs_len + SCTP_SAT_LEN(num_types); chunksize += sizeof(ecap_param); - if (sctp_prsctp_enable) { - chunksize += sizeof(prsctp_param); - extensions[num_ext] = SCTP_CID_FWD_TSN; - num_ext += 1; - } + /* ADDIP: Section 4.2.7: * An implementation supporting this extension [ADDIP] MUST list * the ASCONF,the ASCONF-ACK, and the AUTH chunks in its INIT and @@ -297,7 +295,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, htons(sizeof(sctp_supported_ext_param_t) + num_ext); sctp_addto_chunk(retval, sizeof(sctp_supported_ext_param_t), &ext_param); - sctp_addto_chunk(retval, num_ext, extensions); + sctp_addto_param(retval, num_ext, extensions); } if (sctp_prsctp_enable) @@ -371,20 +369,12 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, if (asoc->peer.ecn_capable) chunksize += sizeof(ecap_param); - /* Tell peer that we'll do PR-SCTP only if peer advertised. */ - if (asoc->peer.prsctp_capable) { - chunksize += sizeof(prsctp_param); - extensions[num_ext] = SCTP_CID_FWD_TSN; - num_ext += 1; - } - if (sctp_addip_enable) { extensions[num_ext] = SCTP_CID_ASCONF; extensions[num_ext+1] = SCTP_CID_ASCONF_ACK; num_ext += 2; } - chunksize += sizeof(ext_param) + num_ext; chunksize += sizeof(aiparam); if (asoc->peer.auth_capable) { @@ -407,6 +397,9 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, num_ext += 1; } + if (num_ext) + chunksize += sizeof(sctp_supported_ext_param_t) + num_ext; + /* Now allocate and fill out the chunk. */ retval = sctp_make_chunk(asoc, SCTP_CID_INIT_ACK, 0, chunksize); if (!retval) @@ -428,7 +421,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, htons(sizeof(sctp_supported_ext_param_t) + num_ext); sctp_addto_chunk(retval, sizeof(sctp_supported_ext_param_t), &ext_param); - sctp_addto_chunk(retval, num_ext, extensions); + sctp_addto_param(retval, num_ext, extensions); } if (asoc->peer.prsctp_capable) sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SCTP: Fix chunk acceptance when no authenticated chunks were listed.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=555d3d5d2be13675490a80df0d7961551822ef1f Commit: 555d3d5d2be13675490a80df0d7961551822ef1f Parent: 8ee4be37e8ac28e79ae673d441e83c1f51e7ecfd Author: Vlad Yasevich <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 08:56:16 2007 -0500 Committer: Vlad Yasevich <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 10:17:42 2007 -0500 SCTP: Fix chunk acceptance when no authenticated chunks were listed. In the case where no autheticated chunks were specified, we were still trying to verify that a given chunk needs authentication and doing so incorrectly. Add a check for parameter length to make sure we don't try to use an empty auth_chunks parameter to verify against. Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]> --- net/sctp/auth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 6d5fa6b..6d89e35 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -631,7 +631,7 @@ static int __sctp_auth_cid(sctp_cid_t chunk, struct sctp_chunks_param *param) int found = 0; int i; - if (!param) + if (!param || param->param_hdr.length == 0) return 0; len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
SCTP: Fix build issues with SCTP AUTH.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b7e0fe9f81e19c4f2a1369b324c3c062c1738be4 Commit: b7e0fe9f81e19c4f2a1369b324c3c062c1738be4 Parent: 555d3d5d2be13675490a80df0d7961551822ef1f Author: Vlad Yasevich <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 09:53:52 2007 -0500 Committer: Vlad Yasevich <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 10:17:42 2007 -0500 SCTP: Fix build issues with SCTP AUTH. SCTP-AUTH requires selection of CRYPTO, HMAC and SHA1 since SHA1 is a MUST requirement for AUTH. We also support SHA256, but that's optional, so fix the code to treat it as such. Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]> --- include/net/sctp/constants.h |9 ++--- net/sctp/Kconfig |6 +++--- net/sctp/auth.c |2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index f30b537..05f22a6 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -441,11 +441,14 @@ enum { SCTP_AUTH_HMAC_ID_RESERVED_0, SCTP_AUTH_HMAC_ID_SHA1, SCTP_AUTH_HMAC_ID_RESERVED_2, - SCTP_AUTH_HMAC_ID_SHA256 +#if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE) + SCTP_AUTH_HMAC_ID_SHA256, +#endif + __SCTP_AUTH_HMAC_MAX }; -#define SCTP_AUTH_HMAC_ID_MAX SCTP_AUTH_HMAC_ID_SHA256 -#define SCTP_AUTH_NUM_HMACS (SCTP_AUTH_HMAC_ID_SHA256 + 1) +#define SCTP_AUTH_HMAC_ID_MAX __SCTP_AUTH_HMAC_MAX - 1 +#define SCTP_AUTH_NUM_HMACS__SCTP_AUTH_HMAC_MAX #define SCTP_SHA1_SIG_SIZE 20 #define SCTP_SHA256_SIG_SIZE 32 diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig index 8210f54..5390bc7 100644 --- a/net/sctp/Kconfig +++ b/net/sctp/Kconfig @@ -6,9 +6,9 @@ menuconfig IP_SCTP tristate "The SCTP Protocol (EXPERIMENTAL)" depends on INET && EXPERIMENTAL depends on IPV6 || IPV6=n - select CRYPTO if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5 - select CRYPTO_HMAC if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5 - select CRYPTO_SHA1 if SCTP_HMAC_SHA1 + select CRYPTO + select CRYPTO_HMAC + select CRYPTO_SHA1 select CRYPTO_MD5 if SCTP_HMAC_MD5 ---help--- Stream Control Transmission Protocol diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 6d89e35..97e6ebd 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -54,11 +54,13 @@ static struct sctp_hmac sctp_hmac_list[SCTP_AUTH_NUM_HMACS] = { /* id 2 is reserved as well */ .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2, }, +#if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE) { .hmac_id = SCTP_AUTH_HMAC_ID_SHA256, .hmac_name="hmac(sha256)", .hmac_len = SCTP_SHA256_SIG_SIZE, } +#endif }; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
mac80211: free ifsta->extra_ie and clear IEEE80211_STA_PRIVACY_INVOKED
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a10605e599a7873417043fe2bb559abe719f8a1a Commit: a10605e599a7873417043fe2bb559abe719f8a1a Parent: d9f8bcbf67a0ee67c8cb0734f003dfe916bb5248 Author: Zhu Yi <[EMAIL PROTECTED]> AuthorDate: Thu Nov 22 11:10:22 2007 +0800 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 18:08:47 2007 -0500 mac80211: free ifsta->extra_ie and clear IEEE80211_STA_PRIVACY_INVOKED I'm not sure if this is best choice, someone might have better solutions. But this patch fixed the connection problem when switching from a WPA enabled AP (using wpa_supplicant) to an open AP (using iwconfig). The root cause is when we connect to a WPA enabled AP, wpa_supplicant sets the ifsta->extra_ie thru SIOCSIWGENIE. But if we stop wpa_supplicant and connect to an open AP with iwconfig, there is no way to clear the extra_ie so that mac80211 keeps connecting with that. Someone could argue wpa_supplicant should clear the extra_ie during its shutdown. But mac80211 should also handle the unexpected shutdown case (ie. killall -9 wpa_supplicant). On Wed, 2007-11-21 at 16:19 +0100, Johannes Berg wrote: > Yeah. Can you amend the patch to also clear the > IEEE80211_STA_PRIVACY_INVOKED flag? Signed-off-by: Zhu Yi <[EMAIL PROTECTED]> Acked-by: Johannes Berg <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/mac80211/ieee80211.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index e0ee65a..8f11c97 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -334,6 +334,11 @@ static int ieee80211_stop(struct net_device *dev) cancel_delayed_work(&local->scan_work); } flush_workqueue(local->hw.workqueue); + + sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; + kfree(sdata->u.sta.extra_ie); + sdata->u.sta.extra_ie = NULL; + sdata->u.sta.extra_ie_len = 0; /* fall through */ default: conf.if_id = dev->ifindex; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ieee80211: fix unaligned access in ieee80211_copy_snap
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01e1f045e65b683fe7203b1e16a915bbb94c15fe Commit: 01e1f045e65b683fe7203b1e16a915bbb94c15fe Parent: a10605e599a7873417043fe2bb559abe719f8a1a Author: Daniel Drake <[EMAIL PROTECTED]> AuthorDate: Thu Nov 22 22:03:42 2007 + Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 18:08:47 2007 -0500 ieee80211: fix unaligned access in ieee80211_copy_snap There is no guarantee that data+SNAP_SIZE will reside on an even numbered address, so doing a 16 bit read will cause an unaligned access in some situations. Based on a patch from Jun Sun. Signed-off-by: Daniel Drake <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/ieee80211/ieee80211_tx.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index a4c3c51..6d06f13 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c @@ -144,7 +144,8 @@ static int ieee80211_copy_snap(u8 * data, u16 h_proto) snap->oui[1] = oui[1]; snap->oui[2] = oui[2]; - *(u16 *) (data + SNAP_SIZE) = htons(h_proto); + h_proto = htons(h_proto); + memcpy(data + SNAP_SIZE, &h_proto, sizeof(u16)); return SNAP_SIZE + sizeof(u16); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
mac80211: Fix behavior of ieee80211_open and ieee80211_close
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b393f1dc76acbe65a97a4e51f8144f4a65fa1c9 Commit: 8b393f1dc76acbe65a97a4e51f8144f4a65fa1c9 Parent: 01e1f045e65b683fe7203b1e16a915bbb94c15fe Author: Michael Wu <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 01:57:08 2007 -0500 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 18:08:47 2007 -0500 mac80211: Fix behavior of ieee80211_open and ieee80211_close This patch fixes: - Incorrect calls to ieee80211_hw_config when the radiotap flag is set. - Failure to actually unset the radiotap flag when all monitors are down. - Failure to call ieee80211_hw_config after successful interface start. Signed-off-by: Michael Wu <[EMAIL PROTECTED]> Acked-by: Johannes Berg <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/mac80211/ieee80211.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 8f11c97..0dc114c 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -216,6 +216,7 @@ static int ieee80211_open(struct net_device *dev) res = local->ops->start(local_to_hw(local)); if (res) return res; + ieee80211_hw_config(local); } switch (sdata->type) { @@ -232,7 +233,6 @@ static int ieee80211_open(struct net_device *dev) netif_tx_unlock_bh(local->mdev); local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; - ieee80211_hw_config(local); } break; case IEEE80211_IF_TYPE_STA: @@ -311,8 +311,7 @@ static int ieee80211_stop(struct net_device *dev) ieee80211_configure_filter(local); netif_tx_unlock_bh(local->mdev); - local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; - ieee80211_hw_config(local); + local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP; } break; case IEEE80211_IF_TYPE_STA: - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
mac80211: drop unencrypted frames if encryption is expected
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8312512e81ab16d845b49d1ec695fad1c72f19f6 Commit: 8312512e81ab16d845b49d1ec695fad1c72f19f6 Parent: 8b393f1dc76acbe65a97a4e51f8144f4a65fa1c9 Author: Johannes Berg <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 11:07:57 2007 +0100 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 18:08:48 2007 -0500 mac80211: drop unencrypted frames if encryption is expected This patch fixes a regression I (most likely) introduced, namely that unencrypted frames are right now accepted even if we have a key for that specific sender. That has very bad security implications. Signed-off-by: Johannes Berg <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/mac80211/rx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 428a9fc..00f908d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -997,7 +997,7 @@ ieee80211_rx_h_drop_unencrypted(struct ieee80211_txrx_data *rx) if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) && (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC && -rx->sdata->drop_unencrypted && +(rx->key || rx->sdata->drop_unencrypted) && (rx->sdata->eapol == 0 || !ieee80211_is_eapol(rx->skb { if (net_ratelimit()) printk(KERN_DEBUG "%s: RX non-WEP frame, but expected " - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
rfkill: fix double-mutex-locking
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7f4c534178722ac9ffb4feae3a4d54e3fbe3f22c Commit: 7f4c534178722ac9ffb4feae3a4d54e3fbe3f22c Parent: 8312512e81ab16d845b49d1ec695fad1c72f19f6 Author: Michael Buesch <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 17:49:34 2007 +0100 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 18:08:48 2007 -0500 rfkill: fix double-mutex-locking rfkill_toggle_radio is called from functions where rfkill->mutex is already aquired. Remove the lock from rfkill_toggle_radio() and add it to the only calling function that calls it without the lock held. Signed-off-by: Michael Buesch <[EMAIL PROTECTED]> Acked-by: Ivo van Doorn <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/rfkill/rfkill.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 73d60a3..4469a7b 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -60,11 +60,7 @@ static void rfkill_led_trigger(struct rfkill *rfkill, static int rfkill_toggle_radio(struct rfkill *rfkill, enum rfkill_state state) { - int retval; - - retval = mutex_lock_interruptible(&rfkill->mutex); - if (retval) - return retval; + int retval = 0; if (state != rfkill->state) { retval = rfkill->toggle_radio(rfkill->data, state); @@ -74,7 +70,6 @@ static int rfkill_toggle_radio(struct rfkill *rfkill, } } - mutex_unlock(&rfkill->mutex); return retval; } @@ -158,12 +153,13 @@ static ssize_t rfkill_state_store(struct device *dev, if (!capable(CAP_NET_ADMIN)) return -EPERM; + if (mutex_lock_interruptible(&rfkill->mutex)) + return -ERESTARTSYS; error = rfkill_toggle_radio(rfkill, state ? RFKILL_STATE_ON : RFKILL_STATE_OFF); - if (error) - return error; + mutex_unlock(&rfkill->mutex); - return count; + return error ? error : count; } static ssize_t rfkill_claim_show(struct device *dev, - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
mac80211: rate limit wep decrypt failed messages
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=53cb4791c156908ae634de31949f7f25f8de002b Commit: 53cb4791c156908ae634de31949f7f25f8de002b Parent: 7f4c534178722ac9ffb4feae3a4d54e3fbe3f22c Author: Adel Gadllah <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 17:09:41 2007 +0100 Committer: John W. Linville <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 18:08:48 2007 -0500 mac80211: rate limit wep decrypt failed messages The attached patch rate limits "WEP decrypt failed (ICV)" to avoid flooding the logfiles. Signed-off-by: Adel Gadllah <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/mac80211/wep.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 9bf0e1c..b5f3413 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c @@ -265,7 +265,8 @@ int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb, if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen, skb->data + hdrlen + WEP_IV_LEN, len)) { - printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); + if (net_ratelimit()) + printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); ret = -1; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[RXRPC]: Add missing select on CRYPTO
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d5a784b3719ae364f49ecff12a0248f6e4252720 Commit: d5a784b3719ae364f49ecff12a0248f6e4252720 Parent: 75e7766680b4b196073bdc941b8a6570b9f777af Author: David Howells <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 23:06:40 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 23:30:40 2007 +1100 [RXRPC]: Add missing select on CRYPTO AF_RXRPC uses the crypto services, so should depend on or select CRYPTO. Signed-off-by: David Howells <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/rxrpc/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig index e662f1d..0d3103c 100644 --- a/net/rxrpc/Kconfig +++ b/net/rxrpc/Kconfig @@ -5,6 +5,7 @@ config AF_RXRPC tristate "RxRPC session sockets" depends on INET && EXPERIMENTAL + select CRYPTO select KEYS help Say Y or M here to include support for RxRPC session sockets (just - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[IPV6]: Restore IPv6 when MTU is big enough
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d31c7b8fa303eb81311f27b80595b8d2cbeef950 Commit: d31c7b8fa303eb81311f27b80595b8d2cbeef950 Parent: d5a784b3719ae364f49ecff12a0248f6e4252720 Author: Evgeniy Polyakov <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 23:36:08 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 23:36:08 2007 +1100 [IPV6]: Restore IPv6 when MTU is big enough Avaid provided test application, so bug got fixed. IPv6 addrconf removes ipv6 inner device from netdev each time cmu changes and new value is less than IPV6_MIN_MTU (1280 bytes). When mtu is changed and new value is greater than IPV6_MIN_MTU, it does not add ipv6 addresses and inner device bac. This patch fixes that. Tested with Avaid's application, which works ok now. Signed-off-by: Evgeniy Polyakov <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv6/addrconf.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 567664e..e8c3475 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2293,6 +2293,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, break; } + if (!idev && dev->mtu >= IPV6_MIN_MTU) + idev = ipv6_add_dev(dev); + if (idev) idev->if_flags |= IF_READY; } else { @@ -2357,12 +2360,18 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, break; case NETDEV_CHANGEMTU: - if ( idev && dev->mtu >= IPV6_MIN_MTU) { + if (idev && dev->mtu >= IPV6_MIN_MTU) { rt6_mtu_change(dev, dev->mtu); idev->cnf.mtu6 = dev->mtu; break; } + if (!idev && dev->mtu >= IPV6_MIN_MTU) { + idev = ipv6_add_dev(dev); + if (idev) + break; + } + /* MTU falled under IPV6_MIN_MTU. Stop IPv6 on this interface. */ case NETDEV_DOWN: - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[DECNET]: dn_nl_deladdr() almost always returns no error
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ccd86241b277249d5ac08e91eddfade47184520 Commit: 3ccd86241b277249d5ac08e91eddfade47184520 Parent: d31c7b8fa303eb81311f27b80595b8d2cbeef950 Author: Pavel Emelyanov <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 23:43:31 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 23:43:31 2007 +1100 [DECNET]: dn_nl_deladdr() almost always returns no error As far as I see from the err variable initialization the dn_nl_deladdr() routine was designed to report errors like "EADDRNOTAVAIL" and probaby "ENODEV". But the code sets this err to 0 after the first nlmsg_parse and goes on, returning this 0 in any case. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Acked-by: Steven Whitehouse <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/decnet/dn_dev.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 66e266f..3bc82dc 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -651,16 +651,18 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) struct dn_dev *dn_db; struct ifaddrmsg *ifm; struct dn_ifaddr *ifa, **ifap; - int err = -EADDRNOTAVAIL; + int err; err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, dn_ifa_policy); if (err < 0) goto errout; + err = -ENODEV; ifm = nlmsg_data(nlh); if ((dn_db = dn_dev_by_index(ifm->ifa_index)) == NULL) goto errout; + err = -EADDRNOTAVAIL; for (ifap = &dn_db->ifa_list; (ifa = *ifap); ifap = &ifa->ifa_next) { if (tb[IFA_LOCAL] && nla_memcmp(tb[IFA_LOCAL], &ifa->ifa_local, 2)) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9dc0564e862b1b9a4677dec2c736b12169e03e99 Commit: 9dc0564e862b1b9a4677dec2c736b12169e03e99 Parent: 3ccd86241b277249d5ac08e91eddfade47184520 Author: Patrick McHardy <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 23:58:03 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Fri Nov 30 23:58:03 2007 +1100 [NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON ipv6_skip_exthdr() returns -1 for invalid packets. don't WARN_ON that. Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/netfilter/xt_TCPMSS.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index 07435a6..8e76d1f 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c @@ -174,10 +174,8 @@ xt_tcpmss_target6(struct sk_buff *skb, nexthdr = ipv6h->nexthdr; tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr); - if (tcphoff < 0) { - WARN_ON(1); + if (tcphoff < 0) return NF_DROP; - } ret = tcpmss_mangle_packet(skb, targinfo, tcphoff, sizeof(*ipv6h) + sizeof(struct tcphdr)); if (ret < 0) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[NETFILTER]: fix forgotten module release in xt_CONNMARK and xt_CONNSECMARK
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=67b4af297033f5f65999885542f95ba7b562848a Commit: 67b4af297033f5f65999885542f95ba7b562848a Parent: 9dc0564e862b1b9a4677dec2c736b12169e03e99 Author: Jan Engelhardt <[EMAIL PROTECTED]> AuthorDate: Sat Dec 1 00:01:50 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 00:01:50 2007 +1100 [NETFILTER]: fix forgotten module release in xt_CONNMARK and xt_CONNSECMARK Fix forgotten module release in xt_CONNMARK and xt_CONNSECMARK When xt_CONNMARK is used outside the mangle table and the user specified "--restore-mark", the connmark_tg_check() function will (correctly) error out, but (incorrectly) forgets to release the L3 conntrack module. Same for xt_CONNSECMARK. Fix is to move the call to acquire the L3 module after the basic constraint checks. Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/netfilter/xt_CONNMARK.c| 10 +- net/netfilter/xt_CONNSECMARK.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c index 856793e..0621ca7 100644 --- a/net/netfilter/xt_CONNMARK.c +++ b/net/netfilter/xt_CONNMARK.c @@ -86,11 +86,6 @@ checkentry(const char *tablename, { const struct xt_connmark_target_info *matchinfo = targinfo; - if (nf_ct_l3proto_try_module_get(target->family) < 0) { - printk(KERN_WARNING "can't load conntrack support for " - "proto=%d\n", target->family); - return false; - } if (matchinfo->mode == XT_CONNMARK_RESTORE) { if (strcmp(tablename, "mangle") != 0) { printk(KERN_WARNING "CONNMARK: restore can only be " @@ -103,6 +98,11 @@ checkentry(const char *tablename, printk(KERN_WARNING "CONNMARK: Only supports 32bit mark\n"); return false; } + if (nf_ct_l3proto_try_module_get(target->family) < 0) { + printk(KERN_WARNING "can't load conntrack support for " + "proto=%d\n", target->family); + return false; + } return true; } diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c index 021b5c8..d8feba9 100644 --- a/net/netfilter/xt_CONNSECMARK.c +++ b/net/netfilter/xt_CONNSECMARK.c @@ -90,11 +90,6 @@ static bool checkentry(const char *tablename, const void *entry, { const struct xt_connsecmark_target_info *info = targinfo; - if (nf_ct_l3proto_try_module_get(target->family) < 0) { - printk(KERN_WARNING "can't load conntrack support for " - "proto=%d\n", target->family); - return false; - } switch (info->mode) { case CONNSECMARK_SAVE: case CONNSECMARK_RESTORE: @@ -105,6 +100,11 @@ static bool checkentry(const char *tablename, const void *entry, return false; } + if (nf_ct_l3proto_try_module_get(target->family) < 0) { + printk(KERN_WARNING "can't load conntrack support for " + "proto=%d\n", target->family); + return false; + } return true; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[TEXTSEARCH]: Do not allow zero length patterns in the textsearch infrastructure
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e03ba84adb62fbc6049325a5bc00ef6932fa5e39 Commit: e03ba84adb62fbc6049325a5bc00ef6932fa5e39 Parent: 67b4af297033f5f65999885542f95ba7b562848a Author: Pablo Neira Ayuso <[EMAIL PROTECTED]> AuthorDate: Sat Dec 1 00:03:52 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 00:03:52 2007 +1100 [TEXTSEARCH]: Do not allow zero length patterns in the textsearch infrastructure If a zero length pattern is passed then return EINVAL. Avoids infinite loops (bm) or invalid memory accesses (kmp). Signed-off-by: Pablo Neira Ayuso <[EMAIL PROTECTED]> Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- lib/textsearch.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/textsearch.c b/lib/textsearch.c index 88c98a2..be8bda3 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c @@ -7,7 +7,7 @@ * 2 of the License, or (at your option) any later version. * * Authors:Thomas Graf <[EMAIL PROTECTED]> - * Pablo Neira Ayuso <[EMAIL PROTECTED]> + * Pablo Neira Ayuso <[EMAIL PROTECTED]> * * == * @@ -250,7 +250,8 @@ unsigned int textsearch_find_continuous(struct ts_config *conf, * the various search algorithms. * * Returns a new textsearch configuration according to the specified - * parameters or a ERR_PTR(). + * parameters or a ERR_PTR(). If a zero length pattern is passed, this + * function returns EINVAL. */ struct ts_config *textsearch_prepare(const char *algo, const void *pattern, unsigned int len, gfp_t gfp_mask, int flags) @@ -259,6 +260,9 @@ struct ts_config *textsearch_prepare(const char *algo, const void *pattern, struct ts_config *conf; struct ts_ops *ops; + if (len == 0) + return ERR_PTR(-EINVAL); + ops = lookup_ts_algo(algo); #ifdef CONFIG_KMOD /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[NETNS]: Fix /proc/net breakage
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2b1e300a9dfc3196ccddf6f1d74b91b7af55e416 Commit: 2b1e300a9dfc3196ccddf6f1d74b91b7af55e416 Parent: e03ba84adb62fbc6049325a5bc00ef6932fa5e39 Author: Eric W. Biederman <[EMAIL PROTECTED]> AuthorDate: Sun Dec 2 00:33:17 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Sun Dec 2 00:33:17 2007 +1100 [NETNS]: Fix /proc/net breakage Well I clearly goofed when I added the initial network namespace support for /proc/net. Currently things work but there are odd details visible to user space, even when we have a single network namespace. Since we do not cache proc_dir_entry dentries at the moment we can just modify ->lookup to return a different directory inode depending on the network namespace of the process looking at /proc/net, replacing the current technique of using a magic and fragile follow_link method. To accomplish that this patch: - introduces a shadow_proc method to allow different dentries to be returned from proc_lookup. - Removes the old /proc/net follow_link magic - Fixes a weakness in our not caching of proc generic dentries. As shadow_proc uses a task struct to decided which dentry to return we can go back later and fix the proc generic caching without modifying any code that uses the shadow_proc method. Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]> Cc: Pavel Machek <[EMAIL PROTECTED]> Cc: Pavel Emelyanov <[EMAIL PROTECTED]> Cc: "David S. Miller" <[EMAIL PROTECTED]> Cc: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- fs/proc/generic.c | 12 ++- fs/proc/proc_net.c | 86 +++ include/linux/proc_fs.h |3 ++ 3 files changed, 19 insertions(+), 82 deletions(-) diff --git a/fs/proc/generic.c b/fs/proc/generic.c index a9806bc..c2b7523 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -374,9 +374,16 @@ static int proc_delete_dentry(struct dentry * dentry) return 1; } +static int proc_revalidate_dentry(struct dentry *dentry, struct nameidata *nd) +{ + d_drop(dentry); + return 0; +} + static struct dentry_operations proc_dentry_operations = { .d_delete = proc_delete_dentry, + .d_revalidate = proc_revalidate_dentry, }; /* @@ -397,8 +404,11 @@ struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry, struct nam if (de->namelen != dentry->d_name.len) continue; if (!memcmp(dentry->d_name.name, de->name, de->namelen)) { - unsigned int ino = de->low_ino; + unsigned int ino; + if (de->shadow_proc) + de = de->shadow_proc(current, de); + ino = de->low_ino; de_get(de); spin_unlock(&proc_subdir_lock); error = -EINVAL; diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 131f9c6..0afe21e 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c @@ -50,89 +50,14 @@ struct net *get_proc_net(const struct inode *inode) } EXPORT_SYMBOL_GPL(get_proc_net); -static struct proc_dir_entry *proc_net_shadow; +static struct proc_dir_entry *shadow_pde; -static struct dentry *proc_net_shadow_dentry(struct dentry *parent, +static struct proc_dir_entry *proc_net_shadow(struct task_struct *task, struct proc_dir_entry *de) { - struct dentry *shadow = NULL; - struct inode *inode; - if (!de) - goto out; - de_get(de); - inode = proc_get_inode(parent->d_inode->i_sb, de->low_ino, de); - if (!inode) - goto out_de_put; - shadow = d_alloc_name(parent, de->name); - if (!shadow) - goto out_iput; - shadow->d_op = parent->d_op; /* proc_dentry_operations */ - d_instantiate(shadow, inode); -out: - return shadow; -out_iput: - iput(inode); -out_de_put: - de_put(de); - goto out; -} - -static void *proc_net_follow_link(struct dentry *parent, struct nameidata *nd) -{ - struct net *net = current->nsproxy->net_ns; - struct dentry *shadow; - shadow = proc_net_shadow_dentry(parent, net->proc_net); - if (!shadow) - return ERR_PTR(-ENOENT); - - dput(nd->dentry); - /* My dentry count is 1 and that should be enough as the -* shadow dentry is thrown away immediately. -*/ - nd->dentry = shadow; - return NULL; + return task->nsproxy->net_ns->proc_net; } -static
[INET]: Fix inet_diag dead-lock regression
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d523a328fb0271e1a763e985a21f2488fd816e7e Commit: d523a328fb0271e1a763e985a21f2488fd816e7e Parent: 2b1e300a9dfc3196ccddf6f1d74b91b7af55e416 Author: Herbert Xu <[EMAIL PROTECTED]> AuthorDate: Mon Dec 3 15:51:25 2007 +1100 Committer: Herbert Xu <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 15:51:25 2007 +1100 [INET]: Fix inet_diag dead-lock regression The inet_diag register fix broke inet_diag module loading because the loaded module had to take the same mutex that's already held by the loader in order to register the new handler. This patch fixes it by introducing a separate mutex to protect the handling of handlers. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/inet_diag.c | 67 ++--- 1 files changed, 46 insertions(+), 21 deletions(-) diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 6b3fffb..e468e7a 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -51,6 +51,29 @@ static struct sock *idiagnl; #define INET_DIAG_PUT(skb, attrtype, attrlen) \ RTA_DATA(__RTA_PUT(skb, attrtype, attrlen)) +static DEFINE_MUTEX(inet_diag_table_mutex); + +static const struct inet_diag_handler *inet_diag_lock_handler(int type) +{ +#ifdef CONFIG_KMOD + if (!inet_diag_table[type]) + request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK, + NETLINK_INET_DIAG, type); +#endif + + mutex_lock(&inet_diag_table_mutex); + if (!inet_diag_table[type]) + return ERR_PTR(-ENOENT); + + return inet_diag_table[type]; +} + +static inline void inet_diag_unlock_handler( + const struct inet_diag_handler *handler) +{ + mutex_unlock(&inet_diag_table_mutex); +} + static int inet_csk_diag_fill(struct sock *sk, struct sk_buff *skb, int ext, u32 pid, u32 seq, u16 nlmsg_flags, @@ -235,9 +258,12 @@ static int inet_diag_get_exact(struct sk_buff *in_skb, struct inet_hashinfo *hashinfo; const struct inet_diag_handler *handler; - handler = inet_diag_table[nlh->nlmsg_type]; - BUG_ON(handler == NULL); + handler = inet_diag_lock_handler(nlh->nlmsg_type); + if (!handler) + return -ENOENT; + hashinfo = handler->idiag_hashinfo; + err = -EINVAL; if (req->idiag_family == AF_INET) { sk = inet_lookup(hashinfo, req->id.idiag_dst[0], @@ -255,11 +281,12 @@ static int inet_diag_get_exact(struct sk_buff *in_skb, } #endif else { - return -EINVAL; + goto unlock; } + err = -ENOENT; if (sk == NULL) - return -ENOENT; + goto unlock; err = -ESTALE; if ((req->id.idiag_cookie[0] != INET_DIAG_NOCOOKIE || @@ -296,6 +323,8 @@ out: else sock_put(sk); } +unlock: + inet_diag_unlock_handler(handler); return err; } @@ -678,8 +707,10 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) const struct inet_diag_handler *handler; struct inet_hashinfo *hashinfo; - handler = inet_diag_table[cb->nlh->nlmsg_type]; - BUG_ON(handler == NULL); + handler = inet_diag_lock_handler(cb->nlh->nlmsg_type); + if (!handler) + goto no_handler; + hashinfo = handler->idiag_hashinfo; s_i = cb->args[1]; @@ -743,7 +774,7 @@ skip_listen_ht: } if (!(r->idiag_states & ~(TCPF_LISTEN | TCPF_SYN_RECV))) - return skb->len; + goto unlock; for (i = s_i; i < hashinfo->ehash_size; i++) { struct inet_ehash_bucket *head = &hashinfo->ehash[i]; @@ -805,6 +836,9 @@ next_dying: done: cb->args[1] = i; cb->args[2] = num; +unlock: + inet_diag_unlock_handler(handler); +no_handler: return skb->len; } @@ -816,15 +850,6 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) nlmsg_len(nlh) < hdrlen) return -EINVAL; -#ifdef CONFIG_KMOD - if (inet_diag_table[nlh->nlmsg_type] == NULL) - request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK, - NETLINK_INET_DIAG, nlh->nlmsg_type); -#endif - - if (inet_diag_table[nlh->nlmsg_type] == NULL) - return -ENOENT; - if (nlh->nlmsg_flags & NLM_F_DUMP) { if (nlmsg_attrlen(nlh, hdrlen)) { struct nlattr *attr; @@ -861,13 +886,13 @@ int inet_diag_register(const struct inet_diag_handler *h) if (type >= INET_DIAG_GETSOCK_MAX) goto out; - mutex_lock(&inet_diag_mutex); + mutex_lock(&inet_diag_table_mutex); err = -EEXIST; if (inet_diag_
[SCSI] aacraid: don't assign cpu_to_le32(constant) to u8
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b2d871245357015cac621d7612b6ecf59f424df Commit: 3b2d871245357015cac621d7612b6ecf59f424df Parent: dbeeb816e805091e7cfc03baf36dc40b4adb2bbd Author: Stephen Rothwell <[EMAIL PROTECTED]> AuthorDate: Thu Nov 1 17:32:21 2007 +1100 Committer: James <[EMAIL PROTECTED]> CommitDate: Wed Nov 7 08:12:02 2007 -0800 [SCSI] aacraid: don't assign cpu_to_le32(constant) to u8 Noticed on PowerPC allmod config build: drivers/scsi/aacraid/commsup.c:1342: warning: large integer implicitly truncated to unsigned type drivers/scsi/aacraid/commsup.c:1343: warning: large integer implicitly truncated to unsigned type drivers/scsi/aacraid/commsup.c:1344: warning: large integer implicitly truncated to unsigned type Also fix some whitespace on the changed lines. Signed-off-by: Stephen Rothwell <[EMAIL PROTECTED]> Acked-by: Mark Salyzyn <[EMAIL PROTECTED]> Signed-off-by: James <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/aacraid/commsup.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 240a0bb..3c2dbc0 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1339,9 +1339,9 @@ int aac_check_health(struct aac_dev * aac) aif = (struct aac_aifcmd *)hw_fib->data; aif->command = cpu_to_le32(AifCmdEventNotify); aif->seqnum = cpu_to_le32(0x); - aif->data[0] = cpu_to_le32(AifEnExpEvent); - aif->data[1] = cpu_to_le32(AifExeFirmwarePanic); - aif->data[2] = cpu_to_le32(AifHighPriority); + aif->data[0] = AifEnExpEvent; + aif->data[1] = AifExeFirmwarePanic; + aif->data[2] = AifHighPriority; aif->data[3] = cpu_to_le32(BlinkLED); /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI] aacraid: fix potential panic in thread stop
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e85fbc595aa527e0b3c9a738c4dc1d7717afb30c Commit: e85fbc595aa527e0b3c9a738c4dc1d7717afb30c Parent: 3b2d871245357015cac621d7612b6ecf59f424df Author: Salyzyn, Mark <[EMAIL PROTECTED]> AuthorDate: Wed Oct 31 16:40:37 2007 -0400 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Wed Nov 7 08:15:49 2007 -0800 [SCSI] aacraid: fix potential panic in thread stop Got a panic in the threading code on an older kernel when the Adapter failed to load properly and driver shut down apparently before any threading had started, can not dupe. Expect that this may be relevant in the latest kernel, but not sure. This patch does no harm, and should alleviate the possibility of this panic. Signed-off-by: Mark Salyzyn <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/aacraid/linit.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 038980b..53061bc 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -950,7 +950,8 @@ static struct scsi_host_template aac_driver_template = { static void __aac_shutdown(struct aac_dev * aac) { - kthread_stop(aac->thread); + if (aac->aif_thread) + kthread_stop(aac->thread); aac_send_shutdown(aac); aac_adapter_disable_int(aac); free_irq(aac->pdev->irq, aac); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI] aacraid: fix up le32 issues in BlinkLED
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e6096963d2125294f736df4fc37f4226d0b4d178 Commit: e6096963d2125294f736df4fc37f4226d0b4d178 Parent: e85fbc595aa527e0b3c9a738c4dc1d7717afb30c Author: Salyzyn, Mark <[EMAIL PROTECTED]> AuthorDate: Wed Nov 7 10:58:12 2007 -0500 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Wed Nov 7 08:17:55 2007 -0800 [SCSI] aacraid: fix up le32 issues in BlinkLED Signed-off-by: Mark Salyzyn <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/aacraid/commsup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 3c2dbc0..abce48c 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1342,7 +1342,7 @@ int aac_check_health(struct aac_dev * aac) aif->data[0] = AifEnExpEvent; aif->data[1] = AifExeFirmwarePanic; aif->data[2] = AifHighPriority; - aif->data[3] = cpu_to_le32(BlinkLED); + aif->data[3] = BlinkLED; /* * Put the FIB onto the - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI] aacraid: fix security weakness
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f78e89b5f7041895c4820be5c000792243b634f Commit: 5f78e89b5f7041895c4820be5c000792243b634f Parent: e6096963d2125294f736df4fc37f4226d0b4d178 Author: Alan Cox <[EMAIL PROTECTED]> AuthorDate: Wed Nov 7 23:58:10 2007 + Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Sun Nov 11 17:35:48 2007 -0600 [SCSI] aacraid: fix security weakness Actually there are several but one is trivially fixed 1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list but needs to 2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB 3. It is possible to construct an attack via the SRB ioctls where the user obtains assorted elevated privileges. Various approaches are possible, the trivial ones being things like writing to the raw media via scsi commands and the swap image of other executing programs with higher privileges. So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating ones. This is a bandaid fix for #3 but probably the ioctls should grow their own capable checks. The other two bugs need someone competent in that driver to fix them. Signed-off-by: Alan Cox <[EMAIL PROTECTED]> Acked-by: Mark Salyzyn <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/aacraid/linit.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 53061bc..9dd331b 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -636,7 +636,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file) static int aac_cfg_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - if (!capable(CAP_SYS_ADMIN)) + if (!capable(CAP_SYS_RAWIO)) return -EPERM; return aac_do_ioctl(file->private_data, cmd, (void __user *)arg); } @@ -691,7 +691,7 @@ static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg) { - if (!capable(CAP_SYS_ADMIN)) + if (!capable(CAP_SYS_RAWIO)) return -EPERM; return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, arg); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI] iscsi_tcp: fix potential lockup with write commands
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=505f76b3061f6e74a50f378e45ac931abc1fe784 Commit: 505f76b3061f6e74a50f378e45ac931abc1fe784 Parent: 5f78e89b5f7041895c4820be5c000792243b634f Author: Tony Battersby <[EMAIL PROTECTED]> AuthorDate: Wed Nov 14 14:38:42 2007 -0600 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Wed Nov 14 14:51:58 2007 -0600 [SCSI] iscsi_tcp: fix potential lockup with write commands There is a race condition in iscsi_tcp.c that may cause it to forget that it received a R2T from the target. This race may cause a data-out command (such as a write) to lock up. The race occurs here: static int iscsi_send_unsol_pdu(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; int rc; if (tcp_ctask->xmstate & XMSTATE_UNS_HDR) { BUG_ON(!ctask->unsol_count); tcp_ctask->xmstate &= ~XMSTATE_UNS_HDR; < RACE ... static int iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { ... tcp_ctask->xmstate |= XMSTATE_SOL_HDR_INIT; < RACE ... While iscsi_xmitworker() (called from scsi_queue_work()) is preparing to send unsolicited data, iscsi_tcp_data_recv() (called from tcp_read_sock()) interrupts it upon receipt of a R2T from the target. Both contexts do read-modify-write of tcp_ctask->xmstate. Usually, gcc on x86 will make &= and |= atomic on UP (not guaranteed of course), but in this case iscsi_send_unsol_pdu() reads the value of xmstate before clearing the bit, which causes gcc to read xmstate into a CPU register, test it, clear the bit, and then store it back to memory. If the recv interrupt happens during this sequence, then the XMSTATE_SOL_HDR_INIT bit set by the recv interrupt will be lost, and the R2T will be forgotten. The patch below (against 2.6.24-rc1) converts accesses of xmstate to use set_bit, clear_bit, and test_bit instead of |= and &=. I have tested this patch and verified that it fixes the problem. Another possible approach would be to hold a lock during most of the rx/tx setup and post-processing, and drop the lock only for the actual rx/tx. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> Signed-off-by: Mike Christie <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/iscsi_tcp.c | 139 +++--- drivers/scsi/iscsi_tcp.h | 34 ++-- 2 files changed, 86 insertions(+), 87 deletions(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 4bcf916..57ce225 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -197,7 +197,7 @@ iscsi_tcp_cleanup_ctask(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) if (unlikely(!sc)) return; - tcp_ctask->xmstate = XMSTATE_IDLE; + tcp_ctask->xmstate = XMSTATE_VALUE_IDLE; tcp_ctask->r2t = NULL; } @@ -409,7 +409,7 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) tcp_ctask->exp_datasn = r2tsn + 1; __kfifo_put(tcp_ctask->r2tqueue, (void*)&r2t, sizeof(void*)); - tcp_ctask->xmstate |= XMSTATE_SOL_HDR_INIT; + set_bit(XMSTATE_BIT_SOL_HDR_INIT, &tcp_ctask->xmstate); list_move_tail(&ctask->running, &conn->xmitqueue); scsi_queue_work(session->host, &conn->xmitwork); @@ -1254,7 +1254,7 @@ static void iscsi_set_padding(struct iscsi_tcp_cmd_task *tcp_ctask, tcp_ctask->pad_count = ISCSI_PAD_LEN - tcp_ctask->pad_count; debug_scsi("write padding %d bytes\n", tcp_ctask->pad_count); - tcp_ctask->xmstate |= XMSTATE_W_PAD; + set_bit(XMSTATE_BIT_W_PAD, &tcp_ctask->xmstate); } /** @@ -1269,7 +1269,7 @@ iscsi_tcp_cmd_init(struct iscsi_cmd_task *ctask) struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; BUG_ON(__kfifo_len(tcp_ctask->r2tqueue)); - tcp_ctask->xmstate = XMSTATE_CMD_HDR_INIT; + tcp_ctask->xmstate = 1 << XMSTATE_BIT_CMD_HDR_INIT; } /** @@ -1283,10 +1283,10 @@ iscsi_tcp_cmd_init(struct iscsi_cmd_task *ctask) * xmit. * * Management xmit state machine consists of these states: - * XMSTATE_IMM_HDR_INIT- calculate digest of PDU Header - * XMSTATE_IMM_HDR - PDU Header xmit in progress - * XMSTATE_IMM_DATA- PDU Data xmit in progress - * XMSTATE_IDLE- management PDU is done + * XMSTATE_BIT_IMM_HDR_INIT - calculate digest of PDU Header + * XMSTATE_BIT_IMM_HDR - PDU Header xmit in progress + * XMSTATE_BIT_IMM_DATA - PDU Data xmit in progress + * XMSTATE_VALUE_IDLE - management PDU is done **/ static int iscsi_tc
[SCSI] iscsi: return data transfer residual for data-out commands
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ee6a2f0258c064bbc64ad97dc195063457ebebe Commit: 6ee6a2f0258c064bbc64ad97dc195063457ebebe Parent: 505f76b3061f6e74a50f378e45ac931abc1fe784 Author: Tony Battersby <[EMAIL PROTECTED]> AuthorDate: Wed Nov 14 14:38:43 2007 -0600 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Wed Nov 14 14:52:16 2007 -0600 [SCSI] iscsi: return data transfer residual for data-out commands Currently, the iSCSI driver returns the data transfer residual for data-in commands (e.g. read) but not data-out commands (e.g. write). This patch makes it return the data transfer residual for both types of commands. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> Signed-off-by: Mike Christie <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/libiscsi.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index efceed4..8b57af5 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -291,9 +291,6 @@ invalid_datalen: min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE)); } - if (sc->sc_data_direction == DMA_TO_DEVICE) - goto out; - if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { int res_count = be32_to_cpu(rhdr->residual_count); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI] qla1280: convert to use the data buffer accessors
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c1da582b3a95123ffb1e70ec7cd60e757c7c8c2 Commit: 5c1da582b3a95123ffb1e70ec7cd60e757c7c8c2 Parent: 6ee6a2f0258c064bbc64ad97dc195063457ebebe Author: Jes Sorensen <[EMAIL PROTECTED]> AuthorDate: Fri Nov 9 14:40:41 2007 +0100 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Wed Nov 14 18:25:44 2007 -0600 [SCSI] qla1280: convert to use the data buffer accessors - remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Fixed to missing initialization of sg lists before calling for_each_sg() by Jes Sorensen - sg list needs to be initialized before trying to pull the elements out of it. Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]> Signed-off-by: Jes Sorensen <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/qla1280.c | 387 +--- 1 files changed, 166 insertions(+), 221 deletions(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 3aeb68b..146d540 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -1310,14 +1310,7 @@ qla1280_done(struct scsi_qla_host *ha) } /* Release memory used for this I/O */ - if (cmd->use_sg) { - pci_unmap_sg(ha->pdev, cmd->request_buffer, - cmd->use_sg, cmd->sc_data_direction); - } else if (cmd->request_bufflen) { - pci_unmap_single(ha->pdev, sp->saved_dma_handle, - cmd->request_bufflen, - cmd->sc_data_direction); - } + scsi_dma_unmap(cmd); /* Call the mid-level driver interrupt handler */ CMD_HANDLE(sp->cmd) = (unsigned char *)INVALID_HANDLE; @@ -1406,14 +1399,14 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) break; case CS_DATA_UNDERRUN: - if ((cp->request_bufflen - residual_length) < + if ((scsi_bufflen(cp) - residual_length) < cp->underflow) { printk(KERN_WARNING "scsi: Underflow detected - retrying " "command.\n"); host_status = DID_ERROR; } else { - cp->resid = residual_length; + scsi_set_resid(cp, residual_length); host_status = DID_OK; } break; @@ -2775,33 +2768,28 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) struct device_reg __iomem *reg = ha->iobase; struct scsi_cmnd *cmd = sp->cmd; cmd_a64_entry_t *pkt; - struct scatterlist *sg = NULL, *s; __le32 *dword_ptr; dma_addr_t dma_handle; int status = 0; int cnt; int req_cnt; - u16 seg_cnt; + int seg_cnt; u8 dir; ENTER("qla1280_64bit_start_scsi:"); /* Calculate number of entries and segments required. */ req_cnt = 1; - if (cmd->use_sg) { - sg = (struct scatterlist *) cmd->request_buffer; - seg_cnt = pci_map_sg(ha->pdev, sg, cmd->use_sg, -cmd->sc_data_direction); - + seg_cnt = scsi_dma_map(cmd); + if (seg_cnt > 0) { if (seg_cnt > 2) { req_cnt += (seg_cnt - 2) / 5; if ((seg_cnt - 2) % 5) req_cnt++; } - } else if (cmd->request_bufflen) { /* If data transfer. */ - seg_cnt = 1; - } else { - seg_cnt = 0; + } else if (seg_cnt < 0) { + status = 1; + goto out; } if ((req_cnt + 2) >= ha->req_q_cnt) { @@ -2889,124 +2877,104 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) * Load data segments. */ if (seg_cnt) { /* If data transfer. */ + struct scatterlist *sg, *s; int remseg = seg_cnt; + + sg = scsi_sglist(cmd); + /* Setup packet address segment pointer. */ dword_ptr = (u32 *)&pkt->dseg_0_address; - if (cmd->use_sg) { /* If scatter gather */ - /* Load command entry data segments. */ - for_each_sg(sg, s, seg_cnt, cnt) { - if (cnt == 2) + /* Load command entry data segments. */ + for_each_sg(sg, s, seg_cnt, cnt) { + if (cnt == 2) + break; + + dma_handle = sg_dma_address(
[SCSI] zfcp: fix dismissal of error recovery actions
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0076f7754dce07c7a1d752034561acadd99eafa Commit: d0076f7754dce07c7a1d752034561acadd99eafa Parent: 5c1da582b3a95123ffb1e70ec7cd60e757c7c8c2 Author: Martin Peschke <[EMAIL PROTECTED]> AuthorDate: Thu Nov 15 13:57:08 2007 +0100 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Fri Nov 16 13:02:57 2007 -0600 [SCSI] zfcp: fix dismissal of error recovery actions zfcp_erp_action_dismiss() used to ignore any actions in the ready list. This is a bug. Any action superseded by a stronger action needs to be dismissed. This patch changes zfcp_erp_action_dismiss() so that it dismisses actions regardless of their list affiliation. The ERP thread is able to handle this. It is important to kick the erp thread only for actions in the running list, though, as an imbalance of wakeup signals would confuse the erp thread otherwise. Signed-off-by: Martin Peschke <[EMAIL PROTECTED]> Acked-by: Swen Schillig <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/s390/scsi/zfcp_erp.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 5552b75..ad5b481 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -977,7 +977,9 @@ static void zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action) debug_text_event(adapter->erp_dbf, 2, "a_adis"); debug_event(adapter->erp_dbf, 2, &erp_action->action, sizeof (int)); - zfcp_erp_async_handler_nolock(erp_action, ZFCP_STATUS_ERP_DISMISSED); + erp_action->status |= ZFCP_STATUS_ERP_DISMISSED; + if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) + zfcp_erp_action_ready(erp_action); } int - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI] zfcp: fix cleanup of dismissed error recovery actions
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=86e8dfc5603ed76917eed0a9dd9e85a1e1a8b162 Commit: 86e8dfc5603ed76917eed0a9dd9e85a1e1a8b162 Parent: d0076f7754dce07c7a1d752034561acadd99eafa Author: Martin Peschke <[EMAIL PROTECTED]> AuthorDate: Thu Nov 15 13:57:17 2007 +0100 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Fri Nov 16 13:03:21 2007 -0600 [SCSI] zfcp: fix cleanup of dismissed error recovery actions Calling zfcp_erp_strategy_check_action() after zfcp_erp_action_to_running() in zfcp_erp_strategy() might cause an unbalanced up() for erp_ready_sem, which makes the zfcp recovery fail somewhere along the way: erp thread processing erp_action: | | someone waking up erp thread for erp_action | | | | someone else dismissing erp_action: | | | V V V write_lock_irqsave(&adapter->erp_lock, flags); ... if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) { zfcp_erp_action_to_ready(erp_action); up(&adapter->erp_ready_sem);/* first up() for erp_action */ } write_unlock_irqrestore(&adapter->erp_lock, flags); write_lock_irqsave(&adapter->erp_lock, flags); ... zfcp_erp_action_to_running(erp_action); write_unlock_restore(&adapter->erp_lock, flags); /* processing erp_action */ write_lock_irqsave(&adapter->erp_lock, flags); ... erp_action->status |= ZFCP_STATUS_ERP_DISMISSED; if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) { zfcp_erp_action_to_ready(erp_action); up(&adapter->erp_ready_sem); /* second, unbalanced up() for erp_action */ } ... write_unlock_restore(&adapter->erp_lock, flags); write_lock_irqsave(&adapter->erp_lock, flags); if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) { zfcp_erp_action_dequeue(erp_action); retval = ZFCP_ERP_DISMISSED; } ... write_unlock_restore(&adapter->erp_lock, flags); down(&adapter->erp_ready_sem); /* this down() is meant to balance the first up() */ The erp thread must not dismiss an erp_action after moving that action to erp_running_head. Instead it should just go through the down() operation, which balances the first up(), and run through zfcp_erp_strategy one more time for the second up(), which eventually cleans up erp_action. Which is similar to the normal processing of an event for erp_action doing something asynchronously (e.g. waiting for the completion of an fsf_req). This only works if we make sure that a dismissed erp_action is passed to zfcp_erp_strategy() prior to the other action, which caused actions to be dismissed. Therefore the patch implements this rule: running actions go to the head of the ready list; new actions go to the tail of the ready list; the erp thread picks actions to be processed from the ready list's head. Signed-off-by: Martin Peschke <[EMAIL PROTECTED]> Acked-by: Swen Schillig <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/s390/scsi/zfcp_erp.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index ad5b481..07fa824 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -1065,7 +1065,7 @@ zfcp_erp_thread(void *data) &adapter->status)) { write_lock_irqsave(&adapter->erp_lock, flags); - next = adapter->erp_ready_head.prev; + next = adapter->erp_ready_head.next; write_unlock_irqrestore(&adapter->erp_lock, flags); if (next != &adapter->erp_ready_head) { @@ -1155,15 +1155,13 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action) /* * check for dismissed status again to avoid follow-up actions, -* failing of targets and so on for dismissed actions +* failing of targets and so on for dismissed actions, +* we go through down() here because there has been an up() */ - retval = zfcp_erp_strategy_check_action(erp_action, retval); + if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) + retval = ZFCP_ERP_CONTINUES; switch (retval) { - case ZFCP_ERP_DISMISSED: - /* leave since this action has ridden to its ancestors */ - debug_text_event(adapter->erp_dbf, 6, "a_st_dis2"); - goto unlock; case ZFCP_ERP_NOMEM:
[SCSI] NCR5380: Fix bugs and canonicalize irq handler usage
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e641664301744f0d381de43ae1e12343e60b479 Commit: 1e641664301744f0d381de43ae1e12343e60b479 Parent: 86e8dfc5603ed76917eed0a9dd9e85a1e1a8b162 Author: Jeff Garzik <[EMAIL PROTECTED]> AuthorDate: Sun Nov 11 19:52:05 2007 -0500 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Sun Nov 25 12:19:26 2007 +0200 [SCSI] NCR5380: Fix bugs and canonicalize irq handler usage * Always pass the same value to free_irq() that we pass to request_irq(). This fixes several bugs. * Always call NCR5380_intr() with 'irq' and 'dev_id' arguments. Note, scsi_falcon_intr() is the only case now where dev_id is not the scsi_host. * Always pass Scsi_Host to request_irq(). For most cases, the drivers already did so, and I merely neated the source code line. In other cases, either NULL or a non-sensical value was passed, verified to be unused, then changed to be Scsi_Host in anticipation of the future. In addition to the bugs fixes, this change makes the interface usage consistent, which in turn enables the possibility of directly referencing Scsi_Host from all NCR5380_intr() invocations. Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/atari_scsi.c| 10 +- drivers/scsi/dtc.c |5 +++-- drivers/scsi/g_NCR5380.c |5 +++-- drivers/scsi/mac_scsi.c |4 ++-- drivers/scsi/pas16.c |5 +++-- drivers/scsi/sun3_scsi.c |4 ++-- drivers/scsi/sun3_scsi_vme.c |4 ++-- drivers/scsi/t128.c |5 +++-- 8 files changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 6f8403b..f5732d8 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c @@ -393,7 +393,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) #endif /* REAL_DMA */ - NCR5380_intr(0, 0); + NCR5380_intr(irq, dummy); #if 0 /* To be sure the int is not masked */ @@ -458,7 +458,7 @@ static irqreturn_t scsi_falcon_intr(int irq, void *dummy) #endif /* REAL_DMA */ - NCR5380_intr(0, 0); + NCR5380_intr(irq, dummy); return IRQ_HANDLED; } @@ -684,7 +684,7 @@ int atari_scsi_detect(struct scsi_host_template *host) * interrupt after having cleared the pending flag for the DMA * interrupt. */ if (request_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr, IRQ_TYPE_SLOW, -"SCSI NCR5380", scsi_tt_intr)) { +"SCSI NCR5380", instance)) { printk(KERN_ERR "atari_scsi_detect: cannot allocate irq %d, aborting",IRQ_TT_MFP_SCSI); scsi_unregister(atari_scsi_host); atari_stram_free(atari_dma_buffer); @@ -701,7 +701,7 @@ int atari_scsi_detect(struct scsi_host_template *host) IRQ_TYPE_PRIO, "Hades DMA emulator", hades_dma_emulator)) { printk(KERN_ERR "atari_scsi_detect: cannot allocate irq %d, aborting (MACH_IS_HADES)",IRQ_AUTO_2); - free_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr); + free_irq(IRQ_TT_MFP_SCSI, instance); scsi_unregister(atari_scsi_host); atari_stram_free(atari_dma_buffer); atari_dma_buffer = 0; @@ -761,7 +761,7 @@ int atari_scsi_detect(struct scsi_host_template *host) int atari_scsi_release(struct Scsi_Host *sh) { if (IS_A_TT()) - free_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr); + free_irq(IRQ_TT_MFP_SCSI, sh); if (atari_dma_buffer) atari_stram_free(atari_dma_buffer); return 1; diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 2596165..c2677ba 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c @@ -277,7 +277,8 @@ found: /* With interrupts enabled, it will sometimes hang when doing heavy * reads. So better not enable them until I finger it out. */ if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, "dtc", instance)) { + if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, + "dtc", instance)) { printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; } @@ -459,7 +460,7 @@ static int dtc_release(struct Scsi_Host *shost) NCR5380_local_declare(); NCR5380_setup(shost);
sched: cpu accounting controller (V2)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d842de871c8c5e2110c7e4f3f29bbe7b1a519ab8 Commit: d842de871c8c5e2110c7e4f3f29bbe7b1a519ab8 Parent: 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c Author: Srivatsa Vaddagiri <[EMAIL PROTECTED]> AuthorDate: Sun Dec 2 20:04:49 2007 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Sun Dec 2 20:04:49 2007 +0100 sched: cpu accounting controller (V2) Commit cfb5285660aad4931b2ebbfa902ea48a37dfffa1 removed a useful feature for us, which provided a cpu accounting resource controller. This feature would be useful if someone wants to group tasks only for accounting purpose and doesnt really want to exercise any control over their cpu consumption. The patch below reintroduces the feature. It is based on Paul Menage's original patch (Commit 62d0df64065e7c135d0002f069444fbdfc64768f), with these differences: - Removed load average information. I felt it needs more thought (esp to deal with SMP and virtualized platforms) and can be added for 2.6.25 after more discussions. - Convert group cpu usage to be nanosecond accurate (as rest of the cfs stats are) and invoke cpuacct_charge() from the respective scheduler classes - Make accounting scalable on SMP systems by splitting the usage counter to be per-cpu - Move the code from kernel/cpu_acct.c to kernel/sched.c (since the code is not big enough to warrant a new file and also this rightly needs to live inside the scheduler. Also things like accessing rq->lock while reading cpu usage becomes easier if the code lived in kernel/sched.c) The patch also modifies the cpu controller not to provide the same accounting information. Tested-by: Balbir Singh <[EMAIL PROTECTED]> Tested the patches on top of 2.6.24-rc3. The patches work fine. Ran some simple tests like cpuspin (spin on the cpu), ran several tasks in the same group and timed them. Compared their time stamps with cpuacct.usage. Signed-off-by: Srivatsa Vaddagiri <[EMAIL PROTECTED]> Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> --- include/linux/cgroup_subsys.h |7 ++ init/Kconfig |7 ++ kernel/sched.c| 155 ++--- kernel/sched_fair.c |6 ++ kernel/sched_rt.c |1 + 5 files changed, 150 insertions(+), 26 deletions(-) diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index d62fcee..9ec4318 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h @@ -30,3 +30,10 @@ SUBSYS(cpu_cgroup) #endif /* */ + +#ifdef CONFIG_CGROUP_CPUACCT +SUBSYS(cpuacct) +#endif + +/* */ + diff --git a/init/Kconfig b/init/Kconfig index d35e44f..404bbf3 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -354,6 +354,13 @@ config FAIR_CGROUP_SCHED endchoice +config CGROUP_CPUACCT + bool "Simple CPU accounting cgroup subsystem" + depends on CGROUPS + help + Provides a simple Resource Controller for monitoring the + total CPU consumed by the tasks in a cgroup + config SYSFS_DEPRECATED bool "Create deprecated sysfs files" default y diff --git a/kernel/sched.c b/kernel/sched.c index 98dcdf2..59ff6b1 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -854,6 +854,12 @@ iter_move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest, struct rq_iterator *iterator); #endif +#ifdef CONFIG_CGROUP_CPUACCT +static void cpuacct_charge(struct task_struct *tsk, u64 cputime); +#else +static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime) {} +#endif + #include "sched_stats.h" #include "sched_idletask.c" #include "sched_fair.c" @@ -7221,38 +7227,12 @@ static u64 cpu_shares_read_uint(struct cgroup *cgrp, struct cftype *cft) return (u64) tg->shares; } -static u64 cpu_usage_read(struct cgroup *cgrp, struct cftype *cft) -{ - struct task_group *tg = cgroup_tg(cgrp); - unsigned long flags; - u64 res = 0; - int i; - - for_each_possible_cpu(i) { - /* -* Lock to prevent races with updating 64-bit counters -* on 32-bit arches. -*/ - spin_lock_irqsave(&cpu_rq(i)->lock, flags); - res += tg->se[i]->sum_exec_runtime; - spin_unlock_irqrestore(&cpu_rq(i)->lock, flags); - } - /* Convert from ns to ms */ - do_div(res, NSEC_PER_MSEC); - - return res; -} - static struct cftype cpu_files[] = { { .name = "shares", .read_uint = cpu_shares_read_uint, .write_uint = cpu_shares_write_uint, }, - { -
ACPI: Delete the IRQ operation in throttling controll via PTC
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=357dc4c3f13cb5c1e3b40a09cbe6ff1b0df2c7c3 Commit: 357dc4c3f13cb5c1e3b40a09cbe6ff1b0df2c7c3 Parent: f79f06ab9f86d7203006d2ec8992ac80df36a34e Author: Zhao Yakui <[EMAIL PROTECTED]> AuthorDate: Thu Nov 29 16:22:43 2007 +0800 Committer: Len Brown <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 23:27:15 2007 -0500 ACPI: Delete the IRQ operation in throttling controll via PTC The IRQ operation(enable/disable) should be avoided when throttling is controlled via PTC method. It is replaced by the migration of task. This fixes an oops on T61 -- a regression due to f79f06ab9f86 b/c FixedHW support tried to read remote MSR with interrupts disabled. Signed-off-by: Zhao Yakui <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> --- drivers/acpi/processor_throttling.c | 36 +++--- 1 files changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index c26c61f..6742d7b 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -413,7 +414,7 @@ static int acpi_throttling_rdmsr(struct acpi_processor *pr, } else { msr_low = 0; msr_high = 0; - rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, + rdmsr_safe(MSR_IA32_THERM_CONTROL, (u32 *)&msr_low , (u32 *) &msr_high); msr = (msr_high << 32) | msr_low; *value = (acpi_integer) msr; @@ -438,7 +439,7 @@ static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) "HARDWARE addr space,NOT supported yet\n"); } else { msr = value; - wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, + wrmsr_safe(MSR_IA32_THERM_CONTROL, msr & 0x, msr >> 32); ret = 0; } @@ -572,21 +573,32 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) return -ENODEV; pr->throttling.state = 0; - local_irq_disable(); + value = 0; ret = acpi_read_throttling_status(pr, &value); if (ret >= 0) { state = acpi_get_throttling_state(pr, value); pr->throttling.state = state; } - local_irq_enable(); return 0; } static int acpi_processor_get_throttling(struct acpi_processor *pr) { - return pr->throttling.acpi_processor_get_throttling(pr); + cpumask_t saved_mask; + int ret; + + /* +* Migrate task to the cpu pointed by pr. +*/ + saved_mask = current->cpus_allowed; + set_cpus_allowed(current, cpumask_of_cpu(pr->id)); + ret = pr->throttling.acpi_processor_get_throttling(pr); + /* restore the previous state */ + set_cpus_allowed(current, saved_mask); + + return ret; } static int acpi_processor_get_fadt_info(struct acpi_processor *pr) @@ -717,21 +729,29 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, if (state < pr->throttling_platform_limit) return -EPERM; - local_irq_disable(); value = 0; ret = acpi_get_throttling_value(pr, state, &value); if (ret >= 0) { acpi_write_throttling_state(pr, value); pr->throttling.state = state; } - local_irq_enable(); return 0; } int acpi_processor_set_throttling(struct acpi_processor *pr, int state) { - return pr->throttling.acpi_processor_set_throttling(pr, state); + cpumask_t saved_mask; + int ret; + /* +* Migrate task to the cpu pointed by pr. +*/ + saved_mask = current->cpus_allowed; + set_cpus_allowed(current, cpumask_of_cpu(pr->id)); + ret = pr->throttling.acpi_processor_set_throttling(pr, state); + /* restore the previous state */ + set_cpus_allowed(current, saved_mask); + return ret; } int acpi_processor_get_throttling_info(struct acpi_processor *pr) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=152c300d007c70c4a1847dad39ecdaba22e7d457 Commit: 152c300d007c70c4a1847dad39ecdaba22e7d457 Parent: 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c Author: Bob Moore <[EMAIL PROTECTED]> AuthorDate: Wed Oct 17 16:10:18 2007 -0400 Committer: Len Brown <[EMAIL PROTECTED]> CommitDate: Sun Dec 2 14:26:55 2007 -0500 ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference Changed resolution of named references in packages Fixed a problem with the Package operator where all named references were created as object references and left otherwise unresolved. According to the ACPI specification, a Package can only contain Data Objects or references to control methods. The implication is that named references to Data Objects (Integer, Buffer, String, Package, BufferField, Field) should be resolved immediately upon package creation. This is the approach taken with this change. References to all other named objects (Methods, Devices, Scopes, etc.) are all now properly created as reference objects. http://bugzilla.kernel.org/show_bug.cgi?id=5328 http://bugzilla.kernel.org/show_bug.cgi?id=9429 Signed-off-by: Bob Moore <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> --- drivers/acpi/dispatcher/dsobject.c | 91 +-- 1 files changed, 85 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index a474ca2..954ac8c 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c @@ -137,6 +137,71 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, return_ACPI_STATUS(status); } } + + /* Special object resolution for elements of a package */ + + if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || + (op->common.parent->common.aml_opcode == +AML_VAR_PACKAGE_OP)) { + /* +* Attempt to resolve the node to a value before we insert it into +* the package. If this is a reference to a common data type, +* resolve it immediately. According to the ACPI spec, package +* elements can only be "data objects" or method references. +* Attempt to resolve to an Integer, Buffer, String or Package. +* If cannot, return the named reference (for things like Devices, +* Methods, etc.) Buffer Fields and Fields will resolve to simple +* objects (int/buf/str/pkg). +* +* NOTE: References to things like Devices, Methods, Mutexes, etc. +* will remain as named references. This behavior is not described +* in the ACPI spec, but it appears to be an oversight. +*/ + obj_desc = (union acpi_operand_object *)op->common.node; + + status = + acpi_ex_resolve_node_to_value(ACPI_CAST_INDIRECT_PTR + (struct + acpi_namespace_node, + &obj_desc), + walk_state); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + switch (op->common.node->type) { + /* +* For these types, we need the actual node, not the subobject. +* However, the subobject got an extra reference count above. +*/ + case ACPI_TYPE_MUTEX: + case ACPI_TYPE_METHOD: + case ACPI_TYPE_POWER: + case ACPI_TYPE_PROCESSOR: + case ACPI_TYPE_EVENT: + case ACPI_TYPE_REGION: + case ACPI_TYPE_DEVICE: + case ACPI_TYPE_THERMAL: + + obj_desc = + (union acpi_operand_object *)op->common. + node; + break; + + default: + break; + } + + /* +* If above resolved to an operand object, we are done. Otherwise, +* we have a NS node, we must create the pa
Revert "[POWERPC] Fix RTAS os-term usage on kernel panic"
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8f51506164655ce9af14970ce4f765f28c7970e9 Commit: 8f51506164655ce9af14970ce4f765f28c7970e9 Parent: 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c Author: Paul Mackerras <[EMAIL PROTECTED]> AuthorDate: Mon Dec 3 09:30:04 2007 +1100 Committer: Paul Mackerras <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 09:39:45 2007 +1100 Revert "[POWERPC] Fix RTAS os-term usage on kernel panic" This reverts commit a2b51812a4dc5db09ab4d4638d4d8ed456e2457e. It turns out that this change caused some machines to fail to come back up when being rebooted, and generated an error in the hypervisor error log on some machines. The platform architecture (PAPR) is a little unclear on exactly when the RTAS ibm,os-term function should be called. Until that is clarified I'm reverting this commit. Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- arch/powerpc/kernel/rtas.c | 12 ++-- arch/powerpc/platforms/pseries/setup.c |3 +-- include/asm-powerpc/rtas.h |3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 053cac1..52e95c2 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c @@ -638,18 +638,18 @@ void rtas_halt(void) /* Must be in the RMO region, so we place it here */ static char rtas_os_term_buf[2048]; -void rtas_panic_msg(char *str) -{ - snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); -} - -void rtas_os_term(void) +void rtas_os_term(char *str) { int status; + if (panic_timeout) + return; + if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) return; + snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); + do { status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, __pa(rtas_os_term_buf)); diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index fdeefe5..fdb9b1c 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -507,8 +507,7 @@ define_machine(pseries) { .restart= rtas_restart, .power_off = pSeries_power_off, .halt = rtas_halt, - .panic = rtas_panic_msg, - .machine_shutdown = rtas_os_term, + .panic = rtas_os_term, .get_boot_time = rtas_get_boot_time, .get_rtc_time = rtas_get_rtc_time, .set_rtc_time = rtas_set_rtc_time, diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 87db872..8eaa7b2 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h @@ -164,8 +164,7 @@ extern int rtas_call(int token, int, int, int *, ...); extern void rtas_restart(char *cmd); extern void rtas_power_off(void); extern void rtas_halt(void); -extern void rtas_panic_msg(char *str); -extern void rtas_os_term(void); +extern void rtas_os_term(char *str); extern int rtas_get_sensor(int sensor, int index, int *state); extern int rtas_get_power_level(int powerdomain, int *level); extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b80fa3cce7390185e43ea22e9b3c38ab138bc580 Commit: b80fa3cce7390185e43ea22e9b3c38ab138bc580 Parent: 8f51506164655ce9af14970ce4f765f28c7970e9 Author: Grant Likely <[EMAIL PROTECTED]> AuthorDate: Tue Nov 20 17:08:49 2007 +1100 Committer: Paul Mackerras <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 10:08:53 2007 +1100 [POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc xmon is broken under arch/ppc so remove it from the defconfig. Signed-off-by: Grant Likely <[EMAIL PROTECTED]> Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- arch/ppc/configs/ml300_defconfig |2 +- arch/ppc/configs/ml403_defconfig |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig index 69bad91..d66cacd 100644 --- a/arch/ppc/configs/ml300_defconfig +++ b/arch/ppc/configs/ml300_defconfig @@ -719,7 +719,7 @@ CONFIG_DEBUG_INFO=y CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_KGDB is not set -CONFIG_XMON=y +# CONFIG_XMON is not set # CONFIG_BDI_SWITCH is not set # CONFIG_SERIAL_TEXT_DEBUG is not set diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig index a78896e..71bcfa7 100644 --- a/arch/ppc/configs/ml403_defconfig +++ b/arch/ppc/configs/ml403_defconfig @@ -720,7 +720,7 @@ CONFIG_DEBUG_INFO=y CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_KGDB is not set -CONFIG_XMON=y +# CONFIG_XMON is not set # CONFIG_BDI_SWITCH is not set # CONFIG_SERIAL_TEXT_DEBUG is not set - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
x86: disable hpet on shutdown
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c86c7fbc829e27e2a4093f98ded9fbd75e515adb Commit: c86c7fbc829e27e2a4093f98ded9fbd75e515adb Parent: 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c Author: OGAWA Hirofumi <[EMAIL PROTECTED]> AuthorDate: Mon Dec 3 17:17:10 2007 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 17:17:10 2007 +0100 x86: disable hpet on shutdown If HPET was enabled by pci quirks, we use i8253 as initial clockevent because pci quirks doesn't run until pci is initialized. The above means the kernel (or something) is assuming HPET legacy replacement is disabled and can use i8253 at boot. If we used kexec, it isn't true. So, this patch disables HPET legacy replacement for kexec in machine_shutdown(). Signed-off-by: OGAWA Hirofumi <[EMAIL PROTECTED]> Acked-by: Venkatesh Pallipadi <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- arch/x86/kernel/hpet.c | 14 ++ arch/x86/kernel/reboot_32.c |4 arch/x86/kernel/reboot_64.c |4 include/asm-x86/hpet.h |1 + 4 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 53303f2..4a86ffd 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -446,6 +446,20 @@ static __init int hpet_late_init(void) } fs_initcall(hpet_late_init); +void hpet_disable(void) +{ + if (is_hpet_capable()) { + unsigned long cfg = hpet_readl(HPET_CFG); + + if (hpet_legacy_int_enabled) { + cfg &= ~HPET_CFG_LEGACY; + hpet_legacy_int_enabled = 0; + } + cfg &= ~HPET_CFG_ENABLE; + hpet_writel(cfg, HPET_CFG); + } +} + #ifdef CONFIG_HPET_EMULATE_RTC /* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET diff --git a/arch/x86/kernel/reboot_32.c b/arch/x86/kernel/reboot_32.c index 9e2269d..bb1a0f8 100644 --- a/arch/x86/kernel/reboot_32.c +++ b/arch/x86/kernel/reboot_32.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "mach_reboot.h" #include @@ -326,6 +327,9 @@ static void native_machine_shutdown(void) #ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif +#ifdef CONFIG_HPET_TIMER + hpet_disable(); +#endif } void __attribute__((weak)) mach_reboot_fixups(void) diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c index 71b13c5..53620a9 100644 --- a/arch/x86/kernel/reboot_64.c +++ b/arch/x86/kernel/reboot_64.c @@ -17,6 +17,7 @@ #include #include #include +#include #include /* @@ -113,6 +114,9 @@ void machine_shutdown(void) disable_IO_APIC(); +#ifdef CONFIG_HPET_TIMER + hpet_disable(); +#endif local_irq_restore(flags); pci_iommu_shutdown(); diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h index b1f3c1e..ad8d6e7 100644 --- a/include/asm-x86/hpet.h +++ b/include/asm-x86/hpet.h @@ -61,6 +61,7 @@ extern unsigned long force_hpet_address; extern int hpet_force_user; extern int is_hpet_enabled(void); extern int hpet_enable(void); +extern void hpet_disable(void); extern unsigned long hpet_readl(unsigned long a); extern void force_hpet_resume(void); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
x86: disable hpet legacy replacement for kdump
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0c1b2724069951b1902373e688042b2ec382f68f Commit: 0c1b2724069951b1902373e688042b2ec382f68f Parent: c86c7fbc829e27e2a4093f98ded9fbd75e515adb Author: OGAWA Hirofumi <[EMAIL PROTECTED]> AuthorDate: Mon Dec 3 17:17:10 2007 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 17:17:10 2007 +0100 x86: disable hpet legacy replacement for kdump we should also add hpet_disable() for kdump. Signed-off-by: OGAWA Hirofumi <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- arch/x86/kernel/crash.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 8bb482f..9a5fa0a 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -140,5 +141,8 @@ void machine_crash_shutdown(struct pt_regs *regs) #if defined(CONFIG_X86_IO_APIC) disable_IO_APIC(); #endif +#ifdef CONFIG_HPET_TIMER + hpet_disable(); +#endif crash_save_cpu(regs, safe_smp_processor_id()); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
x86: fix x86-32 early fixmap initialization.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17d57a9206b4de6ad082ac9f2d2346985abbd2aa Commit: 17d57a9206b4de6ad082ac9f2d2346985abbd2aa Parent: 0c1b2724069951b1902373e688042b2ec382f68f Author: Eric W. Biederman <[EMAIL PROTECTED]> AuthorDate: Sat Dec 1 18:34:06 2007 -0700 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 17:17:10 2007 +0100 x86: fix x86-32 early fixmap initialization. [EMAIL PROTECTED] writes: > i've just noticed that the chunk in i386/kernel/head.S ended up in a > weird place, namely, it's not going to be executed as it's just after > a 'jmp 3f' and before startup_32_smp, probably not what you intended. > on a sidenote, the whole thing can be done in a single insn, like: > > movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir - > __PAGE_OFFSET+ 4092) Thanks for the reminder I thought we had fixed this problem a while ago. Needed to get fixed virtual address for USB debug and earlycon with mmio. Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> --- arch/x86/kernel/head_32.S | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 374b7ec..ac0637a 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -193,6 +193,12 @@ default_entry: jb 10b movl %edi,(init_pg_tables_end - __PAGE_OFFSET) + /* Do an early initialization of the fixmap area */ + movl $(swapper_pg_dir - __PAGE_OFFSET), %edx + movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax + addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ + movl %eax, 4092(%edx) + xorl %ebx,%ebx /* This is the boot CPU (BSP) */ jmp 3f /* @@ -208,12 +214,6 @@ default_entry: .section .init.text,"ax",@progbits #endif - /* Do an early initialization of the fixmap area */ - movl $(swapper_pg_dir - __PAGE_OFFSET), %edx - movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax - addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ - movl %eax, 4092(%edx) - #ifdef CONFIG_SMP ENTRY(startup_32_smp) cld - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
dm9601: Fix printk
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77b6901573066d6eadfcf66161a5768f3d2de9e9 Commit: 77b6901573066d6eadfcf66161a5768f3d2de9e9 Parent: 9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 Author: Peter Korsgaard <[EMAIL PROTECTED]> AuthorDate: Thu Nov 15 11:01:02 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 21:02:53 2007 -0500 dm9601: Fix printk A printk in the error handling code of dm9601.c was missing a newline. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/usb/dm9601.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 2c68573..1ffdd10 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -94,7 +94,7 @@ static void dm_write_async_callback(struct urb *urb) struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context; if (urb->status < 0) - printk(KERN_DEBUG "dm_write_async_callback() failed with %d", + printk(KERN_DEBUG "dm_write_async_callback() failed with %d\n", urb->status); kfree(req); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
forcedeth boot delay fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 Commit: 9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 Parent: 490dde8990c55662596a4be71b5070bd7d382d4a Author: Ayaz Abdulla <[EMAIL PROTECTED]> AuthorDate: Wed Nov 21 15:02:58 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 20:59:59 2007 -0500 forcedeth boot delay fix Fix a long boot delay in the forcedeth driver. During initialization, the timeout for the handshake between mgmt unit and driver can be very long. The patch reduces the timeout by eliminating a extra loop around the timeout logic. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9308 Signed-off-by: Ayaz Abdulla <[EMAIL PROTECTED]> Cc: Alex Howells <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/forcedeth.c | 22 +- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index f9ba0ac..a96583c 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -5286,19 +5286,15 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) { np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use); - for (i = 0; i < 5000; i++) { - msleep(1); - if (nv_mgmt_acquire_sema(dev)) { - /* management unit setup the phy already? */ - if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == - NVREG_XMITCTL_SYNC_PHY_INIT) { - /* phy is inited by mgmt unit */ - phyinitialized = 1; - dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); - } else { - /* we need to init the phy */ - } - break; + if (nv_mgmt_acquire_sema(dev)) { + /* management unit setup the phy already? */ + if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == + NVREG_XMITCTL_SYNC_PHY_INIT) { + /* phy is inited by mgmt unit */ + phyinitialized = 1; + dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); + } else { + /* we need to init the phy */ } } } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
forcedeth: new mcp79 pci ids
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=490dde8990c55662596a4be71b5070bd7d382d4a Commit: 490dde8990c55662596a4be71b5070bd7d382d4a Parent: 61dbcecef568450de954115180881bf2f68511bc Author: Ayaz Abdulla <[EMAIL PROTECTED]> AuthorDate: Fri Nov 23 20:54:01 2007 -0500 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 20:54:01 2007 -0500 forcedeth: new mcp79 pci ids This patch adds new device ids and features for mcp79 devices into the forcedeth driver. Signed-off-by: Ayaz Abdulla <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/forcedeth.c | 16 include/linux/pci_ids.h |4 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 92ce2e3..f9ba0ac 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -5613,6 +5613,22 @@ static struct pci_device_id pci_tbl[] = { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_35), .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, + { /* MCP79 Ethernet Controller */ + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_36), + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, + }, + { /* MCP79 Ethernet Controller */ + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_37), + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, + }, + { /* MCP79 Ethernet Controller */ + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_38), + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, + }, + { /* MCP79 Ethernet Controller */ + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_39), + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, + }, {0,}, }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1ee009e..111aa10 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1237,6 +1237,10 @@ #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 +#define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 +#define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 +#define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 +#define PCI_DEVICE_ID_NVIDIA_NVENET_39 0x0AB3 #define PCI_VENDOR_ID_IMS 0x10e0 #define PCI_DEVICE_ID_IMS_TT1280x9128 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ibm_newemac: Fix possible lockup on close
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=61dbcecef568450de954115180881bf2f68511bc Commit: 61dbcecef568450de954115180881bf2f68511bc Parent: 2ffbb8377c7a0713baf6644e285adc27a5654582 Author: Benjamin Herrenschmidt <[EMAIL PROTECTED]> AuthorDate: Tue Nov 20 14:50:46 2007 +1100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Nov 23 20:52:09 2007 -0500 ibm_newemac: Fix possible lockup on close It's a bad idea to call flush_scheduled_work from within a netdev->stop because the linkwatch will occasionally take the rtnl lock from a workqueue context, and thus that can deadlock. This reworks things a bit in that area to avoid the problem. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/ibm_newemac/core.c | 31 --- drivers/net/ibm_newemac/core.h |1 + 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 0de3aa2..eb0718b 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -642,9 +642,11 @@ static void emac_reset_work(struct work_struct *work) DBG(dev, "reset_work" NL); mutex_lock(&dev->link_lock); - emac_netif_stop(dev); - emac_full_tx_reset(dev); - emac_netif_start(dev); + if (dev->opened) { + emac_netif_stop(dev); + emac_full_tx_reset(dev); + emac_netif_start(dev); + } mutex_unlock(&dev->link_lock); } @@ -1063,10 +1065,9 @@ static int emac_open(struct net_device *ndev) dev->rx_sg_skb = NULL; mutex_lock(&dev->link_lock); + dev->opened = 1; - /* XXX Start PHY polling now. Shouldn't wr do like sungem instead and -* always poll the PHY even when the iface is down ? That would allow -* things like laptop-net to work. --BenH + /* Start PHY polling now. */ if (dev->phy.address >= 0) { int link_poll_interval; @@ -1145,9 +1146,11 @@ static void emac_link_timer(struct work_struct *work) int link_poll_interval; mutex_lock(&dev->link_lock); - DBG2(dev, "link timer" NL); + if (!dev->opened) + goto bail; + if (dev->phy.def->ops->poll_link(&dev->phy)) { if (!netif_carrier_ok(dev->ndev)) { /* Get new link parameters */ @@ -1170,13 +1173,14 @@ static void emac_link_timer(struct work_struct *work) link_poll_interval = PHY_POLL_LINK_OFF; } schedule_delayed_work(&dev->link_work, link_poll_interval); - + bail: mutex_unlock(&dev->link_lock); } static void emac_force_link_update(struct emac_instance *dev) { netif_carrier_off(dev->ndev); + smp_rmb(); if (dev->link_polling) { cancel_rearming_delayed_work(&dev->link_work); if (dev->link_polling) @@ -1191,11 +1195,14 @@ static int emac_close(struct net_device *ndev) DBG(dev, "close" NL); - if (dev->phy.address >= 0) + if (dev->phy.address >= 0) { + dev->link_polling = 0; cancel_rearming_delayed_work(&dev->link_work); - + } + mutex_lock(&dev->link_lock); emac_netif_stop(dev); - flush_scheduled_work(); + dev->opened = 0; + mutex_unlock(&dev->link_lock); emac_rx_disable(dev); emac_tx_disable(dev); @@ -2756,6 +2763,8 @@ static int __devexit emac_remove(struct of_device *ofdev) unregister_netdev(dev->ndev); + flush_scheduled_work(); + if (emac_has_feature(dev, EMAC_FTR_HAS_TAH)) tah_detach(dev->tah_dev, dev->tah_port); if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII)) diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h index 4011803..a010b24 100644 --- a/drivers/net/ibm_newemac/core.h +++ b/drivers/net/ibm_newemac/core.h @@ -258,6 +258,7 @@ struct emac_instance { int stop_timeout; /* in us */ int no_mcast; int mcast_pending; + int opened; struct work_struct reset_work; spinlock_t lock; }; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f9fe9b7148f95f018ae2c97f7fa1a35364ea785 Commit: 0f9fe9b7148f95f018ae2c97f7fa1a35364ea785 Parent: 04d86d6fc0477f217d60667adfc26f1f56264cc9 Author: Alan Cox <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 15:23:16 2007 + Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 17:44:10 2007 -0500 libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19)) On Fri, 30 Nov 2007 14:34:11 +0200 (EET) Meelis Roos <[EMAIL PROTECTED]> wrote: > > Can you stick a stack trace in at that point ? That would help diagnose > > it a great deal quicker. > > Finally done - found out hard way that BUG() is too bad and > dump_st5ack() suits me better. Thanks. This should fix the real cause, and also allow for port start to fail politely with -ENODEV. Signed-off-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 53d1101..b514a80 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6967,12 +6967,11 @@ int ata_host_start(struct ata_host *host) if (ap->ops->port_start) { rc = ap->ops->port_start(ap); if (rc) { - ata_port_printk(ap, KERN_ERR, "failed to " - "start port (errno=%d)\n", rc); + if (rc != -ENODEV) + dev_printk(KERN_ERR, host->dev, "failed to start port %d (errno=%d)\n", i, rc); goto err_out; } } - ata_eh_freeze_port(ap); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: More IVB horkage from TSST
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e9f3340673c1da32041f2a282b166c72cd78632e Commit: e9f3340673c1da32041f2a282b166c72cd78632e Parent: abb6a88974a8c92b049eddf37685899c4021cf0a Author: Peter Missel <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 18:04:42 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 17:35:59 2007 -0500 libata: More IVB horkage from TSST libata: Add more TSST (Samsung/Toshiba) IDE drives with broken cable detection validation bits. signed-off-by: Peter Missel ([EMAIL PROTECTED]) Acked-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 33f0627..53d1101 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4185,6 +4185,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { /* Devices which get the IVB wrong */ { "QUANTUM FIREBALLlct10 05", "A03.0900", ATA_HORKAGE_IVB, }, { "TSSTcorp CDDVDW SH-S202J", "SB00", ATA_HORKAGE_IVB, }, + { "TSSTcorp CDDVDW SH-S202J", "SB01", ATA_HORKAGE_IVB, }, + { "TSSTcorp CDDVDW SH-S202N", "SB00", ATA_HORKAGE_IVB, }, + { "TSSTcorp CDDVDW SH-S202N", "SB01", ATA_HORKAGE_IVB, }, /* End Marker */ { } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sata_mv: fix compilation error when enabling DEBUG
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2d79ab8fd7a7bf3a45d0e948ae27b3dd95ce95ea Commit: 2d79ab8fd7a7bf3a45d0e948ae27b3dd95ce95ea Parent: f88c480dac88a754f84e943cb5539d59cda3c089 Author: Saeed Bishara <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 17:26:08 2007 +0200 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 17:35:58 2007 -0500 sata_mv: fix compilation error when enabling DEBUG use sstatus instead status. Signed-off-by: Saeed Bishara <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/sata_mv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index a43f64d..97c3e11 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -2170,7 +2170,7 @@ static void mv_phy_reset(struct ata_port *ap, unsigned int *class, mv_scr_read(ap, SCR_ERROR, &serror); mv_scr_read(ap, SCR_CONTROL, &scontrol); DPRINTK("S-regs after ATA_RST: SStat 0x%08x SErr 0x%08x " - "SCtrl 0x%08x\n", status, serror, scontrol); + "SCtrl 0x%08x\n", sstatus, serror, scontrol); } #endif - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Set proper ATA UDMA mode for bf548 according to system clock.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f88c480dac88a754f84e943cb5539d59cda3c089 Commit: f88c480dac88a754f84e943cb5539d59cda3c089 Parent: 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c Author: sonic zhang <[EMAIL PROTECTED]> AuthorDate: Tue Nov 27 12:47:39 2007 +0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Dec 1 17:35:58 2007 -0500 Set proper ATA UDMA mode for bf548 according to system clock. UDMA Mode - Frequency compatibility UDMA5 - 100 MB/s - SCLK = 133 MHz UDMA4 - 66 MB/s- SCLK >= 80 MHz UDMA3 - 44.4 MB/s - SCLK >= 50 MHz UDMA2 - 33 MB/s- SCLK >= 40 MHz Signed-off-by: Sonic Zhang <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/pata_bf54x.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index 81db405..088a41f 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c @@ -1489,6 +1489,8 @@ static int __devinit bfin_atapi_probe(struct platform_device *pdev) int board_idx = 0; struct resource *res; struct ata_host *host; + unsigned int fsclk = get_sclk(); + int udma_mode = 5; const struct ata_port_info *ppi[] = { &bfin_port_info[board_idx], NULL }; @@ -1507,6 +1509,11 @@ static int __devinit bfin_atapi_probe(struct platform_device *pdev) if (res == NULL) return -EINVAL; + while (bfin_port_info[board_idx].udma_mask>0 && udma_fsclk[udma_mode] > fsclk) { + udma_mode--; + bfin_port_info[board_idx].udma_mask >>= 1; + } + /* * Now that that's out of the way, wire up the port.. */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Update Kdump Maintainer's details
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4200b66cbf6f4970dd7e192cc929cbccae12a4ca Commit: 4200b66cbf6f4970dd7e192cc929cbccae12a4ca Parent: ce3b642d42f36406112ab474c03d81c5941d9398 Author: Vivek Goyal <[EMAIL PROTECTED]> AuthorDate: Sat Dec 1 12:16:30 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 08:13:17 2007 -0800 Update Kdump Maintainer's details Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- MAINTAINERS |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7c8392e..2bbe40e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2173,7 +2173,7 @@ S:Maintained KDUMP P: Vivek Goyal -M: [EMAIL PROTECTED] +M: [EMAIL PROTECTED] P: Haren Myneni M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
uml: work around host tcsetattr bug
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce3b642d42f36406112ab474c03d81c5941d9398 Commit: ce3b642d42f36406112ab474c03d81c5941d9398 Parent: 0a765329ed656ef08915c8be4aba9031ba467ee4 Author: Jeff Dike <[EMAIL PROTECTED]> AuthorDate: Sat Dec 1 12:16:30 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 08:13:17 2007 -0800 uml: work around host tcsetattr bug Under the conditions that UML uses it, tcgetattr is guaranteed to return -EINTR when the console is attached to /dev/ptmx, making generic_console_write hang because it loops, calling tcgetattr until it succeeds. This is a host bug - see http://marc.info/?l=linux-kernel&m=119618990807182&w=2 for the details. This patch works around it by blocking SIGIO while the terminal attributes are being fiddled. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/um/drivers/chan_user.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index b88e93b..0257640 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c @@ -74,10 +74,16 @@ void generic_free(void *data) int generic_console_write(int fd, const char *buf, int n) { + sigset_t old, no_sigio; struct termios save, new; int err; if (isatty(fd)) { + sigemptyset(&no_sigio); + sigaddset(&no_sigio, SIGIO); + if (sigprocmask(SIG_BLOCK, &no_sigio, &old)) + goto error; + CATCH_EINTR(err = tcgetattr(fd, &save)); if (err) goto error; @@ -97,8 +103,11 @@ int generic_console_write(int fd, const char *buf, int n) * Restore raw mode, in any case; we *must* ignore any error apart * EINTR, except for debug. */ - if (isatty(fd)) + if (isatty(fd)) { CATCH_EINTR(tcsetattr(fd, TCSAFLUSH, &save)); + sigprocmask(SIG_SETMASK, &old, NULL); + } + return err; error: return -errno; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
uml: after_sleep_interval should return something
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a765329ed656ef08915c8be4aba9031ba467ee4 Commit: 0a765329ed656ef08915c8be4aba9031ba467ee4 Parent: b00296fb781acfafa93687000cdef72b8922bb40 Author: Jeff Dike <[EMAIL PROTECTED]> AuthorDate: Sat Dec 1 12:16:29 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Dec 3 08:13:17 2007 -0800 uml: after_sleep_interval should return something I forgot to have an int-returning function actually return something. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/um/os-Linux/time.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index ef02d94..e492805 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -77,6 +77,7 @@ long long os_nsecs(void) #ifdef UML_CONFIG_NO_HZ static int after_sleep_interval(struct timespec *ts) { + return 0; } #else static inline long long timespec_to_us(const struct timespec *ts) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html