Commit graph

73522 commits

Author SHA1 Message Date
Kashyap, Desai 744090d38b [SCSI] mpt2sas : Add support for RAID Action System Shutdown Initiated at OS shutdown
(1) Added new function _scsih_ir_shutdown.  This function will issue the
MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED request via
MPI2_FUNCTION_RAID_ACTION. The function will wait 10 seconds for reply
message frame, then print out the ioc status and loginfo.  This function is
only called when there are raid volumes present.

(2) Add shutdown callback in the struct pci_driver object scsih_driver. This
will be called only when the system is shutting down. From this function, we
will call _scsih_ir_shutdown mentioned above.

(3) Add support in _scsih_remove to call _scsih_ir_shutdown. The function
_scsih_remove will be called when the driver is unloaded (and system is
still running).

scsih internal command contex is added to send internal message frames
from mpt2sas_scsih.c.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:16 -04:00
Kashyap, Desai 8ffc457ed6 [SCSI] mpt2sas: Freeze the sdev IO queue when firmware sends internal dev reset
When receiving the MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET event,
the driver will set the tm_busy flag in the sdev private host data, When
tm_busy flag is set, the driver will return SCSI_MLQUEUE_DEVICE_BUSY,
effectly freezing the IO to the device. The tm_busy flag is cleared with the
MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET event.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:15 -04:00
Kashyap, Desai 463217bfec [SCSI] mpt2sas : PPC (power pc) endian bug fix's
(1) EEDP(End to End data protection) was not working. This was due to not
setting EEDP BlockSize and Flags to little endian format in the message
frame.
(2) Some expander sysfs attributes were not getting set properly.  The sas
format was not getting set due to endian issues with sas_format field in the
struct rep_manu_reply. Since sas_format was not set properly, the
component_vendor_id, component_revision_id, and component_id were not set.
(3) In _transport_smp_handler: we don't need to convert the smid from little
endian to cpu prior to calling mpt2sas_base_free_smid, because its allready
in cpu format. (4) Some loginfos and ioc status were not xonverted from
little endian to cpu.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:15 -04:00
Kashyap, Desai ec9472c74c [SCSI] mpt2sas: mpt2sas_base_get_sense_buffer_dma should be returning little endian
cpu_to_le64 when calculating the physical dma address. This will properly
handle endianess on big endian systems.  The return value of this function
was changed from dma_addr_t to __le64. Remove the typecasting of u32 when
setting the SenseBufferLowAddress, since its already in __le32 format.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:14 -04:00
Kashyap, Desai e4e7c7ed34 [SCSI] mpt2sas: Return DID_TRANSPORT_DISRUPTED in nexus loss,SCSI_MLQUEUE_DEVICE_BUSY if device is busy
1 Its observed that the OS was sending request to the driver after it had been
put into blocking state, so the driver was modified to return
SCSI_MLQUEUE_DEVICE_BUSY.
2. Driver will return DID_TRANSPORT_DISRUPTED when sdev is haivng nexus loss.
This occurrs when sdev is blocked, between the
MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING and
MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING events.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:14 -04:00
Kashyap, Desai 96b681c6ad [SCSI] mpt2sas: Retrieve the ioc facts prior to putting the controller into READY state
The driver needs to retrieve the ioc facts prior to putting the controller
into READY state. The current design is calling ioc facts after putting the
controller into READY state, which means the driver is sending a diag reset
instead of message unit reset becuase the capability information is not yet
available.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:14 -04:00
Kashyap, Desai ec6c2b43b0 [SCSI] mpt2sas: Added new info messages for IR and Expander events.
(1) for the MPI2_EVENT_IR_OPERATION_STATUS event, add support to print
"background init" or "make data consistent" for debugging purposes.  If the
RAIDOperation is set to a value not defined, then don't print anything

