]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
15 years agoath9k: Update copyright in all the files
Sujith [Fri, 13 Mar 2009 03:37:23 +0000 (09:07 +0530)]
ath9k: Update copyright in all the files

How time flies.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in handling single stream stations
Sujith [Fri, 13 Mar 2009 03:26:11 +0000 (08:56 +0530)]
ath9k: Fix bug in handling single stream stations

AP mode currently sets up the dual stream capability
for all stations. This patch fixes it by checking if the
associated station supports dual stream MCS rates (8-15).
We would disregard any MCS rates above 15, since Atheros
HW supports only 0..15 rates currently, and can't receive
at rates > 15 anyway.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fill in ack signal in TX status
Sujith [Fri, 13 Mar 2009 03:26:09 +0000 (08:56 +0530)]
ath9k: Fill in ack signal in TX status

This patch fills the ack_signal field in TX status with an appropriate
value from the TX descriptor.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in 4K EEPROM size calculation
Sujith [Fri, 13 Mar 2009 03:26:07 +0000 (08:56 +0530)]
ath9k: Fix bug in 4K EEPROM size calculation

We should be checking with the 4K header and not the non-4K
header size.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Change return type for set_board_values()
Sujith [Fri, 13 Mar 2009 03:26:05 +0000 (08:56 +0530)]
ath9k: Change return type for set_board_values()

We always return true, checking for 'false' return value
is bogus anyway, so fix this.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Introduce a helper function for setting board gain values
Sujith [Fri, 13 Mar 2009 03:26:04 +0000 (08:56 +0530)]
ath9k: Introduce a helper function for setting board gain values

This improves readability. Handle both 4K/non-4K EEPROM
in this patch.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Move AR5416_VER_MASK to a common location
Sujith [Fri, 13 Mar 2009 03:26:02 +0000 (08:56 +0530)]
ath9k: Move AR5416_VER_MASK to a common location

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Miscellaneous EEPROM handling cleanup
Sujith [Fri, 13 Mar 2009 03:25:55 +0000 (08:55 +0530)]
ath9k: Miscellaneous EEPROM handling cleanup

Print the EEPROM version/revision on init.
Choose appropriate debug masks on error conditions,
and remove useless print messages.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove dummy PCI "retry timeout" fix
Luis R. Rodriguez [Thu, 12 Mar 2009 22:18:51 +0000 (18:18 -0400)]
ath9k: remove dummy PCI "retry timeout" fix

Remove the PCI retry timeout code as that was just taken from ipw2100
due to historical reasons but in reality its a no-op, additionally its
simply incorrect as each PCI devices has its own custom PCI configuration
space on PCI config space >= 0x40. Not to mention we were trying to write
0 to a place that already has 0 on it.

Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ben Cahill <ben.m.cahill@intel.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Tested-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add support for multiple virtual AP interfaces
Jouni Malinen [Thu, 12 Mar 2009 19:53:23 +0000 (21:53 +0200)]
ath9k: Add support for multiple virtual AP interfaces

This patch fixes the TSF offset calculation for staggered Beacon frames
and sets ATH_BCBUF back to the earlier value 4 to enable multi-BSS
configurations of up to four BSSes.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: start pending scan after probe/auth/assoc timed out
Helmut Schaa [Thu, 12 Mar 2009 13:04:34 +0000 (14:04 +0100)]
mac80211: start pending scan after probe/auth/assoc timed out

If a scan is queued in STA mode while the interface is in state direct
probe, authenticate or associate the scan is delayed until the interface
enters disabled or associated state. But in case of direct probe-,
authentication- or association- timeout sta_work will not be scheduled
anymore (without external trigger) and thus the pending scan is not
executed and prevents a new scan from being triggered (-EBUSY).

Fix this by queueing the sta work again after direct probe-, authentication-
and association- timeout.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: reduce max number of queues
Johannes Berg [Thu, 12 Mar 2009 10:16:48 +0000 (11:16 +0100)]
mac80211: reduce max number of queues

No hw/driver actually supports more than four queues right now,
and we allocate a number of things per queue which means we
waste a bit of memory. Reduce the maximum number to four to
accurately reflect what we do (and need for QoS). Even if we
had hardware supporting more queues we couldn't take advantage
of that right now anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove ieee80211_num_regular_queues
Johannes Berg [Thu, 12 Mar 2009 22:49:28 +0000 (23:49 +0100)]
mac80211: remove ieee80211_num_regular_queues

This inline is useless and actually makes the code _longer_
rather than shorter.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Set IEEE80211_TX_CTL_RATE_CTRL_PROBE in rate control for probe rate
Vasanthakumar Thiagarajan [Thu, 12 Mar 2009 10:02:54 +0000 (15:32 +0530)]
ath9k: Set IEEE80211_TX_CTL_RATE_CTRL_PROBE in rate control for probe rate

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211/nl80211: remove usage of CONFIG_NL80211
Reinette Chatre [Thu, 12 Mar 2009 16:20:40 +0000 (09:20 -0700)]
cfg80211/nl80211: remove usage of CONFIG_NL80211

The scan capability added to cfg80211/nl80211 introduced a
dependency on nl80211 by cfg80211. We can thus no longer have
just cfg80211 without nl80211. Specifically, cfg80211_scan_done()
calls nl80211_send_scan_aborted() or nl80211_send_scan_done().

