]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agoMerge branch 'topic/uek-4.1/xen' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Fri, 30 Oct 2015 16:24:43 +0000 (09:24 -0700)]
Merge branch 'topic/uek-4.1/xen' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/xen' of git://ca-git.us.oracle.com/linux-uek:
  xen-netfront: update num_queues to real created
  xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)

9 years agoxen-netfront: update num_queues to real created
Joe Jin [Mon, 19 Oct 2015 05:37:17 +0000 (13:37 +0800)]
xen-netfront: update num_queues to real created

Sometimes xennet_create_queues() may failed to created all requested
queues, we need to update num_queues to real created to avoid NULL
pointer dereference.

Orabug: 22069665

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David S. Miller <davem@davemloft.net>
9 years agoxen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)
Cathy Avery [Fri, 23 Oct 2015 10:12:46 +0000 (18:12 +0800)]
xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)

Orabug: 21935345

xen-blkfront will crash if the check to talk_to_blkback()
in blkback_changed()(XenbusStateInitWait) returns an error.
The driver data is freed and info is set to NULL. Later during
the close process via talk_to_blkback's call to xenbus_dev_fatal()
the null pointer is passed to and dereference in blkfront_closing.

Signed-off-by: Cathy Avery <cathy.avery@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 23 Oct 2015 20:45:33 +0000 (13:45 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek:
  qlcnic: Fix mailbox completion handling in spurious interrupt
  qlcnic: Update version to 5.3.63
  qlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory
  qlcnic: Add new VF device ID 0x8C30
  qlcnic: Print firmware minidump buffer and template header addresses
  qlcnic: Add support to enable capability to extend minidump for iSCSI
  qlcnic: Rearrange ordering of header files inclusion
  qlcnic: Fix corruption while copying
  net: qlcnic: Deletion of unnecessary memset
  net: qlcnic: clean up sysfs error codes
  qlcnic: sysfs interface for PCI BAR access
  bnx2fc: Update driver version to 2.9.6.
  bnx2fc: Add HZ to task management timeout.
  bnx2fc: Remove explicit logouts.
  bnx2fc: Fix FCP RSP residual parsing.
  bnx2fc: Set ELS transfer length correctly for middle path commands.
  bnx2fc: Remove 'NetXtreme II' from source files.
  bnx2fc: Update copyright for 2015.
  bnx2fc: Read npiv table from nvram and create vports.
  cnic: Add the interfaces to get FC-NPIV table.

9 years agoMerge tag 'v4.1.10-18#bug22013781v1' of git://ca-git.us.oracle.com/linux-etzhao-publi...
Santosh Shilimkar [Fri, 23 Oct 2015 16:24:38 +0000 (09:24 -0700)]
Merge tag 'v4.1.10-18#bug22013781v1' of git://ca-git.us.oracle.com/linux-etzhao-public into topic/uek-4.1/drivers

9 years agoMerge tag 'v4.1.10-18#bug22066190v1' of git://ca-git.us.oracle.com/linux-etzhao-publi...
Santosh Shilimkar [Fri, 23 Oct 2015 16:21:32 +0000 (09:21 -0700)]
Merge tag 'v4.1.10-18#bug22066190v1' of git://ca-git.us.oracle.com/linux-etzhao-public into topic/uek-4.1/drivers

9 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Thu, 22 Oct 2015 20:55:33 +0000 (13:55 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek: (97 commits)
  bnx2i: Fix call trace while device reset
  bnx2i: Fixed firmware assert, during target logout.
  fnic: Updating fnic driver version.
  fnic: fix for fnic crash when blk-mq enabled in UEK4
  mpt3sas : Bump mpt3sas driver version to 9.100.00.00
  mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
  mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
  mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  mpt3sas: Added support for customer specific branding
  mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
  mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
  mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  mpt3sas: Add branding string support for OEM custom HBA
  mpt3sas: Add branding string support for OEM's HBA
  mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  mpt3sas: Update MPI2 strings to MPI2.5
  mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  mpt3sas: Provides the physical location of sas drives
  mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  ...

9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Thu, 22 Oct 2015 20:55:25 +0000 (13:55 -0700)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: configs: sparc64: enable rds module
  uek-rpm: configs: sparc64: enable dtrace support

9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Thu, 22 Oct 2015 20:55:10 +0000 (13:55 -0700)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek:
  net/rds: start rdma listening after ib/iw initialization is done
  RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()
  RDS: Invoke ->laddr_check() in rds_bind() for explicitly bound transports.
  RDS: rds_conn_lookup() should factor in the struct net for a match
  RDS: Use a single TCP socket for both send and receive.
  RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune
  RDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_
  Revert "rds_rdma: rds_sendmsg should return EAGAIN if connection not setup"
  rds: make sure base connection is up on both sides
  rds_ib/iw: fixed big endianness conversion issue for dp->dp_ack_seq
  RDS: fix race condition when sending a message on unbound socket.
  RDS: verify the underlying transport exists before creating a connection
  mlx4: indicate memory resource exhaustion
  IB/mlx4: Use correct order of variables in log message
  mlx4_core: Introduce restrictions for PD update

9 years agoMerge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Thu, 22 Oct 2015 20:54:50 +0000 (13:54 -0700)]
Merge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek:
  sparc: Accommodate mem64_offset != mem_offset in pbm configuration

9 years agoMerge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Thu, 22 Oct 2015 20:54:42 +0000 (13:54 -0700)]
Merge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek:
  bonding: fix merge issue introduced by 21844825.
  export host-only net/core and net/ipv4 parameters to a container as read-only

9 years agobonding: fix merge issue introduced by 21844825.
Rama Nichanamatlu [Tue, 20 Oct 2015 06:24:53 +0000 (23:24 -0700)]
bonding: fix merge issue introduced by 21844825.

Manual merge of fix 17557056 from uek2 into uek4 thru 21844825 resulted
in bonding arp monitor sending arp requests but whose arp replies were
being ignored or not inspected. This bug fixes it.

Orabug: 22025692

Signed-off-by: Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
9 years agoMerge tag '4.1.6-12#22066196a1' of git://ca-git.us.oracle.com/linux-dduval-public...
Santosh Shilimkar [Thu, 22 Oct 2015 16:14:24 +0000 (09:14 -0700)]
Merge tag '4.1.6-12#22066196a1' of git://ca-git.us.oracle.com/linux-dduval-public into topic/uek-4.1/drivers

9 years agobnx2i: Fix call trace while device reset
Nilesh Javali [Tue, 19 May 2015 09:51:58 +0000 (05:51 -0400)]
bnx2i: Fix call trace while device reset

Orabug: 22066191

The driver waits for command completion event while cleanup of task
within the frwd lock and back locks. The frwd lock was still held
which caused the call trace while issuing a device reset.
Release the frwd lock along with the back lock
to avoid waiting in the lock context.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 35843048e7e979df3b7b9f2ad49e21797a11386b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2i: Fixed firmware assert, during target logout.
Tej Parkash [Tue, 19 May 2015 09:51:57 +0000 (05:51 -0400)]
bnx2i: Fixed firmware assert, during target logout.