(2) for the MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE event, add support to print
"expander reduced functionality" and "expander reduced functionality
complete", which are new events.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:13 -04:00
Kashyap, Desai e0077d607f [SCSI] mpt2sas: Limit the max_depth to 32 for SATA devices which are not part of volume
Added sanity check in _scsih_change_queue_depth to limit the max_depth to 32
for SATA devices. This is only for physical devices not part of a volume.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:13 -04:00
Kashyap, Desai a8ebd76c49 [SCSI] mpt2sas: Added support to set the TimeStamp when sending ioc_init
Added support to set the TimeStamp when sending ioc_init.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:12 -04:00
Kashyap, Desai 1b01fe3aa5 [SCSI] mpt2sas: Add Extended Type for Diagnostic Buffer support
Added tests for registry entries of EXBuffSize, EXImmed, and EXType to
support the new Extended diag buffer type.  Modified code where necessary to
handle the new ExtendedType field in the F/W diagnostic Post and Release
messages.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:11 -04:00
Kashyap, Desai 32e0eb569d [SCSI] mpt2sas: Added command line option diag_buffer_enable.
Added command line option diag_buffer_enable. When the command line option is
set, the driver will automatically post diag buffers at driver load time.
The command line option diag_buffer_enable is bitwise, so it's possible to
enable both and/or snapshot + trace buffers.  For trace, the driver will
allocate 1MB buffer, whereas for snapshot its 2MB. The purpose for this is
so the enduser doesn't have to manually use an application to setup diag
buffers for debugging firmware related issues.

Here is some examples
trace:
# insmod mpt2sas.ko diag_buffer_enable=1

snapshot:
# insmod mpt2sas.ko diag_buffer_enable=2

both trace and snapshot:
# insmod mpt2sas.ko diag_buffer_enable=3

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:11 -04:00
Kashyap, Desai cef7a12cd1 [SCSI] mpt2sas: Fixed some of the comment
Fixed some of the comments sections for some of the function so "@ioc:
pointer to scsi command object" was changed to "@ioc: per adapter object"

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:11 -04:00
Kashyap, Desai fa7f316735 [SCSI] mpt2sas: Support for stopping driver when Firmware encounters
Added command line option and shost sysfs attribute called
mpt2sas_fwfault_debug. When enduser writes a "1" to this parameter, this
will enable support in the driver for debugging firmware timeout related
issues.  This handling was added in three areas (a) scsi error handling
callback called task_abort, (b) IOCTL interface, and (c) other timeouts that
result in diag resets, such as manufacturing config pages.  When this
support is enabled, the driver will provide dump_stack to console, halt
controller firmware, and panic driver. The end user probably would want to
setup serial console redirection so the dump stack can be seen.

Here are the three methods for enable this support:

(a) # insmod mpt2sas.ko mpt2sas_fwfault_debug=1
(b) # echo 1 > /sys/module/mpt2sas/parameters/mpt2sas_fwfault_debug
(c) # echo 1 > /sys/class/scsi_host/host#/fwfault_debug  (where # is
the host number)

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:10 -04:00
Kashyap, Desai 9fec5f9fc2 [SCSI] mpt2sas: Adding MPI Headers - revision L
The new headers contain the following changes:
(1) Added IO Unit Page 7.
(2) Added new device ids for SAS2208.
(3) Added SAS IO Unit Page 5.
(4) Added partial and slumber power management capable flags to SAS Device
    Page 0 Flags field.
