Roland Vossen [Wed, 1 Jun 2011 11:45:56 +0000 (13:45 +0200)]
staging: brcm80211: further simplified register access macro's
The SELECT_BUS_READ and SELECT_BUS_WRITE macro's always select
a (sdio) bus operation for fullmac, and a memory operation for
softmac. Thus they can be removed by expanding them in place.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 1 Jun 2011 11:45:55 +0000 (13:45 +0200)]
staging: brcm80211: moved register read/write macro's
Code cleanup. R_REG()/W_REG() macro's are overly complex. Copied
the macro's to both fullmac and softmac. Next patches will simplify
both copies of the macro's.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove nvram related source files
nvram.c is intended for devices with configuration stored in flash. This
is not required for the softmac driver nor the fullmac driver so it has
been removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Removed the file phy_version.h from the driver sources. It was not
used. For keeping track of the phy version, which is a separately
developed component, one definition has been kept and placed in
wlc_phy_int.h.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The source file nicpci.c is the only file left which needs the
pci core register definitions. These definitions have been added
to the source file so the include files can be removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove dependency on pci core difinitions from aiutils.c
The file aiutils.c included the register definition includes for the
PCI and PCIe core. This was for two functions which have been partly
moved to nicpci.c. This means that nicpci.h is the only include file
to provide interface to aiutils.c for PCI core related functions.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: add braces to SI_INFO macro definition
The additional braces allow the casted parameter to be indirected
immediately. Here is an example to clarify:
x = SI_INFO(y); => z = SI_INFO(y)->field_a;
z = x->field_a;
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: move PCI related header files to appropriate driver folder
The include file pcicfg.h is now only required by brcmfmac driver. Similarly,
nicpci.h is only required by brcmsmac driver. These header files have been
moved to the appropriate driver specific folder.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove usage of pcicfg.h from brcmsmac driver
All PCI related definitions needed by the brcmsmac driver are going to
be consolidated in single header file nicpci.h. This commit removes
need to include pcicfg.h in brcmsmac driver sources.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove inclusion of bcmsrom_fmt.h
The header file bcmsrom_fmt.h contains a lot of macro definitions
used by bcmsrom.c and one type definition used by wlc_phy_int.h.
The defintions have been moved appropriately and the include file
bcmsrom_fmt.h is removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The include file bcmsrom_tbl.h was only included by bcmsrom.c. The
required definitions have been move to bcmsrom.c and bcmsrom_tbl.h
has subsequenly been removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove SDIO related definitions from nicpci.h
The header file nicpci.h is now only used by brcmsmac driver, which
does not support SDIO. The conditional defintions have been removed
from the header file.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 1 Jun 2011 11:44:54 +0000 (13:44 +0200)]
staging: brcm80211: emptied wlioctl.h
Code cleanup. Broadcom specific ioctl functionality is not necessary
in the Linux world. Deleted unused defines and structs from wlioctl.h.
Moved softmac specific items from wlioctl.h to softmac header files,
same for fullmac items. Moved shared fullmac/softmac definitions to other
header files.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Wed, 1 Jun 2011 11:44:53 +0000 (13:44 +0200)]
staging: brcm80211: replaced #ifdef __mips__ sections by W_REG_FLUSH
Code cleanup. A read-after-write construct is present in the code to ensure
write order for certain Broadcom chips. Those chips are: bcm4706, bcm4716,
bcm4717, bcm4718. All these chips contain a MIPS processor. This patch gets
rid of several #ifdef __mips__ sections by defining a new macro in a header
file. This patch does not introduce behavioral changes and is purely meant
for code cleanup. The __mips__ define will be made more specific in a future
patch.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Patch "[0f06b6a] remove WLC_WATCHDOG_TBTT macro" resulted
in compiler warning because static function wlc_watchdog_backup_bi()
is no longer used. This has been fixed in this patch.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The structure definition for wlc_info contained a lot of fields that
are only initialized or not used at all. These have been removed to
cleanup the driver code.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hugh Dickins [Mon, 6 Jun 2011 05:03:13 +0000 (22:03 -0700)]
mm: fix ENOSPC returned by handle_mm_fault()
Al Viro observes that in the hugetlb case, handle_mm_fault() may return
a value of the kind ENOSPC when its caller is expecting a value of the
kind VM_FAULT_SIGBUS: fix alloc_huge_page()'s failure returns.
Linus Torvalds [Mon, 6 Jun 2011 08:51:28 +0000 (17:51 +0900)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: usb - turn off de-emphasis in s/pdif for cm6206
ALSA: asihpi: Use angle brackets for system includes
ALSA: fm801: add error handling if auto-detect fails
ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write
ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd()
ALSA: 6fire: Don't leak firmware in error path
ASoC: Fix wm_hubs input PGA ZC bits
ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared
Linus Torvalds [Mon, 6 Jun 2011 08:48:02 +0000 (17:48 +0900)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
hwmon: (max6642): Better chip detection schema
hwmon: (coretemp) Further relax temperature range checks
hwmon: (coretemp) Fix TjMax detection for older CPUs
hwmon: (coretemp) Relax target temperature range check
hwmon: (max6642) Rename temp_fault sysfs attribute to temp2_fault
Currently, both the WM8903 and TPS6586x chips attempt to register with
gpiolib using the same GPIO numbers. This causes the audio driver to
fail to initialize.
To solve this, add a define to board-harmony.h for the TPS6586x, and make
board-harmony-power.c use this define, instead of directly referencing
TEGRA_NR_GPIOS.
Linus Torvalds [Sat, 4 Jun 2011 21:17:23 +0000 (06:17 +0900)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (25 commits)
btrfs: fix uninitialized variable warning
btrfs: add helper for fs_info->closing
Btrfs: add mount -o inode_cache
btrfs: scrub: add explicit plugging
btrfs: use btrfs_ino to access inode number
Btrfs: don't save the inode cache if we are deleting this root
btrfs: false BUG_ON when degraded
Btrfs: don't save the inode cache in non-FS roots
Btrfs: make sure we don't overflow the free space cache crc page
Btrfs: fix uninit variable in the delayed inode code
btrfs: scrub: don't reuse bios and pages
Btrfs: leave spinning on lookup and map the leaf
Btrfs: check for duplicate entries in the free space cache
Btrfs: don't try to allocate from a block group that doesn't have enough space
Btrfs: don't always do readahead
Btrfs: try not to sleep as much when doing slow caching
Btrfs: kill BTRFS_I(inode)->block_group
Btrfs: don't look at the extent buffer level 3 times in a row
Btrfs: map the node block when looking for readahead targets
Btrfs: set range_start to the right start in count_range_bits
...
Per Dalén [Thu, 26 May 2011 13:08:53 +0000 (09:08 -0400)]
hwmon: (max6642): Better chip detection schema
Improve detection of MAX6642 by reading non existing registers (0x04, 0x06
and 0xff). Reading those registers returns the previously read value.
Signed-off-by: Per Dalen <per.dalen@appeartv.com>
[guenter.roeck@ericsson.com: added second set of register reads] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
tg3: Fix tg3_skb_error_unmap()
net: tracepoint of net_dev_xmit sees freed skb and causes panic
drivers/net/can/flexcan.c: add missing clk_put
net: dm9000: Get the chip in a known good state before enabling interrupts
drivers/net/davinci_emac.c: add missing clk_put
af-packet: Add flag to distinguish VID 0 from no-vlan.
caif: Fix race when conditionally taking rtnl lock
usbnet/cdc_ncm: add missing .reset_resume hook
vlan: fix typo in vlan_dev_hard_start_xmit()
net/ipv4: Check for mistakenly passed in non-IPv4 address
iwl4965: correctly validate temperature value
bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
ath9k: fix two more bugs in tx power
cfg80211: don't drop p2p probe responses
Revert "net: fix section mismatches"
drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
sctp: stop pending timers and purge queues when peer restart asoc
drivers/net: ks8842 Fix crash on received packet when in PIO mode.
ip_options_compile: properly handle unaligned pointer
iwlagn: fix incorrect PCI subsystem id for 6150 devices
...
David Sterba [Fri, 3 Jun 2011 14:29:08 +0000 (16:29 +0200)]
btrfs: fix uninitialized variable warning
With Linus' tree, today's linux-next build (powercp ppc64_defconfig)
produced this warning:
fs/btrfs/delayed-inode.c: In function 'btrfs_delayed_update_inode':
fs/btrfs/delayed-inode.c:1598:6: warning: 'ret' may be used
uninitialized in this function
Introduced by commit 16cdcec736cd ("btrfs: implement delayed inode items
operation").
This fixes a bug in btrfs_update_inode(): if the returned value from
btrfs_delayed_update_inode is a nonzero garbage, inode stat data are not
updated and several call paths may hit a BUG_ON or fail with strange
code.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David Sterba <dsterba@suse.cz>
David Sterba [Tue, 31 May 2011 17:08:14 +0000 (17:08 +0000)]
btrfs: use btrfs_ino to access inode number
commit 4cb5300bc ("Btrfs: add mount -o auto_defrag") accesses inode
number directly while it should use the helper with the new inode
number allocator.
Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Josef Bacik [Tue, 31 May 2011 19:33:33 +0000 (19:33 +0000)]
Btrfs: don't save the inode cache if we are deleting this root
With xfstest 254 I can panic the box every time with the inode number caching
stuff on. This is because we clean the inodes out when we delete the subvolume,
but then we write out the inode cache which adds an inode to the subvolume inode
tree, and then when it gets evicted again the root gets added back on the dead
roots list and is deleted again, so we have a double free. To stop this from
happening just return 0 if refs is 0 (and we're not the tree root since tree
root always has refs of 0). With this fix 254 no longer panics. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com> Tested-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Arne Jansen [Mon, 30 May 2011 08:36:16 +0000 (08:36 +0000)]
btrfs: false BUG_ON when degraded
In degraded mode the struct btrfs_device of missing devs don't have
device->name set. A kstrdup of NULL correctly returns NULL. Don't
BUG in this case.
Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
liubo [Wed, 1 Jun 2011 09:42:49 +0000 (09:42 +0000)]
Btrfs: don't save the inode cache in non-FS roots
This adds extra checks to make sure the inode map we are caching really
belongs to a FS root instead of a special relocation tree. It
prevents crashes during balancing operations.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>