Now we remove the option for user to select nl80211. It will always
be compiled if user selects cfg80211.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: ieee80211_ibss_commit() cleanup
Alina Friedrichsen [Mon, 9 Mar 2009 23:49:46 +0000 (00:49 +0100)]
mac80211: ieee80211_ibss_commit() cleanup

Don't call ieee80211_sta_find_ibss() directly, like it's done in STA
mode, so that the commit() call is more harmless respectively has
less site-effects.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoi915: fix wrong 'size_t' format string
Linus Torvalds [Sat, 28 Mar 2009 00:02:09 +0000 (17:02 -0700)]
i915: fix wrong 'size_t' format string

For the fifteen bazillionth time.

See also commits f06da264cfb0f9444d41ca247213e419f90aa72a and
aeb565dfc3ac4c8b47c5049085b4c7bfb2c7d5d7 ("i915: Fix more size_t format
string warnings" and "Fix annoying DRM_ERROR() string warning").

Grr-target: Eric Anholt <eric@anholt.net>
Grr-target: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
Linus Torvalds [Fri, 27 Mar 2009 23:50:49 +0000 (16:50 -0700)]
Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (25 commits)
  drm/i915: Fix LVDS dither setting
  drm/i915: Check for dev->primary->master before dereference.
  drm/i915: TV detection fix
  drm/i915: TV mode_set sync up with 2D driver
  drm/i915: Fix TV get_modes to return modes count
  drm/i915: Sync crt hotplug detection with intel video driver
  drm/i915: Sync mode_valid/mode_set with intel video driver
  drm/i915: TV modes' parameters sync up with 2D driver
  agp/intel: Add support for new intel chipset.
  i915/drm: Remove two redundant agp_chipset_flushes
  drm/i915: Display fence register state in debugfs i915_gem_fence_regs node.
  drm/i915: Add information on pinning and fencing to the i915 list debug.
  drm/i915: Consolidate gem object list dumping
  drm/i915: Convert i915 proc files to seq_file and move to debugfs.
  drm: Convert proc files to seq_file and introduce debugfs
  drm/i915: Fix lock order reversal in GEM relocation entry copying.
  drm/i915: Fix lock order reversal with cliprects and cmdbuf in non-DRI2 paths.
  drm/i915: Fix lock order reversal in shmem pread path.
  drm/i915: Fix lock order reversal in shmem pwrite path.
  drm/i915: Make GEM object's page lists refcounted instead of get/free.
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Fri, 27 Mar 2009 23:23:12 +0000 (16:23 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
  fs: avoid I_NEW inodes
  Merge code for single and multiple-instance mounts
  Remove get_init_pts_sb()
  Move common mknod_ptmx() calls into caller
  Parse mount options just once and copy them to super block
  Unroll essentials of do_remount_sb() into devpts
  vfs: simple_set_mnt() should return void
  fs: move bdev code out of buffer.c
  constify dentry_operations: rest
  constify dentry_operations: configfs
  constify dentry_operations: sysfs
  constify dentry_operations: JFS
  constify dentry_operations: OCFS2
  constify dentry_operations: GFS2
  constify dentry_operations: FAT
  constify dentry_operations: FUSE
  constify dentry_operations: procfs
  constify dentry_operations: ecryptfs
  constify dentry_operations: CIFS
  constify dentry_operations: AFS
  ...

15 years agoucc_geth: Fix three oopses in PHY {de,}initialization code
Anton Vorontsov [Fri, 27 Mar 2009 23:00:03 +0000 (16:00 -0700)]
ucc_geth: Fix three oopses in PHY {de,}initialization code

When there are no free snums, UCC ethernet should gracefully fail, but
currently it oopses this way:

  # ifconfig eth0 up
  fill_init_enet_entries: Can not get SNUM.
  ucc_geth_startup: Can not fill p_init_enet_param_shadow.
  eth0: Cannot configure net device, aborting.
  Unable to handle kernel paging request for data at address 0x00000190
  Faulting instruction address: 0xc0294c88
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c0294c88] mutex_lock+0x0/0x1c
  LR [c01b6be8] phy_stop+0x20/0x70
  Call Trace:
  [efb25da0] [efb2eb60] 0xefb2eb60 (unreliable)
  [efb25db0] [c01b2058] ucc_geth_stop+0x2c/0x8c
  [efb25dd0] [c01b4194] ucc_geth_open+0x48/0x27c
  [efb25df0] [c020eec0] dev_open+0xc0/0x118
  [...]

This is because the ucc_geth_stop() routine assumes that ugeth->phydev
is always initialized by the ucc_geth_open(), while it is not in case
of errors.

If we add a check to the ucc_geth_stop(), then another oops pops up:

  Unable to handle kernel paging request for data at address 0x00000004
  Faulting instruction address: 0xc01b46a4
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c01b46a4] adjust_link+0x20/0x1b4
  LR [c01b770c] phy_state_machine+0xdc/0x44c
  Call Trace:
  [ef83bf10] [c021b388] linkwatch_schedule_work+0x74/0xf8 (unreliable)
  [ef83bf40] [c01b770c] phy_state_machine+0xdc/0x44c
  [ef83bf60] [c004c13c] run_workqueue+0xb8/0x148
  [ef83bf90] [c004c870] worker_thread+0x70/0xd0
  [ef83bfd0] [c00505fc] kthread+0x48/0x84
  [ef83bff0] [c000f464] kernel_thread+0x4c/0x68
  [...]