(5) Added PhyInfo defines for power condition.
(6) Added Ethernet configuration pages.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:10 -04:00
Kashyap, Desai db27136a89 [SCSI] mpt2sas: New device SAS2208 support is added
Added device ids range for { 0x80 - 87 } , modified mpi/mpi2_cnfg.h containing
MPI2_MFGPAGE_DEVID_SAS2208_X.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:09 -04:00
Kashyap, Desai 9982f59450 [SCSI] mpt2sas: Add support in the driver to check for valid response info
Add support in the driver to check for valid response info in the scsi
state, then check to see if the response code is
MPI2_SCSITASKMGMT_RSP_INVALID_FRAME; when this condition occurrs, the driver
will return DID_SOFT_ERROR.  A return code of DID_SOFT_ERROR will result in
a retry at the scsi-mid layer level.  An additional change added to obtain
the response code from the 1st byte of the response info instead of last.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:09 -04:00
Kashyap, Desai a28eb222e3 [SCSI] mpt2sas: Expander remove fails when it is processing another expander add.
This handles the case where driver receives a expander removal event while
it is in the middle of processing an expander add event. The existing
implementation will stop processing futher device adds when a expander
delete arrives on top of add expander add. Due to a sanity check in the
driver, the devices there were not added, were never handshaked to firmware
with the device removal handshake protocal. Since the driver didnt' do the
handshake, the controller never provide further add events.  To fix this
issue, the sanity check was removed so the driver will always do the device
removal handshake protocal.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:08 -04:00
Kashyap, Desai c5e039be7e [SCSI] mpt2sas: Driver will use sas address instead of handle as a lookup
The device driver was not handling updating device handles in all cases
across diag resets. To fix this issue, the driver is converted to using sas
address instead of handle as a lookup reference to the parent expander or
sas_host. Also, for both expanders and sas host, the phy handle will be one
unique handle. In the sas host case, the phy handle can be different for
every phy, so the change is to set the handle to the handle of the first
phy; every phy will be one single sas address(phy 0) instead of a different
sas address for every phy(previous implementation). So making one consistent
sas address for all the direct attachedports to the sas host, will make it
better user experience when using udev /dev/disk/by-path dev nodes

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29 13:03:08 -04:00
Linus Torvalds 8d5eb435c3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide: Serialize CMD643 and CMD646 to fix a hardware bug with SSD
2009-10-29 09:22:34 -07:00
Linus Torvalds 49b2de8e6f 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: (43 commits)
  net: Fix 'Re: PACKET_TX_RING: packet size is too long'
  netdev: usb: dm9601.c can drive a device not supported yet, add support for it
  qlge: Fix firmware mailbox command timeout.
  qlge: Fix EEH handling.
  AF_RAW: Augment raw_send_hdrinc to expand skb to fit iphdr->ihl (v2)
  bonding: fix a race condition in calls to slave MII ioctls
  virtio-net: fix data corruption with OOM
  sfc: Set ip_summed correctly for page buffers passed to GRO
  cnic: Fix L2CTX_STATUSB_NUM offset in context memory.
  MAINTAINERS: rt2x00 list is moderated
  airo: Reorder tests, check bounds before element
  mac80211: fix for incorrect sequence number on hostapd injected frames
  libertas spi: fix sparse errors
  mac80211: trivial: fix spelling in mesh_hwmp
  cfg80211: sme: deauthenticate on assoc failure
  mac80211: keep auth state when assoc fails
  mac80211: fix ibss joining
  b43: add 'struct b43_wl' missing declaration
  b43: Fix Bugzilla #14181 and the bug from the previous 'fix'
  rt2x00: Fix crypto in TX frame for rt2800usb
  ...
2009-10-29 09:22:08 -07:00
Linus Torvalds add810a1c5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio: order used ring after used index read
  virtio-pci: fix per-vq MSI-X request logic
2009-10-29 09:17:59 -07:00
Linus Torvalds 066455d471 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:
  Revert "PCI: get larger bridge ranges when space is available"
2009-10-29 09:17:02 -07:00
Linus Torvalds ea38280c2a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Add a new supported 40 GigE device ID
2009-10-29 09:16:23 -07:00
Linus Torvalds 61aa1620be 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:
  [SCSI] zfcp: Flush SCSI registration work when adding unit
  [SCSI] zfcp: Fix timer initialization for ct and els requests
  [SCSI] zfcp: Warn about storage devices with broken PLOGI data
  [SCSI] zfcp: Handle WWPN mismatch in PLOGI payload
  [SCSI] zfcp: fix kfree handling in zfcp_init_device_setup
  [SCSI] fix memory leak in initialization
2009-10-29 09:16:01 -07:00
Linus Torvalds d4f452f825 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/kms: fix kms/fbdev colormap support properly.
  drm: Add the basic check for the detailed timing in EDID
  drm/radeon/kms: ignore vga arbiter return.