Orabug: 22066191

Fix the firmware assert, during target logout in
case driver received FIN from target before waiting for
asyncronous response.

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 5fc956c243852608db1e4ef74b92bb4445313912)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agoexport host-only net/core and net/ipv4 parameters to a container as read-only
Thomas Tanaka [Fri, 2 Oct 2015 00:17:52 +0000 (17:17 -0700)]
export host-only net/core and net/ipv4 parameters to a container as read-only

export host-only net/core and net/ipv4 parameters to a container as read-only

For Oracle applications to run inside the Linux container, certain
net/core, net/ipv4 sysctl parameters need to be available.

On UEK2 and later kernels upto v3.5, these parameters were exported
as *read-only* to a container. However, in the newer kernels, upstream
has abandoned exporting it even in read-only mode.

To be able to support these applications unmodified on UEK4, we need to
restore that functionality. This patch does just that.

There is a plan to explore this further to come up with list of *must have*
parameters to be available inside containers and then propose upstream to
move them in the network namespace sysctls.

Orabug: 21880402

This patch is a backport from UEK3 (Orabug 21151210)

Acked-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Signed-off-by: Thomas Tanaka <thomas.tanaka@oracle.com>
9 years agoMerge branch 'topic-uek-4.1-drivers-b182e071.bug22029622' of git://ca-git.us.oracle...
Santosh Shilimkar [Thu, 22 Oct 2015 15:37:40 +0000 (08:37 -0700)]
Merge branch 'topic-uek-4.1-drivers-b182e071.bug22029622' of git://ca-git.us.oracle.com/linux-chander-public into topic/uek-4.1/drivers

9 years agoMerge tag 'v4.1.10-18#bug22049739' of git://ca-git.us.oracle.com/linux-zhaluo-public...
Santosh Shilimkar [Thu, 22 Oct 2015 15:36:23 +0000 (08:36 -0700)]
Merge tag 'v4.1.10-18#bug22049739' of git://ca-git.us.oracle.com/linux-zhaluo-public into topic/uek-4.1/drivers

9 years agonet/rds: start rdma listening after ib/iw initialization is done
Qing Huang [Tue, 6 Oct 2015 22:32:22 +0000 (15:32 -0700)]
net/rds: start rdma listening after ib/iw initialization is done

This prevents RDS from handling incoming rdma packets before RDS
completes initializing its recv/send components.

We don't need to call rds_rdma_listen_stop() if rds_rdma_listen_init()
didn't succeed.

We only need to call rds_ib_exit() if rds_ib_init() succeeds but
other parts fail. The same applies to rds_iw_init()/rds_iw_exit().
So we need to change error handling sequence accordingly.

Jump to ib/iw error handling path when we get an err code from
rds_rdma_listen_init().

Orabug: 21684447

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agofnic: Updating fnic driver version.
Jason Luo [Thu, 22 Oct 2015 06:23:50 +0000 (14:23 +0800)]
fnic: Updating fnic driver version.

From: Narsimhulu Musini <nmusini@cisco.com>

Update the driver versioin

Orabug: 22049739

Conflict:
    drivers/scsi/fnic/fnic.h

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
9 years agofnic: fix for fnic crash when blk-mq enabled in UEK4
Jason Luo [Thu, 22 Oct 2015 06:23:04 +0000 (14:23 +0800)]
fnic: fix for fnic crash when blk-mq enabled in UEK4

From: Narsimhulu Musini <nmusini@cisco.com>

fnic driver hits crash on accessing global tag set when blk-mq enabled.
fix disables blk-mq support for fnic.

Orabug: 22049739

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
9 years agosparc: Accommodate mem64_offset != mem_offset in pbm configuration
Allen Pais [Tue, 20 Oct 2015 18:42:59 +0000 (00:12 +0530)]
sparc: Accommodate mem64_offset != mem_offset in pbm configuration

