]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoqla2xxx: Remove resetting memory during device initialization for ISP82xx.
Shyam Sundar [Thu, 19 Jan 2012 21:02:23 +0000 (13:02 -0800)]
qla2xxx: Remove resetting memory during device initialization for ISP82xx.

With IOs running and PegHalt testing the system reboots when memory reset is
performed during device initialization.

Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
13 years agoqla2xxx: Propagate up abort failures.
Arun Easi [Fri, 23 Dec 2011 19:57:13 +0000 (11:57 -0800)]
qla2xxx: Propagate up abort failures.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
13 years agoqla2xxx: Add check for null fcport references in qla2xxx_queuecommand.
Chad Dupuis [Thu, 13 Oct 2011 19:26:59 +0000 (14:26 -0500)]
qla2xxx: Add check for null fcport references in qla2xxx_queuecommand.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
13 years agoMerge branch 'uek-2.6.39-200_lpfc8.3.5.68.4p.orabug14027969' of git://ca-git.us.oracl...
Maxim Uvarov [Wed, 9 May 2012 00:34:46 +0000 (17:34 -0700)]
Merge branch 'uek-2.6.39-200_lpfc8.3.5.68.4p.orabug14027969' of git://ca-git.us.oracle.com/linux-muvarov-public into uek-2.6.39-200

Orabug: 14027969

13 years agoMerge branch 'uek-2.6.39-200_be2netv2' of git://ca-git.us.oracle.com/linux-muvarov...
Maxim Uvarov [Wed, 9 May 2012 00:33:08 +0000 (17:33 -0700)]
Merge branch 'uek-2.6.39-200_be2netv2' of git://ca-git.us.oracle.com/linux-muvarov-public into uek-2.6.39-200

Orabug: 13448441

13 years ago[mpt2sas] Bump driver vesion to 13.100.00.00
Nagalakshmi Nandigama [Mon, 7 May 2012 20:42:49 +0000 (13:42 -0700)]
[mpt2sas] Bump driver vesion to 13.100.00.00

Orabug: 14040678
Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] fix NULL pointer at ioc->pfacts
Nagalakshmi Nandigama [Mon, 7 May 2012 20:40:00 +0000 (13:40 -0700)]
[mpt2sas] fix NULL pointer at ioc->pfacts

Orabug: 14040678
The ioc->pfacts member in the IOC structure is getting set to zero
following a call to _base_get_ioc_facts due to the memset in that routine.
So if the ioc->pfacts was read after a host reset, there would be a NULL
pointer dereference. The routine _base_get_ioc_facts is called from context
of host reset.  The problem in _base_get_ioc_facts  is the size of
Mpi2IOCFactsReply is 64, whereas the sizeof "struct mpt2sas_facts" is 60,
so there is a four byte overflow resulting from the memset.

Also, there is memset in _base_get_port_facts using the incorrect structure,
it should be "struct mpt2sas_port_facts" instead of Mpi2PortFactsReply.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] A hard drive is going OFFLINE when there is a hard reset issued
Nagalakshmi Nandigama [Mon, 7 May 2012 20:39:25 +0000 (13:39 -0700)]
[mpt2sas] A hard drive is going OFFLINE when there is a hard reset issued
and simultaneously another hard drive is hot unplugged

Orabug: 14040678
Following the host reset, the firmware discovery is reassigning another
hard drive in the topology to the same device handle as that device is
getting hot removed. Until the driver device removal routine is called,
there will be two hard drive with the matching device handle in the
internal device link list. In the device removal routine, a separate
function which moves the device from BLOCKED into OFFLINE state.
Since this routine is passed  with the device handle passed as input parameter,
the routine will be traversing the internal device link list searching for
matching device handle. This results in two devices with matching
device handle, therefore both devices goes OFFLINE.

To fix this issue,the input parameter is changed from device handle to
SAS address, therefore only the device that is hot unplugged will be placed
in OFFLINE state.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] Set the phy identifier of the end device to to the phy number of the parent...
Nagalakshmi Nandigama [Mon, 7 May 2012 20:38:49 +0000 (13:38 -0700)]
[mpt2sas] Set the phy identifier of the end device to to the phy number of the parent device
it is linked to

Orabug: 14040678
The phy_identifier inside the routine _transport_set_identify()
is set to sas_device_page_zero->PhyNum. This returns the
phy number of the parent device this device is linked to.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] While enabling phy, read the current port number from sas iounit page 0
Nagalakshmi Nandigama [Mon, 7 May 2012 20:37:52 +0000 (13:37 -0700)]
[mpt2sas] While enabling phy, read the current port number from sas iounit page 0
instead of page 1

Orabug: 14040678
The port number is changing after disabling/enabling phys using the SysFS interface
This is because the firmware behavour changed where it would read the the port number
then set it to some different value even though Auto Port Config is turned on.
With this change of behavour in FW, it is possible that the expanders are moved
from one port to another after disabling /enabling phys. This is occuring because
the port number in sas iounit page 1 is not matching up to the current port in
page 0. In order to fix this the driver is modified to read the current
port number from sas iounit page 0 instead of page 1.  Also copy the
port and phy flags over from page 0 to page 1.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] Fix several endian issues found by runing sparse
Nagalakshmi Nandigama [Mon, 7 May 2012 20:37:24 +0000 (13:37 -0700)]
[mpt2sas] Fix several endian issues found by runing sparse

Orabug: 14040678
Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] Modify the source code as per the findings reported by the source
Nagalakshmi Nandigama [Mon, 7 May 2012 20:35:49 +0000 (13:35 -0700)]
[mpt2sas] Modify the source code as per the findings reported by the source
code analysis tool

Orabug: 14040678
Modified the source code as per the findings reported by the source
code analysis tool. Source code for the following functionalities
has been touched. None of the driver functionalities has changed.

