1
0
Fork 0
Commit Graph

37662 Commits (d9d5dcc88ca5c72237e2d09d23a13a9b9d1e7445)

Author SHA1 Message Date
Christian Borntraeger d9d5dcc88c virtio_net: Fix oops on early interrupts - introduced by virtio reset code
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:55:04 -05:00
Grant Grundler 7a7d23dac2 uli526x partially recognizing interface
Patch fixes:
    http://bugzilla.kernel.org/show_bug.cgi?id=5839

Init sequence needs to poll phy until phy reset is complete. This is the
same problem that I fixed in 2002 in tulip driver.

Thanks to manty@manty.net for testing this patch.
Thanks to Pozsar Balazs <pozsy@uhulinux.hu> for posting/testing
a similar patch before:
    http://lkml.org/lkml/2006/8/21/45

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:55:03 -05:00
Andy Gospodarek 6cb5e57701 igb: fix legacy mode irq issue
I booted an igb kernel with the option pci=nomsi and instantly noticed
that interrupts no longer worked on my igb device.  I took a look at the
interrupt initialization and quickly discovered a comment stating:

"DO NOT USE EIAME or IAME in legacy mode"

It seemed a bit odd that bits to enable IAM were being set in legacy
interrupt mode, so I dropped out the following parts and interrupts
began working fine again.