PCI specs do not require mem_offset to be the same as mem64_offset.
This patch adds code to handle the cases where they are not the same
instead of panic'ing the kernel.

Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek-ofed into...
Santosh Shilimkar [Wed, 21 Oct 2015 18:15:14 +0000 (11:15 -0700)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek-ofed into topic/uek-4.1/ofed

* 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek-ofed:
  RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()
  RDS: Invoke ->laddr_check() in rds_bind() for explicitly bound transports.
  RDS: rds_conn_lookup() should factor in the struct net for a match
  RDS: Use a single TCP socket for both send and receive.
  RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune
  RDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_
  Revert "rds_rdma: rds_sendmsg should return EAGAIN if connection not setup"
  rds: make sure base connection is up on both sides
  rds_ib/iw: fixed big endianness conversion issue for dp->dp_ack_seq
  RDS: fix race condition when sending a message on unbound socket.
  RDS: verify the underlying transport exists before creating a connection
  mlx4: indicate memory resource exhaustion
  IB/mlx4: Use correct order of variables in log message
  mlx4_core: Introduce restrictions for PD update

9 years agoMerge branch 'topic/uek-4.1/ofed.rds-p2' into topic/uek-4.1/ofed
Mukesh Kacker [Wed, 21 Oct 2015 16:11:46 +0000 (09:11 -0700)]
Merge branch 'topic/uek-4.1/ofed.rds-p2' into topic/uek-4.1/ofed

* topic/uek-4.1/ofed.rds-p2:
  RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()
  RDS: Invoke ->laddr_check() in rds_bind() for explicitly bound transports.
  RDS: rds_conn_lookup() should factor in the struct net for a match
  RDS: Use a single TCP socket for both send and receive.
  RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune
  RDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_
  Revert "rds_rdma: rds_sendmsg should return EAGAIN if connection not setup"
  rds: make sure base connection is up on both sides
  rds_ib/iw: fixed big endianness conversion issue for dp->dp_ack_seq
  RDS: fix race condition when sending a message on unbound socket.
  RDS: verify the underlying transport exists before creating a connection

9 years agoRDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()
Sowmini Varadhan [Thu, 15 Oct 2015 02:11:54 +0000 (22:11 -0400)]
RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()

Orabug: 22012202

Backport of upstream commit 241b271952eb ("RDS-TCP: Reset tcp callbacks
if re-using an outgoing socket in rds_tcp_accept_one()")

Consider the following "duelling syn" sequence between two peers A and B:
             A B
             SYN1     -->
                  <-- SYN2
             SYN2ACK  -->

Note that the SYN/ACK has already been sent out by TCP before
rds_tcp_accept_one() gets invoked as part of callbacks.

If the inet_addr(A) is numerically less than inet_addr(B),
the arbitration scheme in rds_tcp_accept_one() will prefer the
TCP connection triggered by SYN1, and will send a CLOSE for the
SYN2 (just after the SYN2ACK was sent).

Since B also follows the same arbitration scheme, it will send the SYN-ACK
for SYN1 that will set up a healthy ESTABLISHED connection on both sides.
B will also get a  CLOSE for SYN2, which should result in the cleanup
of the TCP state machine for SYN2, but it should not trigger any
stale RDS-TCP callbacks (such as ->writespace, ->state_change etc),
that would disrupt the progress of the SYN2 based RDS-TCP  connection.

Thus the arbitration scheme in rds_tcp_accept_one() should restore
rds_tcp callbacks for the winner before setting them up for the
new accept socket, and also make sure that conn->c_outgoing
is set to 0 so that we do not trigger any reconnect attempts on the
passive side of the tcp socket in the future, in conformance with
commit c82ac7e69efe ("net/rds: RDS-TCP: only initiate reconnect attempt
on outgoing TCP socket.")

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoRDS: Invoke ->laddr_check() in rds_bind() for explicitly bound transports.
Sowmini Varadhan [Thu, 15 Oct 2015 00:37:47 +0000 (20:37 -0400)]
RDS: Invoke ->laddr_check() in rds_bind() for explicitly bound transports.

Orabug: 22012202

Backport of upstream commit 486798001b92 ("RDS: Invoke ->laddr_check()
in rds_bind() for explicitly bound transports.")

The IP address passed to rds_bind() should be vetted by the
transport's ->laddr_check() for a previously bound transport.
This needs to be done to avoid cases where, for example,
the application has asked for an IB transport,
but the IP address passed to bind is only usable on
ethernet interfaces.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agoRDS: rds_conn_lookup() should factor in the struct net for a match
Sowmini Varadhan [Wed, 14 Oct 2015 19:52:23 +0000 (15:52 -0400)]
RDS: rds_conn_lookup() should factor in the struct net for a match

Orabug: 22012202

Backport of upstream commit 8f384c0177a0 ("RDS: rds_conn_lookup() should
factor in the struct net for a match")

Only return a conn if the rds_conn_net(conn) matches the struct
net passed to rds_conn_lookup().

Fixes: 467fa15356ac ("RDS-TCP: Support multiple RDS-TCP listen endpoints,
           one per netns.")

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agoRDS: Use a single TCP socket for both send and receive.
Sowmini Varadhan [Wed, 14 Oct 2015 14:29:31 +0000 (10:29 -0400)]
RDS: Use a single TCP socket for both send and receive.

Orabug: 22012202

Backport of upstream commit 3b20fc389705 ("RDS: Use a single TCP
socket for both send and receive.");

Commit f711a6ae062c ("net/rds: RDS-TCP: Always create a new rds_sock
for an incoming connection.") modified rds-tcp so that an incoming SYN
would ignore an existing "client" TCP connection which had the local
port set to the transient port.  The motivation for ignoring the existing
"client" connection in f711a6ae was to avoid race conditions and an
endless duel of reconnect attempts triggered by a restart/abort of one
of the nodes in the TCP connection.

However, having separate sockets for active and passive sides
is avoidable, and the simpler model of a single TCP socket for
both send and receives of all RDS connections associated with
that tcp socket makes for easier observability. We avoid the race
conditions from f711a6ae by attempting reconnects in rds_conn_shutdown
if, and only if, the (new) c_outgoing bit is set for RDS_TRANS_TCP.
The c_outgoing bit is initialized in __rds_conn_create().

A side-effect of re-using the client rds_connection for an incoming
SYN is the potential of encountering duelling SYNs, i.e., we
have an outgoing RDS_CONN_CONNECTING socket when we get the incoming
SYN. The logic to arbitrate this criss-crossing SYN exchange in
rds_tcp_accept_one() has been modified to emulate the BGP state
machine: the smaller IP address should back off from the connection
attempt.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agoRDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune
Sowmini Varadhan [Wed, 14 Oct 2015 11:23:20 +0000 (07:23 -0400)]
RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune

Orabug: 22012202

Backport of upstream commit 1edd6a14d24f ("RDS-TCP: Do not bloat
sndbuf/rcvbuf in rds_tcp_tune")

Using the value of RDS_TCP_DEFAULT_BUFSIZE (128K)
clobbers efficient use of TSO because it inflates the size_goal
that is computed in tcp_sendmsg/tcp_sendpage and skews packet
latency, and the default values for these parameters actually
results in significantly better performance.

In request-response tests using rds-stress with a packet size of
100K with 16 threads (test parameters -q 100000 -a 256 -t16 -d16)
between a single pair of IP addresses achieves a throughput of
6-8 Gbps. Without this patch, throughput maxes at 2-3 Gbps under
equivalent conditions on these platforms.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoRDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_
Sowmini Varadhan [Wed, 14 Oct 2015 01:03:04 +0000 (21:03 -0400)]
RDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_

Backport of upstream commit 76b29ef120f5 ("RDS-TCP: Set up MSG_MORE and
MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_xmit")

For the same reasons as commit 2f5338442425 ("tcp: allow splice() to
build full TSO packets") and commit 35f9c09fe9c7 ("tcp: tcp_sendpages()
should call tcp_push() once"), rds_tcp_xmit may have multiple pages to
send, so use the MSG_MORE and MSG_SENDPAGE_NOTLAST as hints to
tcp_sendpage()

Orabug: 22012202

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agoRevert "rds_rdma: rds_sendmsg should return EAGAIN if connection not setup"
Rama Nichanamatlu [Tue, 20 Oct 2015 13:16:25 +0000 (06:16 -0700)]
Revert "rds_rdma: rds_sendmsg should return EAGAIN if connection not setup"

This reverts commit 3d6e0fed8edc2f5d5439bee22c2fa153096c77ea.

Reverted because fix has bug that affects rds qos threshold
settings.

Orabug: 21664735

Signed-off-by: Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
Acked-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agords: make sure base connection is up on both sides
Ajaykumar Hotchandani [Tue, 5 May 2015 03:09:42 +0000 (20:09 -0700)]
rds: make sure base connection is up on both sides

Current RDS active side requires zero lane path records for establishing
non-zero lane connection. For this reason, active side makes sure to
have zero lane connection up before establishing non-zero lane
connection. Passive side does not require to fetch path records, so it
does not have this check.

This has possibility of connection having non-ideal path records in
following scenario:
- Host1 had PORT_UP event.
- Lane0 and Lane6 connection went down.
- Lane0 connection came up.
- Host1 sent connection request for Lane6.
- Host2 had PORT_UP event.
- Lane0 and Lane6 connections went down.
- Host2 sent DREQ for Lane0.
- Since Lane6 connection is not up, it does not require to do anything.
- Host2 received connection request from host1 having old path records
  for Lane6.
- Lane6 connection got established on old path records.

Following are impacts of having connections with non-ideal path records:
- minor performance hit because of extra hop with ISL path
- in port failure scenario, it impacts connections which are not related
  to that port.

With this patch we make sure that base connection is up on passive side
as well before allowing to establish connection.

(This is port of UEK2 commit 7ab7ef255a)

Orabug: 21675157

Tested-by: Michael Nowak <michael.nowak@oracle.com>
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Acked-by: Qing Huang <qing.huang@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agords_ib/iw: fixed big endianness conversion issue for dp->dp_ack_seq
Qing Huang [Tue, 13 Oct 2015 00:23:50 +0000 (17:23 -0700)]
rds_ib/iw: fixed big endianness conversion issue for dp->dp_ack_seq

dp->dp_ack_seq is used in big endian format. We need to do the
big endianness conversion when we assign a value in host format
to it.

(This patch is ported from UEK2)

Orabug: 21684819

Acked-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agoRDS: fix race condition when sending a message on unbound socket.
Quentin Casasnovas [Mon, 19 Oct 2015 21:22:27 +0000 (14:22 -0700)]
RDS: fix race condition when sending a message on unbound socket.

Sasha's found a NULL pointer dereference in the RDS connection code when
sending a message to an apparently unbound socket.  The problem is caused
by the code checking if the socket is bound in rds_sendmsg(), which checks
the rs_bound_addr field without taking a lock on the socket.  This opens a
race where rs_bound_addr is temporarily set but where the transport is not
in rds_bind(), leading to a NULL pointer dereference when trying to
dereference 'trans' in __rds_conn_create().

Vegard wrote a reproducer for this issue, so kindly ask him to share if
you're interested.

I cannot reproduce the NULL pointer dereference using Vegard's reproducer
with this patch, whereas I could without.

Complete earlier incomplete fix to CVE-2015-6937:

  74e98eb08588 ("RDS: verify the underlying transport exists before creating a connection")

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Reviewed-by: Vegard Nossum <vegard.nossum@oracle.com>
Reviewed-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Chien Yen <chien.yen@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: stable@vger.kernel.org
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoRDS: verify the underlying transport exists before creating a connection
Sasha Levin [Tue, 8 Sep 2015 14:53:40 +0000 (10:53 -0400)]
RDS: verify the underlying transport exists before creating a connection

There was no verification that an underlying transport exists when creating
a connection, this would cause dereferencing a NULL ptr.

It might happen on sockets that weren't properly bound before attempting to
send a message, which will cause a NULL ptr deref:

[135546.047719] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
[135546.051270] Modules linked in:
[135546.051781] CPU: 4 PID: 15650 Comm: trinity-c4 Not tainted 4.2.0-next-20150902-sasha-00041-gbaa1222-dirty #2527
[135546.053217] task: ffff8800835bc000 ti: ffff8800bc708000 task.ti: ffff8800bc708000
[135546.054291] RIP: __rds_conn_create (net/rds/connection.c:194)
[135546.055666] RSP: 0018:ffff8800bc70fab0  EFLAGS: 00010202
[135546.056457] RAX: dffffc0000000000 RBX: 0000000000000f2c RCX: ffff8800835bc000
[135546.057494] RDX: 0000000000000007 RSI: ffff8800835bccd8 RDI: 0000000000000038
[135546.058530] RBP: ffff8800bc70fb18 R08: 0000000000000001 R09: 0000000000000000
[135546.059556] R10: ffffed014d7a3a23 R11: ffffed014d7a3a21 R12: 0000000000000000
[135546.060614] R13: 0000000000000001 R14: ffff8801ec3d0000 R15: 0000000000000000
[135546.061668] FS:  00007faad4ffb700(0000) GS:ffff880252000000(0000) knlGS:0000000000000000
[135546.062836] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[135546.063682] CR2: 000000000000846a CR3: 000000009d137000 CR4: 00000000000006a0
[135546.064723] Stack:
[135546.065048]  ffffffffafe2055c ffffffffafe23fc1 ffffed00493097bf ffff8801ec3d0008
[135546.066247]  0000000000000000 00000000000000d0 0000000000000000 ac194a24c0586342
[135546.067438]  1ffff100178e1f78 ffff880320581b00 ffff8800bc70fdd0 ffff880320581b00
[135546.068629] Call Trace:
[135546.069028] ? __rds_conn_create (include/linux/rcupdate.h:856 net/rds/connection.c:134)
[135546.069989] ? rds_message_copy_from_user (net/rds/message.c:298)
[135546.071021] rds_conn_create_outgoing (net/rds/connection.c:278)
[135546.071981] rds_sendmsg (net/rds/send.c:1058)
[135546.072858] ? perf_trace_lock (include/trace/events/lock.h:38)
[135546.073744] ? lockdep_init (kernel/locking/lockdep.c:3298)
[135546.074577] ? rds_send_drop_to (net/rds/send.c:976)
[135546.075508] ? __might_fault (./arch/x86/include/asm/current.h:14 mm/memory.c:3795)
[135546.076349] ? __might_fault (mm/memory.c:3795)
[135546.077179] ? rds_send_drop_to (net/rds/send.c:976)
[135546.078114] sock_sendmsg (net/socket.c:611 net/socket.c:620)
[135546.078856] SYSC_sendto (net/socket.c:1657)
[135546.079596] ? SYSC_connect (net/socket.c:1628)
[135546.080510] ? trace_dump_stack (kernel/trace/trace.c:1926)
[135546.081397] ? ring_buffer_unlock_commit (kernel/trace/ring_buffer.c:2479 kernel/trace/ring_buffer.c:2558 kernel/trace/ring_buffer.c:2674)
[135546.082390] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
[135546.083410] ? trace_event_raw_event_sys_enter (include/trace/events/syscalls.h:16)
[135546.084481] ? do_audit_syscall_entry (include/trace/events/syscalls.h:16)
[135546.085438] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
[135546.085515] rds_ib_laddr_check(): addr 36.74.25.172 ret -99 node type -1

Orabug: 22010933

Acked-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Acked-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 74e98eb085889b0d2d4908f59f6e00026063014f)

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/ofed.mlnx2.4-p3.orclFixes' into topic/uek-4.1/ofed
Mukesh Kacker [Wed, 21 Oct 2015 15:09:05 +0000 (08:09 -0700)]
Merge branch 'topic/uek-4.1/ofed.mlnx2.4-p3.orclFixes' into topic/uek-4.1/ofed

* topic/uek-4.1/ofed.mlnx2.4-p3.orclFixes:
  mlx4: indicate memory resource exhaustion
  IB/mlx4: Use correct order of variables in log message
  mlx4_core: Introduce restrictions for PD update

9 years agomlx4: indicate memory resource exhaustion
Ajaykumar Hotchandani [Wed, 14 Oct 2015 23:30:26 +0000 (16:30 -0700)]
mlx4: indicate memory resource exhaustion

Change here provides details about pid, which resource got exhausted and
current limits for that resource.

These details are requested by database folks to attempt recovery.

This is port from UEK2 commit f3774780e30

Orabug: 21549767

Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agoIB/mlx4: Use correct order of variables in log message
Wengang Wang [Thu, 15 Oct 2015 01:04:35 +0000 (09:04 +0800)]
IB/mlx4: Use correct order of variables in log message

There was a incorrect order of variables in mlx4_log().
This fix corrects that mistake.

Orabug: 21906781

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agomlx4_core: Introduce restrictions for PD update
Ajaykumar Hotchandani [Wed, 14 Oct 2015 23:38:11 +0000 (16:38 -0700)]
mlx4_core: Introduce restrictions for PD update

From 2.31.5350 firmware onwards,
- RDS with RDMA data transfer stopped working.
- Mellanox has introduced limitations related to PD updates.
  These imposed limitations are inline with PRM.

This patch makes driver in sync with these imposed limitations.
Mellanox R&D has approved this patch.

It's been tested on both old firmware (2.11.1280) and new firmware.

Mellanox case number is 179121.
OraBug: 22022389

v2: Change subject as per suggestion from Yuval

Tested-by: Pierre Orzechowski <pierre.e.orzechowski@oracle.com>
Tested-by: Kushagra Misra <kushagra.misra@oracle.com>
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
9 years agouek-rpm: configs: sparc64: enable rds module
Allen Pais [Tue, 20 Oct 2015 18:19:27 +0000 (23:49 +0530)]
uek-rpm: configs: sparc64: enable rds module

 Orabug:  22068201

Signed-off-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: configs: sparc64: enable dtrace support
Allen Pais [Tue, 20 Oct 2015 18:16:31 +0000 (23:46 +0530)]
uek-rpm: configs: sparc64: enable dtrace support

DTrace needs enabling in the default configs, not just in the specfile.
Turn it on (and all its dependencies too, though they should largely be
filled in automatically in any case).

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
9 years agoMerge branch 'uek4-avago' of git://ca-git.us.oracle.com/linux-mkp-public into topic...
Santosh Shilimkar [Wed, 21 Oct 2015 00:53:40 +0000 (17:53 -0700)]
Merge branch 'uek4-avago' of git://ca-git.us.oracle.com/linux-mkp-public into topic/uek-4.1/drivers

* 'uek4-avago' of git://ca-git.us.oracle.com/linux-mkp-public: (76 commits)
  mpt3sas : Bump mpt3sas driver version to 9.100.00.00
  mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
  mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
  mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  mpt3sas: Added support for customer specific branding
  mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
  mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
  mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  mpt3sas: Add branding string support for OEM custom HBA
  mpt3sas: Add branding string support for OEM's HBA
  mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  mpt3sas: Update MPI2 strings to MPI2.5
  mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  mpt3sas: Provides the physical location of sas drives
  mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  mpt3sas: Remove redundancy code while freeing the controller resources.
  mpt3sas: Don't block the drive when drive addition under the control of SML
  mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.
  mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  ...

9 years agompt3sas : Bump mpt3sas driver version to 9.100.00.00
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:06 +0000 (12:25 +0530)]
mpt3sas : Bump mpt3sas driver version to 9.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit c75683ca13d12a700531864bcd3118e94bc9eaa0)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:05 +0000 (12:25 +0530)]
mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os

Issue: When the disks are getting discovered and assigned device
handles by the kernel, a device block followed by an unblock
(due to broadcast primitives) issued by the driver is
interspersed by the kernel changing the state of the device.
Therefore the unblock by the driver results in a no operation
within the kernel API.

To fix this one, the below patch checks the return of the unblock API
and performs a block followed by an unblock to unfreeze the block
layer's I/O queue. Sufficient checks and prints are also added in the
driver to identify this condition caused by the kernel.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit df838f92f3f5240dca54e1629e8547818e8ea646)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single...
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:04 +0000 (12:25 +0530)]
mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API

Added dma_mapping_error() API after mapping an address with dma_map_single()
API.  Otherwise when CONFIG_DMA_API_DEBUG is enabled in the kernel, then it
complains about mpt3sas driver not calling dma_mapping_error after mapping an
address with dma_map_single

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 36814028ad720165a6febcf9ddd7de20833fd240)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue...
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:03 +0000 (12:25 +0530)]
mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API

Created a thread using alloc_ordered_workqueue() API in order to process
the works from firmware Work-queue sequentially instead of
create_singlethread_workqueue() API.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit bdff785e4f593218816fa3677e043aae1481aa98)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Added support for customer specific branding
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:02 +0000 (12:25 +0530)]
mpt3sas: Added support for customer specific branding

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97           0x1137                 0x154           Cisco 9300-8i 12Gbps SAS HBA
0x1000         0x97           0x1137                 0x155           Cisco 12G Modular SAS Pass through Controller
0x1000         0x97           0x1137                 0x156           UCS C3X60 12G SAS Pass through Controller

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit d8eb4a47c70b4bab34b938d2f682044687f53c64)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Return host busy error status to SML when DMA mapping of scatter gather...
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:01 +0000 (12:25 +0530)]
mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command