- SMP Passthrough IOCTL
- Debug messages for MPT Replies (i.e. bit 9 of Logging Level)
- Task Management using sysfs
- Device removal, i.e. when a target device (including any PD within a volume) is removed, and Volume Deletion.
- Trace Buffer

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] Improvement were made to better protect the sas_device, raid_device,
Nagalakshmi Nandigama [Mon, 7 May 2012 20:29:11 +0000 (13:29 -0700)]
[mpt2sas] Improvement were made to better protect the sas_device, raid_device,
and expander_device lists

There were possible race conditions surrounding reading an object
from the link list while from another context in the driver was
removing it. The nature of this enhancement is to rearrange locking
so the link lists are better protected.

Change set:
(1) numerous routines were rearranged so spin locks are held through
the entire time a link list object is being read from or written to.
(2) added new routines for object deletion from link list.  Thus ensuring
lock was held during the deletion of the link list object, then and memory
for object freed outside the lock. The memory was freed outside the lock
so driver had access to device object info which was required for
notifying the scsi mid layer that a device was getting deleted.
(3) added the ioc->blocking_handles parameter.  This is a bitmask used
to identify which devices need blocking when there is device loss.  This was
introduced so that lock can be held for the entire time traversing the link
list objects, and the bitmask was set to indicate which device handles need
blocking. Oustide the lock the ioc->blocking_handles bitmask is traversed,
with the respective device handle the scsi mid layer is called for moving
devices into blocking state.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] Perform Target Reset instead of HBA reset when a SATA_PASSTHROUGH cmd
Nagalakshmi Nandigama [Mon, 7 May 2012 20:27:49 +0000 (13:27 -0700)]
[mpt2sas] Perform Target Reset instead of HBA reset when a SATA_PASSTHROUGH cmd
timeout happens

Orabug: 14040678
Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] Added multisegment mode support for Linux BSG Driver
Nagalakshmi Nandigama [Mon, 7 May 2012 20:27:04 +0000 (13:27 -0700)]
[mpt2sas] Added multisegment mode support for Linux BSG Driver

Orabug: 14040678
Added support for Block IO requests with multiple segments (vectors) in
the SMP handler of the SAS Transport Class. This is required by the
BSG driver. Multisegment support added for both, Request and Response.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] remove the global mutex
Nagalakshmi Nandigama [Mon, 7 May 2012 20:23:48 +0000 (13:23 -0700)]
[mpt2sas] remove the global mutex

Orabug: 14040678
When the lock_kernel and unlock_kernel routines were removed in the
2.6.39 kernel, a global mutex was added on top of the existing mutex
which already existed. With this implementation, only one IOCTL
will be active at any time no matter how many ever controllers
are present. This causes poor performance.

Removed the global mutex so that the driver can work with the existing
semaphore that was already part of the existing code.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[mpt2sas] MPI next revision header update
Nagalakshmi Nandigama [Mon, 7 May 2012 20:22:18 +0000 (13:22 -0700)]
[mpt2sas] MPI next revision header update

Orabug: 14040678
Changeset in MPI headers:
1) Bumped MPI2_HEADER_VERSION_UNIT
2) Added 4K sectors supported bit to CapabilitiesFlags field of IOC Page 6.
3) Added UEFIVersion field to BIOS Page 1 and defined additional
    BiosOptions bits to control UEFI behavior.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoUpdate lpfc version for 8.3.5.68.4p driver release
Vaios Papadimitriou [Tue, 8 May 2012 22:01:28 +0000 (17:01 -0500)]
Update lpfc version for 8.3.5.68.4p driver release

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix bug with mailbox handling of REG_VFI and cable pull (CR 127762)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:28 +0000 (17:01 -0500)]
Fix bug with mailbox handling of REG_VFI and cable pull (CR 127762)

Additional checks were missing for interface type and mailbox status that
caused the vport state to be set as failed.

commit id: f5eca9be1424ffa76b36dce4a821c051b37a8ab9

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoUse PCI configure space read to flush PCI function reset register write to avoid...
Vaios Papadimitriou [Tue, 8 May 2012 22:01:28 +0000 (17:01 -0500)]
Use PCI configure space read to flush PCI function reset register write to avoid MMIO issues (CR 128101)

When adding PCI read following LPe16000 port PCI function reset PortControl
register write for flushing the PCI pipe, the LPe16000 PortStatus register was
used for the PCI readl(). However, it might be an issue on platforms which will
not allow MMIO reads to master abort as the PCI device was not expected to
respond to a readl() following the function reset.

commit id: 2b81f942e75abda20f753e69f7a5416930ea001f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed system panic when extents enabled with large number of small blocks (CR 128010)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:27 +0000 (17:01 -0500)]
Fixed system panic when extents enabled with large number of small blocks (CR 128010)

When LPe16000 port extents are enable with 24 extents of small blocks, the
system will crash at driver load time. This is because the total number of
sgls posted was not calculated correctly

commit id: 25090d398e97309931f87682174f377cf0ac1131

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed the system panic during EEH recovery (CR 127062)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:27 +0000 (17:01 -0500)]
Fixed the system panic during EEH recovery (CR 127062)

During the EEH recovery process while preparing for function reset, the
mbox_sys_shutdown routine  was invoked to shutdown driver's internal mailbox
queue, including the pending (outstanding) mailbox command. There is a window
for a race condition on the pending mailbox command handling when such mailbox
command was just released by the lpfc_sli4_post_async_mbox due to unable to
post such mailbox command because of PCI bus frozen.

commit id: d7069f09884ac3924dacaabbc769cc0b4ee6ad40

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix resource leak when acc fails for received plogi (CR 127847)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:27 +0000 (17:01 -0500)]
Fix resource leak when acc fails for received plogi (CR 127847)

When a port tries to respond to a plogi that it receives and the issue of the
acc fails the mailbox command that was allocated to register the RPI is not
freed. Now, if the issue for the acc or reject fails free the mailbox command
that was allocated to register the RPI.

