rpms/kernel/FC-4 jwltest-3c59x-resume-debug.patch, NONE, 1.1.8.1 jwltest-3c59x-resume.patch, NONE, 1.1.10.1 jwltest-acpi-dsdt-initrd.patch, NONE, 1.1.16.1 jwltest-b44-link-check.patch, NONE, 1.1.18.1 jwltest-ipw2100-1_1_0.patch, NONE, 1.1.20.1 jwltest-pci-d3hot-d0.patch, NONE, 1.1.6.1 kernel-2.6.spec, 1.1431, 1.1431.2.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Aug 22 19:55:22 UTC 2005
- Previous message (by thread): rpms/kernel/FC-4/configs config-generic, 1.33, 1.33.4.1 config-ia64-generic, 1.3, 1.3.26.1 config-x86-generic, 1.9, 1.9.2.1 config-x86_64-generic, 1.9, 1.9.8.1
- Next message (by thread): rpms/kernel/devel linux-2.6-compile-fixes.patch,1.24,1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: linville
Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv21784
Modified Files:
Tag: private-linville-fc4-jwltest-14-branch
kernel-2.6.spec
Added Files:
Tag: private-linville-fc4-jwltest-14-branch
jwltest-3c59x-resume-debug.patch jwltest-3c59x-resume.patch
jwltest-acpi-dsdt-initrd.patch jwltest-b44-link-check.patch
jwltest-ipw2100-1_1_0.patch jwltest-pci-d3hot-d0.patch
Log Message:
jwltest-3c59x-resume-debug.patch:
3c59x.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+)
--- NEW FILE jwltest-3c59x-resume-debug.patch ---
--- linux-2.6.12/drivers/net/3c59x.c.orig 2005-07-05 14:31:33.215024067 -0400
+++ linux-2.6.12/drivers/net/3c59x.c 2005-07-05 14:31:20.407728199 -0400
@@ -979,6 +979,20 @@ static int vortex_suspend (struct pci_de
static int vortex_resume (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
+ int pm;
+ u16 pmcsr;
+
+ pm = pci_find_capability(pdev, PCI_CAP_ID_PM);
+ if (pm) {
+ u16 state;
+
+ printk (KERN_ERR PFX "Entering %s\n", __FUNCTION__);
+ pci_read_config_word(pdev, pm + PCI_PM_CTRL, &pmcsr);
+ state = pmcsr & PCI_PM_CTRL_STATE_MASK;
+ printk (KERN_ERR PFX "pdev->current_state %d\n",
+ pdev->current_state);
+ printk (KERN_ERR PFX "pmcsr state %d\n", state);
+ }
if (dev && dev->priv) {
if (netif_running(dev)) {
@@ -986,6 +1000,18 @@ static int vortex_resume (struct pci_dev
netif_device_attach(dev);
}
}
+
+ if (pm) {
+ u16 state;
+
+ printk (KERN_ERR PFX "Exiting %s\n", __FUNCTION__);
+ pci_read_config_word(pdev, pm + PCI_PM_CTRL, &pmcsr);
+ state = pmcsr & PCI_PM_CTRL_STATE_MASK;
+ printk (KERN_ERR PFX "pdev->current_state %d\n",
+ pdev->current_state);
+ printk (KERN_ERR PFX "pmcsr state %d\n", state);
+ }
+
return 0;
}
@@ -1576,9 +1602,27 @@ vortex_up(struct net_device *dev)
struct vortex_private *vp = netdev_priv(dev);
unsigned int config;
int i;
+ int pm;
+ u16 pmcsr;
if (VORTEX_PCI(vp)) {
+ printk (KERN_ERR PFX "Calling pci_enable_device\n");
pci_enable_device(VORTEX_PCI(vp));
+
+ pm = pci_find_capability(VORTEX_PCI(vp), PCI_CAP_ID_PM);
+ if (pm) {
+ u16 state;
+
+ pci_read_config_word(VORTEX_PCI(vp), pm + PCI_PM_CTRL,
+ &pmcsr);
+ state = pmcsr & PCI_PM_CTRL_STATE_MASK;
+ printk (KERN_ERR PFX
+ "VORTEX_PCI(vp)->current_state %d\n",
+ VORTEX_PCI(vp)->current_state);
+ printk (KERN_ERR PFX "pmcsr state %d\n", state);
+ }
+
+ printk (KERN_ERR PFX "Calling pci_restore_state\n");
pci_restore_state(VORTEX_PCI(vp));
}
jwltest-3c59x-resume.patch:
3c59x.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
--- NEW FILE jwltest-3c59x-resume.patch ---
--- linux-2.6.12/drivers/net/3c59x.c.orig 2005-07-01 17:04:31.254440604 -0400
+++ linux-2.6.12/drivers/net/3c59x.c 2005-07-01 17:26:11.163398335 -0400
@@ -795,7 +795,6 @@ struct vortex_private {
partner_flow_ctrl:1, /* Partner supports flow control */
has_nway:1,
enable_wol:1, /* Wake-on-LAN is enabled */
- pm_state_valid:1, /* pci_dev->saved_config_space has sane contents */
open:1,
medialock:1,
must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */
@@ -1523,7 +1522,6 @@ static int __devinit vortex_probe1(struc
dev->poll_controller = poll_vortex;
#endif
if (pdev) {
- vp->pm_state_valid = 1;
pci_save_state(VORTEX_PCI(vp));
acpi_set_WOL(dev);
}
@@ -1580,10 +1578,8 @@ vortex_up(struct net_device *dev)
int i;
if (VORTEX_PCI(vp)) {
- pci_set_power_state(VORTEX_PCI(vp), PCI_D0); /* Go active */
- if (vp->pm_state_valid)
- pci_restore_state(VORTEX_PCI(vp));
pci_enable_device(VORTEX_PCI(vp));
+ pci_restore_state(VORTEX_PCI(vp));
}
/* Before initializing select the active media port. */
@@ -2742,7 +2738,6 @@ vortex_down(struct net_device *dev, int
outl(0, ioaddr + DownListPtr);
if (final_down && VORTEX_PCI(vp)) {
- vp->pm_state_valid = 1;
pci_save_state(VORTEX_PCI(vp));
acpi_set_WOL(dev);
}
@@ -3051,7 +3046,7 @@ static int vortex_ioctl(struct net_devic
/* The kernel core really should have pci_get_power_state() */
if(state != 0)
- pci_set_power_state(VORTEX_PCI(vp), PCI_D0);
+ pci_enable_device(VORTEX_PCI(vp));
spin_lock_irqsave(&vp->lock, flags);
EL3WINDOW(4);
err = generic_mii_ioctl(&vp->mii, if_mii(rq), cmd, NULL);
@@ -3271,9 +3266,8 @@ static void __devexit vortex_remove_one
unregister_netdev(dev);
if (VORTEX_PCI(vp)) {
- pci_set_power_state(VORTEX_PCI(vp), PCI_D0); /* Go active */
- if (vp->pm_state_valid)
- pci_restore_state(VORTEX_PCI(vp));
+ pci_enable_device(VORTEX_PCI(vp)); /* necessary */
+ pci_restore_state(VORTEX_PCI(vp));
pci_disable_device(VORTEX_PCI(vp));
}
/* Should really use issue_and_wait() here */
jwltest-acpi-dsdt-initrd.patch:
drivers/acpi/Kconfig | 13 ++++
drivers/acpi/osl.c | 115 +++++++++++++++++++++++++++++++++++++-------
drivers/acpi/tables/tbget.c | 8 ++-
init/main.c | 16 +++---
4 files changed, 126 insertions(+), 26 deletions(-)
--- NEW FILE jwltest-acpi-dsdt-initrd.patch ---
--- linux-2.6.12/drivers/acpi/Kconfig.orig 2005-06-17 15:48:29.000000000 -0400
+++ linux-2.6.12/drivers/acpi/Kconfig 2005-06-22 12:23:14.467811177 -0400
@@ -352,4 +352,17 @@ config ACPI_HOTPLUG_MEMORY
$>modprobe acpi_memhotplug
endif # ACPI
+config ACPI_INITRD
+ bool "Read DSDT from initrd or initramfs"
+ depends on ACPI && BLK_DEV_INITRD && !ACPI_CUSTOM_DSDT
+ default n
+ help
+ The DSDT (Differentiated System Description Table) often needs to be
+ overridden because of broken BIOS implementations. If you want to use
+ a customized DSDT, please use the mkinitrd tool (mkinitrd package) to
+ attach the DSDT to the initrd or initramfs
+ (see http://gaugusch.at/kernel.shtml for details)
+ If there is no DSDT found in the initrd, the DSDT from the BIOS is
+ used. It is save to say yes here.
+
endmenu
--- linux-2.6.12/drivers/acpi/osl.c.orig 2005-06-17 15:48:29.000000000 -0400
+++ linux-2.6.12/drivers/acpi/osl.c 2005-06-22 12:23:14.469810910 -0400
@@ -44,7 +44,10 @@
#include <asm/uaccess.h>
#include <linux/efi.h>
-
+#ifdef CONFIG_ACPI_INITRD
+#include<linux/syscalls.h>
+#include <linux/initrd.h>
+#endif
#define _COMPONENT ACPI_OS_SERVICES
ACPI_MODULE_NAME ("osl")
@@ -246,25 +249,105 @@ acpi_os_predefined_override (const struc
return AE_OK;
}
-acpi_status
-acpi_os_table_override (struct acpi_table_header *existing_table,
- struct acpi_table_header **new_table)
-{
- if (!existing_table || !new_table)
- return AE_BAD_PARAMETER;
+#ifdef CONFIG_ACPI_INITRD
+static char *
+acpi_find_dsdt_initrd(void)
+{
+ static const char signature[] = "INITRDDSDT123DSDT123";
+ char *dsdt_start = NULL;
+ char *dsdt_buffer = NULL;
+ unsigned long len = 0, len2 = 0;
+ int fd;
+ char ramfs_dsdt_name[10] = "/DSDT.aml";
+ struct kstat stat;
+
+ /* try to get dsdt from tail of initrd */
+ if ((fd = sys_open(ramfs_dsdt_name, O_RDONLY, 0)) < 0) {
+ if (initrd_start) {
+ char *data = (char *)initrd_start;
+
+ printk(KERN_INFO PREFIX "Looking for DSDT in initrd...");
+
+ /* Search for the start signature */
+ while (data < (char *)initrd_end - sizeof(signature) - 4) {
+ if (!memcmp(data, signature, sizeof(signature))) {
+ data += sizeof(signature);
+ if (!memcmp(data, "DSDT", 4))
+ dsdt_start = data;
+ break;
+ }
+ data++;
+ }
-#ifdef CONFIG_ACPI_CUSTOM_DSDT
- if (strncmp(existing_table->signature, "DSDT", 4) == 0)
- *new_table = (struct acpi_table_header*)AmlCode;
- else
+ if (dsdt_start){
+ printk(PREFIX " found at offset %zu",
+ dsdt_start - (char *)initrd_start);
+ len = (char*) initrd_end - dsdt_start;
+ printk(", size: %lu bytes\n", len);
+ dsdt_buffer = ACPI_MEM_ALLOCATE(len + 1);
+ memcpy(dsdt_buffer, dsdt_start, len);
+ *(dsdt_buffer + len + 1)= '\0';
+ }
+ else
+ printk(" not found!\n");
+ }
+ }
+ /* get dsdt from initramfs */
+ else{
+ printk(KERN_INFO PREFIX "Looking for DSDT in initramfs...");
+ if (vfs_stat(ramfs_dsdt_name, &stat) < 0){
+ printk ("error getting stats for file %s\n", ramfs_dsdt_name);
+ return NULL;
+ }
+
+ len = stat.size;
+ dsdt_buffer = ACPI_MEM_ALLOCATE(len + 1);
+ if (!dsdt_buffer) {
+ printk("Could not allocate %lu bytes of memory\n", len);
+ return NULL;
+ }
+ printk (" found %s ...", ramfs_dsdt_name);
+
+ len2 = sys_read (fd, (char __user *) dsdt_buffer, len);
+ if (len2 < len ){
+ printk(PREFIX "\nError trying to read %lu bytes from %s\n",
+ len, ramfs_dsdt_name);
+ ACPI_MEM_FREE (dsdt_buffer);
+ dsdt_buffer = NULL;
+ }
+ else{
+ printk(" successfully read %lu bytes from %s\n",
+ len, ramfs_dsdt_name);
+ *(dsdt_buffer + len + 1) = '\0';
+ }
+ }
+ if (!dsdt_buffer)
+ printk(" not found!\n");
+ return dsdt_buffer;
+}
+#endif
+
+acpi_status
+ acpi_os_table_override (struct acpi_table_header *existing_table,
+ struct acpi_table_header **new_table)
+ {
+ if (!existing_table || !new_table)
+ return AE_BAD_PARAMETER;
+
*new_table = NULL;
-#else
- *new_table = NULL;
+ if (strncmp(existing_table->signature, "DSDT", 4) == 0) {
+#ifdef CONFIG_ACPI_CUSTOM_DSDT
+ *new_table = (struct acpi_table_header*)AmlCode;
+#elif defined(CONFIG_ACPI_INITRD)
+ *new_table = (struct acpi_table_header*)acpi_find_dsdt_initrd();
#endif
+ if (*new_table)
+ printk(KERN_INFO PREFIX "Using customized DSDT\n");
+ }
return AE_OK;
-}
-
-static irqreturn_t
+ }
+
+ static irqreturn_t
acpi_irq(int irq, void *dev_id, struct pt_regs *regs)
{
return (*acpi_irq_handler)(acpi_irq_context) ? IRQ_HANDLED : IRQ_NONE;
--- linux-2.6.12/drivers/acpi/tables/tbget.c.orig 2005-06-17 15:48:29.000000000 -0400
+++ linux-2.6.12/drivers/acpi/tables/tbget.c 2005-06-22 12:23:14.471810644 -0400
@@ -45,7 +45,6 @@
#include <acpi/acpi.h>
#include <acpi/actables.h>
-
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbget")
@@ -287,12 +286,17 @@ acpi_tb_table_override (
acpi_format_exception (status)));
return_ACPI_STATUS (status);
}
-
+
/* Copy the table info */
ACPI_REPORT_INFO (("Table [%4.4s] replaced by host OS\n",
table_info->pointer->signature));
+#ifdef CONFIG_ACPI_INITRD
+ if (new_table)
+ ACPI_MEM_FREE(new_table);
+#endif
+
return_ACPI_STATUS (AE_OK);
}
--- linux-2.6.12/init/main.c.orig 2005-06-22 12:16:17.014413511 -0400
+++ linux-2.6.12/init/main.c 2005-06-22 12:23:14.473810378 -0400
@@ -520,8 +520,6 @@ asmlinkage void __init start_kernel(void
check_bugs();
- acpi_early_init(); /* before LAPIC and SMP init */
-
/* Do the rest non-__init'ed, we're now alive */
rest_init();
}
@@ -651,6 +649,14 @@ static int init(void * unused)
*/
child_reaper = current;
+ /*
+ * Do this before initcalls, because some drivers want to access
+ * firmware files.
+ */
+ populate_rootfs();
+
+ acpi_early_init(); /* before LAPIC and SMP init */
+
/* Sets up cpus_possible() */
smp_prepare_cpus(max_cpus);
@@ -661,12 +667,6 @@ static int init(void * unused)
cpuset_init_smp();
- /*
- * Do this before initcalls, because some drivers want to access
- * firmware files.
- */
- populate_rootfs();
-
do_basic_setup();
sched_init_smp();
jwltest-b44-link-check.patch:
b44.c | 3 +++
1 files changed, 3 insertions(+)
--- NEW FILE jwltest-b44-link-check.patch ---
--- linux-2.6.11/drivers/net/b44.c.orig 2005-06-07 09:51:48.349772547 -0400
+++ linux-2.6.11/drivers/net/b44.c 2005-06-07 09:55:19.579618942 -0400
@@ -1286,6 +1286,9 @@
b44_init_hw(bp);
bp->flags |= B44_FLAG_INIT_COMPLETE;
+ netif_carrier_off(dev);
+ b44_check_phy(bp);
+
spin_unlock_irq(&bp->lock);
init_timer(&bp->timer);
jwltest-ipw2100-1_1_0.patch:
Documentation/networking/README.ipw2100 | 162
drivers/net/wireless/Kconfig | 55
drivers/net/wireless/Makefile | 4
drivers/net/wireless/ieee80211/ieee80211.h | 85
drivers/net/wireless/ieee80211/ieee80211_crypt.c | 4
drivers/net/wireless/ieee80211/ieee80211_crypt.h | 6
drivers/net/wireless/ieee80211/ieee80211_crypt_ccmp.c | 3
drivers/net/wireless/ieee80211/ieee80211_crypt_tkip.c | 3
drivers/net/wireless/ieee80211/ieee80211_crypt_wep.c | 4
drivers/net/wireless/ieee80211/ieee80211_module.c | 50
drivers/net/wireless/ieee80211/ieee80211_rx.c | 226
drivers/net/wireless/ieee80211/ieee80211_tx.c | 113
drivers/net/wireless/ieee80211/ieee80211_wx.c | 148
drivers/net/wireless/ipw2100.c | 8649 +++++++++++++++++
drivers/net/wireless/ipw2100.h | 1278 ++
drivers/net/wireless/ipw2100/LICENSE | 339
drivers/net/wireless/ipw2100/Makefile | 15
drivers/net/wireless/ipw2100/ipw2100.c | 8972 ------------------
drivers/net/wireless/ipw2100/ipw2100.h | 1287 --
19 files changed, 10409 insertions(+), 10994 deletions(-)
--- NEW FILE jwltest-ipw2100-1_1_0.patch ---
--- linux-2.6.12/Documentation/networking/README.ipw2100.orig 2005-06-22 13:38:36.756298804 -0400
+++ linux-2.6.12/Documentation/networking/README.ipw2100 2005-06-22 13:39:36.938279261 -0400
@@ -1,32 +1,59 @@
-Intel PRO/Wireless 2100 802.11b Driver for Linux
+===========================
+Intel(R) PRO/Wireless 2100 Network Connection Driver for Linux
README.ipw2100
-October 13, 2004
+March 14, 2005
+===========================
+Index
+---------------------------
+0. Introduction
+1. Release 1.1.0 Current Features
+2. Command Line Parameters
+3. Sysfs Helper Files
+4. Radio Kill Switch
+5. Dynamic Firmware
+6. Power Management
+7. Support
+8. License
-Release 0.56 Current Features
+
+===========================
+0. Introduction
------------ ----- ----- ---- --- -- -
-- IBSS and BSS modes
-- 802.11 fragmentation
+This document provides a brief overview of the features supported by the
+IPW2100 driver project. The main project website, where the latest
+development version of the driver can be found, is:
+
+ http://ipw2100.sourceforge.net
+
+There you can find the not only the latest releases, but also information about
+potential fixes and patches, as well as links to the development mailing list
+for the driver project.
+
+
+===========================
+1. Release 1.1.0 Current Supported Features
+---------------------------
+- Managed (BSS) and Ad-Hoc (IBSS)
- WEP (shared key and open)
-- wireless extension support
-- 802.1x EAP via xsupplicant
+- Wireless Tools support
+- 802.1x (tested with XSupplicant 1.0.1)
+
+Enabled (but not supported) features:
- Monitor/RFMon mode
-- transmit power control
-- long/short preamble support
-- power states support (ACPI)
+- WPA/WPA2
-TODO
------------- ----- ----- ---- --- -- -
-- Fix bugs... The biggies:
- C3 corruption
- Fragmentation
+The distinction between officially supported and enabled is a reflection
+on the amount of validation and interoperability testing that has been
+performed on a given feature.
-Command Line Parameters
------------- ----- ----- ---- --- -- -
+===========================
+2. Command Line Parameters
+---------------------------
If the driver is built as a module, the following optional parameters are used
by entering them on the command line with the modprobe command using this
@@ -34,54 +61,82 @@ syntax:
modprobe ipw2100 [<option>=<VAL1><,VAL2>...]
-For example, to set the interface name for driver, entering:
-
- modprobe ipw2100 if_name=wlan%d
+For example, to disable the radio on driver loading, enter:
-results in the ipw2100 driver defaulting to the wlan prefix, with the system
-assigning a unique number in place of %d. The default interface name is eth%d.
+ modprobe ipw2100 disable=1
The ipw2100 driver supports the following module parameters:
Name Value Example:
debug 0x0-0xffffffff debug=1024
-if_name string if_name=wlan%d
mode 0,1,2 mode=1 /* AdHoc */
channel int channel=3 /* Only valid in AdHoc or Monitor */
associate boolean associate=0 /* Do NOT auto associate */
disable boolean disable=1 /* Do not power the HW */
-Radio Kill Switch
------------- ----- ----- ---- --- -- -
-Most laptops provide the ability for the user to physically disable the radio.
-Some vendors have implemented this as a physical switch that requires no
-software to turn the radio off and on. On other laptops, however, the switch
-is controlled through a button being pressed and a software driver then making
-calls to turn the radio off and on. This is referred to as a "software based
-RF kill switch"
+===========================
+3. Sysfs Helper Files
+---------------------------
-To determine if you have such a switch, you can check the contents of:
+There are several ways to control the behavior of the driver. Many of the
+general capabilities are exposed through the Wireless Tools (iwconfig). There
+are a few capabilities that are exposed through entries in the Linux Sysfs.
- /sys/bus/pci/drivers/ipw2100/*/rf_kill
-A value of:
+----- Driver Level ------
+For the driver level files, look in /sys/bus/pci/drivers/ipw2100/
+
+ debug_level
- Radio is {en,dis}abled by RF switch
+ This controls the same global as the 'debug' module parameter. For
+ information on the various debugging levels available, run the 'dvals'
+ script found in the driver source directory.
-means that you have an RF switch and the radio is in the state
-described.
+ NOTE: 'debug_level' is only enabled if CONFIG_IPW2100_DEBUG is turn
+ on.
-A value of:
+----- Device Level ------
+For the device level files look in
+
+ /sys/bus/pci/drivers/ipw2100/{PCI-ID}/
- Your hardware does not have an RF switch
+For example:
+ /sys/bus/pci/drivers/ipw2100/0000:02:01.0
-is self explanatory. In this case you should not need to worry about
-enabling the radio.
+For the device level files, see /sys/bus/pci/drivers/ipw2100:
+ rf_kill
+ read -
+ 0 = RF kill not enabled (radio on)
+ 1 = SW based RF kill active (radio off)
+ 2 = HW based RF kill active (radio off)
+ 3 = Both HW and SW RF kill active (radio off)
+ write -
+ 0 = If SW based RF kill active, turn the radio back on
+ 1 = If radio is on, activate SW based RF kill
+
+ NOTE: If you enable the SW based RF kill and then toggle the HW
+ based RF kill from ON -> OFF -> ON, the radio will NOT come back on
+
+
+===========================
+4. Radio Kill Switch
+---------------------------
+Most laptops provide the ability for the user to physically disable the radio.
+Some vendors have implemented this as a physical switch that requires no
+software to turn the radio off and on. On other laptops, however, the switch
+is controlled through a button being pressed and a software driver then making
+calls to turn the radio off and on. This is referred to as a "software based
+RF kill switch"
-Dynamic Firmware
------------- ----- ----- ---- --- -- -
+See the Sysfs helper file 'rf_kill' for determining the state of the RF switch
+on your system.
+
+
+===========================
+5. Dynamic Firmware
+---------------------------
As the firmware is licensed under a restricted use license, it can not be
included within the kernel sources. To enable the IPW2100 you will need a
firmware image to load into the wireless NIC's processors.
@@ -91,8 +146,9 @@ You can obtain these images from <http:/
See INSTALL for instructions on installing the firmware.
-Power Management
------------- ----- ----- ---- --- -- -
+===========================
+6. Power Management
+---------------------------
The IPW2100 supports the configuration of the Power Save Protocol
through a private wireless extension interface. The IPW2100 supports
[...22272 lines suppressed...]
+
+
+int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max)
+{
+ char ver[MAX_FW_VERSION_LEN];
+ u32 len = MAX_FW_VERSION_LEN;
+ u32 tmp;
+ int i;
+ /* firmware version is an ascii string (max len of 14) */
+ if (ipw2100_get_ordinal(priv, IPW_ORD_STAT_FW_VER_NUM,
+ ver, &len))
+ return -EIO;
+ tmp = max;
+ if (len >= max)
+ len = max - 1;
+ for (i = 0; i < len; i++)
+ buf[i] = ver[i];
+ buf[i] = '\0';
+ return tmp;
+}
+
+int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max)
+{
+ u32 ver;
+ u32 len = sizeof(ver);
+ /* microcode version is a 32 bit integer */
+ if (ipw2100_get_ordinal(priv, IPW_ORD_UCODE_VERSION,
+ &ver, &len))
+ return -EIO;
+ return snprintf(buf, max, "%08X", ver);
+}
+
+/*
+ * On exit, the firmware will have been freed from the fw list
+ */
+int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
+{
+ /* firmware is constructed of N contiguous entries, each entry is
+ * structured as:
+ *
+ * offset sie desc
+ * 0 4 address to write to
+ * 4 2 length of data run
+ * 6 length data
+ */
+ unsigned int addr;
+ unsigned short len;
+
+ const unsigned char *firmware_data = fw->fw.data;
+ unsigned int firmware_data_left = fw->fw.size;
+
+ while (firmware_data_left > 0) {
+ addr = *(u32 *)(firmware_data);
+ firmware_data += 4;
+ firmware_data_left -= 4;
+
+ len = *(u16 *)(firmware_data);
+ firmware_data += 2;
+ firmware_data_left -= 2;
+
+ if (len > 32) {
+ IPW_DEBUG_ERROR(
+ "Invalid firmware run-length of %d bytes\n",
+ len);
+ return -EINVAL;
+ }
+
+ write_nic_memory(priv->net_dev, addr, len, firmware_data);
+ firmware_data += len;
+ firmware_data_left -= len;
+ }
+
+ return 0;
+}
+
+struct symbol_alive_response {
+ u8 cmd_id;
+ u8 seq_num;
+ u8 ucode_rev;
+ u8 eeprom_valid;
+ u16 valid_flags;
+ u8 IEEE_addr[6];
+ u16 flags;
+ u16 pcb_rev;
+ u16 clock_settle_time; // 1us LSB
+ u16 powerup_settle_time; // 1us LSB
+ u16 hop_settle_time; // 1us LSB
+ u8 date[3]; // month, day, year
+ u8 time[2]; // hours, minutes
+ u8 ucode_valid;
+};
+
+int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
+{
+ struct net_device *dev = priv->net_dev;
+ const unsigned char *microcode_data = fw->uc.data;
+ unsigned int microcode_data_left = fw->uc.size;
+
+ struct symbol_alive_response response;
+ int i, j;
+ u8 data;
+
+ /* Symbol control */
+ write_nic_word(dev, IPW2100_CONTROL_REG, 0x703);
+ readl((void *)(dev->base_addr));
+ write_nic_word(dev, IPW2100_CONTROL_REG, 0x707);
+ readl((void *)(dev->base_addr));
+
+ /* HW config */
+ write_nic_byte(dev, 0x210014, 0x72); /* fifo width =16 */
+ readl((void *)(dev->base_addr));
+ write_nic_byte(dev, 0x210014, 0x72); /* fifo width =16 */
+ readl((void *)(dev->base_addr));
+
+ /* EN_CS_ACCESS bit to reset control store pointer */
+ write_nic_byte(dev, 0x210000, 0x40);
+ readl((void *)(dev->base_addr));
+ write_nic_byte(dev, 0x210000, 0x0);
+ readl((void *)(dev->base_addr));
+ write_nic_byte(dev, 0x210000, 0x40);
+ readl((void *)(dev->base_addr));
+
+ /* copy microcode from buffer into Symbol */
+
+ while (microcode_data_left > 0) {
+ write_nic_byte(dev, 0x210010, *microcode_data++);
+ write_nic_byte(dev, 0x210010, *microcode_data++);
+ microcode_data_left -= 2;
+ }
+
+ /* EN_CS_ACCESS bit to reset the control store pointer */
+ write_nic_byte(dev, 0x210000, 0x0);
+ readl((void *)(dev->base_addr));
+
+ /* Enable System (Reg 0)
+ * first enable causes garbage in RX FIFO */
+ write_nic_byte(dev, 0x210000, 0x0);
+ readl((void *)(dev->base_addr));
+ write_nic_byte(dev, 0x210000, 0x80);
+ readl((void *)(dev->base_addr));
+
+ /* Reset External Baseband Reg */
+ write_nic_word(dev, IPW2100_CONTROL_REG, 0x703);
+ readl((void *)(dev->base_addr));
+ write_nic_word(dev, IPW2100_CONTROL_REG, 0x707);
+ readl((void *)(dev->base_addr));
+
+ /* HW Config (Reg 5) */
+ write_nic_byte(dev, 0x210014, 0x72); // fifo width =16
+ readl((void *)(dev->base_addr));
+ write_nic_byte(dev, 0x210014, 0x72); // fifo width =16
+ readl((void *)(dev->base_addr));
+
+ /* Enable System (Reg 0)
+ * second enable should be OK */
+ write_nic_byte(dev, 0x210000, 0x00); // clear enable system
+ readl((void *)(dev->base_addr));
+ write_nic_byte(dev, 0x210000, 0x80); // set enable system
+
+ /* check Symbol is enabled - upped this from 5 as it wasn't always
+ * catching the update */
+ for (i = 0; i < 10; i++) {
+ udelay(10);
+
+ /* check Dino is enabled bit */
+ read_nic_byte(dev, 0x210000, &data);
+ if (data & 0x1)
+ break;
+ }
+
+ if (i == 10) {
+ IPW_DEBUG_ERROR("%s: Error initializing Symbol\n",
+ dev->name);
+ return -EIO;
+ }
+
+ /* Get Symbol alive response */
+ for (i = 0; i < 30; i++) {
+ /* Read alive response structure */
+ for (j = 0;
+ j < (sizeof(struct symbol_alive_response) >> 1);
+ j++)
+ read_nic_word(dev, 0x210004,
+ ((u16 *)&response) + j);
+
+ if ((response.cmd_id == 1) &&
+ (response.ucode_valid == 0x1))
+ break;
+ udelay(10);
+ }
+
+ if (i == 30) {
+ IPW_DEBUG_ERROR("%s: No response from Symbol - hw not alive\n",
+ dev->name);
+ printk_buf(IPW_DL_ERROR, (u8*)&response, sizeof(response));
+ return -EIO;
+ }
+
+ return 0;
+}
jwltest-pci-d3hot-d0.patch:
drivers/pci/pci.c | 52 ++++++++++++++++++++++++++++++++++++++++++++----
drivers/pci/setup-res.c | 2 -
include/linux/pci.h | 2 +
3 files changed, 51 insertions(+), 5 deletions(-)
--- NEW FILE jwltest-pci-d3hot-d0.patch ---
--- linux-2.6.12/include/linux/pci.h.orig 2005-07-07 16:01:11.852353507 -0400
+++ linux-2.6.12/include/linux/pci.h 2005-07-07 16:02:10.176581506 -0400
@@ -225,6 +225,7 @@
#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */
#define PCI_PM_CTRL 4 /* PM control and status register */
#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */
+#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004 /* No reset for D3hot->D0 */
#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */
#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */
#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */
@@ -812,6 +813,7 @@ int __must_check pci_set_mwi(struct pci_
void pci_clear_mwi(struct pci_dev *dev);
int __must_check pci_set_dma_mask(struct pci_dev *dev, u64 mask);
int __must_check pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
+void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
int pci_assign_resource(struct pci_dev *dev, int i);
/* ROM control related routines */
--- linux-2.6.12/drivers/pci/setup-res.c.orig 2005-06-17 15:48:29.000000000 -0400
+++ linux-2.6.12/drivers/pci/setup-res.c 2005-07-07 16:01:21.070125186 -0400
@@ -26,7 +26,7 @@
#include "pci.h"
-static void
+void
pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
{
struct pci_bus_region region;
--- linux-2.6.12/drivers/pci/pci.c.orig 2005-07-07 16:01:11.854353241 -0400
+++ linux-2.6.12/drivers/pci/pci.c 2005-07-07 16:01:21.068125453 -0400
@@ -222,6 +222,37 @@ pci_find_parent_resource(const struct pc
}
/**
+ * pci_restore_bars - restore a devices BAR values (e.g. after wake-up)
+ * @dev: PCI device to have its BARs restored
+ *
+ * Restore the BAR values for a given device, so as to make it
+ * accessible by its driver.
+ */
+static void
+pci_restore_bars(struct pci_dev *dev)
+{
+ int i, numres;
+
+ switch (dev->hdr_type) {
+ case PCI_HEADER_TYPE_NORMAL:
+ numres = 6;
+ break;
+ case PCI_HEADER_TYPE_BRIDGE:
+ numres = 2;
+ break;
+ case PCI_HEADER_TYPE_CARDBUS:
+ numres = 1;
+ break;
+ default:
+ /* Should never get here, but just in case... */
+ return;
+ }
+
+ for (i = 0; i < numres; i ++)
+ pci_update_resource(dev, &dev->resource[i], i);
+}
+
+/**
* pci_set_power_state - Set the power state of a PCI device
* @dev: PCI device to be suspended
* @state: PCI power state (D0, D1, D2, D3hot, D3cold) we're entering
@@ -239,7 +270,7 @@ pci_find_parent_resource(const struct pc
int
pci_set_power_state(struct pci_dev *dev, pci_power_t state)
{
- int pm;
+ int pm, need_restore = 0;
u16 pmcsr, pmc;
/* bound the state we're entering */
@@ -278,14 +309,17 @@ pci_set_power_state(struct pci_dev *dev,
return -EIO;
}
+ pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
+
/* If we're in D3, force entire word to 0.
* This doesn't affect PME_Status, disables PME_En, and
* sets PowerState to 0.
*/
- if (dev->current_state >= PCI_D3hot)
+ if (dev->current_state >= PCI_D3hot) {
+ if (!(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET))
+ need_restore = 1;
pmcsr = 0;
- else {
- pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
+ } else {
pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
pmcsr |= state;
}
@@ -301,6 +335,16 @@ pci_set_power_state(struct pci_dev *dev,
udelay(200);
dev->current_state = state;
+ /* According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT
+ * INTERFACE SPECIFICATION, REV. 1.2", a device transitioning
+ * from D3hot to D0 _may_ perform an internal reset, thereby
+ * going to "D0 Uninitialized" rather than "D0 Initialized".
+ * In that case, we need to restore at least the BARs so that
+ * the device will be accessible to its driver.
+ */
+ if (need_restore)
+ pci_restore_bars(dev);
+
return 0;
}
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1431
retrieving revision 1.1431.2.1
diff -u -r1.1431 -r1.1431.2.1
--- kernel-2.6.spec 21 Aug 2005 19:20:05 -0000 1.1431
+++ kernel-2.6.spec 22 Aug 2005 19:55:20 -0000 1.1431.2.1
@@ -24,7 +24,8 @@
%define sublevel 12
%define kversion 2.6.%{sublevel}
%define rpmversion 2.6.%{sublevel}
-%define rhbsys %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
+#%define rhbsys %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
+%define rhbsys .jwltest.14
%if %{FC3}
%define release %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})_FC3%{rhbsys}
%endif
@@ -163,7 +164,8 @@
License: GPLv2
Version: %{rpmversion}
Release: %{release}
-ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ppc64iseries sparc sparc64
+#ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ppc64iseries sparc sparc64
+ExclusiveArch: noarch %{all_x86} x86_64 ppc64 ppc64iseries ppc
ExclusiveOS: Linux
Provides: kernel = %{version}
Provides: kernel-drm = 4.3.0
@@ -301,6 +303,9 @@
Patch1301: linux-2.6.12-net-sundance-ip100A.patch
Patch1302: linux-2.6.12-net-make-orinoco-suck-less.patch
Patch1304: linux-2.6.12-net-atm-lanai-nodev-rmmod.patch
+Patch1305: jwltest-b44-link-check.patch
+Patch1306: jwltest-3c59x-resume.patch
+Patch1307: jwltest-3c59x-resume-debug.patch
# USB bits
Patch1400: linux-2.6.12-usb-old_scheme_first.patch
@@ -342,6 +347,7 @@
Patch1930: linux-2.6-appletouch-update.patch
Patch1950: linux-2.6-selinux-addrlen-checks.patch
Patch1960: linux-2.6-net-restrict-socket-policy-loading.patch
+Patch1970: jwltest-acpi-dsdt-initrd.patch
Patch2000: linux-2.6.11-vm-taint.patch
Patch2001: linux-2.6.9-vm-oomkiller-debugging.patch
@@ -350,6 +356,7 @@
Patch2100: linux-2.6-acpi-20050729.patch.bz2
Patch2101: linux-2.6-acpi-xen.patch
Patch2110: linux-2.6.11-acpi-thinkpad-c2c3.patch
+Patch2120: jwltest-pci-d3hot-d0.patch
Patch2999: linux-2.6.3-printopen.patch
@@ -361,6 +368,7 @@
Patch3020: linux-2.6.9-ipw2100.patch
Patch3021: linux-2.6.9-ipw2200.patch
Patch3022: linux-2.6.9-ieee80211.patch
+Patch3023: jwltest-ipw2100-1_1_0.patch
#
# 10000 to 20000 is for stuff that has to come last due to the
@@ -721,6 +729,11 @@
%patch1302 -p1
# Fix rmmod lanai
%patch1304 -p1
+# b44 early link check
+%patch1305 -p1
+# fix 3c59x resume, use pci_enable_device for wake-up
+%patch1306 -p1
+%patch1307 -p1
# USB Bits.
# Enable both old and new style USB initialisation.
@@ -795,6 +808,8 @@
%patch1950 -p1
# Restrict socket policy loading to CAP_NET_ADMIN.
%patch1960 -p1
+# Add DSDT override from initrd
+%patch1970 -p1
#
# VM related fixes.
@@ -815,6 +830,8 @@
%endif
# Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
%patch2110 -p1
+# avoid PCI config loss during enable from D3hot
+#%patch2120 -p1
#
# Local hack (off for any shipped kernels) to printk all files opened
@@ -831,6 +848,7 @@
%patch3020 -p1
%patch3021 -p1
%patch3022 -p1
+#%patch3023 -p1 -E
#
# Patches 5000 to 6000 are reserved for new drivers that are about to
- Previous message (by thread): rpms/kernel/FC-4/configs config-generic, 1.33, 1.33.4.1 config-ia64-generic, 1.3, 1.3.26.1 config-x86-generic, 1.9, 1.9.2.1 config-x86_64-generic, 1.9, 1.9.8.1
- Next message (by thread): rpms/kernel/devel linux-2.6-compile-fixes.patch,1.24,1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list