[Updated code flow and a nitpick spelling error --Auke]

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:55:01 -05:00
Scott Wood 5bd3670f31 fs_enet: Don't call phy_mii_ioctl() in atomic context.
The lock acquisition in fs_ioctl() does not appear to actually be necessary,
and thus is simply removed.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:55:00 -05:00
Thomas Klein 21eee2dd1b ehea: add kdump support
This patch adds kdump support to the ehea driver. As the firmware doesn't free
resource handles automatically, the driver has to run an as simple as possible
free resource function in case of a crash shutdown. The function iterates over
two arrays freeing all resource handles which are stored there. The arrays are
kept up-to-date during normal runtime. The crash handler fn is triggered by the
recently introduced PPC crash shutdown reg/unreg functions.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:54:59 -05:00
David S. Miller 8d3c202be2 Merge branch 'master' of ../linux-2.6/ 2008-02-23 20:38:20 -08:00
Mirco Tischler 038eb0ea04 Fix u132-hcd.c compile error
This fixes the following compile error caused by commit
3a2d5b7001 ("PM: Introduce
PM_EVENT_HIBERNATE callback state")

    CC [M]  drivers/usb/host/u132-hcd.o
  drivers/usb/host/u132-hcd.c: In function ‘u132_suspend’:
  drivers/usb/host/u132-hcd.c:3224: error: expected expression before ‘int’
  drivers/usb/host/u132-hcd.c:3225: error: ‘ports’ undeclared (first use in this function)
  ...

Signed-off-by: Mirco Tischler <mt-ml@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 20:29:09 -08:00
Stephen Hemminger 759afc3133 tg3: ethtool phys_id default
When asked to blink LEDs the tg3 driver behaves when using:
	ethtool -p ethX
The default value for data is zero, and other drivers interpret this
as blink forever (or at least a really long time).  The tg3 driver
interprets this as blink once.  All drivers should have the same
behaviour.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-23 19:51:59 -08:00
Michael Chan c73b1d1f26 [BNX2]: Update version to 1.7.4.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-23 19:49:48 -08:00
Oliver Pinter 42e6de0e60 fix vmsas.c file permissions
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 19:49:34 -08:00
Michael Chan 38ea3686f6 [BNX2]: Disable parallel detect on an HP blade.
Because of some board issues, we need to disable parallel detect on
an HP blade.  Without this patch, the link state can become stuck
when it goes into parallel detect mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-23 19:48:57 -08:00
Michael Chan a2724e2559 [BNX2]: More 5706S link down workaround.
The previous patches to workaround the 5706S on an HP blade were not
sufficient.  The link state still does not change properly in some
cases.  This patch adds polling to make it completely reliable.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-23 19:47:44 -08:00
Jeff Garzik 0a3716eb04 mvsas: fix build warning, clean prototypes
- Fix build 'make randconfig' build warning spotted by Toralf Foerster:

drivers/scsi/mvsas.c: In function 'mvs_hexdump':
drivers/scsi/mvsas.c:715: error: implicit declaration of function 'isalnum'

- Remove unneeded prototypes (spotted by hch)

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:52:36 -08:00
Jean Delvare 43fe105a5c dmi: prevent linked list corruption
Adding the same item to a given linked list more than once is guaranteed
to break and corrupt the list.  This is however what we do in dmi_scan
since commit 79da472111 ("x86: fix DMI out
of memory problems").

Given that there is absolutely no interest in saving empty OEM strings
anyway, I propose the simple and efficient fix below: we discard the empty
OEM strings altogether.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Parag Warudkar <parag.warudkar@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
Sergio Luis 79306a340c drivers/video/uvesafb.c: fix section mismatch warning in param_set_scroll()
Fix following warnings:
WARNING: drivers/video/built-in.o(.text+0x7c64a): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/video/built-in.o(.text+0x7c65d): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/video/built-in.o(.text+0x7c679): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/video/built-in.o(.text+0x7c699): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/video/built-in.o(.text+0x7c69f): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/built-in.o(.text+0xa3676): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/built-in.o(.text+0xa3689): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/built-in.o(.text+0xa36a5): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/built-in.o(.text+0xa36c5): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: drivers/built-in.o(.text+0xa36cb): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: vmlinux.o(.text+0x4a079a): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: vmlinux.o(.text+0x4a07ad): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: vmlinux.o(.text+0x4a07c9): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: vmlinux.o(.text+0x4a07e9): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan
WARNING: vmlinux.o(.text+0x4a07ef): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:ypan

Remove __devinitdata annotation from the variable ypan.

Signed-off-by: Sergio Luis <sergio@larces.uece.br>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
Paul Clements 48f15b93b2 NBD: make nbd default to deadline I/O scheduler
NBD doesn't work well with CFQ (or AS) schedulers, so let's default to
something else.

The two problems I have experienced with nbd and cfq are:

1) nbd hangs with cfq on RHEL 5 (2.6.18) -- this may well have been
   fixed

   There's a similar debian bug that has been filed as well:

   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447638

   There have been posts to nbd-general mailing list about problems with
   cfq and nbd also.

2) nbd performs about 10% better (the last time I tested) with deadline
   vs.  cfq (the overhead of cfq doesn't provide much advantage to nbd [not
   being a real disk], and you end up going through the I/O scheduler on
   the nbd server anyway, so it makes sense that deadline is better with
   nbd)

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
Jean Delvare f3069ae9d7 dmi: don't save the same device twice
Now that we gather on-board devices from both DMI types 10 and 41, there is
a possibility that we list the same device twice.  In order to not confuse
drivers, and also to save memory, make sure that we do not add duplicate
devices to the dmi_devices list.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:14 -08:00
David Brownell c8626a1d72 rtc-cmos: display HPET emulation mode
For the "cmos" RTC, have /proc/driver/rtc say whether HPET based IRQ
emulation is in effect.  Given the problems we've had with this particular
hardware maldesign (and the fact that most BIOS code seems not to provide
the IRQ routing needed to use the saner HPET modes), this should help
troubleshooting.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:14 -08:00
Ned Forrester b97c74bddc spi: pxa2xx_spi clock polarity fix
Fixes a sequencing bug in spi driver pxa2xx_spi.c in which the chip select
for a transfer may be asserted before the clock polarity is set on the
interface.  As a result of this bug, the clock signal may have the wrong
polarity at transfer start, so it may need to make an extra half transition
before the intended clock/data signals begin.  (This probably means all
transfers are one bit out of sequence.)

This only occurs on the first transfer following a change in clock polarity
in systems using more than one more than one such polarity.  The fix
assures that the clock mode is properly set before asserting chip select.

This bug was introduced in a patch merged on 2006/12/10, kernel 2.6.20.
The patch defines an additional bit in: include/asm-arm/arch-pxa/regs-ssp.h
for 2.6.25 and newer kernels but this addition must be made in:
include/asm-arm/arch-pxa/pxa-regs.h for kernels between 2.6.20 and 2.6.24,
inclusive

Signed-off-by: Ned Forrester <nforrester@whoi.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:14 -08:00
Atsushi Nemoto f6febccd7f atmel_spi: fix clock polarity
The atmel_spi driver does not initialize clock polarity correctly (except for
at91rm9200 CS0 channel) in some case.

The atmel_spi driver uses gpio-controlled chipselect.  OTOH spi clock signal
is controlled by CSRn.CPOL bit, but this register controls clock signal
correctly only in 'real transfer' duration.  At the time of cs_activate()
call, CSRn.CPOL will be initialized correctly, but the controller do not know
which channel is to be used next, so clock signal will stay at the inactive
state of last transfer.  If clock polarity of new transfer and last transfer
was differ, new transfer will start with wrong clock signal state.

