cascardo/linux.git
8 years agoibmvscsi: display default value for max_id, max_lun and max_channel.
Laurent Vivier [Mon, 9 Nov 2015 16:49:08 +0000 (17:49 +0100)]
ibmvscsi: display default value for max_id, max_lun and max_channel.

As devices with values greater than that are silently ignored,
this gives some hints to the sys admin to know why he doesn't see
his devices...

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agomptfusion: don't allow negative bytes in kbuf_alloc_2_sgl()
Dan Carpenter [Tue, 10 Nov 2015 22:15:24 +0000 (01:15 +0300)]
mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl()

There is a static checker warning here because "bytes" is controlled by
the user and we cap the upper bound with min() but allow negatives.
Negative bytes will result in some nasty warning messages but are not
super harmful.  Anyway, no one needs negative bytes so let's just check
for it and return NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agoscsi: pmcraid: replace struct timeval with ktime_get_real_seconds()
Alison Schofield [Mon, 9 Nov 2015 19:34:20 +0000 (11:34 -0800)]
scsi: pmcraid: replace struct timeval with ktime_get_real_seconds()

Replace the use of struct timeval and do_gettimeofday() with
64 bit ktime_get_real_seconds. Prevents 32-bit type overflow
in year 2038 on 32-bit systems.

Driver was using the seconds portion of struct timeval (.tv_secs)
to pass a millseconds timestamp to the firmware. This change maintains
that same behavior using ktime_get_real_seconds.

The structure used to pass the timestamp to firmware is 48 bits and
works fine as long as the top 16 bits are zero and they will be zero
for a long time..ie. thousands of years.

Alternative Change:  Add sub second granularity to timestamp

As noted above, the driver only used the seconds portion of timeval,
ignores the microseconds portion, and by multiplying by 1000 effectively
does a <<10 and always writes zero into timestamp[0].

The alternative change would pass all the bits to the firmware:

        struct timespec64 ts;

        ktime_get_real_ts64(&ts);
        timestamp = ts.tv_sec * MSEC_PER_SEC + ts.tv_nsec / NSEC_PER_MSEC;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agomvumi: 64bit value for seconds_since1970
Tina Ruchandani [Fri, 30 Oct 2015 09:11:10 +0000 (02:11 -0700)]
mvumi: 64bit value for seconds_since1970

struct mvumi_hs_page2 stores a "seconds_since1970" field which is of
type u64. It is however, written to, using 'struct timeval' which has
a 32-bit seconds field and whose value will overflow in year 2038.
This patch uses ktime_get_real_seconds() instead since it provides a
64-bit seconds value, which is 2038 safe.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agobe2iscsi: Fix bogus WARN_ON length check
Tim Gardner [Fri, 30 Oct 2015 18:22:58 +0000 (12:22 -0600)]
be2iscsi: Fix bogus WARN_ON length check

drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous':
drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  WARN_ON(!length > 0);

gcc version 5.2.1

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@avagotech.com>
Cc: Minh Tran <minh.tran@avagotech.com>
Cc: John Soni Jose <sony.john-n@avagotech.com>
Cc: "James E.J. Bottomley" <JBottomley@odin.com>
Reported-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agoscsi_scan: don't dump trace when scsi_prep_async_scan() is called twice
Vitaly Kuznetsov [Fri, 30 Oct 2015 11:37:49 +0000 (12:37 +0100)]
scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice

The only user of scsi_prep_async_scan() is scsi_scan_host() and it
handles the situation correctly. Move 'called twice' reporting to debug
level as well.

The issue is observed on Hyper-V: on any device add/remove event storvsc
driver calls scsi_scan_host() and in case previous scan is still running
we get the message and stack dump on console.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Bump mpt3sas driver version to 09.102.00.00
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:41 +0000 (17:30 +0530)]
mpt3sas: Bump mpt3sas driver version to 09.102.00.00

Bump mpt3sas driver version to 09.102.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:35 +0000 (17:30 +0530)]
mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs

Modified the mpt3sas driver to have a single driver module which
supports both SAS 2.0 & SAS 3.0 HBA devices.

* Added SAS 2.0 HBA device IDs to the mpt3sas_pci_table pci table.

* Created two separate SCSI host templates for SAS2 and SAS3 HBAs so
  that, during the driver load time driver can use corresponding host
  template(based the pci device ID) while registering a scsi host
  adapter instance for that pci device.

* Registered two IOCTL devices, mpt2ctl is for SAS2 HBAs & mpt3ctl for
  SAS3 HBAs. Also updated the code to make sure that mpt2ctl device
  processes only those ioctl cmds issued for the SAS2 HBAs and mpt3ctl
  device processes only those ioctl cmds issued for the SAS3 HBAs.

* Added separate indexing for SAS2 and SAS3 HBAs.

* Replaced compile time check 'MPT2SAS_SCSI' to run time check
  'hba_mpi_version_belonged' whereever needed.

* Aliased this merged driver to mpt2sas using MODULE_ALIAS.

* Moved global varaible 'driver_name' to per adapter instance variable.

* Created two raid function template and used corresponding raid
  function templates based on the run time check
  'hba_mpi_version_belonged'.

* Moved mpt2sas_warpdrive.c file from mpt2sas to mpt3sas folder and
  renamed it as mpt3sas_warpdrive.c.

* Also renamed the functions in mpt3sas_warpdrive.c file to follow
  current driver function name convention.

* Updated the Makefile to build mpt3sas_warpdrive.o file for these
  WarpDrive-specific functions.

* Also in function mpt3sas_setup_direct_io(), used sector_div() API
  instead of division operator (which gives compilation errors on 32 bit
  machines).

* Removed mpt2sas files, mpt2sas directory & mpt3sas_module.c file.

* Added module parameter 'hbas_to_enumerate' which permits using this
  merged driver as a legacy mpt2sas driver or as a legacy mpt3sas
  driver.

  Here are the available options for this module parameter:

   0 - Merged driver which enumerates both SAS 2.0 & SAS 3.0 HBAs
   1 - Acts as legacy mpt2sas driver, which enumerates only SAS 2.0 HBAs
   2 - Acts as legacy mpt3sas driver, which enumerates only SAS 3.0 HBAs