scsi_dma_map API will return a negative value (i.e. -ENOMEM)
if DMA mapping of sg lists fails and zero if the sg list in the
SCSI cmd is NULL. But drivers doesn't handled sg list DMA mapping
failure case properly.

So, Updated the code to return host busy error status to SCSI MID Layer(SML),
when DMA mapping of scatter gather list fails for a SCSI command.
So that SML will retry this SCSI cmd after some time.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 62f5c74c97037c7c00fdefb69dcfe39810c34a05)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:00 +0000 (12:25 +0530)]
mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081

For any SCSI command, if the driver receives
IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then
that command will be completed with DID_RESET host status.

The definition of this log info value is
"Virtual IO has failed and has to be retried".

Firmware will provide this log info value with IOC Status
"SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume)
is pulled and pushed back within some minimal delay.
With this log info value, firmware informs the driver to retry the
failed IO command infinite times, so to provide some time for the
firmware to discover the reinserted drive successfully instated of
just retrying failed command for five times(doesn't giving enough
time for firmware to complete the drive discovery) and failing the
IO permanently even though drive came back successfully.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 3898f08e8ccfc8b7b4c297960ecdde970869e950)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: MPI 2.5 Rev K (2.5.6) specifications
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:59 +0000 (12:24 +0530)]
mpt3sas: MPI 2.5 Rev K (2.5.6) specifications

Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and 2.00.35
header files