2009-10-29 09:15:02 -07:00
Alan Cox 575c9ed779 ray_cs: Fix copy_from_user handling
I've not touched the other stuff here but the word "locking" comes to mind.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 09:01:07 -07:00
Alan Cox ef7562b7f2 dpt_i2o: Fix up copy*user
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 09:01:07 -07:00
Linus Torvalds 0a53f1693c Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/ppc64: Use preempt_schedule_irq instead of preempt_schedule
  powerpc: Minor cleanup to lib/Kconfig.debug
  powerpc: Minor cleanup to sound/ppc/Kconfig
  powerpc: Minor cleanup to init/Kconfig
  powerpc: Limit memory hotplug support to PPC64 Book-3S machines
  powerpc: Limit hugetlbfs support to PPC64 Book-3S machines
  powerpc: Fix compile errors found by new ppc64e_defconfig
  powerpc: Add a Book-3E 64-bit defconfig
  powerpc/booke: Fix xmon single step on PowerPC Book-E
  powerpc: Align vDSO base address
  powerpc: Fix segment mapping in vdso32
  powerpc/iseries: Remove compiler version dependent hack
  powerpc/perf_events: Fix priority of MSR HV vs PR bits
  powerpc/5200: Update defconfigs
  drivers/serial/mpc52xx_uart.c: Use UPIO_MEM rather than SERIAL_IO_MEM
  powerpc/boot/dts: drop obsolete 'fsl5200-clocking'
  of: Remove nested function
  mpc5200: support for the MAN mpc5200 based board mucmc52
  mpc5200: support for the MAN mpc5200 based board uc101
2009-10-29 08:59:06 -07:00
Linus Torvalds 7fecf0a1f2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Do not dereference null pointer in twl4030 error path
  mfd: Always initialise WM831x IRQ mutex
2009-10-29 08:44:04 -07:00
Linus Torvalds 59f4122778 Merge branch 'for-linus' of git://git.infradead.org/ubi-2.6
* 'for-linus' of git://git.infradead.org/ubi-2.6:
  UBI: fix check on unsigned long
  UBI: fix backward compatibility
2009-10-29 08:15:34 -07:00
Linus Torvalds e281e315f4 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (it87) Fix VID reading on IT8718F/IT8720F
  hwmon: (dme1737) No vid attributes for SCH311x
  hwmon: (fschmd) Fix check on unsigned in watchdog_write()
  hwmon: (coretemp) Maintainer update
2009-10-29 08:14:58 -07:00
Linus Torvalds 49b766ec12 Merge branch 'urgent-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* 'urgent-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: do not load the pd6729 driver if io_base is NULL
  pcmcia: Fix possible printk format warnings
  pcmcia: do not try to store more than 4 version strings
  pcmcia: pccard_read_tuple and TUPLE_RETURN_COMMON cleanup
  pcmcia: properly close previous dev_printk if kzalloc fails in do_io_probe
  pcmcia: fix controller printk format warnings
2009-10-29 08:14:14 -07:00
Linus Torvalds 464d155c51 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
  ARM: Fix lubbock defconfig build
  ARM: 5769/1: CPU_ARM920T: remove dead Maverick EP9312 URL
  ARM: 5768/1: ep93xx: remove dead code in ep93xx_gpio_ab_irq_handler()
  ARM: 5767/1: ep93xx: remove ep93xx_init_time() prototype
  ARM: 5765/1: Updated U300 defconfig
  ARM: 5766/1: Fix watchdog enabling for AT91SAM9G45
  ARM: 5764/1: bcmring: add oprofile pmu support
  [ARM] pxa/spitz: add gpio button support (fixes regression)
  [ARM] pxa/cm-x300: fix mmc numbering
  ARM: 5763/1: ARM: SMP: Fix the BUG with CONFIG_PREEMPT enabled
  ARM: 5760/1: ep93xx: fix build error in edb93xx.c
  ARM: 5759/1: Add register information of threads to coredump
  ARM: 5757/1: Thumb-2: Correct "mov.w pc, lr" instruction which is unpredictable
  MXC: fix reset for mx31, mx35 and mx27 SoCs
  fix pcm037_eet compilation with the new SPI driver
  fix compilation of i.MX31 platforms
  pcm970 mmc: Fix ro switch
  pcm038: Add SPI/MC13783 support
  mx25: Add missing copyright / license header
  mx25pdk: remove nand support as it is not present in current tree
  ...