For example, if you started SPI MODE 2 or 3 transfer after SPI MODE 0 or 1
transfer, the clock signal state at the assertion of chipselect will be low.
Of course this will violates SPI transfer.

This patch is short term solution for this problem.  It makes all CSRn.CPOL
match for the transfer before activating chipselect.  For longer term, the
best fix might be to let NPCS0 stay selected permanently in MR and overwrite
CSR0 with to the new slave's settings before asserting CS.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
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>
2008-02-23 17:12:14 -08:00
Haavard Skinnemoen 0400b697ef atmel_serial: fix interrupt handler return value
We should only return IRQ_HANDLED when we actually found something to
handle. This is important since the USART interrupt handler may be
shared with the timer interrupt on some chips.

Pointed-out-by: michael <trimarchi@gandalf.sssup.it>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:14 -08:00
mark gross 98bcef56ca copyright owner and author clean up for intel iommu and related files
The following is a clean up and correction of the copyright holding
entities for the files associated with the intel iommu code.

Signed-off-by: <mgross@linux.intel.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:14 -08:00
Linus Torvalds b23c9cc0ce Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (25 commits)
  [SCSI] qlogicpt: section fixes
  [SCSI] mvsas: convert from rough draft to working driver
  [SCSI] mvsas: Add Marvell 6440 SAS/SATA driver
  [SCSI] libsas: correctly flush the LU queue on error recovery
  [SCSI] aic94xx: fix sequencer hang on error recovery
  [SCSI] st: compile fix when DEBUG set to one
  [SCSI] stex: stex_internal_copy should be called with sg_count in struct st_ccb
  [SCSI] stex: stex_direct_copy shouldn't call dma_map_sg
  [SCSI] lpfc: Balance locking
  [SCSI] qla4xxx: fix up residual handling
  [SCSI] libsas: fix error handling
  [SCSI] arcmsr: fix message allocation
  [SCSI] mptbase: fix use-after-free's
  [SCSI] iscsi transport: make 2 functions static
  [SCSI] lpfc: make lpfc_disable_node() static
  [SCSI] ips: fix data buffer accessors conversion bug
  [SCSI] gdth: don't call pci_free_consistent under spinlock
  [SCSI] qla2xxx: fix compile warning for printk format
  [SCSI] aic7xx: mitigate HOST_MSG_LOOP invalid SCB ff panic
  [SCSI] scsi_debug: disable clustering
  ...
2008-02-23 12:29:16 -08:00
Rafael J. Wysocki 3a2d5b7001 PM: Introduce PM_EVENT_HIBERNATE callback state
During the last step of hibernation in the "platform" mode (with the
help of ACPI) we use the suspend code, including the devices'
->suspend() methods, to prepare the system for entering the ACPI S4
system sleep state.

But at least for some devices the operations performed by the
->suspend() callback in that case must be different from its operations
during regular suspend.

For this reason, introduce the new PM event type PM_EVENT_HIBERNATE and
pass it to the device drivers' ->suspend() methods during the last phase
of hibernation, so that they can distinguish this case and handle it as
appropriate.  Modify the drivers that handle PM_EVENT_SUSPEND in a
special way and need to handle PM_EVENT_HIBERNATE in the same way.