That one happens because ucc_geth_stop() does not call phy_disconnect()
and so phylib state machine is running without any idea that a MAC has
just died.

Also, when device tree specifies fixed-link, and CONFIG_FIXED_PHY
is disabled, we'll get this oops:

  0:01 not found
  eth2: Could not attach to PHY
  eth2: Cannot initialize PHY, aborting.
  Unable to handle kernel paging request for data at address 0x00000190
  Faulting instruction address: 0xc02967d0
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c02967d0] mutex_lock+0x0/0x1c
  LR [c01b6bcc] phy_stop+0x20/0x70
  Call Trace:
  [ef82be50] [efb6bb60] 0xefb6bb60 (unreliable)
  [ef82be60] [c01b2058] ucc_geth_stop+0x2c/0x8c
  [ef82be80] [c01b4194] ucc_geth_open+0x48/0x27c
  [ef82bea0] [c0210a04] dev_open+0xc0/0x118
  [ef82bec0] [c020f85c] dev_change_flags+0x84/0x1ac
  [ef82bee0] [c037b768] ic_open_devs+0x168/0x2bc
  [ef82bf20] [c037ca98] ip_auto_config+0x90/0x28c
  [ef82bf60] [c0001b9c] do_one_initcall+0x34/0x1a0
  [ef82bfd0] [c035e240] do_initcalls+0x38/0x58
  [ef82bfe0] [c035e2c4] kernel_init+0x30/0x90
  [ef82bff0] [c000f464] kernel_thread+0x4c/0x68
  [...]

And again, ucc_geth_stop() assumes that ugeth->phydev is there, while
it isn't.

This patch fixes all three oopses simply by rearranging some code:

- In ucc_geth_open(): move init_phy() call to the beginning, so
  that we only call ucc_geth_stop() with a PHY attached;
- Move phy_disconnect() call from ucc_geth_close() to
  ucc_geth_stop(), so that we'll always disconnect the PHY.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add missing include into include/linux/netdevice.h
Dmitri Vorobiev [Fri, 27 Mar 2009 22:55:36 +0000 (15:55 -0700)]
net: Add missing include into include/linux/netdevice.h

The inline function skb_gro_mac_header defined in include/linux/netdevice.h
makes use of page_address(). Depending on configuration options, the latter
is either defined as a macro or is declared as a function in another header
file, namely include/linux/mm.h. However, include/linux/netdevice.h does not
include include/linux/mm.h.

On MIPS, this has produced the following build error:

  CC      kernel/sysctl_check.o
In file included from include/linux/icmpv6.h:173,
                 from include/linux/ipv6.h:208,
                 from include/net/ip_vs.h:26,
                 from kernel/sysctl_check.c:6:
include/linux/netdevice.h: In function 'skb_gro_mac_header':
include/linux/netdevice.h:1132: error: implicit declaration of function
'page_address'
include/linux/netdevice.h:1133: warning: pointer/integer type mismatch
in conditional expression
make[1]: *** [kernel/sysctl_check.o] Error 1
make: *** [kernel] Error 2