commit id: 0a8a86facf359147b2d3ef796496a09b21984b03

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed SLI4 driver module load and unload test in a loop crashes the system (CR 126397)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:27 +0000 (17:01 -0500)]
Fixed SLI4 driver module load and unload test in a loop crashes the system (CR 126397)

Loading/unloading the lpfc driver overnight when an LPe16000 sees multiple
targets can result in a kernel panic. This is because the board was not
correctly being reset, now correctly clear the Status register so the proper
reset is done.

commit id: 8fcb8acd6cb1529c596c274a6d375cbe9a134dcb

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed missing CVL event causing round-robin FCF failover process to stop (CR 123367)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:27 +0000 (17:01 -0500)]
Fixed missing CVL event causing round-robin FCF failover process to stop (CR 123367)

It was found during virtual fabric testing that a virtual link mismatch was
created. This is because after a CVL was causing the driver to stop the FCF
failover process. The driver will now not break out of the failover process
if the flogi fails and the CVL event is expected.

commit id: 80c17849209e8773de122e58512c16c3fae3e29a

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix deadlock during adapter offline request (CR 127217)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)]
Fix deadlock during adapter offline request (CR 127217)

The sli4_free_rpi call is being called while holding the host_lock with irq,
then the free_rpi takes the hba_lock with irq. This created a deadlock.

commit id: 401ee0c1d698e798a9317e2ed6207badae93e266

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix same RPI registered multiple times after HBA reset (CR 127176)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)]
Fix same RPI registered multiple times after HBA reset (CR 127176)

After HBA reset I/Os never complete and system eventually hangs, this is
because the BE adapters need to have RPI headers reposted before rpis can be
assigned to NDLPs. By moving the call to lpfc_sli4_node_prep to be after the
call to post_all_rpi headers this posts the headers before the rpis are
assigned.

commit id: 97f2ecf1f401d689d4036f64c244fad3b39e5e0a

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix driver handling of XRI Aborted CQE response (CR 127345)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)]
Fix driver handling of XRI Aborted CQE response (CR 127345)

When driver issued an ABTS, the aborted IO and ABTS WQE request would complete
as expected, but the XRI_ABORTED_CQE notification that the ABTS protocol
completed caused the driver to tear down the rport mapping for each completed
ABTS. Now process the status and extended status before making a decision to
tear down the target status.

commit id: 5c1db2accd4b3e21aa7440526af9d2d0ccf5241c

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed port and system failure in handling SLI4 FC port function reset (CR 126551)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)]
Fixed port and system failure in handling SLI4 FC port function reset (CR 126551)

When performing function reset to LPe16000 port which is connected to a fabric
and has targets (LUNs) discovered in the zone, sometimes the reset can fail and
end up in the port being unresponsive or system crash or hang. Now, when
reposting the SCSI SGL list after function reset, set the logical XRI allocated
bit in the logical XRI bmask to account for the XRIs posted, so duplicated
XRI will not be allocated later for new SGLs. Also, reset the used xri counts,
and updated them properly during function reset.

commit id: 41899be7e8b95c9c8b51ad4ff932769af508306f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix bug with driver not sending a LOGO with vport delete (CR 126625)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)]
Fix bug with driver not sending a LOGO with vport delete (CR 126625)

Driver did not send LOGO during vport delete causing switch to hold on to the
resource. That LOGO is now sent.

commit id: bdcd2b926192c7f690a9cb4fb2de30eb820983fc

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix for SLI4 Port delivery for BLS ABORT ACC (CR 126289)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)]
Fix for SLI4 Port delivery for BLS ABORT ACC (CR 126289)

An unsolicited ABTS recieved on an SLI4 port does not properly complete the
exchange.
Fix:
In __lpfc_sli_issue_iocb_s4, allow CMD_XMIT_BLS_RSP64_CX to allocate an SGL.
In lpfc_sli4_bpl2sgl, allow CMD_XMIT_BLS_RSP64_CX to just return the xri_tag.
In lpfc_sli4_iocb2wqe, setup CT context to use VPI for CMD_XMIT_BLS_RSP64_CX.
In lpfc_sli4_seq_abort_rsp_cmpl log port error.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix ndlp nodelist not empty wait timeout during driver unloading (CR 127052)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:25 +0000 (17:01 -0500)]
Fix ndlp nodelist not empty wait timeout during driver unloading (CR 127052)

In lpfc_set_rrq_active the code allocates an RRQ while lock are held. The
driver either need to make this allocation ATOMIC or remove the allocation from
the lock. We choose to remove the locked version of lpfc_set_rrq_active since
there were no users of this function. Then rearrange the code so that the
allocation does not occur while the lock is held.

commit id: eff4a01b6e9f8cee3c541ab7f2ad18b5bbffd124

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix mailbox and vpi memory leaks (CR 126818)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:25 +0000 (17:01 -0500)]
Fix mailbox and vpi memory leaks (CR 126818)

The driver could hang or crash do to lack of memory. These memory leaks were
fixed.

commit id: 728599090a9bf3aefb1226cc063295886525cd0e

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix management communication issues by creating character device to take a reference...
Vaios Papadimitriou [Tue, 8 May 2012 22:01:25 +0000 (17:01 -0500)]
Fix management communication issues by creating character device to take a reference on the driver (CR 126082)

The management userspace applications have no way to take a lock on the driver
to prevent it from unloading. To remedy this a character device is created that
will up the reference count on lpfc by one when it is opened and decrement it by
one when it is closed.

commit id: 3ef6d24cd9f473518dd7941e86cc2a5f8992eed0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix for FDISC failures after firmware reset or link bounce (CR 126779)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:25 +0000 (17:01 -0500)]
Fix for FDISC failures after firmware reset or link bounce (CR 126779)

