Commit Graph

79119 Commits

Author SHA1 Message Date
Dominik Brodowski
e6e4f397e5 pcmcia: protect s->device_count
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:18 +01:00
Dominik Brodowski
64d8d46f5f pcmcia: properly lock skt->irq, skt->irq_mask
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:17 +01:00
Dominik Brodowski
9e86749cff pcmcia: lock ops->set_socket
As a side effect,
	socket_state_t			socket;
	u_int				state;
	u_int				suspended_state;
are properly protected now.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:16 +01:00
Dominik Brodowski
8533ee31cd pcmcia: lock ops->set_io_map()
As a side effect,
	io_window_t			io[MAX_IO_WIN];
is explicitely protected now.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:15 +01:00
Dominik Brodowski
8680c4b3fa pcmcia: also lock fake and cache CIS by ops_mutex
Specifically,

	struct list_head		cis_cache;
	size_t				fake_cis_len;
	u8				*fake_cis;

are protected.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:14 +01:00
Dominik Brodowski
6b8e087b86 pcmcia: add locking to set_mem_map()
Protect the pccard_operations callback "set_mem_map" by a new
mutex ops_mutex. This mutex also protects the following values
in struct pcmcia_socket:

        pccard_mem_map          win[]
        pccard_mem_map          cis_mem
        void __iomem            *cis_virt

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:13 +01:00
Wolfram Sang
c6958fdb04 pcmcia/i82365: fix typos in comments
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:12 +01:00
Uwe Kleine-König
0d418dfae8 pcmcia/omap_cf: don't redefine SZ_2K
This fixes:

	drivers/pcmcia/omap_cf.c:74:1: warning: "SZ_2K" redefined

Since

	c1191b0 ([ARM] Kirkwood: create a mapping for the Security Accelerator SRAM)

SZ_2K is defined in arch/arm/include/asm/sizes.h.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:11 +01:00
Uwe Kleine-König
7432a5b6c7 pcmcia/at91_cf: don't redefine SZ_2K
This fixes:

	drivers/pcmcia/at91_cf.c:55:1: warning: "SZ_2K" redefined

Since

	c1191b0 ([ARM] Kirkwood: create a mapping for the Security Accelerator SRAM)

SZ_2K is defined in arch/arm/include/asm/sizes.h.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:48:10 +01:00
Uwe Kleine-König
4aa50bc9c2 pcmcia/bfin_cf: don't check platform_get_irq's return value against zero
platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use irq <= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David Vrabel <dvrabel@arcom.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:36 +01:00
Wolfram Sang
3516952909 pcmcia/yenta: add module parameter for O2 speedups
O2-bridges can do read prefetch and write burst. However, for some combinations
of older bridges and cards, this causes problems, so it is disabled for those
bridges. Now, as some users know their setup works with the speedups enabled, a
new parameter is introduced to the driver. Now, a user can specifically enable
or disable these features, while the default is what we have today: detect the
bridge and decide accordingly. Fixes Bugzilla entry 15014.

Simplify and unify the printouts, fix a whitespace issue while we are here.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: frodone@gmail.com
[linux@dominikbrodowski.net: whitespace fixes]
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:35 +01:00
Márton Németh
63c9a8b302 pcmcia: make Open Firmware device id constant
The match_table field of the struct of_device_id is constant in <linux/of_platform.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:34 +01:00
H Hartley Sweeten
c6be9c5ab4 cm4000_cs.c: Remove unnecessary cast
The struct file 'private_data' member is a void *, the cast is not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:33 +01:00
Michal Marek
9d9c98e89e pcmcia: fix yenta dependency on PCCARD_NONSTATIC
With CONFIG_PCMCIA=m and CONFIG_YENTA=y, we get

drivers/built-in.o: In function `yenta_probe':
yenta_socket.c:(.devinit.text+0x1e582): undefined reference to
`pccard_nonstatic_ops'

This is because

select PCCARD_NONSTATIC if PCMCIA

sets PCCARD_NONSTATIC = min(YENTA, PCMCIA). Change it to 'if PCMCIA!=n'
to remove the upper limit.