The patch adds the missing include and fixes the build error.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: only check headroom when FCB is needed
Li Yang [Fri, 27 Mar 2009 22:54:30 +0000 (15:54 -0700)]
gianfar: only check headroom when FCB is needed

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Fri, 27 Mar 2009 22:37:57 +0000 (15:37 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

15 years agodrm/i915: Fix LVDS dither setting
Li Peng [Fri, 13 Mar 2009 02:25:07 +0000 (10:25 +0800)]
drm/i915: Fix LVDS dither setting

Update bdb_lvds_options structure according to its defination in
2D driver. Then we can parse and set 'lvds_dither' bit correctly
on non-965 chips.

Signed-off-by: Li Peng <peng.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Check for dev->primary->master before dereference.
Chris Wilson [Fri, 6 Mar 2009 23:27:52 +0000 (23:27 +0000)]
drm/i915: Check for dev->primary->master before dereference.

I've hit the occasional oops inside i915_wait_ring() with an indication of
a NULL derefence of dev->primary->master.  Adding a NULL check is
consistent with the other potential users of dev->primary->master.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: TV detection fix
Zhenyu Wang [Wed, 4 Mar 2009 11:36:03 +0000 (19:36 +0800)]
drm/i915: TV detection fix

Check that the encoder has a real enabled crtc for TV detect, and fix
missing TV type setting after detect.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: TV mode_set sync up with 2D driver
Zhenyu Wang [Wed, 4 Mar 2009 11:36:02 +0000 (19:36 +0800)]
drm/i915: TV mode_set sync up with 2D driver

Fix TV control save register for untouched bits, and color
knobs different definition for 945 and 965 chips.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Fix TV get_modes to return modes count
Zhenyu Wang [Wed, 4 Mar 2009 11:36:01 +0000 (19:36 +0800)]
drm/i915: Fix TV get_modes to return modes count

The get_modes hook must return the number of modes added.  This also fixes
TV mode's clock calculation int overflow issue, and use 0.01 precision for
mode refresh validation.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Sync crt hotplug detection with intel video driver
Zhao Yakui [Tue, 3 Mar 2009 10:07:52 +0000 (18:07 +0800)]
drm/i915: Sync crt hotplug detection with intel video driver

This covers:
Use long crt hotplug activation time on GM45.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Sync mode_valid/mode_set with intel video driver
Zhao Yakui [Tue, 3 Mar 2009 10:06:42 +0000 (18:06 +0800)]
drm/i915: Sync mode_valid/mode_set with intel video driver

This covers:
Limit CRT DAC speed better.

and also clears the border color in case it's set to some garbage, which would
fix ugly outlines in the blank regions of the CRT.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
[anholt: replaced *drm_dev with *dev]
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: TV modes' parameters sync up with 2D driver
Zhenyu Wang [Wed, 4 Mar 2009 12:23:02 +0000 (20:23 +0800)]
drm/i915: TV modes' parameters sync up with 2D driver

This covers at least:
TV: subcarrier fix for NTSC and PAL
TV: fix timing parameters for PAL, 480p, 1080i

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoagp/intel: Add support for new intel chipset.
Shaohua Li [Mon, 23 Feb 2009 07:19:16 +0000 (15:19 +0800)]
agp/intel: Add support for new intel chipset.

This is a G33-like desktop and mobile chipset.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoi915/drm: Remove two redundant agp_chipset_flushes
Owain G. Ainsworth [Fri, 20 Feb 2009 08:30:19 +0000 (08:30 +0000)]
i915/drm: Remove two redundant agp_chipset_flushes

agp_chipset_flush() is for flushing the intel GMCH write cache via the
IFP, these two uses are for when we're getting the object into the cpu
READ domain, and thus should not be needed. This confused me when I was
getting my head around the code.

With thanks to airlied for helping me check my mental picture of how the
flushes and clflushes are supposed to be used.

Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Display fence register state in debugfs i915_gem_fence_regs node.
Chris Wilson [Wed, 11 Feb 2009 14:26:38 +0000 (14:26 +0000)]
drm/i915: Display fence register state in debugfs i915_gem_fence_regs node.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Add information on pinning and fencing to the i915 list debug.
Eric Anholt [Wed, 18 Feb 2009 07:53:41 +0000 (23:53 -0800)]
drm/i915: Add information on pinning and fencing to the i915 list debug.

This was inspired by a patch by Chris Wilson, though none of it applied in any
way due to the debugfs work and I decided to change the formatting of the
new information anyway.

Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Consolidate gem object list dumping
Ben Gamari [Wed, 18 Feb 2009 01:08:51 +0000 (20:08 -0500)]
drm/i915: Consolidate gem object list dumping

Here we eliminate a few functions in favor of using a single function
to dump from all of the object lists.

Signed-Off-By: Ben Gamari <bgamari@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Convert i915 proc files to seq_file and move to debugfs.
Ben Gamari [Wed, 18 Feb 2009 01:08:50 +0000 (20:08 -0500)]
drm/i915: Convert i915 proc files to seq_file and move to debugfs.

Signed-off-by: Ben Gamari <bgamari@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm: Convert proc files to seq_file and introduce debugfs
Ben Gamari [Wed, 18 Feb 2009 01:08:49 +0000 (20:08 -0500)]
drm: Convert proc files to seq_file and introduce debugfs

The old mechanism to formatting proc files is extremely ugly. The
seq_file API was designed specifically for cases like this and greatly
simplifies the process.

Also, most of the files in /proc really don't belong there. This patch
introduces the infrastructure for putting these into debugfs and exposes
all of the proc files in debugfs as well.

Signed-off-by: Ben Gamari <bgamari@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Fri, 27 Mar 2009 21:48:34 +0000 (14:48 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6: (27 commits)
  ext2: Zero our b_size in ext2_quota_read()
  trivial: fix typos/grammar errors in fs/Kconfig
  quota: Coding style fixes
  quota: Remove superfluous inlines
  quota: Remove uppercase aliases for quota functions.
  nfsd: Use lowercase names of quota functions
  jfs: Use lowercase names of quota functions
  udf: Use lowercase names of quota functions
  ufs: Use lowercase names of quota functions
  reiserfs: Use lowercase names of quota functions
  ext4: Use lowercase names of quota functions
  ext3: Use lowercase names of quota functions
  ext2: Use lowercase names of quota functions
  ramfs: Remove quota call
  vfs: Use lowercase names of quota functions
  quota: Remove dqbuf_t and other cleanups
  quota: Remove NODQUOT macro
  quota: Make global quota locks cacheline aligned
  quota: Move quota files into separate directory
  ext4: quota reservation for delayed allocation
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Fri, 27 Mar 2009 21:48:07 +0000 (14:48 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: fix length calculation in compat code
  dlm: ignore cancel on granted lock
  dlm: clear defunct cancel state
  dlm: replace idr with hash table for connections
  dlm: comment typo fixes
  dlm: use ipv6_addr_copy
  dlm: Change rwlock which is only used in write mode to a spinlock

15 years agodrm/i915: Fix lock order reversal in GEM relocation entry copying.
Eric Anholt [Thu, 12 Mar 2009 18:23:52 +0000 (11:23 -0700)]
drm/i915: Fix lock order reversal in GEM relocation entry copying.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
15 years agodrm/i915: Fix lock order reversal with cliprects and cmdbuf in non-DRI2 paths.
Eric Anholt [Wed, 11 Mar 2009 19:30:04 +0000 (12:30 -0700)]
drm/i915: Fix lock order reversal with cliprects and cmdbuf in non-DRI2 paths.

This introduces allocation in the batch submission path that wasn't there
previously, but these are compatibility paths so we care about simplicity
more than performance.

kernel.org bug #12419.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agodrm/i915: Fix lock order reversal in shmem pread path.
Eric Anholt [Tue, 10 Mar 2009 18:44:52 +0000 (11:44 -0700)]
drm/i915: Fix lock order reversal in shmem pread path.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agodrm/i915: Fix lock order reversal in shmem pwrite path.
Eric Anholt [Mon, 9 Mar 2009 20:42:30 +0000 (13:42 -0700)]
drm/i915: Fix lock order reversal in shmem pwrite path.

Like the GTT pwrite path fix, this uses an optimistic path and a
fallback to get_user_pages.  Note that this means we have to stop using
vfs_write and roll it ourselves.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agodrm/i915: Make GEM object's page lists refcounted instead of get/free.
Eric Anholt [Thu, 19 Mar 2009 21:10:50 +0000 (14:10 -0700)]
drm/i915: Make GEM object's page lists refcounted instead of get/free.

We've wanted this for a few consumers that touch the pages directly (such as
the following commit), which have been doing the refcounting outside of
get/put pages.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agodrm/i915: Fix lock order reversal in GTT pwrite path.
Eric Anholt [Mon, 9 Mar 2009 16:42:23 +0000 (09:42 -0700)]
drm/i915: Fix lock order reversal in GTT pwrite path.

Since the pagefault path determines that the lock order we use has to be
mmap_sem -> struct_mutex, we can't allow page faults to occur while the
struct_mutex is held.  To fix this in pwrite, we first try optimistically to
see if we can copy from user without faulting.  If it fails, fall back to
using get_user_pages to pin the user's memory, and map those pages
atomically when copying it to the GPU.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agodrm/i915: Read the right SDVO register when detecting SVDO/HDMI.
Kristian Høgsberg [Fri, 13 Mar 2009 19:42:14 +0000 (15:42 -0400)]
drm/i915: Read the right SDVO register when detecting SVDO/HDMI.

This fixes incorrect detection of the second SDVO/HDMI output on G4X, and
extra boot time on pre-G4X.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Use a different PLL timing search function on G4X.
Ma Ling [Wed, 18 Mar 2009 12:13:27 +0000 (20:13 +0800)]
drm/i915: Use a different PLL timing search function on G4X.

This improves the PLL timings according to the suggestion of the hardware
engineers.  This results in some outputs being able to sync that weren't
able to before.

This is part of fixing fd.o bug #17508.

Signed-off-by: Ma Ling <ling.ma@intel.com>
[anholt: cleaned up a couple of redundant comments]
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Use documented PLL timing limits for G4X platform
Ma Ling [Wed, 18 Mar 2009 12:13:23 +0000 (20:13 +0800)]
drm/i915: Use documented PLL timing limits for G4X platform

The values come from the internal reference spreadsheet on PLL
timing limits for the G4X chipsets.

Part of fixing fd.o bug #17508

Signed-off-by: Ma Ling <ling.ma@intel.com>
[anholt: Cleaned up some whitespace]
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Change DCC tiling detection case to cover only mobile parts.
Eric Anholt [Thu, 12 Mar 2009 23:27:11 +0000 (16:27 -0700)]
drm/i915: Change DCC tiling detection case to cover only mobile parts.

Later spec investigation has revealed that every 9xx mobile part has
had this register in this format.  Also, no non-mobile parts have been shown
to have this register.  So make all mobile use the same code, and all
non-mobile use the hack 965 detection.

Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoDVB: firedtv: FireDTV S2 problems with tuning solved
Beat Michel Liechti [Thu, 26 Mar 2009 21:36:52 +0000 (22:36 +0100)]
DVB: firedtv: FireDTV S2 problems with tuning solved

Signed-off-by: Beat Michel Liechti <bml303@gmail.com>
Tuning was broken on FireDTV S2 (and presumably  FloppyDTV S2) because a
wrong opcode was sent.  The box only gave "not implemented" responses.
Changing the opcode to _TUNE_QPSK2 fixes this for good.

Cc: stable@kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
15 years agofs: avoid I_NEW inodes
Nick Piggin [Wed, 11 Mar 2009 20:17:36 +0000 (13:17 -0700)]
fs: avoid I_NEW inodes

To be on the safe side, it should be less fragile to exclude I_NEW inodes
from inode list scans by default (unless there is an important reason to
have them).

Normally they will get excluded (eg.  by zero refcount or writecount etc),
however it is a bit fragile for list walkers to know exactly what parts of
the inode state is set up and valid to test when in I_NEW.  So along these
lines, move I_NEW checks upward as well (sometimes taking I_FREEING etc
checks with them too -- this shouldn't be a problem should it?)

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMerge code for single and multiple-instance mounts
Sukadev Bhattiprolu [Sat, 7 Mar 2009 18:12:32 +0000 (10:12 -0800)]
Merge code for single and multiple-instance mounts

new_pts_mount() (including the get_sb_nodev()), shares a lot of code
with init_pts_mount(). The only difference between them is the 'test-super'
function passed into sget().

Move all common code into devpts_get_sb() and remove the new_pts_mount() and
init_pts_mount() functions,

Changelog[v3]:
[Serge Hallyn]: Remove unnecessary printk()s
Changelog[v2]:
(Christoph Hellwig): Merge code in 'do_pts_mount()' into devpts_get_sb()

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Tested-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoRemove get_init_pts_sb()
Sukadev Bhattiprolu [Sat, 7 Mar 2009 18:12:06 +0000 (10:12 -0800)]
Remove get_init_pts_sb()

With mknod_ptmx() moved to devpts_get_sb(), init_pts_mount() becomes
a wrapper around get_init_pts_sb(). Remove get_init_pts_sb() and
fold code into init_pts_mount().

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMove common mknod_ptmx() calls into caller
Sukadev Bhattiprolu [Sat, 7 Mar 2009 18:11:41 +0000 (10:11 -0800)]
Move common mknod_ptmx() calls into caller

We create 'ptmx' node in both single-instance and multiple-instance
mounts. So devpts_get_sb() can call mknod_ptmx() once rather than
have both modes calling mknod_ptmx() separately.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoParse mount options just once and copy them to super block
Sukadev Bhattiprolu [Sat, 7 Mar 2009 18:14:41 +0000 (10:14 -0800)]
Parse mount options just once and copy them to super block

Since all the mount option parsing is done in devpts, we could do it
just once and pass it around in devpts functions and eventually store
it in the super block.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoUnroll essentials of do_remount_sb() into devpts
Sukadev Bhattiprolu [Sat, 7 Mar 2009 18:16:20 +0000 (10:16 -0800)]
Unroll essentials of do_remount_sb() into devpts

On remount, devpts fs only needs to parse the mount options. Users cannot
directly create/dirty files in /dev/pts so the MS_RDONLY flag and
shrinking the dcache does not really apply to devpts.

So effectively on remount, devpts only parses the mount options and updates
these options in its super block. As such, we could replace do_remount_sb()
call with a direct parse_mount_options().

Doing so enables subsequent patches to avoid parsing the mount options twice
and simplify the code.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agovfs: simple_set_mnt() should return void
Sukadev Bhattiprolu [Wed, 4 Mar 2009 20:06:34 +0000 (12:06 -0800)]
vfs: simple_set_mnt() should return void

simple_set_mnt() is defined as returning 'int' but always returns 0.
Callers assume simple_set_mnt() never fails and don't properly cleanup if
it were to _ever_ fail.  For instance, get_sb_single() and get_sb_nodev()
should:

        up_write(sb->s_unmount);
        deactivate_super(sb);

if simple_set_mnt() fails.

Since simple_set_mnt() never fails, would be cleaner if it did not
return anything.

[akpm@linux-foundation.org: fix build]
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agofs: move bdev code out of buffer.c
Nick Piggin [Wed, 25 Feb 2009 09:44:19 +0000 (10:44 +0100)]
fs: move bdev code out of buffer.c

Move some block device related code out from buffer.c and put it in
block_dev.c. I'm trying to move non-buffer_head code out of buffer.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: rest
Al Viro [Fri, 20 Feb 2009 06:02:22 +0000 (06:02 +0000)]
constify dentry_operations: rest

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: configfs
Al Viro [Fri, 20 Feb 2009 06:02:01 +0000 (06:02 +0000)]
constify dentry_operations: configfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: sysfs
Al Viro [Fri, 20 Feb 2009 06:01:46 +0000 (06:01 +0000)]
constify dentry_operations: sysfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: JFS
Al Viro [Fri, 20 Feb 2009 06:00:49 +0000 (06:00 +0000)]
constify dentry_operations: JFS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: OCFS2
Al Viro [Fri, 20 Feb 2009 06:00:26 +0000 (06:00 +0000)]
constify dentry_operations: OCFS2

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: GFS2
Al Viro [Fri, 20 Feb 2009 06:00:05 +0000 (06:00 +0000)]
constify dentry_operations: GFS2

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: FAT
Al Viro [Fri, 20 Feb 2009 05:59:46 +0000 (05:59 +0000)]
constify dentry_operations: FAT

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: FUSE
Al Viro [Fri, 20 Feb 2009 05:59:13 +0000 (05:59 +0000)]
constify dentry_operations: FUSE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: procfs
Al Viro [Fri, 20 Feb 2009 05:58:47 +0000 (05:58 +0000)]
constify dentry_operations: procfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: ecryptfs
Al Viro [Fri, 20 Feb 2009 05:57:52 +0000 (05:57 +0000)]
constify dentry_operations: ecryptfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: CIFS
Al Viro [Fri, 20 Feb 2009 05:57:07 +0000 (05:57 +0000)]
constify dentry_operations: CIFS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: AFS
Al Viro [Fri, 20 Feb 2009 05:56:47 +0000 (05:56 +0000)]
constify dentry_operations: AFS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: autofs, autofs4
Al Viro [Fri, 20 Feb 2009 05:56:19 +0000 (05:56 +0000)]
constify dentry_operations: autofs, autofs4

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: 9p
Al Viro [Fri, 20 Feb 2009 05:55:46 +0000 (05:55 +0000)]
constify dentry_operations: 9p

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: misc filesystems
Al Viro [Fri, 20 Feb 2009 05:55:13 +0000 (05:55 +0000)]
constify dentry_operations: misc filesystems

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoconstify dentry_operations: NFS
Al Viro [Fri, 20 Feb 2009 05:51:22 +0000 (05:51 +0000)]
constify dentry_operations: NFS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agofs: make struct dentry->d_op const
Jan Engelhardt [Wed, 11 Feb 2009 21:14:54 +0000 (13:14 -0800)]
fs: make struct dentry->d_op const

This change will allow for tagging many dentry_operations const in the
source tree.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agodevpts: Must release s_umount on error
Sukadev Bhattiprolu [Thu, 29 Jan 2009 00:57:12 +0000 (16:57 -0800)]
devpts: Must release s_umount on error

We should drop the ->s_umount mutex if an error occurs after the
sget()/grab_super() call. This was introduced when adding support
for multiple instances of devpts and noticed during a code review/reorg.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agovfs: Further changes from macro to inline function in fs.h
Steven Whitehouse [Tue, 20 Jan 2009 10:29:46 +0000 (10:29 +0000)]
vfs: Further changes from macro to inline function in fs.h

There is a second set of macros for when CONFIG_FILE_LOCKING is
not set. This patch updates those to become inline functions
as well.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agovfs: Update fs.h to use inline functions when no file locking set
Steven Whitehouse [Tue, 20 Jan 2009 10:29:45 +0000 (10:29 +0000)]
vfs: Update fs.h to use inline functions when no file locking set

This avoids various issues which might give rise to compiler warnings
about missing functions and/or unused variable with the previous
macros. This also fixes a bug where one of the macros was returning
0, but it should have been void.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agodo_pipe cleanup: drop its last user in arch/alpha/
Cheng Renquan [Wed, 14 Jan 2009 09:01:33 +0000 (17:01 +0800)]
do_pipe cleanup: drop its last user in arch/alpha/

The last user of do_pipe is in arch/alpha/, after replacing it with
do_pipe_flags, the do_pipe can be totally dropped.

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoufs: copy symlink data into the correct union member
Duane Griffin [Thu, 8 Jan 2009 22:43:51 +0000 (22:43 +0000)]
ufs: copy symlink data into the correct union member

Copy symlink data into the union member it is accessed through. Although
this shouldn't make a difference to behaviour it makes the code easier
to follow and grep through. It may also prevent problems if the
struct/union definitions change in the future.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoufs: ensure fast symlinks are NUL-terminated
Duane Griffin [Thu, 8 Jan 2009 22:43:50 +0000 (22:43 +0000)]
ufs: ensure fast symlinks are NUL-terminated

Ensure fast symlink targets are NUL-terminated, even if corrupted
on-disk.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoufs: don't truncate longer ufs2 fast symlinks
Duane Griffin [Thu, 8 Jan 2009 22:43:49 +0000 (22:43 +0000)]
ufs: don't truncate longer ufs2 fast symlinks

ufs2 fast symlinks can be twice as long as ufs ones, however the code
was using the ufs size in various places. Fix that so ufs2 symlinks over
60 characters aren't truncated.

Note that we copy the entire area instead of using the maxsymlinklen field
from the superblock. This way we will be more robust against corruption (of
the superblock).

While we are at it, use memcpy instead of open-coding it with for loops.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoufs: validate maximum fast symlink size from superblock
Duane Griffin [Thu, 8 Jan 2009 22:43:48 +0000 (22:43 +0000)]
ufs: validate maximum fast symlink size from superblock

The maximum fast symlink size is set in the superblock of certain types
of UFS filesystem. Before using it we need to check that it isn't longer
than the available space we have in the inode.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agocleanup may_open
Christoph Hellwig [Mon, 5 Jan 2009 18:27:23 +0000 (19:27 +0100)]
cleanup may_open

Add a switch for the various i_mode fmt cases, and remove the comment
about writeability of devices nodes - that part is handled in
inode_permission and comment on (briefly) there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agocleanup d_add_ci
Christoph Hellwig [Mon, 5 Jan 2009 18:10:37 +0000 (19:10 +0100)]
cleanup d_add_ci

Make sure that comments describe what's going on and not how, and always
use __d_instantiate instead of two separate branches, one with
d_instantiate and one with __d_instantiate.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agogeneric compat_sys_ustat
Christoph Hellwig [Fri, 28 Nov 2008 09:09:09 +0000 (10:09 +0100)]
generic compat_sys_ustat

Due to a different size of ino_t ustat needs a compat handler, but
currently only x86 and mips provide one.  Add a generic compat_sys_ustat
and switch all architectures over to it.  Instead of doing various
user copy hacks compat_sys_ustat just reimplements sys_ustat as
it's trivial.  This was suggested by Arnd Bergmann.

Found by Eric Sandeen when running xfstests/017 on ppc64, which causes
stack smashing warnings on RHEL/Fedora due to the too large amount of
data writen by the syscall.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoaffs: fix missing unlocks in affs_remove_link
Christoph Hellwig [Fri, 9 May 2008 10:35:29 +0000 (12:35 +0200)]
affs: fix missing unlocks in affs_remove_link

In two error cases affs_remove_link doesn't call affs_unlock_dir to
release the i_hash_lock semaphore.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[IA64] Fix kstat_this_cpu build breakage
Jes Sorensen [Fri, 27 Mar 2009 15:55:41 +0000 (16:55 +0100)]
[IA64] Fix kstat_this_cpu build breakage

arch/ia64/kernel/irq_ia64.c: In function 'ia64_handle_irq':
arch/ia64/kernel/irq_ia64.c:498: error: 'struct kernel_stat' has no member named 'irqs'
arch/ia64/kernel/irq_ia64.c:500: error: 'struct kernel_stat' has no member named 'irqs'
arch/ia64/kernel/irq_ia64.c: In function 'ia64_process_pending_intr':
arch/ia64/kernel/irq_ia64.c:556: error: 'struct kernel_stat' has no member named 'irqs'
arch/ia64/kernel/irq_ia64.c:558: error: 'struct kernel_stat' has no member named 'irqs'

Fix build breakage due to recent kstat_this_cpu changes in:
   d7e51e66899f95dabc89b4d4c6674a6e50fa37fc
   sparseirq: make some func to be used with genirq

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years agoMerge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2
Ingo Molnar [Thu, 26 Mar 2009 20:39:17 +0000 (21:39 +0100)]
Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2

Conflicts:
arch/parisc/kernel/irq.c
arch/x86/include/asm/fixmap_64.h
arch/x86/include/asm/setup.h
kernel/irq/handle.c

Semantic merge:
        arch/x86/include/asm/fixmap.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agogianfar: Fix kfree(skb)
David S. Miller [Fri, 27 Mar 2009 08:10:58 +0000 (01:10 -0700)]
gianfar: Fix kfree(skb)

Noticed by Li Yang.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Fix MM refcount check in smp_flush_tlb_pending().
David S. Miller [Fri, 27 Mar 2009 08:09:17 +0000 (01:09 -0700)]
sparc64: Fix MM refcount check in smp_flush_tlb_pending().

As explained by Benjamin Herrenschmidt:

> CPU 0 is running the context, task->mm == task->active_mm == your
> context. The CPU is in userspace happily churning things.
>
> CPU 1 used to run it, not anymore, it's now running fancyfsd which
> is a kernel thread, but current->active_mm still points to that
> same context.
>
> Because there's only one "real" user, mm_users is 1 (but mm_count is
> elevated, it's just that the presence on CPU 1 as active_mm has no
> effect on mm_count().
>
> At this point, fancyfsd decides to invalidate a mapping currently mapped
> by that context, for example because a networked file has changed
> remotely or something like that, using unmap_mapping_ranges().
>
> So CPU 1 goes into the zapping code, which eventually ends up calling
> flush_tlb_pending(). Your test will succeed, as current->active_mm is
> indeed the target mm for the flush, and mm_users is indeed 1. So you
> will -not- send an IPI to the other CPU, and CPU 0 will continue happily
> accessing the pages that should have been unmapped.

To fix this problem, check ->mm instead of ->active_mm, and this
means:

> So if you test current->mm, you effectively account for mm_users == 1,
> so the only way the mm can be active on another processor is as a lazy
> mm for a kernel thread. So your test should work properly as long
> as you don't have a HW that will do speculative TLB reloads into the
> TLB on that other CPU (and even if you do, you flush-on-switch-in should
> get rid of any crap here).

And therefore we should be OK.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: map entire Rx page, feed map+offset to Rx ring.
Divy Le Ray [Thu, 26 Mar 2009 16:39:29 +0000 (16:39 +0000)]
cxgb3: map entire Rx page, feed map+offset to Rx ring.

DMA mapping can be expensive in the presence of iommus.
Reduce the Rx iommu activity by mapping an entire page, and provide the H/W
the mapped address + offset of the current page chunk.
Reserve bits at the end of the page to track mapping references, so the page
can be unmapped.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: differentiate portx and Tx channels
Divy Le Ray [Thu, 26 Mar 2009 16:39:24 +0000 (16:39 +0000)]
cxgb3: differentiate portx and Tx channels

Separate ports from H/W Tx channels.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: use resource_size_t for mmio declarations
Divy Le Ray [Thu, 26 Mar 2009 16:39:19 +0000 (16:39 +0000)]
cxgb3: use resource_size_t for mmio declarations

Use resource_size_t to declare mmio start and len variables.
Print PEX error register after EEH resumed.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: sge setup fixes
Divy Le Ray [Thu, 26 Mar 2009 16:39:14 +0000 (16:39 +0000)]
cxgb3: sge setup fixes

Enable timestamps, update delayed ack threshold for iSCSI/iWARP traffic
Remove the len flag in Tx requests. It might corrupt offload trace packets.
Update SGE context setup to avoid potential H/W misprogrammation.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: start qset timers when setup succeeded
Divy Le Ray [Thu, 26 Mar 2009 16:39:09 +0000 (16:39 +0000)]
cxgb3: start qset timers when setup succeeded

Start queue set reclaim timers after the queue sets have been
allocated successfully.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert eth16i to net_device_ops
Stephen Hemminger [Thu, 26 Mar 2009 15:11:44 +0000 (15:11 +0000)]
netdev: convert eth16i to net_device_ops

Also, get rid of unnecessary memset.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert cs89x0 to net_device_ops
Stephen Hemminger [Thu, 26 Mar 2009 15:11:43 +0000 (15:11 +0000)]
netdev: convert cs89x0 to net_device_ops

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert lp486e to net_device_ops
Stephen Hemminger [Thu, 26 Mar 2009 15:11:42 +0000 (15:11 +0000)]
netdev: convert lp486e to net_device_ops

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>