The driver failed to discover target on vports after a link bounce. This is a
regression on SLI4 adapters where the SID in the FDISC was set to a non-zero
value. There is no use case for a non-zero SID in the FDISC. Thefix is to clear
fc_myDID to guarentee a zero SID

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix for driver using duplicate RPIs after LPe16000 port reset (CR 126723)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:25 +0000 (17:01 -0500)]
Fix for driver using duplicate RPIs after LPe16000 port reset (CR 126723)

The RPI bit map is reinitiatized in the adapter port 'online' path. SLI4 RPI are
designed to be 'long lived', so when the adapter port is taken offline, the
driver will reuse the RPI if the port is recovered within devloss tmo.
These stale RPI values can collide when new RPIs are allocated. We now free RPIs
on all active nodes and then allocate new RPIs

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix discovery problem when in pt2pt (CR 126887)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:25 +0000 (17:01 -0500)]
Fix discovery problem when in pt2pt (CR 126887)

When a target is direct connected in pt2pt topology it is not discovered by the
driver. The confirm nport routine is called during plogi completion. It will
look up the ndlp using the service parameter wwpn in the target response. If the
ndlp that is returned in the lookup does not match the ndlp that the plogi was
sent with confirm_nport updates the new ndlp with old ndlp's information.
Confirm nport has to make sure that only one ndlp with that wwpn is active
before returning so it sets the old ndlp's state to NPR. It set the state
before it copied the state to the new ndlp so both ndlp's end up in NPR. When
the plogi completion routine calls the state machine with the plogi complete
event and the ndlp in NPR the ndlp'd state stays in NPR. The state machine is
stopped for this ndlp. Because it was the only target discovery is completed.
The old ndlp state is now copied to the new ndlp before setting the old one to
NPR

commit id: eff4a01b6e9f8cee3c541ab7f2ad18b5bbffd124

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed failure in handling large CQ/EQ identifiers in an IOV environment (CR 126856)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)]
Fixed failure in handling large CQ/EQ identifiers in an IOV environment (CR 126856)

In an SR-IOV environment, when creating virtual functions, the driver failed to
issue INIT_LINK mailbox commands properly when attaching to the virtual
functions. The driver will now write into CQ/EQ doorbell registers by taking
both the lower and the possible higher bit CQ/EQ identifier fields into
consideration to comply for with the spec for handling INIT_LINK mailbox
commands.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix Locking code raising IRQ twice
Vaios Papadimitriou [Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)]
Fix Locking code raising IRQ twice

Remove the irq part of the locking and unlocking calls, this could have caused
a deadlock because the cpu could have interrupted this thread while the hbalock
was still held.

commit id: 728599090a9bf3aefb1226cc063295886525cd0e

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix driver not returning when bad ndlp found in abts error event handling (CR 126209)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)]
Fix driver not returning when bad ndlp found in abts error event handling (CR 126209)

The abts should not be processed when whne a bad ndlp is found. The function
now returns properly rather then continuing.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix bug with driver returning the wrong ndlp (CR 125743)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)]
Fix bug with driver returning the wrong ndlp (CR 125743)

When searching for a matching rpi the driver was not checking the active state
of the ndlp. A check was added to see if the nldp is active.

commit id: eff4a01b6e9f8cee3c541ab7f2ad18b5bbffd124

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix driver behavior when receiving an ADISC (CR 126654)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)]
Fix driver behavior when receiving an ADISC (CR 126654)

ADISC gets ACC'ed if RPI is not present. RESUME_RPI does not get envoked when
receiving ADISC.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix bug with driver processing dump command type 4 using 16Gb FC Adapter (CR 126406)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)]
Fix bug with driver processing dump command type 4 using 16Gb FC Adapter (CR 126406)

Dump Mbox commands fail to LPe16000 adapter, these commands were not recognized
by the driver, they are now allowed to pass through.

commit id: 3ef6d24cd9f473518dd7941e86cc2a5f8992eed0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix driver does not reset port when reset is needed during fw_dump (CR 125807)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)]
Fix driver does not reset port when reset is needed during fw_dump (CR 125807)

A port error was detacted during rest, this is because the driver was not
looking for a RN flag in the status reg. Now only fail the reset if ERR bit is
set and the reset needed flag is not.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix ELS FDISC failing with local reject / invalid RPI (CR 126350)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)]
Fix ELS FDISC failing with local reject / invalid RPI (CR 126350)

No FDISC seen on the wire when running with SLI4, the ELS command fails with
local reject / invalid RPI. Now allow the FDISC ELS command to use the
temporary RPI and the Destination DID for SLI4-FC.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix SLI4 FC port internal loopback (CR 126409)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)]
Fix SLI4 FC port internal loopback (CR 126409)

LPe16000s could fail internal loopback tests do to an issue with the serdes.
The loopback was properly changed to use internal rather then serdes internal.

commit id: 3ef6d24cd9f473518dd7941e86cc2a5f8992eed0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix REG_RPI fails on SLI4 HBA putting NPort into NPR state (CR 126230)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)]
Fix REG_RPI fails on SLI4 HBA putting NPort into NPR state (CR 126230)

When we receive a PLOGI, the ndlp unexpectedly goes into the NPR state.
This is because the ndlp was not properly being unregistered.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix bug with driver processing an els command using 16Gb FC Adapter (CR 126345)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)]
Fix bug with driver processing an els command using 16Gb FC Adapter (CR 126345)

ELS echo fails on an LPe16000 adapter because the driver was not setting up
the ulpContext correctly. The ulpContext is now properly set from the rpi_ids
table for SLI4 devices.

commit id: 3ef6d24cd9f473518dd7941e86cc2a5f8992eed0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix NMI seen due to CQE starvation (CR 126149)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)]
Fix NMI seen due to CQE starvation (CR 126149)

CQEs had to be upped in order to prevent NMI being issued. The firmware was
running of CQEs