* Removed mpt2sas entries from SCSI's Kconfig and Makefile files.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt2sas, mpt3sas: Update the driver versions
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:34 +0000 (17:30 +0530)]
mpt2sas, mpt3sas: Update the driver versions

Bump the mpt2sas driver version to 20.102.00.00 and
Bump the mpt3sas driver version to 9.101.00.00.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: setpci reset kernel oops fix
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:33 +0000 (17:30 +0530)]
mpt3sas: setpci reset kernel oops fix

setpci reset on nytro warpdrive card along with sysfs access and cli
ioctl access resulted in kernel oops

1. pci_access_mutex lock added to provide synchronization between IOCTL,
   sysfs, PCI resource handling path

2. gioc_lock spinlock to protect list operations over multiple
   controllers

This patch is ported from commit 6229b414b3ad ("mpt2sas: setpci reset
kernel oops fix").

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Added OEM Gen2 PnP ID branding names
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:32 +0000 (17:30 +0530)]
mpt3sas: Added OEM Gen2 PnP ID branding names

Added OEM Gen2 PnP ID branding names from mpt2sas driver.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Refcount fw_events and fix unsafe list usage
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:31 +0000 (17:30 +0530)]
mpt3sas: Refcount fw_events and fix unsafe list usage

The fw_event_work struct is concurrently referenced at shutdown. Add a
refcount to protect it and refactor the code to use it.

Additionally, refactor _scsih_fw_event_cleanup_queue() such that it no
longer iterates over the list without holding the lock since
_firmware_event_work() concurrently deletes items from the list.

This patch is ported from commit 008549f6e8a1 ("mpt2sas: Refcount
fw_events and fix unsafe list usage"). These changes are also required
for mpt3sas.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Refcount sas_device objects and fix unsafe list usage
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:30 +0000 (17:30 +0530)]
mpt3sas: Refcount sas_device objects and fix unsafe list usage

sas_device objects can be referenced concurrently throughout the driver.
We need a way to make sure threads can't delete them out from under each
other. This patch adds the refcount and refactors the code to use it.

Additionally, we cannot iterate over the sas_device_list without holding
the lock or we risk corrupting random memory if items are added or
deleted as we iterate. This patch refactors _scsih_probe_sas() to use
the sas_device_list in a safe way.

This patch is ported from the following mpt2sas driver commit
d224fe0d6097 ("mpt2sas: Refcount sas_device objects and fix unsafe list
usage").

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: sysfs attribute to report Backup Rail Monitor Status
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:29 +0000 (17:30 +0530)]
mpt3sas: sysfs attribute to report Backup Rail Monitor Status

A new sysfs shost attribute called "BMR_status" is implemented to report
Backup Rail Monitor status.

This attribute is located in:

        /sys/class/scsi_host/host#/BMR_status

When reading this adapter attribute, the driver will output the state of
GPIO[24]. It returns "0" if BMR is healthy and "1" for failure.

If it returns an empty string then it means that there was an error
while obtaining the BMR status. Check dmesg for what error has occurred.

This sysfs shost attribute is mainly for WarpDrive controllers.

This commit is a port of 6c265660c262 ("mpt2sas: Provide sysfs attribute
to report Backup Rail Monitor Status").

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Ported WarpDrive product SSS6200 support
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:28 +0000 (17:30 +0530)]
mpt3sas: Ported WarpDrive product SSS6200 support

Ported the following list of WarpDrive-specific patches:

1. commit 0bdccdb0a090ad8dc5f851cad5e843244c410ee8 ("mpt2sas: WarpDrive
   New product SSS6200 support added")

2. commit 82a452581230b3ffc9d6475dffdb2568497b5fec ("mpt2sas: WarpDrive
   Infinite command retries due to wrong scsi command entry in MPI
   message")

3. commit ba96bd0b1d4a4e11f23671e1f375a5c8f46b0fe7 ("mpt2sas: Support
   for greater than 2TB capacity WarpDrive")

4. commit 4da7af9494b2f98a1503a2634059300c3e4615e6 ("mpt2sas: Do not
   retry a timed out direct IO for Warpdrive")

5. commit daeaa9df92bd742f4e6d4d6039d689277a8e31bd ("mpt2sas: Avoid type
   casting for direct I/O commands").

Also set the mpt2_ioctl_iocinfo adapter_type to:

1. MPT3_IOCTL_INTERFACE_SAS3 for Gen3 HBAs

2. MPT2_IOCTL_INTERFACE_SAS2_SSS6200 for Warp Drive

3. MPT2_IOCTL_INTERFACE_SAS2  for other Gen2 HBAs

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: fix for driver fails EEH, recovery from injected pci bus error
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:27 +0000 (17:30 +0530)]
mpt3sas: fix for driver fails EEH, recovery from injected pci bus error

This patch stops the driver to invoke kthread (which remove the dead
ioc) for some time while EEH recovery has started.

This patch is a port of commit b4730fb6e54a ("mpt2sas: fix for driver
fails EEH, recovery from injected pci bus error")'.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Manage MSI-X vectors according to HBA device type
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:26 +0000 (17:30 +0530)]
mpt3sas: Manage MSI-X vectors according to HBA device type

1. Do not enable MSI-X vectors for SAS2008 B0 controllers

2. Enable a single MSI-X vector for the following controller:

   a. SAS2004
   b. SAS2008
   c. SAS2008_1
   d. SAS2008_2
   e. SAS2008_3
   f. SAS2116_1
   g. SAS2116_2

3. Enable Combined Reply Post Queue Support (i.e. 96 MSI-X vectors)
   for Gen3 Invader/Fury C0 and above revision HBAs

4. Enable Combined Reply Post Queue Support (i.e. 96 MSI-X vectors)
   for all Intruder and Cutlass HBAs

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Don't send PHYDISK_HIDDEN RAID action request on SAS2 HBAs
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:25 +0000 (17:30 +0530)]
mpt3sas: Don't send PHYDISK_HIDDEN RAID action request on SAS2 HBAs

Avoid sending PHYDISK_HIDDEN RAID action requests to SAS2 controllers
since they don't support it.

Also enable fast_path only for SAS3 HBAs.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Build MPI SGL LIST on GEN2 HBAs and IEEE SGL LIST on GEN3 HBAs
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:24 +0000 (17:30 +0530)]
mpt3sas: Build MPI SGL LIST on GEN2 HBAs and IEEE SGL LIST on GEN3 HBAs

Gen2 HBAs use MPI scatter-gather lists whereas Gen3 HBAs use IEEE
scatter-gather lists. Modify the common code part in such a way that it
will build IEEE SGL tables for Gen3 HBAs and MPI SGL tables for Gen2
HBAs.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:23 +0000 (17:30 +0530)]
mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig

Currently there is a logging level option provided for each of our
drivers in the kernel configuration utility. Users can enable this
option to get more verbose information. By default it is enabled.

Only when this option is enabled will the functions which display the
required information get compiled in.

As we are merging the both drivers we can no longer provide this
configuration option. Remove the SCSI_MPTXSAS_LOGGING entry from Kconfig
and unconditionally enable logging (by removing the #ifdef
CONFIG_SCSI_MPT3SAS_LOGGING preprocessor check conditions) so that all
functions which are defined to display more verbose information get
compiled in.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Define 'hba_mpi_version_belonged' IOC variable
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:22 +0000 (17:30 +0530)]
mpt3sas: Define 'hba_mpi_version_belonged' IOC variable

