Revert [ARM] 4642/2: netX: default config for netx based boards
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3902beb48d369d5e19f66acc2f857865ddc9b3bf Commit: 3902beb48d369d5e19f66acc2f857865ddc9b3bf Parent: ecd744eec3aa8bbc949ec04ed3fbf7ecb2958a0e Author: Linus Torvalds [EMAIL PROTECTED] AuthorDate: Sat Nov 10 14:22:46 2007 -0800 Committer: Linus Torvalds [EMAIL PROTECTED] CommitDate: Sat Nov 10 14:22:46 2007 -0800 Revert [ARM] 4642/2: netX: default config for netx based boards This reverts commit f33bac8dd4573428b94c67149c5607be489092d1, which was totally bogus. The arm/configs/netx_defconfig file already existed - in the right place. Namely under arch. Noticed-by: Paul Mundt [EMAIL PROTECTED] Acked-by: Robert Schwebel [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] --- arm/configs/netx_defconfig | 925 1 files changed, 0 insertions(+), 925 deletions(-) diff --git a/arm/configs/netx_defconfig b/arm/configs/netx_defconfig deleted file mode 100644 index 57f32f3..000 --- a/arm/configs/netx_defconfig +++ /dev/null @@ -1,925 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17-rc6 -# Tue Jun 6 15:26:53 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0x - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION= -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE= -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED=anticipatory - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set -CONFIG_ARCH_NETX=y - -# -# NetX Implementations -# -CONFIG_MACH_NXDKN=y -CONFIG_MACH_NXDB500=y -CONFIG_MACH_NXEB500HMI=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM926T=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5TJ=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -# CONFIG_CPU_CACHE_ROUND_ROBIN is not set -CONFIG_ARM_VIC=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE=console=ttySMX0,115200 -# CONFIG_XIP_KERNEL is not set - -# -#
sky2: enable PCI config writes
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac93a3946b676025fa55356180e8321639744b31 Commit: ac93a3946b676025fa55356180e8321639744b31 Parent: 3c5fd9c77d609b51c0bab682c9d40cbb496ec6f1 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Mon Nov 5 15:52:08 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:08 2007 -0500 sky2: enable PCI config writes On some boards, PCI configuration space access is turned off by default. The 2.6.24 driver doesn't turn it on, and should have. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index c27c7d6..4f41a94 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2791,6 +2791,9 @@ static void sky2_reset(struct sky2_hw *hw) sky2_write8(hw, B0_CTST, CS_RST_SET); sky2_write8(hw, B0_CTST, CS_RST_CLR); + /* allow writes to PCI config */ + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); + /* clear PCI errors, if any */ pci_read_config_word(pdev, PCI_STATUS, status); status |= PCI_STATUS_ERROR_BITS; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: status ring race fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab5adecb2d02f3688719dfb5936a82833fcc3955 Commit: ab5adecb2d02f3688719dfb5936a82833fcc3955 Parent: ac93a3946b676025fa55356180e8321639744b31 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Mon Nov 5 15:52:09 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:08 2007 -0500 sky2: status ring race fix The D-Link PCI-X board (and maybe others) can lie about status ring entries. It seems it will update the register for last status index before completing the DMA for the ring entry. To avoid reading stale data, zap the old entry and check. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 4f41a94..706884a 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2247,20 +2247,26 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) do { struct sky2_port *sky2; struct sky2_status_le *le = hw-st_le + hw-st_idx; - unsigned port = le-css CSS_LINK_BIT; + unsigned port; struct net_device *dev; struct sk_buff *skb; u32 status; u16 length; + u8 opcode = le-opcode; + + if (!(opcode HW_OWNER)) + break; hw-st_idx = RING_NEXT(hw-st_idx, STATUS_RING_SIZE); + port = le-css CSS_LINK_BIT; dev = hw-dev[port]; sky2 = netdev_priv(dev); length = le16_to_cpu(le-length); status = le32_to_cpu(le-status); - switch (le-opcode ~HW_OWNER) { + le-opcode = 0; + switch (opcode ~HW_OWNER) { case OP_RXSTAT: ++rx[port]; skb = sky2_receive(dev, length, status); @@ -2353,7 +2359,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) default: if (net_ratelimit()) printk(KERN_WARNING PFX - unknown status opcode 0x%x\n, le-opcode); + unknown status opcode 0x%x\n, opcode); } } while (hw-st_idx != idx); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: longer PHY delay
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af043aa54fd45774e61979d1748616c2a67f0da8 Commit: af043aa54fd45774e61979d1748616c2a67f0da8 Parent: ab5adecb2d02f3688719dfb5936a82833fcc3955 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Mon Nov 5 15:52:10 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:08 2007 -0500 sky2: longer PHY delay Increse phy delay and handle I/O errors. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c | 35 +-- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 706884a..eaab3d8 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -156,7 +156,7 @@ static const char *yukon2_name[] = { static void sky2_set_multicast(struct net_device *dev); -/* Access to external PHY */ +/* Access to PHY via serial interconnect */ static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val) { int i; @@ -166,13 +166,22 @@ static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val) GM_SMI_CT_PHY_AD(PHY_ADDR_MARV) | GM_SMI_CT_REG_AD(reg)); for (i = 0; i PHY_RETRIES; i++) { - if (!(gma_read16(hw, port, GM_SMI_CTRL) GM_SMI_CT_BUSY)) + u16 ctrl = gma_read16(hw, port, GM_SMI_CTRL); + if (ctrl == 0x) + goto io_error; + + if (!(ctrl GM_SMI_CT_BUSY)) return 0; - udelay(1); + + udelay(10); } - printk(KERN_WARNING PFX %s: phy write timeout\n, hw-dev[port]-name); + dev_warn(hw-pdev-dev,%s: phy write timeout\n, hw-dev[port]-name); return -ETIMEDOUT; + +io_error: + dev_err(hw-pdev-dev, %s: phy I/O error\n, hw-dev[port]-name); + return -EIO; } static int __gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg, u16 *val) @@ -183,23 +192,29 @@ static int __gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg, u16 *val) | GM_SMI_CT_REG_AD(reg) | GM_SMI_CT_OP_RD); for (i = 0; i PHY_RETRIES; i++) { - if (gma_read16(hw, port, GM_SMI_CTRL) GM_SMI_CT_RD_VAL) { + u16 ctrl = gma_read16(hw, port, GM_SMI_CTRL); + if (ctrl == 0x) + goto io_error; + + if (ctrl GM_SMI_CT_RD_VAL) { *val = gma_read16(hw, port, GM_SMI_DATA); return 0; } - udelay(1); + udelay(10); } + dev_warn(hw-pdev-dev, %s: phy read timeout\n, hw-dev[port]-name); return -ETIMEDOUT; +io_error: + dev_err(hw-pdev-dev, %s: phy I/O error\n, hw-dev[port]-name); + return -EIO; } -static u16 gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg) +static inline u16 gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg) { u16 v; - - if (__gm_phy_read(hw, port, reg, v) != 0) - printk(KERN_WARNING PFX %s: phy read timeout\n, hw-dev[port]-name); + __gm_phy_read(hw, port, reg, v); return v; } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: remove unneeded mask update
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab1a145638addee40587daf12c98ec6a30029f0a Commit: ab1a145638addee40587daf12c98ec6a30029f0a Parent: 44388c7ead4b2bae9f82bc0862475640c50f357d Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Mon Nov 5 15:52:12 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:09 2007 -0500 sky2: remove unneeded mask update The IRQ's is already masked on shutdown, and on startup avoid touching PHY until after phy_init(). Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3c08db4..76038bb 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -288,8 +288,6 @@ static void sky2_gmac_reset(struct sky2_hw *hw, unsigned port) /* disable all GMAC IRQ's */ sky2_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0); - /* disable PHY IRQs */ - gm_phy_write(hw, port, PHY_MARV_INT_MASK, 0); gma_write16(hw, port, GM_MC_ADDR_H1, 0);/* clear MC hash */ gma_write16(hw, port, GM_MC_ADDR_H2, 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
sky2: handle advanced error recovery config issues
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf06ffb4df5314d240a002e3e1c63722e9362070 Commit: cf06ffb4df5314d240a002e3e1c63722e9362070 Parent: ab1a145638addee40587daf12c98ec6a30029f0a Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Mon Nov 5 15:52:13 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:09 2007 -0500 sky2: handle advanced error recovery config issues The PCI AER support may not work for a couple of reasons. It may not be configured into the kernel or there may be a BIOS bug that prevents MMCONFIG from working. If MMCONFIG doesn't work then the PCI registers that control AER will not be accessible via pci_read_config functions; luckly there is another window to access PCI space in the device, so use that. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c | 34 -- drivers/net/sky2.h |3 ++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 76038bb..a6ccd11 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2435,13 +2435,26 @@ static void sky2_hw_intr(struct sky2_hw *hw) if (status Y2_IS_PCI_EXP) { /* PCI-Express uncorrectable Error occurred */ - int pos = pci_find_aer_capability(hw-pdev); + int aer = pci_find_aer_capability(hw-pdev); u32 err; - pci_read_config_dword(pdev, pos + PCI_ERR_UNCOR_STATUS, err); + if (aer) { + pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, + err); + pci_cleanup_aer_uncorrect_error_status(pdev); + } else { + /* Either AER not configured, or not working +* because of bad MMCONFIG, so just do recover +* manually. +*/ + err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); + sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, +0xul); + } + if (net_ratelimit()) dev_err(pdev-dev, PCI Express error (0x%x)\n, err); - pci_cleanup_aer_uncorrect_error_status(pdev); + } if (status Y2_HWE_L1_MASK) @@ -2799,9 +2812,18 @@ static void sky2_reset(struct sky2_hw *hw) cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); if (cap) { - /* Check for advanced error reporting */ - pci_cleanup_aer_uncorrect_error_status(pdev); - pci_cleanup_aer_correct_error_status(pdev); + if (pci_find_aer_capability(pdev)) { + /* Check for advanced error reporting */ + pci_cleanup_aer_uncorrect_error_status(pdev); + pci_cleanup_aer_correct_error_status(pdev); + } else { + dev_warn(pdev-dev, + PCI Express Advanced Error Reporting +not configured or MMCONFIG problem?\n); + + sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, +0xul); + } /* If error bit is stuck on ignore it */ if (sky2_read32(hw, B0_HWE_ISRC) Y2_IS_PCI_EXP) diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 49ee264..69525fd 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h @@ -247,7 +247,8 @@ enum csr_regs { B3_PA_CTRL = 0x01f0, B3_PA_TEST = 0x01f2, - Y2_CFG_SPC = 0x1c00, + Y2_CFG_SPC = 0x1c00, /* PCI config space region */ + Y2_CFG_AER = 0x1d00, /* PCI Advanced Error Report region */ }; /* B0_CTST 16 bit Control/Status register */ - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: version 1.20
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e354787283c7ec3065406b4bc634309e5ba1253 Commit: 1e354787283c7ec3065406b4bc634309e5ba1253 Parent: cf06ffb4df5314d240a002e3e1c63722e9362070 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Mon Nov 5 15:52:14 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:09 2007 -0500 sky2: version 1.20 Version update to 1.20 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a6ccd11..94de85f 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -52,7 +52,7 @@ #include sky2.h #define DRV_NAME sky2 -#define DRV_VERSION1.19 +#define DRV_VERSION1.20 #define PFXDRV_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
add support for smc91x ethernet interface on zylonite
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c826a0b84f1540d9de54bb0afe4b4520007d791 Commit: 7c826a0b84f1540d9de54bb0afe4b4520007d791 Parent: 1e354787283c7ec3065406b4bc634309e5ba1253 Author: eric miao [EMAIL PROTECTED] AuthorDate: Tue Oct 30 09:48:41 2007 +0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:09 2007 -0500 add support for smc91x ethernet interface on zylonite This patch adds LAN91C111 ethernet interface support for zylonite (a.k.a Marvell's PXA3xx Development Platform) with smc91x driver. It would be better if a patch would support zylonite along with all other PXA boards with a single binary of smc91x driver, but it looks quite difficult for the moment, so ugly #ifdef is still used here. Signed-off-by: Aleksey Makarov [EMAIL PROTECTED] Acked-by: eric miao [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/smc91x.h | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 729fd28..db34e1e 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -224,6 +224,21 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) } } +#elif defined(CONFIG_MACH_ZYLONITE) + +#define SMC_CAN_USE_8BIT1 +#define SMC_CAN_USE_16BIT 1 +#define SMC_CAN_USE_32BIT 0 +#define SMC_IO_SHIFT0 +#define SMC_NOWAIT 1 +#define SMC_USE_PXA_DMA1 +#define SMC_inb(a, r) readb((a) + (r)) +#define SMC_inw(a, r) readw((a) + (r)) +#define SMC_insw(a, r, p, l)insw((a) + (r), p, l) +#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) +#define SMC_outb(v, a, r) writeb(v, (a) + (r)) +#define SMC_outw(v, a, r) writew(v, (a) + (r)) + #elif defined(CONFIG_ARCH_OMAP) /* We can only do 16-bit reads and writes in the static memory space. */ - 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
r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=11d2e28241e89227d88da53187224c84316acc86 Commit: 11d2e28241e89227d88da53187224c84316acc86 Parent: 7c826a0b84f1540d9de54bb0afe4b4520007d791 Author: Ciaran McCreesh [EMAIL PROTECTED] AuthorDate: Thu Nov 1 22:48:15 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:09 2007 -0500 r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard Signed-off-by: Ciaran McCreesh [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] Cc: Edward Hsu [EMAIL PROTECTED] --- drivers/net/r8169.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index b94fa7e..702334e 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -171,6 +171,8 @@ static struct pci_device_id rtl8169_pci_tbl[] = { { PCI_DEVICE(0x16ec,0x0116), 0, 0, RTL_CFG_0 }, { PCI_VENDOR_ID_LINKSYS,0x1032, PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 }, + { 0x0001, 0x8168, + PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 }, {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
r8169: do not enable the TBI for the 8168 and the 81x0
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66ec5d4fb1ce6f0bd9df4bc4b758f0916d9f37ab Commit: 66ec5d4fb1ce6f0bd9df4bc4b758f0916d9f37ab Parent: 11d2e28241e89227d88da53187224c84316acc86 Author: Francois Romieu [EMAIL PROTECTED] AuthorDate: Tue Nov 6 22:56:10 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:09 2007 -0500 r8169: do not enable the TBI for the 8168 and the 81x0 The 8168c and the 8100e choke on it. I have not seen an indication nor received a report that the TBI is being actively used on the remaining 8168b and 8110. Let's disable it for now until someone complains. Signed-off-by: Francois Romieu [EMAIL PROTECTED] Cc: Matthias Winkler [EMAIL PROTECTED] Cc: Maarten Vanraes [EMAIL PROTECTED] Cc: Edward Hsu [EMAIL PROTECTED] --- drivers/net/r8169.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 702334e..9dbab3f 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1741,7 +1741,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) tp-features |= rtl_try_msi(pdev, ioaddr, cfg); RTL_W8(Cfg9346, Cfg9346_Lock); - if (RTL_R8(PHYstatus) TBI_Enable) { + if ((tp-mac_version = RTL_GIGA_MAC_VER_06) + (RTL_R8(PHYstatus) TBI_Enable)) { tp-set_speed = rtl8169_set_speed_tbi; tp-get_settings = rtl8169_gset_tbi; tp-phy_reset_enable = rtl8169_tbi_reset_enable; - 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
r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9d04e2401bf308df921d3bbbdacab40fadc27bb Commit: b9d04e2401bf308df921d3bbbdacab40fadc27bb Parent: 66ec5d4fb1ce6f0bd9df4bc4b758f0916d9f37ab Author: Mark Lord [EMAIL PROTECTED] AuthorDate: Thu Nov 8 01:03:04 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:10 2007 -0500 r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly) Various symptoms depending on the .config options: - the card stops working after some (short) time - the card does not work at all - the card disappears (nothing in lspci/dmesg) A real power-off is needed to recover the card. Signed-off-by: Mark Lord [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] --- drivers/net/r8169.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 9dbab3f..a37cf82 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1328,6 +1328,7 @@ static void rtl_hw_phy_config(struct net_device *dev) break; case RTL_GIGA_MAC_VER_11: case RTL_GIGA_MAC_VER_12: + break; case RTL_GIGA_MAC_VER_17: rtl8168b_hw_phy_config(ioaddr); break; - 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
hermes: clarify Intel reference in Kconfig help
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f39c4ab03f072b13e783858df082877c0110b2b Commit: 0f39c4ab03f072b13e783858df082877c0110b2b Parent: b9d04e2401bf308df921d3bbbdacab40fadc27bb Author: John W. Linville [EMAIL PROTECTED] AuthorDate: Fri Nov 2 15:36:38 2007 -0400 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:10 2007 -0500 hermes: clarify Intel reference in Kconfig help The Intel device supported by the hermes driver core is the IPW2011. The Intel PRO/Wireless wording suggests the later Centrino devices and may be confusing to some users. Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index dae5c8d..2b733c5 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -325,7 +325,7 @@ config HERMES Cabletron/EnteraSys Roamabout, ELSA AirLancer, MELCO Buffalo, Avaya, IBM High Rate Wireless, Farralon Syyline, Samsung MagicLAN, Netgear MA401, LinkSys WPC-11, D-Link DWL-650, 3Com AirConnect, Intel - PRO/Wireless, and Symbol Spectrum24 High Rate amongst others. + IPW2011, and Symbol Spectrum24 High Rate amongst others. This option includes the guts of the driver, but in order to actually use a card you will also need to enable support for PCMCIA - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libertas: fixes for slow hardware
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ef31702c1a83a380d5e144f5af55e21f59c9bb6 Commit: 4ef31702c1a83a380d5e144f5af55e21f59c9bb6 Parent: 0f39c4ab03f072b13e783858df082877c0110b2b Author: Holger Schurig [EMAIL PROTECTED] AuthorDate: Tue Oct 9 10:41:57 2007 +0200 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:10 2007 -0500 libertas: fixes for slow hardware Fixes for slow hardware. Signed-off-by: Vitaly V. Bursov [EMAIL PROTECTED] Signed-off-by: Holger Schurig [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/libertas/if_cs.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 0360cad..ec89dab 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c @@ -148,11 +148,11 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r { int i; - for (i = 0; i 500; i++) { + for (i = 0; i 1000; i++) { u8 val = if_cs_read8(card, addr); if (val == reg) return i; - udelay(100); + udelay(500); } return -ETIME; } @@ -878,6 +878,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev) goto out3; } + /* Clear any interrupt cause that happend while sending +* firmware/initializing card */ + if_cs_write16(card, IF_CS_C_INT_CAUSE, IF_CS_C_IC_MASK); if_cs_enable_ints(card); /* And finally bring the card up */ - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libertas: make if_sdio align packets
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51e6b712b5960cc7d086c3f856434ccd096c63a7 Commit: 51e6b712b5960cc7d086c3f856434ccd096c63a7 Parent: 4ef31702c1a83a380d5e144f5af55e21f59c9bb6 Author: Pierre Ossman [EMAIL PROTECTED] AuthorDate: Mon Oct 22 19:05:32 2007 +0200 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:10 2007 -0500 libertas: make if_sdio align packets Incoming packets have to be aligned or the IP stack becomes upset. Make sure to shift them two bytes to achieve this. Signed-off-by: Pierre Ossman [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/libertas/if_sdio.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index a8e1707..b24425f 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c @@ -182,12 +182,14 @@ static int if_sdio_handle_data(struct if_sdio_card *card, goto out; } - skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); + skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + NET_IP_ALIGN); if (!skb) { ret = -ENOMEM; goto out; } + skb_reserve(skb, NET_IP_ALIGN); + data = skb_put(skb, size); memcpy(data, buffer, size); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libertas: properly account for queue commands
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=29f5f2a19b055feabfcc6f92e1d40ec092c373ea Commit: 29f5f2a19b055feabfcc6f92e1d40ec092c373ea Parent: 51e6b712b5960cc7d086c3f856434ccd096c63a7 Author: Marcelo Tosatti [EMAIL PROTECTED] AuthorDate: Tue Oct 30 10:52:46 2007 -0400 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:11 2007 -0500 libertas: properly account for queue commands Properly account for queue commands, this fixes a problem reported by Holger Schurig when using the debugfs interface. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/libertas/cmd.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 1cbbd96..be5cfd8 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -912,6 +912,10 @@ static int wlan_cmd_set_boot2_ver(wlan_private * priv, return 0; } +/* + * Note: NEVER use libertas_queue_cmd() with addtail==0 other than for + * the command timer, because it does not account for queued commands. + */ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail) { unsigned long flags; @@ -941,10 +945,11 @@ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u spin_lock_irqsave(adapter-driver_lock, flags); - if (addtail) + if (addtail) { list_add_tail((struct list_head *)cmdnode, adapter-cmdpendingq); - else + adapter-nr_cmd_pending++; + } else list_add((struct list_head *)cmdnode, adapter-cmdpendingq); spin_unlock_irqrestore(adapter-driver_lock, flags); @@ -1412,7 +1417,6 @@ int libertas_prepare_and_send_command(wlan_private * priv, cmdnode-cmdwaitqwoken = 0; libertas_queue_cmd(adapter, cmdnode, 1); - adapter-nr_cmd_pending++; wake_up_interruptible(priv-waitq); if (wait_option CMD_OPTION_WAITFORRSP) { - 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
rt2x00: Block adhoc master mode
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=453a3fb9bd1fa50cdf4b69b9936c69497e870774 Commit: 453a3fb9bd1fa50cdf4b69b9936c69497e870774 Parent: 29f5f2a19b055feabfcc6f92e1d40ec092c373ea Author: Ivo van Doorn [EMAIL PROTECTED] AuthorDate: Sun Oct 28 14:39:52 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:11 2007 -0500 rt2x00: Block adhoc master mode rt2x00 is broken when it comes down to adhoc and master mode. The main problem is the beaconing, which is completely failing. Untill a solution has been found, both beacon requiring modes must be disabled to prevent numerous bug reports. Signed-off-by: Ivo van Doorn [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/rt2x00/rt2x00mac.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 4a6a0bd..85ea8a8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -196,6 +196,14 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, struct rt2x00_dev *rt2x00dev = hw-priv; struct interface *intf = rt2x00dev-interface; + /* FIXME: Beaconing is broken in rt2x00. */ + if (conf-type == IEEE80211_IF_TYPE_IBSS || + conf-type == IEEE80211_IF_TYPE_AP) { + ERROR(rt2x00dev, + rt2x00 does not support Adhoc or Master mode); + return -EOPNOTSUPP; + } + /* * Don't allow interfaces to be added while * either the device has disappeared or when - 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
hostap: fix section mismatch warning
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2493d8e4166fa75ccb8e49fdd000f9ef67e570ae Commit: 2493d8e4166fa75ccb8e49fdd000f9ef67e570ae Parent: 453a3fb9bd1fa50cdf4b69b9936c69497e870774 Author: Randy Dunlap [EMAIL PROTECTED] AuthorDate: Mon Oct 29 11:20:26 2007 -0700 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:12 2007 -0500 hostap: fix section mismatch warning Fix section mismatch warning: WARNING: vmlinux.o(.data+0x36fcc): Section mismatch: reference to .init.data:prism2_pci_id_table (between 'prism2_pci_drv_id' and 'prism2_pci_funcs') Signed-off-by: Randy Dunlap [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/hostap/hostap_pci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 7da3664..fc876ba 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c @@ -444,7 +444,7 @@ static int prism2_pci_resume(struct pci_dev *pdev) MODULE_DEVICE_TABLE(pci, prism2_pci_id_table); -static struct pci_driver prism2_pci_drv_id = { +static struct pci_driver prism2_pci_driver = { .name = hostap_pci, .id_table = prism2_pci_id_table, .probe = prism2_pci_probe, @@ -458,13 +458,13 @@ static struct pci_driver prism2_pci_drv_id = { static int __init init_prism2_pci(void) { - return pci_register_driver(prism2_pci_drv_id); + return pci_register_driver(prism2_pci_driver); } static void __exit exit_prism2_pci(void) { - pci_unregister_driver(prism2_pci_drv_id); + pci_unregister_driver(prism2_pci_driver); } - 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
ipw2100: fix postfix decrement errors
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a2a1c3eb4029aa7f17533fe7e9a917a7b3349644 Commit: a2a1c3eb4029aa7f17533fe7e9a917a7b3349644 Parent: 2493d8e4166fa75ccb8e49fdd000f9ef67e570ae Author: Roel Kluin [EMAIL PROTECTED] AuthorDate: Mon Nov 5 23:55:02 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:12 2007 -0500 ipw2100: fix postfix decrement errors If i reaches zero, the loop ends, but the postfix decrement subtracts it to -1. Testing for 'i == 0', later in the function, will not fulfill its purpose. Signed-off-by: Roel Kluin [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/ipw2100.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 8d53d08..fc6cdd8 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -1267,7 +1267,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv) IPW2100_INTA_FATAL_ERROR | IPW2100_INTA_PARITY_ERROR); } - } while (i--); + } while (--i); /* Clear out any pending INTAs since we aren't supposed to have * interrupts enabled at this point... */ @@ -1339,7 +1339,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv) if (reg IPW_AUX_HOST_RESET_REG_MASTER_DISABLED) break; - } while (i--); + } while (--i); priv-status = ~STATUS_RESET_PENDING; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
b43: pcmcia-host initialization bugfixes
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce2d90591fe69ba19076c5d187dfc88ba3318623 Commit: ce2d90591fe69ba19076c5d187dfc88ba3318623 Parent: a2a1c3eb4029aa7f17533fe7e9a917a7b3349644 Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Tue Nov 6 16:36:41 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:12 2007 -0500 b43: pcmcia-host initialization bugfixes Fix the initialization for PCMCIA devices. Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43/pcmcia.c | 44 + 1 files changed, 25 insertions(+), 19 deletions(-) diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index b242a9a..4b6648f 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c @@ -65,12 +65,12 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) tuple_t tuple; cisparse_t parse; int err = -ENOMEM; - int res; + int res = 0; unsigned char buf[64]; ssb = kzalloc(sizeof(*ssb), GFP_KERNEL); if (!ssb) - goto out; + goto out_error; err = -ENODEV; tuple.DesiredTuple = CISTPL_CONFIG; @@ -96,10 +96,12 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) dev-io.NumPorts2 = 0; dev-io.Attributes2 = 0; - win.Attributes = WIN_MEMORY_TYPE_CM | WIN_ENABLE | WIN_USE_WAIT; + win.Attributes = WIN_ADDR_SPACE_MEM | WIN_MEMORY_TYPE_CM | +WIN_ENABLE | WIN_DATA_WIDTH_16 | +WIN_USE_WAIT; win.Base = 0; win.Size = SSB_CORE_SIZE; - win.AccessSpeed = 1000; + win.AccessSpeed = 250; res = pcmcia_request_window(dev, win, dev-win); if (res != CS_SUCCESS) goto err_kfree_ssb; @@ -108,21 +110,26 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) mem.Page = 0; res = pcmcia_map_mem_page(dev-win, mem); if (res != CS_SUCCESS) - goto err_kfree_ssb; + goto err_disable; res = pcmcia_request_configuration(dev, dev-conf); if (res != CS_SUCCESS) goto err_disable; err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); + if (err) + goto err_disable; dev-priv = ssb; - out: - return err; - err_disable: + return 0; + +err_disable: pcmcia_disable_device(dev); - err_kfree_ssb: +err_kfree_ssb: kfree(ssb); +out_error: + printk(KERN_ERR b43-pcmcia: Initialization failed (%d, %d)\n, + res, err); return err; } @@ -131,22 +138,21 @@ static void __devexit b43_pcmcia_remove(struct pcmcia_device *dev) struct ssb_bus *ssb = dev-priv; ssb_bus_unregister(ssb); - pcmcia_release_window(dev-win); pcmcia_disable_device(dev); kfree(ssb); dev-priv = NULL; } static struct pcmcia_driver b43_pcmcia_driver = { - .owner = THIS_MODULE, - .drv = { - .name = b43-pcmcia, - }, - .id_table = b43_pcmcia_tbl, - .probe = b43_pcmcia_probe, - .remove = b43_pcmcia_remove, - .suspend = b43_pcmcia_suspend, - .resume = b43_pcmcia_resume, + .owner = THIS_MODULE, + .drv= { + .name = b43-pcmcia, + }, + .id_table = b43_pcmcia_tbl, + .probe = b43_pcmcia_probe, + .remove = __devexit_p(b43_pcmcia_remove), + .suspend= b43_pcmcia_suspend, + .resume = b43_pcmcia_resume, }; int b43_pcmcia_init(void) - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
b43: Fix rfkill callback deadlock
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=80fda03fc8b5cd09c3e0e90725ef9bcb2a5c7b30 Commit: 80fda03fc8b5cd09c3e0e90725ef9bcb2a5c7b30 Parent: ce2d90591fe69ba19076c5d187dfc88ba3318623 Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Sun Oct 28 17:27:10 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:12 2007 -0500 b43: Fix rfkill callback deadlock wl-mutex might already be locked on initialization. Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43/rfkill.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index 800e0a6..456930f 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c @@ -61,15 +61,22 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) mutex_unlock(wl-mutex); } -/* Called when the RFKILL toggled in software. - * This is called without locking. */ +/* Called when the RFKILL toggled in software. */ static int b43_rfkill_soft_toggle(void *data, enum rfkill_state state) { struct b43_wldev *dev = data; struct b43_wl *wl = dev-wl; int err = 0; - mutex_lock(wl-mutex); + /* When RFKILL is registered, it will call back into this callback. +* wl-mutex will already be locked when this happens. +* So first trylock. On contention check if we are in initialization. +* Silently return if that happens to avoid a deadlock. */ + if (mutex_trylock(wl-mutex) == 0) { + if (b43_status(dev) B43_STAT_INITIALIZED) + return 0; + mutex_lock(wl-mutex); + } if (b43_status(dev) B43_STAT_INITIALIZED) goto out_unlock; @@ -89,7 +96,6 @@ static int b43_rfkill_soft_toggle(void *data, enum rfkill_state state) b43_radio_turn_off(dev, 0); break; } - out_unlock: mutex_unlock(wl-mutex); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
b43: debugfs SHM read buffer overrun fix
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=30c4ae42317666f3aeed658cdb8803c84ac6fe77 Commit: 30c4ae42317666f3aeed658cdb8803c84ac6fe77 Parent: 80fda03fc8b5cd09c3e0e90725ef9bcb2a5c7b30 Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Fri Nov 2 18:35:02 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:12 2007 -0500 b43: debugfs SHM read buffer overrun fix Fix possible buffer overrun. Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43/debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c index 734e70e..ef0075d 100644 --- a/drivers/net/wireless/b43/debugfs.c +++ b/drivers/net/wireless/b43/debugfs.c @@ -128,7 +128,7 @@ static ssize_t shm_read_file(struct b43_wldev *dev, __le16 *le16buf = (__le16 *)buf; for (i = 0; i 0x1000; i++) { - if (bufsize = 0) + if (bufsize sizeof(tmp)) break; tmp = b43_shm_read16(dev, B43_SHM_SHARED, 2 * i); le16buf[i] = cpu_to_le16(tmp); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
b43: Rewrite and fix rfkill init
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35c7e6602b81bdacb745f04236a419402777139e Commit: 35c7e6602b81bdacb745f04236a419402777139e Parent: 30c4ae42317666f3aeed658cdb8803c84ac6fe77 Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Sat Nov 3 14:34:32 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:12 2007 -0500 b43: Rewrite and fix rfkill init The rfkill subsystem doesn't like code like that rfkill_allocate(); rfkill_register(); rfkill_unregister(); rfkill_register(); /* - This will crash */ This sequence happens with modprobe b43 ifconfig wlanX up ifconfig wlanX down ifconfig wlanX up Fix this by always re-allocating the rfkill stuff before register. Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43/main.c |2 - drivers/net/wireless/b43/rfkill.c | 119 - drivers/net/wireless/b43/rfkill.h | 14 +--- 3 files changed, 55 insertions(+), 80 deletions(-) diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 5058e60..c9778c6 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -3661,7 +3661,6 @@ static int b43_setup_modes(struct b43_wldev *dev, static void b43_wireless_core_detach(struct b43_wldev *dev) { - b43_rfkill_free(dev); /* We release firmware that late to not be required to re-request * is all the time when we reinit the core. */ b43_release_firmware(dev); @@ -3747,7 +3746,6 @@ static int b43_wireless_core_attach(struct b43_wldev *dev) if (!wl-current_dev) wl-current_dev = dev; INIT_WORK(dev-restart_work, b43_chip_reset); - b43_rfkill_alloc(dev); b43_radio_turn_off(dev, 1); b43_switch_analog(dev, 0); diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index 456930f..9b1f905 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c @@ -47,18 +47,21 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) struct b43_wldev *dev = poll_dev-private; struct b43_wl *wl = dev-wl; bool enabled; + bool report_change = 0; mutex_lock(wl-mutex); B43_WARN_ON(b43_status(dev) B43_STAT_INITIALIZED); enabled = b43_is_hw_radio_enabled(dev); if (unlikely(enabled != dev-radio_hw_enable)) { dev-radio_hw_enable = enabled; + report_change = 1; b43info(wl, Radio hardware status changed to %s\n, enabled ? ENABLED : DISABLED); - mutex_unlock(wl-mutex); + } + mutex_unlock(wl-mutex); + + if (unlikely(report_change)) input_report_key(poll_dev-input, KEY_WLAN, enabled); - } else - mutex_unlock(wl-mutex); } /* Called when the RFKILL toggled in software. */ @@ -68,18 +71,11 @@ static int b43_rfkill_soft_toggle(void *data, enum rfkill_state state) struct b43_wl *wl = dev-wl; int err = 0; - /* When RFKILL is registered, it will call back into this callback. -* wl-mutex will already be locked when this happens. -* So first trylock. On contention check if we are in initialization. -* Silently return if that happens to avoid a deadlock. */ - if (mutex_trylock(wl-mutex) == 0) { - if (b43_status(dev) B43_STAT_INITIALIZED) - return 0; - mutex_lock(wl-mutex); - } - if (b43_status(dev) B43_STAT_INITIALIZED) - goto out_unlock; + if (!wl-rfkill.registered) + return 0; + mutex_lock(wl-mutex); + B43_WARN_ON(b43_status(dev) B43_STAT_INITIALIZED); switch (state) { case RFKILL_STATE_ON: if (!dev-radio_hw_enable) { @@ -104,11 +100,11 @@ out_unlock: char * b43_rfkill_led_name(struct b43_wldev *dev) { - struct b43_wl *wl = dev-wl; + struct b43_rfkill *rfk = (dev-wl-rfkill); - if (!wl-rfkill.rfkill) + if (!rfk-registered) return NULL; - return rfkill_get_led_name(wl-rfkill.rfkill); + return rfkill_get_led_name(rfk-rfkill); } void b43_rfkill_init(struct b43_wldev *dev) @@ -117,53 +113,13 @@ void b43_rfkill_init(struct b43_wldev *dev) struct b43_rfkill *rfk = (wl-rfkill); int err; - if (rfk-rfkill) { - err = rfkill_register(rfk-rfkill); - if (err) { - b43warn(wl, Failed to register RF-kill button\n); - goto err_free_rfk; - } - } - if (rfk-poll_dev) { - err = input_register_polled_device(rfk-poll_dev); - if (err) { -
b43legacy: fix possible buffer overrun in debugfs
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=187a9dca3f2f90341e321a3998a5b0c74111f77c Commit: 187a9dca3f2f90341e321a3998a5b0c74111f77c Parent: 35c7e6602b81bdacb745f04236a419402777139e Author: Stefano Brivio [EMAIL PROTECTED] AuthorDate: Tue Nov 6 22:48:36 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:13 2007 -0500 b43legacy: fix possible buffer overrun in debugfs Fix possible buffer overrun. The patch to b43 by Michael Buesch [EMAIL PROTECTED] has been ported to b43legacy. Signed-off-by: Stefano Brivio [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43legacy/debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/b43legacy/debugfs.c b/drivers/net/wireless/b43legacy/debugfs.c index eefa6fb..619b453 100644 --- a/drivers/net/wireless/b43legacy/debugfs.c +++ b/drivers/net/wireless/b43legacy/debugfs.c @@ -124,7 +124,7 @@ static ssize_t shm_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufs __le16 *le16buf = (__le16 *)buf; for (i = 0; i 0x1000; i++) { - if (bufsize = 0) + if (bufsize sizeof(tmp)) break; tmp = b43legacy_shm_read16(dev, B43legacy_SHM_SHARED, 2 * i); le16buf[i] = cpu_to_le16(tmp); - 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
b43legacy: add me as maintainer and fix URLs
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2817ef1a5d9010873692f8353f6320ebecf9b837 Commit: 2817ef1a5d9010873692f8353f6320ebecf9b837 Parent: 187a9dca3f2f90341e321a3998a5b0c74111f77c Author: Stefano Brivio [EMAIL PROTECTED] AuthorDate: Tue Nov 6 22:48:56 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:13 2007 -0500 b43legacy: add me as maintainer and fix URLs As b43legacy is going to be orphaned, add me as a maintainer. Fix URLs for the related website and fix my e-mail address in MAINTAINERS file. Signed-off-by: Stefano Brivio [EMAIL PROTECTED] Cc: Larry Finger [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- MAINTAINERS | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1c7c229..6a97027 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -787,23 +787,25 @@ B43 WIRELESS DRIVER P: Michael Buesch M: [EMAIL PROTECTED] P: Stefano Brivio -M: [EMAIL PROTECTED] +M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] -W: http://bcm43xx.berlios.de/ +W: http://linuxwireless.org/en/users/Drivers/b43 S: Maintained B43LEGACY WIRELESS DRIVER P: Larry Finger M: [EMAIL PROTECTED] +P: Stefano Brivio +M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] -W: http://bcm43xx.berlios.de/ +W: http://linuxwireless.org/en/users/Drivers/b43 S: Maintained BCM43XX WIRELESS DRIVER (SOFTMAC BASED VERSION) P: Larry Finger M: [EMAIL PROTECTED] P: Stefano Brivio -M: [EMAIL PROTECTED] +M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] W: http://bcm43xx.berlios.de/ S: Maintained - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
b43: properly request pcmcia IRQ
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9dcb5f477ffa757b7f1817da557905ccae17fc37 Commit: 9dcb5f477ffa757b7f1817da557905ccae17fc37 Parent: 440cb58a7aa979fabb02a38e55bfe93adde0f41c Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Wed Nov 7 19:08:26 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:13 2007 -0500 b43: properly request pcmcia IRQ PCMCIA needs an additional step to request the IRQ. No need to add code to release the IRQ here, as that's done automatically in pcmcia_disable_device(). Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43/pcmcia.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index 4b6648f..b79a6bd 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c @@ -112,6 +112,14 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) if (res != CS_SUCCESS) goto err_disable; + dev-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FIRST_SHARED; + dev-irq.IRQInfo1 = IRQ_LEVEL_ID | IRQ_SHARE_ID; + dev-irq.Handler = NULL; /* The handler is registered later. */ + dev-irq.Instance = NULL; + res = pcmcia_request_irq(dev, dev-irq); + if (res != CS_SUCCESS) + goto err_disable; + res = pcmcia_request_configuration(dev, dev-conf); if (res != CS_SUCCESS) goto err_disable; - 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
b43legacy: Fix sparse warning
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd73ba911248ea3620cd201deda58f0b532ce429 Commit: cd73ba911248ea3620cd201deda58f0b532ce429 Parent: 9dcb5f477ffa757b7f1817da557905ccae17fc37 Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Wed Nov 7 21:21:55 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:13 2007 -0500 b43legacy: Fix sparse warning Fix a sparse warning about a nonstatic function. Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43legacy/main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 1ebb787..3bde1e9 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -3335,7 +3335,7 @@ out_mutex_unlock: return err; } -void b43legacy_stop(struct ieee80211_hw *hw) +static void b43legacy_stop(struct ieee80211_hw *hw) { struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); struct b43legacy_wldev *dev = wl-current_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
b43: Fix kconfig dependencies for rfkill and leds
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bdb3f751cfe6d8d5737a2ff406d7169361b5dfb2 Commit: bdb3f751cfe6d8d5737a2ff406d7169361b5dfb2 Parent: cd73ba911248ea3620cd201deda58f0b532ce429 Author: Michael Buesch [EMAIL PROTECTED] AuthorDate: Wed Nov 7 21:24:07 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:14 2007 -0500 b43: Fix kconfig dependencies for rfkill and leds Fix dependencies for built-in b43. Signed-off-by: Michael Buesch [EMAIL PROTECTED] Signed-off-by: John W. Linville [EMAIL PROTECTED] --- drivers/net/wireless/b43/Kconfig | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig index e3c573e..fdbc351 100644 --- a/drivers/net/wireless/b43/Kconfig +++ b/drivers/net/wireless/b43/Kconfig @@ -61,16 +61,18 @@ config B43_PCMCIA If unsure, say N. -# LED support +# This config option automatically enables b43 LEDS support, +# if it's possible. config B43_LEDS bool - depends on B43 MAC80211_LEDS + depends on B43 MAC80211_LEDS (LEDS_CLASS = y || LEDS_CLASS = B43) default y -# RFKILL support +# This config option automatically enables b43 RFKILL support, +# if it's possible. config B43_RFKILL bool - depends on B43 RFKILL RFKILL_INPUT INPUT_POLLDEV + depends on B43 (RFKILL = y || RFKILL = B43) RFKILL_INPUT (INPUT_POLLDEV = y || INPUT_POLLDEV = B43) default y config B43_DEBUG - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: netpoll on port 0 only
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5e68c02fe4d8dff2ff3c5212f9f67082849cc4b Commit: a5e68c02fe4d8dff2ff3c5212f9f67082849cc4b Parent: bdb3f751cfe6d8d5737a2ff406d7169361b5dfb2 Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Tue Nov 6 11:45:40 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:14 2007 -0500 sky2: netpoll on port 0 only Netpoll will only work on port 0 because of the restrictive relationship between NAPI and netpoll. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 94de85f..4666e6e 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -3995,7 +3995,8 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, dev-tx_timeout = sky2_tx_timeout; dev-watchdog_timeo = TX_WATCHDOG; #ifdef CONFIG_NET_POLL_CONTROLLER - dev-poll_controller = sky2_netpoll; + if (port == 0) + dev-poll_controller = sky2_netpoll; #endif sky2 = netdev_priv(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
bonding: fix rtnl locking merge error
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1466a21997212a5fb33d5da9357841972b28b007 Commit: 1466a21997212a5fb33d5da9357841972b28b007 Parent: a5e68c02fe4d8dff2ff3c5212f9f67082849cc4b Author: Jay Vosburgh [EMAIL PROTECTED] AuthorDate: Tue Nov 6 13:33:28 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:14 2007 -0500 bonding: fix rtnl locking merge error Looks like I incorrectly merged one of the rtnl lock changes, so that one function, bonding_show_active_slave, held rtnl but didn't release it, and another, bonding_store_active_slave, never held rtnl but did release it. Fixed so the first function doesn't mess with rtnl, and the second correctly acquires and releases rtnl. Bug reported by Moni Shoua [EMAIL PROTECTED] Signed-off-by: Jay Vosburgh [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/bonding/bond_sysfs.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 7a06ade..b29330d 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -1193,8 +1193,6 @@ static ssize_t bonding_show_active_slave(struct device *d, struct bonding *bond = to_bond(d); int count; - rtnl_lock(); - read_lock(bond-curr_slave_lock); curr = bond-curr_active_slave; read_unlock(bond-curr_slave_lock); @@ -1216,7 +1214,9 @@ static ssize_t bonding_store_active_slave(struct device *d, struct slave *new_active = NULL; struct bonding *bond = to_bond(d); + rtnl_lock(); write_lock_bh(bond-lock); + if (!USES_PRIMARY(bond-params.mode)) { printk(KERN_INFO DRV_NAME : %s: Unable to change active slave; %s is in mode %d\n, - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
bonding: don't validate address at device open
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3a1521b7e5b6964c293bb8ed6773513f8f503de5 Commit: 3a1521b7e5b6964c293bb8ed6773513f8f503de5 Parent: 1466a21997212a5fb33d5da9357841972b28b007 Author: Jay Vosburgh [EMAIL PROTECTED] AuthorDate: Tue Nov 6 13:33:29 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:14 2007 -0500 bonding: don't validate address at device open The standard validate_addr handler refuses to accept the all zeroes address as valid. However, it's common historical practice for the bonding master to be configured up prior to having any slaves, at which time the master will have a MAC address of all zeroes. Resolved by setting the dev-validate_addr to NULL. The master still can't end up with an invalid address, as the set_mac_address function tests for validity. Signed-off-by: Jay Vosburgh [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/bonding/bond_main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6937ef0..a198404 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4405,6 +4405,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params) bond_dev-set_multicast_list = bond_set_multicast_list; bond_dev-change_mtu = bond_change_mtu; bond_dev-set_mac_address = bond_set_mac_address; + bond_dev-validate_addr = NULL; bond_set_mode_ops(bond, bond-params.mode); - 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
pasemi_mac: Don't set replace-source-address descriptor bits
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbd62af7de9ee63f83c0262e4acc3b3319c09c8b Commit: dbd62af7de9ee63f83c0262e4acc3b3319c09c8b Parent: 3a1521b7e5b6964c293bb8ed6773513f8f503de5 Author: Olof Johansson [EMAIL PROTECTED] AuthorDate: Tue Nov 6 22:20:39 2007 -0600 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:14 2007 -0500 pasemi_mac: Don't set replace-source-address descriptor bits Don't use the replace source address with local MAC address bits, since it causes problems on some variations of the hardware due to an erratum. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/pasemi_mac.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index ab4d309..b14f171 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c @@ -1126,7 +1126,7 @@ static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) unsigned long flags; int i, nfrags; - dflags = XCT_MACTX_O | XCT_MACTX_ST | XCT_MACTX_SS | XCT_MACTX_CRC_PAD; + dflags = XCT_MACTX_O | XCT_MACTX_ST | XCT_MACTX_CRC_PAD; if (skb-ip_summed == CHECKSUM_PARTIAL) { const unsigned char *nh = skb_network_header(skb); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
pasemi_mac: Fix CRC checks
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=32bee776533eea839f9499d985c1490b5ac98512 Commit: 32bee776533eea839f9499d985c1490b5ac98512 Parent: dbd62af7de9ee63f83c0262e4acc3b3319c09c8b Author: Olof Johansson [EMAIL PROTECTED] AuthorDate: Tue Nov 6 22:21:38 2007 -0600 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:14 2007 -0500 pasemi_mac: Fix CRC checks Make sure we don't feed packets with bad CRC up the network stack, and discount the packet length as reported from the MAC for the CRC field. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/pasemi_mac.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index b14f171..09b4fde 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c @@ -580,6 +580,16 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) len = (macrx XCT_MACRX_LLEN_M) XCT_MACRX_LLEN_S; + pci_unmap_single(mac-dma_pdev, dma, len, PCI_DMA_FROMDEVICE); + + if (macrx XCT_MACRX_CRC) { + /* CRC error flagged */ + mac-netdev-stats.rx_errors++; + mac-netdev-stats.rx_crc_errors++; + dev_kfree_skb_irq(skb); + goto next; + } + if (len 256) { struct sk_buff *new_skb; @@ -595,11 +605,10 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) } else info-skb = NULL; - pci_unmap_single(mac-dma_pdev, dma, len, PCI_DMA_FROMDEVICE); - info-dma = 0; - skb_put(skb, len); + /* Don't include CRC */ + skb_put(skb, len-4); if (likely((macrx XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) { skb-ip_summed = CHECKSUM_UNNECESSARY; @@ -614,6 +623,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) skb-protocol = eth_type_trans(skb, mac-netdev); netif_receive_skb(skb); +next: RX_RING(mac, n) = 0; RX_RING(mac, n+1) = 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
qla3xxx: bugfix: Move link state machine into a worker thread
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e23b7d3b54c07f1c4fee1ebc418d1a37248654e Commit: 3e23b7d3b54c07f1c4fee1ebc418d1a37248654e Parent: 32bee776533eea839f9499d985c1490b5ac98512 Author: Ron Mercer [EMAIL PROTECTED] AuthorDate: Wed Nov 7 13:59:06 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:15 2007 -0500 qla3xxx: bugfix: Move link state machine into a worker thread The link state machine requires access to some resources that are shared with the iSCSI function on the chip. (See iSCSI driver at drivers/scsi/qla4xxx) If the interface is being up/downed at a rapid pace this driver may need to sleep waiting to get access to the common resources. For this we are moving the state machine to run as a work thread. Signed-off-by: Ron Mercer [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/qla3xxx.c | 27 +-- drivers/net/qla3xxx.h |1 + 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 30adf72..4f0fd41 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -1645,8 +1645,11 @@ static int ql_finish_auto_neg(struct ql3_adapter *qdev) return 0; } -static void ql_link_state_machine(struct ql3_adapter *qdev) +static void ql_link_state_machine_work(struct work_struct *work) { + struct ql3_adapter *qdev = + container_of(work, struct ql3_adapter, link_state_work.work); + u32 curr_link_state; unsigned long hw_flags; @@ -1661,6 +1664,10 @@ static void ql_link_state_machine(struct ql3_adapter *qdev) state.\n, qdev-ndev-name); spin_unlock_irqrestore(qdev-hw_lock, hw_flags); + + /* Restart timer on 2 second interval. */ + mod_timer(qdev-adapter_timer, jiffies + HZ * 1);\ + return; } @@ -1705,6 +1712,9 @@ static void ql_link_state_machine(struct ql3_adapter *qdev) break; } spin_unlock_irqrestore(qdev-hw_lock, hw_flags); + + /* Restart timer on 2 second interval. */ + mod_timer(qdev-adapter_timer, jiffies + HZ * 1); } /* @@ -3941,19 +3951,7 @@ static void ql_get_board_info(struct ql3_adapter *qdev) static void ql3xxx_timer(unsigned long ptr) { struct ql3_adapter *qdev = (struct ql3_adapter *)ptr; - - if (test_bit(QL_RESET_ACTIVE,qdev-flags)) { - printk(KERN_DEBUG PFX - %s: Reset in progress.\n, - qdev-ndev-name); - goto end; - } - - ql_link_state_machine(qdev); - - /* Restart timer on 2 second interval. */ -end: - mod_timer(qdev-adapter_timer, jiffies + HZ * 1); + queue_delayed_work(qdev-workqueue, qdev-link_state_work, 0); } static int __devinit ql3xxx_probe(struct pci_dev *pdev, @@ -4103,6 +4101,7 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev, qdev-workqueue = create_singlethread_workqueue(ndev-name); INIT_DELAYED_WORK(qdev-reset_work, ql_reset_work); INIT_DELAYED_WORK(qdev-tx_timeout_work, ql_tx_timeout_work); + INIT_DELAYED_WORK(qdev-link_state_work, ql_link_state_machine_work); init_timer(qdev-adapter_timer); qdev-adapter_timer.function = ql3xxx_timer; diff --git a/drivers/net/qla3xxx.h b/drivers/net/qla3xxx.h index fbcb0b9..d0ffb30 100644 --- a/drivers/net/qla3xxx.h +++ b/drivers/net/qla3xxx.h @@ -1286,6 +1286,7 @@ struct ql3_adapter { struct workqueue_struct *workqueue; struct delayed_work reset_work; struct delayed_work tx_timeout_work; + struct delayed_work link_state_work; u32 max_frame_size; u32 device_id; u16 phyType; - 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: bugfix: Fix bad logical operation in link state machine.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad4c9a09c7bf6aaa418679f0fb48484eab53a285 Commit: ad4c9a09c7bf6aaa418679f0fb48484eab53a285 Parent: 3e23b7d3b54c07f1c4fee1ebc418d1a37248654e Author: Ron Mercer [EMAIL PROTECTED] AuthorDate: Wed Nov 7 13:59:07 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:15 2007 -0500 qla3xxx: bugfix: Fix bad logical operation in link state machine. Luckily, this wasn't reported or reproduced. The logical operation for setting duplex had wrong grouping. Signed-off-by: Ron Mercer [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/qla3xxx.c | 15 +-- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 4f0fd41..a579111 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -1456,16 +1456,11 @@ static void ql_phy_start_neg_ex(struct ql3_adapter *qdev) PHYAddr[qdev-mac_index]); reg = ~PHY_GIG_ALL_PARAMS; - if(portConfiguration - PORT_CONFIG_FULL_DUPLEX_ENABLED - PORT_CONFIG_1000MB_SPEED) { - reg |= PHY_GIG_ADV_1000F; - } - - if(portConfiguration - PORT_CONFIG_HALF_DUPLEX_ENABLED - PORT_CONFIG_1000MB_SPEED) { - reg |= PHY_GIG_ADV_1000H; + if(portConfiguration PORT_CONFIG_1000MB_SPEED) { + if(portConfiguration PORT_CONFIG_FULL_DUPLEX_ENABLED) + reg |= PHY_GIG_ADV_1000F; + else + reg |= PHY_GIG_ADV_1000H; } ql_mii_write_reg_ex(qdev, PHY_GIG_CONTROL, reg, - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ax88796: add superh to kconfig dependencies
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8687991a734a67f1638782c968f46fff0f94bb1f Commit: 8687991a734a67f1638782c968f46fff0f94bb1f Parent: ad4c9a09c7bf6aaa418679f0fb48484eab53a285 Author: Magnus Damm [EMAIL PROTECTED] AuthorDate: Thu Nov 8 16:31:05 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:15 2007 -0500 ax88796: add superh to kconfig dependencies ax88796: add superh to kconfig dependencies This patch adds sh architecture support to the ax88796 kconfig. Signed-off-by: Magnus Damm [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index cb581eb..bf8890e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -235,7 +235,7 @@ source drivers/net/arm/Kconfig config AX88796 tristate ASIX AX88796 NE2000 clone support - depends on ARM || MIPS + depends on ARM || MIPS || SUPERH select CRC32 select MII help - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2: new pci id's
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a37a68dab77c234c80a8e25455d568f30e86c09 Commit: 5a37a68dab77c234c80a8e25455d568f30e86c09 Parent: 8687991a734a67f1638782c968f46fff0f94bb1f Author: Stephen Hemminger [EMAIL PROTECTED] AuthorDate: Thu Nov 8 08:20:17 2007 -0800 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:15 2007 -0500 sky2: new pci id's Found a couple of more chips in the latest version of the vendor driver. They are minor variations on existing chips. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/net/sky2.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 4666e6e..a2070db 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -121,6 +121,7 @@ static const struct pci_device_id sky2_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4353) }, /* 88E8039 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4354) }, /* 88E8040 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4356) }, /* 88EC033 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4357) }, /* 88E8042 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x435A) }, /* 88E8048 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4360) }, /* 88E8052 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, /* 88E8050 */ @@ -134,6 +135,7 @@ static const struct pci_device_id sky2_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, /* 88EC042 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436A) }, /* 88E8058 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436C) }, /* 88E8072 */ { 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
r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita)
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50d84c2dc00e48ff9ba018ed0dd23276cf79e566 Commit: 50d84c2dc00e48ff9ba018ed0dd23276cf79e566 Parent: 5a37a68dab77c234c80a8e25455d568f30e86c09 Author: Mark Lord [EMAIL PROTECTED] AuthorDate: Thu Nov 8 22:29:07 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:15 2007 -0500 r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita) RTL_GIGA_MAC_VER_17 breaks as well. Signed-off-by: Mark Lord [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] Cc: Edward Hsu [EMAIL PROTECTED] --- drivers/net/r8169.c | 16 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index a37cf82..f9ba2e4 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1247,16 +1247,6 @@ static void rtl8169sb_hw_phy_config(void __iomem *ioaddr) rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); } -static void rtl8168b_hw_phy_config(void __iomem *ioaddr) -{ - struct phy_reg phy_reg_init[] = { - { 0x1f, 0x }, - { 0x10, 0xf41b }, - { 0x1f, 0x } - }; - - rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); -} static void rtl8168cp_hw_phy_config(void __iomem *ioaddr) { @@ -1326,12 +1316,6 @@ static void rtl_hw_phy_config(struct net_device *dev) case RTL_GIGA_MAC_VER_04: rtl8169sb_hw_phy_config(ioaddr); break; - case RTL_GIGA_MAC_VER_11: - case RTL_GIGA_MAC_VER_12: - break; - case RTL_GIGA_MAC_VER_17: - rtl8168b_hw_phy_config(ioaddr); - break; case RTL_GIGA_MAC_VER_18: rtl8168cp_hw_phy_config(ioaddr); break; - 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
r8169: prevent bit sign expansion error in mdio_write
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6baf3af89a266a3d745117de570788b956396e7 Commit: a6baf3af89a266a3d745117de570788b956396e7 Parent: 50d84c2dc00e48ff9ba018ed0dd23276cf79e566 Author: Francois Romieu [EMAIL PROTECTED] AuthorDate: Thu Nov 8 23:23:21 2007 +0100 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 04:25:16 2007 -0500 r8169: prevent bit sign expansion error in mdio_write Oops. The current code does not like being given an u16 with the highest bit set as an argument to mdio_write. Let's enforce a correct range of values for both the register address and value (resp. 5 and 16 bits). The callers are currently left as-is. Signed-off-by: Francois Romieu [EMAIL PROTECTED] Cc: Edward Hsu [EMAIL PROTECTED] --- drivers/net/r8169.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index f9ba2e4..1f647b9 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -470,7 +470,7 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value) { int i; - RTL_W32(PHYAR, 0x8000 | (reg_addr 0xFF) 16 | value); + RTL_W32(PHYAR, 0x8000 | (reg_addr 0x1f) 16 | (value 0x)); for (i = 20; i 0; i--) { /* @@ -487,7 +487,7 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr) { int i, value = -1; - RTL_W32(PHYAR, 0x0 | (reg_addr 0xFF) 16); + RTL_W32(PHYAR, 0x0 | (reg_addr 0x1f) 16); for (i = 20; i 0; i--) { /* @@ -495,7 +495,7 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr) * the specified MII register. */ if (RTL_R32(PHYAR) 0x8000) { - value = (int) (RTL_R32(PHYAR) 0x); + value = RTL_R32(PHYAR) 0x; break; } udelay(25); - 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
ata_piix: add SATELLITE PRO U200 to broken suspend list
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62320e23c35077e8bc77184e8850d3f45441364b Commit: 62320e23c35077e8bc77184e8850d3f45441364b Parent: dbeeb816e805091e7cfc03baf36dc40b4adb2bbd Author: Yann Chachkoff [EMAIL PROTECTED] AuthorDate: Wed Nov 7 12:02:27 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:40 2007 -0500 ata_piix: add SATELLITE PRO U200 to broken suspend list Please warmly welcome the PRO variant of Satellite U200 to the broken suspend list. Original patch is from Yann Chachkoff. Patch reformatted and forwarded by Tejun Heo. Signed-off-by: Yann Chachkoff [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/ata_piix.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index f08cca2..328ce8a 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -960,6 +960,13 @@ static int piix_broken_suspend(void) }, }, { + .ident = Satellite Pro U200, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA), + DMI_MATCH(DMI_PRODUCT_NAME, SATELLITE PRO U200), + }, + }, + { .ident = Satellite U205, .matches = { DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA), - 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
nv_hardreset: update dangling reference to bugzilla entry
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=647c595dadb20d2c46e18bbd8d2a11e32f2a46e1 Commit: 647c595dadb20d2c46e18bbd8d2a11e32f2a46e1 Parent: 62320e23c35077e8bc77184e8850d3f45441364b Author: Fernando Luis Vázquez Cao [EMAIL PROTECTED] AuthorDate: Wed Nov 7 16:33:49 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:40 2007 -0500 nv_hardreset: update dangling reference to bugzilla entry Signed-off-by: Fernando Luis Vazquez Cao [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/sata_nv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 35b2df2..44f9e5d 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -1629,7 +1629,7 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class, /* SATA hardreset fails to retrieve proper device signature on * some controllers. Don't classify on hardreset. For more -* info, see http://bugme.osdl.org/show_bug.cgi?id=3352 +* info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352 */ return sata_std_hardreset(link, dummy, deadline); } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata sata_qstor nuke idle state
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=12ee7d3ceb08e9ab99a6c17c5c6a387645a32658 Commit: 12ee7d3ceb08e9ab99a6c17c5c6a387645a32658 Parent: 647c595dadb20d2c46e18bbd8d2a11e32f2a46e1 Author: Mark Lord [EMAIL PROTECTED] AuthorDate: Wed Nov 7 10:52:55 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:41 2007 -0500 libata sata_qstor nuke idle state sata_qstor nuke idle state. We're really only ever in one of two hardware states: packet, or mmio. Get rid of unnecessary qs_state_idle state. Signed-off-by: Mark Lord [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/sata_qstor.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 6d43ba7..9d3128c 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c @@ -103,7 +103,7 @@ enum { QS_DMA_BOUNDARY = ~0UL }; -typedef enum { qs_state_idle, qs_state_pkt, qs_state_mmio } qs_state_t; +typedef enum { qs_state_mmio, qs_state_pkt } qs_state_t; struct qs_port_priv { u8 *pkt; @@ -219,7 +219,9 @@ static void qs_irq_clear(struct ata_port *ap) static inline void qs_enter_reg_mode(struct ata_port *ap) { u8 __iomem *chan = qs_mmio_base(ap-host) + (ap-port_no * 0x4000); + struct qs_port_priv *pp = ap-private_data; + pp-state = qs_state_mmio; writeb(QS_CTR0_REG, chan + QS_CCT_CTR0); readb(chan + QS_CCT_CTR0);/* flush */ } @@ -235,19 +237,12 @@ static inline void qs_reset_channel_logic(struct ata_port *ap) static void qs_phy_reset(struct ata_port *ap) { - struct qs_port_priv *pp = ap-private_data; - - pp-state = qs_state_idle; qs_reset_channel_logic(ap); sata_phy_reset(ap); } static void qs_eng_timeout(struct ata_port *ap) { - struct qs_port_priv *pp = ap-private_data; - - if (pp-state != qs_state_idle) /* healthy paranoia */ - pp-state = qs_state_mmio; qs_reset_channel_logic(ap); ata_eng_timeout(ap); } @@ -406,7 +401,6 @@ static inline unsigned int qs_intr_pkt(struct ata_host *host) switch (sHST) { case 0: /* successful CPB */ case 3: /* device error */ - pp-state = qs_state_idle; qs_enter_reg_mode(qc-ap); qc-err_mask |= ac_err_mask(sDST); ata_qc_complete(qc); @@ -445,7 +439,6 @@ static inline unsigned int qs_intr_mmio(struct ata_host *host) ap-print_id, qc-tf.protocol, status); /* complete taskfile transaction */ - pp-state = qs_state_idle; qc-err_mask |= ac_err_mask(status); ata_qc_complete(qc); handled = 1; @@ -501,7 +494,6 @@ static int qs_port_start(struct ata_port *ap) rc = ata_port_start(ap); if (rc) return rc; - qs_enter_reg_mode(ap); pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); if (!pp) return -ENOMEM; @@ -512,6 +504,7 @@ static int qs_port_start(struct ata_port *ap) memset(pp-pkt, 0, QS_PKT_BYTES); ap-private_data = pp; + qs_enter_reg_mode(ap); addr = (u64)pp-pkt_dma; writel((u32) addr,chan + QS_CCF_CPBA); writel((u32)(addr 32), chan + QS_CCF_CPBA + 4); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata sata_qstor workaround for spurious interrupts
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=904c7bad994e6e7f9997174e0b33fcc521862136 Commit: 904c7bad994e6e7f9997174e0b33fcc521862136 Parent: 12ee7d3ceb08e9ab99a6c17c5c6a387645a32658 Author: Mark Lord [EMAIL PROTECTED] AuthorDate: Wed Nov 7 10:53:41 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:41 2007 -0500 libata sata_qstor workaround for spurious interrupts sata_qstor workaround for spurious interrupts. The qstor hardware generates spurious interrupts from time to time when switching in and out of packet mode. These eventually result in the IRQ being disabled, which kills other devices sharing this IRQ with us. This workaround isn't perfect, but it's about the best we can do for this hardware. Spurious interrupts will still happen, but won't be logged as such, and therefore won't cause the IRQ to be inadvertently disabled. Signed-off-by: Mark Lord [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/sata_qstor.c | 38 +- 1 files changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 9d3128c..7446a33 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c @@ -425,24 +425,27 @@ static inline unsigned int qs_intr_mmio(struct ata_host *host) if (ap !(ap-flags ATA_FLAG_DISABLED)) { struct ata_queued_cmd *qc; - struct qs_port_priv *pp = ap-private_data; - if (!pp || pp-state != qs_state_mmio) - continue; + struct qs_port_priv *pp; qc = ata_qc_from_tag(ap, ap-link.active_tag); - if (qc (!(qc-tf.flags ATA_TFLAG_POLLING))) { - - /* check main status, clearing INTRQ */ - u8 status = ata_check_status(ap); - if ((status ATA_BUSY)) - continue; - DPRINTK(ata%u: protocol %d (dev_stat 0x%X)\n, - ap-print_id, qc-tf.protocol, status); - - /* complete taskfile transaction */ - qc-err_mask |= ac_err_mask(status); - ata_qc_complete(qc); + if (!qc || !(qc-flags ATA_QCFLAG_ACTIVE)) { + /* +* The qstor hardware generates spurious +* interrupts from time to time when switching +* in and out of packet mode. +* There's no obvious way to know if we're +* here now due to that, so just ack the irq +* and pretend we knew it was ours.. (ugh). +* This does not affect packet mode. +*/ + ata_check_status(ap); handled = 1; + continue; } + pp = ap-private_data; + if (!pp || pp-state != qs_state_mmio) + continue; + if (!(qc-tf.flags ATA_TFLAG_POLLING)) + handled |= ata_host_intr(ap, qc); } } return handled; @@ -452,12 +455,13 @@ static irqreturn_t qs_intr(int irq, void *dev_instance) { struct ata_host *host = dev_instance; unsigned int handled = 0; + unsigned long flags; VPRINTK(ENTER\n); - spin_lock(host-lock); + spin_lock_irqsave(host-lock, flags); handled = qs_intr_pkt(host) | qs_intr_mmio(host); - spin_unlock(host-lock); + spin_unlock_irqrestore(host-lock, flags); VPRINTK(EXIT\n); - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata sata_qstor conversion to new error handling (EH).
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6004bda1cce51273ac9e71a39e680831b9ff4503 Commit: 6004bda1cce51273ac9e71a39e680831b9ff4503 Parent: 904c7bad994e6e7f9997174e0b33fcc521862136 Author: Mark Lord [EMAIL PROTECTED] AuthorDate: Wed Nov 7 10:54:15 2007 -0500 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:41 2007 -0500 libata sata_qstor conversion to new error handling (EH). sata_qstor conversion to new error handling (EH). Convert sata_qstor to use the newer libata EH mechanisms. Based on earlier work by Jeff Garzik. Signed-off-by: Mark Lord [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/sata_qstor.c | 65 -- 1 files changed, 51 insertions(+), 14 deletions(-) diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 7446a33..2f1de6e 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c @@ -116,14 +116,15 @@ static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); static int qs_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); static int qs_port_start(struct ata_port *ap); static void qs_host_stop(struct ata_host *host); -static void qs_phy_reset(struct ata_port *ap); static void qs_qc_prep(struct ata_queued_cmd *qc); static unsigned int qs_qc_issue(struct ata_queued_cmd *qc); static int qs_check_atapi_dma(struct ata_queued_cmd *qc); static void qs_bmdma_stop(struct ata_queued_cmd *qc); static u8 qs_bmdma_status(struct ata_port *ap); static void qs_irq_clear(struct ata_port *ap); -static void qs_eng_timeout(struct ata_port *ap); +static void qs_freeze(struct ata_port *ap); +static void qs_thaw(struct ata_port *ap); +static void qs_error_handler(struct ata_port *ap); static struct scsi_host_template qs_ata_sht = { .module = THIS_MODULE, @@ -150,11 +151,12 @@ static const struct ata_port_operations qs_ata_ops = { .check_atapi_dma= qs_check_atapi_dma, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, - .phy_reset = qs_phy_reset, .qc_prep= qs_qc_prep, .qc_issue = qs_qc_issue, .data_xfer = ata_data_xfer, - .eng_timeout= qs_eng_timeout, + .freeze = qs_freeze, + .thaw = qs_thaw, + .error_handler = qs_error_handler, .irq_clear = qs_irq_clear, .irq_on = ata_irq_on, .scr_read = qs_scr_read, @@ -169,8 +171,6 @@ static const struct ata_port_info qs_port_info[] = { /* board_2068_idx */ { .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_SATA_RESET | - //FIXME ATA_FLAG_SRST | ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING, .pio_mask = 0x10, /* pio4 */ .udma_mask = ATA_UDMA6, @@ -235,16 +235,28 @@ static inline void qs_reset_channel_logic(struct ata_port *ap) qs_enter_reg_mode(ap); } -static void qs_phy_reset(struct ata_port *ap) +static void qs_freeze(struct ata_port *ap) { - qs_reset_channel_logic(ap); - sata_phy_reset(ap); + u8 __iomem *mmio_base = qs_mmio_base(ap-host); + + writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ + qs_enter_reg_mode(ap); +} + +static void qs_thaw(struct ata_port *ap) +{ + u8 __iomem *mmio_base = qs_mmio_base(ap-host); + + qs_enter_reg_mode(ap); + writeb(1, mmio_base + QS_HCT_CTRL); /* enable host interrupts */ } -static void qs_eng_timeout(struct ata_port *ap) +static int qs_prereset(struct ata_link *link, unsigned long deadline) { + struct ata_port *ap = link-ap; + qs_reset_channel_logic(ap); - ata_eng_timeout(ap); + return ata_std_prereset(link, deadline); } static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) @@ -255,6 +267,13 @@ static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) return 0; } +static void qs_error_handler(struct ata_port *ap) +{ + qs_enter_reg_mode(ap); + ata_do_eh(ap, qs_prereset, ata_std_softreset, NULL, + ata_std_postreset); +} + static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val) { if (sc_reg SCR_CONTROL) @@ -353,7 +372,6 @@ static unsigned int qs_qc_issue(struct ata_queued_cmd *qc) switch (qc-tf.protocol) { case ATA_PROT_DMA: - pp-state = qs_state_pkt; qs_packet_start(qc); return 0; @@ -370,6 +388,26 @@ static unsigned int qs_qc_issue(struct ata_queued_cmd *qc) return
libata: Support PIO polling-only hosts.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d46b2e2faa56d12c6d51bf1071fd11abd009d0b Commit: 3d46b2e2faa56d12c6d51bf1071fd11abd009d0b Parent: 6004bda1cce51273ac9e71a39e680831b9ff4503 Author: Paul Mundt [EMAIL PROTECTED] AuthorDate: Thu Nov 8 11:14:56 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:41 2007 -0500 libata: Support PIO polling-only hosts. By default ata_host_activate() expects a valid IRQ in order to successfully register the host. This patch enables a special case for registering polling-only hosts that either don't have IRQs or have buggy IRQ generation (either in terms of handling or sensing), which otherwise work fine. Hosts that want to use polling mode can simply set ATA_FLAG_PIO_POLLING and pass in an invalid IRQ. Signed-off-by: Paul Mundt [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ec3ce12..89fd0e9 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -7178,6 +7178,10 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) * request IRQ and register it. This helper takes necessasry * arguments and performs the three steps in one go. * + * An invalid IRQ skips the IRQ registration and expects the host to + * have set polling mode on the port. In this case, @irq_handler + * should be NULL. + * * LOCKING: * Inherited from calling layer (may sleep). * @@ -7194,6 +7198,12 @@ int ata_host_activate(struct ata_host *host, int irq, if (rc) return rc; + /* Special case for polling mode */ + if (!irq) { + WARN_ON(irq_handler); + return ata_host_register(host, sht); + } + rc = devm_request_irq(host-dev, irq, irq_handler, irq_flags, dev_driver_string(host-dev), host); if (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
libata: pata_platform: Support polling-mode configuration.
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f7fc0ceb4d72ea5c40d50053b68ebecfbd0cc38c Commit: f7fc0ceb4d72ea5c40d50053b68ebecfbd0cc38c Parent: 3d46b2e2faa56d12c6d51bf1071fd11abd009d0b Author: Paul Mundt [EMAIL PROTECTED] AuthorDate: Thu Nov 8 11:15:21 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:41 2007 -0500 libata: pata_platform: Support polling-mode configuration. Some SH boards (old R2D-1 boards) have generally not had working CF under libata, due to both buswidth issues (handled by Aoi Shinkai in 43f4b8c7578b928892b6f01d374346ae14e5eb70), and buggy interrupt controllers. For these sorts of boards simply disabling the IRQ and polling ends up working fine. This conditionalizes the IRQ resource for pata_platform and lets platforms that want to use polling mode simply omit the resource entirely. Signed-off-by: Paul Mundt [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/pata_platform.c | 35 --- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index fc72a96..ac03a90 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c @@ -1,7 +1,7 @@ /* * Generic platform device PATA driver * - * Copyright (C) 2006 Paul Mundt + * Copyright (C) 2006 - 2007 Paul Mundt * * Based on pata_pcmcia: * @@ -22,7 +22,7 @@ #include linux/pata_platform.h #define DRV_NAME pata_platform -#define DRV_VERSION 1.1 +#define DRV_VERSION 1.2 static int pio_mask = 1; @@ -120,15 +120,20 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr, * Register a platform bus IDE interface. Such interfaces are PIO and we * assume do not support IRQ sharing. * - * Platform devices are expected to contain 3 resources per port: + * Platform devices are expected to contain at least 2 resources per port: * * - I/O Base (IORESOURCE_IO or IORESOURCE_MEM) * - CTL Base (IORESOURCE_IO or IORESOURCE_MEM) + * + * and optionally: + * * - IRQ (IORESOURCE_IRQ) * * If the base resources are both mem types, the ioremap() is handled * here. For IORESOURCE_IO, it's assumed that there's no remapping * necessary. + * + * If no IRQ resource is present, PIO polling mode is used instead. */ static int __devinit pata_platform_probe(struct platform_device *pdev) { @@ -137,11 +142,12 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) struct ata_port *ap; struct pata_platform_info *pp_info; unsigned int mmio; + int irq; /* * Simple resource validation .. */ - if (unlikely(pdev-num_resources != 3)) { + if ((pdev-num_resources != 3) (pdev-num_resources != 2)) { dev_err(pdev-dev, invalid number of resources\n); return -EINVAL; } @@ -173,6 +179,13 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) (ctl_res-flags == IORESOURCE_MEM)); /* +* And the IRQ +*/ + irq = platform_get_irq(pdev, 0); + if (irq 0) + irq = 0;/* no irq */ + + /* * Now that that's out of the way, wire up the port.. */ host = ata_host_alloc(pdev-dev, 1); @@ -185,6 +198,14 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) ap-flags |= ATA_FLAG_SLAVE_POSS; /* +* Use polling mode if there's no IRQ +*/ + if (!irq) { + ap-flags |= ATA_FLAG_PIO_POLLING; + ata_port_desc(ap, no IRQ, using PIO polling); + } + + /* * Handle the MMIO case */ if (mmio) { @@ -213,9 +234,9 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) (unsigned long long)ctl_res-start); /* activate */ - return ata_host_activate(host, platform_get_irq(pdev, 0), -ata_interrupt, pp_info ? pp_info-irq_flags -: 0, pata_platform_sht); + return ata_host_activate(host, irq, irq ? ata_interrupt : NULL, +pp_info ? pp_info-irq_flags : 0, +pata_platform_sht); } /** - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: skip 0xff polling for PATA controllers
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1974e20161a2c097c481d2ff711de7db56cb2cd6 Commit: 1974e20161a2c097c481d2ff711de7db56cb2cd6 Parent: f7fc0ceb4d72ea5c40d50053b68ebecfbd0cc38c Author: Tejun Heo [EMAIL PROTECTED] AuthorDate: Thu Nov 8 11:20:18 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:41 2007 -0500 libata: skip 0xff polling for PATA controllers In a presentation of true workmanship, pata_ali asserts IRQ permanantly if the TF status register is read more than once when there's no device attached to the port. Avoid waiting polling for !0xff if it's PATA. It's needed only for some rare SATA devices anyway. This problem is reported by Luca Tettamanti in bugzilla bug 9298. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Tested-By: Luca Tettamanti [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 89fd0e9..fd33261 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3373,14 +3373,20 @@ void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline) * to clear 0xff after reset. For example, HHD424020F7SV00 * iVDR needs = 800ms while. Quantum GoVault needs even more * than that. +* +* Note that some PATA controllers (pata_ali) explode if +* status register is read more than once when there's no +* device attached. */ - while (1) { - u8 status = ata_chk_status(ap); + if (ap-flags ATA_FLAG_SATA) { + while (1) { + u8 status = ata_chk_status(ap); - if (status != 0xff || time_after(jiffies, deadline)) - return; + if (status != 0xff || time_after(jiffies, deadline)) + return; - msleep(50); + msleep(50); + } } } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
libata: port and host should be stopped before hardware resources are released
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0 Commit: 32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0 Parent: 1974e20161a2c097c481d2ff711de7db56cb2cd6 Author: Tejun Heo [EMAIL PROTECTED] AuthorDate: Thu Nov 8 13:09:00 2007 +0900 Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Thu Nov 8 13:08:42 2007 -0500 libata: port and host should be stopped before hardware resources are released Port / host stop calls used to be made from ata_host_release() which is called after all hardware resources acquired after host allocation are released. This is wrong as port and host stop routines often access the hardware. Add separate devres for port / host stop which is invoked right after IRQ is released but with all other hardware resources intact. The devres is added iff -host_stop and/or -port_stop exist. This problem has been spotted by Mark Lord. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Mark Lord [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 52 +--- 1 files changed, 39 insertions(+), 13 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index fd33261..8189803 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6827,19 +6827,6 @@ static void ata_host_release(struct device *gendev, void *res) if (!ap) continue; - if ((host-flags ATA_HOST_STARTED) ap-ops-port_stop) - ap-ops-port_stop(ap); - } - - if ((host-flags ATA_HOST_STARTED) host-ops-host_stop) - host-ops-host_stop(host); - - for (i = 0; i host-n_ports; i++) { - struct ata_port *ap = host-ports[i]; - - if (!ap) - continue; - if (ap-scsi_host) scsi_host_put(ap-scsi_host); @@ -6966,6 +6953,24 @@ struct ata_host *ata_host_alloc_pinfo(struct device *dev, return host; } +static void ata_host_stop(struct device *gendev, void *res) +{ + struct ata_host *host = dev_get_drvdata(gendev); + int i; + + WARN_ON(!(host-flags ATA_HOST_STARTED)); + + for (i = 0; i host-n_ports; i++) { + struct ata_port *ap = host-ports[i]; + + if (ap-ops-port_stop) + ap-ops-port_stop(ap); + } + + if (host-ops-host_stop) + host-ops-host_stop(host); +} + /** * ata_host_start - start and freeze ports of an ATA host * @host: ATA host to start ports for @@ -6984,6 +6989,8 @@ struct ata_host *ata_host_alloc_pinfo(struct device *dev, */ int ata_host_start(struct ata_host *host) { + int have_stop = 0; + void *start_dr = NULL; int i, rc; if (host-flags ATA_HOST_STARTED) @@ -6995,6 +7002,22 @@ int ata_host_start(struct ata_host *host) if (!host-ops !ata_port_is_dummy(ap)) host-ops = ap-ops; + if (ap-ops-port_stop) + have_stop = 1; + } + + if (host-ops-host_stop) + have_stop = 1; + + if (have_stop) { + start_dr = devres_alloc(ata_host_stop, 0, GFP_KERNEL); + if (!start_dr) + return -ENOMEM; + } + + for (i = 0; i host-n_ports; i++) { + struct ata_port *ap = host-ports[i]; + if (ap-ops-port_start) { rc = ap-ops-port_start(ap); if (rc) { @@ -7007,6 +7030,8 @@ int ata_host_start(struct ata_host *host) ata_eh_freeze_port(ap); } + if (start_dr) + devres_add(host-dev, start_dr); host-flags |= ATA_HOST_STARTED; return 0; @@ -7017,6 +7042,7 @@ int ata_host_start(struct ata_host *host) if (ap-ops-port_stop) ap-ops-port_stop(ap); } + devres_free(start_dr); return 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
libata: Don't fail device revalidation for bad _GTF methods
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=037f6bb79f753c014bc84bca0de9bf98bb5ab169 Commit: 037f6bb79f753c014bc84bca0de9bf98bb5ab169 Parent: 32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0 Author: Matthew Garrett [EMAIL PROTECTED] AuthorDate: Thu Nov 8 18:37:07 2007 + Committer: Jeff Garzik [EMAIL PROTECTED] CommitDate: Sat Nov 10 00:31:27 2007 -0500 libata: Don't fail device revalidation for bad _GTF methods Experience suggests that the _GTF method may be bad. We currently fail device revalidation in that case, which seems excessive. Signed-off-by: Matthew Garrett [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/libata-acpi.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 08a52dd..545ea86 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm); * * RETURNS: * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't - * contain valid data. -errno on other errors. + * contain valid data. */ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf, void **ptr_to_free) @@ -339,7 +339,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf, ata_dev_printk(dev, KERN_WARNING, _GTF evaluation failed (AE 0x%x)\n, status); - rc = -EIO; } goto out_free; } @@ -359,7 +358,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf, ata_dev_printk(dev, KERN_WARNING, _GTF unexpected object type 0x%x\n, out_obj-type); - rc = -EINVAL; goto out_free; } @@ -367,7 +365,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf, ata_dev_printk(dev, KERN_WARNING, unexpected _GTF length (%d)\n, out_obj-buffer.length); - rc = -EINVAL; goto out_free; } @@ -511,10 +508,7 @@ static int ata_acpi_exec_tfs(struct ata_device *dev) int gtf_count, i, rc; /* get taskfiles */ - rc = ata_dev_get_GTF(dev, gtf, ptr_to_free); - if (rc 0) - return rc; - gtf_count = rc; + gtf_count = ata_dev_get_GTF(dev, gtf, ptr_to_free); /* execute them */ for (i = 0, rc = 0; i gtf_count; 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