commit id: ff78d8f97c85a568c0799b06137a4171db45b923

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed SLI4 FC port obtained link type and number dependent on link connection (CR...
Vaios Papadimitriou [Tue, 8 May 2012 22:01:22 +0000 (17:01 -0500)]
Fixed SLI4 FC port obtained link type and number dependent on link connection (CR 126264)

There are places in the driver diagnostic code space, which picked up
SLI4 FC port link type and number depend on link connection from asynchronous
link event. In those cases, instead of using the link type and link number
obtainedfrom the asynchronous link event, used the link type and link number
obtained from the READ_CONFIG mailbox command from SLI4 setup routine , which
will not depend on an external link or loopback plug present.

commit id: 1b51197d0fd0c06877c6df1bba84ac4008a7fc60

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFixed SLI4 FC port internal loopback without SFP and external link/loopback plug...
Vaios Papadimitriou [Tue, 8 May 2012 22:01:22 +0000 (17:01 -0500)]
Fixed SLI4 FC port internal loopback without SFP and external link/loopback plug (CR 125843)

When performing internal loopback diagnostic test on LPe16000 port without SFP
present or without external link/loopback plug plugged in, internal loopback on
port1 failed. Instead of using the link type and link number obtained reported
from the asynchronous link event, used the link type and link number obtained
from the READ_CONFIG mailbox command from SLI4 setup routine , which will not
depend on an external link or loopback plug present.

commit id: 1b51197d0fd0c06877c6df1bba84ac4008a7fc60

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix driver incorrectly building fcpCdb during scsi command prep (CR 126209)
Vaios Papadimitriou [Tue, 8 May 2012 22:01:22 +0000 (17:01 -0500)]
Fix driver incorrectly building fcpCdb during scsi command prep (CR 126209)

Some scsi inquiry commands were failing with sense key 0x5 and ASC/ASCQ values
of 24/00. At times, this failure cause retries over several hours because the
driver was returning DID_BUS_BUSY. These retries and failures were clogging up
the console logs. Now, always initialize the fcpCdb to 0 during
lpfc_scsi_prep_cmnd. After the memset, only copy scsi_cmnd->cmd_len bytes into
the fcpCdb.

commit id: df9e1b59f9e4671930a7762b9518461df4ea85f5

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agobe2net: make be_vlan_add_vid() void
Maxim Uvarov [Tue, 8 May 2012 20:04:59 +0000 (13:04 -0700)]
be2net: make be_vlan_add_vid() void

Make compatibility for 3.0.x kernel, and make  be_vlan_add_vid() void.
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agobe2net: Record receive queue index in skb to aid RPS.
Somnath Kotur [Wed, 2 May 2012 03:40:49 +0000 (03:40 +0000)]
be2net: Record receive queue index in skb to aid RPS.

Signed-off-by: Sarveshwar Bandi <Sarveshwar.Bandi@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix FW download for BE
Padmanabh Ratnakar [Wed, 25 Apr 2012 01:47:15 +0000 (01:47 +0000)]
be2net: Fix FW download for BE

Skip flashing a FW component if that component is not present in a
particular FW UFI image.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix traffic stall INTx mode
Padmanabh Ratnakar [Wed, 25 Apr 2012 01:46:39 +0000 (01:46 +0000)]
be2net: Fix traffic stall INTx mode

EQ is getting armed wrongly in INTx mode as INTx interrupt is taking
some time to deassert. This can cause another interrupt while NAPI is
scheduled and scheduling a NAPI in interrupt does not take effect.
This causes interrupt to be missed and traffic stalls. Fixing this by
preventing wrong arming of EQ.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix ethtool get settings
Ajit Khaparde [Fri, 4 May 2012 10:36:29 +0000 (16:06 +0530)]
be2net: fix ethtool get settings

ethtool get settings was not displaying all the settings correctly.
use the get_phy_info to get more information about the PHY to fix this.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix programming of VLAN tags for VF
Ajit Khaparde [Sun, 18 Mar 2012 06:23:41 +0000 (06:23 +0000)]
be2net: fix programming of VLAN tags for VF

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: reset queue address after freeing
Sathya Perla [Thu, 23 Feb 2012 18:50:15 +0000 (18:50 +0000)]
be2net: reset queue address after freeing

This will prevent double free in some cases where be_clear() is called
for cleanup when be_setup() fails half-way.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix tx completion cleanup
Sathya Perla [Thu, 23 Feb 2012 18:50:14 +0000 (18:50 +0000)]
be2net: fix tx completion cleanup

As a part of be_close(), instead of waiting for a max of 200ms for each TXQ,
wait for a total of 200ms for completions from all TXQs to arrive.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: refactor/cleanup vf configuration code
Maxim Uvarov [Tue, 8 May 2012 00:05:32 +0000 (17:05 -0700)]
be2net: refactor/cleanup vf configuration code

Mainline commit:
11ac75ed1eb9d8f5ff067fa9a82ebf5075989281
- use adapter->num_vfs (and not the module param) to store the actual
number of vfs created. Use the same variable to reflect SRIOV
enable/disable state. So, drop the adapter->sriov_enabled field.

- use for_all_vfs() macro in VF configuration code

- drop the "vf_" prefix for the fields of be_vf_cfg; the prefix is
redundant and removing it helps reduce line wrap

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 11ac75ed1eb9d8f5ff067fa9a82ebf5075989281)

Conflicts:

drivers/net/benet/be_main.c

13 years agobe2net: event queue re-design
Maxim Uvarov [Tue, 8 May 2012 20:30:12 +0000 (13:30 -0700)]
be2net: event queue re-design

v2: Fixed up the bad typecasting pointed out by David...

In the current design 8 TXQs are serviced by 1 EQ, while each RSS queue
is serviced by a separate EQ. This is being changed as follows:

- Upto 8 EQs will be used (based on the availabilty of msix vectors).
Each EQ will handle 1 RSS and 1 TX ring. The default non-RSS RX queue and
MCC queue are handled by the last EQ.

- On cards which provide support, upto 8 RSS rings will be used, instead
of the current limit of 4.