1. Use 'hba_mpi_version_belonged' IOC varable to uniquely identify each
individual generation driver functionality at runtime.

2. Declare global variable 'driver_name' and use this variable while
reserving PCI regions and while allocating the IRQs.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt2sas: Remove .c and .h files from mpt2sas driver
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:21 +0000 (17:30 +0530)]
mpt2sas: Remove .c and .h files from mpt2sas driver

Remove .c and .h files which are no longer needed from mpt2sas
driver. We are reusing this code from mpt3sas.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agoMerge branch 'pm-tools'
Rafael J. Wysocki [Wed, 11 Nov 2015 23:22:56 +0000 (00:22 +0100)]
Merge branch 'pm-tools'

* pm-tools:
  Creating a common structure initialization pattern for struct option
  cpupower: Enable disabled Cstates if they are below max latency
  cpupower: Remove debug message when using cpupower idle-set -D switch
  cpupower: cpupower monitor reports uninitialized values for offline cpus
  tools/power turbostat: bugfix: print MAX_NON_TURBO_RATIO
  tools/power turbostat: simplify Bzy_MHz calculation

8 years agoMerge branch 'pm-domains'
Rafael J. Wysocki [Wed, 11 Nov 2015 23:22:50 +0000 (00:22 +0100)]
Merge branch 'pm-domains'

* pm-domains:
  PM / Domains: Allocate memory outside domain locks
  PM / Domains: Remove dev->driver check for runtime PM

8 years agompt2sas: Move Gen2 HBA's device registration to a separate file
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:20 +0000 (17:30 +0530)]
mpt2sas: Move Gen2 HBA's device registration to a separate file

1. Create a mpt2sas_module.c file for mpt2sas where GEN2 HBA devices
register with PCI, SML, IOCTL subsystems.

2. Updated the Makefile to use the object files from mpt3sas folder.

3. Defined a compilation flag SCSI_MPT2SAS which can be used to not
include those sections of code from mpt3sas driver which are not
required for mpt2sas driver.

4. Inherited automatic diag buffer feature from mpt3sas driver.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Move Gen3 HBA's device registration to a separate file
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:19 +0000 (17:30 +0530)]
mpt3sas: Move Gen3 HBA's device registration to a separate file

Created a mpt3sas_module.c file for mpt3sas driver where it can register
SAS3 HBA devices with PCI, SML, IOCTL subsystems. Also removed the
corresponding interfaces from mpt3sas_scsih.c file.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt3sas: Added mpt2sas driver definitions
Sreekanth Reddy [Wed, 11 Nov 2015 12:00:18 +0000 (17:30 +0530)]
mpt3sas: Added mpt2sas driver definitions

1. Added mpt2sas driver related macros in mpt3sas header files

2. Made scsi host's, raid class', pci's, ioctl's callback functions
global so that both drivers can use them.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agompt2sas: Use mpi headers from mpt3sas
Christoph Hellwig [Wed, 11 Nov 2015 12:00:17 +0000 (17:30 +0530)]
mpt2sas: Use mpi headers from mpt3sas

Use a single set of the hardware description headers instead of having
them in the source tree twice.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
8 years agotools include: Add compiler.h to list.h
Arnaldo Carvalho de Melo [Wed, 11 Nov 2015 15:54:42 +0000 (12:54 -0300)]
tools include: Add compiler.h to list.h

