dmfe: add support for suspend/resume
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc8a8387ba57db2275e717c19838a8d5a404c270 Commit: bc8a8387ba57db2275e717c19838a8d5a404c270 Parent: b3df0da886ffdb3e70c3197f589e959e5f8c9c04 Author: Maxim Levitsky [EMAIL PROTECTED] AuthorDate: Tue Mar 6 02:41:53 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:00:57 2007 -0400 dmfe: add support for suspend/resume This adds support for suspend resume [EMAIL PROTECTED]: fix CONFIG_PM=n, coding style] Signed-off-by: Maxim Levitsky [EMAIL PROTECTED] Cc: Valerie Henson [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/tulip/dmfe.c | 52 +++-- 1 files changed, 49 insertions(+), 3 deletions(-) diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index b3a64ca..e3a0779 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c @@ -55,9 +55,6 @@ TODO -Implement pci_driver::suspend() and pci_driver::resume() -power management methods. - Check on 64 bit boxes. Check and fix on big endian boxes. @@ -2050,11 +2047,60 @@ static struct pci_device_id dmfe_pci_tbl[] = { MODULE_DEVICE_TABLE(pci, dmfe_pci_tbl); +#ifdef CONFIG_PM +static int dmfe_suspend(struct pci_dev *pci_dev, pm_message_t state) +{ + struct net_device *dev = pci_get_drvdata(pci_dev); + struct dmfe_board_info *db = netdev_priv(dev); + + /* Disable upper layer interface */ + netif_device_detach(dev); + + /* Disable Tx/Rx */ + db-cr6_data = ~(CR6_RXSC | CR6_TXSC); + update_cr6(db-cr6_data, dev-base_addr); + + /* Disable Interrupt */ + outl(0, dev-base_addr + DCR7); + outl(inl (dev-base_addr + DCR5), dev-base_addr + DCR5); + + /* Fre RX buffers */ + dmfe_free_rxbuffer(db); + + /* Power down device*/ + pci_set_power_state(pci_dev, pci_choose_state (pci_dev,state)); + pci_save_state(pci_dev); + + return 0; +} + +static int dmfe_resume(struct pci_dev *pci_dev) +{ + struct net_device *dev = pci_get_drvdata(pci_dev); + + pci_restore_state(pci_dev); + pci_set_power_state(pci_dev, PCI_D0); + + /* Re-initilize DM910X board */ + dmfe_init_dm910x(dev); + + /* Restart upper layer interface */ + netif_device_attach(dev); + + return 0; +} +#else +#define dmfe_suspend NULL +#define dmfe_resume NULL +#endif + static struct pci_driver dmfe_driver = { .name = dmfe, .id_table = dmfe_pci_tbl, .probe = dmfe_init_one, .remove = __devexit_p(dmfe_remove_one), + .suspend= dmfe_suspend, + .resume = dmfe_resume }; MODULE_AUTHOR(Sten Wang, [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
[PATCH] zd1211rw: More device IDs
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aec91028db71cae7efa1101cf2e38c407096f023 Commit: aec91028db71cae7efa1101cf2e38c407096f023 Parent: f2a81a161d5089fe838ec6c4c7b6357f25aeacbe Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Sun Mar 11 19:54:39 2007 + Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:00:59 2007 -0400 [PATCH] zd1211rw: More device IDs ASUS A9Rp Tested by Serge zd1211b chip 0b05:171b v4802 high 00-17-31 AL2230_RF pa0 g-- ZyXEL G-202 Tested by Marcus D. Hanwell zd1211b chip 0586:3410 v4810 high 00-13-49 AL2230_RF pa0 g--- US Robotics USR805423 Tested by Pascal S. de Kloe FCC ID: RAXWN4501H zd1211b chip 0baf:0121 v4810 high 00-14-c1 AL2230_RF pa0 g--N Julien Pinon reports this also comes in AL2230S form Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_usb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 30703b3..145ad61 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -62,6 +62,8 @@ static struct usb_device_id usb_ids[] = { { USB_DEVICE(0x0471, 0x1236), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x13b1, 0x0024), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0586, 0x340f), .driver_info = DEVICE_ZD1211B }, + { USB_DEVICE(0x0b05, 0x171b), .driver_info = DEVICE_ZD1211B }, + { USB_DEVICE(0x0586, 0x3410), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0baf, 0x0121), .driver_info = DEVICE_ZD1211B }, /* Driverless devices that need ejecting */ { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, - 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
[PATCH] airo: Don't check for NULL before kfree()
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd48f8d3a3e147e666d838194d5f9de64403ecb1 Commit: fd48f8d3a3e147e666d838194d5f9de64403ecb1 Parent: aa93c85d09295dcb269fc1a0690d9ddfb58f46cc Author: Michal Schmidt [EMAIL PROTECTED] AuthorDate: Fri Mar 16 12:40:00 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:00 2007 -0400 [PATCH] airo: Don't check for NULL before kfree() It's unnecessary to check for NULL before calling kfree(). Signed-off-by: Michal Schmidt [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/airo.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 7fe0a61..d08d227 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -2740,8 +2740,6 @@ static int airo_networks_allocate(struct airo_info *ai) static void airo_networks_free(struct airo_info *ai) { - if (!ai-networks) - return; kfree(ai-networks); ai-networks = NULL; } - 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
[PATCH] bcm43xx:Eliminate some 'G Mode Enable' magic numbers
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa93c85d09295dcb269fc1a0690d9ddfb58f46cc Commit: aa93c85d09295dcb269fc1a0690d9ddfb58f46cc Parent: aec91028db71cae7efa1101cf2e38c407096f023 Author: Larry Finger [EMAIL PROTECTED] AuthorDate: Wed Mar 14 15:06:22 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:00:59 2007 -0400 [PATCH] bcm43xx:Eliminate some 'G Mode Enable' magic numbers In code manipulating the TM State Low register of 802.11 cores, two different magic numbers are used to reference the 'G Mode Enable' bit. One of these, 0x2000, is clear, but the other, (0x800 18), is not. This patch replaces both types with a defined constant. In addition, two bits in the TM State High registers are given definitions to help in following the code. Signed-off-by: Larry Finger [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/bcm43xx/bcm43xx.h |3 +++ drivers/net/wireless/bcm43xx/bcm43xx_main.c |4 ++-- drivers/net/wireless/bcm43xx/bcm43xx_phy.c |8 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h index 95ff175..f8483c1 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h @@ -277,11 +277,14 @@ #define BCM43xx_SBTMSTATELOW_REJECT0x02 #define BCM43xx_SBTMSTATELOW_CLOCK 0x1 #define BCM43xx_SBTMSTATELOW_FORCE_GATE_CLOCK 0x2 +#define BCM43xx_SBTMSTATELOW_G_MODE_ENABLE 0x2000 /* sbtmstatehigh state flags */ #define BCM43xx_SBTMSTATEHIGH_SERROR 0x0001 #define BCM43xx_SBTMSTATEHIGH_BUSY 0x0004 #define BCM43xx_SBTMSTATEHIGH_TIMEOUT 0x0020 +#define BCM43xx_SBTMSTATEHIGH_G_PHY_AVAIL 0x0001 +#define BCM43xx_SBTMSTATEHIGH_A_PHY_AVAIL 0x0002 #define BCM43xx_SBTMSTATEHIGH_COREFLAGS0x1FFF #define BCM43xx_SBTMSTATEHIGH_DMA64BIT 0x1000 #define BCM43xx_SBTMSTATEHIGH_GATEDCLK 0x2000 diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index a38e7ee..5e96bca 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -1407,7 +1407,7 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy) ~(BCM43xx_SBF_MAC_ENABLED | 0x0002)); } else { if (connect_phy) - flags |= 0x2000; + flags |= BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; bcm43xx_phy_connect(bcm, connect_phy); bcm43xx_core_enable(bcm, flags); bcm43xx_write16(bcm, 0x03E6, 0x); @@ -3604,7 +3604,7 @@ int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm, u32 sbtmstatelow; sbtmstatelow = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); - sbtmstatelow |= 0x2000; + sbtmstatelow |= BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, sbtmstatelow); } err = wireless_core_up(bcm, 1); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index 72529a4..c47e19a 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c @@ -168,16 +168,16 @@ int bcm43xx_phy_connect(struct bcm43xx_private *bcm, int connect) flags = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH); if (connect) { - if (!(flags 0x0001)) + if (!(flags BCM43xx_SBTMSTATEHIGH_G_PHY_AVAIL)) return -ENODEV; flags = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); - flags |= (0x800 18); + flags |= BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, flags); } else { - if (!(flags 0x0002)) + if (!(flags BCM43xx_SBTMSTATEHIGH_A_PHY_AVAIL)) return -ENODEV; flags = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); - flags = ~(0x800 18); + flags = ~BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, flags); } out: - 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
[PATCH] sparse-annotate radiotap header
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a0d69f229fedea3f2b510ee8ece985c974860d41 Commit: a0d69f229fedea3f2b510ee8ece985c974860d41 Parent: d2f11e0991e3794f11d851b7ee0d98e064b10333 Author: Pavel Roskin [EMAIL PROTECTED] AuthorDate: Sat Mar 10 22:54:22 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:00 2007 -0400 [PATCH] sparse-annotate radiotap header Document that all fields must be little endian. Use annotated types even in the comments. Consistently use shorter type names (u8, s8). Realign the comments. Signed-off-by: Pavel Roskin [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- include/net/ieee80211_radiotap.h | 57 +++-- 1 files changed, 29 insertions(+), 28 deletions(-) diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index c6e0d81..f3bc00e 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h @@ -66,7 +66,9 @@ */ #define IEEE80211_RADIOTAP_HDRLEN 64 -/* The radio capture header precedes the 802.11 header. */ +/* The radio capture header precedes the 802.11 header. + * All data in the header is little endian on all platforms. + */ struct ieee80211_radiotap_header { u8 it_version; /* Version 0. Only increases * for drastic changes, @@ -74,12 +76,12 @@ struct ieee80211_radiotap_header { * new fields does not count. */ u8 it_pad; - u16 it_len; /* length of the whole + __le16 it_len; /* length of the whole * header in bytes, including * it_version, it_pad, * it_len, and data fields. */ - u32 it_present; /* A bitmap telling which + __le32 it_present; /* A bitmap telling which * fields are present. Set bit 31 * (0x8000) to extend the * bitmap by another 32 bits. @@ -88,104 +90,103 @@ struct ieee80211_radiotap_header { */ }; -/* Name Data type Units - * - - +/* Name Data typeUnits + * -- * - * IEEE80211_RADIOTAP_TSFT u64 microseconds + * IEEE80211_RADIOTAP_TSFT __le64 microseconds * * Value in microseconds of the MAC's 64-bit 802.11 Time * Synchronization Function timer when the first bit of the * MPDU arrived at the MAC. For received frames, only. * - * IEEE80211_RADIOTAP_CHANNEL 2 x u16 MHz, bitmap + * IEEE80211_RADIOTAP_CHANNEL 2 x __le16 MHz, bitmap * * Tx/Rx frequency in MHz, followed by flags (see below). * - * IEEE80211_RADIOTAP_FHSS u16 see below + * IEEE80211_RADIOTAP_FHSS __le16 see below * * For frequency-hopping radios, the hop set (first byte) * and pattern (second byte). * - * IEEE80211_RADIOTAP_RATE u8500kb/s + * IEEE80211_RADIOTAP_RATE u8 500kb/s * * Tx/Rx data rate * - * IEEE80211_RADIOTAP_DBM_ANTSIGNAL int8_t decibels from - * one milliwatt (dBm) + * IEEE80211_RADIOTAP_DBM_ANTSIGNAL s8 decibels from + * one milliwatt (dBm) * * RF signal power at the antenna, decibel difference from * one milliwatt. * - * IEEE80211_RADIOTAP_DBM_ANTNOISE int8_t decibels from - * one milliwatt (dBm) + * IEEE80211_RADIOTAP_DBM_ANTNOISE s8 decibels from + * one milliwatt (dBm) * * RF noise power at the antenna, decibel difference from one * milliwatt. * - * IEEE80211_RADIOTAP_DB_ANTSIGNAL u8decibel (dB) + * IEEE80211_RADIOTAP_DB_ANTSIGNAL u8 decibel (dB) * * RF signal power at the antenna, decibel difference from an * arbitrary, fixed reference. * - * IEEE80211_RADIOTAP_DB_ANTNOISE u8decibel (dB) + * IEEE80211_RADIOTAP_DB_ANTNOISE u8 decibel (dB) * * RF noise power at the antenna, decibel difference from an * arbitrary, fixed reference point. * - * IEEE80211_RADIOTAP_LOCK_QUALITY u16 unitless + * IEEE80211_RADIOTAP_LOCK_QUALITY __le16 unitless * * Quality of Barker code lock. Unitless. Monotonically *
skge: ignore unused error interrupts
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e0038a414c38085dfbf352f21006bcca4cd308b Commit: 7e0038a414c38085dfbf352f21006bcca4cd308b Parent: a0d69f229fedea3f2b510ee8ece985c974860d41 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Fri Mar 16 14:01:29 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:00 2007 -0400 skge: ignore unused error interrupts The following hardware error bits only show up on Genesis chipset and are handled elsewhere, so they can be masked off. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/skge.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/skge.h b/drivers/net/skge.h index 86467ae..3b16597 100644 --- a/drivers/net/skge.h +++ b/drivers/net/skge.h @@ -232,7 +232,6 @@ enum { IS_R2_PAR_ERR = 10, /* Queue R2 Parity Error */ IS_ERR_MSK = IS_IRQ_MST_ERR | IS_IRQ_STAT - | IS_NO_STAT_M1 | IS_NO_STAT_M2 | IS_RAM_RD_PAR | IS_RAM_WR_PAR | IS_M1_PAR_ERR | IS_M2_PAR_ERR | IS_R1_PAR_ERR | IS_R2_PAR_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
S2io: Remove unused variables
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0c61ed5fe2c36b502a716a2ea3dd24e846029287 Commit: 0c61ed5fe2c36b502a716a2ea3dd24e846029287 Parent: 1e2b980fdfb6189baa779ba7de93f7dba70aa3fd Author: Ramkrishna Vepa [EMAIL PROTECTED] AuthorDate: Fri Mar 9 18:28:32 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 S2io: Remove unused variables - Remove unused variables from s2io_nic structure - Changed the memory failure printk messages to print only in debug mode - Updated the copyright messages (Resending; due to patch being corrupted) Signed-off-by: Santosh Rastapur [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/s2io-regs.h |2 +- drivers/net/s2io.c | 55 +++ drivers/net/s2io.h |8 +-- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h index 33fb7f3..4cb710b 100644 --- a/drivers/net/s2io-regs.h +++ b/drivers/net/s2io-regs.h @@ -1,6 +1,6 @@ / * regs.h: A Linux PCI-X Ethernet driver for Neterion 10GbE Server NIC - * Copyright(c) 2002-2005 Neterion Inc. + * Copyright(c) 2002-2007 Neterion Inc. * This software may be used and distributed according to the terms of * the GNU General Public License (GPL), incorporated herein by reference. diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 049060c..983f383 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -1,6 +1,6 @@ / * s2io.c: A Linux PCI-X Ethernet driver for Neterion 10GbE Server NIC - * Copyright(c) 2002-2005 Neterion Inc. + * Copyright(c) 2002-2007 Neterion Inc. * This software may be used and distributed according to the terms of * the GNU General Public License (GPL), incorporated herein by reference. @@ -516,7 +516,7 @@ static int init_shared_mem(struct s2io_nic *nic) mac_control-fifos[i].list_info = kmalloc(list_holder_size, GFP_KERNEL); if (!mac_control-fifos[i].list_info) { - DBG_PRINT(ERR_DBG, + DBG_PRINT(INFO_DBG, Malloc failed for list_info\n); return -ENOMEM; } @@ -542,9 +542,9 @@ static int init_shared_mem(struct s2io_nic *nic) tmp_v = pci_alloc_consistent(nic-pdev, PAGE_SIZE, tmp_p); if (!tmp_v) { - DBG_PRINT(ERR_DBG, + DBG_PRINT(INFO_DBG, pci_alloc_consistent ); - DBG_PRINT(ERR_DBG, failed for TxDL\n); + DBG_PRINT(INFO_DBG, failed for TxDL\n); return -ENOMEM; } /* If we got a zero DMA address(can happen on @@ -561,9 +561,9 @@ static int init_shared_mem(struct s2io_nic *nic) tmp_v = pci_alloc_consistent(nic-pdev, PAGE_SIZE, tmp_p); if (!tmp_v) { - DBG_PRINT(ERR_DBG, + DBG_PRINT(INFO_DBG, pci_alloc_consistent ); - DBG_PRINT(ERR_DBG, failed for TxDL\n); + DBG_PRINT(INFO_DBG, failed for TxDL\n); return -ENOMEM; } } @@ -2187,7 +2187,7 @@ static int fill_rxd_3buf(struct s2io_nic *nic, struct RxD_t *rxdp, struct \ /* skb_shinfo(skb)-frag_list will have L4 data payload */ skb_shinfo(skb)-frag_list = dev_alloc_skb(dev-mtu + ALIGN_SIZE); if (skb_shinfo(skb)-frag_list == NULL) { - DBG_PRINT(ERR_DBG, %s: dev_alloc_skb failed\n , dev-name); + DBG_PRINT(INFO_DBG, %s: dev_alloc_skb failed\n , dev-name); return -ENOMEM ; } frag_list = skb_shinfo(skb)-frag_list; @@ -2314,8 +2314,8 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) /* allocate skb */ skb = dev_alloc_skb(size); if(!skb) { - DBG_PRINT(ERR_DBG, %s: Out of , dev-name); - DBG_PRINT(ERR_DBG, memory to allocate SKBs\n); + DBG_PRINT(INFO_DBG, %s: Out of , dev-name); + DBG_PRINT(INFO_DBG, memory to allocate SKBs\n); if
[PATCH] Update my email address from [EMAIL PROTECTED] to [EMAIL PROTECTED]
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85d32e7b0ea53a11d2a4018d8ad2605052778df7 Commit: 85d32e7b0ea53a11d2a4018d8ad2605052778df7 Parent: e542aa6bd50ba163253e60ba8e7e51c0d56162a7 Author: Jouni Malinen [EMAIL PROTECTED] AuthorDate: Sat Mar 24 17:15:30 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 [PATCH] Update my email address from [EMAIL PROTECTED] to [EMAIL PROTECTED] After 13 years of use, it looks like my email address is finally going to disappear. While this is likely to drop the amount of incoming spam greatly ;-), it may also affect more appropriate messages, so let's update my email address in various places. In addition, Host AP mailing list is subscribers-only and linux-wireless can also be used for discussing issues related to this driver which is now shown in MAINTAINERS. Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- MAINTAINERS |4 ++-- crypto/michael_mic.c |4 ++-- drivers/net/wireless/hostap/hostap_ap.c |4 ++-- drivers/net/wireless/hostap/hostap_cs.c |2 +- drivers/net/wireless/hostap/hostap_hw.c |4 ++-- drivers/net/wireless/hostap/hostap_main.c |4 ++-- drivers/net/wireless/hostap/hostap_pci.c |2 +- drivers/net/wireless/hostap/hostap_plx.c |2 +- drivers/net/wireless/ipw2100.c|4 ++-- include/linux/wireless.h |2 +- include/net/ieee80211.h |4 ++-- include/net/ieee80211_crypt.h |4 ++-- net/ieee80211/ieee80211_crypt.c |2 +- net/ieee80211/ieee80211_crypt_ccmp.c |2 +- net/ieee80211/ieee80211_crypt_tkip.c |2 +- net/ieee80211/ieee80211_crypt_wep.c |2 +- net/ieee80211/ieee80211_module.c |4 ++-- net/ieee80211/ieee80211_rx.c |4 ++-- net/ieee80211/ieee80211_wx.c |4 ++-- 19 files changed, 30 insertions(+), 30 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index ddabead..8c49132 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1582,9 +1582,9 @@ S:Supported HOST AP DRIVER P: Jouni Malinen -M: [EMAIL PROTECTED] +M: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] (subscribers-only) L: [EMAIL PROTECTED] -L: [EMAIL PROTECTED] W: http://hostap.epitest.fi/ S: Maintained diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c index 094397b..9e917b8 100644 --- a/crypto/michael_mic.c +++ b/crypto/michael_mic.c @@ -3,7 +3,7 @@ * * Michael MIC (IEEE 802.11i/TKIP) keyed digest * - * Copyright (c) 2004 Jouni Malinen [EMAIL PROTECTED] + * Copyright (c) 2004 Jouni Malinen [EMAIL PROTECTED] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -173,4 +173,4 @@ module_exit(michael_mic_exit); MODULE_LICENSE(GPL v2); MODULE_DESCRIPTION(Michael MIC); -MODULE_AUTHOR(Jouni Malinen [EMAIL PROTECTED]); +MODULE_AUTHOR(Jouni Malinen [EMAIL PROTECTED]); diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 4ca8a27..5b3abd5 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c @@ -1,8 +1,8 @@ /* * Intersil Prism2 driver with Host AP (software access point) support * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen - * [EMAIL PROTECTED] - * Copyright (c) 2002-2005, Jouni Malinen [EMAIL PROTECTED] + * [EMAIL PROTECTED] + * Copyright (c) 2002-2005, Jouni Malinen [EMAIL PROTECTED] * * This file is to be included into hostap.c when S/W AP functionality is * compiled. diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 534da85..4b81c7d 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -22,7 +22,7 @@ #include hostap_wlan.h -static char *version = PRISM2_VERSION (Jouni Malinen [EMAIL PROTECTED]); +static char *version = PRISM2_VERSION (Jouni Malinen [EMAIL PROTECTED]); static dev_info_t dev_info = hostap_cs; MODULE_AUTHOR(Jouni Malinen); diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index fb01fb9..959887b 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c @@ -3,8 +3,8 @@ * Intersil Prism2/2.5/3. * * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen - * [EMAIL PROTECTED] - * Copyright (c) 2002-2005, Jouni Malinen [EMAIL PROTECTED] + * [EMAIL PROTECTED] + * Copyright (c) 2002-2005, Jouni Malinen [EMAIL PROTECTED] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public
[PATCH] zd1211rw: Mark some data const
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2d7c052106ebee75952da4dd547f40a1673d9e0 Commit: d2d7c052106ebee75952da4dd547f40a1673d9e0 Parent: 85d32e7b0ea53a11d2a4018d8ad2605052778df7 Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Mon Mar 26 00:59:18 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 [PATCH] zd1211rw: Mark some data const This is a backport of Helge Deller's recent patch for wireless-dev.git Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_rf.c |2 +- drivers/net/wireless/zd1211rw/zd_rf_al7230b.c |4 ++-- drivers/net/wireless/zd1211rw/zd_rf_rf2959.c |4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_rf.c b/drivers/net/wireless/zd1211rw/zd_rf.c index e6d604b..4ddc2cb 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.c +++ b/drivers/net/wireless/zd1211rw/zd_rf.c @@ -23,7 +23,7 @@ #include zd_ieee80211.h #include zd_chip.h -static const char *rfs[] = { +static const char * const rfs[] = { [0] = unknown RF0, [1] = unknown RF1, [UW2451_RF] = UW2451_RF, diff --git a/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c b/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c index a289f95..bd07c9b 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c @@ -183,12 +183,12 @@ static int al7230b_set_channel(struct zd_rf *rf, u8 channel) const u32 *rv = chan_rv[channel-1]; struct zd_chip *chip = zd_rf_to_chip(rf); - struct zd_ioreq16 ioreqs_1[] = { + static const struct zd_ioreq16 ioreqs_1[] = { { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, { CR38, 0x38 }, { CR136, 0xdf }, }; - struct zd_ioreq16 ioreqs_2[] = { + static const struct zd_ioreq16 ioreqs_2[] = { /* PLL_ON */ { CR251, 0x3f }, { CR203, 0x06 }, { CR240, 0x08 }, diff --git a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c index 5824727..2d736bd 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c @@ -21,7 +21,7 @@ #include zd_usb.h #include zd_chip.h -static u32 rf2959_table[][2] = { +static const u32 rf2959_table[][2] = { RF_CHANNEL( 1) = { 0x181979, 0x1e }, RF_CHANNEL( 2) = { 0x181989, 0x1e }, RF_CHANNEL( 3) = { 0x181999, 0x1e }, @@ -228,7 +228,7 @@ static int rf2959_init_hw(struct zd_rf *rf) static int rf2959_set_channel(struct zd_rf *rf, u8 channel) { int i, r; - u32 *rv = rf2959_table[channel-1]; + const u32 *rv = rf2959_table[channel-1]; struct zd_chip *chip = zd_rf_to_chip(rf); for (i = 0; i 2; i++) { - 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
[PATCH] zd1211rw: Don't handle broken frames in monitor mode
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=44713b1da5a78d722dc0c03a87dc9ddf46668f80 Commit: 44713b1da5a78d722dc0c03a87dc9ddf46668f80 Parent: d2d7c052106ebee75952da4dd547f40a1673d9e0 Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Mon Mar 26 00:59:47 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 [PATCH] zd1211rw: Don't handle broken frames in monitor mode Using monitor mode, Johannes Berg observed out that lots of corrupted and otherwise invalid frames were being passed to the host. When in monitor mode we were disabling the hardware filtering here, but this is not how monitor mode should work. Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_mac.c | 13 ++--- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 19172f5..6753d24 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c @@ -156,17 +156,8 @@ void zd_mac_clear(struct zd_mac *mac) static int reset_mode(struct zd_mac *mac) { struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); - struct zd_ioreq32 ioreqs[] = { - { CR_RX_FILTER, STA_RX_FILTER }, - { CR_SNIFFER_ON, 0U }, - }; - - if (ieee-iw_mode == IW_MODE_MONITOR) { - ioreqs[0].value = 0x; - ioreqs[1].value = 0x1; - } - - return zd_iowrite32a(mac-chip, ioreqs, ARRAY_SIZE(ioreqs)); + u32 filter = (ieee-iw_mode == IW_MODE_MONITOR) ? ~0 : STA_RX_FILTER; + return zd_iowrite32(mac-chip, CR_RX_FILTER, filter); } int zd_mac_open(struct net_device *netdev) - 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
remove unused header file: drivers/net/skfp/h/lnkstat.h
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f930e46a85a61895ef5c7c56c66c28272bec1ae1 Commit: f930e46a85a61895ef5c7c56c66c28272bec1ae1 Parent: 939456ac51dd0b6b2b5653823b5655a790e72769 Author: Robert P. J. Day [EMAIL PROTECTED] AuthorDate: Mon Mar 26 21:47:24 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 remove unused header file: drivers/net/skfp/h/lnkstat.h Signed-off-by: Robert P. J. Day [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/skfp/h/lnkstat.h | 84 -- 1 files changed, 0 insertions(+), 84 deletions(-) diff --git a/drivers/net/skfp/h/lnkstat.h b/drivers/net/skfp/h/lnkstat.h deleted file mode 100644 index c73dcd9..000 --- a/drivers/net/skfp/h/lnkstat.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider Koch Co. Datensysteme GmbH. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * The information in this file is provided AS IS without warranty. - * - **/ - -/* - * Definition of the Error Log Structure - * This structure will be copied into the Error Log buffer - * during the NDIS General Request ReadErrorLog by the MAC Driver - */ - -struct s_error_log { - - /* -* place holder for token ring adapter error log (zeros) -*/ - u_char reserved_0 ;/* byte 0 inside Error Log */ - u_char reserved_1 ;/* byte 1 */ - u_char reserved_2 ;/* byte 2 */ - u_char reserved_3 ;/* byte 3 */ - u_char reserved_4 ;/* byte 4 */ - u_char reserved_5 ;/* byte 5 */ - u_char reserved_6 ;/* byte 6 */ - u_char reserved_7 ;/* byte 7 */ - u_char reserved_8 ;/* byte 8 */ - u_char reserved_9 ;/* byte 9 */ - u_char reserved_10 ; /* byte 10 */ - u_char reserved_11 ; /* byte 11 */ - u_char reserved_12 ; /* byte 12 */ - u_char reserved_13 ; /* byte 13 */ - - /* -* FDDI link statistics -*/ -/* - * smt error low - */ -#define SMT_ERL_AEB(115) /* A elast. buffer */ -#define SMT_ERL_BLC(114) /* B link error condition */ -#define SMT_ERL_ALC(113) /* A link error condition */ -#define SMT_ERL_NCC(112) /* not copied condition */ -#define SMT_ERL_FEC(111) /* frame error condition */ - -/* - * smt event low - */ -#define SMT_EVL_NCE(15) - - u_short smt_error_low ; /* byte 14/15 */ - u_short smt_error_high ;/* byte 16/17 */ - u_short smt_event_low ; /* byte 18/19 */ - u_short smt_event_high ;/* byte 20/21 */ - u_short connection_policy_violation ; /* byte 22/23 */ - u_short port_event ;/* byte 24/25 */ - u_short set_count_low ; /* byte 26/27 */ - u_short set_count_high ;/* byte 28/29 */ - u_short aci_id_code ; /* byte 30/31 */ - u_short purge_frame_counter ; /* byte 32/33 */ - - /* -* CMT and RMT state machines -*/ - u_short ecm_state ; /* byte 34/35 */ - u_short pcm_a_state ; /* byte 36/37 */ - u_short pcm_b_state ; /* byte 38/39 */ - u_short cfm_state ; /* byte 40/41 */ - u_short rmt_state ; /* byte 42/43 */ - - u_short not_used[30] ; /* byte 44-103 */ - - u_short ucode_version_level ; /* byte 104/105 */ - - u_short not_used_1 ;/* byte 106/107 */ - u_short not_used_2 ;/* byte 108/109 */ -} ; - 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
qla3xxx: Add ethtool get_pauseparam for improved bonding support.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec8263839aa8bc6608a045e8f51738d7e436 Commit: ec8263839aa8bc6608a045e8f51738d7e436 Parent: f930e46a85a61895ef5c7c56c66c28272bec1ae1 Author: Ron Mercer [EMAIL PROTECTED] AuthorDate: Mon Mar 26 13:43:01 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 qla3xxx: Add ethtool get_pauseparam for improved bonding support. Signed-off-by: Ron Mercer [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/qla3xxx.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 04ea44a..c2eb2c9 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -1624,6 +1624,23 @@ static void ql_set_msglevel(struct net_device *ndev, u32 value) qdev-msg_enable = value; } +static void ql_get_pauseparam(struct net_device *ndev, + struct ethtool_pauseparam *pause) +{ + struct ql3_adapter *qdev = netdev_priv(ndev); + struct ql3xxx_port_registers __iomem *port_regs = qdev-mem_map_registers; + + u32 reg; + if(qdev-mac_index == 0) + reg = ql_read_page0_reg(qdev, port_regs-mac0ConfigReg); + else + reg = ql_read_page0_reg(qdev, port_regs-mac1ConfigReg); + + pause-autoneg = ql_get_auto_cfg_status(qdev); + pause-rx_pause = (reg MAC_CONFIG_REG_RF) 2; + pause-tx_pause = (reg MAC_CONFIG_REG_TF) 1; +} + static const struct ethtool_ops ql3xxx_ethtool_ops = { .get_settings = ql_get_settings, .get_drvinfo = ql_get_drvinfo, @@ -1631,6 +1648,7 @@ static const struct ethtool_ops ql3xxx_ethtool_ops = { .get_link = ethtool_op_get_link, .get_msglevel = ql_get_msglevel, .set_msglevel = ql_set_msglevel, + .get_pauseparam = ql_get_pauseparam, }; static int ql_populate_free_queue(struct ql3_adapter *qdev) - 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
baycom_ser_fdx: also allow i/o ports = 0x1000 and enhanced failure logging
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=939456ac51dd0b6b2b5653823b5655a790e72769 Commit: 939456ac51dd0b6b2b5653823b5655a790e72769 Parent: 4eb36223be5271b550a9ba4722a1e72c9312 Author: Folkert van Heusden [EMAIL PROTECTED] AuthorDate: Mon Mar 26 21:47:23 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 baycom_ser_fdx: also allow i/o ports = 0x1000 and enhanced failure logging The baycom_ser_fdx driver did not allow i/o ports = 0x1000. Now that there are pci cards (with rs232 ports) which use for example 0xb800 this limit should not exists. Also, for non kernel coders find the cause of problems was challenging so I added extra logging. Signed-off-by: Folkert van Heusden [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Cc: Alan Cox [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/hamradio/baycom_ser_fdx.c | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c index 30baf6e..17ac697 100644 --- a/drivers/net/hamradio/baycom_ser_fdx.c +++ b/drivers/net/hamradio/baycom_ser_fdx.c @@ -415,11 +415,18 @@ static int ser12_open(struct net_device *dev) if (!dev || !bc) return -ENXIO; - if (!dev-base_addr || dev-base_addr 0x1000-SER12_EXTENT || - dev-irq 2 || dev-irq 15) + if (!dev-base_addr || dev-base_addr 0x-SER12_EXTENT || + dev-irq 2 || dev-irq NR_IRQS) { + printk(KERN_INFO baycom_ser_fdx: invalid portnumber (max %u) + or irq (2 = irq = %d)\n, + 0x-SER12_EXTENT, NR_IRQS); return -ENXIO; - if (bc-baud 300 || bc-baud 4800) + } + if (bc-baud 300 || bc-baud 4800) { + printk(KERN_INFO baycom_ser_fdx: invalid baudrate + (300...4800)\n); return -EINVAL; + } if (!request_region(dev-base_addr, SER12_EXTENT, baycom_ser_fdx)) { printk(KERN_WARNING BAYCOM_SER_FSX: I/O port 0x%04lx busy \n, dev-base_addr); - 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
mv643xx_eth: make eth_port_uc_addr_{get,set}() calls symmetric
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=144213d71ce8b2a1e0740dd25808143e9ace655a Commit: 144213d71ce8b2a1e0740dd25808143e9ace655a Parent: 201f27e625cb2fe150e92d81d9725fe28c279792 Author: Gabriel Paubert [EMAIL PROTECTED] AuthorDate: Fri Mar 23 12:07:26 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 mv643xx_eth: make eth_port_uc_addr_{get,set}() calls symmetric There is no good reason for the asymmetry in the parameters of eth_port_uc_addr_get() and eth_port_uc_addr_set(). Make them symmetric. Remove some gratuitous block comments while we're here. Signed-off-by: Gabriel Paubert [EMAIL PROTECTED] Signed-off-by: Dale Farnsworth [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/mv643xx_eth.c | 59 ++--- drivers/net/mv643xx_eth.h |4 --- 2 files changed, 13 insertions(+), 50 deletions(-) diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index ab15ecd..1799eee 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -51,8 +51,8 @@ #include mv643xx_eth.h /* Static function declarations */ -static void eth_port_uc_addr_get(struct net_device *dev, - unsigned char *MacAddr); +static void eth_port_uc_addr_get(unsigned int port_num, unsigned char *p_addr); +static void eth_port_uc_addr_set(unsigned int port_num, unsigned char *p_addr); static void eth_port_set_multicast_list(struct net_device *); static void mv643xx_eth_port_enable_tx(unsigned int port_num, unsigned int queues); @@ -1381,7 +1381,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) port_num = mp-port_num = pd-port_number; /* set default config values */ - eth_port_uc_addr_get(dev, dev-dev_addr); + eth_port_uc_addr_get(port_num, dev-dev_addr); mp-rx_ring_size = MV643XX_ETH_PORT_DEFAULT_RECEIVE_QUEUE_SIZE; mp-tx_ring_size = MV643XX_ETH_PORT_DEFAULT_TRANSMIT_QUEUE_SIZE; @@ -1839,26 +1839,9 @@ static void eth_port_start(struct net_device *dev) } /* - * eth_port_uc_addr_set - This function Set the port Unicast address. - * - * DESCRIPTION: - * This function Set the port Ethernet MAC address. - * - * INPUT: - * unsigned inteth_port_numPort number. - * char * p_addr Address to be set - * - * OUTPUT: - * Set MAC address low and high registers. also calls - * eth_port_set_filter_table_entry() to set the unicast - * table with the proper information. - * - * RETURN: - * N/A. - * + * eth_port_uc_addr_set - Write a MAC address into the port's hw registers */ -static void eth_port_uc_addr_set(unsigned int eth_port_num, - unsigned char *p_addr) +static void eth_port_uc_addr_set(unsigned int port_num, unsigned char *p_addr) { unsigned int mac_h; unsigned int mac_l; @@ -1868,40 +1851,24 @@ static void eth_port_uc_addr_set(unsigned int eth_port_num, mac_h = (p_addr[0] 24) | (p_addr[1] 16) | (p_addr[2] 8) | (p_addr[3] 0); - mv_write(MV643XX_ETH_MAC_ADDR_LOW(eth_port_num), mac_l); - mv_write(MV643XX_ETH_MAC_ADDR_HIGH(eth_port_num), mac_h); + mv_write(MV643XX_ETH_MAC_ADDR_LOW(port_num), mac_l); + mv_write(MV643XX_ETH_MAC_ADDR_HIGH(port_num), mac_h); - /* Accept frames of this address */ - table = MV643XX_ETH_DA_FILTER_UNICAST_TABLE_BASE(eth_port_num); + /* Accept frames with this address */ + table = MV643XX_ETH_DA_FILTER_UNICAST_TABLE_BASE(port_num); eth_port_set_filter_table_entry(table, p_addr[5] 0x0f); } /* - * eth_port_uc_addr_get - This function retrieves the port Unicast address - * (MAC address) from the ethernet hw registers. - * - * DESCRIPTION: - * This function retrieves the port Ethernet MAC address. - * - * INPUT: - * unsigned inteth_port_numPort number. - * char*MacAddrpointer where the MAC address is stored - * - * OUTPUT: - * Copy the MAC address to the location pointed to by MacAddr - * - * RETURN: - * N/A. - * + * eth_port_uc_addr_get - Read the MAC address from the port's hw registers */ -static void eth_port_uc_addr_get(struct net_device *dev, unsigned char *p_addr) +static void eth_port_uc_addr_get(unsigned int port_num, unsigned char *p_addr) { - struct mv643xx_private *mp = netdev_priv(dev); unsigned int mac_h; unsigned int mac_l; - mac_h = mv_read(MV643XX_ETH_MAC_ADDR_HIGH(mp-port_num)); - mac_l = mv_read(MV643XX_ETH_MAC_ADDR_LOW(mp-port_num)); + mac_h = mv_read(MV643XX_ETH_MAC_ADDR_HIGH(port_num)); + mac_l = mv_read(MV643XX_ETH_MAC_ADDR_LOW(port_num));
S2io: Change of driver maintainers
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ef34b807d35f81ee686e90e28084ee572a66e01 Commit: 3ef34b807d35f81ee686e90e28084ee572a66e01 Parent: d7ef45b04905468b08e36b43dbce5b1de496e682 Author: Ramkrishna Vepa [EMAIL PROTECTED] AuthorDate: Fri Mar 30 18:42:27 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 S2io: Change of driver maintainers - Changed the maintainers for the S2io driver. Signed-off-by: Ramkrishna Vepa [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- MAINTAINERS| 13 + drivers/net/s2io.c |3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8c49132..d4743b4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2512,6 +2512,19 @@ M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] (subscribers-only) S: Maintained +NETERION (S2IO) Xframe 10GbE DRIVER +P: Ramkrishna Vepa +M: [EMAIL PROTECTED] +P: Rastapur Santosh +M: [EMAIL PROTECTED] +P: Sivakumar Subramani +M: [EMAIL PROTECTED] +P: Sreenivasa Honnur +M: [EMAIL PROTECTED] +L: [EMAIL PROTECTED] +W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous +S: Supported + OPENCORES I2C BUS DRIVER P: Peter Korsgaard M: [EMAIL PROTECTED] diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 983f383..290e1c1 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -84,7 +84,7 @@ #include s2io.h #include s2io-regs.h -#define DRV_VERSION 2.0.19.1 +#define DRV_VERSION 2.0.22.1 /* S2io Driver name version. */ static char s2io_driver_name[] = Neterion; @@ -394,7 +394,6 @@ static const u64 fix_mac[] = { END_SIGN }; -MODULE_AUTHOR(Raghavendra Koushik [EMAIL PROTECTED]); MODULE_LICENSE(GPL); MODULE_VERSION(DRV_VERSION); - 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: code cleanup
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e542aa6bd50ba163253e60ba8e7e51c0d56162a7 Commit: e542aa6bd50ba163253e60ba8e7e51c0d56162a7 Parent: 1eef4e04c95fb52a1a3885c8f53a822206fc9aa5 Author: Jan-Bernd Themann [EMAIL PROTECTED] AuthorDate: Thu Mar 22 17:50:24 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 ehea: code cleanup This patch includes: - code cleanup related to resource management - extended error data gathering for resource management - removing trailing whitespaces Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/ehea/ehea.h |3 +- drivers/net/ehea/ehea_main.c | 95 - drivers/net/ehea/ehea_phyp.c |6 +- drivers/net/ehea/ehea_phyp.h |6 +- drivers/net/ehea/ehea_qmr.c | 184 ++--- drivers/net/ehea/ehea_qmr.h |7 ++- 6 files changed, 187 insertions(+), 114 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 1fefb2d..f889933 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -39,7 +39,7 @@ #include asm/io.h #define DRV_NAME ehea -#define DRV_VERSIONEHEA_0053 +#define DRV_VERSIONEHEA_0054 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) @@ -309,6 +309,7 @@ struct ehea_cq { * Memory Region */ struct ehea_mr { + struct ehea_adapter *adapter; u64 handle; u64 vaddr; u32 lkey; diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index db0d79e..8bceb4e 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -546,19 +546,19 @@ static int ehea_poll(struct net_device *dev, int *budget) cqe = ehea_poll_rq1(pr-qp, wqe_index); cqe_skb = ehea_poll_cq(pr-send_cq); - if (!cqe !cqe_skb) + if (!cqe !cqe_skb) return 0; - if (!netif_rx_reschedule(dev, dev-quota)) + if (!netif_rx_reschedule(dev, dev-quota)) return 0; } - + cqe = ehea_proc_rwqes(dev, pr, budget); cqe_skb = ehea_proc_cqes(pr, 300); if (cqe || cqe_skb) pr-poll_counter++; - + return 1; } @@ -1011,7 +1011,7 @@ static int ehea_configure_port(struct ehea_port *port) else cb0-default_qpn_arr[i] = port-port_res[0].qp-init_attr.qp_nr; - + if (netif_msg_ifup(port)) ehea_dump(cb0, sizeof(*cb0), ehea_configure_port); @@ -1033,52 +1033,35 @@ out: return ret; } -static int ehea_gen_smrs(struct ehea_port_res *pr) +int ehea_gen_smrs(struct ehea_port_res *pr) { - u64 hret; + int ret; struct ehea_adapter *adapter = pr-port-adapter; - hret = ehea_h_register_smr(adapter-handle, adapter-mr.handle, - adapter-mr.vaddr, EHEA_MR_ACC_CTRL, - adapter-pd, pr-send_mr); - if (hret != H_SUCCESS) + ret = ehea_gen_smr(adapter, adapter-mr, pr-send_mr); + if (ret) goto out; - hret = ehea_h_register_smr(adapter-handle, adapter-mr.handle, - adapter-mr.vaddr, EHEA_MR_ACC_CTRL, - adapter-pd, pr-recv_mr); - if (hret != H_SUCCESS) - goto out_freeres; + ret = ehea_gen_smr(adapter, adapter-mr, pr-recv_mr); + if (ret) + goto out_free; return 0; -out_freeres: - hret = ehea_h_free_resource(adapter-handle, pr-send_mr.handle); - if (hret != H_SUCCESS) - ehea_error(failed freeing SMR); +out_free: + ehea_rem_mr(pr-send_mr); out: + ehea_error(Generating SMRS failed\n); return -EIO; } -static int ehea_rem_smrs(struct ehea_port_res *pr) +int ehea_rem_smrs(struct ehea_port_res *pr) { - struct ehea_adapter *adapter = pr-port-adapter; - int ret = 0; - u64 hret; - - hret = ehea_h_free_resource(adapter-handle, pr-send_mr.handle); - if (hret != H_SUCCESS) { - ret = -EIO; - ehea_error(failed freeing send SMR for pr=%p, pr); - } - - hret = ehea_h_free_resource(adapter-handle, pr-recv_mr.handle); - if (hret != H_SUCCESS) { - ret = -EIO; - ehea_error(failed freeing recv SMR for pr=%p, pr); - } - - return ret; + if ((ehea_rem_mr(pr-send_mr)) + || (ehea_rem_mr(pr-recv_mr))) + return -EIO; + else + return 0; } static int ehea_init_q_skba(struct ehea_q_skb_arr *q_skba, int max_q_entries) @@ -2243,7 +2226,7 @@ static int
[PATCH] bcm43xx: Change initialization for 2050 radios
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3a5c393e6f3e9f537e790016f3214447f2b50e51 Commit: 3a5c393e6f3e9f537e790016f3214447f2b50e51 Parent: b1fc1fa9b36512e928df95aead1a85381380ad1f Author: Larry Finger [EMAIL PROTECTED] AuthorDate: Wed Mar 28 11:07:49 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 [PATCH] bcm43xx: Change initialization for 2050 radios This patch implements the changes in the specifications for 2050radio_init that were recently posted. Signed-off-by: Larry Finger [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/bcm43xx/bcm43xx_phy.c | 15 ++- drivers/net/wireless/bcm43xx/bcm43xx_phy.h |4 + drivers/net/wireless/bcm43xx/bcm43xx_radio.c | 196 ++ 3 files changed, 184 insertions(+), 31 deletions(-) diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index c47e19a..b37f1e3 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c @@ -300,16 +300,20 @@ static void bcm43xx_phy_agcsetup(struct bcm43xx_private *bcm) if (phy-rev 2) { bcm43xx_phy_write(bcm, 0x0422, 0x287A); - bcm43xx_phy_write(bcm, 0x0420, (bcm43xx_phy_read(bcm, 0x0420) 0x0FFF) | 0x3000); + bcm43xx_phy_write(bcm, 0x0420, (bcm43xx_phy_read(bcm, 0x0420) + 0x0FFF) | 0x3000); } - bcm43xx_phy_write(bcm, 0x04A8, (bcm43xx_phy_read(bcm, 0x04A8) 0x8080) | 0x7874); + bcm43xx_phy_write(bcm, 0x04A8, (bcm43xx_phy_read(bcm, 0x04A8) 0x8080) + | 0x7874); bcm43xx_phy_write(bcm, 0x048E, 0x1C00); if (phy-rev == 1) { - bcm43xx_phy_write(bcm, 0x04AB, (bcm43xx_phy_read(bcm, 0x04AB) 0xF0FF) | 0x0600); + bcm43xx_phy_write(bcm, 0x04AB, (bcm43xx_phy_read(bcm, 0x04AB) + 0xF0FF) | 0x0600); bcm43xx_phy_write(bcm, 0x048B, 0x005E); - bcm43xx_phy_write(bcm, 0x048C, (bcm43xx_phy_read(bcm, 0x048C) 0xFF00) | 0x001E); + bcm43xx_phy_write(bcm, 0x048C, (bcm43xx_phy_read(bcm, 0x048C) + 0xFF00) | 0x001E); bcm43xx_phy_write(bcm, 0x048D, 0x0002); } @@ -335,7 +339,8 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm) if (phy-rev == 1) { bcm43xx_phy_write(bcm, 0x0406, 0x4F19); bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, - (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) 0xFC3F) | 0x0340); + (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) + 0xFC3F) | 0x0340); bcm43xx_phy_write(bcm, 0x042C, 0x005A); bcm43xx_phy_write(bcm, 0x0427, 0x001A); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.h b/drivers/net/wireless/bcm43xx/bcm43xx_phy.h index 1f321ef..7311836 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.h @@ -48,6 +48,10 @@ void bcm43xx_raw_phy_unlock(struct bcm43xx_private *bcm); local_irq_restore(flags); \ } while (0) +/* Card uses the loopback gain stuff */ +#define has_loopback_gain(phy) \ +(((phy)-rev 1) || ((phy)-connected)) + u16 bcm43xx_phy_read(struct bcm43xx_private *bcm, u16 offset); void bcm43xx_phy_write(struct bcm43xx_private *bcm, u16 offset, u16 val); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c index 4025dd0..6a109f4 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c @@ -1343,11 +1343,110 @@ u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm) return ret; } +#define LPD(L, P, D)(((L) 2) | ((P) 1) | ((D) 0)) +static u16 bcm43xx_get_812_value(struct bcm43xx_private *bcm, u8 lpd) +{ + struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); + struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); + u16 loop_or = 0; + u16 adj_loopback_gain = phy-loopback_gain[0]; + u8 loop; + u16 extern_lna_control; + + if (!phy-connected) + return 0; + if (!has_loopback_gain(phy)) { + if (phy-rev 7 || !(bcm-sprom.boardflags +BCM43xx_BFL_EXTLNA)) { + switch (lpd) { + case LPD(0, 1, 1): + return 0x0FB2; + case LPD(0, 0, 1): + return 0x00B2; + case LPD(1, 0, 1): + return 0x30B2; + case LPD(1, 0, 0): +
[PATCH] Remove comment about IEEE80211_RADIOTAP_FCS
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6693228da9cc8cd6a8ede97989cf2e46b99d6934 Commit: 6693228da9cc8cd6a8ede97989cf2e46b99d6934 Parent: 3a5c393e6f3e9f537e790016f3214447f2b50e51 Author: Pavel Roskin [EMAIL PROTECTED] AuthorDate: Wed Mar 28 17:08:51 2007 -0400 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 [PATCH] Remove comment about IEEE80211_RADIOTAP_FCS IEEE80211_RADIOTAP_FCS is obsolete and should not be used. It's no longer defined. Remove it from the comment too. Signed-off-by: Pavel Roskin [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- include/net/ieee80211_radiotap.h |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index f3bc00e..a0c2b41 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h @@ -186,9 +186,6 @@ struct ieee80211_radiotap_header { * * Number of unicast retries a transmitted frame used. * - * IEEE80211_RADIOTAP_FCS __le32 data - * - * FCS from frame in network byte order. */ enum ieee80211_radiotap_type { IEEE80211_RADIOTAP_TSFT = 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
[PATCH] zd1211rw: Add another ID for Linksys WUSBF54G
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3fa3aba7a0e00aa1cbb13c9e9bed162fa057973 Commit: a3fa3aba7a0e00aa1cbb13c9e9bed162fa057973 Parent: 44713b1da5a78d722dc0c03a87dc9ddf46668f80 Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Mon Mar 26 01:00:12 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 [PATCH] zd1211rw: Add another ID for Linksys WUSBF54G Tested by TiCPU on irc zd1211 chip 13b1:001e v4802 high 00-14-bf AL2230_RF pa0 g--- Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_usb.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 145ad61..55f4c61 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -52,6 +52,7 @@ static struct usb_device_id usb_ids[] = { { USB_DEVICE(0x0b3b, 0x1630), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x0586, 0x3401), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x14ea, 0xab13), .driver_info = DEVICE_ZD1211 }, + { USB_DEVICE(0x13b1, 0x001e), .driver_info = DEVICE_ZD1211 }, /* ZD1211B */ { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, - 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
[PATCH] hostap_cs: support ADLINK 345 CF
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25ac6c2627acd68bd50307e61a3b581b2f82552e Commit: 25ac6c2627acd68bd50307e61a3b581b2f82552e Parent: 6693228da9cc8cd6a8ede97989cf2e46b99d6934 Author: Marcin Juszkiewicz [EMAIL PROTECTED] AuthorDate: Fri Mar 30 15:34:14 2007 +0200 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 [PATCH] hostap_cs: support ADLINK 345 CF Add ADLINK 345 CF card into hostap_cs product info: ADLINK 345 CF manfid 0xd601, 0x0005 Signed-off-by: Marcin Juszkiewicz [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/hostap/hostap_cs.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 4b81c7d..ee1532b 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -838,6 +838,8 @@ static struct pcmcia_device_id hostap_cs_ids[] = { PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), PCMCIA_DEVICE_MANF_CARD(0x0126, 0x0002), + PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0xd601, 0x0005, ADLINK 345 CF, +0x2d858104), PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, INTERSIL, 0x74c5e40d), PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, Intersil, - 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
[PATCH] zd1211rw: Remove invalid CR write during ZD1211 phy reset
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dc536a706951e23d3c81d0aa81414dc9f2c34ce5 Commit: dc536a706951e23d3c81d0aa81414dc9f2c34ce5 Parent: 25ac6c2627acd68bd50307e61a3b581b2f82552e Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Tue Apr 3 23:17:10 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 [PATCH] zd1211rw: Remove invalid CR write during ZD1211 phy reset The vendor driver only does the CR123 write for non-USB devices (which don't exist on the consumer market) Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_chip.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 8acaa6b..e2cfdda 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c @@ -684,17 +684,17 @@ static int zd1211_hw_reset_phy(struct zd_chip *chip) { CR111, 0x27 }, { CR112, 0x27 }, { CR113, 0x27 }, { CR114, 0x27 }, { CR115, 0x26 }, { CR116, 0x24 }, { CR117, 0xfc }, { CR118, 0xfa }, { CR120, 0x4f }, - { CR123, 0x27 }, { CR125, 0xaa }, { CR127, 0x03 }, - { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, - { CR131, 0x0C }, { CR136, 0xdf }, { CR137, 0x40 }, - { CR138, 0xa0 }, { CR139, 0xb0 }, { CR140, 0x99 }, - { CR141, 0x82 }, { CR142, 0x54 }, { CR143, 0x1c }, - { CR144, 0x6c }, { CR147, 0x07 }, { CR148, 0x4c }, - { CR149, 0x50 }, { CR150, 0x0e }, { CR151, 0x18 }, - { CR160, 0xfe }, { CR161, 0xee }, { CR162, 0xaa }, - { CR163, 0xfa }, { CR164, 0xfa }, { CR165, 0xea }, - { CR166, 0xbe }, { CR167, 0xbe }, { CR168, 0x6a }, - { CR169, 0xba }, { CR170, 0xba }, { CR171, 0xba }, + { CR125, 0xaa }, { CR127, 0x03 }, { CR128, 0x14 }, + { CR129, 0x12 }, { CR130, 0x10 }, { CR131, 0x0C }, + { CR136, 0xdf }, { CR137, 0x40 }, { CR138, 0xa0 }, + { CR139, 0xb0 }, { CR140, 0x99 }, { CR141, 0x82 }, + { CR142, 0x54 }, { CR143, 0x1c }, { CR144, 0x6c }, + { CR147, 0x07 }, { CR148, 0x4c }, { CR149, 0x50 }, + { CR150, 0x0e }, { CR151, 0x18 }, { CR160, 0xfe }, + { CR161, 0xee }, { CR162, 0xaa }, { CR163, 0xfa }, + { CR164, 0xfa }, { CR165, 0xea }, { CR166, 0xbe }, + { CR167, 0xbe }, { CR168, 0x6a }, { CR169, 0xba }, + { CR170, 0xba }, { CR171, 0xba }, /* Note: CR204 must lead the CR203 */ { CR204, 0x7d }, { }, - 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
strlcpy is smart enough
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4eb36223be5271b550a9ba4722a1e72c9312 Commit: 4eb36223be5271b550a9ba4722a1e72c9312 Parent: a3fa3aba7a0e00aa1cbb13c9e9bed162fa057973 Author: Jean Delvare [EMAIL PROTECTED] AuthorDate: Mon Mar 26 21:47:22 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 strlcpy is smart enough strlcpy already accounts for the trailing zero in its length computation, so there is no need to substract one to the buffer size. Signed-off-by: Jean Delvare [EMAIL PROTECTED] Cc: Jan-Bernd Themann [EMAIL PROTECTED] Cc: Thomas Klein [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/ehea/ehea_ethtool.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c index 9f57c2e..1995027 100644 --- a/drivers/net/ehea/ehea_ethtool.c +++ b/drivers/net/ehea/ehea_ethtool.c @@ -144,8 +144,8 @@ static int ehea_nway_reset(struct net_device *dev) static void ehea_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - strlcpy(info-driver, DRV_NAME, sizeof(info-driver) - 1); - strlcpy(info-version, DRV_VERSION, sizeof(info-version) - 1); + strlcpy(info-driver, DRV_NAME, sizeof(info-driver)); + strlcpy(info-version, DRV_VERSION, sizeof(info-version)); } static u32 ehea_get_msglevel(struct net_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
qla3xxx: Adding support for the Agere PHY (ET1011C)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3efedf2e5b814f3edd99e4f4ca47a604871ebe0e Commit: 3efedf2e5b814f3edd99e4f4ca47a604871ebe0e Parent: ec8263839aa8bc6608a045e8f51738d7e436 Author: Ron Mercer [EMAIL PROTECTED] AuthorDate: Mon Mar 26 12:43:52 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 qla3xxx: Adding support for the Agere PHY (ET1011C) This PHY support patch was written by Benjamin Li. Signed-off-by: Benjamin Li [EMAIL PROTECTED] Signed-off-by: Ron Mercer [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/qla3xxx.c | 347 +++-- drivers/net/qla3xxx.h | 33 +- 2 files changed, 335 insertions(+), 45 deletions(-) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index c2eb2c9..4061f7d 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -72,6 +72,30 @@ static struct pci_device_id ql3xxx_pci_tbl[] __devinitdata = { MODULE_DEVICE_TABLE(pci, ql3xxx_pci_tbl); /* + * These are the known PHY's which are used + */ +typedef enum { + PHY_TYPE_UNKNOWN = 0, + PHY_VITESSE_VSC8211, + PHY_AGERE_ET1011C, + MAX_PHY_DEV_TYPES +} PHY_DEVICE_et; + +typedef struct { + PHY_DEVICE_et phyDevice; + u32 phyIdOUI; + u16 phyIdModel; + char*name; +} PHY_DEVICE_INFO_t; + +const PHY_DEVICE_INFO_t PHY_DEVICES[] = + {{PHY_TYPE_UNKNOWN,0x00, 0x0, PHY_TYPE_UNKNOWN}, +{PHY_VITESSE_VSC8211, 0x0003f1, 0xb, PHY_VITESSE_VSC8211}, +{PHY_AGERE_ET1011C, 0x00a0bc, 0x1, PHY_AGERE_ET1011C}, +}; + + +/* * Caller must take hw_lock. */ static int ql_sem_spinlock(struct ql3_adapter *qdev, @@ -662,7 +686,7 @@ static u8 ql_mii_disable_scan_mode(struct ql3_adapter *qdev) } static int ql_mii_write_reg_ex(struct ql3_adapter *qdev, - u16 regAddr, u16 value, u32 mac_index) + u16 regAddr, u16 value, u32 phyAddr) { struct ql3xxx_port_registers __iomem *port_regs = qdev-mem_map_registers; @@ -680,7 +704,7 @@ static int ql_mii_write_reg_ex(struct ql3_adapter *qdev, } ql_write_page0_reg(qdev, port_regs-macMIIMgmtAddrReg, - PHYAddr[mac_index] | regAddr); + phyAddr | regAddr); ql_write_page0_reg(qdev, port_regs-macMIIMgmtDataReg, value); @@ -701,7 +725,7 @@ static int ql_mii_write_reg_ex(struct ql3_adapter *qdev, } static int ql_mii_read_reg_ex(struct ql3_adapter *qdev, u16 regAddr, - u16 * value, u32 mac_index) + u16 * value, u32 phyAddr) { struct ql3xxx_port_registers __iomem *port_regs = qdev-mem_map_registers; @@ -720,7 +744,7 @@ static int ql_mii_read_reg_ex(struct ql3_adapter *qdev, u16 regAddr, } ql_write_page0_reg(qdev, port_regs-macMIIMgmtAddrReg, - PHYAddr[mac_index] | regAddr); + phyAddr | regAddr); ql_write_page0_reg(qdev, port_regs-macMIIMgmtControlReg, (MAC_MII_CONTROL_RC 16)); @@ -850,28 +874,31 @@ static void ql_petbi_start_neg(struct ql3_adapter *qdev) } -static void ql_petbi_reset_ex(struct ql3_adapter *qdev, u32 mac_index) +static void ql_petbi_reset_ex(struct ql3_adapter *qdev) { ql_mii_write_reg_ex(qdev, PETBI_CONTROL_REG, PETBI_CTRL_SOFT_RESET, - mac_index); + PHYAddr[qdev-mac_index]); } -static void ql_petbi_start_neg_ex(struct ql3_adapter *qdev, u32 mac_index) +static void ql_petbi_start_neg_ex(struct ql3_adapter *qdev) { u16 reg; /* Enable Auto-negotiation sense */ - ql_mii_read_reg_ex(qdev, PETBI_TBI_CTRL, reg, mac_index); + ql_mii_read_reg_ex(qdev, PETBI_TBI_CTRL, reg, + PHYAddr[qdev-mac_index]); reg |= PETBI_TBI_AUTO_SENSE; - ql_mii_write_reg_ex(qdev, PETBI_TBI_CTRL, reg, mac_index); + ql_mii_write_reg_ex(qdev, PETBI_TBI_CTRL, reg, + PHYAddr[qdev-mac_index]); ql_mii_write_reg_ex(qdev, PETBI_NEG_ADVER, - PETBI_NEG_PAUSE | PETBI_NEG_DUPLEX, mac_index); + PETBI_NEG_PAUSE | PETBI_NEG_DUPLEX, + PHYAddr[qdev-mac_index]); ql_mii_write_reg_ex(qdev, PETBI_CONTROL_REG, PETBI_CTRL_AUTO_NEG | PETBI_CTRL_RESTART_NEG | PETBI_CTRL_FULL_DUPLEX | PETBI_CTRL_SPEED_1000, - mac_index); + PHYAddr[qdev-mac_index]); } static void ql_petbi_init(struct ql3_adapter *qdev) @@ -880,10 +907,10 @@ static void ql_petbi_init(struct ql3_adapter *qdev)
[PATCH] zd1211rw: rework band edge patching
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=72018b223dcacb631f140d4c8fada3790bd1b03c Commit: 72018b223dcacb631f140d4c8fada3790bd1b03c Parent: dc536a706951e23d3c81d0aa81414dc9f2c34ce5 Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Sat Apr 7 16:00:15 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 [PATCH] zd1211rw: rework band edge patching This change allows RF drivers to provide their own 6M band edge patching implementation, while providing a generic implementation shared by most currently supported RF's. The upcoming ZD1211B/AL7230B code will use this to define its own patching function, which is different from the other RF configurations. Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_chip.c | 16 drivers/net/wireless/zd1211rw/zd_chip.h |1 + drivers/net/wireless/zd1211rw/zd_rf.c | 14 ++ drivers/net/wireless/zd1211rw/zd_rf.h |9 - drivers/net/wireless/zd1211rw/zd_rf_al2230.c |2 +- drivers/net/wireless/zd1211rw/zd_rf_al7230b.c |2 +- 6 files changed, 33 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index e2cfdda..95b4a2a 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c @@ -615,16 +615,24 @@ static int patch_cr157(struct zd_chip *chip) * Vendor driver says: for FCC regulation, enabled per HWFeature 6M band edge * bit (for AL2230, AL2230S) */ -static int patch_6m_band_edge(struct zd_chip *chip, int channel) +static int patch_6m_band_edge(struct zd_chip *chip, u8 channel) +{ + ZD_ASSERT(mutex_is_locked(chip-mutex)); + if (!chip-patch_6m_band_edge) + return 0; + + return zd_rf_patch_6m_band_edge(chip-rf, channel); +} + +/* Generic implementation of 6M band edge patching, used by most RFs via + * zd_rf_generic_patch_6m() */ +int zd_chip_generic_patch_6m_band(struct zd_chip *chip, int channel) { struct zd_ioreq16 ioreqs[] = { { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, { CR47, 0x1e }, }; - if (!chip-patch_6m_band_edge || !chip-rf.patch_6m_band_edge) - return 0; - /* FIXME: Channel 11 is not the edge for all regulatory domains. */ if (channel == 1 || channel == 11) ioreqs[0].value = 0x12; diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h index e57ed75..ce0a5f6 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.h +++ b/drivers/net/wireless/zd1211rw/zd_chip.h @@ -833,6 +833,7 @@ int zd_chip_enable_rx(struct zd_chip *chip); void zd_chip_disable_rx(struct zd_chip *chip); int zd_chip_enable_hwint(struct zd_chip *chip); int zd_chip_disable_hwint(struct zd_chip *chip); +int zd_chip_generic_patch_6m_band(struct zd_chip *chip, int channel); int zd_chip_set_rts_cts_rate_locked(struct zd_chip *chip, u8 rts_rate, int preamble); diff --git a/drivers/net/wireless/zd1211rw/zd_rf.c b/drivers/net/wireless/zd1211rw/zd_rf.c index 4ddc2cb..549c23b 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.c +++ b/drivers/net/wireless/zd1211rw/zd_rf.c @@ -154,3 +154,17 @@ int zd_switch_radio_off(struct zd_rf *rf) r = t; return r; } + +int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel) +{ + if (!rf-patch_6m_band_edge) + return 0; + + return rf-patch_6m_band_edge(rf, channel); +} + +int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel) +{ + return zd_chip_generic_patch_6m_band(zd_rf_to_chip(rf), channel); +} + diff --git a/drivers/net/wireless/zd1211rw/zd_rf.h b/drivers/net/wireless/zd1211rw/zd_rf.h index ee8ac3a..aa9cc10 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.h +++ b/drivers/net/wireless/zd1211rw/zd_rf.h @@ -47,17 +47,13 @@ struct zd_rf { u8 type; u8 channel; - /* -* Whether this RF should patch the 6M band edge -* (assuming E2P_POD agrees) -*/ - u8 patch_6m_band_edge:1; /* RF-specific functions */ int (*init_hw)(struct zd_rf *rf); int (*set_channel)(struct zd_rf *rf, u8 channel); int (*switch_radio_on)(struct zd_rf *rf); int (*switch_radio_off)(struct zd_rf *rf); + int (*patch_6m_band_edge)(struct zd_rf *rf, u8 channel); }; const char *zd_rf_name(u8 type); @@ -72,6 +68,9 @@ int zd_rf_set_channel(struct zd_rf *rf, u8 channel); int zd_switch_radio_on(struct zd_rf *rf); int zd_switch_radio_off(struct zd_rf *rf); +int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel); +int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel); + /* Functions for individual RF chips */ int
qla3xxx: Bumping driver version number to v2.03.00-k4
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=201f27e625cb2fe150e92d81d9725fe28c279792 Commit: 201f27e625cb2fe150e92d81d9725fe28c279792 Parent: 3efedf2e5b814f3edd99e4f4ca47a604871ebe0e Author: Ron Mercer [EMAIL PROTECTED] AuthorDate: Mon Mar 26 13:43:03 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:02 2007 -0400 qla3xxx: Bumping driver version number to v2.03.00-k4 Signed-off-by: Ron Mercer [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/qla3xxx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 4061f7d..aeb788d 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -39,7 +39,7 @@ #define DRV_NAME qla3xxx #define DRV_STRING QLogic ISP3XXX Network Driver -#define DRV_VERSIONv2.03.00-k3 +#define DRV_VERSIONv2.03.00-k4 #define PFXDRV_NAME static const char ql3xxx_driver_name[] = DRV_NAME; - 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
make drivers/net/qla3xxx.c:PHY_DEVICES[] static
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b1fc1fa9b36512e928df95aead1a85381380ad1f Commit: b1fc1fa9b36512e928df95aead1a85381380ad1f Parent: 3ef34b807d35f81ee686e90e28084ee572a66e01 Author: Adrian Bunk [EMAIL PROTECTED] AuthorDate: Sat Mar 31 22:55:40 2007 +0200 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:03 2007 -0400 make drivers/net/qla3xxx.c:PHY_DEVICES[] static On Fri, Mar 30, 2007 at 01:05:59AM -0700, Andrew Morton wrote: ... Changes since 2.6.21-rc5-mm2: ... git-netdev-all.patch ... git trees ... This patch makes the needlessly global PHY_DEVICES[] static. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/qla3xxx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index aeb788d..d8766c0 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -88,7 +88,7 @@ typedef struct { char*name; } PHY_DEVICE_INFO_t; -const PHY_DEVICE_INFO_t PHY_DEVICES[] = +static const PHY_DEVICE_INFO_t PHY_DEVICES[] = {{PHY_TYPE_UNKNOWN,0x00, 0x0, PHY_TYPE_UNKNOWN}, {PHY_VITESSE_VSC8211, 0x0003f1, 0xb, PHY_VITESSE_VSC8211}, {PHY_AGERE_ET1011C, 0x00a0bc, 0x1, PHY_AGERE_ET1011C}, - 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
Netpoll support for Sibyte MAC
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d68300182828596016d7a6c0f23a912f07d9d0df Commit: d68300182828596016d7a6c0f23a912f07d9d0df Parent: 0c61ed5fe2c36b502a716a2ea3dd24e846029287 Author: Deepak Saxena [EMAIL PROTECTED] AuthorDate: Mon Mar 19 15:43:11 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 Netpoll support for Sibyte MAC NETPOLL support for Sibyte MAC Signed-off-by: Manish Lachwani [EMAIL PROTECTED] Signed-off-by: Deepak Saxena [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sb1250-mac.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 0a3a379..e3f1a07 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c @@ -1125,6 +1125,26 @@ static void sbdma_fillring(sbmacdma_t *d) } } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void sbmac_netpoll(struct net_device *netdev) +{ + struct sbmac_softc *sc = netdev_priv(netdev); + int irq = sc-sbm_dev-irq; + + __raw_writeq(0, sc-sbm_imr); + + sbmac_intr(irq, netdev, NULL); + +#ifdef CONFIG_SBMAC_COALESCE + __raw_writeq(((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) S_MAC_TX_CH0) | + ((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) S_MAC_RX_CH0), + sc-sbm_imr); +#else + __raw_writeq((M_MAC_INT_CHANNEL S_MAC_TX_CH0) | + (M_MAC_INT_CHANNEL S_MAC_RX_CH0), sc-sbm_imr); +#endif +} +#endif /** * SBDMA_RX_PROCESS(sc,d) @@ -2399,6 +2419,9 @@ static int sbmac_init(struct net_device *dev, int idx) dev-watchdog_timeo = TX_TIMEOUT; dev-change_mtu = sb1250_change_mtu; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev-poll_controller = sbmac_netpoll; +#endif /* This is needed for PASS2 for Rx H/W checksum feature */ sbmac_set_iphdr_offset(sc); - 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
[PATCH] zd1211rw: Add ID for ZyXEL AG-220
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d082fe85bf77f11aebb98d3bd29d66284d46851 Commit: 5d082fe85bf77f11aebb98d3bd29d66284d46851 Parent: ba528c4587005a004d136ed2e69705401ee4b878 Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Sat Apr 7 16:00:43 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:04 2007 -0400 [PATCH] zd1211rw: Add ID for ZyXEL AG-220 Tested by Christoph Sager and Tomas Klas zd1211b chip 0586:3412 v4810 high 00-13-49 AL7230B_RF pa0 g Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_usb.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 55f4c61..e04cffc 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -66,6 +66,7 @@ static struct usb_device_id usb_ids[] = { { USB_DEVICE(0x0b05, 0x171b), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0586, 0x3410), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0baf, 0x0121), .driver_info = DEVICE_ZD1211B }, + { USB_DEVICE(0x0586, 0x3412), .driver_info = DEVICE_ZD1211B }, /* Driverless devices that need ejecting */ { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, {} - 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
[PATCH] zd1211rw: Add AL7230B RF support for ZD1211B
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba528c4587005a004d136ed2e69705401ee4b878 Commit: ba528c4587005a004d136ed2e69705401ee4b878 Parent: 72018b223dcacb631f140d4c8fada3790bd1b03c Author: Daniel Drake [EMAIL PROTECTED] AuthorDate: Sat Apr 7 16:00:30 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:04 2007 -0400 [PATCH] zd1211rw: Add AL7230B RF support for ZD1211B This patch adds support for some new ZD1211B devices which ship with the AL7230B RF. Signed-off-by: Daniel Drake [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/zd1211rw/zd_rf_al7230b.c | 317 + 1 files changed, 267 insertions(+), 50 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c b/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c index d2c3ee6..5e5e9dd 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c @@ -51,9 +51,52 @@ static const u32 std_rv[] = { 0xd8c010, }; -static int al7230b_init_hw(struct zd_rf *rf) +static const u32 rv_init1[] = { + 0x3c9000, + 0xbf, + 0x70, + 0xf15d58, +}; + +static const u32 rv_init2[] = { + 0xf15d59, + 0xf15d5c, + 0xf15d58, +}; + +static const struct zd_ioreq16 ioreqs_sw[] = { + { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, + { CR38, 0x38 }, { CR136, 0xdf }, +}; + +static int zd1211b_al7230b_finalize(struct zd_chip *chip) { - int i, r; + int r; + static const struct zd_ioreq16 ioreqs[] = { + { CR80, 0x30 }, { CR81, 0x30 }, { CR79, 0x58 }, + { CR12, 0xf0 }, { CR77, 0x1b }, { CR78, 0x58 }, + { CR203, 0x04 }, + { }, + { CR240, 0x80 }, + }; + + r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); + if (r) + return r; + + if (chip-new_phy_layout) { + /* antenna selection? */ + r = zd_iowrite16_locked(chip, 0xe5, CR9); + if (r) + return r; + } + + return zd_iowrite16_locked(chip, 0x04, CR203); +} + +static int zd1211_al7230b_init_hw(struct zd_rf *rf) +{ + int r; struct zd_chip *chip = zd_rf_to_chip(rf); /* All of these writes are identical to AL2230 unless otherwise @@ -117,39 +160,136 @@ static int al7230b_init_hw(struct zd_rf *rf) }; static const struct zd_ioreq16 ioreqs_2[] = { - /* PLL_ON */ - { CR251, 0x3f }, + { CR251, 0x3f }, /* PLL_ON */ { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, - { CR38, 0x38 }, { CR136, 0xdf }, + { CR38, 0x38 }, { CR136, 0xdf }, }; r = zd_iowrite16a_locked(chip, ioreqs_1, ARRAY_SIZE(ioreqs_1)); if (r) return r; - r = zd_rfwrite_cr_locked(chip, 0x09ec04); + r = zd_rfwritev_cr_locked(chip, chan_rv[0], ARRAY_SIZE(chan_rv[0])); if (r) return r; - r = zd_rfwrite_cr_locked(chip, 0x88); + + r = zd_rfwritev_cr_locked(chip, std_rv, ARRAY_SIZE(std_rv)); if (r) return r; - for (i = 0; i ARRAY_SIZE(std_rv); i++) { - r = zd_rfwrite_cr_locked(chip, std_rv[i]); - if (r) - return r; - } + r = zd_rfwritev_cr_locked(chip, rv_init1, ARRAY_SIZE(rv_init1)); + if (r) + return r; - r = zd_rfwrite_cr_locked(chip, 0x3c9000); + r = zd_iowrite16a_locked(chip, ioreqs_2, ARRAY_SIZE(ioreqs_2)); if (r) return r; - r = zd_rfwrite_cr_locked(chip, 0xbf); + + r = zd_rfwritev_cr_locked(chip, rv_init2, ARRAY_SIZE(rv_init2)); if (r) return r; - r = zd_rfwrite_cr_locked(chip, 0x70); + + r = zd_iowrite16_locked(chip, 0x06, CR203); if (r) return r; - r = zd_rfwrite_cr_locked(chip, 0xf15d58); + r = zd_iowrite16_locked(chip, 0x80, CR240); + if (r) + return r; + + return 0; +} + +static int zd1211b_al7230b_init_hw(struct zd_rf *rf) +{ + int r; + struct zd_chip *chip = zd_rf_to_chip(rf); + + static const struct zd_ioreq16 ioreqs_1[] = { + { CR240, 0x57 }, { CR9, 0x9 }, + { }, + { CR10, 0x8b }, { CR15, 0x20 }, + { CR17, 0x2B }, /* for newest (3rd cut) AL2230 */ + { CR20, 0x10 }, /* 4N25-Stone Request */ + { CR23, 0x40 }, { CR24, 0x20 }, { CR26, 0x93 }, + { CR28, 0x3e }, { CR29, 0x00 }, + { CR33, 0x28 }, /* 5613 */ + { CR34, 0x30 }, + { CR35, 0x3e }, /* for newest (3rd cut) AL2230 */ + { CR41,
[PATCH] ieee80211-crypt: Make some TKIP and CCMP error logging conditional
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aeb998c124786e8c7fbd6eab347230469e911872 Commit: aeb998c124786e8c7fbd6eab347230469e911872 Parent: 5d082fe85bf77f11aebb98d3bd29d66284d46851 Author: Larry Finger [EMAIL PROTECTED] AuthorDate: Mon Apr 9 11:24:41 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:04 2007 -0400 [PATCH] ieee80211-crypt: Make some TKIP and CCMP error logging conditional There are messages arising from ieee80211_crypt that spam the logs of casual users. These are changed to be logged only if the user specifically requests the IEEE80211_DEBUG_DROP messages. In either case, the error/drop count is incremented. Signed-off-by: Larry Finger [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- net/ieee80211/ieee80211_crypt_ccmp.c |2 +- net/ieee80211/ieee80211_crypt_tkip.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c index 7ec8314..b016b41 100644 --- a/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/net/ieee80211/ieee80211_crypt_ccmp.c @@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (ccmp_replay_check(pn, key-rx_pn)) { if (net_ratelimit()) { - printk(KERN_DEBUG CCMP: replay detected: STA= MAC_FMT + IEEE80211_DEBUG_DROP(CCMP: replay detected: STA= MAC_FMT previous PN %02x%02x%02x%02x%02x%02x received PN %02x%02x%02x%02x%02x%02x\n, MAC_ARG(hdr-addr2), MAC_ARG(key-rx_pn), diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index bd0988f..5a48d8e 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c @@ -465,7 +465,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (tkip_replay_check(iv32, iv16, tkey-rx_iv32, tkey-rx_iv16)) { if (net_ratelimit()) { - printk(KERN_DEBUG TKIP: replay detected: STA= MAC_FMT + IEEE80211_DEBUG_DROP(TKIP: replay detected: STA= MAC_FMT previous TSC %08x%04x received TSC %08x%04x\n, MAC_ARG(hdr-addr2), tkey-rx_iv32, tkey-rx_iv16, iv32, iv16); @@ -507,7 +507,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) tkey-rx_phase1_done = 0; } if (net_ratelimit()) { - printk(KERN_DEBUG TKIP: ICV error detected: STA= + IEEE80211_DEBUG_DROP(TKIP: ICV error detected: STA= MAC_FMT \n, MAC_ARG(hdr-addr2)); } tkey-dot11RSNAStatsTKIPICVErrors++; - 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 RGMII-ID interface mode definition
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a999589ccaae16472531e0616f23826ad097aa40 Commit: a999589ccaae16472531e0616f23826ad097aa40 Parent: aeb998c124786e8c7fbd6eab347230469e911872 Author: Kim Phillips [EMAIL PROTECTED] AuthorDate: Fri Apr 13 01:25:57 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:04 2007 -0400 phylib: add RGMII-ID interface mode definition The RGMII spec allows compliance for devices that implement an internal delay on TXC or RXC inside the transmitter. This patch adds an RGMII_ID definition to support RGMII-ID devices in the phylib. Signed-off-by: Kim Phillips [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- include/linux/phy.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/phy.h b/include/linux/phy.h index edd4c88..2a65978 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -55,6 +55,7 @@ typedef enum { PHY_INTERFACE_MODE_TBI, PHY_INTERFACE_MODE_RMII, PHY_INTERFACE_MODE_RGMII, + PHY_INTERFACE_MODE_RGMII_ID, 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
[POWERPC] zImage: Add more flexible gunzip convenience functions
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb Commit: ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb Parent: cfbff8a3802542c4d8b2290c49b1a59128c4a380 Author: David Gibson [EMAIL PROTECTED] AuthorDate: Mon Mar 5 14:24:52 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 13:35:01 2007 +1100 [POWERPC] zImage: Add more flexible gunzip convenience functions At present, arch/powerpc/boot/main.c includes a gunzip() function which is a convenient wrapper around zlib. However, it doesn't conveniently allow decompressing part of an image to one location, then the remainder to a different address. This patch adds a new set of more flexible convenience wrappers around zlib, moving them to their own file, gunzip_util.c, in the process. These wrappers allow decompressing sections of the compressed image to different locations. In addition, they transparently handle uncompressed data, avoiding special case code to handle uncompressed vmlinux images. The patch also converts main.c to use the new wrappers, using the new flexibility to avoid decompressing the vmlinux's ELF header twice as we did previously. That in turn means we avoid extending our allocations for the vmlinux to allow space for the extra copy of the ELF header. Signed-off-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/Makefile |3 +- arch/powerpc/boot/gunzip_util.c | 140 +++ arch/powerpc/boot/gunzip_util.h | 30 arch/powerpc/boot/main.c| 113 ++-- 4 files changed, 192 insertions(+), 94 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index dc77940..3628d86 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -41,7 +41,8 @@ $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ $(addprefix $(obj)/,$(zlibheader)) src-wlib := string.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ - ns16550.c serial.c simple_alloc.c div64.S util.S $(zlib) + ns16550.c serial.c simple_alloc.c div64.S util.S \ + gunzip_util.c $(zlib) src-plat := of.c src-boot := crt0.S $(src-wlib) $(src-plat) empty.c diff --git a/arch/powerpc/boot/gunzip_util.c b/arch/powerpc/boot/gunzip_util.c new file mode 100644 index 000..3d9ff8f --- /dev/null +++ b/arch/powerpc/boot/gunzip_util.c @@ -0,0 +1,140 @@ +/* + * Copyright 2007 David Gibson, IBM Corporation. + * Based on earlier work, Copyright (C) Paul Mackerras 1997. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include stddef.h +#include string.h +#include stdio.h +#include ops.h +#include gunzip_util.h + +struct gunzip_state state; + +#define HEAD_CRC 2 +#define EXTRA_FIELD4 +#define ORIG_NAME 8 +#define COMMENT0x10 +#define RESERVED 0xe0 + +void gunzip_start(struct gunzip_state *state, void *src, int srclen) +{ + char *hdr = src; + int hdrlen = 0; + + memset(state, 0, sizeof(*state)); + + /* Check for gzip magic number */ + if ((hdr[0] == 0x1f) (hdr[1] == 0x8b)) { + /* gzip data, initialize zlib parameters */ + int r, flags; + + state-s.workspace = state-scratch; + if (zlib_inflate_workspacesize() sizeof(state-scratch)) { + printf(insufficient scratch space for gunzip\n\r); + exit(); + } + + /* skip header */ + hdrlen = 10; + flags = hdr[3]; + if (hdr[2] != Z_DEFLATED || (flags RESERVED) != 0) { + printf(bad gzipped data\n\r); + exit(); + } + if ((flags EXTRA_FIELD) != 0) + hdrlen = 12 + hdr[10] + (hdr[11] 8); + if ((flags ORIG_NAME) != 0) + while (hdr[hdrlen++] != 0) + ; + if ((flags COMMENT) != 0) + while (hdr[hdrlen++] != 0) + ; + if ((flags HEAD_CRC) != 0) + hdrlen += 2; + if (hdrlen = srclen) { + printf(gunzip_start: ran out of data in header\n\r); + exit(); + } + + r = zlib_inflateInit2(state-s, -MAX_WBITS); + if (r != Z_OK) { + printf(inflateInit2 returned %d\n\r, r); +
[POWERPC] Allow pSeries to build without CONFIG_PCI
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bed59275810a55500e885cbdc5c2a0507f13c00e Commit: bed59275810a55500e885cbdc5c2a0507f13c00e Parent: be9e95b17e150c7b6933cb2f1e1c46a501976080 Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Sun Mar 4 17:04:44 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:26 2007 +1100 [POWERPC] Allow pSeries to build without CONFIG_PCI Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/Kconfig|5 ++- arch/powerpc/kernel/Makefile|4 +- arch/powerpc/platforms/pseries/Makefile |5 ++- arch/powerpc/platforms/pseries/iommu.c | 53 +- arch/powerpc/platforms/pseries/setup.c |5 +++ drivers/video/Kconfig |2 +- include/asm-powerpc/ppc-pci.h |7 7 files changed, 51 insertions(+), 30 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6dfbd52..e720527 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -89,7 +89,7 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER config ARCH_MAY_HAVE_PC_FDC bool - default y + default !PPC_PSERIES || PCI config PPC_OF def_bool y @@ -1028,7 +1028,8 @@ config MCA config PCI bool PCI support if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ - || PPC_MPC52xx || (EMBEDDED PPC_ISERIES) || MPC7448HPC2 || PPC_PS3 + || PPC_MPC52xx || (EMBEDDED (PPC_PSERIES || PPC_ISERIES)) \ + || MPC7448HPC2 || PPC_PS3 default y if !40x !CPM2 !8xx !APUS !PPC_83xx \ !PPC_85xx !PPC_86xx default PCI_PERMEDIA if !4xx !CPM2 !8xx APUS diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 8120d42..e0fa80e 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -25,8 +25,8 @@ obj-$(CONFIG_PPC_970_NAP) += idle_power4.o obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o procfs-$(CONFIG_PPC64) := proc_ppc64.o obj-$(CONFIG_PROC_FS) += $(procfs-y) -rtaspci-$(CONFIG_PPC64):= rtas_pci.o -obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y) +rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o +obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y) obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o obj-$(CONFIG_RTAS_PROC)+= rtas-proc.o obj-$(CONFIG_LPARCFG) += lparcfg.o diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 2dfd050..90235d5 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile @@ -2,14 +2,15 @@ ifeq ($(CONFIG_PPC64),y) EXTRA_CFLAGS += -mno-minimal-toc endif -obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ - setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ +obj-y := lpar.o hvCall.o nvram.o reconfig.o \ + setup.o iommu.o ras.o rtasd.o \ firmware.o power.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_XICS) += xics.o obj-$(CONFIG_SCANLOG) += scanlog.o obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o obj-$(CONFIG_KEXEC)+= kexec.o +obj-$(CONFIG_PCI) += pci.o pci_dlpar.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 9322f74..f9510a5 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -242,6 +242,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum) return tce_ret; } +#ifdef CONFIG_PCI static void iommu_table_setparms(struct pci_controller *phb, struct device_node *dn, struct iommu_table *tbl) @@ -478,29 +479,6 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) pci_name(dev)); } -static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) -{ - int err = NOTIFY_OK; - struct device_node *np = node; - struct pci_dn *pci = PCI_DN(np); - - switch (action) { - case PSERIES_RECONFIG_REMOVE: - if (pci pci-iommu_table - get_property(np, ibm,dma-window, NULL)) - iommu_free_table(np); - break; - default: - err = NOTIFY_DONE; - break; - } - return err; -} - -static struct notifier_block iommu_reconfig_nb = { - .notifier_call = iommu_reconfig_notifier, -}; - static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) { struct device_node *pdn,
[POWERPC] zImage: Cleanup and improve prep_kernel()
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=79c8541924a220964f9f2cbed31eaa9fdb042eab Commit: 79c8541924a220964f9f2cbed31eaa9fdb042eab Parent: ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb Author: David Gibson [EMAIL PROTECTED] AuthorDate: Mon Mar 5 14:24:52 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 13:35:01 2007 +1100 [POWERPC] zImage: Cleanup and improve prep_kernel() This patch rewrites prep_kernel() in the zImage wrapper code to be clearer and more flexible. Notable changes: - Handling of the initrd image from prep_kernel() has moved into a new prep_initrd() function. - The address of the initrd image is now added as device tree properties, as the kernel expects. - We only copy a packaged initrd image to a new location if it is in danger of being clobbered when the kernel moves to its final location, instead of always. - By default we decompress the kernel directly to address 0, instead of requiring it to relocate itself. Platforms (such as OF) where doing this could clobber still-live firmware data structures can override the vmlinux_alloc hook to provide an alternate place to decompress the kernel. - We no longer pass lots of information between functions in global variables. Signed-off-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/main.c | 167 -- arch/powerpc/boot/of.c | 12 +++ arch/powerpc/boot/ops.h |1 + 3 files changed, 114 insertions(+), 66 deletions(-) diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 404620a..05de6cf 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c @@ -33,24 +33,21 @@ extern char _dtb_end[]; static struct gunzip_state gzstate; struct addr_range { - unsigned long addr; + void *addr; unsigned long size; - unsigned long memsize; }; -static struct addr_range vmlinux; -static struct addr_range vmlinuz; -static struct addr_range initrd; - -static unsigned long elfoffset; -static int is_64bit; -static char elfheader[256]; +struct elf_info { + unsigned long loadsize; + unsigned long memsize; + unsigned long elfoffset; +}; typedef void (*kernel_entry_t)(unsigned long, unsigned long, void *); #undef DEBUG -static int is_elf64(void *hdr) +static int parse_elf64(void *hdr, struct elf_info *info) { Elf64_Ehdr *elf64 = hdr; Elf64_Phdr *elf64ph; @@ -74,15 +71,14 @@ static int is_elf64(void *hdr) if (i = (unsigned int)elf64-e_phnum) return 0; - elfoffset = (unsigned long)elf64ph-p_offset; - vmlinux.size = (unsigned long)elf64ph-p_filesz; - vmlinux.memsize = (unsigned long)elf64ph-p_memsz; + info-loadsize = (unsigned long)elf64ph-p_filesz; + info-memsize = (unsigned long)elf64ph-p_memsz; + info-elfoffset = (unsigned long)elf64ph-p_offset; - is_64bit = 1; return 1; } -static int is_elf32(void *hdr) +static int parse_elf32(void *hdr, struct elf_info *info) { Elf32_Ehdr *elf32 = hdr; Elf32_Phdr *elf32ph; @@ -98,7 +94,6 @@ static int is_elf32(void *hdr) elf32-e_machine == EM_PPC)) return 0; - elf32 = (Elf32_Ehdr *)elfheader; elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32-e_phoff); for (i = 0; i elf32-e_phnum; i++, elf32ph++) if (elf32ph-p_type == PT_LOAD) @@ -106,24 +101,26 @@ static int is_elf32(void *hdr) if (i = elf32-e_phnum) return 0; - elfoffset = elf32ph-p_offset; - vmlinux.size = elf32ph-p_filesz; - vmlinux.memsize = elf32ph-p_memsz; + info-loadsize = elf32ph-p_filesz; + info-memsize = elf32ph-p_memsz; + info-elfoffset = elf32ph-p_offset; return 1; } -static void prep_kernel(unsigned long a1, unsigned long a2) +static struct addr_range prep_kernel(void) { + char elfheader[256]; + void *vmlinuz_addr = _vmlinux_start; + unsigned long vmlinuz_size = _vmlinux_end - _vmlinux_start; + void *addr = 0; + struct elf_info ei; int len; - vmlinuz.addr = (unsigned long)_vmlinux_start; - vmlinuz.size = (unsigned long)(_vmlinux_end - _vmlinux_start); - /* gunzip the ELF header of the kernel */ - gunzip_start(gzstate, (void *)vmlinuz.addr, vmlinuz.size); + gunzip_start(gzstate, vmlinuz_addr, vmlinuz_size); gunzip_exactly(gzstate, elfheader, sizeof(elfheader)); - if (!is_elf64(elfheader) !is_elf32(elfheader)) { + if (!parse_elf64(elfheader, ei) !parse_elf32(elfheader, ei)) { printf(Error: not a valid PPC32 or PPC64 ELF file!\n\r); exit(); } @@ -135,55 +132,92 @@ static void
[POWERPC] DMA 4GB boundary protection
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=618d3adc351a24c4c48437c767befb88ca2d199d Commit: 618d3adc351a24c4c48437c767befb88ca2d199d Parent: 723ec731de880a76a004a304b62bf8d0f96435d8 Author: Jake Moilanen [EMAIL PROTECTED] AuthorDate: Fri Mar 2 15:49:43 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:25 2007 +1100 [POWERPC] DMA 4GB boundary protection There are many adapters which can not handle DMAing acrosss any 4 GB boundary. For instance the latest Emulex adapters. This normally is not an issue as firmware gives us dma-windows under 4gigs. However, some of the new System-P boxes have dma-windows above 4gigs, and this present a problem. I propose fixing it in the IOMMU allocation instead of making each driver protect against it as it is more efficient, and won't require changing every driver which has not considered this issue. This patch checks to see if the mapping spans a 4 gig boundary, and if it does, retries the allocation. It tries the next allocation at the start of the crossed 4 gig boundary. Signed-off-by: Jake Moilanen [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/iommu.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 95edad4..c50d707 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -76,6 +76,7 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl, unsigned int align_order) { unsigned long n, end, i, start; + unsigned long start_addr, end_addr; unsigned long limit; int largealloc = npages 15; int pass = 0; @@ -146,6 +147,15 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl, } } + /* DMA cannot cross 4 GB boundary */ + start_addr = (n + tbl-it_offset) PAGE_SHIFT; + end_addr = (end + tbl-it_offset) PAGE_SHIFT; + if ((start_addr 32) != (end_addr 32)) { + end_addr = 0xl; + start = (end_addr PAGE_SHIFT) - tbl-it_offset; + goto again; + } + for (i = n; i end; i++) if (test_bit(i, tbl-it_map)) { start = i+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
[POWERPC] 750CL cputable entry
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cfbff8a3802542c4d8b2290c49b1a59128c4a380 Commit: cfbff8a3802542c4d8b2290c49b1a59128c4a380 Parent: 6406063899cc6f558df1e751d46de2e3c45c2189 Author: Jake Moilanen [EMAIL PROTECTED] AuthorDate: Tue Oct 3 14:29:34 2006 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:26 2007 +1100 [POWERPC] 750CL cputable entry 750CL cputable entry from Steve Winiecki. Signed-off-by: Jake Moilanen [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/cputable.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index e4006dc..6b59e40 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -558,6 +558,18 @@ static struct cpu_spec cpu_specs[] = { .cpu_setup = __setup_cpu_750cx, .platform = ppc750, }, + { /* 750CL */ + .pvr_mask = 0xf0f0, + .pvr_value = 0x00087010, + .cpu_name = 750CL, + .cpu_features = CPU_FTRS_750, + .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .icache_bsize = 32, + .dcache_bsize = 32, + .num_pmcs = 4, + .cpu_setup = __setup_cpu_750cx, + .platform = ppc750, + }, { /* 745/755 */ .pvr_mask = 0xf000, .pvr_value = 0x00083000, - 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] zImage: Cleanup and improve zImage entry point
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd197ffcf10bcc1a260efe5c09a3188fd9228c83 Commit: cd197ffcf10bcc1a260efe5c09a3188fd9228c83 Parent: 79c8541924a220964f9f2cbed31eaa9fdb042eab Author: David Gibson [EMAIL PROTECTED] AuthorDate: Mon Mar 5 14:24:52 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 13:35:03 2007 +1100 [POWERPC] zImage: Cleanup and improve zImage entry point This patch re-organises the way the zImage wrapper code is entered, to allow more flexibility on platforms with unusual entry conditions. After this patch, a platform .o file has two options: 1) It can define a _zimage_start, in which case the platform code gets control from the very beginning of execution. In this case the platform code is responsible for relocating the zImage if necessary, clearing the BSS, performing any platform specific initialization, and finally calling start() to load and enter the kernel. 2) It can define platform_init(). In this case the generic crt0.S handles initial entry, and calls platform_init() before calling start(). The signature of platform_init() is changed, however, to take up to 5 parameters (in r3..r7) as they come from the platform's initial loader, instead of a fixed set of parameters based on OF's usage. When using the generic crt0.S, the platform .o can optionally supply a custom stack to use, using the BSS_STACK() macro. If this is not supplied, the crt0.S will assume that the loader has supplied a usable stack. In either case, the platform code communicates information to the generic code (specifically, a PROM pointer for OF systems, and/or an initrd image address supplied by the bootloader) via a global structure loader_info. In addition the wrapper script is rearranged to ensure that the platform .o is always linked first. This means that platforms where the zImage entry point is at a fixed address or offset, rather than being encoded in the binary header can be supported using option (1). Signed-off-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/Makefile |6 +++--- arch/powerpc/boot/crt0.S| 32 +--- arch/powerpc/boot/main.c| 18 +++--- arch/powerpc/boot/of.c |6 -- arch/powerpc/boot/ops.h | 12 +++- arch/powerpc/boot/wrapper |6 -- arch/powerpc/boot/zImage.coff.lds.S |3 ++- arch/powerpc/boot/zImage.lds.S |1 + 8 files changed, 61 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 3628d86..b1fc029 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -40,11 +40,11 @@ zliblinuxheader := zlib.h zconf.h zutil.h $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ $(addprefix $(obj)/,$(zlibheader)) -src-wlib := string.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ +src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ gunzip_util.c $(zlib) src-plat := of.c -src-boot := crt0.S $(src-wlib) $(src-plat) empty.c +src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) obj-boot := $(addsuffix .o, $(basename $(src-boot))) @@ -97,7 +97,7 @@ $(obj)/wrapper.a: $(obj-wlib) hostprogs-y:= addnote addRamDisk hack-coff mktree -extra-y:= $(obj)/crt0.o $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ +extra-y:= $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ $(obj)/zImage.lds $(obj)/zImage.coff.lds wrapper:=$(srctree)/$(src)/wrapper diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 70e65b1..3dc8d8f 100644 --- a/arch/powerpc/boot/crt0.S +++ b/arch/powerpc/boot/crt0.S @@ -16,6 +16,7 @@ _zimage_start_opd: .long _zimage_start, 0, 0, 0 + .weak _zimage_start .globl _zimage_start _zimage_start: /* Work out the offset between the address we were linked at @@ -44,7 +45,7 @@ _zimage_start: addir9,r9,4 bdnz2b - /* Do a cache flush for our text, in case OF didn't */ + /* Do a cache flush for our text, in case the loader didn't */ 3: lis r9,[EMAIL PROTECTED] addir9,r9,[EMAIL PROTECTED] add r9,r0,r9 @@ -59,6 +60,31 @@ _zimage_start: sync isync - mr r6,r1 - b start + /* Clear the BSS */ + lis r9,[EMAIL PROTECTED] + addir9,r9,[EMAIL PROTECTED] + lis r8,[EMAIL PROTECTED] + addi
[POWERPC] Make find_and_init_pbs() a void function
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36241ce695f16193d0f76ea010f212119da37071 Commit: 36241ce695f16193d0f76ea010f212119da37071 Parent: 0a7c7efccc08f00ae6fc8e1f2de0ee61f07357fd Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Sun Mar 4 17:07:38 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:26 2007 +1100 [POWERPC] Make find_and_init_pbs() a void function It always returned 0 and noone checked. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/rtas_pci.c |4 +--- include/asm-powerpc/ppc-pci.h |2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index ace9f4c..1616a44 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c @@ -274,7 +274,7 @@ int __devinit rtas_setup_phb(struct pci_controller *phb) return 0; } -unsigned long __init find_and_init_phbs(void) +void __init find_and_init_phbs(void) { struct device_node *node; struct pci_controller *phb; @@ -319,8 +319,6 @@ unsigned long __init find_and_init_phbs(void) if (prop) pci_assign_all_buses = *prop; } - - return 0; } /* RPA-specific bits for removing PHBs */ diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index 4a05340..f186720 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h @@ -24,7 +24,7 @@ extern void pci_setup_phb_io_dynamic(struct pci_controller *hose, int primary); extern struct list_head hose_list; extern int global_phb_number; -extern unsigned long find_and_init_phbs(void); +extern void find_and_init_phbs(void); extern struct pci_dev *ppc64_isabridge_dev;/* may be NULL if no ISA bus */ - 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] Allow xmon to build without CONFIG_DEBUG_BUGVERBOSE
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a7c7efccc08f00ae6fc8e1f2de0ee61f07357fd Commit: 0a7c7efccc08f00ae6fc8e1f2de0ee61f07357fd Parent: bed59275810a55500e885cbdc5c2a0507f13c00e Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Sun Mar 4 17:05:34 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:26 2007 +1100 [POWERPC] Allow xmon to build without CONFIG_DEBUG_BUGVERBOSE Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/xmon/xmon.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index bf299b6..f12687d 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -1360,8 +1360,12 @@ static void print_bug_trap(struct pt_regs *regs) if (is_warning_bug(bug)) return; +#ifdef CONFIG_DEBUG_BUGVERBOSE printf(kernel BUG at %s:%u!\n, bug-file, bug-line); +#else + printf(kernel BUG at %p!\n, (void *)bug-bug_addr); +#endif } void excprint(struct pt_regs *fp) - 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: fix for dynamic lpar support
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1eef4e04c95fb52a1a3885c8f53a822206fc9aa5 Commit: 1eef4e04c95fb52a1a3885c8f53a822206fc9aa5 Parent: d68300182828596016d7a6c0f23a912f07d9d0df Author: Jan-Bernd Themann [EMAIL PROTECTED] AuthorDate: Thu Mar 22 17:49:42 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:01 2007 -0400 ehea: fix for dynamic lpar support The patch fixes bugs related to the probe / remove adapter functionality (handling of OFDT nodes) Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/ehea/ehea.h |2 +- drivers/net/ehea/ehea_main.c | 39 +++ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index d593513..1fefb2d 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -39,7 +39,7 @@ #include asm/io.h #define DRV_NAME ehea -#define DRV_VERSIONEHEA_0052 +#define DRV_VERSIONEHEA_0053 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 8d65eb7..db0d79e 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2559,11 +2559,8 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) int i = 0; lhea_dn = adapter-ebus_dev-ofdev.node; - do { - eth_dn = of_get_next_child(lhea_dn, eth_dn); - if (!eth_dn) - break; - + while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { + dn_log_port_id = (u32*)get_property(eth_dn, ibm,hea-port-no, NULL); if (!dn_log_port_id) { @@ -2580,9 +2577,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) adapter-port[i]-netdev-name, *dn_log_port_id); i++; - } while (eth_dn); - - of_node_put(lhea_dn); + }; /* Check for succesfully set up ports */ for (i = 0; i EHEA_MAX_PORTS; i++) @@ -2603,21 +2598,14 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter, u32 *dn_log_port_id; lhea_dn = adapter-ebus_dev-ofdev.node; - do { - eth_dn = of_get_next_child(lhea_dn, eth_dn); - if (!eth_dn) - break; - + while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { + dn_log_port_id = (u32*)get_property(eth_dn, ibm,hea-port-no, NULL); - if (dn_log_port_id) if (*dn_log_port_id == logical_port_id) return eth_dn; - - } while (eth_dn); - - of_node_put(lhea_dn); + }; return NULL; } @@ -2653,6 +2641,8 @@ static ssize_t ehea_probe_port(struct device *dev, port = ehea_setup_single_port(adapter, logical_port_id, eth_dn); + of_node_put(eth_dn); + if (port) { for (i=0; i EHEA_MAX_PORTS; i++) if (!adapter-port[i]) { @@ -2728,6 +2718,11 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev, u64 *adapter_handle; int ret; + if (!dev || !dev-ofdev.node) { + ehea_error(Invalid ibmebus device probed); + return -EINVAL; + } + adapter = kzalloc(sizeof(*adapter), GFP_KERNEL); if (!adapter) { ret = -ENOMEM; @@ -2770,6 +2765,7 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev, adapter-neq = ehea_create_eq(adapter, EHEA_NEQ, EHEA_MAX_ENTRIES_EQ, 1); if (!adapter-neq) { + ret = -EIO; dev_err(dev-ofdev.dev, NEQ creation failed); goto out_free_res; } @@ -2786,10 +2782,13 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev, } adapter-ehea_wq = create_workqueue(ehea_wq); - if (!adapter-ehea_wq) + if (!adapter-ehea_wq) { + ret = -EIO; goto out_free_irq; + } - if (ehea_create_device_sysfs(dev)) + ret = ehea_create_device_sysfs(dev); + if (ret) goto out_kill_wq; ret = ehea_setup_ports(adapter); - 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 fixed setting of ROOT_DEV for 7448HPC2 platforms
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6406063899cc6f558df1e751d46de2e3c45c2189 Commit: 6406063899cc6f558df1e751d46de2e3c45c2189 Parent: 36241ce695f16193d0f76ea010f212119da37071 Author: Zang Roy-r61911 [EMAIL PROTECTED] AuthorDate: Tue Mar 6 14:10:36 2007 +0800 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:26 2007 +1100 [POWERPC] Remove fixed setting of ROOT_DEV for 7448HPC2 platforms Remove fixed setting of ROOT_DEV for 7448HPC2 platforms. Signed-off-by: Roy Zang [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index 3fcc85f..9922574 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c @@ -91,16 +91,6 @@ static void __init mpc7448_hpc2_setup_arch(void) } tsi108_csr_vir_base = get_vir_csrbase(); -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDA1; -#endif - -#ifdef CONFIG_BLK_DEV_INITRD - ROOT_DEV = Root_RAM0; -#endif - /* setup PCI host bridge */ #ifdef CONFIG_PCI for (np = NULL; (np = of_find_node_by_type(np, pci)) != NULL;) - 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] EDAC ECC software scrubber
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=723ec731de880a76a004a304b62bf8d0f96435d8 Commit: 723ec731de880a76a004a304b62bf8d0f96435d8 Parent: 27565903e94d548256bf5923653ab2a9668c9b9f Author: Dave Jiang [EMAIL PROTECTED] AuthorDate: Fri Mar 2 13:36:21 2007 -0700 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:25 2007 +1100 [POWERPC] EDAC ECC software scrubber Implements the per arch atomic_scrub() that EDAC uses for software ECC scrubbing. It reads memory and then writes back the original value, allowing the hardware to detect and correct memory errors. Signed-off-by: Dave Jiang [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- include/asm-powerpc/edac.h | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/include/asm-powerpc/edac.h b/include/asm-powerpc/edac.h new file mode 100644 index 000..6ead88b --- /dev/null +++ b/include/asm-powerpc/edac.h @@ -0,0 +1,40 @@ +/* + * PPC EDAC common defs + * + * Author: Dave Jiang [EMAIL PROTECTED] + * + * 2007 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed as is without any warranty of any kind, whether express + * or implied. + */ +#ifndef ASM_EDAC_H +#define ASM_EDAC_H +/* + * ECC atomic, DMA, SMP and interrupt safe scrub function. + * Implements the per arch atomic_scrub() that EDAC use for software + * ECC scrubbing. It reads memory and then writes back the original + * value, allowing the hardware to detect and correct memory errors. + */ +static __inline__ void atomic_scrub(void *va, u32 size) +{ + unsigned int *virt_addr = va; + unsigned int temp; + unsigned int i; + + for (i = 0; i size / sizeof(*virt_addr); i++, virt_addr++) { + /* Very carefully read and write to memory atomically +* so we are interrupt, DMA and SMP safe. +*/ + __asm__ __volatile__ (\n\ + 1: lwarx %0,0,%1\n\ + stwcx. %0,0,%1\n\ + bne-1b\n\ + isync + : =r(temp) + : r(virt_addr) + : cr0, memory); + } +} + +#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
[POWERPC] bootwrapper: Add stddef.h to ops.h
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce3edb30ec2b6350c4258e3d52e73b410e2ea12d Commit: ce3edb30ec2b6350c4258e3d52e73b410e2ea12d Parent: cd197ffcf10bcc1a260efe5c09a3188fd9228c83 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:38 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 21:15:42 2007 +1100 [POWERPC] bootwrapper: Add stddef.h to ops.h ops.h references NULL, so include stddef.h, so files including ops.h don't have to. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/ops.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index cad4eee..2b569ad 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -11,6 +11,7 @@ #ifndef _PPC_BOOT_OPS_H_ #define _PPC_BOOT_OPS_H_ +#include stddef.h #include types.h #defineCOMMAND_LINE_SIZE 512 - 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 unused, undocumented #cpus property from cpus node
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=500798d48fdcffbbc7f619bd3e6b5b5cea6869d1 Commit: 500798d48fdcffbbc7f619bd3e6b5b5cea6869d1 Parent: fdc0a9be3a63a71c12de86cc97d4cd8cf46239c0 Author: Stuart Yoder [EMAIL PROTECTED] AuthorDate: Tue Feb 27 10:14:14 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:24 2007 +1100 [POWERPC] Remove unused, undocumented #cpus property from cpus node The #cpus property is unused and undocumented and is therefore being removed. Signed-off-by: Stuart Yoder [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/dts/kuroboxHD.dts |1 - arch/powerpc/boot/dts/kuroboxHG.dts |1 - arch/powerpc/boot/dts/lite5200.dts |1 - arch/powerpc/boot/dts/lite5200b.dts |1 - arch/powerpc/boot/dts/mpc7448hpc2.dts|1 - arch/powerpc/boot/dts/mpc8272ads.dts |1 - arch/powerpc/boot/dts/mpc8313erdb.dts|1 - arch/powerpc/boot/dts/mpc832x_mds.dts|1 - arch/powerpc/boot/dts/mpc8349emitx.dts |1 - arch/powerpc/boot/dts/mpc8349emitxgp.dts |1 - arch/powerpc/boot/dts/mpc834x_mds.dts|1 - arch/powerpc/boot/dts/mpc836x_mds.dts|1 - arch/powerpc/boot/dts/mpc8540ads.dts |1 - arch/powerpc/boot/dts/mpc8541cds.dts |1 - arch/powerpc/boot/dts/mpc8548cds.dts |1 - arch/powerpc/boot/dts/mpc8555cds.dts |1 - arch/powerpc/boot/dts/mpc8560ads.dts |1 - arch/powerpc/boot/dts/mpc8568mds.dts |1 - arch/powerpc/boot/dts/mpc8641_hpcn.dts |1 - arch/powerpc/boot/dts/mpc866ads.dts |1 - arch/powerpc/boot/dts/mpc885ads.dts |1 - 21 files changed, 0 insertions(+), 21 deletions(-) diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts index b897918..373110d 100644 --- a/arch/powerpc/boot/dts/kuroboxHD.dts +++ b/arch/powerpc/boot/dts/kuroboxHD.dts @@ -29,7 +29,6 @@ build with: dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts cpus { linux,phandle = 2000; - #cpus = 1; #address-cells = 1; #size-cells = 0; diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts index 7531027..f3542dc 100644 --- a/arch/powerpc/boot/dts/kuroboxHG.dts +++ b/arch/powerpc/boot/dts/kuroboxHG.dts @@ -29,7 +29,6 @@ build with: dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts cpus { linux,phandle = 2000; - #cpus = 1; #address-cells = 1; #size-cells = 0; diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index c03103c..ba54c6b 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts @@ -24,7 +24,6 @@ #size-cells = 1; cpus { - #cpus = 1; #address-cells = 1; #size-cells = 0; diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index 3875ca9..2e00308 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts @@ -24,7 +24,6 @@ #size-cells = 1; cpus { - #cpus = 1; #address-cells = 1; #size-cells = 0; diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts index 41d0720..6fa3754 100644 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts @@ -19,7 +19,6 @@ linux,phandle = 100; cpus { - #cpus = 1; #address-cells = 1; #size-cells =0; linux,phandle = 200; diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 260b2e4..423eedc 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts @@ -17,7 +17,6 @@ linux,phandle = 100; cpus { - #cpus = 1; #address-cells = 1; #size-cells = 0; linux,phandle = 200; diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 6d72190..a1533cc 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts @@ -16,7 +16,6 @@ #size-cells = 1; cpus { - #cpus = 1; #address-cells = 1; #size-cells = 0; diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index 06b3106..c798491 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts @@ -16,7 +16,6 @@ #size-cells = 1; cpus { - #cpus = 1; #address-cells = 1; #size-cells
[POWERPC] Remove some redundant isync instructions
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fdc0a9be3a63a71c12de86cc97d4cd8cf46239c0 Commit: fdc0a9be3a63a71c12de86cc97d4cd8cf46239c0 Parent: dbc11f539df7c9a32424b78afb0314c68d5e7d0b Author: MOKUNO Masakazu [EMAIL PROTECTED] AuthorDate: Mon Feb 26 17:21:05 2007 +0900 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:24 2007 +1100 [POWERPC] Remove some redundant isync instructions Remove some redundant isync instructions. enable_64b_mode() already does an isync, so there is no need to do it again. Signed-off-by: MOKUNO, Masakazu [EMAIL PROTECTED] Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/head_64.S |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 97cedcd..5a53ceb 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -1555,7 +1555,6 @@ _GLOBAL(generic_secondary_smp_init) /* turn on 64-bit mode */ bl .enable_64b_mode - isync /* Set up a paca value for this processor. Since we have the * physical cpu id in r24, we need to search the pacas to find @@ -1851,7 +1850,6 @@ __secondary_start_pmac_0: _GLOBAL(pmac_secondary_start) /* turn on 64-bit mode */ bl .enable_64b_mode - isync /* Copy some CPU settings from CPU 0 */ bl .__restore_cpu_ppc970 - 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] ps3: always make sure we're running on a PS3
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8170f524894b17a3f36351fe0e1a3fb6aca733ee Commit: 8170f524894b17a3f36351fe0e1a3fb6aca733ee Parent: 02567c6cdad4d6254052f25f3b93aa2771f48d25 Author: Geert Uytterhoeven [EMAIL PROTECTED] AuthorDate: Thu Feb 22 16:43:12 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 9 15:03:23 2007 +1100 [POWERPC] ps3: always make sure we're running on a PS3 Add missing checks to PS3 specific drivers ps3av and sys-manager to verify that we are actually running on a PS3 (pointed out by Arnd). Correct existing checks in other subsystems/drivers to return -ENODEV instead of zero. Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED] Acked-by: Arnd Bergmann [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/ps3/mm.c |2 +- arch/powerpc/platforms/ps3/system-bus.c |2 +- drivers/ps3/ps3av.c |9 - drivers/ps3/sys-manager.c |6 ++ drivers/ps3/vuart.c |2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 42354de..2014d2b 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c @@ -294,7 +294,7 @@ static int __init ps3_mm_add_memory(void) unsigned long nr_pages; if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) - return 0; + return -ENODEV; BUG_ON(!mem_init_done); diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index a9f7e4a..3c48cce 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -172,7 +172,7 @@ int __init ps3_system_bus_init(void) int result; if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) - return 0; + return -ENODEV; result = bus_register(ps3_system_bus_type); BUG_ON(result); diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 1926b4d..d21e04c 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -24,6 +24,8 @@ #include linux/reboot.h #include linux/kernel.h #include linux/ioctl.h + +#include asm/firmware.h #include asm/lv1call.h #include asm/ps3av.h #include asm/ps3.h @@ -947,7 +949,12 @@ static struct ps3_vuart_port_driver ps3av_driver = { static int ps3av_module_init(void) { - int error = ps3_vuart_port_driver_register(ps3av_driver); + int error; + + if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) + return -ENODEV; + + error = ps3_vuart_port_driver_register(ps3av_driver); if (error) { printk(KERN_ERR %s: ps3_vuart_port_driver_register failed %d\n, diff --git a/drivers/ps3/sys-manager.c b/drivers/ps3/sys-manager.c index 0fc30be..3aa2b0d 100644 --- a/drivers/ps3/sys-manager.c +++ b/drivers/ps3/sys-manager.c @@ -22,7 +22,10 @@ #include linux/module.h #include linux/workqueue.h #include linux/reboot.h + +#include asm/firmware.h #include asm/ps3.h + #include vuart.h MODULE_AUTHOR(Sony Corporation); @@ -598,6 +601,9 @@ static struct ps3_vuart_port_driver ps3_sys_manager = { static int __init ps3_sys_manager_init(void) { + if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) + return -ENODEV; + return ps3_vuart_port_driver_register(ps3_sys_manager); } diff --git a/drivers/ps3/vuart.c b/drivers/ps3/vuart.c index 7462981..1adf186 100644 --- a/drivers/ps3/vuart.c +++ b/drivers/ps3/vuart.c @@ -1031,7 +1031,7 @@ int __init ps3_vuart_bus_init(void) pr_debug(%s:%d:\n, __func__, __LINE__); if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) - return 0; + return -ENODEV; init_MUTEX(vuart_bus_priv.probe_mutex); result = bus_register(ps3_vuart_bus); - 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] bootwrapper: Add ft_root_node().
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c71c04625483c1da91846fd6746057d24ad6be8 Commit: 7c71c04625483c1da91846fd6746057d24ad6be8 Parent: ce3edb30ec2b6350c4258e3d52e73b410e2ea12d Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:42 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 21:15:44 2007 +1100 [POWERPC] bootwrapper: Add ft_root_node(). Clean up some of the open-coded data structure references by providing a function to return a pointer to the tree's root node. This is only used in high-level functions trying to access the root of the tree, not in low-level code that is actually manipulating the data structure. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index c76c194..02823a8 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -29,6 +29,11 @@ #define _ALIGN(x, al) (((x) + (al) - 1) ~((al) - 1)) +static char *ft_root_node(struct ft_cxt *cxt) +{ + return cxt-rgn[FT_STRUCT].start; +} + /* Routines for keeping node ptrs returned by ft_find_device current */ /* First entry not used b/c it would return 0 and be taken as NULL/error */ static void *ft_node_add(struct ft_cxt *cxt, char *node) @@ -590,7 +595,7 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size) void ft_begin_tree(struct ft_cxt *cxt) { - cxt-p = cxt-rgn[FT_STRUCT].start; + cxt-p = ft_root_node(cxt); } void ft_end_tree(struct ft_cxt *cxt) @@ -636,7 +641,7 @@ void *ft_find_device(struct ft_cxt *cxt, const char *srch_path) /* require absolute path */ if (srch_path[0] != '/') return NULL; - node = ft_find_descendent(cxt, cxt-rgn[FT_STRUCT].start, srch_path); + node = ft_find_descendent(cxt, ft_root_node(cxt), srch_path); return ft_node_add(cxt, node); } @@ -717,7 +722,7 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) return cxt-genealogy[d 0 ? d - 1 : 0]; /* have to do it the hard way... */ - p = cxt-rgn[FT_STRUCT].start; + p = ft_root_node(cxt); d = 0; while ((p = ft_next(cxt, p, atom)) != NULL) { switch (atom.tag) { @@ -855,7 +860,7 @@ void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *path) char *p, *next; int depth = 0; - p = cxt-rgn[FT_STRUCT].start; + p = ft_root_node(cxt); while ((next = ft_next(cxt, p, atom)) != NULL) { switch (atom.tag) { case OF_DT_BEGIN_NODE: - 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] Allocate syscall number for sys_getcpu
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=02567c6cdad4d6254052f25f3b93aa2771f48d25 Commit: 02567c6cdad4d6254052f25f3b93aa2771f48d25 Parent: 30437b3e743f33e9b68f813ca24e547aa9fcf7d7 Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Wed Feb 21 14:53:50 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 8 15:43:47 2007 +1100 [POWERPC] Allocate syscall number for sys_getcpu I forgot to do this when wiring up the syscall. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- include/asm-powerpc/unistd.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index 0ae954e..bcc21bf 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h @@ -324,10 +324,11 @@ #define __NR_get_robust_list 299 #define __NR_set_robust_list 300 #define __NR_move_pages301 +#define __NR_getcpu302 #ifdef __KERNEL__ -#define __NR_syscalls 302 +#define __NR_syscalls 303 #define __NR__exit __NR_exit #define NR_syscalls__NR_syscalls - 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] bootwrapper: Make ft_get_phandle() accept and return NULL.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c8aa72633e65c5c215b0cdd9970642e2a4f9a9a3 Commit: c8aa72633e65c5c215b0cdd9970642e2a4f9a9a3 Parent: 1c53a496ba6132a37f052aa907e23445b3fe928c Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:45 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 21:15:50 2007 +1100 [POWERPC] bootwrapper: Make ft_get_phandle() accept and return NULL. Currently, if ft_get_phandle() is passed NULL it will allocate an entry for it and return a non-NULL phandle. This patch makes it simply pass the NULL through. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 971420a..6c18773 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -40,6 +40,9 @@ static void *ft_get_phandle(struct ft_cxt *cxt, char *node) { unsigned int i; + if (!node) + return NULL; + for (i = 1; i cxt-nodes_used; i++) /* already there? */ if (cxt-node_tbl[i] == node) return (void *)i; - 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] bootwrapper: Preserve the pp pointer in ft_make_space() when calling ft_reorder().
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78438b36011d8ef7d28ef63a30b11801be1eea71 Commit: 78438b36011d8ef7d28ef63a30b11801be1eea71 Parent: c8aa72633e65c5c215b0cdd9970642e2a4f9a9a3 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:47 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 21:15:52 2007 +1100 [POWERPC] bootwrapper: Preserve the pp pointer in ft_make_space() when calling ft_reorder(). The ft_reorder() function may change the start of the region of interest, so the pointer provided by the caller into that region must be fixed up to still point to the same datum. Signed-off-by: Scott Wood [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 6c18773..0fa4f98 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -261,8 +261,14 @@ static int ft_make_space(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn, char *str, *next; enum ft_rgn_id r; - if (!cxt-isordered !ft_reorder(cxt, nextra)) - return 0; + if (!cxt-isordered) { + unsigned long rgn_off = *pp - cxt-rgn[rgn].start; + + if (!ft_reorder(cxt, nextra)) + return 0; + + *pp = cxt-rgn[rgn].start + rgn_off; + } if (ft_shuffle(cxt, pp, rgn, nextra)) return 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
[POWERPC] bootwrapper: Use map_string() instead of lookup_string() in ft_prop().
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5adeef52ccc0229e06a6e0b2fefe442d8779f025 Commit: 5adeef52ccc0229e06a6e0b2fefe442d8779f025 Parent: 9dd2c31ab89a12571db89648bcc9992cf71b63d8 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:51 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 21:15:58 2007 +1100 [POWERPC] bootwrapper: Use map_string() instead of lookup_string() in ft_prop(). When adding a property, the property name should be added to the string table if it doesn't already exist. map_string() does that; lookup_string() will fail instead. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index f2a29ca..e319a65 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -429,7 +429,7 @@ int ft_prop(struct ft_cxt *cxt, const char *name, const void *data, { int off, len; - off = lookup_string(cxt, name); + off = map_string(cxt, name); if (off == NO_STRING) return -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
[POWERPC] bootwrapper: Modify *pp, not *p, in ft_shuffle().
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9dd2c31ab89a12571db89648bcc9992cf71b63d8 Commit: 9dd2c31ab89a12571db89648bcc9992cf71b63d8 Parent: 78438b36011d8ef7d28ef63a30b11801be1eea71 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:48 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Tue Mar 13 21:15:55 2007 +1100 [POWERPC] bootwrapper: Modify *pp, not *p, in ft_shuffle(). Move the caller's pointer back to match the change in the region's start, rather than alter a byte of the device tree's content. Signed-off-by: Scott Wood [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 0fa4f98..f2a29ca 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -246,7 +246,7 @@ static int ft_shuffle(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn, if (rgn == FT_STRUCT) ft_node_update_before(cxt, p, -nextra); } - *p -= nextra; + *pp -= nextra; cxt-rgn[rgn].start -= nextra; cxt-rgn[rgn].size += nextra; return 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
[POWERPC] bootwrapper: Add ft_find_device_rel().
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fc583411617bf8a466c68350697a806704e88fc3 Commit: fc583411617bf8a466c68350697a806704e88fc3 Parent: 5adeef52ccc0229e06a6e0b2fefe442d8779f025 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:53 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 15:49:08 2007 +1100 [POWERPC] bootwrapper: Add ft_find_device_rel(). Add a function to look up a relative, rather than absolute, path name. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 13 + arch/powerpc/boot/flatdevtree.h |2 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index e319a65..bd006f7 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -654,6 +654,19 @@ void *ft_find_device(struct ft_cxt *cxt, const char *srch_path) return ft_get_phandle(cxt, node); } +void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, + const char *srch_path) +{ + char *node; + + node = ft_node_ph2node(cxt, top); + if (node == NULL) + return NULL; + + node = ft_find_descendent(cxt, node, srch_path); + return ft_get_phandle(cxt, node); +} + void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path) { struct ft_atom atom; diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h index b9cd9f6..1f37ca2 100644 --- a/arch/powerpc/boot/flatdevtree.h +++ b/arch/powerpc/boot/flatdevtree.h @@ -97,6 +97,8 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size); void ft_dump_blob(const void *bphp); void ft_merge_blob(struct ft_cxt *cxt, void *blob); void *ft_find_device(struct ft_cxt *cxt, const char *srch_path); +void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, + const char *srch_path); void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path); int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, void *buf, const unsigned int buflen); - 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] bootwrapper: Refactor ft_get_prop() into internal and external functions.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c350038b2bdabb07611dcc8116b55f917ada09fa Commit: c350038b2bdabb07611dcc8116b55f917ada09fa Parent: fc583411617bf8a466c68350697a806704e88fc3 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:54 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 15:49:10 2007 +1100 [POWERPC] bootwrapper: Refactor ft_get_prop() into internal and external functions. The property searching part of ft_get_prop is factored out into an internal __ft_get_prop() which does not deal with phandles and does not copy the property data. ft_get_prop() is then a wrapper that does the phandle translation and copying. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 53 +-- 1 files changed, 34 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index bd006f7..9de267d 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -765,38 +765,53 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) return NULL; } -int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, - void *buf, const unsigned int buflen) +static const void *__ft_get_prop(struct ft_cxt *cxt, void *node, + const char *propname, unsigned int *len) { struct ft_atom atom; - void *node; - char *p; - int depth; - unsigned int size; - - node = ft_node_ph2node(cxt, phandle); - if (node == NULL) - return -1; - - depth = 0; - p = (char *)node; + int depth = 0; - while ((p = ft_next(cxt, p, atom)) != NULL) { + while ((node = ft_next(cxt, node, atom)) != NULL) { switch (atom.tag) { case OF_DT_BEGIN_NODE: ++depth; break; + case OF_DT_PROP: - if ((depth != 1) || strcmp(atom.name, propname)) + if (depth != 1 || strcmp(atom.name, propname)) break; - size = min(atom.size, buflen); - memcpy(buf, atom.data, size); - return atom.size; + + if (len) + *len = atom.size; + + return atom.data; + case OF_DT_END_NODE: if (--depth = 0) - return -1; + return NULL; } } + + return NULL; +} + +int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, + void *buf, const unsigned int buflen) +{ + const void *data; + unsigned int size; + + void *node = ft_node_ph2node(cxt, phandle); + if (!node) + return -1; + + data = __ft_get_prop(cxt, node, propname, size); + if (data) { + unsigned int clipped_size = min(size, buflen); + memcpy(buf, data, clipped_size); + return size; + } + return -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
[POWERPC] bootwrapper: Make ft_get_parent() return a phandle, and NULL if already top-level.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9ec7669fc07f80f6e39807f1ac319764a304319 Commit: a9ec7669fc07f80f6e39807f1ac319764a304319 Parent: c350038b2bdabb07611dcc8116b55f917ada09fa Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:56 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 15:49:11 2007 +1100 [POWERPC] bootwrapper: Make ft_get_parent() return a phandle, and NULL if already top-level. Most of ft_get_parent() is factored out into __ft_get_parent(), which deals only in internal node pointers. The ft_get_parent() wrapper handles phandle conversion in both directions (previously, ft_get_parent() did not convert its return value). It also now returns NULL as the parent of the toplevel node, rather than just returning the toplevel node again (which made it rather useless in loops). Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 21 + arch/powerpc/boot/flatdevtree.h |1 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 9de267d..88b178a 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -728,20 +728,15 @@ void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path) return NULL; } -void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) +void *__ft_get_parent(struct ft_cxt *cxt, void *node) { - void *node; int d; struct ft_atom atom; char *p; - node = ft_node_ph2node(cxt, phandle); - if (node == NULL) - return NULL; - for (d = 0; cxt-genealogy[d] != NULL; ++d) if (cxt-genealogy[d] == node) - return cxt-genealogy[d 0 ? d - 1 : 0]; + return d 0 ? cxt-genealogy[d - 1] : NULL; /* have to do it the hard way... */ p = ft_root_node(cxt); @@ -753,7 +748,7 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) if (node == atom.data) { /* found it */ cxt-genealogy[d + 1] = NULL; - return d 0 ? cxt-genealogy[d - 1] : node; + return d 0 ? cxt-genealogy[d - 1] : NULL; } ++d; break; @@ -765,6 +760,16 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) return NULL; } +void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) +{ + void *node = ft_node_ph2node(cxt, phandle); + if (node == NULL) + return NULL; + + node = __ft_get_parent(cxt, node); + return ft_get_phandle(cxt, node); +} + static const void *__ft_get_prop(struct ft_cxt *cxt, void *node, const char *propname, unsigned int *len) { diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h index 1f37ca2..9500424 100644 --- a/arch/powerpc/boot/flatdevtree.h +++ b/arch/powerpc/boot/flatdevtree.h @@ -104,5 +104,6 @@ int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, void *buf, const unsigned int buflen); int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, const void *buf, const unsigned int buflen); +void *ft_get_parent(struct ft_cxt *cxt, const void *phandle); #endif /* FLATDEVTREE_H */ - 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] Unexport mac_hid_mouse_emulate_buttons
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83ddcf5d364be7b1d8c214d2dd97753e1df589cd Commit: 83ddcf5d364be7b1d8c214d2dd97753e1df589cd Parent: d1bff9ed3c05859fe4a8d00e51f331f5d45350ed Author: Adrian Bunk [EMAIL PROTECTED] AuthorDate: Tue Feb 20 01:08:12 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 8 15:43:26 2007 +1100 [POWERPC] Unexport mac_hid_mouse_emulate_buttons This patch removes the unused EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons). Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- drivers/macintosh/mac_hid.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index c1fd816..1599dc3 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -102,8 +102,6 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down) return 0; } -EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons); - static int emumousebtn_input_register(void) { int 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
[POWERPC] bootwrapper: Add ft_find_node_by_prop_value().
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8941c0c495e8765206ec1017b1e069ce41bf6e8f Commit: 8941c0c495e8765206ec1017b1e069ce41bf6e8f Parent: a9ec7669fc07f80f6e39807f1ac319764a304319 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:58 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 15:49:14 2007 +1100 [POWERPC] bootwrapper: Add ft_find_node_by_prop_value(). ft_find_node_by_prop_value() finds nodes with the specified property/value pair. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: Mark A. Greer [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 65 +++ arch/powerpc/boot/flatdevtree.h |3 ++ 2 files changed, 68 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 88b178a..f6e37c2 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -820,6 +820,71 @@ int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, return -1; } +void *__ft_find_node_by_prop_value(struct ft_cxt *cxt, void *prev, + const char *propname, const char *propval, + unsigned int proplen) +{ + struct ft_atom atom; + char *p = ft_root_node(cxt); + char *next; + int past_prev = prev ? 0 : 1; + int depth = -1; + + while ((next = ft_next(cxt, p, atom)) != NULL) { + const void *data; + unsigned int size; + + switch (atom.tag) { + case OF_DT_BEGIN_NODE: + depth++; + + if (prev == p) { + past_prev = 1; + break; + } + + if (!past_prev || depth 1) + break; + + data = __ft_get_prop(cxt, p, propname, size); + if (!data || size != proplen) + break; + if (memcmp(data, propval, size)) + break; + + return p; + + case OF_DT_END_NODE: + if (depth-- == 0) + return NULL; + + break; + } + + p = next; + } + + return NULL; +} + +void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev, + const char *propname, const char *propval, + int proplen) +{ + void *node = NULL; + + if (prev) { + node = ft_node_ph2node(cxt, prev); + + if (!node) + return NULL; + } + + node = __ft_find_node_by_prop_value(cxt, node, propname, + propval, proplen); + return ft_get_phandle(cxt, node); +} + int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, const void *buf, const unsigned int buflen) { diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h index 9500424..e3e3e79 100644 --- a/arch/powerpc/boot/flatdevtree.h +++ b/arch/powerpc/boot/flatdevtree.h @@ -105,5 +105,8 @@ int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, const void *buf, const unsigned int buflen); void *ft_get_parent(struct ft_cxt *cxt, const void *phandle); +void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev, + const char *propname, const char *propval, + int proplen); #endif /* FLATDEVTREE_H */ - 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] bootwrapper: Make ft_create_node() pay attention to the parent parameter.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=86a1b63349bb2cbed6c2cbf8f9e9de9259a404df Commit: 86a1b63349bb2cbed6c2cbf8f9e9de9259a404df Parent: 8941c0c495e8765206ec1017b1e069ce41bf6e8f Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Mon Mar 12 14:41:59 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 15:49:15 2007 +1100 [POWERPC] bootwrapper: Make ft_create_node() pay attention to the parent parameter. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree.c | 17 - arch/powerpc/boot/flatdevtree.h |1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index f6e37c2..d00fbd9 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -961,19 +961,26 @@ int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname) return -1; } -void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *path) +void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name) { struct ft_atom atom; char *p, *next; int depth = 0; - p = ft_root_node(cxt); + if (parent) { + p = ft_node_ph2node(cxt, parent); + if (!p) + return NULL; + } else { + p = ft_root_node(cxt); + } + while ((next = ft_next(cxt, p, atom)) != NULL) { switch (atom.tag) { case OF_DT_BEGIN_NODE: ++depth; - if (depth == 1 strcmp(atom.name, path) == 0) - /* duplicate node path, return error */ + if (depth == 1 strcmp(atom.name, name) == 0) + /* duplicate node name, return error */ return NULL; break; case OF_DT_END_NODE: @@ -982,7 +989,7 @@ void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *path) break; /* end of node, insert here */ cxt-p = p; - ft_begin_node(cxt, path); + ft_begin_node(cxt, name); ft_end_node(cxt); return p; } diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h index e3e3e79..cb26325 100644 --- a/arch/powerpc/boot/flatdevtree.h +++ b/arch/powerpc/boot/flatdevtree.h @@ -108,5 +108,6 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle); void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev, const char *propname, const char *propval, int proplen); +void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name); #endif /* FLATDEVTREE_H */ - 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] 32-bit early_init() should zero from __bss_start to __bss_stop only
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=556b09c8189b9b3f5626ca73196009e397503f85 Commit: 556b09c8189b9b3f5626ca73196009e397503f85 Parent: 86a1b63349bb2cbed6c2cbf8f9e9de9259a404df Author: Mark A. Greer [EMAIL PROTECTED] AuthorDate: Wed Oct 25 16:36:49 2006 -0700 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] 32-bit early_init() should zero from __bss_start to __bss_stop only Currently, early_init() in setup_32.c zeroes from '_bss_start' to '_end'. It should only zero from '__bss_start' to '__bss_stop'. This patch does that. Signed-off-by: Mark A. Greer [EMAIL PROTECTED] Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/setup_32.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 44a6a3c..f688548 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -92,7 +92,8 @@ unsigned long __init early_init(unsigned long dt_ptr) /* First zero the BSS -- use memset_io, some platforms don't have * caches on yet */ - memset_io((void __iomem *)PTRRELOC(__bss_start), 0, _end - __bss_start); + memset_io((void __iomem *)PTRRELOC(__bss_start), 0, + __bss_stop - __bss_start); /* * Identify the CPU type and fix up code sections - 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] ibmebus: whitespace fixes
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a83088003cd53f3cd8d550ab5d7778866568d204 Commit: a83088003cd53f3cd8d550ab5d7778866568d204 Parent: 556b09c8189b9b3f5626ca73196009e397503f85 Author: Joachim Fenkes [EMAIL PROTECTED] AuthorDate: Fri Mar 9 18:56:46 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] ibmebus: whitespace fixes This fixes a lot of whitespace in ibmebus.[ch] Signed-off-by: Joachim Fenkes [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/ibmebus.c | 126 include/asm-powerpc/ibmebus.h | 42 +++--- 2 files changed, 84 insertions(+), 84 deletions(-) diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 82bd2f1..061df3a 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c @@ -3,35 +3,35 @@ * * Copyright (c) 2005 IBM Corporation * Heiko J Schick [EMAIL PROTECTED] - * + * * All rights reserved. * - * This source code is distributed under a dual license of GPL v2.0 and OpenIB - * BSD. + * This source code is distributed under a dual license of GPL v2.0 and OpenIB + * BSD. * * OpenIB BSD License * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation * and/or other materials - * provided with the distribution. + * provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ @@ -55,7 +55,7 @@ static void *ibmebus_alloc_coherent(struct device *dev, gfp_t flag) { void *mem; - + mem = kmalloc(size, flag); *dma_handle = (dma_addr_t)mem; @@ -63,7 +63,7 @@ static void *ibmebus_alloc_coherent(struct device *dev, } static void ibmebus_free_coherent(struct device *dev, - size_t size, void *vaddr, + size_t size, void *vaddr, dma_addr_t dma_handle) { kfree(vaddr); @@ -79,7 +79,7 @@ static dma_addr_t ibmebus_map_single(struct device *dev, static void ibmebus_unmap_single(struct device *dev, dma_addr_t dma_addr, -size_t size, +size_t size, enum dma_data_direction direction) { return; @@ -90,13 +90,13 @@ static int ibmebus_map_sg(struct device *dev, int nents, enum dma_data_direction direction) { int i; - + for (i = 0; i nents; i++) { - sg[i].dma_address = (dma_addr_t)page_address(sg[i].page) +
[POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6bccf755ff53241d46c01c229b3c2452b9029ec4 Commit: 6bccf755ff53241d46c01c229b3c2452b9029ec4 Parent: a83088003cd53f3cd8d550ab5d7778866568d204 Author: Joachim Fenkes [EMAIL PROTECTED] AuthorDate: Fri Mar 9 19:00:32 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup This adds two sysfs attributes to /sys/bus/ibmebus which can be used to notify the ebus driver of added / removed ebus devices in the OF device tree. Echoing the device's location code (as found in the OFDT ibm,loc-code property) into the probe attribute will notify ebus of addition of the device and cause the appropriate device driver's probe function to be called on the device. Likewise, echoing the location code into the remove attribute will cause the device to be removed from the system. The writes will block until the respective operation has finished and return an error code if the operation failed. In addition, two minor tidbits are fixed: - The fake root device used to provide a common parent for all ebus devices is now based on device instead of of_device - it had no associated devtree node. This saves several checks throughout the ebus driver. - The sysfs attributes are now generated automagically by device_register() instead of by the ibmebus code, which saves a few compiler warnings about unused return codes. Signed-off-by: Joachim Fenkes [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/ibmebus.c | 167 include/asm-powerpc/ibmebus.h |2 +- 2 files changed, 134 insertions(+), 35 deletions(-) diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 061df3a..8ed1163 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c @@ -2,6 +2,7 @@ * IBM PowerPC IBM eBus Infrastructure Support. * * Copyright (c) 2005 IBM Corporation + * Joachim Fenkes [EMAIL PROTECTED] * Heiko J Schick [EMAIL PROTECTED] * * All rights reserved. @@ -43,12 +44,14 @@ #include asm/ibmebus.h #include asm/abs_addr.h -static struct ibmebus_dev ibmebus_bus_device = { /* fake parent device */ - .name = ibmebus_bus_device.ofdev.dev.bus_id, - .ofdev.dev.bus_id = ibmebus, - .ofdev.dev.bus= ibmebus_bus_type, +#define MAX_LOC_CODE_LENGTH 80 + +static struct device ibmebus_bus_device = { /* fake parent device */ + .bus_id = ibmebus, }; +struct bus_type ibmebus_bus_type; + static void *ibmebus_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, @@ -158,21 +161,12 @@ static void __devinit ibmebus_dev_release(struct device *dev) kfree(to_ibmebus_dev(dev)); } -static ssize_t ibmebusdev_show_name(struct device *dev, - struct device_attribute *attr, char *buf) -{ - return sprintf(buf, %s\n, to_ibmebus_dev(dev)-name); -} -static DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, ibmebusdev_show_name, - NULL); - -static struct ibmebus_dev* __devinit ibmebus_register_device_common( +static int __devinit ibmebus_register_device_common( struct ibmebus_dev *dev, const char *name) { int err = 0; - dev-name = name; - dev-ofdev.dev.parent = ibmebus_bus_device.ofdev.dev; + dev-ofdev.dev.parent = ibmebus_bus_device; dev-ofdev.dev.bus = ibmebus_bus_type; dev-ofdev.dev.release = ibmebus_dev_release; @@ -186,12 +180,10 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_common( if ((err = of_device_register(dev-ofdev)) != 0) { printk(KERN_ERR %s: failed to register device (%d).\n, __FUNCTION__, err); - return NULL; + return -ENODEV; } - device_create_file(dev-ofdev.dev, dev_attr_name); - - return dev; + return 0; } static struct ibmebus_dev* __devinit ibmebus_register_device_node( @@ -205,18 +197,18 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node( if (!loc_code) { printk(KERN_WARNING %s: node %s missing 'ibm,loc-code'\n, __FUNCTION__, dn-name ? dn-name : unknown); - return NULL; + return ERR_PTR(-EINVAL); } if (strlen(loc_code) == 0) { printk(KERN_WARNING %s: 'ibm,loc-code' is invalid\n, __FUNCTION__); - return NULL; + return ERR_PTR(-EINVAL); } dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); if (!dev) { -
[POWERPC] Update documentation for flat device tree format v17
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e0293c898c424c52e5d4e7f6923a203d06b9c4b Commit: 0e0293c898c424c52e5d4e7f6923a203d06b9c4b Parent: a782a9e3a12bcea4916117b0832016c24fffeb85 Author: David Gibson [EMAIL PROTECTED] AuthorDate: Wed Mar 14 11:50:40 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] Update documentation for flat device tree format v17 This patch updates booting-without-of.txt to describe version 17 of the flattened device tree format. Version 17 is a small, backwards compatible change from version 16, adding an extra field giving the size of the device tree's structure block. At this time, the kernel has no use for the extra information, however its presence can make life easier for bootloaders or other software manipulating the tree. In addition this patch adds information on the size_dt_strings field of the device tree header, present since version 3 of the flattened tree format, but omitted from the documentation. It also makes changes to consistently refer to versions 16 and 17 as versions 16 and 17 in decimal, rather than version 0x10 which was occasionally used for version 16 previously. Finally, we also add the new field to the definition of the device tree header structure in prom.h Signed-off-by: David Gibson [EMAIL PROTECTED] Acked-by: Jon Loeliger [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- Documentation/powerpc/booting-without-of.txt | 29 - include/asm-powerpc/prom.h |2 + 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 6d5a5a0..a1f83f1 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -265,6 +265,9 @@ struct boot_param_header { booting on */ /* version 3 fields below */ u32 size_dt_strings;/* size of the strings block */ + +/* version 17 fields below */ +u32size_dt_struct; /* size of the DT structure block */ }; Along with the constants: @@ -335,10 +338,13 @@ struct boot_param_header { to reallocate it easily at boot and free up the unused flattened structure after expansion. Version 16 introduces a new more compact format for the tree itself that is however not backward - compatible. You should always generate a structure of the highest - version defined at the time of your implementation. Currently - that is version 16, unless you explicitly aim at being backward - compatible. + compatible. Version 17 adds an additional field, size_dt_struct, + allowing it to be reallocated or moved more easily (this is + particularly useful for bootloaders which need to make + adjustments to a device tree based on probed information). You + should always generate a structure of the highest version defined + at the time of your implementation. Currently that is version 17, + unless you explicitly aim at being backward compatible. - last_comp_version @@ -347,7 +353,7 @@ struct boot_param_header { is backward compatible with version 1 (that is, a kernel build for version 1 will be able to boot with a version 2 format). You should put a 1 in this field if you generate a device tree of - version 1 to 3, or 0x10 if you generate a tree of version 0x10 + version 1 to 3, or 16 if you generate a tree of version 16 or 17 using the new unit name format. - boot_cpuid_phys @@ -360,6 +366,17 @@ struct boot_param_header { point (see further chapters for more informations on the required device-tree contents) + - size_dt_strings + + This field only exists on version 3 and later headers. It + gives the size of the strings section of the device tree (which + starts at the offset given by off_dt_strings). + + - size_dt_struct + + This field only exists on version 17 and later headers. It gives + the size of the structure section of the device tree (which + starts at the offset given by off_dt_struct). So the typical layout of a DT block (though the various parts don't need to be in that order) looks like this (addresses go from top to @@ -417,7 +434,7 @@ root node who has no parent. A node has 2 names. The actual node name is generally contained in a property of type name in the node property list whose value is a zero terminated string and is mandatory for version 1 to 3 of the -format definition (as it is in Open Firmware). Version 0x10 makes it +format definition (as it is in Open Firmware). Version 16 makes it optional as it can generate it from the unit name defined
[POWERPC] Correct apparently misspelled XMON preprocessor symbol.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e85f008d016d2de59ee5b01dba18ea3dea41545b Commit: e85f008d016d2de59ee5b01dba18ea3dea41545b Parent: 7850ad5c39a40ae14ab37e030357e2ae8252af2b Author: Robert P. J. Day [EMAIL PROTECTED] AuthorDate: Thu Mar 8 11:19:39 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] Correct apparently misspelled XMON preprocessor symbol. Correct the apparent misspelling of XMON to CONFIG_XMON. Signed-off-by: Robert P. J. Day [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/chrp/setup.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 117c9a0..1edce72 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c @@ -427,7 +427,7 @@ static void __init chrp_find_openpic(void) of_node_put(np); } -#if defined(CONFIG_VT) defined(CONFIG_INPUT_ADBHID) defined(XMON) +#if defined(CONFIG_VT) defined(CONFIG_INPUT_ADBHID) defined(CONFIG_XMON) static struct irqaction xmon_irqaction = { .handler = xmon_irq, .mask = CPU_MASK_NONE, @@ -493,7 +493,7 @@ static void __init chrp_find_8259(void) void __init chrp_init_IRQ(void) { -#if defined(CONFIG_VT) defined(CONFIG_INPUT_ADBHID) defined(XMON) +#if defined(CONFIG_VT) defined(CONFIG_INPUT_ADBHID) defined(CONFIG_XMON) struct device_node *kbd; #endif chrp_find_openpic(); @@ -510,7 +510,7 @@ void __init chrp_init_IRQ(void) if (_chrp_type == _CHRP_Pegasos) ppc_md.get_irq= i8259_irq; -#if defined(CONFIG_VT) defined(CONFIG_INPUT_ADBHID) defined(XMON) +#if defined(CONFIG_VT) defined(CONFIG_INPUT_ADBHID) defined(CONFIG_XMON) /* see if there is a keyboard in the device tree with a parent of type adb */ for (kbd = find_devices(keyboard); kbd; kbd = kbd-next) - 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] bootwrapper: Add dt_ops methods.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a07940ba00218267493798e89e3f4a86fea53125 Commit: a07940ba00218267493798e89e3f4a86fea53125 Parent: e85f008d016d2de59ee5b01dba18ea3dea41545b Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Fri Mar 16 12:27:54 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Wed Mar 21 22:35:21 2007 +1100 [POWERPC] bootwrapper: Add dt_ops methods. Add get_parent, create_node, and find_node_by_prop_value to dt_ops. Currently only implemented by flatdevtree_misc. Also, add a _str convenience wrapper for setprop. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/flatdevtree_misc.c | 42 +-- arch/powerpc/boot/ops.h | 51 ++ 2 files changed, 83 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/boot/flatdevtree_misc.c b/arch/powerpc/boot/flatdevtree_misc.c index 04da38f..4341e65 100644 --- a/arch/powerpc/boot/flatdevtree_misc.c +++ b/arch/powerpc/boot/flatdevtree_misc.c @@ -16,24 +16,43 @@ static struct ft_cxt cxt; -static void *ft_finddevice(const char *name) +static void *fdtm_finddevice(const char *name) { return ft_find_device(cxt, name); } -static int ft_getprop(const void *phandle, const char *propname, void *buf, - const int buflen) +static int fdtm_getprop(const void *phandle, const char *propname, +void *buf, const int buflen) { return ft_get_prop(cxt, phandle, propname, buf, buflen); } -static int ft_setprop(const void *phandle, const char *propname, - const void *buf, const int buflen) +static int fdtm_setprop(const void *phandle, const char *propname, +const void *buf, const int buflen) { return ft_set_prop(cxt, phandle, propname, buf, buflen); } -static unsigned long ft_finalize(void) +static void *fdtm_get_parent(const void *phandle) +{ + return ft_get_parent(cxt, phandle); +} + +static void *fdtm_create_node(const void *phandle, const char *name) +{ + return ft_create_node(cxt, phandle, name); +} + +static void *fdtm_find_node_by_prop_value(const void *prev, + const char *propname, + const char *propval, + int proplen) +{ + return ft_find_node_by_prop_value(cxt, prev, propname, + propval, proplen); +} + +static unsigned long fdtm_finalize(void) { ft_end_tree(cxt); return (unsigned long)cxt.bph; @@ -41,10 +60,13 @@ static unsigned long ft_finalize(void) int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device) { - dt_ops.finddevice = ft_finddevice; - dt_ops.getprop = ft_getprop; - dt_ops.setprop = ft_setprop; - dt_ops.finalize = ft_finalize; + dt_ops.finddevice = fdtm_finddevice; + dt_ops.getprop = fdtm_getprop; + dt_ops.setprop = fdtm_setprop; + dt_ops.get_parent = fdtm_get_parent; + dt_ops.create_node = fdtm_create_node; + dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value; + dt_ops.finalize = fdtm_finalize; return ft_open(cxt, dt_blob, max_size, max_find_device, platform_ops.realloc); diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 2b569ad..dae0e3b 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -13,6 +13,7 @@ #include stddef.h #include types.h +#include string.h #defineCOMMAND_LINE_SIZE 512 #defineMAX_PATH_LEN256 @@ -37,6 +38,12 @@ struct dt_ops { const int buflen); int (*setprop)(const void *phandle, const char *name, const void *buf, const int buflen); + void *(*get_parent)(const void *phandle); + /* The node must not already exist. */ + void *(*create_node)(const void *parent, const char *name); + void *(*find_node_by_prop_value)(const void *prev, +const char *propname, +const char *propval, int proplen); unsigned long (*finalize)(void); }; extern struct dt_ops dt_ops; @@ -89,6 +96,50 @@ static inline int setprop(void *devp, const char *name, void *buf, int buflen) return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; } +static inline int setprop_str(void *devp, const char *name, const char *buf) +{ + if (dt_ops.setprop) + return dt_ops.setprop(devp, name, buf, strlen(buf) + 1); + + return -1; +} + +static inline void *get_parent(const char *devp) +{ + return dt_ops.get_parent ? dt_ops.get_parent(devp)
[POWERPC] bootwrapper: Make compression of the kernel image optional.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9903811bf8d130a26004f9cb27b66513a267908 Commit: a9903811bf8d130a26004f9cb27b66513a267908 Parent: a07940ba00218267493798e89e3f4a86fea53125 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Fri Mar 16 12:27:59 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Wed Mar 21 22:35:21 2007 +1100 [POWERPC] bootwrapper: Make compression of the kernel image optional. The --no-gzip option can be passed to the wrapper so that the kernel image is included uncompressed into the zImage. This is intended for bootloaders where the zImage itself can be compressed, or where boot time is considered more important than kernel image size. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/wrapper | 24 +--- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 157d8c8..f9238f5 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -29,6 +29,7 @@ initrd= dtb= dts= cacheit= +gzip=.gz # cross-compilation prefix CROSS= @@ -42,7 +43,7 @@ tmpdir=. usage() { echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' 2 echo ' [-d devtree] [-s tree.dts] [-c] [-C cross-prefix]' 2 -echo ' [-D datadir] [-W workingdir] [vmlinux]' 2 +echo ' [-D datadir] [-W workingdir] [--no-gzip] [vmlinux]' 2 exit 1 } @@ -91,6 +92,9 @@ while [ $# -gt 0 ]; do [ $# -gt 0 ] || usage tmpdir=$1 ;; +--no-gzip) +gzip= +;; -?) usage ;; @@ -142,14 +146,20 @@ esac vmz=$tmpdir/`basename \$kernel\`.$ext if [ -z $cacheit -o ! -f $vmz.gz -o $vmz.gz -ot $kernel ]; then ${CROSS}objcopy $objflags $kernel $vmz.$$ -gzip -f -9 $vmz.$$ + +if [ -n $gzip ]; then +gzip -f -9 $vmz.$$ +fi + if [ -n $cacheit ]; then - mv -f $vmz.$$.gz $vmz.gz + mv -f $vmz.$$$gzip $vmz$gzip else vmz=$vmz.$$ fi fi +vmz=$vmz$gzip + case $platform in uboot) rm -f $ofile @@ -159,9 +169,9 @@ uboot) version=-n Linux-$version fi mkimage -A ppc -O linux -T kernel -C gzip -a -e \ - $version -d $vmz.gz $ofile + $version -d $vmz $ofile if [ -z $cacheit ]; then - rm -f $vmz.gz + rm -f $vmz fi exit 0 ;; @@ -173,9 +183,9 @@ addsec() { --set-section-flags=$3=contents,alloc,load,readonly,data } -addsec $tmp $vmz.gz $ksection $object/empty.o +addsec $tmp $vmz $ksection $object/empty.o if [ -z $cacheit ]; then -rm -f $vmz.gz +rm -f $vmz fi if [ -n $initrd ]; then - 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] Document the linux,network-index property.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0a2f28b4dee2a1e4c62dc8389f25defb284e387 Commit: e0a2f28b4dee2a1e4c62dc8389f25defb284e387 Parent: a9903811bf8d130a26004f9cb27b66513a267908 Author: Scott Wood [EMAIL PROTECTED] AuthorDate: Fri Mar 16 12:28:46 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Wed Mar 21 22:35:21 2007 +1100 [POWERPC] Document the linux,network-index property. To allow more robust association of each network device node with an index (such as is used by the firmware or an EEPROM to indicate MAC addresses), a network device's node may specify the index explicitly. Signed-off-by: Scott Wood [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- Documentation/powerpc/booting-without-of.txt | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index a1f83f1..88cdb59 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -1182,6 +1182,13 @@ platforms are moved over to use the flattened-device-tree model. - phy-handle : The phandle for the PHY connected to this ethernet controller. + Recommended properties: + +- linux,network-index : This is the intended index of this + network device. This is used by the bootwrapper to interpret + MAC addresses passed by the firmware when no information other + than indices is available to associate an address with a device. + Example: [EMAIL PROTECTED] { @@ -1550,6 +1557,12 @@ platforms are moved over to use the flattened-device-tree model. - mac-address : list of bytes representing the ethernet address. - phy-handle : The phandle for the PHY connected to this controller. + Recommended properties: + - linux,network-index : This is the intended index of this + network device. This is used by the bootwrapper to interpret + MAC addresses passed by the firmware when no information other + than indices is available to associate an address with a device. + Example: [EMAIL PROTECTED] { device_type = network; - 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] boot: rebuild when wrapper changes
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=65b580395d234350b53a03285b98c9a271eb5eb7 Commit: 65b580395d234350b53a03285b98c9a271eb5eb7 Parent: f61e7cd21b47b07002aa39d2f8f0db14b4a51719 Author: Milton Miller [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:58:04 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Wed Mar 21 22:35:40 2007 +1100 [POWERPC] boot: rebuild when wrapper changes Since there is magic defined per platform in the wrapper script, the zImage targets should depend on it. Signed-off-by: Milton Miller [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Acked-by: Segher Boessenkool [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/Makefile |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index b1fc029..d777cf9 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -101,7 +101,8 @@ extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ $(obj)/zImage.lds $(obj)/zImage.coff.lds wrapper:=$(srctree)/$(src)/wrapper -wrapperbits:= $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) +wrapperbits:= $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ + $(wrapper) # # Bits for building various flavours of zImage - 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] EEH: Tolerate high mmio
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2fd30be8dae25386fc5167c34c6d73201334a8d4 Commit: 2fd30be8dae25386fc5167c34c6d73201334a8d4 Parent: e0f90b64181d668ce5995a40f312ed21085bfa98 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:53:22 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:51 2007 +1100 [POWERPC] EEH: Tolerate high mmio Some drivers will attempt to perform a lot of mmio even after an EEH event was detected. This is especially the case for fast cpu's and PCI-E slots. Be a bit more lenient in allowing this. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 3d9f5c1..2d0a43f 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -74,7 +74,7 @@ * is broken and panic. This sets the threshold for how many read * attempts we allow before panicking. */ -#define EEH_MAX_FAILS 10 +#define EEH_MAX_FAILS 210 /* RTAS tokens */ static int ibm_set_eeh_option; - 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] EEH: Add clarifying messages.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0f90b64181d668ce5995a40f312ed21085bfa98 Commit: e0f90b64181d668ce5995a40f312ed21085bfa98 Parent: 39d16e295966a1f0025a65eaab4cb59fe5ba8c17 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:52:04 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:50 2007 +1100 [POWERPC] EEH: Add clarifying messages. There are multiple code patchs tht resuls in a permanent failure; when examining rare events, it can be hard to see which was taken. This patch adds printk's to assist. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh_driver.c | 20 +++- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index a4c0bf8..550fad2 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -367,8 +367,10 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) */ if ((event-state == pci_channel_io_perm_failure) ((event-time_unavail = 0) || -(event-time_unavail MAX_WAIT_FOR_RECOVERY*1000))) +(event-time_unavail MAX_WAIT_FOR_RECOVERY*1000))) { + printk(KERN_WARNING EEH: Permanent failure\n); goto hard_fail; + } eeh_slot_error_detail(frozen_pdn, 1 /* Temporary Error */); printk(KERN_WARNING @@ -390,8 +392,10 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) */ if (result == PCI_ERS_RESULT_NONE) { rc = eeh_reset_device(frozen_pdn, frozen_bus); - if (rc) + if (rc) { + printk(KERN_WARNING EEH: Unable to reset, rc=%d\n, rc); goto hard_fail; + } } /* If all devices reported they can proceed, then re-enable MMIO */ @@ -417,21 +421,27 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) } /* If any device has a hard failure, then shut off everything. */ - if (result == PCI_ERS_RESULT_DISCONNECT) + if (result == PCI_ERS_RESULT_DISCONNECT) { + printk(KERN_WARNING EEH: Device driver gave up\n); goto hard_fail; + } /* If any device called out for a reset, then reset the slot */ if (result == PCI_ERS_RESULT_NEED_RESET) { rc = eeh_reset_device(frozen_pdn, NULL); - if (rc) + if (rc) { + printk(KERN_WARNING EEH: Cannot reset, rc=%d\n, rc); goto hard_fail; + } result = PCI_ERS_RESULT_NONE; pci_walk_bus(frozen_bus, eeh_report_reset, result); } /* All devices should claim they have recovered by now. */ - if (result != PCI_ERS_RESULT_RECOVERED) + if (result != PCI_ERS_RESULT_RECOVERED) { + printk(KERN_WARNING EEH: Not recovered\n); goto hard_fail; + } /* Tell all device drivers that they can resume operations */ pci_walk_bus(frozen_bus, eeh_report_resume, NULL); - 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] EEH: hotplug recovery bugfix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90fdd6130f5c0053c48e8c8e247091739b6e4092 Commit: 90fdd6130f5c0053c48e8c8e247091739b6e4092 Parent: 147d6a37500348b6bda5738453d84c46678209cf Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:55:10 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:52 2007 +1100 [POWERPC] EEH: hotplug recovery bugfix If a device driver does not have native PCI error recovery, a hotplug error recovery will be attemped. In this case, the device driver will not report back whether its healthy or not; simply assume that it is. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh_driver.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 550fad2..d73c297 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -438,7 +438,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) } /* All devices should claim they have recovered by now. */ - if (result != PCI_ERS_RESULT_RECOVERED) { + if ((result != PCI_ERS_RESULT_RECOVERED) + (result != PCI_ERS_RESULT_NONE)) { printk(KERN_WARNING EEH: Not recovered\n); goto hard_fail; } - 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] EEH: multifunction recovery bugfix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5794dbcbab862e416c4ea4f10fda5e67f5565fd7 Commit: 5794dbcbab862e416c4ea4f10fda5e67f5565fd7 Parent: 90fdd6130f5c0053c48e8c8e247091739b6e4092 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:55:51 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:53 2007 +1100 [POWERPC] EEH: multifunction recovery bugfix If the second or higher function of a multi-function device fails to recover, this failure is not reported upwards. Fix this. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh_driver.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index d73c297..5ec6edf 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -158,7 +158,8 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata) return; rc = driver-err_handler-slot_reset(dev); - if (*res == PCI_ERS_RESULT_NONE) *res = rc; + if ((*res == PCI_ERS_RESULT_NONE) || + (*res == PCI_ERS_RESULT_RECOVERED)) *res = rc; if (*res == PCI_ERS_RESULT_DISCONNECT rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; } - 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] EEH: rm un-needed data
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0ab95ca9854174029cef2f08acf1859441cb547 Commit: d0ab95ca9854174029cef2f08acf1859441cb547 Parent: 9c547768e7d9f456f1b145102e75f79e30f7b709 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:59:10 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:55 2007 +1100 [POWERPC] EEH: rm un-needed data The EEH event notification system passes around data that is not needed or at least, not used properly. Stop passing this data; get it in a more reliable fashion. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c|8 +--- arch/powerpc/platforms/pseries/eeh_driver.c | 16 +++- arch/powerpc/platforms/pseries/eeh_event.c |6 +- include/asm-powerpc/eeh_event.h |6 +- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index c4604f7..1d05c9b 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -346,7 +346,6 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) int rets[3]; unsigned long flags; struct pci_dn *pdn; - enum pci_channel_state state; int rc = 0; total_mmio_ffs++; @@ -452,12 +451,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) eeh_mark_slot (dn, EEH_MODE_ISOLATED); spin_unlock_irqrestore(confirm_error_lock, flags); - state = pci_channel_io_normal; - if ((rets[0] == 1) || (rets[0] == 2) || (rets[0] == 4)) - state = pci_channel_io_frozen; - if (rets[0] == 5) - state = pci_channel_io_perm_failure; - eeh_send_failure_event (dn, dev, state, rets[2]); + eeh_send_failure_event (dn, dev); /* Most EEH events are due to device driver bugs. Having * a stack trace will help the device-driver authors figure diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 5ec6edf..6493f59 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -342,13 +342,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) return NULL; } -#if 0 - /* We may get permanent failure messages on empty slots. -* These are false alarms. Empty slots have no child dn. */ - if ((event-state == pci_channel_io_perm_failure) (frozen_device == NULL)) - return; -#endif - frozen_pdn = PCI_DN(frozen_dn); frozen_pdn-eeh_freeze_count++; @@ -363,12 +356,9 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) if (frozen_pdn-eeh_freeze_count EEH_MAX_ALLOWED_FREEZES) goto excess_failures; - /* If the reset state is a '5' and the time to reset is 0 (infinity) -* or is more then 15 seconds, then mark this as a permanent failure. -*/ - if ((event-state == pci_channel_io_perm_failure) - ((event-time_unavail = 0) || -(event-time_unavail MAX_WAIT_FOR_RECOVERY*1000))) { + /* Get the current PCI slot state. */ + rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000); + if (rc 0) { printk(KERN_WARNING EEH: Permanent failure\n); goto hard_fail; } diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 49037ed..221dec8 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c @@ -118,9 +118,7 @@ static void eeh_thread_launcher(struct work_struct *dummy) * (from a workqueue). */ int eeh_send_failure_event (struct device_node *dn, -struct pci_dev *dev, -enum pci_channel_state state, -int time_unavail) +struct pci_dev *dev) { unsigned long flags; struct eeh_event *event; @@ -144,8 +142,6 @@ int eeh_send_failure_event (struct device_node *dn, event-dn = dn; event-dev = dev; - event-state = state; - event-time_unavail = time_unavail; /* We may or may not be called in an interrupt context */ spin_lock_irqsave(eeh_eventlist_lock, flags); diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h index dc6bf0f..cc3cb04 100644 --- a/include/asm-powerpc/eeh_event.h +++ b/include/asm-powerpc/eeh_event.h @@ -30,8 +30,6 @@ struct eeh_event { struct list_head list; struct device_node *dn; /* struct device node */ struct pci_dev *dev; /* affected device */ -
[POWERPC] EEH: wait for slot status
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c547768e7d9f456f1b145102e75f79e30f7b709 Commit: 9c547768e7d9f456f1b145102e75f79e30f7b709 Parent: 90375f53960f2b1e8d2a6af3324d440e3a977bf3 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:58:07 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:54 2007 +1100 [POWERPC] EEH: wait for slot status Modify routine that returns PCI slot status to wait for slot status to become available. This is needed, as slots that are in some remote card cage may go offline for extended periods of time. New users for this routine in following patches. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c | 110 ++ include/asm-powerpc/ppc-pci.h|3 +- 2 files changed, 61 insertions(+), 52 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index cb8a151..c4604f7 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -76,6 +76,9 @@ */ #define EEH_MAX_FAILS 210 +/* Time to wait for a PCI slot to retport status, in milliseconds */ +#define PCI_BUS_RESET_WAIT_MSEC (60*1000) + /* RTAS tokens */ static int ibm_set_eeh_option; static int ibm_set_slot_reset; @@ -169,6 +172,55 @@ static int read_slot_reset_state(struct pci_dn *pdn, int rets[]) } /** + * eeh_wait_for_slot_status - returns error status of slot + * @pdn pci device node + * @max_wait_msecs maximum number to millisecs to wait + * + * Return negative value if a permanent error, else return + * Partition Endpoint (PE) status value. + * + * If @max_wait_msecs is positive, then this routine will + * sleep until a valid status can be obtained, or until + * the max allowed wait time is exceeded, in which case + * a -2 is returned. + */ +int +eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs) +{ + int rc; + int rets[3]; + int mwait; + + while (1) { + rc = read_slot_reset_state(pdn, rets); + if (rc) return rc; + if (rets[1] == 0) return -1; /* EEH is not supported */ + + if (rets[0] != 5) return rets[0]; /* return actual status */ + + if (rets[2] == 0) return -1; /* permanently unavailable */ + + if (max_wait_msecs = 0) return -1; + + mwait = rets[2]; + if (mwait = 0) { + printk (KERN_WARNING + EEH: Firmware returned bad wait value=%d\n, mwait); + mwait = 1000; + } else if (mwait 300*1000) { + printk (KERN_WARNING + EEH: Firmware is taking too long, time=%d\n, mwait); + mwait = 300*1000; + } + max_wait_msecs -= mwait; + msleep (mwait); + } + + printk(KERN_WARNING EEH: Timed out waiting for slot status\n); + return -2; +} + +/** * eeh_token_to_phys - convert EEH address token to phys address * @token i/o token, should be address in the form 0xA */ @@ -459,38 +511,6 @@ EXPORT_SYMBOL(eeh_check_failure); /* The code below deals with error recovery */ /** - * eeh_slot_availability - returns error status of slot - * @pdn pci device node - * - * Return negative value if a permanent error, else return - * a number of milliseconds to wait until the PCI slot is - * ready to be used. - */ -static int -eeh_slot_availability(struct pci_dn *pdn) -{ - int rc; - int rets[3]; - - rc = read_slot_reset_state(pdn, rets); - - if (rc) return rc; - - if (rets[1] == 0) return -1; /* EEH is not supported */ - if (rets[0] == 0) return 0; /* Oll Korrect */ - if (rets[0] == 5) { - if (rets[2] == 0) return -1; /* permanently unavailable */ - return rets[2]; /* number of millisecs to wait */ - } - if (rets[0] == 1) - return 250; - - printk (KERN_ERR EEH: Slot unavailable: rc=%d, rets=%d %d %d\n, - rc, rets[0], rets[1], rets[2]); - return -2; -} - -/** * rtas_pci_enable - enable MMIO or DMA transfers for this slot * @pdn pci device node */ @@ -596,36 +616,24 @@ int rtas_set_slot_reset(struct pci_dn *pdn) { int i, rc; - __rtas_set_slot_reset(pdn); + /* Take three shots at resetting the bus */ + for (i=0; i3; i++) { + __rtas_set_slot_reset(pdn); - /* Now double check with the firmware to make sure the device is -* ready to be used; if not, wait for recovery. */ - for (i=0; i10; i++) { - rc = eeh_slot_availability (pdn); + rc = eeh_wait_for_slot_status(pdn, PCI_BUS_RESET_WAIT_MSEC);
[POWERPC] EEH: verify state change
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa1be476a2baa0961f63161caee6733cdc353adb Commit: fa1be476a2baa0961f63161caee6733cdc353adb Parent: d0ab95ca9854174029cef2f08acf1859441cb547 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:59:59 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:56 2007 +1100 [POWERPC] EEH: verify state change After requesting a state change, verify that the state change actually ocurred, and the system ends up in the expected state. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c|6 +- arch/powerpc/platforms/pseries/eeh_driver.c |6 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 1d05c9b..eac2a63 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -527,9 +527,13 @@ rtas_pci_enable(struct pci_dn *pdn, int function) function); if (rc) - printk(KERN_WARNING EEH: Cannot enable function %d, err=%d dn=%s\n, + printk(KERN_WARNING EEH: Unexpected state change %d, err=%d dn=%s\n, function, rc, pdn-node-full_name); + rc = eeh_wait_for_slot_status (pdn, PCI_BUS_RESET_WAIT_MSEC); + if ((rc == 4) (function == EEH_THAW_MMIO)) + return 0; + return rc; } diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 6493f59..f5b4f7c 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -300,7 +300,7 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) /* The longest amount of time to wait for a pci device * to come back on line, in seconds. */ -#define MAX_WAIT_FOR_RECOVERY 15 +#define MAX_WAIT_FOR_RECOVERY 150 struct pci_dn * handle_eeh_events (struct eeh_event *event) { @@ -393,6 +393,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) if (result == PCI_ERS_RESULT_CAN_RECOVER) { rc = rtas_pci_enable(frozen_pdn, EEH_THAW_MMIO); + if (rc 0) + goto hard_fail; if (rc) { result = PCI_ERS_RESULT_NEED_RESET; } else { @@ -405,6 +407,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) if (result == PCI_ERS_RESULT_CAN_RECOVER) { rc = rtas_pci_enable(frozen_pdn, EEH_THAW_DMA); + if (rc 0) + goto hard_fail; if (rc) result = PCI_ERS_RESULT_NEED_RESET; else - 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] EEH: restructure multi-function support
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4980d5eb750288ffc0bb9daff3feb947e1bac61e Commit: 4980d5eb750288ffc0bb9daff3feb947e1bac61e Parent: fa1be476a2baa0961f63161caee6733cdc353adb Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 15:01:31 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:57 2007 +1100 [POWERPC] EEH: restructure multi-function support Rework how multi-function PCI devices are identified and traversed. This fixes a bug with multi-function recovery on Power4 that was introduced by a recent Power4 EEH patch. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c|4 +- arch/powerpc/platforms/pseries/eeh_driver.c | 30 -- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index eac2a63..a56be71 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -282,7 +282,7 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag) dn = find_device_pe (dn); /* Back up one, since config addrs might be shared */ - if (PCI_DN(dn) PCI_DN(dn)-eeh_pe_config_addr) + if (!pcibios_find_pci_bus(dn) PCI_DN(dn-parent)) dn = dn-parent; PCI_DN(dn)-eeh_mode |= mode_flag; @@ -316,7 +316,7 @@ void eeh_clear_slot (struct device_node *dn, int mode_flag) dn = find_device_pe (dn); /* Back up one, since config addrs might be shared */ - if (PCI_DN(dn) PCI_DN(dn)-eeh_pe_config_addr) + if (!pcibios_find_pci_bus(dn) PCI_DN(dn-parent)) dn = dn-parent; PCI_DN(dn)-eeh_mode = ~mode_flag; diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index f5b4f7c..8cc331e 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -249,6 +249,7 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata) static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) { + struct device_node *dn; int cnt, rc; /* pcibios will clear the counter; save the value */ @@ -264,23 +265,20 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) if (rc) return rc; - /* New-style config addrs might be shared across multiple devices, -* Walk over all functions on this device */ - if (pe_dn-eeh_pe_config_addr) { - struct device_node *pe = pe_dn-node; - pe = pe-parent-child; - while (pe) { - struct pci_dn *ppe = PCI_DN(pe); - if (pe_dn-eeh_pe_config_addr == ppe-eeh_pe_config_addr) { - rtas_configure_bridge(ppe); - eeh_restore_bars(ppe); - } - pe = pe-sibling; + /* Walk over all functions on this device. */ + dn = pe_dn-node; + if (!pcibios_find_pci_bus(dn) PCI_DN(dn-parent)) + dn = dn-parent-child; + + while (dn) { + struct pci_dn *ppe = PCI_DN(dn); + /* On Power4, always true because eeh_pe_config_addr=0 */ + if (pe_dn-eeh_pe_config_addr == ppe-eeh_pe_config_addr) { + rtas_configure_bridge(ppe); + eeh_restore_bars(ppe); } - } else { - rtas_configure_bridge(pe_dn); - eeh_restore_bars(pe_dn); - } + dn = dn-sibling; + } /* Give the system 5 seconds to finish running the user-space * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes, - 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] Minor paca optimisation
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e91948fd84086020072e022d5463036033d449c1 Commit: e91948fd84086020072e022d5463036033d449c1 Parent: 0e6806734fd861c360ecbb4262d3d5678cea7faf Author: Stephen Rothwell [EMAIL PROTECTED] AuthorDate: Fri Mar 16 17:47:07 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Wed Mar 21 22:35:51 2007 +1100 [POWERPC] Minor paca optimisation Move the slb_shadow_ptr field into the first cache line since it is (like everything there) read-only after boot. It is in fact statically initialised and thereafter only read. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] Acked-by: Michael Neuling [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- include/asm-powerpc/paca.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 0d3adc0..4de851d 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h @@ -70,6 +70,7 @@ struct paca_struct { s16 hw_cpu_id; /* Physical processor number */ u8 cpu_start; /* At startup, processor spins until */ /* this becomes non-zero. */ + struct slb_shadow *slb_shadow_ptr; /* * Now, starting in cacheline 2, the exception save areas @@ -101,8 +102,6 @@ struct paca_struct { u64 user_time; /* accumulated usermode TB ticks */ u64 system_time;/* accumulated system TB ticks */ u64 startpurr; /* PURR/TB value snapshot */ - - struct slb_shadow *slb_shadow_ptr; }; extern struct paca_struct paca[]; - 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] EEH: handle reset state high
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90375f53960f2b1e8d2a6af3324d440e3a977bf3 Commit: 90375f53960f2b1e8d2a6af3324d440e3a977bf3 Parent: 5794dbcbab862e416c4ea4f10fda5e67f5565fd7 Author: Linas Vepstas [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:56:43 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:54 2007 +1100 [POWERPC] EEH: handle reset state high Some firmware versions will return a slot reset state of 1 when a slot is EEH frozen. Recognize this as a state that can be handled. Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/pseries/eeh.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 44aae91..cb8a151 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -386,7 +386,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) } /* If not the kind of error we know about, punt. */ - if (rets[0] != 2 rets[0] != 4 rets[0] != 5) { + if (rets[0] != 1 rets[0] != 2 rets[0] != 4 rets[0] != 5) { false_positives++; rc = 0; goto dn_unlock; @@ -401,7 +401,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) spin_unlock_irqrestore(confirm_error_lock, flags); state = pci_channel_io_normal; - if ((rets[0] == 2) || (rets[0] == 4)) + if ((rets[0] == 1) || (rets[0] == 2) || (rets[0] == 4)) state = pci_channel_io_frozen; if (rets[0] == 5) state = pci_channel_io_perm_failure; @@ -410,7 +410,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) /* Most EEH events are due to device driver bugs. Having * a stack trace will help the device-driver authors figure * out what happened. So print that out. */ - if (rets[0] != 5) dump_stack(); + dump_stack(); return 1; dn_unlock: - 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 _get_SP
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4db196717c615db68100dee2de8f47d2dc19372 Commit: f4db196717c615db68100dee2de8f47d2dc19372 Parent: 4980d5eb750288ffc0bb9daff3feb947e1bac61e Author: Anton Blanchard [EMAIL PROTECTED] AuthorDate: Tue Mar 20 10:07:12 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:58 2007 +1100 [POWERPC] Remove _get_SP We already have an inline __get_SP, no need for yet another one. Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/misc_32.S |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 412bea3..98decf8 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -734,10 +734,6 @@ _GLOBAL(abs) sub r3,r3,r4 blr -_GLOBAL(_get_SP) - mr r3,r1 /* Close enough */ - blr - /* * Create a kernel thread * kernel_thread(fn, arg, 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
[POWERPC] Add missing oops_enter/oops_exit
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=293e4688fe2fec87fccf84a3b1100b27191424e9 Commit: 293e4688fe2fec87fccf84a3b1100b27191424e9 Parent: 4002aca771a2aa2848e94a98cf51a2cae4e77ae0 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] AuthorDate: Tue Mar 20 20:38:11 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:34:27 2007 +1000 [POWERPC] Add missing oops_enter/oops_exit Add missing oops_enter/oops_exit, makes pause_on_oops boot parameter work. Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/traps.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 17724fb..23f43b4 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -99,6 +99,8 @@ int die(const char *str, struct pt_regs *regs, long err) if (debugger(regs)) return 1; + oops_enter(); + console_verbose(); spin_lock_irq(die_lock); bust_spinlocks(1); @@ -145,6 +147,7 @@ int die(const char *str, struct pt_regs *regs, long err) if (panic_on_oops) panic(Fatal exception); + oops_exit(); do_exit(err); 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
[POWERPC] Handle recursive oopses
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=34c2a14fc20e4ab878fbf87e5f7fe1cff6afb3d4 Commit: 34c2a14fc20e4ab878fbf87e5f7fe1cff6afb3d4 Parent: 6031d9d9ad905b514bf45572bd1877fe6b5145ab Author: [EMAIL PROTECTED] [EMAIL PROTECTED] AuthorDate: Tue Mar 20 20:38:13 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:34:30 2007 +1000 [POWERPC] Handle recursive oopses Handle recursive oopses, like on x86. We had a few cases recently where we locked up in oops printing and didnt make it into crashdump. Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/traps.c | 52 +- 1 files changed, 36 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 6297da7..55d221f 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -108,42 +108,62 @@ static void pmac_backlight_unblank(void) static inline void pmac_backlight_unblank(void) { } #endif -static DEFINE_SPINLOCK(die_lock); - int die(const char *str, struct pt_regs *regs, long err) { + static struct { + spinlock_t lock; + u32 lock_owner; + int lock_owner_depth; + } die = { + .lock = __SPIN_LOCK_UNLOCKED(die.lock), + .lock_owner = -1, + .lock_owner_depth = 0 + }; static int die_counter; + unsigned long flags; if (debugger(regs)) return 1; oops_enter(); - console_verbose(); - spin_lock_irq(die_lock); - bust_spinlocks(1); - if (machine_is(powermac)) - pmac_backlight_unblank(); + if (die.lock_owner != raw_smp_processor_id()) { + console_verbose(); + spin_lock_irqsave(die.lock, flags); + die.lock_owner = smp_processor_id(); + die.lock_owner_depth = 0; + bust_spinlocks(1); + if (machine_is(powermac)) + pmac_backlight_unblank(); + } else { + local_save_flags(flags); + } - printk(Oops: %s, sig: %ld [#%d]\n, str, err, ++die_counter); + if (++die.lock_owner_depth 3) { + printk(Oops: %s, sig: %ld [#%d]\n, str, err, ++die_counter); #ifdef CONFIG_PREEMPT - printk(PREEMPT ); + printk(PREEMPT ); #endif #ifdef CONFIG_SMP - printk(SMP NR_CPUS=%d , NR_CPUS); + printk(SMP NR_CPUS=%d , NR_CPUS); #endif #ifdef CONFIG_DEBUG_PAGEALLOC - printk(DEBUG_PAGEALLOC ); + printk(DEBUG_PAGEALLOC ); #endif #ifdef CONFIG_NUMA - printk(NUMA ); + printk(NUMA ); #endif - printk(%s\n, ppc_md.name ? : ppc_md.name); + printk(%s\n, ppc_md.name ? : ppc_md.name); + + print_modules(); + show_regs(regs); + } else { + printk(Recursive die() failure, output suppressed\n); + } - print_modules(); - show_regs(regs); bust_spinlocks(0); - spin_unlock_irq(die_lock); + die.lock_owner = -1; + spin_unlock_irqrestore(die.lock, flags); if (kexec_should_crash(current) || kexec_sr_activated(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
[POWERPC] Clean up pmac_backlight_unblank in oops path
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6031d9d9ad905b514bf45572bd1877fe6b5145ab Commit: 6031d9d9ad905b514bf45572bd1877fe6b5145ab Parent: 293e4688fe2fec87fccf84a3b1100b27191424e9 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] AuthorDate: Tue Mar 20 20:38:12 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:34:29 2007 +1000 [POWERPC] Clean up pmac_backlight_unblank in oops path Move pmac_backlight_unblank into its own function and only take the pmac_backlight_mutex when we are on a pmac for that added bit of paranoia. Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/traps.c | 31 --- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 23f43b4..6297da7 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -90,6 +90,24 @@ EXPORT_SYMBOL(unregister_die_notifier); * Trap Exception support */ +#ifdef CONFIG_PMAC_BACKLIGHT +static void pmac_backlight_unblank(void) +{ + mutex_lock(pmac_backlight_mutex); + if (pmac_backlight) { + struct backlight_properties *props; + + props = pmac_backlight-props; + props-brightness = props-max_brightness; + props-power = FB_BLANK_UNBLANK; + backlight_update_status(pmac_backlight); + } + mutex_unlock(pmac_backlight_mutex); +} +#else +static inline void pmac_backlight_unblank(void) { } +#endif + static DEFINE_SPINLOCK(die_lock); int die(const char *str, struct pt_regs *regs, long err) @@ -104,18 +122,9 @@ int die(const char *str, struct pt_regs *regs, long err) console_verbose(); spin_lock_irq(die_lock); bust_spinlocks(1); -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(pmac_backlight_mutex); - if (machine_is(powermac) pmac_backlight) { - struct backlight_properties *props; + if (machine_is(powermac)) + pmac_backlight_unblank(); - props = pmac_backlight-props; - props-brightness = props-max_brightness; - props-power = FB_BLANK_UNBLANK; - backlight_update_status(pmac_backlight); - } - mutex_unlock(pmac_backlight_mutex); -#endif printk(Oops: %s, sig: %ld [#%d]\n, str, err, ++die_counter); #ifdef CONFIG_PREEMPT printk(PREEMPT ); - 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 last_syscall
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4002aca771a2aa2848e94a98cf51a2cae4e77ae0 Commit: 4002aca771a2aa2848e94a98cf51a2cae4e77ae0 Parent: f4db196717c615db68100dee2de8f47d2dc19372 Author: Anton Blanchard [EMAIL PROTECTED] AuthorDate: Tue Mar 20 10:08:33 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 22 22:52:58 2007 +1100 [POWERPC] Remove last_syscall Remove last_syscall from 32bit powerpc, its been gone in 64bit for years. Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/asm-offsets.c |1 - arch/powerpc/kernel/entry_32.S|1 - arch/powerpc/kernel/process.c |1 - arch/ppc/kernel/asm-offsets.c |1 - arch/ppc/kernel/entry.S |1 - include/asm-powerpc/processor.h |1 - 6 files changed, 0 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 030d300..9735e82 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -77,7 +77,6 @@ int main(void) DEFINE(KSP_VSID, offsetof(struct thread_struct, ksp_vsid)); #else /* CONFIG_PPC64 */ DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); - DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall)); #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); DEFINE(PT_PTRACED, PT_PTRACED); diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index c03e829..c29d165 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -191,7 +191,6 @@ stack_ovf: 0: _GLOBAL(DoSyscall) - stw r0,THREAD+LAST_SYSCALL(r2) stw r3,ORIG_GPR3(r1) li r12,0 stw r12,RESULT(r1) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 972b2ac..0df0492 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -567,7 +567,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, kregs-nip = *((unsigned long *)ret_from_fork); #else kregs-nip = (unsigned long)ret_from_fork; - p-thread.last_syscall = -1; #endif return 0; diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index 1f91eca..c5850a2 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c @@ -40,7 +40,6 @@ main(void) DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); DEFINE(KSP, offsetof(struct thread_struct, ksp)); DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); - DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall)); DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); DEFINE(THREAD_FPEXC_MODE, offsetof(struct thread_struct, fpexc_mode)); DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0])); diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index a9d4553..ab64256 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S @@ -191,7 +191,6 @@ stack_ovf: 0: _GLOBAL(DoSyscall) - stw r0,THREAD+LAST_SYSCALL(r2) stw r3,ORIG_GPR3(r1) li r12,0 stw r12,RESULT(r1) diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index a26c32e..d947b16 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h @@ -133,7 +133,6 @@ struct thread_struct { mm_segment_tfs; /* for get_fs() validation */ #ifdef CONFIG_PPC32 void*pgdir; /* root of page-table tree */ - signed long last_syscall; #endif #if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) unsigned long dbcr0; /* debug control register values */ - 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] boot: export flush_cache
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e6806734fd861c360ecbb4262d3d5678cea7faf Commit: 0e6806734fd861c360ecbb4262d3d5678cea7faf Parent: 65b580395d234350b53a03285b98c9a271eb5eb7 Author: Milton Miller [EMAIL PROTECTED] AuthorDate: Mon Mar 19 14:58:06 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Wed Mar 21 22:35:42 2007 +1100 [POWERPC] boot: export flush_cache Move the declaration of flush_cache to ops.h for use by platform code. Signed-off-by: Milton Miller [EMAIL PROTECTED] Acked-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/main.c |2 -- arch/powerpc/boot/ops.h |2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 8a60e13..d872b75 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c @@ -18,8 +18,6 @@ #include gunzip_util.h #include flatdevtree.h -extern void flush_cache(void *, unsigned long); - extern char _start[]; extern char __bss_start[]; extern char _end[]; diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 4d0cfd7..93608b7 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -79,7 +79,7 @@ int serial_console_init(void); int ns16550_console_init(void *devp, struct serial_console_data *scdp); void *simple_alloc_init(char *base, u32 heap_size, u32 granularity, u32 max_allocs); - +extern void flush_cache(void *, unsigned long); static inline void *finddevice(const char *name) { - 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] Fix backwards ? : when printing machine type
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae7f4463773dafac52d70c9803f283afe27ab1e3 Commit: ae7f4463773dafac52d70c9803f283afe27ab1e3 Parent: 34c2a14fc20e4ab878fbf87e5f7fe1cff6afb3d4 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] AuthorDate: Tue Mar 20 20:38:14 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:34:31 2007 +1000 [POWERPC] Fix backwards ? : when printing machine type Looks like someone got this backwards, highlighting the perils of the ? : !!! :) Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/traps.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 55d221f..f786222 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -153,7 +153,7 @@ int die(const char *str, struct pt_regs *regs, long err) #ifdef CONFIG_NUMA printk(NUMA ); #endif - printk(%s\n, ppc_md.name ? : ppc_md.name); + printk(%s\n, ppc_md.name ? ppc_md.name : ); print_modules(); show_regs(regs); - 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] Use lowercase for hex printouts in oops messages.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f6f7dde3f778b318aca71220834482d4ea2d7738 Commit: f6f7dde3f778b318aca71220834482d4ea2d7738 Parent: ae7f4463773dafac52d70c9803f283afe27ab1e3 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] AuthorDate: Tue Mar 20 20:38:19 2007 -0500 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:35:03 2007 +1000 [POWERPC] Use lowercase for hex printouts in oops messages. Use lowercase for hex printouts in oops messages. The number of times I have tried to copy and paste from an oops into an objdump search... Signed-off-by: Anton Blanchard [EMAIL PROTECTED] Acked-by: Olof Johansson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/process.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 0df0492..d7d7602 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -402,11 +402,11 @@ static void printbits(unsigned long val, struct regbit *bits) } #ifdef CONFIG_PPC64 -#define REG%016lX +#define REG%016lx #define REGS_PER_LINE 4 #define LAST_VOLATILE 13 #else -#define REG%08lX +#define REG%08lx #define REGS_PER_LINE 8 #define LAST_VOLATILE 12 #endif @@ -421,7 +421,7 @@ void show_regs(struct pt_regs * regs) regs, regs-trap, print_tainted(), init_utsname()-release); printk(MSR: REG , regs-msr); printbits(regs-msr, msr_bits); - printk( CR: %08lX XER: %08lX\n, regs-ccr, regs-xer); + printk( CR: %08lx XER: %08lx\n, regs-ccr, regs-xer); trap = TRAP(regs); if (trap == 0x300 || trap == 0x600) printk(DAR: REG, DSISR: REG\n, regs-dar, regs-dsisr); - 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] Add documentation for the zImage's gunzip convenience functions
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7850ad5c39a40ae14ab37e030357e2ae8252af2b Commit: 7850ad5c39a40ae14ab37e030357e2ae8252af2b Parent: 0e0293c898c424c52e5d4e7f6923a203d06b9c4b Author: David Gibson [EMAIL PROTECTED] AuthorDate: Wed Mar 14 16:32:17 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] Add documentation for the zImage's gunzip convenience functions This patch adds documenting comments to the gunzip convenience functions added in commit ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb. It also removes a stray newline, and an unused global variable. Signed-off-by: David Gibson [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/boot/gunzip_util.c | 81 ++- arch/powerpc/boot/gunzip_util.h | 17 - 2 files changed, 95 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/boot/gunzip_util.c b/arch/powerpc/boot/gunzip_util.c index 3d9ff8f..f7c95f2 100644 --- a/arch/powerpc/boot/gunzip_util.c +++ b/arch/powerpc/boot/gunzip_util.c @@ -14,14 +14,31 @@ #include ops.h #include gunzip_util.h -struct gunzip_state state; - #define HEAD_CRC 2 #define EXTRA_FIELD4 #define ORIG_NAME 8 #define COMMENT0x10 #define RESERVED 0xe0 +/** + * gunzip_start - prepare to decompress gzip data + * @state: decompressor state structure to be initialized + * @src: buffer containing gzip compressed or uncompressed data + * @srclen:size in bytes of the buffer at src + * + * If the buffer at @src contains a gzip header, this function + * initializes zlib to decompress the data, storing the decompression + * state in @state. The other functions in this file can then be used + * to decompress data from the gzipped stream. + * + * If the buffer at @src does not contain a gzip header, it is assumed + * to contain uncompressed data. The buffer information is recorded + * in @state and the other functions in this file will simply copy + * data from the uncompressed data stream at @src. + * + * Any errors, such as bad compressed data, cause an error to be + * printed an the platform's exit() function to be called. + */ void gunzip_start(struct gunzip_state *state, void *src, int srclen) { char *hdr = src; @@ -73,6 +90,22 @@ void gunzip_start(struct gunzip_state *state, void *src, int srclen) state-s.avail_in = srclen - hdrlen; } +/** + * gunzip_partial - extract bytes from a gzip data stream + * @state: gzip state structure previously initialized by gunzip_start() + * @dst: buffer to store extracted data + * @dstlen:maximum number of bytes to extract + * + * This function extracts at most @dstlen bytes from the data stream + * previously associated with @state by gunzip_start(), decompressing + * if necessary. Exactly @dstlen bytes are extracted unless the data + * stream doesn't contain enough bytes, in which case the entire + * remainder of the stream is decompressed. + * + * Returns the actual number of bytes extracted. If any errors occur, + * such as a corrupted compressed stream, an error is printed an the + * platform's exit() function is called. + */ int gunzip_partial(struct gunzip_state *state, void *dst, int dstlen) { int len; @@ -99,6 +132,20 @@ int gunzip_partial(struct gunzip_state *state, void *dst, int dstlen) return len; } +/** + * gunzip_exactly - extract a fixed number of bytes from a gzip data stream + * @state: gzip state structure previously initialized by gunzip_start() + * @dst: buffer to store extracted data + * @dstlen:number of bytes to extract + * + * This function extracts exactly @dstlen bytes from the data stream + * previously associated with @state by gunzip_start(), decompressing + * if necessary. + * + * If there are less @dstlen bytes available in the data stream, or if + * any other errors occur, such as a corrupted compressed stream, an + * error is printed an the platform's exit() function is called. + */ void gunzip_exactly(struct gunzip_state *state, void *dst, int dstlen) { int len; @@ -110,6 +157,21 @@ void gunzip_exactly(struct gunzip_state *state, void *dst, int dstlen) } } +/** + * gunzip_discard - discard bytes from a gzip data stream + * @state: gzip state structure previously initialized by gunzip_start() + * @len: number of bytes to discard + * + * This function extracts, then discards exactly @len bytes from the + * data stream previously associated with @state by gunzip_start(). + * Subsequent gunzip_partial(), gunzip_exactly() or gunzip_finish() + * calls will extract the data following the discarded bytes in the + * data stream. + * + * If there are less @len bytes available in the data stream, or if + * any other errors occur, such as a corrupted compressed stream, an + * error is
[POWERPC] ppc: Fix PCIX configuration of Ocotea Taishan for 512MB DDR
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec5f77e789a02adf7c45f03a76455b4e71ae1c5b Commit: ec5f77e789a02adf7c45f03a76455b4e71ae1c5b Parent: f6f7dde3f778b318aca71220834482d4ea2d7738 Author: Stefan Roese [EMAIL PROTECTED] AuthorDate: Fri Mar 16 21:06:00 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:35:11 2007 +1000 [POWERPC] ppc: Fix PCIX configuration of Ocotea Taishan for 512MB DDR Change the configuration of the PCIX PCI-PLB inbound memory window to be 2GB instead of 512kB. The comment already mentioned 2GB, but the code unfortunately didn't reflect this. Signed-off-by: Stefan Roese [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/ppc/platforms/4xx/ocotea.c |2 +- arch/ppc/platforms/4xx/taishan.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 84e999d..c8017c9 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c @@ -178,7 +178,7 @@ ocotea_setup_pcix(void) /* Setup 2GB PCI-PLB inbound memory window at 0, enable MSIs */ PCIX_WRITEL(0x, PCIX0_PIM0LAH); PCIX_WRITEL(0x, PCIX0_PIM0LAL); - PCIX_WRITEL(0xe007, PCIX0_PIM0SA); + PCIX_WRITEL(0x8007, PCIX0_PIM0SA); eieio(); } diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c index bb0253e..5d9af8d 100644 --- a/arch/ppc/platforms/4xx/taishan.c +++ b/arch/ppc/platforms/4xx/taishan.c @@ -235,7 +235,7 @@ taishan_setup_pcix(void) /* Setup 2GB PCI-PLB inbound memory window at 0, enable MSIs */ PCIX_WRITEL(0x, PCIX0_PIM0LAH); PCIX_WRITEL(0x, PCIX0_PIM0LAL); - PCIX_WRITEL(0xe007, PCIX0_PIM0SA); + PCIX_WRITEL(0x8007, PCIX0_PIM0SA); PCIX_WRITEL(0x, PCIX0_PIM0SAH); iounmap(pcix_reg_base); - 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 interrupt-controller as a property under /chosen
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1bff9ed3c05859fe4a8d00e51f331f5d45350ed Commit: d1bff9ed3c05859fe4a8d00e51f331f5d45350ed Parent: bb72c481e970dc1b4034ddccbe8302ff39e0d948 Author: Stuart Yoder [EMAIL PROTECTED] AuthorDate: Mon Feb 19 11:25:05 2007 -0600 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 8 15:43:23 2007 +1100 [POWERPC] Remove interrupt-controller as a property under /chosen Remove interrupt-controller as a valid property under /chosen in the documentation. There is a consensus that an interrupt-controller property does not belong under /chosen. /chosen is specifically for dynamic properties set at runtime. Signed-off-by: Stuart Yoder [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- Documentation/powerpc/booting-without-of.txt | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index b41397d..eaa0c32 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -832,8 +832,7 @@ address which can extend beyond that limit. This node is a bit special. Normally, that's where open firmware puts some variable environment information, like the arguments, or - phandle pointers to nodes like the main interrupt controller, or the - default input/output devices. + the default input/output devices. This specification makes a few of these mandatory, but also defines some linux-specific properties that would be normally constructed by @@ -853,14 +852,14 @@ address which can extend beyond that limit. that the kernel tries to find out the default console and has knowledge of various types like 8250 serial ports. You may want to extend this function to add your own. -- interrupt-controller : This is one cell containing a phandle - value that matches the linux,phandle property of your main - interrupt controller node. May be used for interrupt routing. - Note that u-boot creates and fills in the chosen node for platforms that use it. + (Note: a practice that is now obsolete was to include a property + under /chosen called interrupt-controller which had a phandle value + that pointed to the main interrupt controller) + f) the /socSOCname node This node is used to represent a system-on-a-chip (SOC) and must be - 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] Harden validate_sp against stack corruption
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb72c481e970dc1b4034ddccbe8302ff39e0d948 Commit: bb72c481e970dc1b4034ddccbe8302ff39e0d948 Parent: 99ddef9bfe714c3273e3fce4c6b6a2a99e7d0bf8 Author: Paul Mackerras [EMAIL PROTECTED] AuthorDate: Mon Feb 19 11:42:42 2007 +1100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 8 15:31:43 2007 +1100 [POWERPC] Harden validate_sp against stack corruption If something has overflowed or corrupted the stack and causes an oops, and we try to print a stack trace, that will call validate_sp, which can itself cause an oops if the cpu field of the thread_info struct at the bottom of the stack has been corrupted (if CONFIG_IRQSTACKS is set). This makes debugging harder. To avoid the second oops, this adds a check to make sure that the cpu number is reasonable before using it to check whether the stack is on the softirq or hardirq stack. Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/kernel/process.c | 43 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index f3d4dd5..972b2ac 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -818,6 +818,35 @@ out: return error; } +#ifdef CONFIG_IRQSTACKS +static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, + unsigned long nbytes) +{ + unsigned long stack_page; + unsigned long cpu = task_cpu(p); + + /* +* Avoid crashing if the stack has overflowed and corrupted +* task_cpu(p), which is in the thread_info struct. +*/ + if (cpu NR_CPUS cpu_possible(cpu)) { + stack_page = (unsigned long) hardirq_ctx[cpu]; + if (sp = stack_page + sizeof(struct thread_struct) +sp = stack_page + THREAD_SIZE - nbytes) + return 1; + + stack_page = (unsigned long) softirq_ctx[cpu]; + if (sp = stack_page + sizeof(struct thread_struct) +sp = stack_page + THREAD_SIZE - nbytes) + return 1; + } + return 0; +} + +#else +#define valid_irq_stack(sp, p, nb) 0 +#endif /* CONFIG_IRQSTACKS */ + int validate_sp(unsigned long sp, struct task_struct *p, unsigned long nbytes) { @@ -827,19 +856,7 @@ int validate_sp(unsigned long sp, struct task_struct *p, sp = stack_page + THREAD_SIZE - nbytes) return 1; -#ifdef CONFIG_IRQSTACKS - stack_page = (unsigned long) hardirq_ctx[task_cpu(p)]; - if (sp = stack_page + sizeof(struct thread_struct) -sp = stack_page + THREAD_SIZE - nbytes) - return 1; - - stack_page = (unsigned long) softirq_ctx[task_cpu(p)]; - if (sp = stack_page + sizeof(struct thread_struct) -sp = stack_page + THREAD_SIZE - nbytes) - return 1; -#endif - - return 0; + return valid_irq_stack(sp, p, nbytes); } #ifdef CONFIG_PPC64 - 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] 8xx parenthesis balance
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a782a9e3a12bcea4916117b0832016c24fffeb85 Commit: a782a9e3a12bcea4916117b0832016c24fffeb85 Parent: 6bccf755ff53241d46c01c229b3c2452b9029ec4 Author: Mariusz Kozlowski [EMAIL PROTECTED] AuthorDate: Thu Mar 15 23:20:44 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Fri Mar 16 16:38:19 2007 +1100 [POWERPC] 8xx parenthesis balance This balances parenthesis in powerpc 8xx header files. Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/platforms/8xx/mpc86xads.h |2 +- arch/powerpc/platforms/8xx/mpc885ads.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h index b5d19dd..59bad2f 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads.h +++ b/arch/powerpc/platforms/8xx/mpc86xads.h @@ -37,7 +37,7 @@ #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver -#define PCMCIA_MEM_ADDR(uint)0xff02) +#define PCMCIA_MEM_ADDR((uint)0xff02) #define PCMCIA_MEM_SIZE((uint)(64 * 1024)) /* Bits of interest in the BCSRs. diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h index 30cbebf..7c31aec 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads.h +++ b/arch/powerpc/platforms/8xx/mpc885ads.h @@ -37,7 +37,7 @@ #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver -#define PCMCIA_MEM_ADDR(uint)0xff02) +#define PCMCIA_MEM_ADDR((uint)0xff02) #define PCMCIA_MEM_SIZE((uint)(64 * 1024)) /* Bits of interest in the BCSRs. - 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] Fix compile error in prom.h
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99ddef9bfe714c3273e3fce4c6b6a2a99e7d0bf8 Commit: 99ddef9bfe714c3273e3fce4c6b6a2a99e7d0bf8 Parent: b5d99e64bc6ec1eef03ed5ffe99088b28f5ad4a4 Author: Andrew Morton [EMAIL PROTECTED] AuthorDate: Sat Feb 17 18:17:16 2007 -0700 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Thu Mar 8 15:31:40 2007 +1100 [POWERPC] Fix compile error in prom.h In file included from include/asm/pci.h:20, from include/linux/pci.h:751, from arch/powerpc/sysdev/dart_iommu.c:36: include/asm/prom.h: In function `of_irq_to_resource': include/asm/prom.h:341: warning: implicit declaration of function `irq_of_parse_and_map' include/asm/prom.h:345: error: `NO_IRQ' undeclared (first use in this function) include/asm/prom.h:345: error: (Each undeclared identifier is reported only once include/asm/prom.h:345: error: for each function it appears in.) Seems that prom.h has always wanted irq.h. Cc: Mathieu Desnoyers [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- include/asm-powerpc/prom.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 020ed01..1aa15e2 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h @@ -18,6 +18,7 @@ #include linux/types.h #include linux/proc_fs.h #include linux/platform_device.h +#include asm/irq.h #include asm/atomic.h /* Definitions used by the flattened device tree */ - 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 compilation breakage wjen debug is on
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b4cf205846463a0a23a917bb18ad833bc9a8c0bb Commit: b4cf205846463a0a23a917bb18ad833bc9a8c0bb Parent: 1c0d6dcf885badc72f72bfba9bc5b4f1469b8501 Author: Vitaly Wool [EMAIL PROTECTED] AuthorDate: Fri Apr 27 14:42:09 2007 +0400 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:34:30 2007 -0400 smc911x: fix compilation breakage wjen debug is on the patch below fixes compilation breakage of smc911x driver when ENABLE_SMC_DEBUG_PKTS equals to 1. Signed-off-by: Vitaly Wool [EMAIL PROTECTED] 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 8a2109a..81f2484 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -499,7 +499,7 @@ static inline void smc911x_rcv(struct net_device *dev) SMC_SET_RX_CFG(RX_CFG_RX_END_ALGN4_ | ((28) RX_CFG_RXDOFF_)); SMC_PULL_DATA(data, pkt_len+2+3); - DBG(SMC_DEBUG_PKTS, %s: Received packet\n, dev-name,); + DBG(SMC_DEBUG_PKTS, %s: Received packet\n, dev-name); PRINT_PKT(data, ((pkt_len - 4) = 64) ? pkt_len - 4 : 64); dev-last_rx = jiffies; skb-protocol = eth_type_trans(skb, 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
[POWERPC] Generic time suspend/resume code
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17e638bc28f2fdc9c0d3eebfb80fce43827b8d12 Commit: 17e638bc28f2fdc9c0d3eebfb80fce43827b8d12 Parent: ec5f77e789a02adf7c45f03a76455b4e71ae1c5b Author: Johannes Berg [EMAIL PROTECTED] AuthorDate: Mon Mar 19 11:53:53 2007 +0100 Committer: Paul Mackerras [EMAIL PROTECTED] CommitDate: Mon Mar 26 12:35:14 2007 +1000 [POWERPC] Generic time suspend/resume code This removes the time suspend/restore code that was done through a PMU notifier in arch/platforms/powermac/time.c. Instead, introduce arch/powerpc/sysdev/timer.c which creates a sys device and handles time of day suspend/resume through that. This should probably be replaced by using the generic RTC framework but for now it gets rid of the arcane powermac specific hack. Signed-off-by: Johannes Berg [EMAIL PROTECTED] Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] --- arch/powerpc/Kconfig |5 ++ arch/powerpc/platforms/powermac/time.c | 38 - arch/powerpc/sysdev/Makefile |3 + arch/powerpc/sysdev/timer.c| 70 4 files changed, 78 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e720527..ec092b7 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -11,6 +11,11 @@ config PPC64 This option selects whether a 32-bit or a 64-bit kernel will be built. +config PPC_PM_NEEDS_RTC_LIB + bool + select RTC_LIB + default y if PM + config PPC32 bool default y if !PPC64 diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c index a417390..bf9da56 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c @@ -297,49 +297,11 @@ int __init via_calibrate_decr(void) } #endif -#ifdef CONFIG_PM -/* - * Reset the time after a sleep. - */ -static int -time_sleep_notify(struct pmu_sleep_notifier *self, int when) -{ - static unsigned long time_diff; - unsigned long flags; - unsigned long seq; - struct timespec tv; - - switch (when) { - case PBOOK_SLEEP_NOW: - do { - seq = read_seqbegin_irqsave(xtime_lock, flags); - time_diff = xtime.tv_sec - pmac_get_boot_time(); - } while (read_seqretry_irqrestore(xtime_lock, seq, flags)); - break; - case PBOOK_WAKE: - tv.tv_sec = pmac_get_boot_time() + time_diff; - tv.tv_nsec = 0; - do_settimeofday(tv); - break; - } - return PBOOK_SLEEP_OK; -} - -static struct pmu_sleep_notifier time_sleep_notifier = { - time_sleep_notify, SLEEP_LEVEL_MISC, -}; -#endif /* CONFIG_PM */ - /* * Query the OF and get the decr frequency. */ void __init pmac_calibrate_decr(void) { -#if defined(CONFIG_PM) defined(CONFIG_ADB_PMU) - /* XXX why here? */ - pmu_register_sleep_notifier(time_sleep_notifier); -#endif - generic_calibrate_decr(); #ifdef CONFIG_PPC32 diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 26ca3ff..e57379d 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -14,6 +14,9 @@ obj-$(CONFIG_FSL_SOC) += fsl_soc.o obj-$(CONFIG_TSI108_BRIDGE)+= tsi108_pci.o tsi108_dev.o obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ +# contains only the suspend handler for time +obj-$(CONFIG_PM) += timer.o + ifeq ($(CONFIG_PPC_MERGE),y) obj-$(CONFIG_PPC_I8259)+= i8259.o obj-$(CONFIG_PPC_83xx) += ipic.o diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c new file mode 100644 index 000..bdbf8fe --- /dev/null +++ b/arch/powerpc/sysdev/timer.c @@ -0,0 +1,70 @@ +/* + * Common code to keep time when machine suspends. + * + * Copyright 2007 Johannes Berg [EMAIL PROTECTED] + * + * GPLv2 + */ + +#include linux/time.h +#include asm/rtc.h + +static unsigned long suspend_rtc_time; + +/* + * Reset the time after a sleep. + */ +static int timer_resume(struct sys_device *dev) +{ + struct timeval tv; + struct timespec ts; + struct rtc_time cur_rtc_tm; + unsigned long cur_rtc_time, diff; + + /* get current RTC time and convert to seconds */ + get_rtc_time(cur_rtc_tm); + rtc_tm_to_time(cur_rtc_tm, cur_rtc_time); + + diff = cur_rtc_time - suspend_rtc_time; + + /* adjust time of day by seconds that elapsed while +* we were suspended */ + do_gettimeofday(tv); + ts.tv_sec = tv.tv_sec + diff; + ts.tv_nsec = tv.tv_usec * NSEC_PER_USEC; + do_settimeofday(ts); + + return 0; +} + +static int timer_suspend(struct sys_device *dev, pm_message_t state) +{ +
NetXen: Port swap feature for multi port cards
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6c80b18df3537d1221ab34555c150bccbfd90260 Commit: 6c80b18df3537d1221ab34555c150bccbfd90260 Parent: 5d512f5594f9f4829b099c87f7bc6f683ef146ca Author: Mithlesh Thukral [EMAIL PROTECTED] AuthorDate: Fri Apr 20 07:55:26 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:06 2007 -0400 NetXen: Port swap feature for multi port cards NetXen: Port Swap feature This patch will allow a port numbers on the card to be swapped in host driver. This feature is applicable to cards having more than 1 port. Signed-off by: Milan Bag [EMAIL PROTECTED] Signed-off by: Mithlesh Thukral [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/netxen/netxen_nic.h | 21 ++- drivers/net/netxen/netxen_nic_ethtool.c | 143 ++- drivers/net/netxen/netxen_nic_hdr.h |3 + drivers/net/netxen/netxen_nic_hw.c | 67 ++-- drivers/net/netxen/netxen_nic_hw.h | 63 ++ drivers/net/netxen/netxen_nic_init.c |2 +- drivers/net/netxen/netxen_nic_isr.c | 29 ++-- drivers/net/netxen/netxen_nic_main.c | 306 ++ drivers/net/netxen/netxen_nic_niu.c | 93 ++--- drivers/net/netxen/netxen_nic_phan_reg.h |7 + 10 files changed, 468 insertions(+), 266 deletions(-) diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 923ae6c..1e944d5 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -205,6 +205,7 @@ enum { #define MAX_CMD_DESCRIPTORS1024 #define MAX_RCV_DESCRIPTORS16384 +#define MAX_CMD_DESCRIPTORS_HOST (MAX_CMD_DESCRIPTORS / 4) #define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4) #define MAX_JUMBO_RCV_DESCRIPTORS 1024 #define MAX_LRO_RCV_DESCRIPTORS64 @@ -303,6 +304,8 @@ struct netxen_ring_ctx { #define netxen_set_cmd_desc_port(cmd_desc, var)\ ((cmd_desc)-port_ctxid |= ((var) 0x0F)) +#define netxen_set_cmd_desc_ctxid(cmd_desc, var) \ + ((cmd_desc)-port_ctxid |= ((var) 0xF0)) #define netxen_set_cmd_desc_flags(cmd_desc, val) \ ((cmd_desc)-flags_opcode = ~cpu_to_le16(0x7f), \ @@ -445,7 +448,7 @@ struct status_desc { /* Bit pattern: 0-6 lro_count indicates frag sequence, 7 last_frag indicates last frag */ u8 lro; -} __attribute__ ((aligned(8))); +} __attribute__ ((aligned(16))); enum { NETXEN_RCV_PEG_0 = 0, @@ -723,6 +726,18 @@ struct netxen_skb_frag { u32 length; }; +#define _netxen_set_bits(config_word, start, bits, val){\ + unsigned long long __tmask = (((1ULL (bits)) - 1) (start));\ + unsigned long long __tvalue = (val);\ + (config_word) = ~__tmask; \ + (config_word) |= (((__tvalue) (start)) __tmask); \ +} + +#define _netxen_clear_bits(config_word, start, bits) {\ + unsigned long long __tmask = (((1ULL (bits)) - 1) (start)); \ + (config_word) = ~__tmask; \ +} + /*Following defines are for the state of the buffers*/ #defineNETXEN_BUFFER_FREE 0 #defineNETXEN_BUFFER_BUSY 1 @@ -767,6 +782,8 @@ struct netxen_hardware_context { void __iomem *pci_base0; void __iomem *pci_base1; void __iomem *pci_base2; + unsigned long first_page_group_end; + unsigned long first_page_group_start; void __iomem *db_base; unsigned long db_len; @@ -862,6 +879,7 @@ struct netxen_adapter { struct netxen_adapter *master; struct net_device *netdev; struct pci_dev *pdev; + struct net_device_stats net_stats; unsigned char mac_addr[ETH_ALEN]; int mtu; int portnum; @@ -1152,4 +1170,5 @@ extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr, extern struct ethtool_ops netxen_nic_ethtool_ops; +extern int physical_port[];/* physical port # from virtual port.*/ #endif /* __NETXEN_NIC_H_ */ diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 24c68f4..16fabb3 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c @@ -40,8 +40,8 @@ #include linux/ethtool.h #include linux/version.h -#include netxen_nic_hw.h #include netxen_nic.h +#include netxen_nic_hw.h #include netxen_nic_phan_reg.h struct netxen_nic_stats { @@ -379,7 +379,7 @@ netxen_nic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) for (i = 3; niu_registers[mode].reg[i - 3] != -1; i++) { /* GB: port specific registers */ if (mode == 0 i = 19) - window = adapter-portnum * +
e100: allow bad MAC address when running with invalid eeprom csum
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=948cd43fed7c7d919fa30e0609b2b5852c4503ef Commit: 948cd43fed7c7d919fa30e0609b2b5852c4503ef Parent: 1211bb6dcd935c48e864d4eecbf8a684e982419a Author: Jesse Brandeburg [EMAIL PROTECTED] AuthorDate: Thu Apr 26 09:43:11 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:07 2007 -0400 e100: allow bad MAC address when running with invalid eeprom csum Seved Torstendahl [EMAIL PROTECTED] suggested to let the module parameter for invalid eeprom checksum control the valid mac address test. If this bypass happens we should print a different message, or at least one that is correct, maybe something like below Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] Signed-off-by: Auke Kok [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/e100.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 71c6d33..135617c 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -2597,11 +2597,16 @@ static int __devinit e100_probe(struct pci_dev *pdev, memcpy(netdev-dev_addr, nic-eeprom, ETH_ALEN); memcpy(netdev-perm_addr, nic-eeprom, ETH_ALEN); - if(!is_valid_ether_addr(netdev-perm_addr)) { - DPRINTK(PROBE, ERR, Invalid MAC address from - EEPROM, aborting.\n); - err = -EAGAIN; - goto err_out_free; + if (!is_valid_ether_addr(netdev-perm_addr)) { + if (!eeprom_bad_csum_allow) { + DPRINTK(PROBE, ERR, Invalid MAC address from + EEPROM, aborting.\n); + err = -EAGAIN; + goto err_out_free; + } else { + DPRINTK(PROBE, ERR, Invalid MAC address from EEPROM, + you MUST configure one.\n); + } } /* Wol magic packet can be enabled from eeprom */ - 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
3C509: Remove unnecessary include of linux/pm_legacy.h
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b0dc5c1cfcdff806fe860a28d62fbf70af112e9 Commit: 3b0dc5c1cfcdff806fe860a28d62fbf70af112e9 Parent: 78403a929a176813d7911bebccad303a1fdfe281 Author: Robert P. J. Day [EMAIL PROTECTED] AuthorDate: Thu Apr 26 00:23:25 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:06 2007 -0400 3C509: Remove unnecessary include of linux/pm_legacy.h Remove the apparently redundant include of linux/pm_legacy.h. Signed-off-by: Robert P. J. Day [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/3c509.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index c7511c4..9588da3 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c @@ -83,7 +83,6 @@ static int max_interrupt_work = 10; #include linux/netdevice.h #include linux/etherdevice.h #include linux/pm.h -#include linux/pm_legacy.h #include linux/skbuff.h #include linux/delay.h /* for udelay() */ #include linux/spinlock.h - 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: fix for dlpar support
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1211bb6dcd935c48e864d4eecbf8a684e982419a Commit: 1211bb6dcd935c48e864d4eecbf8a684e982419a Parent: d1dea38d54311f6b3dd37ce485e794bd133e3593 Author: Thomas Klein [EMAIL PROTECTED] AuthorDate: Thu Apr 26 11:56:43 2007 +0200 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:06 2007 -0400 ehea: fix for dlpar support Certain resources may only be allocated when first logical port is available, and must be removed when last logical port has been removed. 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 | 67 -- 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 136a6c1..602872d 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -39,7 +39,7 @@ #include asm/io.h #define DRV_NAME ehea -#define DRV_VERSIONEHEA_0057 +#define DRV_VERSIONEHEA_0058 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 368f8e3..c7a5614 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2133,6 +2133,28 @@ static int ehea_clean_all_portres(struct ehea_port *port) return ret; } +static void ehea_remove_adapter_mr (struct ehea_adapter *adapter) +{ + int i; + + for (i=0; i EHEA_MAX_PORTS; i++) + if (adapter-port[i]) + return; + + ehea_rem_mr(adapter-mr); +} + +static int ehea_add_adapter_mr (struct ehea_adapter *adapter) +{ + int i; + + for (i=0; i EHEA_MAX_PORTS; i++) + if (adapter-port[i]) + return 0; + + return ehea_reg_kernel_mr(adapter, adapter-mr); +} + static int ehea_up(struct net_device *dev) { int ret, i; @@ -2583,7 +2605,6 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) struct device_node *eth_dn = NULL; u32 *dn_log_port_id; - int port_setup_ok = 0; int i = 0; lhea_dn = adapter-ebus_dev-ofdev.node; @@ -2597,6 +2618,12 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) continue; } + if (ehea_add_adapter_mr(adapter)) { + ehea_error(creating MR failed); + of_node_put(eth_dn); + return -EIO; + } + adapter-port[i] = ehea_setup_single_port(adapter, *dn_log_port_id, eth_dn); @@ -2604,18 +2631,13 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) ehea_info(%s - logical port id #%d, adapter-port[i]-netdev-name, *dn_log_port_id); + else + ehea_remove_adapter_mr(adapter); + i++; }; - /* Check for succesfully set up ports */ - for (i = 0; i EHEA_MAX_PORTS; i++) - if (adapter-port[i]) - port_setup_ok++; - - if (port_setup_ok) - return 0; /* At least some ports are setup correctly */ - - return -EINVAL; + return 0; } static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter, @@ -2667,6 +2689,11 @@ static ssize_t ehea_probe_port(struct device *dev, return -EINVAL; } + if (ehea_add_adapter_mr(adapter)) { + ehea_error(creating MR failed); + return -EIO; + } + port = ehea_setup_single_port(adapter, logical_port_id, eth_dn); of_node_put(eth_dn); @@ -2680,8 +2707,10 @@ static ssize_t ehea_probe_port(struct device *dev, ehea_info(added %s (logical port id=%d), port-netdev-name, logical_port_id); - } else + } else { + ehea_remove_adapter_mr(adapter); return -EIO; + } return (ssize_t) count; } @@ -2716,6 +2745,8 @@ static ssize_t ehea_remove_port(struct device *dev, return -EINVAL; } + ehea_remove_adapter_mr(adapter); + return (ssize_t) count; } @@ -2776,18 +2807,13 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev, dev-ofdev.dev.driver_data = adapter; - ret = ehea_reg_kernel_mr(adapter, adapter-mr); - if (ret) { - dev_err(dev-ofdev.dev, reg_mr_adapter failed\n); - goto out_free_ad; - } /* initialize adapter and ports */ /* get adapter
ehea: fix for sysfs entries
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1dea38d54311f6b3dd37ce485e794bd133e3593 Commit: d1dea38d54311f6b3dd37ce485e794bd133e3593 Parent: 3b0dc5c1cfcdff806fe860a28d62fbf70af112e9 Author: Thomas Klein [EMAIL PROTECTED] AuthorDate: Thu Apr 26 11:56:13 2007 +0200 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:06 2007 -0400 ehea: fix for sysfs entries Create symbolic link from each logical port to ehea driver 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 | 77 +- 2 files changed, 62 insertions(+), 17 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 1405d0b..136a6c1 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -39,7 +39,7 @@ #include asm/io.h #define DRV_NAME ehea -#define DRV_VERSIONEHEA_0055 +#define DRV_VERSIONEHEA_0057 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index e6fe2cf..368f8e3 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -78,6 +78,28 @@ MODULE_PARM_DESC(sq_entries, Number of entries for the Send Queue __MODULE_STRING(EHEA_DEF_ENTRIES_SQ) )); MODULE_PARM_DESC(use_mcs, 0:NAPI, 1:Multiple receive queues, Default = 1 ); +static int port_name_cnt = 0; + +static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev, +const struct of_device_id *id); + +static int __devexit ehea_remove(struct ibmebus_dev *dev); + +static struct of_device_id ehea_device_table[] = { + { + .name = lhea, + .compatible = IBM,lhea, + }, + {}, +}; + +static struct ibmebus_driver ehea_driver = { + .name = ehea, + .id_table = ehea_device_table, + .probe = ehea_probe_adapter, + .remove = ehea_remove, +}; + void ehea_dump(void *adr, int len, char *msg) { int x; unsigned char *deb = adr; @@ -2364,6 +2386,34 @@ static void __devinit logical_port_release(struct device *dev) of_node_put(port-ofdev.node); } +static int ehea_driver_sysfs_add(struct device *dev, + struct device_driver *driver) +{ + int ret; + + ret = sysfs_create_link(driver-kobj, dev-kobj, + kobject_name(dev-kobj)); + if (ret == 0) { + ret = sysfs_create_link(dev-kobj, driver-kobj, + driver); + if (ret) + sysfs_remove_link(driver-kobj, + kobject_name(dev-kobj)); + } + return ret; +} + +static void ehea_driver_sysfs_remove(struct device *dev, + struct device_driver *driver) +{ + struct device_driver *drv = driver; + + if (drv) { + sysfs_remove_link(drv-kobj, kobject_name(dev-kobj)); + sysfs_remove_link(dev-kobj, driver); + } +} + static struct device *ehea_register_port(struct ehea_port *port, struct device_node *dn) { @@ -2371,8 +2421,9 @@ static struct device *ehea_register_port(struct ehea_port *port, port-ofdev.node = of_node_get(dn); port-ofdev.dev.parent = port-adapter-ebus_dev-ofdev.dev; + port-ofdev.dev.bus = ibmebus_bus_type; - sprintf(port-ofdev.dev.bus_id, port%d, port-logical_port_id); + sprintf(port-ofdev.dev.bus_id, port%d, port_name_cnt++); port-ofdev.dev.release = logical_port_release; ret = of_device_register(port-ofdev); @@ -2387,8 +2438,16 @@ static struct device *ehea_register_port(struct ehea_port *port, goto out_unreg_of_dev; } + ret = ehea_driver_sysfs_add(port-ofdev.dev, ehea_driver.driver); + if (ret) { + ehea_error(failed to register sysfs driver link); + goto out_rem_dev_file; + } + return port-ofdev.dev; +out_rem_dev_file: + device_remove_file(port-ofdev.dev, dev_attr_log_port_id); out_unreg_of_dev: of_device_unregister(port-ofdev); out: @@ -2397,6 +2456,7 @@ out: static void ehea_unregister_port(struct ehea_port *port) { + ehea_driver_sysfs_remove(port-ofdev.dev, ehea_driver.driver); device_remove_file(port-ofdev.dev, dev_attr_log_port_id); of_device_unregister(port-ofdev); } @@ -2841,21 +2901,6 @@ static int check_module_parm(void) return ret; } -static struct of_device_id ehea_device_table[] = { - { - .name = lhea, - .compatible = IBM,lhea, - }, - {}, -}; - -static struct ibmebus_driver
NetXen: Fix for vmalloc issues
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78403a929a176813d7911bebccad303a1fdfe281 Commit: 78403a929a176813d7911bebccad303a1fdfe281 Parent: 6d1495f29a59aad464024693a413a945e274c1ed Author: Mithlesh Thukral [EMAIL PROTECTED] AuthorDate: Fri Apr 20 07:57:26 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:06 2007 -0400 NetXen: Fix for vmalloc issues NetXen: Fix vmalloc errors on seen on some X86 high end machines. Signed-off by: Milan Bag [EMAIL PROTECTED] Acked-by: Mithlesh Thukral [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/netxen/netxen_nic.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 5095a3f..ad6688e 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -131,8 +131,8 @@ extern struct workqueue_struct *netxen_workq; #define FIRST_PAGE_GROUP_START 0 #define FIRST_PAGE_GROUP_END 0x10 -#define SECOND_PAGE_GROUP_START0x400 -#define SECOND_PAGE_GROUP_END 0x66BC000 +#define SECOND_PAGE_GROUP_START0x600 +#define SECOND_PAGE_GROUP_END 0x68BC000 #define THIRD_PAGE_GROUP_START 0x70E4000 #define THIRD_PAGE_GROUP_END 0x800 - 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: ROUND_UP macro cleanup in drivers/net/e1000
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9099cfb9170f352f08207dfa099717a904cff71f Commit: 9099cfb9170f352f08207dfa099717a904cff71f Parent: abf17ffda7b7b6c83a29d7ccea91d46065c6ca3e Author: Milind Arun Choudhary [EMAIL PROTECTED] AuthorDate: Fri Apr 27 13:55:29 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Apr 28 11:01:07 2007 -0400 e1000: ROUND_UP macro cleanup in drivers/net/e1000 E1000_ROUNDUP macro cleanup, use ALIGN Signed-off-by: Milind Arun Choudhary [EMAIL PROTECTED] Signed-off-by: Auke Kok [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/e1000/e1000.h |3 --- drivers/net/e1000/e1000_ethtool.c |6 +++--- drivers/net/e1000/e1000_main.c| 10 +- drivers/net/e1000/e1000_param.c |4 ++-- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index dd4b728..a9ea67e 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -155,9 +155,6 @@ struct e1000_adapter; /* Number of packet split data buffers (not including the header buffer) */ #define PS_PAGE_BUFFERS MAX_PS_BUFFERS-1 -/* only works for sizes that are powers of 2 */ -#define E1000_ROUNDUP(i, size) ((i) = (((i) + (size) - 1) ~((size) - 1))) - /* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer */ struct e1000_buffer { diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 2881da1..bb08375 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -683,12 +683,12 @@ e1000_set_ringparam(struct net_device *netdev, rxdr-count = max(ring-rx_pending,(uint32_t)E1000_MIN_RXD); rxdr-count = min(rxdr-count,(uint32_t)(mac_type e1000_82544 ? E1000_MAX_RXD : E1000_MAX_82544_RXD)); - E1000_ROUNDUP(rxdr-count, REQ_RX_DESCRIPTOR_MULTIPLE); + rxdr-count = ALIGN(rxdr-count, REQ_RX_DESCRIPTOR_MULTIPLE); txdr-count = max(ring-tx_pending,(uint32_t)E1000_MIN_TXD); txdr-count = min(txdr-count,(uint32_t)(mac_type e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD)); - E1000_ROUNDUP(txdr-count, REQ_TX_DESCRIPTOR_MULTIPLE); + txdr-count = ALIGN(txdr-count, REQ_TX_DESCRIPTOR_MULTIPLE); for (i = 0; i adapter-num_tx_queues; i++) txdr[i].count = txdr-count; @@ -1065,7 +1065,7 @@ e1000_setup_desc_rings(struct e1000_adapter *adapter) } txdr-size = txdr-count * sizeof(struct e1000_tx_desc); - E1000_ROUNDUP(txdr-size, 4096); + txdr-size = ALIGN(txdr-size, 4096); if (!(txdr-desc = pci_alloc_consistent(pdev, txdr-size, txdr-dma))) { ret_val = 2; diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 7b12484..3a03a74 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -748,9 +748,9 @@ e1000_reset(struct e1000_adapter *adapter) VLAN_TAG_SIZE; min_tx_space = min_rx_space; min_tx_space *= 2; - E1000_ROUNDUP(min_tx_space, 1024); + min_tx_space = ALIGN(min_tx_space, 1024); min_tx_space = 10; - E1000_ROUNDUP(min_rx_space, 1024); + min_rx_space = ALIGN(min_rx_space, 1024); min_rx_space = 10; /* If current Tx allocation is less than the min Tx FIFO size, @@ -1556,7 +1556,7 @@ e1000_setup_tx_resources(struct e1000_adapter *adapter, /* round up to nearest 4K */ txdr-size = txdr-count * sizeof(struct e1000_tx_desc); - E1000_ROUNDUP(txdr-size, 4096); + txdr-size = ALIGN(txdr-size, 4096); txdr-desc = pci_alloc_consistent(pdev, txdr-size, txdr-dma); if (!txdr-desc) { @@ -1798,7 +1798,7 @@ e1000_setup_rx_resources(struct e1000_adapter *adapter, /* Round up to nearest 4K */ rxdr-size = rxdr-count * desc_len; - E1000_ROUNDUP(rxdr-size, 4096); + rxdr-size = ALIGN(rxdr-size, 4096); rxdr-desc = pci_alloc_consistent(pdev, rxdr-size, rxdr-dma); @@ -3170,7 +3170,7 @@ e1000_82547_fifo_workaround(struct e1000_adapter *adapter, struct sk_buff *skb) uint32_t fifo_space = adapter-tx_fifo_size - adapter-tx_fifo_head; uint32_t skb_fifo_len = skb-len + E1000_FIFO_HDR; - E1000_ROUNDUP(skb_fifo_len, E1000_FIFO_HDR); + skb_fifo_len = ALIGN(skb_fifo_len, E1000_FIFO_HDR); if (adapter-link_duplex != HALF_DUPLEX) goto no_fifo_stall_required; diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c index f8862e2..f485874 100644 --- a/drivers/net/e1000/e1000_param.c +++ b/drivers/net/e1000/e1000_param.c @@ -305,7 +305,7 @@