The new design allows spreading the TX multi-queue completion processing
across multiple CPUs unlike the previous design.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agobe2net: update the driver version
Sarveshwar Bandi [Fri, 4 May 2012 11:33:44 +0000 (17:03 +0530)]
be2net: update the driver version

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
13 years agobe2net: Fix EEH error reset before a flash dump completes
Somnath Kotur [Wed, 2 May 2012 03:41:01 +0000 (03:41 +0000)]
be2net: Fix EEH error reset before a flash dump completes

An EEH error can cause the FW to trigger a flash debug dump.
Resetting the card while flash dump is in progress can cause it not to recover.
Wait for it to finish before letting EEH flow to reset the card.

Signed-off-by: Sathya Perla <Sathya.Perla@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Ignore status of some ioctls during driver load
Ajit Khaparde [Thu, 26 Apr 2012 15:42:31 +0000 (15:42 +0000)]
be2net: Ignore status of some ioctls during driver load

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix wrong status getting returned for MCC commands
Padmanabh Ratnakar [Wed, 25 Apr 2012 01:47:03 +0000 (01:47 +0000)]
be2net: Fix wrong status getting returned for MCC commands

MCC Response CQEs are processed as part of NAPI poll routine and
also synchronously. If MCC completions are consumed by NAPI poll
routine, wrong status is returned to synchronously waiting routine.
Fix this by getting status of MCC command from command response
instead of response CQEs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix Lancer statistics
Padmanabh Ratnakar [Wed, 25 Apr 2012 01:46:52 +0000 (01:46 +0000)]
be2net: Fix Lancer statistics

Fix port num sent in command to get stats. Also skip unnecessary
parsing of stats for Lancer.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix ethtool self test for Lancer
Padmanabh Ratnakar [Wed, 25 Apr 2012 01:46:28 +0000 (01:46 +0000)]
be2net: Fix ethtool self test for Lancer

Lancer does not support DDR self test. Fix ethtool self test by
skipping this test for Lancer.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix FW download in Lancer
Padmanabh Ratnakar [Wed, 25 Apr 2012 01:46:18 +0000 (01:46 +0000)]
be2net: Fix FW download in Lancer

Increase time given by driver to adapter for completing FW download
to 30 seconds. Also return correct status when FW download times out.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix VLAN/multicast packet reception
Padmanabh Ratnakar [Fri, 4 May 2012 10:39:09 +0000 (16:09 +0530)]
be2net: Fix VLAN/multicast packet reception

VLAN and multicast hardware filters are limited and can get
exhausted in adapters with many PCI functions. If setting
a VLAN or multicast filter fails due to lack of sufficient
hardware resources, these packets get dropped. Fix this by
switching to VLAN or multicast promiscous mode so that these
packets are not dropped.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix number of vlan slots in flex mode
Ajit Khaparde [Sun, 18 Mar 2012 06:23:31 +0000 (06:23 +0000)]
be2net: Fix number of vlan slots in flex mode

In flex10 mode the number of vlan slots supported is halved.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: enable WOL by default if h/w supports it
Ajit Khaparde [Sun, 18 Mar 2012 06:23:11 +0000 (06:23 +0000)]
be2net: enable WOL by default if h/w supports it

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Remove unused OFFSET_IN_PAGE() macro
Roland Dreier [Wed, 29 Feb 2012 20:40:46 +0000 (20:40 +0000)]
be2net: Remove unused OFFSET_IN_PAGE() macro

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: enable RSS for ipv6 pkts
Sathya Perla [Thu, 23 Feb 2012 18:50:16 +0000 (18:50 +0000)]
be2net: enable RSS for ipv6 pkts

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Use new implementation of get mac list command
Padmanabh Ratnakar [Fri, 3 Feb 2012 09:50:17 +0000 (09:50 +0000)]
be2net: Use new implementation of get mac list command

VFs use get mac list command to get their mac address. The format of
this command has changed. Update driver to use the new format.

Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix link status query command
Padmanabh Ratnakar [Fri, 3 Feb 2012 09:49:46 +0000 (09:49 +0000)]
be2net: Fix link status query command

Version number in query link status command is getting overwritten in
be_wrb_cmd_hdr_prepare() routine. Move the initialization to fix this
issue. Also initialize the domain field.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Null-terminate filename passed to ethtool_ops::flash_device
Ben Hutchings [Wed, 1 Feb 2012 09:32:25 +0000 (09:32 +0000)]
ethtool: Null-terminate filename passed to ethtool_ops::flash_device

The parameters for ETHTOOL_FLASHDEV include a filename, which ought to
be null-terminated.  Currently the only driver that implements
ethtool_ops::flash_device attempts to add a null terminator if
necessary, but does it wrongly.  Do it in the ethtool core instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: add descriptions for stat counters reported via ethtool
Sathya Perla [Sun, 29 Jan 2012 20:17:39 +0000 (20:17 +0000)]
be2net: add descriptions for stat counters reported via ethtool

Also rename a few counters appropritely and delete 2 counters that are not
implemented in HW.

vlan_mismatch_drops does not exist in BE3 and is accounted for in
address_mismatch_drops. Do the same thing for BE2 and Lancer.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: allocate more headroom in incoming skbs
Eric Dumazet [Wed, 25 Jan 2012 03:56:30 +0000 (03:56 +0000)]
be2net: allocate more headroom in incoming skbs

Allocation of 64 bytes in skb headroom is not enough if we have to pull
ethernet + ipv6 + tcp headers, and/or extra tunneling header.

Its currently not noticed because netdev_alloc_skb_ip_align(64) give us
more room, thanks to power-of-two kmalloc() roundups.

Make sure we ask for 128 bytes so that side effects of upcoming patches
from Ian Campbell dont decrease benet rx performance, because of extra
skb head reallocations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Vasundhara Volam <vasundhara.volam@emulex.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: make net_device_ops const
stephen hemminger [Thu, 5 Jan 2012 19:10:25 +0000 (19:10 +0000)]
netdev: make net_device_ops const