[linux@dominikbrodowski.net: propagate change to PCMICA_M8XX]
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:32 +01:00
Dominik Brodowski
3a86e1807a pcmcia: do not use resource manager on !PCMCIA
If only CardBus cards are used, but not PCMCIA cards, we do not need
the extensive resource management functions provided for by
rsrc_nonstatic.c (~240K).

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:31 +01:00
Dominik Brodowski
a3ac9af56c pcmcia: remove remaining rsrc_mgr indirections
Move rsrc_mgr indirections only used by the pcmcia module to the
pcmcia module.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:31 +01:00
Dominik Brodowski
6e7b51a733 pcmcia: move cistpl.c into pcmcia module
As PCMCIA is the only real user of CIS access functions, include
cistpl.c in the PCMCIA module, not in the PCMCIA & CardBus core
module.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:30 +01:00
Dominik Brodowski
4e8804ff6d pcmcia: m8xx_pcmcia.c should use iodyn resource manager
The socket driver m8xx_pcmcia.c uses a static memory assignment,
but io_offset is set to 0. Therefore, it seems proper to use the
iodyn resource manager for this driver, as was previously the
case (before commit 80128ff79d).

CC: Vitaly Bordug <vitb@kernel.crashing.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Olof Johansson <olof@lixom.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17 17:37:10 +01:00
Dominik Brodowski
a7eb169dc7 pcmcia: m32r uses static socket resources
m32r_cfc sets the socket capabilities to SS_CAP_STATIC_MAP and
also sets io_offset != 0. This means no calls to
&pccard_nonstatic_ops went through. Therfore, replace it with
&pccard_static_ops which is exactly for this case.

CC: Mamoru Sakugawa <sakugawa@linux-m32r.org>
CC: Hirokazu Takata <takata@linux-m32r.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-24 19:57:56 +01:00
Dominik Brodowski
f9c316f4a2 pcmcia: remove some rsrc_mgr indirections
Remove rsrc_mgr indirections only used by pcmcia_resource.c

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-24 19:57:55 +01:00
Dominik Brodowski
385ee87109 pcmcia: remove useless indirection
As release_resoure_db() used to be called only from one place, and
it's a two-line function, remove it.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-24 19:57:54 +01:00
Dominik Brodowski
3970dd8c51 pcmcia: do not lock socket driver module on card insert
Do not lock the socket driver module on card insert, as
the PCMCIA core can handle a socket module removal, at least
if we add a call to socket_remove() on pccardd()'s shutdown.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-24 19:57:47 +01:00
Dominik Brodowski
593f010bc0 pcmcia: do not lock socket driver module in pcmcia_get_socket()
Do not lock the socket driver module in pcmcia_get_socket(), as
the PCMCIA core can handle a socket module removal: In
pcmcia_unregister_socket(), we explicitely wait for the last
put_device() to succeed.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:31:00 +01:00
Dominik Brodowski
3f32b3c093 pcmcia: rsrc_nonstatic io memory probe improvements
Add a lot of documentation to the rsrc_nonstatic io memory probe
functions. Also, add a first memory probe call -- just checking
whether request_resource() succeeds -- upon adding of resources.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:59 +01:00
Dominik Brodowski
180c33ee40 pcmcia: call CIS cleanup from ds.c
As ds.c is the only real user of CIS access functions, call the
cleanup functions from ds.c, too.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:49 +01:00
Dominik Brodowski
57197b9b77 pcmcia: CardBus doesn't need CIS access
At least no in-kernel CardBus-capable PCI driver makes use of the CIS
access functions. Therefore, it seems sensible to remove this unused
code, and cleanup cardbus.c a lot.

CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:13 +01:00
Dominik Brodowski
88b060d6c0 pcmcia: improve check for same card in slot after resume
During a suspend/resume cycle, an user may change the card in the
PCMCIA/CardBus slot. The pcmcia_core can at least look at the
socket state to check whether it is the same.

For PCMCIA devices, move the detection and handling of such a
change to ds.c.

For CardBus devices, the PCI hotplug interface doesn't offer a "rescan"
facility which also _removes_ devices no longer to be found behind a
bridge. Therefore, remove and re-add all devices unconditionally.

CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:12 +01:00
Dominik Brodowski
f131ddc4bd pcmcia: cleanup pccard_validate_cis()
Cleanup pccard_validate_cis() and make it return an error code on
all failures, not merely on some failures.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:10 +01:00
Dominik Brodowski
904e377744 pcmcia: validate CIS, not CIS cache.
In pccard_validate_cis(), validate the card CIS, not the CIS cache.
Also, destroy the CIS cache if pccard_validate_cis fails.

Furthermore, do not remove the fake CIS in destroy_cis_cache() but
do so explicitely in the code paths where it makes sense.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:09 +01:00
Dominik Brodowski
fa0b3bc504 pcmcia: do not meddle with already assigned resources
Do not release any iomem resources already in use.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:07 +01:00
Dominik Brodowski
cd2e18fe78 pcmcia: remove remaining unused IRQ_FIRST_SHARED parameter
Komuro pointed out correctly that I missed one IRQ_FIRST_SHARED
parameter in smc91c92_cs.c, and that another line could be writter
more beautifully.