These changes are necessary to fix a hibernation regression related
to the i915 driver (ref. http://lkml.org/lkml/2008/2/22/488).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 10:40:04 -08:00
Adrian Bunk cfb37ae1e9 [SCSI] qlogicpt: section fixes
In current mainline, __devinit qpti_sbus_probe() still is calling __init
qpti_chain_add().  Change occurrences of __init to __devinit to fix.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-23 09:07:32 -06:00
Ke Wei 8f261aaf9b [SCSI] mvsas: convert from rough draft to working driver
Convert rough draft Marvell 6440 driver to a working driver.
Added support for SAS and SATA devices, hotplug, wide port, and expanders.

Signed-off-by: Ke Wei <kewei@marvell.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-23 07:30:58 -06:00
Jeff Garzik b576294826 [SCSI] mvsas: Add Marvell 6440 SAS/SATA driver
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-23 07:29:31 -06:00
Jesse Barnes 39273b58a4 i915: fix AR register restore.
Make sure the restoration correctly restores the AR registers by
flipping the ARX register into index mode before doing anything.

Without this, some people have had the text mode restore all green.

Signed-off-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 16:50:29 -08:00
James Bottomley 63e4563b9c [SCSI] libsas: correctly flush the LU queue on error recovery
The current sas_scsi_clear_queue_lu() is wrongly checking for commands
which match the pointer to the one passed in.  It should be checking for
commands which are on the same logical unit as the one passed in.  Fix
this by checking target pointer and LUN for equality.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:23:47 -06:00
James Bottomley 91b5506044 [SCSI] aic94xx: fix sequencer hang on error recovery
The clear nexus I_T and clear nexus I_T_L functions in the aic94xx
specify the SUSPEND_TX flag which causes the sequencer to be suspended
until it receives a RESUME_TX.  Unfortunately, nothing ever sends the
resume, so the sequencer on the link is stopped forever, leading to
eventual timeouts and I/O errors.

Since clear nexus commands are only executed as part of error recovery,
it's perfectly fine to keep the sequencer running on the link ... as
soon as the recovery function is completed, we'll send it the commands
to retry.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:23:36 -06:00
Kai Makisara deee13dfd6 [SCSI] st: compile fix when DEBUG set to one
Remove the now useless counting of adjacent pages from the debugging code in
to make it compile when DEBUG is set non-zero.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:21:37 -06:00
FUJITA Tomonori c9872fe1ad [SCSI] stex: stex_internal_copy should be called with sg_count in struct st_ccb
stex_internal_copy copies an in-kernel buffer to a sg list by using
scsi_kmap_atomic_sg. Some functions calls stex_internal_copy with
sg_count in struct st_ccb, which is the value that dma_map_sg
returned. However it might be shorter than the actual number of sg
entries (if the IOMMU merged the sg entries).

scsi_kmap_atomic_sg doesn't see sg->dma_length so stex_internal_copy
should be called with the actual number of sg entries
(i.e. scsi_sg_count), because if the sg entries were merged,
stex_direct_copy wrongly think that the data length in the sg list is
shorter than the actual length.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:20:59 -06:00
FUJITA Tomonori 26106e3ca3 [SCSI] stex: stex_direct_copy shouldn't call dma_map_sg
stex_direct_copy copies an in-kernel buffer to a sg list in order to
spoof some SCSI commands. stex_direct_copy calls dma_map_sg and then
stex_internal_copy with the value that dma_map_sg returned. It calls
scsi_kmap_atomic_sg to copy data.

scsi_kmap_atomic_sg doesn't see sg->dma_length so if dma_map_sg merges
sg entries, stex_internal_copy gets the smaller number of sg entries
than the acutual number, which means it wrongly think that the data
length in the sg list is shorter than the actual length.

stex_direct_copy shouldn't call dma_map_sg and it doesn't need since
this code path doesn't involve dma transfers. This patch removes
stex_direct_copy and simply calls stex_internal_copy with the actual
number of sg entries.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:20:39 -06:00
Matthew Wilcox eafe1df9e3 [SCSI] lpfc: Balance locking
Commit 3163f725a5 introduced locking in
lpfc_sli_hbqbuf_fill_hbqs, but missed unlocking on one exit.

Reported-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:15:35 -06:00
David Somayajulu 65fecc77f3 [SCSI] qla4xxx: fix up residual handling
the check in the residual case has an incorrect test of scsi_status
(the logic is reversed, it should be scsi_status != 0 instead of
!scsi_status.  Since we checked a few lines above that scsi_status was
non-zero, just eliminate this test

Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 17:14:12 -06:00
James Bottomley a8e14fec16 [SCSI] libsas: fix error handling
The libsas error handler has two fairly fatal bugs

1. scsi_sas_task_done calls scsi_eh_finish_cmd() too early.  This
   happens if the task completes after it has been aborted but before
   the error handler starts up.  Because scsi_eh_finish_cmd()
   decrements host_failed and adds the task to the done list, the
   error handler start check (host_failed == host_busy) never passes
   and the eh never starts.

2. The multiple task completion paths sas_scsi_clear_queue_... all
   simply delete the task from the error queue.  This causes it to
   disappear into the ether, since a command must be placed on the
   done queue to be finished off by the error handler.  This behaviour
   causes the HBA to hang on pending commands.

Fix 1. by moving the SAS_TASK_STATE_ABORTED check to an exit clause at
the top of the routine and calling ->scsi_done() unconditionally (it
is a nop if the timer has fired).  This keeps the task in the error
handling queue until the eh starts.

Fix 2. by making sure every task goes through task complete followed
by scsi_eh_finish_cmd().

Tested this by firing resets across a disk running a hammer test (now
it actually survives without hanging the system)

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 16:57:14 -06:00
Daniel Drake 69e562c234 [SCSI] arcmsr: fix message allocation
arcmsr_iop_message_xfer() is called from atomic context under the
queuecommand scsi_host_template handler. James Bottomley pointed out
that the current GFP_KERNEL|GFP_DMA flags are wrong: firstly we are in
atomic context, secondly this memory is not used for DMA.
Also removed some unneeded casts.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Cc: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 09:08:13 -06:00
Adrian Bunk ad008d42bc [SCSI] mptbase: fix use-after-free's
ioc->name is used in the printk's after ioc has been freed.  Free
after prinks to fix this.

This patch fixes two use-after-free's introduced by
commit e78d5b8f1e and spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 09:08:13 -06:00
Adrian Bunk 3b0f208a58 [SCSI] iscsi transport: make 2 functions static
This patch makes the following needlessly global functions static:
- __iscsi_unblock_session()
- iscsi_session_state_name()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 09:08:12 -06:00
Adrian Bunk 4d9db01ef8 [SCSI] lpfc: make lpfc_disable_node() static
This patch makes the needlessly global lpfc_disable_node() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22 09:08:12 -06:00
Linus Torvalds bfe38ccf8d Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: normal_i2c arrays should be const
  hwmon: New driver for Analog Devices ADT7473 sensor chip
  hwmon: (coretemp) Add Penryn CPU to coretemp
  hwmon: (coretemp) Add TjMax detection for mobile CPUs
  hwmon: (applesmc) sensors set for MacBook2
  hwmon: (thmc50) Storage class should be before const qualifier
  hwmon: (coretemp) fix section mismatch warning
  hwmon: (coretemp) Add maximum cooling temperature readout
  hwmon: (adm1026) Properly terminate sysfs groups
  hwmon: (vt8231) Update maintainer email address
  hwmon: (vt8231) Add individual alarm files
  hwmon: (via686a) Add individual alarm files
  hwmon: (smsc47m1) Add individual alarm files
  hwmon: (max1619) Add individual alarm and fault files
  hwmon: (lm92) Add individual alarm files
2008-02-21 16:37:42 -08:00
Linus Torvalds 20f8d2a493 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (26 commits)
  PM: Make suspend_device() static
  PCI ACPI: Fix comment describing acpi_pci_choose_state
  Hibernation: Handle DEBUG_PAGEALLOC on x86
  ACPI: fix build warning
  ACPI: TSC breaks atkbd suspend
  ACPI: remove is_processor_present prototype
  acer-wmi: Add DMI match for mail LED on Acer TravelMate 4200 series
  ACPI: sparse fix, replace macro with static function
  ACPI: thinkpad-acpi: add tablet-mode reporting
  ACPI: thinkpad-acpi: minor hotkey_radio_sw fixes
  ACPI: thinkpad-acpi: improve thinkpad-acpi input device documentation
  ACPI: thinkpad-acpi: issue input events for tablet swivel events
  ACPI: thinkpad-acpi: make the video output feature optional
  ACPI: thinkpad-acpi: synchronize input device switches
  ACPI: thinkpad-acpi: always track input device open/close
  ACPI: thinkpad-acpi: trivial fix to documentation
  ACPI: thinkpad-acpi: trivial fix to module_desc typo
  intel_menlo: extract return values using PTR_ERR
  ACPI video: check for error from thermal_cooling_device_register
  ACPI thermal: extract return values using PTR_ERR
  ...
2008-02-21 16:33:19 -08:00
Linus Torvalds e6364cd3a1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  modules: do not try to add sysfs attributes if !CONFIG_SYSFS
  POWERPC: fix typo in pseries/power.c
  PM: Remove unbalanced mutex_unlock() from dpm_resume()
  UIO: fix Greg's stupid changes
  stable_kernel_rules: fix must already be in mainline
  ide: mark "ide=reverse" option as obsolete
  Driver core: Fix error handling in bus_add_driver().
  driver-core: fix kernel-doc function parameters
  cpufreq: fix kobject reference count handling
  slabinfo: fall back from /sys/kernel/slab to /sys/slab
  Fix broken utf-8 encodings in ja_JP translation of stable_kernel_rules.txt
2008-02-21 16:21:52 -08:00
Linus Torvalds b8967d8883 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Fix wrong reference counter check for proc_dir_entry
  PCI: fix up setup-bus.c #ifdef
  PCI: don't load acpi_php when acpi is disabled
  PCI: quirks: set 'En' bit of MSI Mapping for devices onHT-based nvidia platform
  PCI: kernel-doc: fix pci-acpi warning
  PCI: irq: patch for Intel ICH10 DeviceID's
  PCI: pci_ids: patch for Intel ICH10 DeviceID's
  PCI: AMD SATA IDE mode quirk
  PCI: drivers/pcmcia/i82092.c: fix up after pci_bus_region changes
  PCI: hotplug: acpiphp_ibm: Remove get device information
2008-02-21 16:21:08 -08:00
Linus Torvalds c6b0834668 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: (23 commits)
  ehci-fsl: add PPC_MPC837x to default y
  USB: POWERPC: ehci: fix ppc build
  USB: usb-storage: don't access beyond the end of the sg buffer
  USB: quirks and unusual_devs entry for Actions flash drive
  USB: usb-storage: unusual_devs entry for Oracom MP3 player
  USB: serial: move zte MF330 from sierra to option
  USB: add new vernier product id to ldusb.c
  USB: gadget: queue usb USB_CDC_GET_ENCAPSULATED_RESPONSE message
  USB: Add another Novatel U727 ID to the device table for usbserial
  USB: storage: Nikon D80 new FW still needs Fixup
  USB: usb-storage: don't clear-halt when Get-Max-LUN stalls
  USB: option: Added vendor id for Dell 5720 broadband modem
  USB: option: Add Kyocera KPC680 ids
  USB: quirks for known quirky audio devices
  USB: fix previous sparse fix which was incorrect
  USB: fix error handling in trancevibrator
  USB: g_printer, fix empty if statement
  USB: ehci-fsl: mpc834x config symbol is PPC_MPC834x, not MPC834x
  USB: fix usb open suspend race in cdc-acm
  USB: usb: yet another Dell wireless CDMA/EVDO modem
  ...
2008-02-21 16:20:22 -08:00
Linus Torvalds 06165752c8 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4835/1: Fix stale comment in struct machine_desc description
  [ARM] 4829/1: add .get method to pxa-cpufreq to silence a warning
  [ARM] 4828/1: fix 3 warnings in drivers/video/pxafb.c
  [ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c
  [ARM] 4826/1: Orion: Register the RTC interrupt on the TS-209
  [ARM] pxa: fix clock lookup to find specific device clocks
2008-02-21 16:19:34 -08:00
Ian Campbell 597592d951 xen: Implement getgeo for Xen virtual block device.
The below implements the getgeo hook for Xen block devices. Extracted
from the xen-unstable tree where it has been used for ages.

It is useful to have because it allows things like grub2 (used by the
Debian installer images) to work in a guest domain without having to
sprinkle Xen specific hacks around the place.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-21 16:19:13 -08:00
Linus Torvalds 0f151e8b21 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] pasemi: Remove warning in mpic_pasemi_msi.c
  [POWERPC] pasemi: Register i2c devices at boot
  [POWERPC] cell: fix spurious false return from spu_trap_data_{map,seg}
  [POWERPC] Fix warning in pseries/power.c
  [POWERPC] Fix bootwrapper builds with older gcc versions
  [POWERPC] Fix dt_mem_next_cell() to read the full address
  [POWERPC] Kill sparse warnings in kprobes
  [POWERPC] spufs: fix scheduler starvation by idle contexts
  [POWERPC] 44x: Add multiplatform defconfig
  [POWERPC] 44x: Fix Kconfig formatting
  [POWERPC] 4xx: Update defconfigs for 2.6.25
  [POWERPC] 4xx: Remove "i2c" and "xxmii-interface" device_types from dts
  [POWERPC] PPC440EP Interrupt Triggering and Level Settings
  [POWERPC] net: NEWEMAC: Remove "rgmii-interface" from rgmii matching table
2008-02-21 16:18:05 -08:00
Anton Vorontsov b5937a415f ehci-fsl: add PPC_MPC837x to default y
This patch converts USB_EHCI_FSL config option into the verbose
bool, so we'll able to select it for other freescale processors
with built-in EHCI controller.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:56 -08:00
Anton Vorontsov c6dd2e61d3 USB: POWERPC: ehci: fix ppc build
Currently, this setup:
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_HCD_PPC_OF=y

Will fail to build:
  CC      drivers/usb/host/ehci-hcd.o
drivers/usb/host/ehci-hcd.c:1018:2: error: #error "missing bus glue for ehci-hcd"
make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1

ehci-hcd.c actually contains OF_PLATFORM_DRIVER glue, so error is bogus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:56 -08:00