1) Added a minimum size requirement for target mode command buffers.

2) Added MinMSIxIndex and MaxMSIxIndex fields to CommandBufferPostBase
   Request.

3) For BIOS Page 1, added SSUTimeout field, and added Product Name String
   Format bits to the BiosOptions field

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit a6f84009b9d7ca97c400ca929f9d58f43b0ece9d)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Bump mpt3sas driver version to v6.100.00.00
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:58 +0000 (12:24 +0530)]
mpt3sas: Bump mpt3sas driver version to v6.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 2b89669ae4addfa68a58e0fc16afdd24739720d8)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Add branding string support for OEM custom HBA
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:57 +0000 (12:24 +0530)]
mpt3sas: Add branding string support for OEM custom HBA

Add the following OEM's branding to the mpt3sas driver.

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97         SVID = 0x1137             0x014C          Cisco 9300-8E 12G SAS HBA

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 38e4141ecb0e59c93d85ec5948f98d1f1e331a88)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Add branding string support for OEM's HBA
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:56 +0000 (12:24 +0530)]
mpt3sas: Add branding string support for OEM's HBA

Added the following Dell branding to the mpt3sas driver.

"VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit fb84dfc44718ef4099a827d147f738e428828d02)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:55 +0000 (12:24 +0530)]
mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files

Following is the change set,

1. Added more defines for the BiosOptions field of MPI2_CONFIG_PAGE_BIOS_1.

2. Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC definition.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 35c319b47884e49d9d0a84779097916ccb173947)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Update MPI2 strings to MPI2.5
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:54 +0000 (12:24 +0530)]
mpt3sas: Update MPI2 strings to MPI2.5

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 2e26c3853206ba166c3434e5f2ca4c82078ad84e)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Bump mpt3sas Driver version to v5.100.00.00
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:53 +0000 (12:24 +0530)]
mpt3sas: Bump mpt3sas Driver version to v5.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit f9d81cfc23151eb6e9e498663c9784c351646d0e)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Provides the physical location of sas drives
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:52 +0000 (12:24 +0530)]
mpt3sas: Provides the physical location of sas drives

This Patch will provide more details of the devices such as slot number,
enclosure logical id, enclosure level & connector name in the following
scenarios,

- When end device is added in the topology,

- When the end device is removed from the setup,

- When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during
  error handling,

- When any command to the device fails with Sense key Hardware error or Medium
  error or Unit Attention,

- When firmware returns device error or device not ready status for the end
  device,

- When a Predicted fault is detected on an end device.

This information can be used by the user to identify the location of the
desired drive in the topology.

Driver will get these information by reading the sas device page0.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit e6d45e3e7e6582fa206ef84631639ce70d50e5c5)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: MPI 2.5 Rev I (2.5.4) specifications.
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:51 +0000 (12:24 +0530)]
mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.

Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and 2.00.33 header
files

Below is the change set from the MPI specification for I Rev

1) Added Base Enclosure Level bit to the Flags field of Manufacturing Page 7.

2) Updated description of the MaxTargetPortConnectTime field of SAS IO Unit
   Page 1.

3) Added EnclosureLevel and ConnectorName fields to SAS Device Page 0. Also,
   added EnclosureLevel and ConnectorName Valid bit to the Flags field.

4) Added EnclosureLevel field to SAS Enclosure Page 0. Also, added
   EnclosureLevel Valid bit to the Flags field.

5) Added value for BIOS image to HashImageType.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit a94bea343c2f747c62ef66b52d2430e6aeb75434)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Remove redundancy code while freeing the controller resources.
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:50 +0000 (12:24 +0530)]
mpt3sas: Remove redundancy code while freeing the controller resources.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 580d4e3153f0d7a9a9235b675b0b7b13e2185a8b)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Don't block the drive when drive addition under the control of SML
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:49 +0000 (12:24 +0530)]
mpt3sas: Don't block the drive when drive addition under the control of SML

During hot-plugging of a disk(having a flaky link), the disk addition
stops and any further disk addition or removal doesn't happen on that
controller.

This is because, when driver receives DELAY_NOT_RESPONDING event for a disk
while it is undergoing addition at the SCSI Transport layer, the driver
would block the I/O to that disk resulting in a deadlock. i.e the disk
addition work couldn't be completed at the SCSI Transport Layer as it
can't send any I/Os (such as Inquiry, Report LUNs etc) to the disk as
I/Os are blocked to this drive. Also any subsequent device removal
(TARGET_NOT_RESPONDING) or link update(RC_PHY_CHANGED) event couldn't be
processed as they are in the queue to get processed after disk addition
event.

Description of Change:
Don't block the drive when drive addition is under the control of SML.
So that SML won't be blocked of issuing the device dicovery commands
(such as Inquiry, Report LUNs etc).

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit e4bc7f5c21a18cab9acd30940df0ee791fcd7b9e)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets...
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:48 +0000 (12:24 +0530)]
mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.

Driver initialization fails if driver tries to send IOC facts request message
when the IOC is in reset or in a fault state.

This patch will make sure that

 1.Driver to send IOC facts request message only if HBA is in operational or
   ready state.

 2.If IOC is in fault state, a diagnostic reset would be issued.

 3.If IOC is in reset state then driver will wait for 10 seconds to exit out
   of reset state.  If the HBA continues to be in reset state, then the HBA
   wouldn't be claimed by the driver.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 4dc8c8087f0304ff8d06f862520406b11aac4a66)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:47 +0000 (12:24 +0530)]
mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support

In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to
up-to 96.

Following are changes that are done in this patch

1. This feature is enabled only for SAS3 C0 and higher revision cards and also
only when reply post free queue count is greater than 8.

2. To support this feature 12 SupplementalReplyPostHostIndex system interfaces
are used. MSI-X index numbered from 0 to 7 use the first
SupplementalReplyPostHostIndex system interface to update its corresponding
ReplyPostHostIndex values, MSI-X index numbered from 8 to 15 will use the
second SupplementalReplyPostHostIndex system interface and so on. These 12
SuppementalReplyPostHostIndex system interfaces address are saved in the array
replyPostRegisterIndex[].

3. As each SupplementalReplyPostHostIndex register supports 8 MSI-X
vectors. So MSIxIndex field in these register must contain a value between 0
and 7.

4. After processing the reply descriptors from a reply post free queues then
update the new reply post host index value in ReplyPostHostIndex field and
(msix_index mod 8) value in MSIxIndex field of SupplementalReplyPostHostIndex
register. The Address of this SupplementalReplyPostHostIndex register is
retrived from (msix_index/8)th entry of replyPostRegisterIndex[] array.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit fb77bb5376a55f4e6c8d9243249e82831a276ee5)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt2sas: Refcount fw_events and fix unsafe list usage
Calvin Owens [Fri, 14 Aug 2015 01:48:10 +0000 (18:48 -0700)]
mpt2sas: Refcount fw_events and fix unsafe list usage

The fw_event_work struct is concurrently referenced at shutdown, so
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.

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Tested-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
Acked-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 008549f6e8a1dc4aeea4a8d64184909786b27713)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt2sas: Refcount sas_device objects and fix unsafe list usage
Calvin Owens [Fri, 14 Aug 2015 01:48:09 +0000 (18:48 -0700)]
mpt2sas: Refcount sas_device objects and fix unsafe list usage

These 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.

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Tested-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
Acked-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit d224fe0d609734888af63656ddaf3a8352f0a7b5)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt2sas, mpt3sas: Abort initialization if no memory I/O resources detected
Sreekanth Reddy [Wed, 15 Jul 2015 04:49:56 +0000 (10:19 +0530)]
mpt2sas, mpt3sas: Abort initialization if no memory I/O resources detected

Driver crashes if the BIOS do not set up at least one
memory I/O resource. This failure can happen if the device is too
slow to respond during POST and is missed by the BIOS, but Linux
then detects the device later in the boot process.

Based on a patch from Timothy Pearson <tpearson@raptorengineeringinc.com>

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 5aeeb78aeb4c8607cbda54a7b0dc7315171e214f)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agoqlcnic: Fix mailbox completion handling in spurious interrupt
Rajesh Borundia [Fri, 16 Oct 2015 05:50:36 +0000 (11:20 +0530)]
qlcnic: Fix mailbox completion handling in spurious interrupt

Orabug: 22066190

o While the driver is in the middle of a MB completion processing
and it receives a spurious MB interrupt, it is mistaken as a good MB
completion interrupt leading to premature completion of the next MB
request. Fix the driver to guard against this by checking the current
state of MB processing and ignore the spurious interrupt.
Also added a stats counter to record this condition.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Update version to 5.3.63
Shahed Shaikh [Fri, 7 Aug 2015 11:17:07 +0000 (07:17 -0400)]
qlcnic: Update version to 5.3.63