CC: netdev@vger.kernel.org
CC: Komuro <komurojun-mbn@nifty.com>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:06 +01:00
Dominik Brodowski
933a838aa1 pcmcia: make use of pcmcia_dev_resume() return value
In runtime_resume(), do not throw away the return value of
pcmcia_dev_resume(), for we can use it (at least) in
pcmcia_store_pm_state(). This also fixes the pointless assignment
previosly seen there, as noted by Dan Carpenter.

CC: Dan Carpenter <error27@gmail.com>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-01-17 18:30:05 +01:00
Linus Torvalds
bf0c346b3f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: Ensure index stays within bounds in amd64_get_scrub_rate
2010-01-15 14:52:44 -08:00
Linus Torvalds
3b3ef30833 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: sentelic - fix left/right horizontal scroll mapping
  Input: pmouse - move Sentelic probe down the list
  Input: add compat support for sysfs and /proc capabilities output
  Input: i8042 - add Dritek quirk for Acer Aspire 5610.
  Input: xbox - do not use GFP_KERNEL under spinlock
  Input: psmouse - fix Synaptics detection when protocol is disabled
  Input: bcm5974 - report ABS_MT events
  Input: davinci_keyscan - add device_enable method to platform data
  Input: evdev - be less aggressive about sending SIGIO notifies
  Input: atkbd - fix canceling event_work in disconnect
  Input: serio - fix potential deadlock when unbinding drivers
  Input: gf2k - fix &&/|| confusion in gf2k_connect()
2010-01-15 14:51:57 -08:00
Roel Kluin
926311fd7d amd64_edac: Ensure index stays within bounds in amd64_get_scrub_rate
Add a missing iterator variable thus fixing the conditional of the
for-loop in amd64_get_scrub_rate().

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
2010-01-15 10:45:58 +01:00
Markus Pietrek
75136d48e8 serial: sh-sci: using correct fifo size for SCIF and SCIFA ports.
The sh-sci driver used the wrong fifosize for PORT_SCIFA and PORT_SCIF
ports. If an incorrect size is used, the serial core will enforce an
early shutdown on the port, especially with baudrates < 9600.

Signed-off-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15 08:33:20 +09:00
Linus Torvalds
61c39bb354 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] tape_char: add missing compat_ptr conversion
  [S390] zcrypt: add sanity check before copy_from_user()
  [S390] unwire sys_recvmmsg again
  [S390] con3215: remove empty ioctl function
  [S390] dasd: add proper compat pointer conversion for symmetrix ioctl
  [S390] mmap: add missing compat_ptr conversion to both mmap compat syscalls
  [S390] bug: implement arch specific __WARN macro
  [S390] Move __cpu_logical_map to smp.c
  [S390] tape_block: remove ioctl function
  [S390] smp: remove volatile type quilifier from __cpu_logical_map
  [S390] smp: setup smp_processor_id early
  [S390] use helpers for rlimits
  [S390] fs3270: add missing compat ptr conversion
  [S390] vmcp: add missing compat ptr conversion
  [S390] cio: add missing compat ptr conversion
  [S390] dasd: add missing compat ptr conversion
  [S390] remove superfluous TIF_USEDFPU bit
  [S390] duplicate SIGTRAP on signal delivery.
  [S390] clear TIF_SINGLE_STEP for new process.
  [S390] fix loading of PER control registers for utrace.
2010-01-14 08:37:53 -08:00
Linus Torvalds
4a24eef671 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
  net: fix build erros with CONFIG_BUG=n, CONFIG_GENERIC_BUG=n
  ipv6: skb_dst() can be NULL in ipv6_hop_jumbo().
  tg3: Update copyright and driver version
  tg3: Disable 5717 serdes and B0 support
  tg3: Add reliable serdes detection for 5717 A0
  tg3: Fix std rx prod ring handling
  tg3: Fix std prod ring nicaddr for 5787 and 57765
  sfc: Fix conditions for MDIO self-test
  sfc: Fix polling for slow MCDI operations
  e1000e: workaround link issues on busy hub in half duplex on 82577/82578
  e1000e: MDIO slow mode should always be done for 82577
  ixgbe: update copyright dates
  ixgbe: Do not attempt to perform interrupts in netpoll when down
  cfg80211: fix refcount imbalance when wext is disabled
  mac80211: fix queue selection for data frames on monitor interfaces
  iwlwifi: silence buffer overflow warning
  iwlwifi: disable tx on beacon update notification
  iwlwifi: fix iwl_queue_used bug when read_ptr == write_ptr
  mac80211: fix endian error
  mac80211: add missing sanity checks for action frames
  ...