list.h needs WRITE_ONCE() since 7f5f873c6a07 ("rculist: Use WRITE_ONCE()
when deleting from reader-visible list") add it before including the
kernel's list.h file.

This fixes builds of 'make perf-tar-src-pkg' perf tool tarball builds,
i.e. out of tree builds.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-e0rb8f7jwz0jn24ttyick9u6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf probe: Verify parameters in two functions
Wang Nan [Fri, 6 Nov 2015 09:50:15 +0000 (09:50 +0000)]
perf probe: Verify parameters in two functions

On kernel with only one out of CONFIG_KPROBE_EVENTS and
CONFIG_UPROBE_EVENTS enabled, 'perf probe -d' causes a segfault because
perf_del_probe_events() calls probe_file__get_events() with a negative
fd.

This patch fixes it by adding parameter validation at the entry of
probe_file__get_events() and probe_file__get_rawlist(). Since they are
both non-static public functions (in .h file), parameter verifying is
required.

v1 -> v2: Verify fd at the head of probe_file__get_rawlist() instead of
          checking at call site (suggested by Masami and Arnaldo at [1,2]).

[1] http://lkml.kernel.org/r/50399556C9727B4D88A595C8584AAB37526048E3@GSjpTKYDCembx32.service.hitachi.net
[2] http://lkml.kernel.org/r/20151105155830.GV13236@kernel.org

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1446803415-83382-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf session: Add missing newlines to some pr_err() calls
Arnaldo Carvalho de Melo [Mon, 9 Nov 2015 20:12:03 +0000 (17:12 -0300)]
perf session: Add missing newlines to some pr_err() calls

Before:

  [acme@zoo linux]$ perf evlist
  WARNING: The perf.data file's data size field is 0 which is unexpected.
  Was the 'perf record' command properly terminated?
  non matching sample_type[acme@zoo linux]$

After:

  [acme@zoo linux]$ perf evlist
  WARNING: The perf.data file's data size field is 0 which is unexpected.
  Was the 'perf record' command properly terminated?
  non matching sample_type
  [acme@zoo linux]$

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-wscok3a2s7yrj8156oc2r6qe@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf annotate: Support full source file paths for srcline fix
Michael Petlan [Mon, 9 Nov 2015 15:33:31 +0000 (16:33 +0100)]
perf annotate: Support full source file paths for srcline fix

The --full-paths option did not show the full source file paths in the 'perf
annotate' tool, because the value of the option was not propagated into the
related functions.

With this patch the value of the --full-paths option is known to the function
that composes the srcline string, so it prints the full path when necessary.

Committer Note:

This affects annotate when the --print-line option is used:

  # perf annotate -h 2>&1 | grep print-line
      -l, --print-line      print matching source lines (may be slow)

Looking just at the lines that should be affected by this change:

Before:

  # perf annotate --print-line --full-paths --stdio fput | grep '\.[ch]:[0-9]\+'
     94.44 atomic64_64.h:114
      5.56 file_table.c:265
   file_table.c:265    5.56 :   ffffffff81219a00:       callq  ffffffff81769360 <__fentry__>
   atomic64_64.h:114   94.44 :   ffffffff81219a05:       lock decq 0x38(%rdi)

After:

  # perf annotate --print-line --full-paths --stdio fput | grep '\.[ch]:[0-9]\+'
     94.44 /home/git/linux/arch/x86/include/asm/atomic64_64.h:114
      5.56 /home/git/linux/fs/file_table.c:265
   /home/git/linux/fs/file_table.c:265    5.56 :   ffffffff81219a00:       callq  ffffffff81769360 <__fentry__>
   /home/git/linux/arch/x86/include/asm/atomic64_64.h:114   94.44 :   ffffffff81219a05:       lock decq 0x38(%rdi)
  #

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://permalink.gmane.org/gmane.linux.kernel.perf.user/2365
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
Yunlong Song [Mon, 9 Nov 2015 03:10:03 +0000 (11:10 +0800)]
perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore

Commit b31de018a6284a25e0fdfeb028e724f8417ec3b1 ("perf test: Enhance the
LLVM test: update basic BPF test program") dynamically creates file
llvm-src-base.c during the perf building.

Similarly, the commit 7af3f3d55b80cce40ad94b6b8e173dccedaf25e6 ("perf
test: Enhance the LLVM tests: add kbuild test") dynamically creates file
llvm-src-kbuild.c during the perf building. Add them to .gitignore.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: b31de018a628 ("perf test: Enhance the LLVM test: update basic BPF test program")
Fixes: 7af3f3d55b80 ("perf test: Enhance the LLVM tests: add kbuild test")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoMerge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Wed, 11 Nov 2015 18:21:34 +0000 (10:21 -0800)]
Merge tag 'firewire-update' of git://git./linux/kernel/git/ieee1394/linux1394

Pull firewire fix from Stefan Richter:
 "Work around JMicron initialization quirk, which ffected isochronous
  transmission, e.g. audio via FFADO or ALSA"

* tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: ohci: fix JMicron JMB38x IT context discovery

8 years agoDocumentation: Add minimal Mutt config for using Gmail
Eddie Kovsky [Fri, 6 Nov 2015 06:25:35 +0000 (23:25 -0700)]
Documentation: Add minimal Mutt config for using Gmail

This patch provides a minimal configuration to set up Mutt for
submitting plain text patches using Gmail.

Signed-off-by: Eddie Kovsky <ewk@edkovsky.org>
Reviewed-by: Darren Hart <dvhart@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agoDocumentation: Add note on sending files directly with Mutt
Eddie Kovsky [Fri, 6 Nov 2015 06:23:01 +0000 (23:23 -0700)]
Documentation: Add note on sending files directly with Mutt

Like 'git send-email', Mutt can also be used to send patches generated
with 'git format-patch'. This works regardless of the editor the
contributor has set up to use with Mutt.

Signed-off-by: Eddie Kovsky <ewk@edkovsky.org>
Reviewed-by: Darren Hart <dvhart@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agoMerge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Wed, 11 Nov 2015 17:45:24 +0000 (09:45 -0800)]
Merge branch 'for-linus-2' of git://git./linux/kernel/git/viro/vfs

Pull vfs update from Al Viro:

 - misc stable fixes

 - trivial kernel-doc and comment fixups

 - remove never-used block_page_mkwrite() wrapper function, and rename
   the function that is _actually_ used to not have double underscores.

* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fs: 9p: cache.h: Add #define of include guard
  vfs: remove stale comment in inode_operations
  vfs: remove unused wrapper block_page_mkwrite()
  binfmt_elf: Correct `arch_check_elf's description
  fs: fix writeback.c kernel-doc warnings
  fs: fix inode.c kernel-doc warning
  fs/pipe.c: return error code rather than 0 in pipe_write()
  fs/pipe.c: preserve alloc_file() error code
  binfmt_elf: Don't clobber passed executable's file header
  FS-Cache: Handle a write to the page immediately beyond the EOF marker
  cachefiles: perform test on s_blocksize when opening cache file.
  FS-Cache: Don't override netfs's primary_index if registering failed
  FS-Cache: Increase reference of parent after registering, netfs success
  debugfs: fix refcount imbalance in start_creating

8 years agoMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Wed, 11 Nov 2015 17:23:07 +0000 (09:23 -0800)]
Merge branch 'linus' of git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "This fixes a bug in the algif_hash interface that may lead to crashes
  when used with certain algorithms such as HMAC"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: algif_hash - Only export and import on sockets with data

8 years agoMerge tag 'pwm/for-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
Linus Torvalds [Wed, 11 Nov 2015 17:16:10 +0000 (09:16 -0800)]
Merge tag 'pwm/for-4.4-rc1' of git://git./linux/kernel/git/thierry.reding/linux-pwm

Pull pwm updates from Thierry Reding:
 "This round contains a couple of new drivers for the Marvell Berlin
  family of SoCs, various SoCs from Renesas and Broadcom as well as the
  backlight PWM present on MediaTek SoCs.

  Further existing drivers are extended to support a wider range of
  hardware.

  The remaining patches are minor fixes and cleanups across the board.

  Note that one of the patches included in this pull request is against
  arch/unicore32.  I've included it here because I couldn't get a
  response from Guan Xuetao and I consider the change low-risk.
  Equivalent patches have been merged and tested in Samsung and PXA
  trees.  The goal is to finally get rid of legacy code paths that have
  repeatedly been causing headaches"

* tag 'pwm/for-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (24 commits)
  pwm: sunxi: Fix whitespace issue
  pwm: sysfs: Make use of the DEVICE_ATTR_[RW][WO] macro's
  pwm: sysfs: Remove unnecessary temporary variable
  unicore32: nb0916: Use PWM lookup table
  pwm: pwm-rcar: Revise the device tree binding document about compatible
  pwm: Return -ENODEV if no PWM lookup match is found
  pwm: sun4i: Add support for PWM controller on sun5i SoCs
  pwm: Set enable state properly on failed call to enable
  pwm: lpss: Add support for runtime PM
  pwm: lpss: Add more Intel Broxton IDs
  pwm: lpss: Support all four PWMs on Intel Broxton
  pwm: lpss: Add support for multiple PWMs
  pwm-pca9685: enable ACPI device found on Galileo Gen2
  pwm: Add MediaTek display PWM driver support
  dt-bindings: pwm: Add MediaTek display PWM bindings
  pwm: tipwmss: Enable on TI DRA7x and AM437x
  pwm: atmel-hlcdc: add sama5d2 SoC support.
  pwm: Add Broadcom BCM7038 PWM controller support
  Documentation: dt: add Broadcom BCM7038 PWM controller binding
  pwm: Add support for R-Car PWM Timer
  ...

8 years agoDocumentation: dontdiff: remove media from dontdiff
Wang YanQing [Thu, 29 Oct 2015 17:15:39 +0000 (01:15 +0800)]
Documentation: dontdiff: remove media from dontdiff

media will hide all the changes in drivers/media.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agoDocumentation/SubmittingPatches: discuss In-Reply-To
Chris Metcalf [Thu, 5 Nov 2015 20:21:47 +0000 (15:21 -0500)]
Documentation/SubmittingPatches: discuss In-Reply-To

Add a paragraph suggesting best practices for when to link patches
to previous LKML messages via In-Reply-To.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
[jc: moved the added text to a separate section]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agoRemove email address from Documentation/filesystems/overlayfs.txt
NeilBrown [Sat, 7 Nov 2015 06:38:58 +0000 (17:38 +1100)]
Remove email address from Documentation/filesystems/overlayfs.txt

I'm getting a surprising large number of questions about overlayfs sent
to me personally, rather than to a relevant mailing list.

So remove my email address from the documentation, and add a note
about looking in the MAINTAINERS file.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agocan-doc: Add missing semicolon to example
Stefan Tatschner [Mon, 9 Nov 2015 13:17:09 +0000 (14:17 +0100)]
can-doc: Add missing semicolon to example

The example code for CAN_BCM,

connect(s, (struct sockaddr *)&addr, sizeof(addr))

lacks a semicolon at the end of the line. This patch adds that
missing semicolon to ensure that the given code snippet actually
compiles.

Signed-off-by: Stefan Tatschner <rumpelsepp@sevenbyte.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Linus Torvalds [Wed, 11 Nov 2015 17:03:01 +0000 (09:03 -0800)]
Merge branch 'next' of git://git./linux/kernel/git/rzhang/linux

Pull thermal updates from Zhang Rui:

 - Implement generic devfreq cooling mechanism through frequency
   reduction for devices using devfreq.  From Ørjan Eide and Javi
   Merino.

 - Introduce OMAP3 support on TI SoC thermal driver.  From Pavel Mack
   and Eduardo Valentin.

 - A bounch of small fixes on devfreq_cooling, Exynos, IMX, Armada, and
   Rockchip thermal drivers.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (24 commits)
  thermal: exynos: Directly return 0 instead of using local ret variable
  thermal: exynos: Remove unneeded semicolon
  thermal: exynos: Use IS_ERR() because regulator cannot be NULL
  thermal: exynos: Fix first temperature read after registering sensor
  thermal: exynos: Fix unbalanced regulator disable on probe failure
  devfreq_cooling: return on allocation failure
  thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r
  dt-bindings: rockchip-thermal: Add the pinctrl states in this document
  thermal: devfreq_cooling: Make power a u64
  thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister
  thermal: underflow bug in imx_set_trip_temp()
  thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula
  thermal: imx: register irq handler later in probe
  thermal: rockhip: fix setting thermal shutdown polarity
  thermal: rockchip: fix handling of invalid readings
  devfreq_cooling: add trace information
  thermal: Add devfreq cooling
  PM / OPP: get the voltage for all OPPs
  tools/thermal: tmon: use pkg-config also for CFLAGS
  linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS
  ...

8 years agoblock: don't hardcode blk_qc_t -> tag mask
Jens Axboe [Wed, 11 Nov 2015 16:37:34 +0000 (09:37 -0700)]
block: don't hardcode blk_qc_t -> tag mask

Use the shift/mask we use elsewhere.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agodax_io(): don't let non-error value escape via retval instead of EFAULT
Al Viro [Wed, 11 Nov 2015 02:42:49 +0000 (19:42 -0700)]
dax_io(): don't let non-error value escape via retval instead of EFAULT

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoblock: fix blk-core.c kernel-doc warning
Randy Dunlap [Sat, 31 Oct 2015 01:36:16 +0000 (18:36 -0700)]
block: fix blk-core.c kernel-doc warning

Fix kernel-doc warning in blk-core.c:

Warning(..//block/blk-core.c:1549): No description found for parameter 'same_queue_rq'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agofs/block_dev.c: Remove WARN_ON() when inode writeback fails
Vivek Goyal [Mon, 9 Nov 2015 16:23:40 +0000 (09:23 -0700)]
fs/block_dev.c: Remove WARN_ON() when inode writeback fails

If a block device is hot removed and later last reference to device
is put, we try to writeback the dirty inode. But device is gone and
that writeback fails.

Currently we do a WARN_ON() which does not seem to be the right thing.
Convert it to a ratelimited kernel warning.

Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
[jmoyer@redhat.com: get rid of unnecessary name initialization, 80 cols]
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoNVMe: add support for Apple NVMe controller
Stephan Günther [Tue, 3 Nov 2015 23:49:45 +0000 (00:49 +0100)]
NVMe: add support for Apple NVMe controller

Add PCI ID of Apple's NVMe controller.

Signed-off-by: Stephan Guenther <guenther@tum.de>
Signed-off-by: Maurice Leclaire <leclaire@in.tum.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoNVMe: use split lo_hi_{read,write}q
Stephan Günther [Sun, 8 Nov 2015 01:07:02 +0000 (18:07 -0700)]
NVMe: use split lo_hi_{read,write}q

Some controllers may require ordered split transfers even on 64bit
machines, e.g. Apple's NVMe controller as found in the MacBook8,1 and
MacBookAir7,1 (256/512GB models).

This patch enforces ordered split transfers on 64bit platforms, which
works around that issue for all controllers. As pointed out by Christoph
[1] there should be no performance impact due to that modification.

[1] http://lists.infradead.org/pipermail/linux-nvme/2015-November/002965.html

Signed-off-by: Stephan Guenther <guenther@tum.de>
Signed-off-by: Maurice Leclaire <leclaire@in.tum.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Updated by me to explicitly use lo_hi_read/writeq instead of playing
define tricks.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoblk-mq: mark __blk_mq_complete_request() static
Jens Axboe [Thu, 5 Nov 2015 21:32:55 +0000 (14:32 -0700)]
blk-mq: mark __blk_mq_complete_request() static

It's no longer used outside of blk-mq core.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoMAINTAINERS: add reference to new linux-block list
Jens Axboe [Thu, 5 Nov 2015 20:29:25 +0000 (13:29 -0700)]
MAINTAINERS: add reference to new linux-block list

In the past, I've resisted doing a non-lkml related block/storage
list. But we have more activity now than we previously did, and
ain't nobody got time to track and follow lkml.

So now linux-block@vger.kernel.org exists. Please CC your patches
related to block/storage here, and we'll have an easier time
tracking them.

Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoNVMe: Increase the max transfer size when mdts is 0
Sathyavathi M [Thu, 5 Nov 2015 19:52:28 +0000 (12:52 -0700)]
NVMe: Increase the max transfer size when mdts is 0

This patch address the issue when IO with 128KB from FIO is split into
two parts, 124KB and 4KB, due to max transfer size(127KB). This degrades
the device performance.

Signed-off-by: Sathyavathi M <sathya.m@samsung.com>
Acked-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agobrd: Refuse improperly aligned discard requests
Jan Kara [Wed, 4 Nov 2015 16:13:39 +0000 (17:13 +0100)]
brd: Refuse improperly aligned discard requests

Currently when improperly aligned discard request is submitted, we just
silently discard more / less data which results in filesystem corruption
in some cases. Refuse such misaligned requests.

Signed-off-by: Jan Kara <jack@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoALSA: hda/hdmi - apply Skylake fix-ups to Broxton display codec
Lu, Han [Wed, 11 Nov 2015 08:54:27 +0000 (16:54 +0800)]
ALSA: hda/hdmi - apply Skylake fix-ups to Broxton display codec

Broxton and Skylake have the same behavior on display audio. So this patch
applys Skylake fix-ups to Broxton.

Signed-off-by: Lu, Han <han.lu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 years agoMIPS: BMIPS: Enable GZIP ramdisk and timed printks
Florian Fainelli [Fri, 16 Oct 2015 19:51:58 +0000 (12:51 -0700)]
MIPS: BMIPS: Enable GZIP ramdisk and timed printks

Update bmips_be_defconfig and bmips_stb_defconfig to have GZIP ramdisk
support enabled by default as well was timed printks.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Kevin Cernekee <cernekee@gmail.com>
Reviewed-by: Dragan Stancevic <dragan.stancevic@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: jogo@openwrt.org
Patchwork: https://patchwork.linux-mips.org/patch/11307/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoALSA: ctxfi: constify rsc ops structures
Julia Lawall [Sun, 8 Nov 2015 22:40:41 +0000 (23:40 +0100)]
ALSA: ctxfi: constify rsc ops structures

The various rsc ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 years agoMIPS: Add xilfpga defconfig
Zubair Lutfullah Kakakhel [Mon, 26 Oct 2015 11:30:57 +0000 (11:30 +0000)]
MIPS: Add xilfpga defconfig

Add defconfig for MIPSfpga

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: robh+dt@kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11363/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: xilfpga: Add mipsfpga platform code
Zubair Lutfullah Kakakhel [Mon, 26 Oct 2015 11:30:56 +0000 (11:30 +0000)]
MIPS: xilfpga: Add mipsfpga platform code

The xilfpga platform will be DT only.

Add required platform code.
DT files have already been added separately.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: robh+dt@kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11364/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: xilfpga: Add xilfpga device tree files.
Zubair Lutfullah Kakakhel [Mon, 26 Oct 2015 11:30:55 +0000 (11:30 +0000)]
MIPS: xilfpga: Add xilfpga device tree files.

Add device tree files for the MIPSfpga platform.

See Documentation/devicetree/bindings/mips/img/xilfpga.txt
for details about MIPSfpga

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: robh+dt@kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11362/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agodt-bindings: MIPS: Document xilfpga bindings and boot style
Zubair Lutfullah Kakakhel [Mon, 26 Oct 2015 11:30:54 +0000 (11:30 +0000)]
dt-bindings: MIPS: Document xilfpga bindings and boot style

Xilfpga boots only with device-tree. Document the required properties
and the unique boot style

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: robh+dt@kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11361/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Make MIPS_CMDLINE_DTB default
Jonas Gorski [Mon, 12 Oct 2015 11:13:03 +0000 (13:13 +0200)]
MIPS: Make MIPS_CMDLINE_DTB default

Seval of-enabled machines (bmips, lantiq, xlp, pistachio, ralink) copied
the arguments from dtb to arcs_command_line to prevent the kernel from
overwriting them.

Since there is now an option to keep the dtb arguments, default to the
new option remove the "backup" to arcs_command_line in case of USE_OF is
enabled, except for those platforms that still take the bootloader
arguments or do not use any at all.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
Cc: Jayachandran C <jchandra@broadcom.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: James Hartley <james.hartley@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11285/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Make the kernel arguments from dtb available
Jonas Gorski [Mon, 12 Oct 2015 11:13:02 +0000 (13:13 +0200)]
MIPS: Make the kernel arguments from dtb available

Similar to how arm allows using selecting between bootloader arguments,
dtb arguments and both, allow to select them on mips. But since we have
less control over the place of the dtb do not modify it but instead use
the boot_command_line for merging them.

The default is "use bootloader arguments" to keep the current behaviour
as default.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
Cc: Jayachandran C <jchandra@broadcom.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: James Hartley <james.hartley@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11284/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Use USE_OF as the guard for appended dtb
Jonas Gorski [Mon, 12 Oct 2015 11:13:01 +0000 (13:13 +0200)]
MIPS: Use USE_OF as the guard for appended dtb

Since OF is now a user selectable symbol, the choice for appended dtb
support should only be visible when USE_OF is selected, as this
indicates actual machine support for device tree in MIPS.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
Cc: Jayachandran C <jchandra@broadcom.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: James Hartley <james.hartley@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11283/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BCM63XX: Use pr_* instead of printk
Gregory Fong [Wed, 14 Oct 2015 11:27:38 +0000 (04:27 -0700)]
MIPS: BCM63XX: Use pr_* instead of printk

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: Joe Perches <joe@perches.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11300/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Loongson: Cleanup CONFIG_LOONGSON_SUSPEND.
Huacai Chen [Wed, 7 Oct 2015 06:07:59 +0000 (14:07 +0800)]
MIPS: Loongson: Cleanup CONFIG_LOONGSON_SUSPEND.

Now LOONGSON_CHIPCFG register definition doesn't depend on CPUFREQ any
more, so CPU_SUPPORTS_CPUFREQ is no longer needed for suspend/resume.
Remove CONFIG_LOONGSON_SUSPEND and use CONFIG_SUSPEND instead.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11274/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: lantiq: Disable xbar fpi burst mode
John Crispin [Thu, 5 Nov 2015 02:56:23 +0000 (03:56 +0100)]
MIPS: lantiq: Disable xbar fpi burst mode

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11458/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: lantiq: Force the crossbar to big endian
John Crispin [Wed, 4 Nov 2015 12:14:15 +0000 (13:14 +0100)]
MIPS: lantiq: Force the crossbar to big endian

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11450/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: lantiq: Initialize the USB core on boot
John Crispin [Wed, 4 Nov 2015 12:14:14 +0000 (13:14 +0100)]
MIPS: lantiq: Initialize the USB core on boot

There is a DWC2 USB core in these SoCs. To make USB work we need to first
reset and power the state machine. These are SoC specific registers and
not part of the actual USB core.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11449/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: lantiq: Return correct value for fpi clock on ar9
John Crispin [Wed, 4 Nov 2015 12:14:13 +0000 (13:14 +0100)]
MIPS: lantiq: Return correct value for fpi clock on ar9

Some configurations of AR9 reported the incorrect speed for the fpi bus.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11448/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Add missing clock on rt305x
John Crispin [Wed, 4 Nov 2015 10:50:14 +0000 (11:50 +0100)]
MIPS: ralink: Add missing clock on rt305x

The rt305x support is missing a clock required by the ethernet driver.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11447/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Put the pci bus into reset state before rebooting the SoC
John Crispin [Wed, 4 Nov 2015 10:50:13 +0000 (11:50 +0100)]
MIPS: ralink: Put the pci bus into reset state before rebooting the SoC

Some pcie cards have problems after a reboot without this.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11446/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Don't set pm_power_off
John Crispin [Wed, 4 Nov 2015 10:50:12 +0000 (11:50 +0100)]
MIPS: ralink: Don't set pm_power_off

Setting pm_power_off is apprently wrong and makes drivers such as
gpio-poweroff not work.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11445/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Remove check for CONFIG_PCI on non-PCI SoCs
John Crispin [Wed, 4 Nov 2015 10:50:11 +0000 (11:50 +0100)]
MIPS: ralink: Remove check for CONFIG_PCI on non-PCI SoCs

The code currently panics if PCI is enabled but the SoC has no PCI bus.
This check is superfluous as the driver only loads if enabled in the
devicetree.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11444/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Fix invalid tick count
John Crispin [Wed, 4 Nov 2015 10:50:10 +0000 (11:50 +0100)]
MIPS: ralink: Fix invalid tick count

The current code adds the delta twice, which is obviously wrong.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11443/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Add tty detection
John Crispin [Thu, 5 Nov 2015 02:59:58 +0000 (03:59 +0100)]
MIPS: ralink: Add tty detection

MT7688 has several uarts that can be used for console. There are several
boards in the wild, that use ttyS1 or ttyS2. This patch applies a simply
autodetection routine to figure out which ttyS the bootloader used as
console. The uarts come up in 6 bit mode by default. The bootloader will
have set 8 bit mode on the console. Find that 8bit tty and use it.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11459/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Fix usb issue during frequency scaling
John Crispin [Wed, 4 Nov 2015 10:50:08 +0000 (11:50 +0100)]
MIPS: ralink: Fix usb issue during frequency scaling

If the USB HCD is running and the cpu is scaled too low, then the USB
stops working. Increase the idle speed of the core to fix this if the
kernel is built with USB support.

The "magic" values are taken from the Ralink SDK Kernel.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11441/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Unify SoC id handling
John Crispin [Wed, 4 Nov 2015 10:50:07 +0000 (11:50 +0100)]
MIPS: ralink: Unify SoC id handling

This makes detection a lot easier for audio, wifi, ... drivers.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11440/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: ralink: Add support for mt7688
John Crispin [Wed, 4 Nov 2015 10:50:06 +0000 (11:50 +0100)]
MIPS: ralink: Add support for mt7688

MT7688 is similar tot he MT7628 but has a different wifi radio.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11439/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add SATA/PHY nodes for bcm7362
Jaedon Shin [Tue, 27 Oct 2015 06:48:11 +0000 (15:48 +0900)]
MIPS: BMIPS: Add SATA/PHY nodes for bcm7362

Add AHCI and PHY device nodes to MIPS-based BCM7362 set-top box
platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Dragan Stancevic <dragan.stancevic@gmail.com>
Cc: linux-ide@vger.kernel.org
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11379/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add SATA/PHY nodes for bcm7346
Jaedon Shin [Tue, 27 Oct 2015 06:48:10 +0000 (15:48 +0900)]
MIPS: BMIPS: Add SATA/PHY nodes for bcm7346

Add AHCI and PHY device nodes to MIPS-based BCM7346 set-top box
platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Dragan Stancevic <dragan.stancevic@gmail.com>
Cc: linux-ide@vger.kernel.org
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11378/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add SATA/PHY nodes for bcm7425
Jaedon Shin [Tue, 27 Oct 2015 06:48:09 +0000 (15:48 +0900)]
MIPS: BMIPS: Add SATA/PHY nodes for bcm7425

Add AHCI and PHY device nodes to MIPS-based BCM7425 set-top box
platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Dragan Stancevic <dragan.stancevic@gmail.com>
Cc: linux-ide@vger.kernel.org
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11377/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add I2C node for bcm7362
Jaedon Shin [Wed, 21 Oct 2015 02:37:01 +0000 (11:37 +0900)]
MIPS: BMIPS: Add I2C node for bcm7362

Add I2C device nodes to BMIPS based BCM7362 platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11336/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add I2C node for bcm7360
Jaedon Shin [Wed, 21 Oct 2015 02:37:00 +0000 (11:37 +0900)]
MIPS: BMIPS: Add I2C node for bcm7360

Add I2C device nodes to BMIPS based BCM7360 platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11335/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add I2C node for bcm7358
Jaedon Shin [Wed, 21 Oct 2015 02:36:59 +0000 (11:36 +0900)]
MIPS: BMIPS: Add I2C node for bcm7358

Add I2C device nodes to BMIPS based BCM7358 platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11334/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: BMIPS: Add I2C node for bcm7346
Jaedon Shin [Wed, 21 Oct 2015 02:36:58 +0000 (11:36 +0900)]
MIPS: BMIPS: Add I2C node for bcm7346

Add I2C device nodes to BMIPS based BCM7346 platform.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11333/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Fix check for return value of request_mem_region()
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:44 +0000 (23:37 +0100)]
MIPS: Lantiq: Fix check for return value of request_mem_region()

request_mem_region() returns a pointer and not an integer with an error
value. A check for "< 0" on a pointer will cause problems, replace it
with not null checks instead. This was found with sparse.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11395/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add support for xRX220 SoC
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:43 +0000 (23:37 +0100)]
MIPS: Lantiq: Add support for xRX220 SoC

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11394/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add misc clocks
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:42 +0000 (23:37 +0100)]
MIPS: Lantiq: Add misc clocks

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11393/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add 1e103100.deu clock
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:41 +0000 (23:37 +0100)]
MIPS: Lantiq: Add 1e103100.deu clock

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11392/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add clock for mei driver
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:40 +0000 (23:37 +0100)]
MIPS: Lantiq: Add clock for mei driver

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11391/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add SoC detection for ar10 and grx390
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:39 +0000 (23:37 +0100)]
MIPS: Lantiq: Add SoC detection for ar10 and grx390

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11390/
Patchwork: https://patchwork.linux-mips.org/patch/11399/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add support for gphy firmware loading for ar10 and grx390
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:38 +0000 (23:37 +0100)]
MIPS: Lantiq: Add support for gphy firmware loading for ar10 and grx390

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11389/
Patchwork: https://patchwork.linux-mips.org/patch/11398/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add pmu bits for ar10 and grx390
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:37 +0000 (23:37 +0100)]
MIPS: Lantiq: Add pmu bits for ar10 and grx390

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11388/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add PMU bits for USB and SDIO devices
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:36 +0000 (23:37 +0100)]
MIPS: Lantiq: Add PMU bits for USB and SDIO devices

This adds the PUM bits for USB and SDIO devices

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11387/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Deactivate most of the devices by default
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:35 +0000 (23:37 +0100)]
MIPS: Lantiq: Deactivate most of the devices by default

When the SoC starts up most of the devices should be deactivated by the
PMU, they should be activated when they get used by their drivers. Some
devices should not get deactivate at startup like the serial, register
them in a special way.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11386/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add clock detection for grx390 and ar10
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:34 +0000 (23:37 +0100)]
MIPS: Lantiq: Add clock detection for grx390 and ar10

This add detection of some clocks on the ar10 and grx390.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11385/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Fix pp32 clock on vr9
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:33 +0000 (23:37 +0100)]
MIPS: Lantiq: Fix pp32 clock on vr9

The vendor code uses different clock values for this clock.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11384/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Rename CGU_SYS_VR9 register
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:32 +0000 (23:37 +0100)]
MIPS: Lantiq: Rename CGU_SYS_VR9 register

This register is also used on other SoCs.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11383/
Patchwork: https://patchwork.linux-mips.org/patch/11397/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMIPS: Lantiq: Add support for setting PMU register on AR10 and GRX390
Hauke Mehrtens [Wed, 28 Oct 2015 22:37:31 +0000 (23:37 +0100)]
MIPS: Lantiq: Add support for setting PMU register on AR10 and GRX390

This adds support for setting the PMU register on the AR10 and GRX390.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11382/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>