More drivers where net_device_ops should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix be_vlan_add/rem_vid
Ajit Khaparde [Fri, 30 Dec 2011 12:15:12 +0000 (12:15 +0000)]
be2net: fix be_vlan_add/rem_vid

1) fix be_vlan_add/rem_vid to return proper status
2) perform appropriate housekeeping if firmware command succeeds.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix INTx processing for Lancer
Padmanabh Ratnakar [Mon, 19 Dec 2011 01:53:35 +0000 (01:53 +0000)]
be2net: Fix INTx processing for Lancer

Lancer does not have HW registers to indicate the EQ causing the INTx
interrupt. As a result EQE entries of one EQ may be consumed when interrupt
is caused by another EQ. Fix this by arming CQs at the end of NAPI poll
routine to regenerate the EQEs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Add support for Skyhawk cards
Ajit Khaparde [Thu, 15 Dec 2011 06:31:38 +0000 (06:31 +0000)]
be2net: Add support for Skyhawk cards

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix ethtool ringparam reporting
Sathya Perla [Tue, 13 Dec 2011 00:58:49 +0000 (00:58 +0000)]
be2net: fix ethtool ringparam reporting

The ethtool "-g" option is supposed to report the max queue length and
user modified queue length for RX and TX queues.  be2net doesn't support
user modification of queue lengths. So, the correct values for these
would be the max numbers.
be2net incorrectly reports the queue used values for these fields.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: workaround to fix a bug in BE
Ajit Khaparde [Fri, 9 Dec 2011 13:53:17 +0000 (13:53 +0000)]
be2net: workaround to fix a bug in BE

disable Tx vlan offloading in certain cases.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: update some counters to display via ethtool
Ajit Khaparde [Fri, 9 Dec 2011 13:53:09 +0000 (13:53 +0000)]
be2net: update some counters to display via ethtool

update pmem_fifo_overflow_drop, rx_priority_pause_frames counters.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: make vlan ndo_vlan_rx_[add/kill]_vid return error value
Jiri Pirko [Fri, 9 Dec 2011 00:52:37 +0000 (19:52 -0500)]
net: make vlan ndo_vlan_rx_[add/kill]_vid return error value

Let caller know the result of adding/removing vlan id to/from vlan
filter.

In some drivers I make those functions to just return 0. But in those
where there is able to see if hw setup went correctly, return value is
set appropriately.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: netpoll support
Ivan Vecera [Thu, 8 Dec 2011 01:31:21 +0000 (01:31 +0000)]
be2net: netpoll support

Add missing netpoll support.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Maxim Uvarov [Mon, 7 May 2012 17:32:43 +0000 (10:32 -0700)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into uek-2.6.39-200

13 years agoMerge branch 'stable/for-linus-3.4.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Mon, 7 May 2012 16:38:51 +0000 (12:38 -0400)]
Merge branch 'stable/for-linus-3.4.rebased' into uek2-merge

* stable/for-linus-3.4.rebased:
  xen/pci: don't use PCI BIOS service for configuration space accesses
  xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
  xen/apic: Return the APIC ID (and version) for CPU 0.
  drivers/video/xen-fbfront.c: add missing cleanup code
  xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'

Conflicts:
arch/x86/xen/enlighten.c

13 years agoxen/pci: don't use PCI BIOS service for configuration space accesses
David Vrabel [Fri, 4 May 2012 13:29:46 +0000 (14:29 +0100)]
xen/pci: don't use PCI BIOS service for configuration space accesses

The accessing PCI configuration space with the PCI BIOS32 service does
not work in PV guests.

On systems without MMCONFIG or where the BIOS hasn't marked the
MMCONFIG region as reserved in the e820 map, the BIOS service is
probed (even though direct access is preferred) and this hangs.

CC: stable@kernel.org
Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[upstream git commit 76a8df7b49168509df02461f83fab117a4a86e08]
Conflicts:

arch/x86/xen/enlighten.c

13 years agoxen/Kconfig: fix Kconfig layout
Andrew Morton [Fri, 4 May 2012 21:04:12 +0000 (14:04 -0700)]
xen/Kconfig: fix Kconfig layout

Fit it into 80 columns so that it is readable in menuconfig.

[upstream git commit 0d8deb3fb1ea198aeaf1359b69f15e173ef8d3ed]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
Konrad Rzeszutek Wilk [Thu, 3 May 2012 20:14:14 +0000 (16:14 -0400)]
xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs

If I try to do "cat /sys/kernel/debug/kernel_page_tables"
I end up with:

BUG: unable to handle kernel paging request at ffffc7fffffff000
IP: [<ffffffff8106aa51>] ptdump_show+0x221/0x480
PGD 0
Oops: 0000 [#1] SMP
CPU 0
.. snip..
RAX: 0000000000000000 RBX: ffffc00000000fff RCX: 0000000000000000
RDX: 0000800000000000 RSI: 0000000000000000 RDI: ffffc7fffffff000

which is due to the fact we are trying to access a PFN that is not
accessible to us. The reason (at least in this case) was that
PGD[256] is set to __HYPERVISOR_VIRT_START which setup (by the
hypervisor) to point to a read-only linear map of the MFN->PFN array.
During our parsing we would get the MFN (a valid one), try to look
it up in the MFN->PFN tree and find it invalid and return ~0 as PFN.
Then pte_mfn_to_pfn would happilly feed that in, attach the flags
and return it back to the caller. In this case the ptdump_show
bitshifts it and we get this invalid value.

Instead of doing all of that, we detect the ~0 case and just return
!_PAGE_PRESENT.

CC: stable@kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/apic: Return the APIC ID (and version) for CPU 0.
Konrad Rzeszutek Wilk [Wed, 2 May 2012 19:04:51 +0000 (15:04 -0400)]
xen/apic: Return the APIC ID (and version) for CPU 0.

On x86_64 on AMD machines where the first APIC_ID is not zero, we get:

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x10] enabled)
BIOS bug: APIC version is 0 for CPU 1/0x10, fixing up to 0x10
BIOS bug: APIC version mismatch, boot CPU: 0, CPU 1: version 10

