Commit graph

57620 commits

Author SHA1 Message Date
Hannes Eder f637011795 drivers/net/e1000e: fix sparse warning: Should it be static?
Impact: Make symbol static.

Fix this sparse warning:
  drivers/net/e1000e/82571.c:1229:5: warning: symbol 'e1000_check_for_serdes_link_82571' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:10 -08:00
Hannes Eder a243f848ce drivers/net/cxgb3: fix sparse warnings: fix signedness
Fix this sparse warning:
  drivers/net/cxgb3/ael1002.c:1010:60: warning: incorrect type in argument 4 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:10 -08:00
Hannes Eder 97915b5bf6 drivers/net/cxgb3: fix sparse warning: symbol shadows an earlier one
Impact: Move variable declaration as close to usage as possible.

Fix this sparse warning:
  drivers/net/cxgb3/cxgb3_main.c:1586:21: warning: symbol 'cap' shadows an earlier one

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:09 -08:00
Hannes Eder 54b87323ed drivers/net/bonding: fix sparse warning: symbol shadows an earlier one
Impact: Rename function scope variable.

Fix this sparse warning:
  drivers/net/bonding/bond_main.c:4704:13: warning: symbol 'mode' shadows an earlier one
  drivers/net/bonding/bond_main.c:95:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:08 -08:00
Hannes Eder 1f78d9f945 drivers/net/bonding: fix sparse warnings: context imbalance
Impact: Attribute functions with __acquires(...) and/or __releases(...).

Fix this sparse warnings:
  drivers/net/bonding/bond_alb.c:1675:9: warning: context imbalance in 'bond_alb_handle_active_change' - unexpected unlock
  drivers/net/bonding/bond_alb.c:1742:9: warning: context imbalance in 'bond_alb_set_mac_address' - unexpected unlock
  drivers/net/bonding/bond_main.c:1025:17: warning: context imbalance in 'bond_do_fail_over_mac' - unexpected unlock
  drivers/net/bonding/bond_main.c:3195:13: warning: context imbalance in 'bond_info_seq_start' - wrong count at exit
  drivers/net/bonding/bond_main.c:3234:13: warning: context imbalance in 'bond_info_seq_stop' - unexpected unlock

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:08 -08:00
Hannes Eder b79d8fff0e drivers/net/atlx: fix sparse warnings: fix signedness
Impact: While being at it: statics do not need to be initialized with 0.