2010-01-14 08:36:15 -08:00
Matt Carlson
ba5b0bfa06 tg3: Update copyright and driver version
This patch updates the copyright notice for 2010 and updates the version
number to 3.106.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:18:54 -08:00
Matt Carlson
55dffe79b3 tg3: Disable 5717 serdes and B0 support
The B0 revision of the 5717 will not get enough testing by the time
2.6.33 ships.  Since the kernel is already at RC3, serdes support
will require too many patches to fix.  For these reasons, this patch
disables 5717 serdes support and will refuse to attach to all 5717
devices that are later than an A0 revision.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:18:54 -08:00
Matt Carlson
d1ec96af77 tg3: Add reliable serdes detection for 5717 A0
The serdes status bit does not work as intended for the 5717 A0.
This patch implements an alternative detection scheme that will only be
valid for A0 revisions.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:18:53 -08:00
Matt Carlson
86cfe4ff02 tg3: Fix std rx prod ring handling
There are some tg3 devices that require the driver to post new rx
buffers in smaller increments.  Commit
4361935afe, "tg3: Consider
rx_std_prod_idx a hw mailbox" changed how the driver tracks the rx
producer ring updates, but it does not make any special considerations
for the above-mentioned devices.  For those devices, it is possible for
the driver to hit the special case path, which updates the hardware
mailbox register but skips updating the shadow software mailbox member.
If the special case path represents the final mailbox update for this
ISR iteration, the hardware and software mailbox values will be out of
sync.  Ultimately, this will cause the driver to use a stale mailbox
value on the next iteration, which will appear to the hardware as a
large rx buffer update.  Bad things ensue.

The fix is to update the software shadow mailbox member when the special
case path is taken.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:18:53 -08:00
Matt Carlson
13fa95b039 tg3: Fix std prod ring nicaddr for 5787 and 57765
Commit 87668d352a, titled "tg3: Don't
touch RCB nic addresses", tried to avoid assigning the nic address of
the standard producer ring.  Unfortunately, the default nic address is
not correct for the 5787, the 5755M, or the 57765.  This patch
reenables the old behavior and opts out of the assignment only
for the 5717.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Tested-by: Chow Loong Jin <hyperair@ubuntu.com>
Tested-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:18:52 -08:00
Ben Hutchings
f3766c26a5 sfc: Fix conditions for MDIO self-test
The MDIO self-test should not be run on boards without an MDIO PHY,
such as SFN5122F-R3 and later revisions.  It should also not try to
address a specific MMD in an MDIO clause 22 PHY.  Check the
mode_support field to decide which mode to use, if any.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:12:47 -08:00
Ben Hutchings
55029c1d65 sfc: Fix polling for slow MCDI operations
When the interface is down and we are using polled mode for MCDI
operations, we busy-wait for completion for approximately 1 jiffy
using udelay() and then back off to schedule().  But the completion
will not wake the task, since we are using polled mode!  We must use
schedule_timeout_uninterruptible() instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:12:47 -08:00
Bruce Allan
baf86c9d36 e1000e: workaround link issues on busy hub in half duplex on 82577/82578
This patch removes a delay in hardware after every received packet allowing
more time for transmitted packets to go out in between received packets in
half duplex.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:12:46 -08:00
Bruce Allan
fddaa1aff8 e1000e: MDIO slow mode should always be done for 82577
A previous 82577 workaround that set the MDIO access speed to slow mode for
every PHY register read/write when the cable is unplugged should instead
set the access mode to always be slow before any PHY register access.
Since the mode bit gets cleared when the PHY is reset, set the mode after
every PHY reset.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:12:46 -08:00
Shannon Nelson
8c47eaa766 ixgbe: update copyright dates
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:12:45 -08:00
Alexander Duyck
1a647bd213 ixgbe: Do not attempt to perform interrupts in netpoll when down
This patch resolves issues seen when running netconsole and rebooting via
reboot -f.  The issue was due to the fact that we were attempting to
perform interrupt actions when the q_vectors and rings had already been
freed via the ixgbe_shutdown routines.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by:  Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-13 17:12:45 -08:00
Linus Torvalds
4f374425b6 Merge branch 'for-linus/bugfixes' of git://xenbits.xensource.com/people/ianc/linux-2.6
* 'for-linus/bugfixes' of git://xenbits.xensource.com/people/ianc/linux-2.6:
  xen: fix hang on suspend.
2010-01-13 16:15:09 -08:00