which means that when the ACPI processor driver loads and
tries to parse the _Pxx states it fails to do as, as it
ends up calling acpi_get_cpuid which does this:

for_each_possible_cpu(i) {
        if (cpu_physical_id(i) == apic_id)
                return i;
}

And the bootup CPU, has not been found so it fails and returns -1
for the first CPU - which then subsequently in the loop that
"acpi_processor_get_info" does results in returning an error, which
means that "acpi_processor_add" failing and per_cpu(processor)
is never set (and is NULL).

That means that when xen-acpi-processor tries to load (much much
later on) and parse the P-states it gets -ENODEV from
acpi_processor_register_performance() (which tries to read
the per_cpu(processor)) and fails to parse the data.

Reported-by-and-Tested-by: Stefan Bader <stefan.bader@canonical.com>
Suggested-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
[v2: Bit-shift APIC ID by 24 bits]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agodrivers/video/xen-fbfront.c: add missing cleanup code
Julia Lawall [Sun, 22 Apr 2012 09:57:40 +0000 (11:57 +0200)]
drivers/video/xen-fbfront.c: add missing cleanup code

The operations in the subsequent error-handling code appear to be also
useful here.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[v1: Collapse some of the error handling functions]
[v2: Fix compile warning]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic...
Konrad Rzeszutek Wilk [Tue, 20 Mar 2012 19:04:18 +0000 (15:04 -0400)]
xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'

The above mentioned patch checks the IOAPIC and if it contains
-1, then it unmaps said IOAPIC. But under Xen we get this:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
IP: [<ffffffff8134e51f>] xen_irq_init+0x1f/0xb0
PGD 0
Oops: 0002 [#1] SMP
CPU 0
Modules linked in:

Pid: 1, comm: swapper/0 Not tainted 3.2.10-3.fc16.x86_64 #1 Dell Inc. Inspiron
1525                  /0U990C
RIP: e030:[<ffffffff8134e51f>]  [<ffffffff8134e51f>] xen_irq_init+0x1f/0xb0
RSP: e02b: ffff8800d42cbb70  EFLAGS: 00010202
RAX: 0000000000000000 RBX: 00000000ffffffef RCX: 0000000000000001
RDX: 0000000000000040 RSI: 00000000ffffffef RDI: 0000000000000001
RBP: ffff8800d42cbb80 R08: ffff8800d6400000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffef
R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000010
FS:  0000000000000000(0000) GS:ffff8800df5fe000(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000 CR0:000000008005003b
CR2: 0000000000000040 CR3: 0000000001a05000 CR4: 0000000000002660
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper/0 (pid: 1, threadinfo ffff8800d42ca000, task ffff8800d42d0000)
Stack:
 00000000ffffffef 0000000000000010 ffff8800d42cbbe0 ffffffff8134f157
 ffffffff8100a9b2 ffffffff8182ffd1 00000000000000a0 00000000829e7384
 0000000000000002 0000000000000010 00000000ffffffff 0000000000000000
Call Trace:
 [<ffffffff8134f157>] xen_bind_pirq_gsi_to_irq+0x87/0x230
 [<ffffffff8100a9b2>] ? check_events+0x12+0x20
 [<ffffffff814bab42>] xen_register_pirq+0x82/0xe0
 [<ffffffff814bac1a>] xen_register_gsi.part.2+0x4a/0xd0
 [<ffffffff814bacc0>] acpi_register_gsi_xen+0x20/0x30
 [<ffffffff8103036f>] acpi_register_gsi+0xf/0x20
 [<ffffffff8131abdb>] acpi_pci_irq_enable+0x12e/0x202
 [<ffffffff814bc849>] pcibios_enable_device+0x39/0x40
 [<ffffffff812dc7ab>] do_pci_enable_device+0x4b/0x70
 [<ffffffff812dc878>] __pci_enable_device_flags+0xa8/0xf0
 [<ffffffff812dc8d3>] pci_enable_device+0x13/0x20

The reason we are dying is b/c the call acpi_get_override_irq() is used,
which returns the polarity and trigger for the IRQs. That function calls
mp_find_ioapics to get the 'struct ioapic' structure - which along with the
mp_irq[x] is used to figure out the default values and the polarity/trigger
overrides. Since the mp_find_ioapics now returns -1 [b/c the IOAPIC is filled
with 0xffffffff], the acpi_get_override_irq() stops trying to lookup in the
mp_irq[x] the proper INT_SRV_OVR and we can't install the SCI interrupt.

The proper fix for this is going in v3.5 and adds an x86_io_apic_ops
struct so that platforms can override it. But for v3.4 lets carry this
work-around. This patch does that by providing a slightly different variant
of the fake IOAPIC entries.

[upstream git commit]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.6.0
Maxim Uvarov [Fri, 4 May 2012 22:55:45 +0000 (15:55 -0700)]
SPEC: v2.6.39-200.6.0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[USB] cdc-acm: Increase number of devices to 64
Joe Jin [Fri, 4 May 2012 22:52:06 +0000 (15:52 -0700)]
[USB] cdc-acm: Increase number of devices to 64

Orabug: 13693812
Increase usb acm devices to 64.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agogit-changelog: generate date entry
Maxim Uvarov [Fri, 4 May 2012 22:30:10 +0000 (15:30 -0700)]
git-changelog: generate date entry

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[scsi] hpsa: Remove some PCI IDs if for OL5.
Joe Jin [Fri, 4 May 2012 02:05:37 +0000 (10:05 +0800)]
[scsi] hpsa: Remove some PCI IDs if for OL5.

Remove some PCI IDs if for OL5.

Signed-off-by: Joe Jin <joe.jin@oracle.com>