Orabug: 22066190

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory
Shahed Shaikh [Fri, 7 Aug 2015 11:17:06 +0000 (07:17 -0400)]
qlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory

Orabug: 22066190

Driver allocates a large chunk of temporary buffer using kzalloc
to copy FW image. As there is no real need of this memory to be
physically contiguous, use vzalloc instead.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Add new VF device ID 0x8C30
Shahed Shaikh [Fri, 7 Aug 2015 11:17:05 +0000 (07:17 -0400)]
qlcnic: Add new VF device ID 0x8C30

Orabug: 22066190

This is a 83xx series based VF device

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Print firmware minidump buffer and template header addresses
Shahed Shaikh [Fri, 7 Aug 2015 11:17:04 +0000 (07:17 -0400)]
qlcnic: Print firmware minidump buffer and template header addresses

Orabug: 22066190

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Add support to enable capability to extend minidump for iSCSI
Shahed Shaikh [Fri, 7 Aug 2015 11:17:03 +0000 (07:17 -0400)]
qlcnic: Add support to enable capability to extend minidump for iSCSI

Orabug: 22066190

In some cases it is required to capture minidump for iSCSI functions
as part of default minidump collection process. To enable this, firmware
exports it's capability and driver need to enable that capability
by issuing a mailbox command.

With this feature, firmware can provide additional iSCSI function's
minidump with smaller minidump capture mask (0x1f).

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Rearrange ordering of header files inclusion
Harish Patil [Fri, 7 Aug 2015 11:17:02 +0000 (07:17 -0400)]
qlcnic: Rearrange ordering of header files inclusion

Orabug: 22066190

Include local headers files after kernel's header files.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Fix corruption while copying
Shahed Shaikh [Wed, 29 Jul 2015 11:55:35 +0000 (07:55 -0400)]
qlcnic: Fix corruption while copying

Orabug: 22066190

Use proper typecasting while performing byte-by-byte copy

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agonet: qlcnic: Deletion of unnecessary memset
Christophe Jaillet [Mon, 13 Jul 2015 19:51:38 +0000 (21:51 +0200)]
net: qlcnic: Deletion of unnecessary memset

Orabug: 22066190

There is no need to memset memory allocated with vzalloc.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agonet: qlcnic: clean up sysfs error codes
Vladimir Zapolskiy [Tue, 26 May 2015 00:49:45 +0000 (03:49 +0300)]
net: qlcnic: clean up sysfs error codes

Orabug: 22066190

Replace confusing QL_STATUS_INVALID_PARAM == -1 == -EPERM with -EINVAL
and QLC_STATUS_UNSUPPORTED_CMD == -2 == -ENOENT with -EOPNOTSUPP, the
latter error code is arguable, but it is already used in the driver,
so let it be here as well.

Also remove always false (!buf) check on read(), the driver should
not care if userspace gets its EFAULT or not.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: sysfs interface for PCI BAR access
Sony Chacko [Sat, 29 Sep 2012 16:05:34 +0000 (12:05 -0400)]
qlcnic: sysfs interface for PCI BAR access

Orabug: 22066190

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Update driver version to 2.9.6.
Chad Dupuis [Thu, 15 Oct 2015 17:26:56 +0000 (22:56 +0530)]
bnx2fc: Update driver version to 2.9.6.

Orabug: 22013781

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Add HZ to task management timeout.
Chad Dupuis [Mon, 20 Jul 2015 21:09:54 +0000 (14:09 -0700)]
bnx2fc: Add HZ to task management timeout.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Remove explicit logouts.
Chad Dupuis [Mon, 20 Jul 2015 20:46:55 +0000 (13:46 -0700)]
bnx2fc: Remove explicit logouts.

Orabug: 22013781

Explicit logouts from bnx2fc were causing race conditions in either returning
stale SCSI commands or not allowing a target to log back in.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Fix FCP RSP residual parsing.
Chad Dupuis [Mon, 20 Jul 2015 20:30:19 +0000 (13:30 -0700)]
bnx2fc: Fix FCP RSP residual parsing.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Set ELS transfer length correctly for middle path commands.
Chad Dupuis [Mon, 20 Jul 2015 20:26:01 +0000 (13:26 -0700)]
bnx2fc: Set ELS transfer length correctly for middle path commands.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Remove 'NetXtreme II' from source files.
Chad Dupuis [Mon, 20 Jul 2015 20:18:54 +0000 (13:18 -0700)]
bnx2fc: Remove 'NetXtreme II' from source files.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Update copyright for 2015.
Chad Dupuis [Mon, 20 Jul 2015 20:10:26 +0000 (13:10 -0700)]
bnx2fc: Update copyright for 2015.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Read npiv table from nvram and create vports.
Chad Dupuis [Thu, 23 Jul 2015 13:43:06 +0000 (06:43 -0700)]
bnx2fc: Read npiv table from nvram and create vports.

Orabug: 22013781

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agocnic: Add the interfaces to get FC-NPIV table.
Chad Dupuis [Mon, 20 Jul 2015 15:00:24 +0000 (08:00 -0700)]
cnic: Add the interfaces to get FC-NPIV table.

Orabug: 22013781

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Tue, 20 Oct 2015 01:20:23 +0000 (18:20 -0700)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: unset CONFIG_NFS_USE_LEGACY_DNS for OL7 debug kernel too
  uek-rpm: build: Update the base release to 9 with stable v4.1.10
  uek-rpm: configs: sparc: Enable VCC as a module
  uek-rpm: configs: sparc64: enable i40e modules
  uek-rpm: configs: sparc64: synced config files

9 years agoMerge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com...
Santosh Shilimkar [Tue, 20 Oct 2015 01:20:14 +0000 (18:20 -0700)]
Merge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek:
  tcp_cubic: better follow cubic curve after idle period

9 years agoMerge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux...
Santosh Shilimkar [Tue, 20 Oct 2015 01:19:31 +0000 (18:19 -0700)]
Merge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek: (30 commits)
  Linux 4.1.10
  hp-wmi: limit hotkey enable
  zram: fix possible use after free in zcomp_create()
  netlink: Replace rhash_portid with bound
  netlink: Fix autobind race condition that leads to zero port ID
  mvneta: use inband status only when explicitly enabled
  of_mdio: add new DT property 'managed' to specify the PHY management type
  net: phy: fixed_phy: handle link-down case
  net: dsa: bcm_sf2: Do not override speed settings
  fib_rules: fix fib rule dumps across multiple skbs
  net: revert "net_sched: move tp->root allocation into fw_init()"
  tcp: add proper TS val into RST packets
  openvswitch: Zero flows on allocation.
  macvtap: fix TUNSETSNDBUF values > 64k
  net/mlx4_en: really allow to change RSS key
  bridge: fix igmpv3 / mldv2 report parsing
  sctp: fix race on protocol/netns initialization
  netlink, mmap: transform mmap skb into full skb on taps
  net: dsa: bcm_sf2: Fix 64-bits register writes
  ipv6: fix multipath route replace error recovery
  ...