Fix this sparse warnings:
  drivers/net/atlx/atl1.c:109:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2870:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2880:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2894:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2904:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2913:1: warning: incorrect type in initializer (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:07 -08:00
Hannes Eder fd8ef49edd drivers/net/atl1e: fix sparse warnings: fix signedness
Fix this sparse warnings:
  drivers/net/atl1e/atl1e_main.c:716:39: warning: incorrect type in argument 2 (different signedness)
  drivers/net/atl1e/atl1e_param.c:57:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atl1e/atl1e_param.c:68:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atl1e/atl1e_param.c:81:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atl1e/atl1e_param.c:92:1: warning: incorrect type in initializer (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:06 -08:00
Hannes Eder 18c4c35ecb drivers/net/arcnet: fix sparse warning: symbol shadows an earlier one
Impact: Remove redundant inner scope variable.

Fix this sparse warning:
  drivers/net/arcnet/arcnet.c:383:21: warning: symbol 'count' shadows an earlier one
  drivers/net/arcnet/arcnet.c:375:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:26:05 -08:00
Hannes Eder 8d668bfef6 drivers/net/s2io.c: fix sparse warning: symbol shadows an earlier one
Impact: Remove redundant inner scope variable.

Fix this sparse warning:
  drivers/net/s2io.c:7223:21: warning: symbol 'i' shadows an earlier one
  drivers/net/s2io.c:7184:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:14 -08:00
Hannes Eder 5b5103ec2d drivers/net/r6040.c: fix sparse warning: Using plain integer as NULL pointer
Fix this sparse warnings:
  drivers/net/r6040.c:487:31: warning: Using plain integer as NULL pointer
  drivers/net/r6040.c:492:31: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:13 -08:00
Hannes Eder d6781f2af8 drivers/net/ppp*.c: fix sparse warnings: fix signedness
Fix this sparse warnings:
  drivers/net/ppp_generic.c:919:43: warning: incorrect type in argument 1 (different signedness)
  drivers/net/pppoe.c:1195:43: warning: incorrect type in argument 1 (different signedness)
  drivers/net/pppol2tp.c:2666:43: warning: incorrect type in argument 1 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:12 -08:00
Hannes Eder 416c6f90f8 drivers/net/ni65.c: fix sparse warnings: fix signedness
Fix this sparse warnings:
  drivers/net/ni65.c:488:36: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:12 -08:00
Hannes Eder 00137dad17 drivers/net/lance.c: fix sparse warnings: fix signedness
Impact: Besides from fixing the signedness issue remove some
whitespace to obey to the 80 character limit.

Fix this sparse warnings:
  drivers/net/lance.c:399:19: warning: incorrect type in assignment (different signedness)
  drivers/net/lance.c:654:29: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:11 -08:00
Hannes Eder 7c34eb8973 drivers/net/niu.c: fix sparse warning: symbol shadows an earlier one
Impact: Move variable declaration to a more inner scope.

Fix this sparse warning:
  drivers/net/niu.c:2399:21: warning: symbol 'err' shadows an earlier one
  drivers/net/niu.c:2287:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:10 -08:00
Hannes Eder 5d7dce76c5 drivers/net/ns83820.c: fix sparse warnings: fix signedness
Fix this sparse warnings:
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:09 -08:00
Hannes Eder fbf978914e drivers/net/ni65.c: fix sparse warnings: symbol shadows an earlier one
Impact: Remove redundant variable declaration or move them to a more
inner scope.

Fix this sparse warnings:
  drivers/net/ni65.c:900:37: warning: symbol 'p' shadows an earlier one
  drivers/net/ni65.c:874:21: originally declared here
  drivers/net/ni65.c:925:21: warning: symbol 'p' shadows an earlier one
  drivers/net/ni65.c:874:21: originally declared here
  drivers/net/ni65.c:945:29: warning: symbol 'k' shadows an earlier one
  drivers/net/ni65.c:926:15: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:09 -08:00
Hannes Eder f11bf7a31e drivers/net/e2100.c: fix sparse warning: symbol shadows an earlier one
Impact: Remove redundant inner scope variable and while being at it
make use of ARRAY_SIZE instead of a hardcoded number.

Fix this sparse warning:
  drivers/net/e2100.c:219:56: warning: symbol 'i' shadows an earlier one
  drivers/net/e2100.c:181:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:08 -08:00
Hannes Eder 1256f7394c drivers/net/at1700.c: fix sparse warning: symbol shadows an earlier one
Impact: Move variable declaration to a more inner scope.

Fix this sparse warning:
  drivers/net/at1700.c:846:21: warning: symbol 'i' shadows an earlier one
  drivers/net/at1700.c:831:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:21:07 -08:00
Zlatko Calusic 5955c7a2cf Add support for VT6415 PCIE PATA IDE Host Controller
Signed-off-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-17 16:56:31 -08:00
Rafael J. Wysocki 3494252d56 USB/PCI: Fix resume breakage of controllers behind cardbus bridges
If a USB PCI controller is behind a cardbus bridge, we are trying to
restore its configuration registers too early, before the cardbus
bridge is operational.  To fix this, call pci_restore_state() from
usb_hcd_pci_resume() and remove usb_hcd_pci_resume_early() which is
no longer necessary (the configuration spaces of USB controllers that
are not behind cardbus bridges will be restored by the PCI PM core
with interrupts disabled anyway).

This patch fixes the regression from 2.6.28 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12659

[ Side note: the proper long-term fix is probably to just force the
  unplug event at suspend time instead of doing a plug/unplug at resume
  time, but this patch is fine regardless  - Linus ]

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-17 16:56:31 -08:00
Linus Torvalds 8ce9a75a30 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  iommu: fix Intel IOMMU write-buffer flushing
  futex: fix reference leak

Trivial conflicts fixed manually in drivers/pci/intel-iommu.c
2009-02-17 14:26:35 -08:00
Linus Torvalds c951aa62d5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: Documentation: fix minor PCIe HOWTO thinko
  PCI: fix missing kernel-doc and typos
  PCI: fix struct pci_platform_pm_ops kernel-doc
  PCI: fix rom.c kernel-doc warning
  PCI/MSI: fix msi_mask() shift fix
2009-02-17 14:23:35 -08:00
Linus Torvalds 0637810f24 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_nv: give up hardreset on nf2
  libata-sff: fix 32-bit PIO ATAPI regression
2009-02-17 14:16:02 -08:00
Linus Torvalds 59dad0cbe6 Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  MAINTAINERS: Switch hdaps to Frank Seidel
  hwmon: Fix ACPI resource check error handling
  hwmon: (f71882fg) Hide misleading error message
2009-02-17 14:14:15 -08:00
Linus Torvalds 1024d1c24b Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (10626): ivtv: fix regression in get sliced vbi format
  V4L/DVB (10625): ivtv: fix decoder crash regression
  V4L/DVB (10619): gspca - main: Destroy the URBs at disconnection time.
  V4L/DVB (10572): Revert commit dda06a8e46
  V4L/DVB (10533): fix LED status output
  V4L/DVB (10532): Correction of Stereo detection/setting and signal strength indication
  V4L/DVB (10527): tuner: fix TUV1236D analog/digital setup
  V4L/DVB (10516a): zoran: Update MAINTAINERS entry
2009-02-17 14:09:03 -08:00
Linus Torvalds 5e51d16dde Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: fix bus endianity in file2alias
  HID: move tmff and zpff devices from ignore_list to blacklist
  HID: unlock properly on error paths in hidraw_ioctl()
  HID: blacklist Powercom USB UPS
2009-02-17 14:08:26 -08:00
Linus Torvalds 7f302fe317 Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
* 'for-linus' of git://git.o-hand.com/linux-mfd:
  mfd: Fix sm501_register_gpio section mismatch
  mfd: fix sm501 section mismatches
  mfd: terminate pcf50633 i2c_device_id list
  mfd: Ensure all WM8350 IRQs are masked at startup
  mfd: fix htc-egpio iomem resource handling using resource_size
  mfd: Fix TWL4030 build on some ARM variants
  mfd: wm8350 tries reaches -1
  mfd: Mark WM835x USB_SLV_500MA bit as accessible
  mfd: Improve diagnostics for WM8350 ID register probe
  mfd: Initialise WM8350 interrupts earlier
  mfd: Fix egpio kzalloc return test
2009-02-17 14:08:03 -08:00
Linus Torvalds 68cc8301b4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] iTCO_wdt: fix SMI_EN regression 2
2009-02-17 14:07:18 -08:00
Linus Torvalds 11df586407 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  wusb: whci-hcd: always lock whc->lock with interrupts disabled
2009-02-17 14:05:59 -08:00
David Woodhouse ca77fde8e6 Fix Intel IOMMU write-buffer flushing
This is the cause of the DMA faults and disk corruption that people have
been seeing. Some chipsets neglect to report the RWBF "capability" --
the flag which says that we need to flush the chipset write-buffer when
changing the DMA page tables, to ensure that the change is visible to
the IOMMU.

Override that bit on the affected chipsets, and everything is happy
again.

Thanks to Chris and Bhavesh and others for helping to debug.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tested-by: Chris Wright <chrisw@sous-sol.org>
Reviewed-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-17 14:02:57 -08:00
Hans de Goede 18632f84fa hwmon: Fix ACPI resource check error handling
This patch fixes a number of cases where things were not properly
cleaned up when acpi_check_resource_conflict() returned an error,
causing oopses such as the one reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=483208

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-02-17 19:59:54 +01:00
Jean Delvare 603eaa1bdd hwmon: (f71882fg) Hide misleading error message
If the F71882FG chip is at address 0x4e, then the probe at 0x2e will
fail with the following message in the logs:
f71882fg: Not a Fintek device

This is misleading because there is a Fintek device, just at a
different address. So I propose to degrade this message to a debug
message.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2009-02-17 19:59:54 +01:00
Hans Verkuil 7bf432d64c V4L/DVB (10626): ivtv: fix regression in get sliced vbi format
The new v4l2_subdev_call used s_fmt instead of g_fmt.

Thanks-to: Andy Walls <awalls@radix.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:09 -03:00
Hans Verkuil ac9575f75c V4L/DVB (10625): ivtv: fix decoder crash regression
The video_ioctl2 conversion of ivtv in kernel 2.6.27 introduced a bug
causing decoder commands to crash. The decoder commands should have been
handled from the video_ioctl2 default handler, ensuring correct mapping
of the argument between user and kernel space. Unfortunately they ended
up before the video_ioctl2 call, causing random crashes.

Thanks to hannes@linus.priv.at for testing and helping me track down the
cause!

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:09 -03:00
Adam Baker ad28127d7c V4L/DVB (10619): gspca - main: Destroy the URBs at disconnection time.
If a device using the gspca framework is unplugged while it is still streaming
then the call that is used to free the URBs that have been allocated occurs
after the pointer it uses becomes invalid at the end of gspca_disconnect.
Make another cleanup call in gspca_disconnect while the pointer is still
valid (multiple calls are OK as destroy_urbs checks for pointers already
being NULL.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:09 -03:00
Mauro Carvalho Chehab 28100165c3 V4L/DVB (10572): Revert commit dda06a8e46
On Mon, 02 Feb 2009, Hartmut wrote:

This change set is wrong. The affected functions cannot be called from
an interrupt context, because they may process large buffers. In this
case, interrupts are disabled for a long time. Functions, like
dvb_dmx_swfilter_packets(), could be called only from a tasklet.

This change set does hide some strong design bugs in dm1105.c and
au0828-dvb.c.

Please revert this change set and do fix the bugs in dm1105.c and
au0828-dvb.c (and other files).

On Sun, 15 Feb 2009, Oliver Endriss wrote:

This changeset _must_ be reverted! It breaks all kernels since 2.6.27
for applications which use DVB and require a low interrupt latency.

It is a very bad idea to call the demuxer to process data buffers with
interrupts disabled!

On Mon, 16 Feb 2009, Trent Piepho wrote:

I agree, this is bad.  The demuxer is far too much work to be done with
IRQs off.  IMHO, even doing it under a spin-lock is excessive.  It should
be a mutex.  Drivers should use a work-queue to feed the demuxer.

Thank you for testing this changeset and discovering the issues on it.

Cc: Trent Piepho <xyzzy@speakeasy.org>
Cc: Hartmut <e9hack@googlemail.com>
Cc: Oliver Endriss <o.endriss@gmx.de>
Cc: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:09 -03:00
Tobias Lorenz 2f94fc465a V4L/DVB (10533): fix LED status output
This patch closes one of my todos that was since long on my list.
Some people reported clicks and glitches in the audio stream,
correlated to the LED color changing cycle.
Thanks to Rick Bronson <rick@efn.org>.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:09 -03:00
Tobias Lorenz d807dec59d V4L/DVB (10532): Correction of Stereo detection/setting and signal strength indication
Thanks to Bob Ross <pigiron@gmx.com>
- correction of stereo detection/setting
- correction of signal strength indicator scaling

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:09 -03:00
Mauro Carvalho Chehab ef88f2b563 V4L/DVB (10527): tuner: fix TUV1236D analog/digital setup
As reported by David Engel <david@istwok.net>, ATSC115 doesn't work
fine with mythtv. This software opens both analog and dvb interfaces of
saa7134.

What happens is that some tuner commands are going to the wrong place,
as shown at the logs:

Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: using tuner params #0 (ntsc)
Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
Feb 12 20:37:48 opus kernel: tuner 1-0061: tv freq set to 67.25
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: using tuner params #0 (ntsc)
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: tv 0x07 0x10 0xce 0x01
Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: tv 0x07 0x10 0xce 0x01

This happens due to a hack at TUV1236D analog setup, where it replaces
tuner address, at 0x61 for 0x0a, in order to save a few memory bytes.

The code assumes that nobody else would try to access the tuner during
that setup, but the point is that there's no lock to protect such
access. So, this opens the possibility of race conditions to happen.

Instead of hacking tuner address, this patch uses a temporary var with
the proper tuner value to be used during the setup. This should save
the issue, although we should consider to write some analog/digital
lock at saa7134 driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:08 -03:00
Anssi Hannula daedb3d6a9 HID: move tmff and zpff devices from ignore_list to blacklist
The devices handled by hid-tmff and hid-zpff were added in the
hid_ignore_list[] instead of hid_blacklist[] in hid-core.c, thus
disabling them completely.

hid_ignore_list[] causes hid layer to skip the device, while
hid_blacklist[] indicates there is a specific driver in hid bus.

Re-enable the devices by moving them to the correct list.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-02-17 13:25:01 +01:00
Dan Carpenter dfd395aff4 HID: unlock properly on error paths in hidraw_ioctl()
We can't return immediately because lock_kernel() is held.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-02-17 13:25:01 +01:00
Michael Tokarev 35cfd1d964 HID: blacklist Powercom USB UPS
For quite some time users with various UPSes from Powercom were forced to play
magic with bind/unbind in /sys in order to be able to see the UPSes.  The
beasts does not work as HID devices, even if claims to do so.  cypress_m8
driver works with the devices instead, creating a normal serial port with which
normal UPS controlling software works.

The manufacturer confirmed the upcoming models with proper HID support will
have different device IDs.  In any way, it's wrong to have two completely
different modules for one device in kernel.

Blacklist the device in HID (add it to hid_ignore_list) to stop this mess,
finally.

Signed-off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-02-17 13:25:01 +01:00
Rakib Mullick dcd9651ecd mfd: Fix sm501_register_gpio section mismatch
WARNING: drivers/mfd/built-in.o(.text+0x1706): Section mismatch in
reference from the function sm501_register_gpio() to the function
.devinit.text:sm501_gpio_register_chip()
The function sm501_register_gpio() references
the function __devinit sm501_gpio_register_chip().
This is often because sm501_register_gpio lacks a __devinit
annotation or the annotation of sm501_gpio_register_chip is wrong.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:48:05 +01:00
Alexey Dobriyan 158abca5f6 mfd: fix sm501 section mismatches
drv => driver renaming is needed otherwise modpost will spit false positives
re pointing to __devinit function from regular data.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:10:19 +01:00
Jean Delvare 8915e54028 mfd: terminate pcf50633 i2c_device_id list
The i2c_device_id list is supposed to be zero-terminated.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2009-02-17 09:07:02 +01:00
Mark Brown 2f161f4485 mfd: Ensure all WM8350 IRQs are masked at startup
The IRQs might have been left enabled in hardware, generating spurious
IRQs before the drivers have registered.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:14 +01:00
Philipp Zabel 9427c34bc7 mfd: fix htc-egpio iomem resource handling using resource_size
Fixes an off-by-one error in the iomem resource mapping.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:14 +01:00
Mark Brown a313d758cc mfd: Fix TWL4030 build on some ARM variants
Many ARM platforms do not provide a mach/cpu.h so rather than guarding
the use of that header with CONFIG_ARM guard it with the guards used
when testing for the OMAP variants in the body of the code.

Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:13 +01:00
Roel Kluin 29c6a2e6f8 mfd: wm8350 tries reaches -1
With a postfix decrement tries will reach -1 rather than 0,
so the warning will not be issued even upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:13 +01:00
Mark Brown a39a021fd7 mfd: Mark WM835x USB_SLV_500MA bit as accessible
The code is out of sync with the silicon.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:13 +01:00
Mark Brown 85c93ea7dc mfd: Improve diagnostics for WM8350 ID register probe
Check the return value of the device I/O functions when reading the
ID registers so we can provide a more useful diagnostic when we're
having trouble talking to the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:12 +01:00
Mark Brown 62571c29a8 mfd: Initialise WM8350 interrupts earlier
Ensure that the interrupt handling is configured before we do platform
specific init. This allows the platform specific initialisation to
configure things which use interrupts safely.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:11 +01:00
Julia Lawall 720fd66dfa mfd: Fix egpio kzalloc return test
Since ei is already known to be non-NULL, I assume that what was intended
was to test the result of kzalloc.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17 09:00:10 +01:00
Tejun Heo 7dac745b8e sata_nv: give up hardreset on nf2
Kernel bz#12176 reports that nf2 hardreset simply doesn't work.  Give
up.  Argh...

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Robert Hancock <hancockr@shaw.ca>
Reported-by: Saro <saro_v@hotmail.it>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-02-16 18:57:25 -05:00
Sergei Shtylyov d1b3525b41 libata-sff: fix 32-bit PIO ATAPI regression
Commit 871af1210f (libata: Add 32bit
PIO support) has caused all kinds of errors on the ATAPI devices, so
it has been empirically proven that one shouldn't try to read/write
an extra data word when a device is not expecting it already. "Don't
do it then"; however, still use a chance to do 32-bit read/write one
last time when there are exactly 3 trailing bytes.

Oh, and stop pointlessly swapping the bytes to and fro on big-endian
machines by using io*_rep() accessors which shouldn't byte-swap.

This patch should fix the kernel.org bug #12609.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-02-16 18:55:56 -05:00
Gregory CLEMENT 744f659272 [ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controller
Add support for inverted rdy_busy pin for Atmel nand device controller
It will fix building error on NeoCore926 board.

Acked-by: Andrew Victor <linux@maxim.org.za>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Gregory CLEMENT <gclement@adeneo.adetelgroup.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-16 21:40:39 +00:00
David Vrabel a3c1239eb5 wusb: whci-hcd: always lock whc->lock with interrupts disabled
Always lock whc->lock with spin_lock_irq() or spin_lock_irqsave().

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2009-02-16 14:37:12 +00:00
Tobias Diedrich 34edaa8832 net: forcedeth: Fix wake-on-lan regression
Commit f55c21fd9a ("forcedeth: call
restore mac addr in nv_shutdown path"), which was introduced to fix
the regression tracked at
http://bugzilla.kernel.org/show_bug.cgi?id=11358 causes the
wake-on-lan mac to be reversed in the shutdown path.  Apparently the
forcedeth situation is rather messy in that the mac we need to
writeback for a subsequent modprobe to work is exactly the reverse of
what is needed for proper wake-on-lan.

The following patch explains the situation in the comments and
makes the call to nv_restore_mac_addr() conditional (only called if
we are not really going for poweroff).

Tobias Diedrich wrote:
> Hmm, I had not tried WOL for some time.
> With 2.6.29-rc3 is see the following behaviour:
> 
> State            WOL Behaviour
> ------------------------------
> shutdown         reversed MAC
> disk/shutdown    reversed MAC
> disk/platform    OK
> 
> Apparently nv_restore_mac_addr() restores the MAC in the wrong order
> for WOL (at least for my PCI_DEVICE_ID_NVIDIA_NVENET_15).  platform
> works, because the MAC is not touched in the nv_suspend() path.
> 
> A possible fix might be to only call nv_restore_mac_addr() if
> system_state != SYSTEM_POWER_OFF.

With the following patch:
shutdown         OK
disk/shutdown    OK
disk/platform    OK
kexec            OK

Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Tested-by: Philipp Matthias Hahn <pmhahn@titan.lahn.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-16 00:13:20 -08:00
Alexander Duyck 85e8d004ec igb: transition driver to only using advanced descriptors
Currently the driver uses advanced descriptors for its main functionality,
but then uses legacy when testing.  This patch changes this so that
advanced descriptors are used throughout and all mentions of legacy
descriptors are removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-16 00:00:20 -08:00
Alexander Duyck cbd347adfe igb: remove unused defines
This patch removes all of the unused defines from the .h files contained in
igb.  For some defines there was a use and so I plugged them into the correct
locations.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:59:44 -08:00
Alexander Duyck bc1cbd3493 igb: misc cleanup to combine one if statement
This patch combines a pair of if statements into one.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:56:02 -08:00
Alexander Duyck 56fbbb4e61 igb: cleanup incorrect comment and set IP Checksum Enable
IP Checksum enable doesn't need packet split in order to function.  It only
requires the use of advanced descriptors which the current igb driver does.
So we can enable it always without any issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:56:00 -08:00
Alexander Duyck 1e5c3d218a igb: reduce size required to trigger low latency
Update the Adaptive Interrupt Moderation algorithm so that the low latency
state is triggered less easily to prevent high interrupt loads.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:56:00 -08:00
Alexander Duyck 73cd78f1d3 igb: misc whitespace/formatting cleanups
This patch is intended to hold several whitespace, formatting, and
comment cleanups that have been found while cleaning up the igb driver.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:55:59 -08:00
Lennert Buytenhek eaf5d59092 mv643xx_eth: implement Large Receive Offload
Controlled by a compile-time (Kconfig) option for now, since it
isn't a win in all cases.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:43:58 -08:00
Lennert Buytenhek b8df184f88 mv643xx_eth: allow enabling/disabling tx checksumming via ethtool
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:43:57 -08:00
Lennert Buytenhek d888b3738e mv643xx_eth: export rx csum get/set methods via ethtool
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:43:56 -08:00
Lennert Buytenhek e7d2f4dbd9 mv643xx_eth: implement ethtool rx/tx ring size query and resizing
Rename the mp->default_[rt]x_ring_size variables to ->[rt]x_ring_size,
allow them to be read via the standard ethtool ->get_ringparam() op,
and add a ->set_ringparam() op to allow resizing them at run time.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:43:56 -08:00
Lennert Buytenhek 3e5080344e mv643xx_eth: rework interrupt coalescing, and export via ethtool
This patch:
- increases the precision of the receive/transmit interrupt
  coalescing register value computations by using 64bit temporaries;
- adds functions to read the current hardware coalescing register
  values and convert them back to usecs;
- exports the {get,set} {rx,tx} coal methods via the standard
  ethtool coalescing interface.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:43:54 -08:00
Lennert Buytenhek 6bdf576e4b mv643xx_eth: unify ethtool ops for phy'd and phy-less interfaces
It's a waste having two different versions of this structure around
when the differences between ethtool ops for phy'd and phy-less
interfaces are so minor.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:43:53 -08:00
Hannes Eder aa611f85d0 drivers/isdn/hardware/mISDN: change type of hfc_jiffies to unsigned long
Jiffies are unsigned long, make sure we fit in jiffies store variable
on archs with bits per long > 32.

Patch suggested by Jiri Slaby.

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:39:21 -08:00
Hannes Eder f8532fde95 drivers/isdn/mISDN: fix sparse warnings: make symbols static
Fix this sparse warnings:
  drivers/isdn/mISDN/clock.c:44:1: warning: symbol 'iclock_lock' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:45:9: warning: symbol 'iclock_count' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:46:17: warning: symbol 'iclock_tv' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:47:9: warning: symbol 'iclock_tv_valid' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:48:20: warning: symbol 'iclock_current' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:39:20 -08:00
Hannes Eder 6c2959aa7b drivers/isdn/hardware/mISDN: fix sparse warnings: make symbols static
Fix this sparse warnings:
  drivers/isdn/hardware/mISDN/hfcpci.c:59:19: warning: symbol 'hfc_tl' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcpci.c:60:9: warning: symbol 'hfc_jiffies' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.h:201:6: warning: symbol 'conf_str' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.h:319:12: warning: symbol 'HFC_TE_LAYER1_STATES' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.h:331:12: warning: symbol 'HFC_NT_LAYER1_STATES' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.c:38:12: warning: symbol 'hfcsusb_rev' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.c:978:1: warning: symbol 'fill_isoc_urb' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.c:1724:1: warning: symbol 'setup_hfcsusb' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:39:20 -08:00
Eilon Greenstein 2b1440230a bnx2x: Version
And updating the year

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:32:01 -08:00
Eilon Greenstein 356e23850b bnx2x: Clean-up
Whitespaces, empty lines, 80 columns, indentations and removing redundant
parenthesis

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:58 -08:00
Eilon Greenstein f537225142 bnx2x: Comments and prints
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:57 -08:00
Eilon Greenstein 9898f86d39 bnx2x: Re-arrange module parameters
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:56 -08:00
Eilon Greenstein 359d8b1599 bnx2x: Moving includes
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:55 -08:00
Eilon Greenstein 8440d2b636 bnx2x: Driver dump
Re-arrange the driver debug print to support the Tx multi-queue and add support
for debug prints at the end of the ring (when start<end)

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:55 -08:00
Eilon Greenstein 0febaa42a3 bnx2x: Removing unused struct
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:54 -08:00
Eilon Greenstein 4781bfad73 bnx2x: Sparse endianity annotation
Resolving the majority of the issues, but there are still some left for future
patches.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:53 -08:00
Eilon Greenstein 0626b89971 bnx2x: Removing redundant macros
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:51 -08:00
Eilon Greenstein 5cd65a93e9 bnx2x: Better struct naming
This is the device info from the chip shared memory - rename to avoid confusion

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:50 -08:00
Eilon Greenstein b5bf9068eb bnx2x: Loopback in diag mode
When loading in diag mode, set the device to loopback instead of normal link and
then changing it to loopback mode

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:50 -08:00
Eilon Greenstein 26e029752c bnx2x: Optimize chip MPS configuration
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:48 -08:00
Eilon Greenstein cfb18c5cb7 bnx2x: Memory clean up on failure
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:47 -08:00
Eilon Greenstein 3ce2c3f9a3 bnx2x: Using nvram default WoL config
The driver default WoL setting is set to the nvram default value

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:47 -08:00
Eilon Greenstein 3e5b510eb8 bnx2x: smp_mb and not just smp_rmb
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:46 -08:00
Eilon Greenstein 8b3a0f0ba3 bnx2x: Increasing FW timeout
When enabling many debug prints, it can take a while before processing an event.
To ease the debug process, allow bigger timeout before giving up

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:45 -08:00
Eilon Greenstein 36e552ab1a bnx2x: Returning EBUSY in debug mode as well
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:45 -08:00
Eilon Greenstein 8d5726c404 bnx2x: Manual setting for MRRS
Allows better debug capabilities if the user wants to force an MRRS value

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:42 -08:00
Eilon Greenstein 052a38e096 bnx2x: Using registers name
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:42 -08:00
Eilon Greenstein c2c8b03e20 bnx2x: Pre emphasis configuration
Supporting non-default pre-emphasis settings for the internal and some external
PHYs

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:41 -08:00
Eilon Greenstein ed8680a7e6 bnx2x: GMII not SGMII
Fixing the function name

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:40 -08:00
Eilon Greenstein 3a36f2efbf bnx2x: Removing CL73 code
This code is disabled, so removing it to avoid confusion

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:39 -08:00
Eilon Greenstein c1b7399027 bnx2x: Using the HW 5th lane
This 1G interface (on top of the 4 lanes 10G interface) requires additional
setting to work in CL45

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:36 -08:00
Eilon Greenstein 811a2f2d3b bnx2x: EMAC reset
The NIG_ENABLE does not reset the emac. Replace it with explicit reset

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:33 -08:00
Eilon Greenstein a35da8dbf1 bnx2x: Saving PHY FW version
Some PHYs (like the BCM8726) FW version cannot be read after activating the
PHY, so we need to save this information

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:31 -08:00
Eilon Greenstein 2857718528 bnx2x: Supporting BCM8481 PHY
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:29 -08:00
Eilon Greenstein 46c6a67495 bnx2x: PHY lock list
Some dual port PHY require HW lock since they are used by both interfaces
(different driver instances). Since this list is getting longer, update a
parameter at load time instead of calculating it on runtime

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:26 -08:00
Eilon Greenstein 589abe3a0f bnx2x: Supporting BCM8726 PHY
Also adding the ability to recognize the optic module and disable it if it is
not authorized for safety reasons - since this feature might upset some users
which are willing to take the risk, it is optional and can be disabled by
setting an nvram bit (or a trivial driver patch to set this bit).
This dual port PHY requires special handling if the ports are swapped.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:24 -08:00
Eilon Greenstein 4acac6a53a bnx2x: GPIO accessories
A GPIO is used with the 8726 PHY. Adding the GPIO related functions in this

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:20 -08:00
Eilon Greenstein 87942b4678 bnx2x: Removing redundant device parameters
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:18 -08:00
Eilon Greenstein 35b19ba51c bnx2x: Removing the board type
There are too many different board types and this field is not scalable.
Removing it and making decisions according to other fields

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:15 -08:00
Eilon Greenstein 1c06328c03 bnx2x: Flow control enhancement
Setting better HW thresholds and enabling FW capabilities for better
enforcement. Also set the HW to more efficiently use the internal buffers if
this is a single port design

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:15 -08:00
Eilon Greenstein 8a1c38d17d bnx2x: BW shaper enhancements
Some of the configuration can be set when loading the device and shouldn't be
re-calculated after each link up indication since it is not dependent on the
link speed

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:14 -08:00
Eilon Greenstein 748e543974 bnx2x: Moving skb_record_rx_queue
Should be called for all incoming packets and not just for GRO packets

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:13 -08:00
Eilon Greenstein de832a55d2 bnx2x: Per queue statistics
Re-ordering the statistics to enhance readability and adding per queue
statistics (available via ethtool -S)

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:12 -08:00
Eilon Greenstein d3d4f49527 bnx2x: Removing microcode assertion check
This check is unreliable since latest MC can issue warnings on rare occasions
which are not fatal errors

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:10 -08:00
Eilon Greenstein f1ef27ef42 bnx2x: Disabling interrupts after iSCSI-boot
Before initializing the chip after iSCSI boot, the interrupts of the function
that was used to boot must be disabled. That means that the driver needs to set
the chip as if it is the iSCSI PCI function - this bug is exposed only with MSI

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:09 -08:00
Eilon Greenstein 0f00846deb bnx2x: System-page alignment
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:08 -08:00
Eilon Greenstein 8badd27aa0 bnx2x: MSI support
Enabling MSI on top of MSI-X and INTA. Also changing the module parameter to
allow choosing INTA or MSI even when MSI-X is available. The default status
block should not be reversed for endianity. Since MSI can issue
re-configuration, the interrupt disable function now requires mmiowb

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:05 -08:00
Eilon Greenstein 555f6c7837 bnx2x: Multi-queue
Adding Tx multi-queue and enabling multi-queue by default

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:31:05 -08:00
Eilon Greenstein 8d9c5f34a2 bnx2x: New FW
This is the FW blob and the relevant definitions without any logic. It
also contains the minimal mandatory code changes to work with this FW
but it does not contain enabling of the new features that this FW
provides.

This FW is needed for:
- More efficient multi-queue
- per queue statistics
- Big-endian issue with MSI
- Improved pause response

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:24:08 -08:00
Patrick Ohly 33af6bcc00 igb: use timecompare to implement hardware time stamping
Both TX and RX hardware time stamping are implemented.  Due to
hardware limitations it is not possible to verify reliably which
packet was time stamped when multiple were pending for sending; this
could be solved by only allowing one packet marked for hardware time
stamping into the queue (not implemented yet).

RX time stamping relies on the flag in the packet descriptor which
marks packets that were time stamped. In "all packet" mode this flag
is not set. TODO: also support that mode (even though it'll suffer
from race conditions).

Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:13:27 -08:00
Patrick Ohly c6cb090ba7 igb: stub support for SIOCSHWTSTAMP
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:13:25 -08:00
Patrick Ohly 38c845c764 igb: access to NIC time
Adds the register definitions and code to read the time
register.

Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:13:25 -08:00
dave graham 0a834a36ac e1000e: Remove mutex_trylock and associated WARN on failure.
Single-thread access must be ensured for ICH8 NVM and PHY operations.
This synchronization is provided by the nvm_mutex. To assist in
understanding the contexts from which this code could be reached,
a WARN was output if the mutex was not going to be immediately
acquirable (if !mutex_trylock()). The code has now been optimized,
and we have verified that the few remaining mutex contentions are
reasonable and non-blocking, and it is time to remove the
mutex_trylock() and WARN messages.

Signed-off-by: dave graham <david.graham@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-14 23:46:10 -08:00
David S. Miller 5e30589521 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
2009-02-14 23:12:00 -08:00
David S. Miller ac178ef0ae Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-02-14 23:06:44 -08:00
Harvey Harrison 35c26c2cf6 rndis: remove private wrapper of __constant_cpu_to_le32
Use cpu_to_le32 directly as it handles constant folding now, replace direct
uses of __constant_cpu_to_{endian} as well.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-14 22:56:56 -08:00
Herbert Xu ab46d77966 tun: Fix merge error
When forward-porting the tun accounting patch I managed to break
the send path compltely by dropping the tun_get call.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-14 20:46:39 -08:00
David Woodhouse 9af88143b2 iommu: fix Intel IOMMU write-buffer flushing
This is the cause of the DMA faults and disk corruption that people have
been seeing. Some chipsets neglect to report the RWBF "capability" --
the flag which says that we need to flush the chipset write-buffer when
changing the DMA page tables, to ensure that the change is visible to
the IOMMU.

Override that bit on the affected chipsets, and everything is happy
again.

Thanks to Chris and Bhavesh and others for helping to debug.

Should resolve:

  https://bugzilla.redhat.com/show_bug.cgi?id=479996
  http://bugzilla.kernel.org/show_bug.cgi?id=12578

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Tested-and-acked-by: Chris Wright <chrisw@sous-sol.org>
Reviewed-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-14 22:47:09 +01:00
Andrew Victor 2af29b7861 [ARM] 5390/1: AT91: Watchdog fixes
The recently merged AT91SAM9 watchdog driver uses the
AT91SAM9X_WATCHDOG config variable, whereas the original version of
the driver (and the platform support code) used AT91SAM9_WATCHDOG.
This causes the watchdog platform_device to never be registered, and
therefore the driver not to be initialized.

This patch:
- updates the platform support code to use AT91SAM9X_WATCHDOG.
- includes <linux/io.h> to fix compile error (same fix as was applied
to at91rm9200_wdt.c)
- fixes comment regarding watchdog clock-rates in at91rm9200.

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-14 16:01:57 +00:00
Wim Van Sebroeck 12d60e28be [WATCHDOG] iTCO_wdt: fix SMI_EN regression 2
bugzilla: #12363
commit 7cd5b08be3 added a second regression:
some Dell's and Compaq's lockup on boot. So we revert most of the code.
The ICH9 reboot issue remains in place and will need some more fixing... :-(

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2009-02-14 08:49:23 +00:00
Randy Dunlap f5ddcac435 PCI: fix missing kernel-doc and typos
Fix pci kernel-doc parameter missing notation, correct
function name, and fix typo:

Warning(linux-2.6.28-git10//drivers/pci/pci.c:1511): No description found for parameter 'exclusive'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-02-13 12:03:08 -08:00
Randy Dunlap b33bfdef24 PCI: fix struct pci_platform_pm_ops kernel-doc
Fix struct pci_platform_pm_ops kernel-doc notation.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-02-13 12:02:47 -08:00
Randy Dunlap 4cc59c721c PCI: fix rom.c kernel-doc warning
Fix PCI kernel-doc warning:

Warning(linux-2.6.29-rc4-git1/drivers/pci/rom.c:67): No description found for parameter 'pdev'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-02-13 12:01:56 -08:00
Matthew Wilcox 0b49ec37a2 PCI/MSI: fix msi_mask() shift fix
Hidetoshi Seto points out that commit
bffac3c593 has wrong values in the array.
Rather than correct the array, we can just use a bounds check and
perform the calculation specified in the comment.  As a bonus, this will
not run off the end of the array if the device specifies an illegal
value in the MSI capability.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-02-13 11:59:03 -08:00
Luis R. Rodriguez 6d08b9b9c6 ath9k: add udelay() for AR5416 on ath9k_hw_configpcipowersave()
We need the udelay() for all families, including AR5416.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:46:11 -05:00
Luis R. Rodriguez 24c1a280c8 ath9k: add comments for ath9k_hw_configpcipowersave()
This is used for ASPM.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:46:09 -05:00
Reinette Chatre a89d03c423 iwlwifi: fix FAT channel config for 5000 series
The test to find out if we have FAT channels do not consider that
the value of regulatory_bands for the 5000 series is larger than its
eeprom size. Using the eeprom size is strange in itself.

Use a new EEPROM_REGULATORY_BAND_NO_FAT to indicate no FAT support
and test for that explicitly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:46:08 -05:00
Tomas Winkler 24566f4a15 iwlwifi: drop PCIe workaround applicable for development boards
This patch remove w/a used for development boards.
These boards are not available thus no need to keep it inside driver

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:46:06 -05:00
Tomas Winkler 3fdb68de22 iwlwifi: use pci registers defined in pci_regs.h
This patch replaces where possible usage of pci register
defined in the driver by ones defined in pci_regs.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:46:04 -05:00
Johannes Berg 00d3f14cf9 mac80211: use cfg80211s BSS infrastructure
Remove all the code from mac80211 to keep track of BSSes
and use the cfg80211-provided code completely.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:58 -05:00
Johannes Berg 2a51931192 cfg80211/nl80211: scanning (and mac80211 update to use it)
This patch adds basic scan capability to cfg80211/nl80211 and
changes mac80211 to use it. The BSS list that cfg80211 maintains
is made driver-accessible with a private area in each BSS struct,
but mac80211 doesn't yet use it. That's another large project.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:49 -05:00
Johannes Berg a472780100 zd1211rw: honour enable_beacon conf
This makes zd1211rw honour enable_beacon, as well as fixing
a memory leak: the beacon skb is leaked when configuring it
to the hardware fails.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:22 -05:00
Johannes Berg 570a0a7c3b zd1211rw: do not ratelimit no-ops
It is rather confusing to see this in the log:
[  695.606877] __ratelimit: 40 callbacks suppressed
[  700.726878] __ratelimit: 40 callbacks suppressed

without ever seeing any actual message. This is because
zd1211rw doesn't compile out the net_ratelimit() call
properly if debugging is not enabled.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:19 -05:00
Tobias Klauser f733ded107 orinoco: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:14 -05:00
Tobias Klauser 925be8a307 ath5k: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:12 -05:00
Sujith 2660b81a37 ath9k: Remove all the useless ah_ variable prefixes
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:10 -05:00
Sujith f74df6fbe3 ath9k: Cleanup EEPROM operations
This patch removes the various function pointer
assignments and unifies them in a single ops structure.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:08 -05:00
Sujith e153789dc3 ath9k: Add callbacks hooks for EEPROM operations
This is preparatory work for removing the individual
function pointer assignments in eeprom.c

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:07 -05:00
Sujith cbe61d8a41 ath9k: Merge ath_hal and ath_hal_5416 structures
Finally, merge these structures and have a single
HW specific data structure.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:05 -05:00
Sujith ba52da58be ath9k: Remove duplicate variables
A few variables (bssid, bssidmask, curaid) were duplicated in
struct ath_softc and in ath_hal, remove them.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:03 -05:00
Sujith d6bad496c6 ath9k: Move regulatory information to a separate structure
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:45:01 -05:00
Sujith d535a42a21 ath9k: Store HW version information in a separate structure
This patch moves all the HW version/revision specific
information into a separate structure.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:59 -05:00
Sujith 17d7904de8 ath9k: Remove all the sc_ prefixes
This patch removes the useless sc_ prefixes for all variables.
Also, refer to interfaces as VIFs and not as VAPs anymore.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:58 -05:00
Sujith ee6e8d1c23 ath9k: Convert ANI channel to a pointer
This patch converts the ANI channel reference to a pointer,
this facilitates moving struct ar5416AniState to ani.h

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:56 -05:00
Sujith 394cf0a1ca ath9k: Header file cleanup
Split the core header files into manageable pieces.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:54 -05:00
Nick Kossifidis fa8419d08e ath5k: Don't call reset on config_interface
* We call reset too often and this can result various PHY problems.
  On config_interface we don't need to reset the whole device.

  TODO: Create a function hw_fast_reset that only resets the PCU
  (tx/rx stuff) and not the whole device so that we can use this for
  stuck beacons etc.

  Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:52 -05:00
Nick Kossifidis 1e3e6e8fe2 ath5k: Disable BMISS interrupts
* Don't enable BMISS interrupts as we don't handle them yet

 Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:50 -05:00
Nick Kossifidis e8f055f0c3 ath5k: Update reset code
* Update reset and sync with HALs

 * Clean up eeprom settings and tweaking of initvals and
   put them on separate functions

 * Set/Restore 32KHz ref clk operation

 * Add some more documentation

 TODO: Spur mitigation, tpc, half/quarter rate, compression etc

 v2: Address comments from Bob and Felix and fix RSSI threshold bug
 introduced on the first version of the patch

 Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:49 -05:00
Nick Kossifidis a406c13909 ath5k: Update initvals
* Update initvals to match legacy and Sam's HAL

  Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:47 -05:00
Nick Kossifidis 8892e4ec62 ath5k: Update RF Buffer handling
* Use the new way to modify rf buffer and put some rf buffer
   documentation on rfbufer.h

 * Merge all rf regs functions to one

 * Sync with legacy HAL and Sam's HAL

 * Set gain_F settings so that gain_F optimization engine works
   on RF5111/RF5112 (note that both HALs only use step 0 for RF5111
   and they don't use gain_F optimization for this chip, code is
   there but is never used)

  Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:45 -05:00
Nick Kossifidis 6f3b414aca ath5k: Update gain_F calibration code and add documentation
* Update and cleanup rf gain optimization code

 * Add comments and refferences to docs and use sane function names

 * Use only step index on ath5k_gain, no need to have a pointer to
   the current step since we can determine te step from it's index,
   this also allows us to put all other structs on rfgain.h and cleanup
   ath5k.h a little

 * No need for ah_rfgain variable, we use ah_gain.g_state for everything

 * Tested on RF2112B chip but gain_F calibration is not yet done
   (we will finish this on the next patch where we'll rewrite rf-buffer
   handling)

 * Use initial rf gain settings for 2316 and 2317 SoCs introduced on a previous patch

 It seems big but it's mostly cleanup, very few functional changes have been made on phy.c

  Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:43 -05:00
Nick Kossifidis 33a31826b4 ath5k: PHY code cleanup
* Clean up initial rf buffer settings (new file rfbufer.h) and introduce a
   new way to access specific rf registers (will use it later)

 * Clean up initial rf gain settings by moving them on a new file (rfgain.h)
   so we can later work on gain optimization functions

 * Update initial rf buffer settings and initial rf gain settings from HALs.
   This breaks things for now because our current dumps come from pre-configured
   rf buffer (regdumps already had the needed values set from binary HAL).

 Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:42 -05:00
David Kilroy dec59d6faf orinoco: hermes doesn't need to be a separate module
Just compile it into the orinoco module. If we merge USB support, the
module can then be split as appropriate.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:37 -05:00
David Kilroy f90d8d4789 orinoco: hermes_dld does not need to be a module
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:35 -05:00
David Kilroy cb1576a829 orinoco: Move WEXT handlers into a separate file
No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:33 -05:00
David Kilroy 712a4342a0 orinoco: Move hardware functions into separate file
No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:31 -05:00
David Kilroy 5865d015cf orinoco: Add hardware function to set multicast mode
No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:29 -05:00
David Kilroy cfeb1db6db orinoco: Use accessor functions for bitrate tables
... when used by the WEXT ioctl functions. This will allow us to
separate the card specific stuff from the WEXT code.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:27 -05:00
David Kilroy 37a2e566f8 orinoco: Move firmware handling into a separate file
No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:26 -05:00
David Kilroy 4adb474b6b orinoco: Move MIC helpers into new file
No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13 13:44:13 -05:00
Linus Torvalds 37bed90094 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: (32 commits)
  wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface
  net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
  netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform
  bnx2: Update version to 1.9.2 and copyright.
  bnx2: Fix jumbo frames error handling.
  bnx2: Update 5709 firmware.
  bnx2: Update 5706/5708 firmware.
  3c505: do not set pcb->data.raw beyond its size
  Documentation/connector/cn_test.c: don't use gfp_any()
  net: don't use in_atomic() in gfp_any()
  IRDA: cnt is off by 1
  netxen: remove pcie workaround
  sun3: print when lance_open() fails
  qlge: bugfix: Add missing rx buf clean index on early exit.
  qlge: bugfix: Fix RX scaling values.
  qlge: bugfix: Fix TSO breakage.
  qlge: bugfix: Add missing dev_kfree_skb_any() call.
  qlge: bugfix: Add missing put_page() call.
  qlge: bugfix: Fix fatal error recovery hang.
  qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().
  ...
2009-02-12 17:47:15 -08:00
Yang Hongyang 354b45fff9 netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform
When compile the latest kernel on IA64 platform,I got a warning:
drivers/net/netxen/netxen_nic_main.c:203: warning: label ‘set_32_bit_mask’ 
defined but not used

We do not need label ‘set_32_bit_mask’  on IA64 platform,So move it to #else.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:57:12 -08:00
Michael Chan a6952b5299 bnx2: Update version to 1.9.2 and copyright.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:54:48 -08:00
Michael Chan 990ec3804b bnx2: Fix jumbo frames error handling.
If errors are reported on a frame descriptor, we need to
account for the buffer pages that may have been used for this
error packet and recycle them.  Otherwise, we may get the wrong
pages for the next packet.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:54:13 -08:00
Michael Chan 259436a505 bnx2: Update 5709 firmware.
New firmware fixes a data corruption issue when receiving and
placing jumbo frames into host buffers.  In some cases, the
buffer descriptor is not updated correctly and this will lead
to the driver linking the wrong number of pages into the SKB.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:53:48 -08:00
Michael Chan 86f95f9eac bnx2: Update 5706/5708 firmware.
New firmware fixes a data corruption issue when receiving and
placing jumbo frames into host buffers.  In some cases, the
buffer descriptor is not updated correctly and this will lead
to the driver linking the wrong number of pages into the SKB.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:53:22 -08:00
Roel Kluin 501aa061bd 3c505: do not set pcb->data.raw beyond its size
Ensure that we do not set pcb->data.raw beyond its size, print an error message
and return false if we attempt to. A timout message was printed one too early.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:52:31 -08:00
Roel Kluin fb0886745a IRDA: cnt is off by 1
If no prior break occurs, cnt reaches 101 after the loop, so we are still able
to change speed when cnt has become 100.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:42:31 -08:00
Dhananjay Phadke acdb602fb3 netxen: remove pcie workaround
Remove workaround for pcie bug in early revisions of NX3031
(rev 41 or earlier). This is taken care of during firmware init.

The workaround required writing pcie config reg of every
pcie function on a card, not all of which are enabled.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:41:14 -08:00
Roel Kluin cff71e89a8 sun3: print when lance_open() fails
With while (--i > 0) { ... } i reaches 0; print when lance_open() fails

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:40:20 -08:00
Ron Mercer 79d2b29e8a qlge: bugfix: Add missing rx buf clean index on early exit.
The large receive buffer queue is not properly tracking the current
index in the case where an early exit occurs.  This can happen when a
page alloc or dma mapping fails.  If this occurs the queue will get
out of sync and invalid indexes can be written to the hardware.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:38:34 -08:00
Ron Mercer def48b6e32 qlge: bugfix: Fix RX scaling values.
Receive packets were only scaling across 2 of the receive queues. The
value was hardcoded to 2 instead of being based on how many rx queues
were running.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:38:18 -08:00
Ron Mercer 0d979f74a9 qlge: bugfix: Fix TSO breakage.
Moved the buffer mapping to a point after TSO logic has modified the
iph->check field. We were seeing stale data on the PCIe bus.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:38:03 -08:00
Ron Mercer 06a3d510fa qlge: bugfix: Add missing dev_kfree_skb_any() call.
We put the skb back if we can't get mapping for it.  We don't
want unmapped buffers on our receive buffer queue.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:37:48 -08:00
Ron Mercer f2603c2c57 qlge: bugfix: Add missing put_page() call.
We put the page back if we can't get mapping for it.  We don't
want unmapped buffers on our receive buffer queue.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:37:32 -08:00
Ron Mercer 6497b607fb qlge: bugfix: Fix fatal error recovery hang.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:37:13 -08:00
Ron Mercer 7a9deb661f qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().
Replace calls to vlan_hwaccel_rx() and netif_rx().
Thanks to Dave Miller for pointing out the the driver was making
the wrong upcall for passing packets into the stack.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:36:50 -08:00
Roel Kluin d4675b52a9 TG3: limit reaches -1
With while (limit--) { ... } limit reaches -1, so 0 means success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:33:27 -08:00
Linus Torvalds b578f3fcca Merge git://git.infradead.org/users/cbou/battery-2.6.29
* git://git.infradead.org/users/cbou/battery-2.6.29:
  pcf50633_charger: Fix typo
2009-02-11 16:28:08 -08:00
Ian Dall 507e2fbaaa w1: w1 temp calculation overflow fix
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12646

When the temperature exceeds 32767 milli-degrees the temperature overflows
to -32768 millidegrees.  These are bothe well within the -55 - +125 degree
range for the sensor.

Fix overflow in left-shift of a u8.

Signed-off-by: Ian Dall <ian@beware.dropbear.id.au>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:37 -08:00
Paul Clements 4d48a542b4 nbd: fix I/O hang on disconnected nbds
Fix a problem that causes I/O to a disconnected (or partially initialized)
nbd device to hang indefinitely.  To reproduce:

# ioctl NBD_SET_SIZE_BLOCKS /dev/nbd23 514048
# dd if=/dev/nbd23 of=/dev/null bs=4096 count=1

...hangs...

This can also occur when an nbd device loses its nbd-client/server
connection.  Although we clear the queue of any outstanding I/Os after the
client/server connection fails, any additional I/Os that get queued later
will hang.

This bug may also be the problem reported in this bug report:
http://bugzilla.kernel.org/show_bug.cgi?id=12277

Testing would need to be performed to determine if the two issues are the
same.

This problem was introduced by the new request handling thread code ("NBD:
allow nbd to be used locally", 3/2008), which entered into mainline around
2.6.25.

The fix, which is fairly simple, is to restore the check for lo->sock
being NULL in do_nbd_request.  This causes I/O to an uninitialized nbd to
immediately fail with an I/O error, as it did prior to the introduction of
this bug.

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Reported-by: Jon Nelson <jnelson-kernel-bugzilla@jamponi.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: <stable@kernel.org>		[2.6.26.x, 2.6.27.x, 2.6.28.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:37 -08:00
Jiri Slaby 3abdbf90a3 parport: parport_serial, don't bind netmos ibm 0299
Since netmos 9835 with subids 0x1014(IBM):0x0299 is now bound with
serial/8250_pci, because it has no parallel ports and subdevice id isn't
in the expected form, return -ENODEV from probe function.

This is performed in netmos preinit_hook.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:37 -08:00
Roel Kluin c318c7ac49 rtc: t reaches -1, tested 0
With a postfix decrement t will reach -1 rather than 0, so neither the
warning nor the `goto error_out' will occur.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:36 -08:00
Uwe Kleine-Koenig d4097456cd video/framebuffer: move the probe func into .devinit.text in Blackfin LCD driver
Signed-off-by: Uwe Kleine-Koenig <ukleinek@strlen.de>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:35 -08:00
Marcel Selhorst 7dcce1334f tpm: correct email address for tpm_infineon-driver
Update my email address.

Signed-off-by: Marcel Selhorst <m.selhorst@sirrix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:35 -08:00
Andres Salomon 35887b1cf7 gx1fb: properly alloc cmap and plug cmap leak
We weren't properly allocating the cmap for depths greater than 8bpp,
which caused pain for things like DirectFB.  Also, we never freed the cmap
memory upon module unload..

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Marco La Porta <marco-laporta@tiscali.it>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Andres Salomon b14caecdbe gxfb: properly alloc cmap and plug cmap leak
We weren't properly allocating the cmap for depths greater than 8bpp,
which caused pain for things like DirectFB.  Also, we never freed the cmap
memory upon module unload..

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Marco La Porta <marco-laporta@tiscali.it>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Marco La Porta 067f1293cc lxfb: properly alloc cmap in all cases and don't leak the memory
We weren't properly allocating the cmap for depths greater than 8bpp,
which caused pain for things like DirectFB.  Also, we never freed the cmap
memory upon module unload..

[dilinger@debian.org: dropped unnecessary code and clean up patch]
[dilinger@debian.org: add error checking and handling]
Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Robert Jarzmik 57f63bc8fe rtc: update maintainership of pxa rtc driver
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-11 14:25:34 -08:00
Hannes Hering 51621fbdb1 ehea: Fix: Remove adapter from adapter list in error path
Remove adapter from adapter list before freeing data structure in
error path.

Signed-off-by: Hannes Hering <hering2@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-11 13:47:57 -08:00
David Kilroy fb791b1cfb orinoco: Move scan helpers to a separate file
No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:28 -05:00
David Kilroy aea48b1529 orinoco: use orinoco_private instead of net_device in scan helper
This makes the interface to the scan helpers consistent, so we can split
them out.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:27 -05:00
David Kilroy 47445cb950 orinoco: Rename orinoco.c
So that we can split up the file and still produce a module named
orinoco.o.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:27 -05:00
David Kilroy 2131266d6e orinoco: Fix interesting checkpatch errors
ERROR: "foo * bar" should be "foo *bar"
ERROR: do not initialise statics to 0 or NULL
WARNING: printk() should include KERN_ facility level
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:27 -05:00
David Kilroy b2f30a0a23 orinoco: keep line length below 80 characters
Remove most checkpatch warnings of the type
WARNING: line over 80 characters

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:26 -05:00
David Kilroy 566f2d9eac orinoco: remove unnecessary braces
Remove the following checkpatch warnings

WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:26 -05:00
David Kilroy a94e8427c8 orinoco: spaces in parenthesised expressions
Remove checkpatch warnings of the following type:

ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that '!' (ctx:BxW)
ERROR: space required before the open parenthesis '('
ERROR: space required before the open brace '{'

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:26 -05:00
David Kilroy 6fe9deb174 orinoco: address leading and trailing whitespace
Remove the following checkpatch errors from orinoco.c

ERROR: trailing whitespace
ERROR: code indent should use tabs where possible
WARNING: suspect code indent for conditional statements

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:25 -05:00
Michael Buesch ce1a9ee33a b43: Add parts of LP-PHY TX power control
This adds the initial parts of the LP-PHY TX power control.
This also adds helper functions for bulk access of LP tables.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:23 -05:00
Sujith 029bc43270 ath9k: Add retry counters to rate control debug file
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:22 -05:00
Sujith d42c6b71a8 ath9k: Handle mac80211's FIF_CONTROL flag properly
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:22 -05:00
Sujith 254ad0ff93 ath9k: Remove all the redundant internal buffer types
Use mac80211's primitives for identifying the frame type,
and cleanup the driver-specific macros.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:22 -05:00
Sujith 141b38b6bc ath9k: Lock mac80211 callbacks with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:44:21 -05:00
Reinette Chatre 89c581b3fb iwlwifi: fix suspend/resume and its usage of pci saved state
Here we do two things:

First, revert "iwlwifi: save PCI state before suspend, restore after
resume".  That misguided patch led to being unable to use iwlwifi
devices after resume.

Next, indicate to PCI driver that the saved PCI state is valid during suspend.

We restore PCI state and enable the device when network interface is created,
similarly PCI state is saved and the device is disabled when network interface
is removed. Thus, when .suspend is called the PCI state is saved and device
is disabled. This is the case even if an interface is never created as PCI
state is saved and device disabled during .probe.

PCI driver assumes PCI state is saved in .suspend. Saving the state at this
time will save state of disabled device and thus cause problems during
resume (resuming a disabled device). We thus indicate directly to PCI
driver that current PCI saved state is valid.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Alex Riesen <fork0@users.sf.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:27:21 -05:00
Hin-Tak Leung efb43f4b2c zd1211rw: treat MAXIM_NEW_RF(0x08) as UW2453_RF(0x09) for TP-Link WN322/422G
Three people (Petr Mensik <pihhan@cipis.net>
["si" should be U+0161 U+00ED], Stephen Ho <stephenhoinhk@gmail.com>
on zd1211-devs and Ismael Ojeda Perez <iojedaperez@gmail.com>
on linux-wireless) reported success in getting TP-Link WN322G/WN422G
working by treating MAXIM_NEW_RF(0x08) as UW2453_RF(0x09) for rf
chip hardware initialization.

Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Tested-by: Petr Mensik <pihhan@cipis.net>
Tested-by: Stephen Ho <stephenhoinhk@gmail.com>
Tested-by: Ismael Ojeda Perez <iojedaperez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:27:19 -05:00
Hin-Tak Leung 14990c69b5 zd1211rw: adding 0ace:0xa211 as a ZD1211 device
Christoph Biedl <sourceforge.bnwi@manchmal.in-ulm.de> reported success
in the sourceforge zd1211 mailing list on this addition. This product ID
was supported by the vendor driver ZD1211LnxDrv 2.22.0.0 (and possibly
earlier) and it probably should have been added earlier.

Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Tested-by: Christoph Biedl <sourceforge.bnwi@manchmal.in-ulm.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:27:19 -05:00
Bob Copeland fcf6b1bca8 ath5k: fix bf->skb==NULL panic in ath5k_tasklet_rx
Under memory pressure, we may not be able to allocate a new skb for
new packets.  If the allocation fails, ath5k_tasklet_rx will exit but
will leave a buffer in the list with a NULL skb, eventually triggering
a BUG_ON.

Extract the skb allocation from ath5k_rxbuf_setup() and change the
tasklet to allocate the next skb before accepting a packet.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11 11:27:16 -05:00
Linus Torvalds 9ce04f9238 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ptrace, x86: fix the usage of ptrace_fork()
  i8327: fix outb() parameter order
  x86: fix math_emu register frame access
  x86: math_emu info cleanup
  x86: include correct %gs in a.out core dump
  x86, vmi: put a missing paravirt_release_pmd in pgd_dtor
  x86: find nr_irqs_gsi with mp_ioapic_routing
  x86: add clflush before monitor for Intel 7400 series
  x86: disable intel_iommu support by default
  x86: don't apply __supported_pte_mask to non-present ptes
  x86: fix grammar in user-visible BIOS warning
  x86/Kconfig.cpu: make Kconfig help readable in the console
  x86, 64-bit: print DMI info in the oops trace
2009-02-11 08:23:22 -08:00
Stefan Weinhuber 48cae885d5 [S390] dasd: fix race in dasd timer handling
In dasd_device_set_timer and dasd_block_set_timer we interpret the
return value of mod_timer in a wrong way. If the timer expires in
the small window between our check of timer_pending and the call to
mod_timer, then the timer will be set, mod_timer returns zero and
we will call add_timer for a timer that is already pending.
As del_timer and mod_timer do all the necessary checking themselves,
we can simplify our code and remove the race a the same time.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-02-11 10:37:40 +01:00
Cornelia Huck ca0b4b7d2c [S390] dasd: bus_id -> dev_name() conversion.
bus_id usage crept in again; fix it.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2009-02-11 10:37:40 +01:00
Meelis Roos 7b7a799d66 sunhme: Fix Quattro HME irq registration on proble failures
Currently, the sunhme driver installs SBus Quattro interrupt handler 
when at least one HME card was initialized correctly and at least one 
Quattro card is present. This breaks when a Quattro card fails 
initialization for whatever reason - IRQ is registered and OOPS happens 
when it fires.

The solution, as suggested by David Miller, was to keep track which 
cards of the Quattro bundles have been initialized, and request/free the 
Quattro IRQ only when all four devices have been successfully 
initialized.

The patch only touches SBus initialization - PCI init already resets the 
card pointer to NULL on init failure.

The patch has been tested on Sun E3500 with SBus and PCI single HME 
cards and one PCI Quattro HME card in a situation where any PCI card 
failed init when the SBus routines tried to init them by mistake.

Additionally it replaces Quattro request_irq panic with error return - 
if this card fails to work, at least let the others work.

Tested on E450 with PCI HME and PCI Quad HME.

[ Minor coding style fixups -DaveM ]

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 17:29:42 -08:00
Breno Leitão 367681f4ec ixgbe: Removing the unused PAGE_USE_COUNT() macro.
Removing the unused PAGE_USE_COUNT() macro. Also removing the unused
pages variable at ixgbe_configure_rx() function.

Signed-off-by: Breno Leitão <leitao@linux.vnet.ibm.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 17:24:48 -08:00
Meelis Roos fcffd0d8bb fore200: fix oops on failed firmware load
Fore 200 ATM driver fails to handle request_firmware failures and oopses 
when no firmware file was found. Fix it by checking for the right return 
values and propaganting the return value up.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 17:19:19 -08:00
Paulius Zaleckas 664f93b48a mdio-gpio: Add mdc pin direction initialization
mdc pin should always be output. Initialize it as output,
so each board code does not need to do this.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 17:11:10 -08:00
dave graham c9523379d6 e1000e: Serdes - attempt autoneg when link restored.
This patch addresses an issue where we did not restart auto-negotiation on
serdes links when the link partner was disabled and re-enabled. It includes
reworking the serdes link detect mechanism to be a state machine for
82571 and 82572 parts only.

Signed-off-by: dave graham <david.graham@intel.com>
Acked-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>
2009-02-10 17:00:28 -08:00
dave graham 573cca8c6f e1000e: remove RXSEQ link monitoring for serdes
RXSEQ interrupts were used to force link state interrogation of serdes
links, as the Si was not guaranteed to report LSC interrupts when the
link changed state. On some bladeservers this resulted in false link up
reports if no link partner was connected. The RXSEQ treatment is
not necessary, as the link can be monitored from the watchdog timer, and
the false link indications cease.

Signed-off-by: dave graham <david.graham@intel.com>
Acked-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>
2009-02-10 17:00:28 -08:00
dave graham 5df3f0eaf8 e1000e: Disable dynamic clock gating for 82571 per si errata.
82571 and 82572 Errata #13 documents that the Si feature DMA Dynamic
Clock Gating should be disabled, and identifies the workaround of
disabling the feature by EEPROM setting. EEPROM versions that do not
include the recommended workaround have been found in the field, and so
some customers remain at risk. Because the feature DMA Dynamic clock
Gating can be disabled by directly setting the appropriate bit in the
E1000_CTRL_EXT register, this patch overrides the EEPROM setting, and
force-disables the feature.

Signed-off-by: dave graham <david.graham@intel.com>
Acked-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>
2009-02-10 17:00:27 -08:00
Jesse Brandeburg 111b9dc5c9 e1000e: add aer support
most if not all of the devices supported by e1000e support
AER (Advanced Error Reporting) so we attempt to register
with the OS that we know how to reset ourselves after
a fatal error.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 17:00:27 -08:00
Linus Torvalds 29ef01179d 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: (23 commits)
  bridge: Fix LRO crash with tun
  IPv6: fix to set device name when new IPv6 over IPv6 tunnel device is created.
  gianfar: Fix boot hangs while bringing up gianfar ethernet
  netfilter: xt_sctp: sctp chunk mapping doesn't work
  netfilter: ctnetlink: fix echo if not subscribed to any multicast group
  netfilter: ctnetlink: allow changing NAT sequence adjustment in creation
  netfilter: nf_conntrack_ipv6: don't track ICMPv6 negotiation message
  netfilter: fix tuple inversion for Node information request
  netxen: fix msi-x interrupt handling
  de2104x: force correct order when writing to rx ring
  tun: Fix unicast filter overflow
  drivers/isdn: introduce missing kfree
  drivers/atm: introduce missing kfree
  sunhme: Don't match PCI devices in SBUS probe.
  9p: fix endian issues [attempt 3]
  net_dma: call dmaengine_get only if NET_DMA enabled
  3c509: Fix resume from hibernation for PnP mode.
  sungem: Soft lockup in sungem on Netra AC200 when switching interface up
  RxRPC: Fix a potential NULL dereference
  r8169: Don't update statistics counters when interface is down
  ...
2009-02-10 11:48:11 -08:00
Andrew Vasquez 822c05b633 [SCSI] qla2xxx: Update version number to 8.03.00-k3.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:20 -05:00
Andrew Vasquez 9088608e00 [SCSI] qla2xxx: Mask out 'reserved' bits while processing FLT regions.
Bits 31-8 are marked as reserved and should be ignored while
interpreting a region's code.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:20 -05:00
Anirban Chakraborty cf5a163127 [SCSI] qla2xxx: Correct slab-error overwrite during vport creation and deletion.
The clearing of a vha's req_ques were overrunning during vport
creation.  During deletion, vport queues should be torn-down
after all cleanup has occurred.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:20 -05:00
Andrew Vasquez 8a659571ec [SCSI] qla2xxx: Properly acknowledge IDC notification messages.
To ensure smooth operations amongst the FCoE and NIC side
components of the ISP81xx chip, the FCoE driver (qla2xxx) must
ensure the 10gb NIC driver (qlge) does not timeout waiting for
IDC (Inter-Driver Communication) acknowledgments.  The
acknowledgment requirements are trivial -- a simple mirroring of
incoming mailbox registers during the AEN to a process-context
capable mailbox command.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:20 -05:00
Anirban Chakraborty 618a752319 [SCSI] qla2xxx: Remove interrupt request bit check in the response processing path in multiq mode.
Correct response-queue-0 processing by instructing the firmware
to run with interrupt-handshaking disabled, similarly to what is
now done for all non-0 response queues.  Since all
response-queues now run in the same mode, the driver no longer
needs the hot-path 'is-disabled-HCCR' test.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:19 -05:00
Julia Lawall e916141c68 [SCSI] lpfc: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:19 -05:00
Mike Christie 308cec14e6 [SCSI] libiscsi: Fix scsi command timeout oops in iscsi_eh_timed_out
Yanling Qi from LSI found the root cause of the panic, below is his
analysis:

Problem description: the open iscsi driver installs eh_timed_out handler
to the
blank_transport_template of the scsi middle level that causes panic of
timed
out command of other host

Here are the details

Iscsi Session creation

During iscsi session creation time, the iscsi_tcp_session_create() of
iscsi_tpc.c will create a scsi-host for the session. See the statement
marked
with the label A. The statement B replaces the shost->transportt point
with a
local struct variable.

static struct iscsi_cls_session *
iscsi_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,
                         uint16_t qdepth, uint32_t initial_cmdsn,
                         uint32_t *hostno)
{
        struct iscsi_cls_session *cls_session;
        struct iscsi_session *session;
        struct Scsi_Host *shost;
        int cmd_i;
        if (ep) {
                printk(KERN_ERR "iscsi_tcp: invalid ep %p.\n", ep);
                return NULL;
        }

A        shost = iscsi_host_alloc(&iscsi_sht, 0, qdepth);

        if (!shost)

                return NULL;

B         shost->transportt = iscsi_tcp_scsi_transport;

        shost->max_lun = iscsi_max_lun;

Please note the scsi host is allocated by invoking isccsi_host_alloc()
in
libiscsi.c

Polluting the middle level blank_transport_template in
iscsi_host_alloc() of
libiscsi.c

The iscsi_host_alloc() invokes the middle level function
scsi_host_alloc() in
hosts.c for allocating a scsi_host. Then the statement marked with C
assigns
the iscsi_eh_cmd_timed_out handler to the eh_timed_out callback
function.

struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,

                                   int dd_data_size, uint16_t qdepth)

{
        struct Scsi_Host *shost;
        struct iscsi_host *ihost;
        shost = scsi_host_alloc(sht, sizeof(struct iscsi_host) +
dd_data_size);
        if (!shost)
                return NULL;

 C      shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out;

Please note the shost->transport is the middle level
blank_transport_template
as shown in the code segment below. We see two problems here. 1.
iscsi_eh_cmd_timed_out is installed to the blank_transport_template that
will
cause some body else problem. 2. iscsi_eh_cmd_timed_out will never be
invoked
when iscsi command gets timeout because the statement B resets the
pointer.

Middle level blank_transport_template

In the middle level function scsi_host_alloc() of hosts.c, the middle
level
assigns a blank_transport_template for those hosts not implementing its
transport layer. All HBAs without supporting a specific scsi_transport
will
share the middle level blank_transport_template. Please see the
statement D

struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int
privsize)

{
        struct Scsi_Host *shost;
        gfp_t gfp_mask = GFP_KERNEL;
        int rval;
        if (sht->unchecked_isa_dma && privsize)
                gfp_mask |= __GFP_DMA;

         shost = kzalloc(sizeof(struct Scsi_Host) + privsize, gfp_mask);
        if (!shost)
                return NULL;

        shost->host_lock = &shost->default_lock;

        spin_lock_init(shost->host_lock);

        shost->shost_state = SHOST_CREATED;

        INIT_LIST_HEAD(&shost->__devices);

        INIT_LIST_HEAD(&shost->__targets);

        INIT_LIST_HEAD(&shost->eh_cmd_q);

        INIT_LIST_HEAD(&shost->starved_list);

        init_waitqueue_head(&shost->host_wait);

        mutex_init(&shost->scan_mutex);

        shost->host_no = scsi_host_next_hn++; /* XXX(hch): still racy */

        shost->dma_channel = 0xff;

        /* These three are default values which can be overridden */

        shost->max_channel = 0;

        shost->max_id = 8;

        shost->max_lun = 8;

        /* Give each shost a default transportt */

 D       shost->transportt = &blank_transport_template;

Why we see panic at iscsi_eh_cmd_timed_out()

The mpp virtual HBA doesn’t have a specific scsi_transport. Therefore,
the
blank_transport_template will be assigned to the virtual host of the MPP
virtual HBA by SCSI middle level. Please note that the statement C has
assigned
iscsi-transport eh_timedout handler to the blank_transport_template.
When a mpp
virtual command gets timedout, the iscsi_eh_cmd_timed_out() will be
invoked to
handle mpp virtual command timeout from the middle level
scsi_times_out()
function of the scsi_error.c.

enum blk_eh_timer_return scsi_times_out(struct request *req)

{

        struct scsi_cmnd *scmd = req->special;

        enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);

        enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED;

        scsi_log_completion(scmd, TIMEOUT_ERROR);

        if (scmd->device->host->transportt->eh_timed_out)

 E               eh_timed_out =
scmd->device->host->transportt->eh_timed_out;

        else if (scmd->device->host->hostt->eh_timed_out)

                eh_timed_out = scmd->device->host->hostt->eh_timed_out;

        else

                eh_timed_out = NULL;

        if (eh_timed_out) {

                rtn = eh_timed_out(scmd);

It is very easy to understand why we get panic in the
iscsi_eh_cmd_timed_out().
A scsi_cmnd from a no-iscsi device definitely can not resolve out a
session and
session->lock. The panic can be happed anywhere during the differencing.

static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd
*scmd)

{

        struct iscsi_cls_session *cls_session;

        struct iscsi_session *session;

        struct iscsi_conn *conn;

        enum blk_eh_timer_return rc = BLK_EH_NOT_HANDLED;

        cls_session = starget_to_session(scsi_target(scmd->device));

        session = cls_session->dd_data;

        debug_scsi("scsi cmd %p timedout\n", scmd);

        spin_lock(&session->lock);

This patch fixes the problem by moving the setting of the
iscsi_eh_cmd_timed_out to iscsi_add_host, which is after the LLDs
have set their transport template to shost->transportt.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:19 -05:00
Shyam_Iyer@Dell.com 7f977ddd0e [SCSI] qla2xxx: fix Kernel Panic with Qlogic 2472 Card.
Kernel Panic is observed with a Qlogic 2472 Card is plugged into the
system and the qla2xxx driver is loaded:

QLogic Fibre Channel HBA Driver: 8.02.01.02.11.0-k9
vendor=8086 device=3410
qla2xxx 0000:05:00.0: PCI INT A -> GSI 40 (level, low) -> IRQ 40
qla2xxx 0000:05:00.0: Found an ISP2432, irq 40, iobase
0xffffc2001091c000
qla2xxx 0000:05:00.0: Configuring PCI space...
qla2xxx 0000:05:00.0: setting latency timer to 64
qla2xxx 0000:05:00.0: Configure NVRAM parameters...
BUG: unable to handle kernel NULL pointer dereference at
0000000000000000
IP: [<ffffffff8036319a>] strncpy+0x5/0x1e
PGD 7c564067 PUD 78d8c067 PMD 0
Oops: 0000 [1] SMP
last sysfs file:
/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-2/6-2:1.1/input/input4/event
4/dev
CPU 1
Modules linked in: qla2xxx(+) squashfs usb_storage scsi_transport_fc
scsi_tgt parport_pc parport arc4 ecb crypto_blkcipher acpi_cpufreq fan
loop nfs nfs_acl lockd sunrpc nls_iso8859_1 nls_cp437 ipv6 af_packet st
sr_mod ide_disk ide_cd_mod ide_core cdrom usbhid hid ff_memless sg
sd_mod crc_t10dif uhci_hcd mptsas mptscsih ehci_hcd mptbase
scsi_transport_sas rtc_cmos rtc_core rtc_lib usbcore scsi_mod thermal
bnx2 button processor thermal_sys hwmon edd
Supported: Yes
Pid: 4415, comm: insmod Not tainted 2.6.27.13-1-default #1
RIP: 0010:[<ffffffff8036319a>] [<ffffffff8036319a>] strncpy+0x5/0x1e
RSP: 0018:ffff88007b04fbc0 EFLAGS: 00010202
RAX: 00000000000000b7 RBX: ffff88007b9641e0 RCX: ffff88007c1b2ad7
RDX: 000000000000004f RSI: 0000000000000000 RDI: ffff88007c1b2ad7
RBP: ffff88007c1b0620 R08: 0000000000000010 R09: 0000000100000000
R10: 0000000000000046 R11: ffffffff803651c6 R12: ffff88007b074000
R13: ffff88007b964000 R14: ffff88007c1b2ac6 R15: 0000000000000000
FS: 00007f91a6c366f0(0000) GS:ffff88007dbeee40(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007bd7c000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process insmod (pid: 4415, threadinfo ffff88007b04e000, task
ffff880078586180)
Stack: ffffffffa02d82c4 0000000000002432 ffff88007d385000
ffff88007c1b0620
ffff88007c1b0620 ffff88007c1b0000 ffff88007d385000 0000000000002432
ffffffffa02dcb1e 0000000000002432 ffffc2001091c000 ffff88007c1b0620
Call Trace:
[<ffffffffa02d82c4>] qla24xx_nvram_config+0x385/0x6c2 [qla2xxx]
[<ffffffffa02dcb1e>] qla2x00_initialize_adapter+0x169/0x383 [qla2xxx]
[<ffffffffa02f2040>] qla2x00_probe_one+0x6bc/0x9c6 [qla2xxx]
[<ffffffff8037346f>] pci_device_probe+0xb8/0x105
[<ffffffff803e5a27>] really_probe+0xdd/0x1e5
[<ffffffff803e5c14>] __driver_attach+0x46/0x6d
[<ffffffff803e51e1>] bus_for_each_dev+0x44/0x78
[<ffffffff803e4ac7>] bus_add_driver+0xef/0x235
[<ffffffff803e5dd8>] driver_register+0xa2/0x11f
[<ffffffff803736fd>] __pci_register_driver+0x5d/0x90
[<ffffffffa0308126>] qla2x00_module_init+0x126/0x159 [qla2xxx]
[<ffffffff80209041>] _stext+0x41/0x110
[<ffffffff80260abd>] sys_init_module+0xa0/0x1ba
[<ffffffff8020bfbb>] system_call_fastpath+0x16/0x1b
[<00007f91a679b76a>] 0x7f91a679b76a
Code: ff c1 41 39 c0 75 05 45 85 c0 75 bf 41 29 c0 44 89 c0 c3 31 d2 8a
04 16 88 04 17 48 ff c2 84 c0 75 f3 48 89 f8 c3 48 89 f9 eb 10 <8a> 06
3c 01 88 01 48 83 de ff 48 ff c1 48 ff ca 48 85 d2 75 eb
RIP [<ffffffff8036319a>] strncpy+0x5/0x1e
RSP <ffff88007b04fbc0>
CR2: 0000000000000000
---[ end trace 829d7d78dfafb785 ]---

The attached patch fixes the issue.

Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Acked-by: Seokmann Ju <Seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:18 -05:00
Brian King 14ae6faca1 [SCSI] ibmvfc: Increase cancel timeout
During cancel testing it has been shown that 15 seconds is not
nearly long enough for the VIOS to respond to a cancel under
loaded situations. Increasing this timeout to 60 seconds allows
time for the VIOS to cancel the outstanding commands and prevents
us from escalating to a full host reset, which can take much longer.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:18 -05:00
Brian King 0883e3b3a8 [SCSI] ibmvfc: Fix rport relogin
The ibmvfc driver has a bug in its SCN handling. If it receives
an ELS event such asn an N-Port SCN event or an unsolicited PLOGI,
or any other SCN event which causes ibmvfc_reinit_host to be called,
it is possible that we will call fc_remote_port_add for a target
that already has an rport added, which can result in duplicate
rports getting created for the same targets. Fix this by calling
fc_remote_port_rolechg in this scenario instead to report any possible
role change that may have occurred.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:18 -05:00
Brian King d4b17a20f3 [SCSI] ibmvfc: Fix command timeout errors
Currently the ibmvfc driver sets the IBMVFC_CLASS_3_ERR flag
in the VFC Frame if both the adapter and the device claim support
for Class 3. However, this bit actually refers to Class 3 Error
Recovery, which is currently not supported by the VIOS. Setting this
bit can cause lots of command timeout responses from the VIOS resulting
in general instability. Fix this by never setting this bit.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:17 -05:00
Martin Peschke 76e3a19d06 [SCSI] sg: fix device number in blktrace data
Hi,

we have run into an issue with blktrace being started for sg devices.
Please apply.

Thanks,
Martin

From: Martin Peschke <mpeschke@linux.vnet.ibm.com>

The device number denoting a generic SCSI devices (sg) in a blktrace
trace is broken; major and minor are always 0. It looks like
sdp->device->sdev_gendev.devt is not initialized properly.
The fix below uses other data to make up a valid device number,
similar to the way an sg device number is generated for sysfs output.

Reported-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:17 -05:00
James Smart c2f9e49f9b [SCSI] scsi_scan: add missing interim SDEV_DEL state if slave_alloc fails
We were running i/o and performing a bunch of hba resets in a loop.
This forces a lot of target removes and then rescans. Since the
resets are occuring during scan it's causing the scan i/o to timeout,
invoking error recovery, etc.  We end up getting some nasty crashing
in scsi_scan.c due to references to old sdevs that are failing
but had some lingering references that kept them around.

Fix by setting device state to SDEV_DEL if the LLD's slave_alloc
fails.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:17 -05:00
Robert Jennings e637d55319 [SCSI] ibmvscsi: Correct DMA mapping leak
The ibmvscsi client driver is not unmapping the SCSI command after
encountering a DMA mapping error while trying to map an indirect
scattergather list for the event pool.  This leads to a leak of DMA
entitlement that could result in the device failing future DMA operations
in a CMO environment.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-02-10 11:15:17 -05:00
David S. Miller e4e90b210d irda: Use __netdev_alloc_skb() instead of __dev_alloc_skb().
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 01:56:49 -08:00
David S. Miller 9034f77bad netdev: Use __netdev_alloc_skb() instead of __dev_alloc_skb().
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 01:56:45 -08:00
David S. Miller 4b53b361e0 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-02-09 23:30:44 -08:00
Scott Feldman 4cdc44a231 enic: Add api for link down count and to get firmware notification status.
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09 23:25:33 -08:00
Scott Feldman 68f717089a enic: bug fix: tx_timeout reset path fix-ups
tx_timeout reset path needs to re-init dev and re-apply nic cfg to
enable vlan stripping.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09 23:24:24 -08:00
Scott Feldman bd9fb1a44a enic: record all bad FCS errs as frame errors
Report all bad FCS errs as frames errs.  This includes frames with bad
FCS on wire detected by MAC and frames which may be truncated due to
ingress FIFO overruns.  No longer print a driver msg on bad FCS err.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09 23:24:08 -08:00
Scott Feldman ed8af6b288 enic: bug fix: return notify intr credits
Return notify intr credits after notify intr from firmware.  This is
especially important for legacy PCI intr mode, where not returning
credits would cause PBA to remain asserted which would get us right
back into the ISR.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09 23:23:50 -08:00
David S. Miller 0ecc103aec Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/gianfar.c
2009-02-09 23:22:21 -08:00
Alexey Dobriyan 0012985d18 ppp: section fixes re netns
PPP is modular code so no initdata on netns hooks.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09 18:05:16 -08:00
Jarek Poplawski 8707bdd48a gianfar: Fix boot hangs while bringing up gianfar ethernet
Ira Snyder found that commit 8c7396aebb
"gianfar: Merge Tx and Rx interrupt for scheduling clean up ring" can
cause hangs. It's because there was removed clearing of interrupts in
gfar_schedule_cleanup() (which is called by an interrupt handler) in
case when netif scheduling has been disabled. This patch brings back
this action and a comment.

Reported-by: Ira Snyder <iws@ovro.caltech.edu>
Reported-by: Peter Korsgaard <jacmet@sunsite.dk>
Bisected-by: Ira Snyder <iws@ovro.caltech.edu>
Tested-by: Peter Korsgaard <jacmet@sunsite.dk>
Tested-by: Ira Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09 14:59:30 -08:00
Linus Torvalds d006b2b620 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: Storage: Update unusual_devs entry for Datafab KECF-USB
  USB: Correct Makefile to make isp1760 buildable
  USB: option: New mobile broadband modems to be supported
  USB: two more usb ids for ti_usb_3410_5052
  USB: ftdi_sio: unlock_kernel() on error in set_serial_info()
  USB: usb-storage: add Pentax to the bad-vendor list
  USB: ftdi_sio: add support for the NDI Polaris system
  USB: usb-serial: fix the aircable_init failure path
  USB: usb-storage: remove WARN from last-sector hacks
  Revert USB: option: add Pantech cards
  USB: cdc-acm.c: remove duplicate lines for MTK gps support
  USB: fsl_qe_udc: Fix stalled TX requests bug
  USB: fsl_qe_udc: Fix muram corruption by disabled endpoints
  USB: fsl_qe_udc: Fix disconnects reporting during bus reset
  USB: fsl_qe_udc: Fix QE USB controller initialization
  USB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus()
  USB: fsl_qe_udc: Fix oops on QE UDC probe failure
2009-02-09 13:59:51 -08:00
Linus Torvalds 7d1676629e Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: panel: fix lcd panel driver build failure
  Staging: android: fix up units in timed_gpio
  Staging: android: ram_console: Disable ECC when early init is enabled and validate buffer size
  Staging: at76_usb: Add support for OQO Model 01+
  Staging: at76_usb: fix bugs introduced by "Staging: at76_usb: cleanup dma on stack issues"
  Revert Staging: at76_usb: update drivers/staging/at76_usb w/ mac80211 port
2009-02-09 13:58:40 -08:00