2009-10-29 08:13:03 -07:00
Ian E. Morgan 2545f038f4 lis3: add support for the HP HDX 18
I have an HP HDX 18 laptop, and noted that the configuration of the
accelerometer needs to be x_inverted.

Signed-off-by: Ian E. Morgan <penguin.wrangler@gmail.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:32 -07:00
Éric Piel af19611c4d lis3: add support for the HP EliteBook 8530w
Correct orientation for  HP EliteBook 8530w.

Reported-by: Jörgen Jonssson <jorgen.jonsson@saitek.se>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:32 -07:00
Pavel Herrmann a03018ff71 lis3: better support for hp 6730x
I have learned that the 6730b and 6730s have different accelerometer
orientation, and have modified the driver accordingly (diff attached),
while dropping the wild guess for AMD based 6735 having the same
orientation as Intel based 6730 (this is not true for any other related
series/family, thus is not probable for 673x).

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:32 -07:00
Kevin Hilman 246eb7f0ed cpuidle: always return with interrupts enabled
In the case where cpuidle_idle_call() returns before changing state due to
a need_resched(), it was returning with IRQs disabled.

The idle path assumes that the platform specific idle code returns with
interrupts enabled (although this too is undocumented AFAICT) and on ARM
we have a WARN_ON(!(irqs_disabled()) when returning from the idle loop, so
the user-visible effects were only a warning since interrupts were
eventually re-enabled later.

On x86, this same problem exists, but there is no WARN_ON() to detect it.
As on ARM, the interrupts are eventually re-enabled, so I'm not sure of
any actual bugs triggered by this.  It's primarily a
correctness/consistency fix.

This patch ensures IRQs are (re)enabled before returning.

Reported-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
Cc: <stable@kernel.org>		[2.6.31.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:31 -07:00
Keith Mannthey c2494ace99 edac: i5100 fix initialization code
Allow csrows to properly initialize when the topology only has active
channels on 2 and 3.  This new check allows proper detection and
initialization in this topology.  Only checking the first mrt that
represented channels 0 and 1 is not sufficient.

I also fixed up the related debug information path.  I can submit as a 2nd
patch if needed.

Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
Acked-by: Aristeu Rozanski <aris@ruivo.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:30 -07:00
Ira W. Snyder 0616fb003d edac: i5400 fix missing CONFIG_PCI define
When building without CONFIG_PCI the edac_pci_idx variable is unused,
causing a build-time warning.  Wrap the variable in #ifdef CONFIG_PCI,
just like the rest of the PCI support.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:30 -07:00
Jeff Roberson 156edd4aaa edac: i5400 fix csrow mapping
The i5400 EDAC driver has several bugs with chip-select row computation
which most likely lead to bugs in detailed error reporting.  Attempts to
contact the authors have gone mostly unanswered so I am presenting my diff
here.  I do not subscribe to lkml and would appreciate being kept in the
cc.

The most egregious problem was miscalculating the addresses of MTR
registers after register 0 by assuming they are 32bit rather than 16.
This caused the driver to miss half of the memories.  Most motherboards
tend to have only 8 dimm slots and not 16, so this may not have been
noticed before.

Further, the row calculations multiplied the number of dimms several
times, ultimately ending up with a maximum row of 32.  The chipset only
supports 4 dimms in each of 4 channels, so csrow could not be higher than
4 unless you use a row per-rank with dual-rank dimms.  I opted to
eliminate this behavior as it is confusing to the user and the error
reporting works by slot and not rank.  This gives a much clearer view of
memory by slot and channel in /sys.

Signed-off-by: Jeff Roberson <jroberson@jroberson.net>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:30 -07:00
Mike Frysinger 46c529cf79 twl4030-gpio: remove __devexit markings from remove func
The gpio_twl4030_probe() function calls gpio_twl4030_remove(), and the
former has __devinit, so the latter cannot use __devexit.  Otherwise we
hit the section mismatch warning:

WARNING: drivers/gpio/built-in.o(.devinit.text+0x71a): Section mismatch
	in reference from the function _gpio_twl4030_probe() to the function
	.devexit.text:_gpio_twl4030_remove()
The function __devinit _gpio_twl4030_probe() references a function
	__devexit _gpio_twl4030_remove().
This is often seen when error handling in the init function uses
	functionality in the exit path.
The fix is often to remove the __devexit annotation of
	_gpio_twl4030_remove() so it may be used outside an exit section.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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-10-29 07:39:30 -07:00
Benjamin Herrenschmidt c68d2b1594 8250_pci: add IBM Saturn serial card
The IBM Saturn serial card has only one port. Without that fixup,
the kernel thinks it has two, which confuses userland setup and
admin tools as well.

[akpm@linux-foundation.org: fix pci-ids.h layout]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: Michael Reed <mreed10@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:30 -07:00
Krauth.Julien 1b62cbf214 serial: add ADDI-DATA GmbH PCI-Express communication cards in 8250_pci.c and pci_ids.h
Add support for ADDI-DATA GmbH PCI-Express communication cards:

APCIe-7300
APCIe-7420
APCIe-7500
APCIe-7800

Warning: 8250_pci.c depends on pci_ids.h. 8250_pci.c

Signed-off-by: Krauth Julien <Krauth.Julien@addi-data.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:30 -07:00
Haavard Skinnemoen 9d09daf8e8 atmel_serial: fix bad BUILD_BUG_ON() usage
is_power_of_2() appears not to be constant enough for BUILD_BUG_ON()
after the latest rework, so replace it with an open-coded test.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:30 -07:00
Alexey Dobriyan cf6e693212 loop: fix NULL dereference if mount fails
Commit bb21488482 ("[PATCH] switch loop")
started to pass NULL bdev to ioctl hook.

Steps to reproduce:

	[boot with loop.max_part=1]
	[mount -o loop something so mount fails]

BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8
IP: [<ffffffff811486ee>] blkdev_ioctl+0x2e/0xa30
PGD 0
Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
last sysfs file: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:35/ACPI0003:00/power_supply/ACAD/online
CPU 0
Modules linked in: zfs nvidia(P) [last unloaded: zfs]
Pid: 15177, comm: mount Tainted: P           2.6.32-rc4-zfs #2 Satellite X200
RIP: 0010:[<ffffffff811486ee>]  [<ffffffff811486ee>] blkdev_ioctl+0x2e/0xa30
RSP: 0018:ffff88003b3d5bb8  EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 000000000000125f RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88003b3d5ce8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 00007ffffffff000
R13: 0000000000000000 R14: ffff880071cef280 R15: 00000000000200da
FS:  00007fd77cfe7740(0000) GS:ffff880001600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000000000b8 CR3: 0000000001001000 CR4: 00000000000026f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process mount (pid: 15177, threadinfo ffff88003b3d4000, task ffff88007572f920)
Stack:
 ffff88003b3d5c38 ffffffff812f95f5 ffff88007eeb6600 0000000000000000
<0> 0000000000000000 ffff88003b3d5c18 ffffffff811547d9 ffff88001bf11ef0
<0> 7fffffffffffffff ffff88001bf11ee8 ffff88001bf11ef0 0000000000000000
Call Trace:
 [<ffffffff812f95f5>] ? schedule_timeout+0x1f5/0x250
 [<ffffffff811547d9>] ? rb_insert_color+0x109/0x140
 [<ffffffff812fb754>] ? _spin_unlock_irq+0x14/0x40
 [<ffffffff812f84c6>] ? wait_for_common+0x66/0x170
 [<ffffffff8105a280>] ? default_wake_function+0x0/0x10
 [<ffffffff810f8258>] ioctl_by_bdev+0x38/0x50
 [<ffffffff811d2481>] loop_clr_fd+0x1e1/0x210
 [<ffffffff811d2522>] lo_release+0x72/0x80
 [<ffffffff810f934c>] __blkdev_put+0x1ac/0x1d0
 [<ffffffff810f937b>] blkdev_put+0xb/0x10
 [<ffffffff810f93b9>] blkdev_close+0x39/0x60
 [<ffffffff810ccef3>] __fput+0xd3/0x230
 [<ffffffff810cd06d>] fput+0x1d/0x30
 [<ffffffff810c9680>] filp_close+0x50/0x80
 [<ffffffff81061f11>] put_files_struct+0x81/0x100
 [<ffffffff81061fde>] exit_files+0x4e/0x60
 [<ffffffff81063ec5>] do_exit+0x6b5/0x730
 [<ffffffff8107b279>] ? up_read+0x9/0x10
 [<ffffffff8104c86e>] ? do_page_fault+0x18e/0x2a0
 [<ffffffff81063f81>] do_group_exit+0x41/0xc0
 [<ffffffff81064012>] sys_exit_group+0x12/0x20
 [<ffffffff81030deb>] system_call_fastpath+0x16/0x1b
Code: f8 48 89 e5 48 81 ec 30 01 00 00 48 89 5d d8 4c 89 6d e8 4c 89 65 e0 4c 89 75 f0 4c 89 7d f8 48 89 bd e8 fe ff ff 49 89 cd 89 f3 <49> 8b 88 b8 00 00 00 81 fa 68 12 00 00 0f 84 57 05 00 00 0f 86
RIP  [<ffffffff811486ee>] blkdev_ioctl+0x2e/0xa30
 RSP <ffff88003b3d5bb8>
CR2: 00000000000000b8
---[ end trace c0b4d3c3118d1427 ]---
Fixing recursive fault but reboot is needed!

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:27 -07:00
Roger Quadros 8753298a11 omap_hsmmc: add missing probe handler hook
The missing probe handler hook will never probe the driver. Add it back.
Fixes broken MMC on OMAP.

We use platform_driver_probe() API since omap_hsmmc is not a hot-pluggable
device.

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Tested-by: Felipe Contreras <felipe.contreras@gmail.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:25 -07:00
Mikulas Patocka 9bd7496f5d ide: Serialize CMD643 and CMD646 to fix a hardware bug with SSD
CMD646 corrupts data on concurrent transfers on both channels when IDE SSD is
connected to one of the channels.

Setup that demonstrates this hardware bug: Ultra 5, onboard CMD646, rev 3.
/dev/hda is 8GB Seagate ST38410A in MWDMA2
/dev/hdd is 32GB SSD SiliconHardDisk in MWDMA2

- When reading /dev/hdd (for example with dd or fsck), reads from /dev/hda
  are corrupted, there are twiddled single bits 1->0 and some full 32-bit
  words corrupted, sometimes commands fail (which switches /dev/hda to
  PIO mode but the corruptions happen even in PIO).
- Reads from /dev/hdd don't seem to be corrupted (i.e. fsck passes fine).
- When I connected normal rotating harddisk to /dev/hdd, there was no
  corruption, so the corruption is something specific to SSD.
- I tried the same setup on a PCI card with CMD649 and saw no corruption.

This patch serializes the operation for CMD646 and 643 (I didn't test
CMD643 but it may have the same hw bug too because it's earlier design).
CMD649 is good. I don't know anything about CMD 648.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29 03:02:06 -07:00
Janusz Krzysztofik 06b71b657b netdev: usb: dm9601.c can drive a device not supported yet, add support for it
I found that the current version of drivers/net/usb/dm9601.c can be used to
successfully drive a low-power, low-cost network adapter with USB ID
0a46:9000, based on a DM9000E chipset. As no device with this ID is yet
present in the kernel, I have created a patch that adds support for the device
to the dm9601 driver.

Created and tested against linux-2.6.32-rc5.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29 01:19:48 -07:00
Ron Mercer da03945140 qlge: Fix firmware mailbox command timeout.
The mailbox command process would only process a maximum of 5 unrelated
firmware events while waiting for it's command completion status.
It should process an unlimited number of events while waiting for a maximum of 5 seconds.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29 01:17:15 -07:00
Ron Mercer 6d190c6edf qlge: Fix EEH handling.
Clean up driver resources without touch the hardware. Add pci
save/restore state.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29 01:17:14 -07:00