9 years agoMerge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Tue, 20 Oct 2015 01:19:19 +0000 (18:19 -0700)]
Merge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek:
  PCI: Restore pref MMIO allocation logic for host bridge without mmio64
  PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64
  PCI: Add has_mem64 for struct host_bridge
  PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64
  PCI: Check pref compatible bit for mem64 resource of PCIe device
  OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource
  PCI: kill wrong quirk about M7101
  sparc/PCI: Keep resource idx order with bridge register number
  sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing
  sparc/PCI: Reserve legacy mmio after PCI mmio
  sparc/PCI: Unify pci_register_region()
  sparc/PCI: Use correct bus address to resource offset
  sparc/PCI: Add mem64 resource parsing for root bus
  sparc: Revert commits that broke ixgbe and igb drivers on T7
  sparc: vdso: lockdep fixes
  SPARC64: LDoms suspend domain service.

9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Tue, 20 Oct 2015 01:18:59 +0000 (18:18 -0700)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek:
  RDS: fix race condition when sending a message on unbound socket.

9 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Tue, 20 Oct 2015 01:18:46 +0000 (18:18 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek: (122 commits)
  be2net: bump up the driver version to 10.6.0.4
  enic: do hang reset only in case of tx timeout
  enic: handle spurious error interrupt
  enic: reduce ioread in devcmd2
  enic: Fix build failure with SRIOV disabled.
  enic: Fix namespace pollution causing build errors.
  enic: Fix sparse warning in vnic_devcmd_init().
  enic: add devcmd2
  enic: add devcmd2 resources
  enic: use netdev_<foo> or dev_<foo> instead of pr_<foo>
  enic: move struct definition from .c to .h file
  enic: allow adaptive coalesce setting for msi/legacy intr
  enic: add adaptive coalescing intr for intx and msi poll
  enic: fix issues in enic_poll
  enic: use atomic_t instead of spin_lock in busy poll
  drivers/net: remove all references to obsolete Ethernet-HOWTO
  enic: Grammar s/an negative/a negative/
  qla2xxx: Update driver version to 8.07.00.26.39.0-k.
  be2net: remove vlan promisc capability from VF's profile descriptors
  be2net: set pci_func_num while issuing GET_PROFILE_CONFIG cmd
  ...

9 years agocnic: Add the interfaces to get FC-NPIV table.
Adheer Chandravanshi [Tue, 4 Aug 2015 06:37:28 +0000 (09:37 +0300)]
cnic: Add the interfaces to get FC-NPIV table.

Orabug: 22066196

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9b8d5044024df97edfcce8f0c4a6ca0abd99300e)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agocnic: Populate upper layer driver state in MFW
Tej Parkash [Tue, 4 Aug 2015 06:37:27 +0000 (09:37 +0300)]
cnic: Populate upper layer driver state in MFW

Orabug: 22066196

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit eddb755428e6e723bf587a4e2c15055c8ac02f5b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Prevent UDP 4-tuple configurations on older adapters
Yuval Mintz [Thu, 8 Oct 2015 13:19:01 +0000 (16:19 +0300)]
bnx2x: Prevent UDP 4-tuple configurations on older adapters

Orabug: 22066196

Configuring 4-tuple RSS hsahing for UDP
[E.g., by using `ethtool -N <interface> rx-flow-hash udp4 sdfn']
on a 57710/57711 adapter would cause it to assert as HW does not
support such a configuration.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f9468e8dc87e31f807fae04aae70380a461b95c6)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agodrivers/net: get rid of unnecessary initializations in .get_drvinfo()
Ivan Vecera [Thu, 15 Oct 2015 19:28:52 +0000 (21:28 +0200)]
drivers/net: get rid of unnecessary initializations in .get_drvinfo()

Orabug: 22066196

Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len,
eedump_len & regdump_len fields in their .get_drvinfo() ethtool op.
It's not necessary as these fields is filled in ethtool_get_drvinfo().

v2: removed unused variable
v3: removed another unused variable

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: byte swap rss_key to comply to Toeplitz specs
Eric Dumazet [Wed, 23 Sep 2015 00:04:58 +0000 (17:04 -0700)]
bnx2x: byte swap rss_key to comply to Toeplitz specs

Orabug: 22066196

After a good amount of debugging, I found bnx2x was byte swaping
the 40 bytes of rss_key.

If we byte swap the key, then bnx2x generates hashes matching
MSDN specs as documented in (Verifying the RSS Hash Calculation)

https://msdn.microsoft.com/en-us/library/windows/hardware/ff571021%
28v=vs.85%29.aspx

It is mostly a non issue, unless we want to mix different NIC
in a host, and want consistent hashing among all of them, ie
if they all use the boot time generated rss key, or if some application
is choosing specific tuple(s) so that incoming traffic lands into known
rx queue(s).

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d682d2bdc30650a5c7ce9908ab83ab674b658744)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: track vxlan port count
Jiri Benc [Thu, 17 Sep 2015 14:11:14 +0000 (16:11 +0200)]
bnx2x: track vxlan port count

Orabug: 22066196

The callback for adding vxlan port can be called with the same port for
both IPv4 and IPv6. Do not disable the offloading when the same port for
both protocols is added and later one of them removed.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ac7eccd4d48fcc70d9fd6e4d10657bcde0a73f9f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: use ktime_get_seconds() for timestamp
Arnd Bergmann [Fri, 11 Sep 2015 09:33:01 +0000 (11:33 +0200)]
bnx2x: use ktime_get_seconds() for timestamp

Orabug: 22066196

commit c48f350ff5e7 "bnx2x: Add MFW dump support" added the
bnx2x_update_mfw_dump() function that reads the current time and stores
it in a 32-bit field that gets passed into a buffer in a fixed format.

This is potentially broken when the epoch overflows in 2038, and
otherwise overflows in 2106. As we're trying to avoid uses of
struct timeval for this reason, I noticed the addition of this
function, and tried to rewrite it in a way that is more explicit
about the overflow and that will keep working once we deprecate
struct timeval.

I assume that it is not possible to change the ABI any more, otherwise
we should try to use a 64-bit field for the seconds right away.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: Ariel Elior <Ariel.Elior@qlogic.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a19a19de8310fb8ca2ca0621a9db1aab082943c5)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Add new device ids under the Qlogic vendor
Yuval Mintz [Thu, 27 Aug 2015 05:03:08 +0000 (08:03 +0300)]
bnx2x: Add new device ids under the Qlogic vendor

Orabug: 22066196

This adds support for 3 new PCI device combinations -
1077:16a1, 1077:16a4 and 1077:16ad.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9c9a6524b5fdf6cb57c9ff627b7f242a6a4e0b00)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix vxlan endianity issue
Yuval Mintz [Wed, 19 Aug 2015 07:21:58 +0000 (10:21 +0300)]
bnx2x: Fix vxlan endianity issue

Orabug: 22066196

Commit f34fa14cc033 ("bnx2x: Add vxlan RSS support") has introduced an
endianity issue when passing the vxlan UDP port to the HW.

Reported-by: <fengguang.wu@intel.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0f8f27de19667075591eaffbf435dd78c73a2df4)

Signed-off-by: Dan Duval <dan.duval@oracle.com>