]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years ago[SCSI] libfc: avoid exchanges collision during lport reset
Vasu Dev [Fri, 28 Oct 2011 18:34:17 +0000 (11:34 -0700)]
[SCSI] libfc: avoid exchanges collision during lport reset

Currently timer delay is large and is using msleep to avoid
avoid exchanges collision across lport reset, so instead
do this by initializing exches pool indexes during
reset also.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b6e3c84034b93e6acc895711f74730e235dfe9d2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoSPEC: v2.6.39-100.1.1
Guru Anbalagane [Wed, 8 Feb 2012 06:10:28 +0000 (22:10 -0800)]
SPEC: v2.6.39-100.1.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2-stable_modsigndev' of git://ca-git.us.oracle.com/linux-muvarov...
Guru Anbalagane [Wed, 8 Feb 2012 05:47:57 +0000 (21:47 -0800)]
Merge branch 'uek2-stable_modsigndev' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agoMerge branch 'uek2-stable-enic2' of git://ca-git.us.oracle.com/linux-chander-public...
Guru Anbalagane [Wed, 8 Feb 2012 05:38:44 +0000 (21:38 -0800)]
Merge branch 'uek2-stable-enic2' of git://ca-git.us.oracle.com/linux-chander-public into uek2-stable

Conflicts:
drivers/net/ixgbe/ixgbe_82599.c

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'for_uek' of git://ca-git.us.oracle.com/linux-bpicco-public into uek2...
Guru Anbalagane [Wed, 8 Feb 2012 05:04:02 +0000 (21:04 -0800)]
Merge branch 'for_uek' of git://ca-git.us.oracle.com/linux-bpicco-public into uek2-stable

13 years agomm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during...
Mel Gorman [Fri, 3 Feb 2012 23:37:18 +0000 (15:37 -0800)]
mm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration

commit 0bf380bc70ecba68cb4d74dc656cc2fa8c4d801a upstream.

When isolating for migration, migration starts at the start of a zone
which is not necessarily pageblock aligned.  Further, it stops isolating
when COMPACT_CLUSTER_MAX pages are isolated so migrate_pfn is generally
not aligned.  This allows isolate_migratepages() to call pfn_to_page() on
an invalid PFN which can result in a crash.  This was originally reported
against a 3.0-based kernel with the following trace in a crash dump.

PID: 9902   TASK: d47aecd0  CPU: 0   COMMAND: "memcg_process_s"
 #0 [d72d3ad0] crash_kexec at c028cfdb
 #1 [d72d3b24] oops_end at c05c5322
 #2 [d72d3b38] __bad_area_nosemaphore at c0227e60
 #3 [d72d3bec] bad_area at c0227fb6
 #4 [d72d3c00] do_page_fault at c05c72ec
 #5 [d72d3c80] error_code (via page_fault) at c05c47a4
    EAX: 00000000  EBX: 000c0000  ECX: 00000001  EDX: 00000807  EBP: 000c0000
    DS:  007b      ESI: 00000001  ES:  007b      EDI: f3000a80  GS:  6f50
    CS:  0060      EIP: c030b15a  ERR: ffffffff  EFLAGS: 00010002
 #6 [d72d3cb4] isolate_migratepages at c030b15a
 #7 [d72d3d14] zone_watermark_ok at c02d26cb
 #8 [d72d3d2c] compact_zone at c030b8de
 #9 [d72d3d68] compact_zone_order at c030bba1
#10 [d72d3db4] try_to_compact_pages at c030bc84
#11 [d72d3ddc] __alloc_pages_direct_compact at c02d61e7
#12 [d72d3e08] __alloc_pages_slowpath at c02d66c7
#13 [d72d3e78] __alloc_pages_nodemask at c02d6a97
#14 [d72d3eb8] alloc_pages_vma at c030a845
#15 [d72d3ed4] do_huge_pmd_anonymous_page at c03178eb
#16 [d72d3f00] handle_mm_fault at c02f36c6
#17 [d72d3f30] do_page_fault at c05c70ed
#18 [d72d3fb0] error_code (via page_fault) at c05c47a4
    EAX: b71ff000  EBX: 00000001  ECX: 00001600  EDX: 00000431
    DS:  007b      ESI: 08048950  ES:  007b      EDI: bfaa3788
    SS:  007b      ESP: bfaa36e0  EBP: bfaa3828  GS:  6f50
    CS:  0073      EIP: 080487c8  ERR: ffffffff  EFLAGS: 00010202

It was also reported by Herbert van den Bergh against 3.1-based kernel
with the following snippet from the console log.

BUG: unable to handle kernel paging request at 01c00008
IP: [<c0522399>] isolate_migratepages+0x119/0x390
*pdpt = 000000002f7ce001 *pde = 0000000000000000

It is expected that it also affects 3.2.x and current mainline.

The problem is that pfn_valid is only called on the first PFN being
checked and that PFN is not necessarily aligned.  Lets say we have a case
like this

H = MAX_ORDER_NR_PAGES boundary
| = pageblock boundary
m = cc->migrate_pfn
f = cc->free_pfn
o = memory hole

H------|------H------|----m-Hoooooo|ooooooH-f----|------H

The migrate_pfn is just below a memory hole and the free scanner is beyond
the hole.  When isolate_migratepages started, it scans from migrate_pfn to
migrate_pfn+pageblock_nr_pages which is now in a memory hole.  It checks
pfn_valid() on the first PFN but then scans into the hole where there are
not necessarily valid struct pages.

This patch ensures that isolate_migratepages calls pfn_valid when
necessary.

Reported-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Tested-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoblock: Disable autoprotect
Martin K. Petersen [Wed, 22 Sep 2010 19:33:37 +0000 (15:33 -0400)]
block: Disable autoprotect

Not all filesystems keep their pages stable during I/O leading to
checksum failures.  Disable automatic protection.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agoMerge branch 'uek2-stable_hpwdt' of git://ca-git.us.oracle.com/linux-muvarov-public...
Guru Anbalagane [Wed, 8 Feb 2012 00:41:55 +0000 (16:41 -0800)]
Merge branch 'uek2-stable_hpwdt' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agoenic: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:18 +0000 (04:54 +0000)]
enic: do vlan cleanup

- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6ede746b62627b6f03fe88afad1a07d38917b85d)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Add support to configure hardware interrupt coalesce timers in a platform indep...
Vasanthy Kolluri [Fri, 17 Jun 2011 07:56:48 +0000 (07:56 +0000)]
enic: Add support to configure hardware interrupt coalesce timers in a platform independent way

enic driver and the underlying hardware use different units for representing the interrupt coalesce timer.
Driver converts the interrupt coalesce timer in usec to hardware cycles while setting the relevant hardware
registers. The conversion factor can be different for each of the adapter hardware types. So it is dynamically
learnt from the adapter firmware using the devcmd CMD_INTR_COAL_CONVERT. This allows the driver to configure
the hardware interrupt coalesce timers in a platform independent way.

Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit ea7ea65a3b37bf207d5c352ac6254506b3dc3901)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Partial: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:07 +0000 (10:37 +0000)]
enic: Partial: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b880a954b9e2585ce325aedd76e4741880cab180)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Get/Set interrupt resource index for transmit and receive queues
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:02 +0000 (10:37 +0000)]
enic: Get/Set interrupt resource index for transmit and receive queues

Instead of deriving the index of a transmit/receive interrupt resource
from the transmit/receive queue index, always save and retrieve it
using an additional variable.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 7d260ec26ee56495bcb32491d44ed4590cc838a0)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Log device configuration in detail during driver load
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:57 +0000 (10:36 +0000)]
enic: Log device configuration in detail during driver load

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e1fb77bfd062b8d38fb0e428ae0edcd2dc4ec07b)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Pass 802.1p bits for packets tagged with vlan zero
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:52 +0000 (10:36 +0000)]
enic: Pass 802.1p bits for packets tagged with vlan zero

enic driver currently passes 802.1p bits to the upper layers for packets
tagged with non-zero vlan ids only. This patch extends such behaviour to
zero vlan tagged packets also.

The patch is dependant on the following kernel patches:

1) vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
   - net-next-2.6 git commit: ad1afb00393915a51c21b1ae8704562bf036855f
   - Available 2.6.36 and later
2) vlan: Centralize handling of hardware acceleration.
  - net-next-2.6 git commit: 3701e51382a026cba10c60b03efabe534fba4ca4
  - Available 2.6.37 and later

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8757446d8df4446fc7f5d24ad6d53e9f265cc021)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: update to support 64 bit stats
stephen hemminger [Wed, 8 Jun 2011 14:54:02 +0000 (14:54 +0000)]
enic: update to support 64 bit stats

The device driver already uses 64 bit statistics, it just
doesn't use the 64 bit interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f20530bc982d67ebde84b3e0a043549d7ccd85a1)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Add support for MTU change via port profile on a dynamic vnic
Roopa Prabhu [Fri, 3 Jun 2011 14:35:17 +0000 (14:35 +0000)]
enic: Add support for MTU change via port profile on a dynamic vnic

enic driver gets MTU change notifications for MTU changes in the
port profile associated to a dynamic vnic. This patch adds support
in enic driver to set new MTU on the dynamic vnic and dynamically
adjust its buffers with new MTU size in response to such notifications.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c97c894dc7bcae28d0308dbcd010185079de4a28)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agodrivers/net: Remove unnecessary semicolons
Joe Perches [Fri, 3 Jun 2011 11:51:20 +0000 (11:51 +0000)]
drivers/net: Remove unnecessary semicolons

Semicolons are not necessary after switch/while/for/if braces
so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6403eab143205a45a5493166ff8bf7e3646f4a77)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoMerge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public...
Guru Anbalagane [Mon, 6 Feb 2012 21:45:16 +0000 (13:45 -0800)]
Merge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public into uek2-stable

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Sat, 4 Feb 2012 00:24:27 +0000 (16:24 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years ago[SCSI] megaraid_sas Version to 5.40-rc1 and Changelog update
adam radford [Tue, 26 Jul 2011 22:43:01 +0000 (15:43 -0700)]
[SCSI] megaraid_sas Version to 5.40-rc1 and Changelog update

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Add .change_queue_depth support
adam radford [Tue, 26 Jul 2011 22:42:52 +0000 (15:42 -0700)]
[SCSI] megaraid_sas: Add .change_queue_depth support

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Fix FastPath I/O to work on degraded raid 1
adam radford [Tue, 26 Jul 2011 23:16:40 +0000 (16:16 -0700)]
[SCSI] megaraid_sas: Fix FastPath I/O to work on degraded raid 1

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agobnx2x: add missing break in bnx2x_dcbnl_get_cap
Shmulik Ravid [Thu, 22 Sep 2011 02:33:33 +0000 (02:33 +0000)]
bnx2x: add missing break in bnx2x_dcbnl_get_cap

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a0babc80eb375aad69dab4687c3b44c47d42f241)

13 years agobnx2x: fix hw attention handling
Dmitry Kravkov [Thu, 22 Sep 2011 02:33:31 +0000 (02:33 +0000)]
bnx2x: fix hw attention handling

Use register name to initialize attention mask

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f2eaeb58bf6995a979c413ea0cc73289533feacb)

13 years agobnx2x: prevent flooded warnning kernel info
Joe Jin [Tue, 27 Sep 2011 07:17:10 +0000 (15:17 +0800)]
bnx2x: prevent flooded warnning kernel info

This fixes orabug 12687487 and backported fixes for RHBZ 712000.
When a VN is configured to invalid Max BW, we only need to be told once.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Reported-by: Sriharsha Devdas <sriharsha.devdas@oracle.com>
(cherry picked from commit 8cac1300f2d0dd18b2104ccc20aa00ca237343e1)

13 years agoBtrfs: don't reserve data with extents locked in btrfs_fallocate
Chris Mason [Wed, 1 Feb 2012 01:27:41 +0000 (20:27 -0500)]
Btrfs: don't reserve data with extents locked in btrfs_fallocate

btrfs_fallocate tries to allocate space only if ranges in the file don't
already exist.  But the enospc checks it does are not allowed with
extents locked.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agowatchdog: hpwdt: prevent multiple "NMI occurred" messages
Naga Chumbalkar [Tue, 9 Aug 2011 22:27:26 +0000 (22:27 +0000)]
watchdog: hpwdt: prevent multiple "NMI occurred" messages

On platforms with no iCRU support don't print two, (possibly conflicting),
"NMI occurred" messages when the firmware is unable to source the NMI.

Please note that one of the enhancements to the v1.3.0 hpwdt driver is to panic and allow
KDUMP to succeed even on NMIs that are unknown to the platform firmware.

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Reviewed-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agowatchdog: hpwdt: add next gen HP servers
Thomas Mingarelli [Tue, 26 Jul 2011 13:05:53 +0000 (14:05 +0100)]
watchdog: hpwdt: add next gen HP servers

This patch is required to enable hpwdt to work on next generation HP servers
with iLO.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agobnx2fc: Update copyright and bump version to 1.0.4
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:13 +0000 (11:32 -0700)]
bnx2fc: Update copyright and bump version to 1.0.4

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 9b35baae3a62c33a73a6fd8bf4d1b6c4e3b5b5f3)

13 years agobnx2fc: Tx BDs cache in write tasks
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:12 +0000 (11:32 -0700)]
bnx2fc: Tx BDs cache in write tasks

When there is a single BD for the entire data to be transmitted, use the BD
inside the SGL context and set the cached SGE indication in the task context

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 3c75108fce9be6c72c45e50973b3cbb0fcdb4f19)

13 years agobnx2fc: Do not arm CQ when there are no CQEs
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:11 +0000 (11:32 -0700)]
bnx2fc: Do not arm CQ when there are no CQEs

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit fd08bd622d255252095a7d5b20b8305916c6f64e)

13 years agobnx2fc: hold tgt lock when calling cmd_release
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:10 +0000 (11:32 -0700)]
bnx2fc: hold tgt lock when calling cmd_release

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit bd4d5de8b9b97ff100342948c39634b44c43fe81)

13 years agobnx2fc: Enable support for sequence level error recovery
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:09 +0000 (11:32 -0700)]
bnx2fc: Enable support for sequence level error recovery

Driver advertises its support for 'retry' bit and 'conf completion' bit in PRLI
params to enable support for 'sequence level error recovery'

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 72812ee0bd2098a7709dbcff61395fbba3f27cda)

13 years agobnx2fc: HSI changes for tape
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:08 +0000 (11:32 -0700)]
bnx2fc: HSI changes for tape

Program the firmware task structure with init_flags indicating the device is
'sequence level error recovery' capable.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit f3820b719d91a0ed1e26831b1cfdcdf1641ab586)

13 years agobnx2fc: Handle REC_TOV error code from firmware
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:07 +0000 (11:32 -0700)]
bnx2fc: Handle REC_TOV error code from firmware

Driver decides to initiate REC on REC_TOV timer pop. The firmware maintains the
REC timer and informs the driver as a firmware error message, which is an
unsolicited event to the driver. Driver also issues REC on other unsolicited
events from firmware that indicate data loss.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 7b594769120b43b8da1ff8f7b4c31a47fabd6ac0)

13 years agobnx2fc: REC/SRR link service request and response handling
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:06 +0000 (11:32 -0700)]
bnx2fc: REC/SRR link service request and response handling

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 744469542951d32979a8dcb1dbed560bfed1745e)

13 years agobnx2fc: Support 'sequence cleanup' task
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:05 +0000 (11:32 -0700)]
bnx2fc: Support 'sequence cleanup' task

For the devices that support sequence level error recovery, based on the REC
response, the firmware has to be informed about the offset from which the
retransmission should happen. Driver initiates sequence cleanup task to
firmware so that the firmware can program the task. Upon the sequence cleanup
completion, SRR is issued to retransmit the sequence.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 6c5a7ce4f176b641fd11e59be4df31ee3e6202dd)

13 years agobnx2fc: Enable REC & CONF support for the session
Bhanu Prakash Gollapudi [Tue, 26 Jul 2011 21:51:40 +0000 (14:51 -0700)]
bnx2fc: Enable REC & CONF support for the session

Based on PRLI response, identify if the target is FCP-2 (seq level error
recovery) capable, and appropriately set the corresponding CONF, REC flags when
offloading the session.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b252f4c7c39cc43c1a34c68951f98d7391a1a103)

13 years agobnx2fc: Introduce interface structure for each vlan interface
Bhanu Prakash Gollapudi [Tue, 26 Jul 2011 21:51:39 +0000 (14:51 -0700)]
bnx2fc: Introduce interface structure for each vlan interface

Currently, bnx2fc has a hba structure that can work with only a single vlan
interface.  When there is a change in vlan id, it does not have the capability
to switch to different vlan interface. To solve this problem, a new structure
called 'interface' has been introduced, and each hba can now have multiple
interfaces, one per vlan id.

Most of the patch is a moving the interface specific fields from hba to the
interface structure, and appropriately modifying the dereferences. A list of
interfaces (if_list) is maintained along with adapter list. During a create
call, the interface structure is allocated and added to if_list and deleted &
freed on a destroy call.  Link events are propagated to all interfaces
belonging to the hba.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit aea71a024914e8b5b8bed31256dae42195a0a207)

13 years agobnx2fc: Replace printks with KERN_ALERT to KERN_ERR/KERN_INFO
Bhanu Prakash Gollapudi [Tue, 28 Jun 2011 06:30:53 +0000 (23:30 -0700)]
bnx2fc: Replace printks with KERN_ALERT to KERN_ERR/KERN_INFO

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b2a554ff9ad5cdd8d00dac168f2bb3db7ccedb61)

13 years agocnic: Add VLAN ID as a parameter during netevent upcall
Michael Chan [Wed, 20 Jul 2011 14:55:24 +0000 (14:55 +0000)]
cnic: Add VLAN ID as a parameter during netevent upcall

The bnx2fc driver needs to handle netdev events on VLAN devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 415199f2bd977fa4065d4e836b4b7543f7993bc3)

13 years agobnx2i: Updated copyright and bump version
Eddie Wai [Thu, 23 Jun 2011 22:51:37 +0000 (15:51 -0700)]
bnx2i: Updated copyright and bump version

Bumped version from 2.6.2.3 to 2.7.0.3

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit ea9582d721a0d711fb046a25f5e94dcbbc5be410)

13 years agobnx2i: Modified to skip CNIC registration if iSCSI is not supported
Eddie Wai [Thu, 23 Jun 2011 22:51:35 +0000 (15:51 -0700)]
bnx2i: Modified to skip CNIC registration if iSCSI is not supported

The init routine will now examine the cnic->max_iscsi_conn variable
before registering to CNIC during ulp_init.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 3601b531987ea9f861300ae1189256f7118f4f09)

13 years agobnx2i: Added the use of kthreads to handle SCSI cmd completion
Eddie Wai [Thu, 23 Jun 2011 22:51:34 +0000 (15:51 -0700)]
bnx2i: Added the use of kthreads to handle SCSI cmd completion

This patch breaks the SCSI cmd completion into two parts:
1. The bh will allocate and queued work to the cmd specific CPU IO
completion kthread.  The CPU for the cmd is from the sc->request->cpu.

2. The CPU specific IO completion kthread will call the scsi_cmd_resp
routine to do the actual cmd completion.

In the normal case, these IO completion kthreads should complete before
the blk IO times out at 60s.  However, in the case when these kthreads
are blocked for whatever reason and exceeded the timeout, the call
to conn_destroy will have to iterate and exhaust all related work in the
percpu work list for all online CPUs.  This will guarantee the protection
of the work->session and conn pointers before they get freed.

Also modified the event coalescing formula to have at least the
event_coal_min outstanding cmds in the pipeline so the SCSI producer
would not get underrun.

Also changed the following SCSI parameters:
- can_queue from 1024 to 2048
- cmds_per_lun from 24 to 128

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Benjamin Li <benli@broadcom.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b5cf6b63f73abdc051035f0050b367beeb2ef94c)

13 years agoiscsi: Use struct scsi_lun in iscsi structs instead of u8[8]
Andy Grover [Thu, 16 Jun 2011 22:57:09 +0000 (15:57 -0700)]
iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]

struct scsi_lun is also just a struct with an array of 8 octets (64 bits)
but using it instead in iscsi structs lets us call scsilun_to_int
without a cast, and also lets us copy it using assignment, instead of
memcpy().

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 516f43a2a555000e77c1d59b8298cb46aad9ecc1)

13 years agocnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNC
Michael Chan [Wed, 20 Jul 2011 14:55:23 +0000 (14:55 +0000)]
cnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNC

Otherwise, the firmware will not respond and we'll have to wait for
timeout.  Refactor the wait loop we already have into a separate
function for this purpose.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 74e49bbdabbac34c77b280152b1de9bef9bf9be7)

13 years agocnic: Fix Context ID space calculation
Michael Chan [Wed, 20 Jul 2011 14:55:22 +0000 (14:55 +0000)]
cnic: Fix Context ID space calculation

Include FCoE CID space only for E2_PLUS devices.  Remove old CID
offset adjustments that are no longer needed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b37a41e390310429d4171b0f7b6c6eab04512dc0)

13 years agobnx2x: Implementation for netdev->ndo_fcoe_get_wwn
Vladislav Zolotarov [Thu, 21 Jul 2011 07:56:51 +0000 (07:56 +0000)]
bnx2x: Implementation for netdev->ndo_fcoe_get_wwn

(
note this was hand merged. should we need ndo_setup_tc then
revert/reapply and/or merge away.
)

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Fix endian swapping on firmware version string
Michael Chan [Wed, 20 Jul 2011 14:55:25 +0000 (14:55 +0000)]
bnx2: Fix endian swapping on firmware version string

so that ethtool -i will display it correctly on big endian systems.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3aeb7d2243e55ddcad3c0b402e7b09619a67f5da)

13 years agobnx2: Close device if tx_timeout reset fails
Michael Chan [Fri, 15 Jul 2011 06:53:58 +0000 (06:53 +0000)]
bnx2: Close device if tx_timeout reset fails

Based on original patch and description from Flavio Leitner <fbl@redhat.com>

When bnx2_reset_task() is called, it will stop,
(re)initialize and start the interface to restore
the working condition.

The bnx2_init_nic() calls bnx2_reset_nic() which will
reset the chip and then calls bnx2_free_skbs() to free
all the skbs.

The problem happens when bnx2_init_chip() fails because
bnx2_reset_nic() will just return skipping the ring
initializations at bnx2_init_all_rings(). Later, the
reset task starts the interface again and the system
crashes due a NULL pointer access (no skb in the ring).

To fix it, we call dev_close() if bnx2_init_nic() fails.
One minor wrinkle to deal with is the cancel_work_sync()
call in bnx2_close() to cancel bnx2_reset_task().  The
call will wait forever because it is trying to cancel
itself and the workqueue will be stuck.

Since bnx2_reset_task() holds the rtnl_lock() and checks
for netif_running() before proceeding, there is no need
to cancel bnx2_reset_task() in bnx2_close() even if
bnx2_close() and bnx2_reset_task() are running concurrently.
The rtnl_lock() serializes the 2 calls.

We need to move the cancel_work_sync() call to
bnx2_remove_one() to make sure it is canceled before freeing
the netdev struct.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Cc: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cd6340199f65cad63262db0fd561bdcfd69df3bd)

13 years agobnx2: Read iSCSI config from shared memory during ->probe()
Michael Chan [Wed, 13 Jul 2011 17:24:22 +0000 (17:24 +0000)]
bnx2: Read iSCSI config from shared memory during ->probe()

The scratchpad location that we were reading from has not been
initialized yet during ->probe(), so we were getting inaccurate
information.

Update version to 2.1.10.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 41c2178adce37b249147063624f8a27b064b471e)

13 years agobnx2: Add MCP dump
Jeffrey Huang [Wed, 13 Jul 2011 17:24:21 +0000 (17:24 +0000)]
bnx2: Add MCP dump

to help debug issues related to management firmware.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ecdbf6e0d555d353188647d1b2dee9a79db69c68)

13 years agobnx2: remove unnecessary read of PCI_CAP_ID_EXP
Jon Mason [Mon, 27 Jun 2011 07:44:43 +0000 (07:44 +0000)]
bnx2: remove unnecessary read of PCI_CAP_ID_EXP

The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e82760e7d6498d24d1a92f22767ba578c8980a6d)

13 years agocnic: Return proper error code if we fail to send netlink message
Michael Chan [Wed, 13 Jul 2011 17:24:20 +0000 (17:24 +0000)]
cnic: Return proper error code if we fail to send netlink message

to allow iSCSI connection to fail faster instead of waiting for the
long timeout.

Update version to 2.5.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 558e4c758c4c7bf209325f5865189c6558860b2b)

13 years agocnic: Fix ring setup/shutdown code
Michael Chan [Wed, 13 Jul 2011 17:24:19 +0000 (17:24 +0000)]
cnic: Fix ring setup/shutdown code

Latest bnx2x driver uses different CID for the iSCSI rings, so
we need to pass it in the ring init data.  The rx ring is also
zeroed out to prevent stale DMA addresses from being used after
shutdown.

The same cp local variable redefined inside the else branch is
also eliminated.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e1dd883cb15310dc2ded9995a1f1d8b1cb1e88f3)

13 years agocnic: Fix port_mode setting
Michael Chan [Wed, 13 Jul 2011 17:24:18 +0000 (17:24 +0000)]
cnic: Fix port_mode setting

CHIP_2_PORT_MODE was not set correctly.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b7d40315c9643034ac4b5c9dda480d0124416f89)

13 years agocnic: Replace get_random_bytes() with random32()
Michael Chan [Wed, 13 Jul 2011 17:24:17 +0000 (17:24 +0000)]
cnic: Replace get_random_bytes() with random32()

Suggested by Stephen Hemminger <shemminger@vyatta.com>

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 973e574e26cc8f4704e5d7f112fd566386e37f04)

13 years agocnic, bnx2i: Add support for new devices - 57800, 57810, and 57840
Michael Chan [Mon, 20 Jun 2011 15:15:56 +0000 (15:15 +0000)]
cnic, bnx2i: Add support for new devices - 57800, 57810, and 57840

And change iSCSI RQ doorbell size from 16B to 64B to match new firmware.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f4b5ad26bcb983c493e131ff34b2fa60100c82e5)

13 years agodrivers/net: Remove casts of void *
Joe Perches [Thu, 16 Jun 2011 19:08:06 +0000 (19:08 +0000)]
drivers/net: Remove casts of void *

Unnecessary casts of void * clutter the code.
(
43d620c82985b19008d87a437b4cf83f356264f7
we only include the part which impacts broadcom drivers/net/cnic.c
)

These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.

Done via coccinelle script (and a little editing):

$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@

- pt = (T *)pv;
+ pt = pv;

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Acked-By: Chris Snook <chris.snook@gmail.com>
Acked-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2fc: Fix kernel panic when deleting NPIV ports
Bhanu Prakash Gollapudi [Fri, 27 May 2011 18:47:27 +0000 (11:47 -0700)]
bnx2fc: Fix kernel panic when deleting NPIV ports

Deleting NPIV port causes a kernel panic when the NPIV port is in the same zone
as the physical port and shares the same LUN. This happens due to the fact that
vport destroy and unsolicited ELS are scheduled to run on the same workqueue,
and vport destroy destroys the lport and the unsolicited ELS tries to access
the invalid lport.  This patch fixes this issue by maintaining a list of valid
lports and verifying if the lport is valid or not before accessing it.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d36b3279e157641c345b12eddb3db78fb42da80f)

13 years agobnx2fc: scsi_dma_unmap() not invoked on IO completions
Bhanu Prakash Gollapudi [Fri, 27 May 2011 18:47:26 +0000 (11:47 -0700)]
bnx2fc: scsi_dma_unmap() not invoked on IO completions

Do not set io_req->sc_cmd to NULL until bnx2fc_unmap_sg_list() is called to
enable it to unmap the DMA mappings.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b5a95fe7ef464a67fab6ff870aa740739e788f90)

13 years agobnx2fc: host stats show the link speed 'unknown' on NIC partitioned interfaces
Bhanu Prakash Gollapudi [Fri, 27 May 2011 18:47:25 +0000 (11:47 -0700)]
bnx2fc: host stats show the link speed 'unknown' on NIC partitioned interfaces

NIC partitioned interfaces reports the speed of 2500 which was not handled by
the driver.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit a4dc08cecfdb3172be61227324a4d2c5fe2de9e5)

13 years agobnx2x: Update date to 2011/06/13 and version to 1.70.00-0
Vladislav Zolotarov [Tue, 14 Jun 2011 01:34:46 +0000 (01:34 +0000)]
bnx2x: Update date to 2011/06/13 and version to 1.70.00-0

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit b96368e9365a4db7429da87cfd25bb54b24954f8)

13 years agobnx2x: PFC support for 578xx
Dmitry Kravkov [Tue, 14 Jun 2011 01:34:42 +0000 (01:34 +0000)]
bnx2x: PFC support for 578xx

Add supoprt for 3 COSes for 578xx devices.
Fix HW configuration for PFC feature according to new HSI in link layer.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit d1976b2e6478a1b8ff2dc35979e7791e2d668285)

13 years agobnx2x: Rename LASI registers to definitions in mdio.h
Yaniv Rosner [Tue, 14 Jun 2011 01:34:38 +0000 (01:34 +0000)]
bnx2x: Rename LASI registers to definitions in mdio.h

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 60d2fe0312b3301fb5a65e9ed0b44465c8237055)

13 years agobnx2x: Add a periodic task for link PHY events
Yaniv Rosner [Tue, 14 Jun 2011 01:34:33 +0000 (01:34 +0000)]
bnx2x: Add a periodic task for link PHY events

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 3deb8167ea66974b0bc8c13c8ee0beafc02a73a1)

13 years agobnx2x: Adjust BCM84833 to BCM578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:27 +0000 (01:34 +0000)]
bnx2x: Adjust BCM84833 to BCM578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 0d40f0d425ec632956547bd8efd8965e5945e1dc)

13 years agobnx2x: Adjust ETS to 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:23 +0000 (01:34 +0000)]
bnx2x: Adjust ETS to 578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 6c3218c6f7e5be6d785486797d48203d54cfd893)

13 years agobnx2x: Add new PHY 54616s
Yaniv Rosner [Tue, 14 Jun 2011 01:34:17 +0000 (01:34 +0000)]
bnx2x: Add new PHY 54616s

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 6583e33baefbe4dea04999ec91be1a1371cd1528)

13 years agobnx2x: Add Warpcore support for 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:12 +0000 (01:34 +0000)]
bnx2x: Add Warpcore support for 578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 3c9ada227c56c6f41e24b01d183b00b007c7ac93)

13 years agobnx2x: Add new MAC support for 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:07 +0000 (01:34 +0000)]
bnx2x: Add new MAC support for 578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 9380bb9e88831bd3d85636b3e4fec30e330d5266)

13 years agobnx2x: Cosmetic changes.
Dmitry Kravkov [Tue, 14 Jun 2011 01:34:02 +0000 (01:34 +0000)]
bnx2x: Cosmetic changes.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 754a2f5220ac7d597454df3104cfce9c83d68df0)

13 years agobnx2x: update DCB data during PMF migration
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:57 +0000 (01:33 +0000)]
bnx2x: update DCB data during PMF migration

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit ef01854e24035a0b17ebeb98b05cfee2c8b36e02)

13 years agobnx2x: 57712 parity handling
Vladislav Zolotarov [Tue, 14 Jun 2011 01:33:51 +0000 (01:33 +0000)]
bnx2x: 57712 parity handling

- Added support for a parity error handling for a 57712 chip.
 - Changed the parity recovery scheme from per-chip to per-engine.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit c9ee92062424375fe6e73c4af5d52df289ccf9eb)

13 years agoNew 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc
Vlad Zolotarov [Tue, 14 Jun 2011 11:33:44 +0000 (14:33 +0300)]
New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc

New FW/HSI (7.0):
 - Added support to 578xx chips
 - Improved HSI - much less driver's direct access to the FW internal
   memory needed.

New implementation of the HSI handling layer in the bnx2x (bnx2x_sp.c):
 - Introduced chip dependent objects that have chip independent interfaces
   for configuration of MACs, multicast addresses, Rx mode, indirection table,
   fast path queues and function initialization/cleanup.
 - Objects functionality is based on the private function pointers, which
   allows not only a per-chip but also PF/VF differentiation while still
   preserving the same interface towards the driver.
 - Objects interface is not influenced by the HSI changes which do not require
   providing new parameters keeping the code outside the bnx2x_sp.c invariant
   with regard to such HSI chnages.

Changes in a CNIC, bnx2fc and bnx2i modules due to the new HSI.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 619c5cb6885b936c44ae1422ef805b69c6291485)

13 years agocnic: Move indexing function pointers to struct kcq_info
Michael Chan [Tue, 14 Jun 2011 01:32:38 +0000 (01:32 +0000)]
cnic: Move indexing function pointers to struct kcq_info

The hardware indexing scheme for the FCoE kcq will change in the upcoming
firmware.  This patch will cope with the change easily.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 59e5137357559ec60b2e72bdc3d5a7e22c47212b)

13 years agolinux-firmware: Add a new FW 7.0.20.0
Vladislav Zolotarov [Wed, 15 Jun 2011 10:38:11 +0000 (11:38 +0100)]
linux-firmware: Add a new FW 7.0.20.0

 - Add a separate directory for the bnx2x FW.
 - Post a new FW version: 7.0.20.0

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoixgbe: Fix FCOE memory leak for DDP packets
Alexander Duyck [Thu, 2 Jun 2011 04:29:23 +0000 (04:29 +0000)]
ixgbe: Fix FCOE memory leak for DDP packets

This patch is meant to fix a memory leak found via code review for FCOE.
Specifically on DDP flows the SKBs were being dropped without being
recycled, freed, or given to the stack.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 63d635b21c00069b5ade7640bcbe8ab912dc65d1)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: fix PHY link setup for 82599
Emil Tantilov [Thu, 28 Jul 2011 06:17:04 +0000 (06:17 +0000)]
ixgbe: fix PHY link setup for 82599

Fix pointer to setup_link for 82599.

This resolves some link issues when advertising modes unsupported
by the link partner.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit b57e35bd0e545181c94405ce35b89000aed56cc5)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: fix __ixgbe_notify_dca() bail out code
Don Skidmore [Wed, 20 Jul 2011 02:27:05 +0000 (02:27 +0000)]
ixgbe: fix __ixgbe_notify_dca() bail out code

The way __ixgbe_notify_dca() was currently set up it would not be
possible to add a requester. Both cases of the IXGBE_FLAG_DCA_ENABLED
bit being on and off would lead to the function exiting for a
DCA_PROVIDER_ADD.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 2a72c31ee4aa31b6a762390e4811a0edf5eefcef)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: convert to ndo_fix_features
Don Skidmore [Thu, 21 Jul 2011 05:55:00 +0000 (05:55 +0000)]
ixgbe: convert to ndo_fix_features

Private rx_csum flags are now duplicate of netdev->features &
NETIF_F_RXCSUM.  We remove those duplicates and now use the net_device_ops
ndo_set_features.  This was based on the original patch submitted by
Michal Miroslaw <mirq-linux@rere.qmqm.pl>.  I also removed the special
case not requiring a reset for X540 hardware.  It is needed just as it is
in 82599 hardware.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 082757afcf7d6e44b24c4927ce5b158196d63e84)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: only enable WoL for magic packet by default
Andy Gospodarek [Sat, 16 Jul 2011 07:31:33 +0000 (07:31 +0000)]
ixgbe: only enable WoL for magic packet by default

Martin Wilck <martin.wilck@ts.fujitsu.com> reported that systems using
the ixgbe-driver that were capable of WoL were rebooting almost as soon
as they were shut down.  This is because the default WoL settings
enabled magic packet, broadcast, unicast, and multicast.

Other Intel devices seem to use the stored eeprom value for initial WoL
capabilities.  The 82578DM (e1000e) and 82576 (igb) the devices I looked
at had only the magic packet enabled in the eeprom, so that seems
appropriate on ixgbe-based devices as well.  I set the WoL options on my
82578DM to be the same default as the ixgbe devices (umbg) and saw the
same as Martin -- almost as soon as my box shutdown, it booted again.

This patch changes the default to only be the magic packet.  This is the
same as the default for most Intel and non-Intel hardware currently
upstream.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
CC: Martin Wilck <martin.wilck@ts.fujitsu.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 9417c464ba834ae29982fcd71bc59dc8e734327c)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: remove ifdef check for non-existent define
Emil Tantilov [Tue, 12 Jul 2011 08:13:41 +0000 (08:13 +0000)]
ixgbe: remove ifdef check for non-existent define

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 34c6ee8181d6ec1ed761ed2fdac4f1b0358e5447)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Pass staterr instead of re-reading status and error bits from descriptor
Alexander Duyck [Sat, 11 Jun 2011 01:45:13 +0000 (01:45 +0000)]
ixgbe: Pass staterr instead of re-reading status and error bits from descriptor

This change is meant to address possible race conditions from the status
and error bits on the RX descriptors being re-read by multiple functions in
the RX cleanup path.  To resolve this I have added code that will pass the
staterr value to those functions.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit ff886dfce2bdacbe71583ec973cec117973d8859)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Move interrupt related values out of ring and into q_vector
Alexander Duyck [Sat, 11 Jun 2011 01:45:08 +0000 (01:45 +0000)]
ixgbe: Move interrupt related values out of ring and into q_vector

This change moves work_limit, total_packets, and total_bytes into the ring
container struct of the q_vector.  The advantage of this is that it should
reduce the size of memory used in the event of multiple rings being
assigned to a single q_vector.  In addition it should help to reduce the
total workload for calculating itr since now total_packets and total_bytes
will be the total work done of the interrupt instead of for the ring.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit bd19805803a954415ec36a559fd3b8a0a3647d7c)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: add structure for containing RX/TX rings to q_vector
Alexander Duyck [Sat, 11 Jun 2011 01:45:03 +0000 (01:45 +0000)]
ixgbe: add structure for containing RX/TX rings to q_vector

This patch adds support for a ring container structure to be used within
the q_vector.  The basic idea is to provide a means of separating the RX
and TX rings while maintaining a common structure for their containment.
The advantage to this is that later we should be able to pass this
structure to the update_itr functions without needing to pass individual
rings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 08c8833b29cfa4343ff132eebc5648b234eb3f85)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: inline the ixgbe_maybe_stop_tx function
Alexander Duyck [Sat, 11 Jun 2011 01:44:58 +0000 (01:44 +0000)]
ixgbe: inline the ixgbe_maybe_stop_tx function

The ixgbe_maybe_stop_tx function is only a few lines long and is called
multiple times through the xmit hotpath.  In order to streamline things it
makes sense to just inline it.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 82d4e46e2a398154273044dd9813206f0d85bc09)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Update ATR to use recorded TX queues instead of CPU for routing
Alexander Duyck [Sat, 11 Jun 2011 01:44:53 +0000 (01:44 +0000)]
ixgbe: Update ATR to use recorded TX queues instead of CPU for routing

This change is meant to update ATR so that it will use the recorded RX
queue instead of the CPU in the case of routing.  This change is meant to
help ixgbe default behavior to more closely match that of the kernel.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 6440752c872e418452a2cbbf5e73d546affe2b28)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Make certain to initialize the fdir_perfect_lock in all cases
Alexander Duyck [Thu, 2 Jun 2011 04:28:39 +0000 (04:28 +0000)]
ixgbe: Make certain to initialize the fdir_perfect_lock in all cases

This fix makes it so that the fdir_perfect_lock is initialized in all
cases.  This is necessary as the fdir_filter_exit routine will always
attempt to take the lock before inspecting the filter table.

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 1fc5f0386461dcb3fcbda7a8bcac87f7a822bc56)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoe1000: always call e1000_check_for_link() on e1000_ce4100 MACs.
Nicolas Schichan [Sat, 9 Jul 2011 00:24:18 +0000 (00:24 +0000)]
e1000: always call e1000_check_for_link() on e1000_ce4100 MACs.

Interrupts about link lost or rx sequence errors are not reported by
the ce4100 hardware, leading to transitions from link UP to link DOWN
never being reported.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 6d9e5130b96daa1656966f7271e8a0928b3906c4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoe1000: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 03:26:31 +0000 (03:26 +0000)]
e1000: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and e1000_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5622e4044a916de1af84bfcc4d437ce0c799d531)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoe1000: convert to ndo_fix_features
Michał Mirosław [Wed, 8 Jun 2011 08:36:42 +0000 (08:36 +0000)]
e1000: convert to ndo_fix_features

Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.

Things noticed:
 - RX csum disabled by default
 - HW VLAN acceleration probably can be toggled, but it's left as is
 - the resets on RX csum offload change can probably be avoided
 - there is A LOT of copy-and-pasted code here

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit e97d3207c5e697e3d86cc67483f9cdcce16cc0bf)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoe1000: remove unnecessary code
Greg Dietsche [Thu, 16 Jun 2011 07:09:30 +0000 (07:09 +0000)]
e1000: remove unnecessary code

Compile tested.
remove unnecessary code that matches this coccinelle pattern
if (...)
return ret;
return ret;

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit c4dc4d108ace27cc0c594b67bd6bd945deaac8c2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoigbvf: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 06:30:00 +0000 (06:30 +0000)]
igbvf: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and igbvf_vlan_rx_register

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

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: A fix to VF TX rate limit
Lior Levy [Sat, 25 Jun 2011 07:09:08 +0000 (00:09 -0700)]
ixgbe: A fix to VF TX rate limit

There is a need to configure MMW_SIZE in register RTTBCNRM with a correct
value (0x4 for non jumbo frames and 0x14 for jumbo frames support).
For 82599 the value is 0x4 and for X540 the value is 0x14.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 7555e83df399ef35e031b137442eac2b1894b993)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Update method used for determining descriptor count for an skb
Alexander Duyck [Fri, 27 May 2011 05:31:52 +0000 (05:31 +0000)]
ixgbe: Update method used for determining descriptor count for an skb

This patch updates the current methods used for determining if we have
enough space to transmit a given skb.  The current method is quite wasteful
as it has us go through and determine how each page is going to be broken
up.  That only needs to be done if pages are larger than our maximum data
per TXD.  As such I have wrapped that in a page size check.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit a535c30e9e98d201089503a0ffa0093cba16e796)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Add one function that handles most of context descriptor setup
Alexander Duyck [Fri, 27 May 2011 05:31:47 +0000 (05:31 +0000)]
ixgbe: Add one function that handles most of context descriptor setup

There is a significant amount of shared functionality between the checksum
and TSO offload configuration that is shared in regards to how they setup
the context descriptors.  Since so much of the functionality is shared it
makes sense to move the shared functionality into a single function and
just call that function from the two context descriptor specific routines.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 897ab15606ce896b6a574a263beb51cbfb43f041)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16
Alexander Duyck [Fri, 27 May 2011 05:31:42 +0000 (05:31 +0000)]
ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16

This change updates all values dealing with count, next_to_use, and
next_to_clean so that they stay u16 values.  The advantage of this is that
there is no re-casting of type during the propagation through the stack.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 63544e9c0055316d0397cb671f2ff99d85c77293)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: Convert IXGBE_DESC_UNUSED from macro to static inline function
Alexander Duyck [Fri, 27 May 2011 05:31:37 +0000 (05:31 +0000)]
ixgbe: Convert IXGBE_DESC_UNUSED from macro to static inline function

This change is a minor cleanup that converts the IXGBE_DESC_UNUSED macro
into a static inline function just for the case of the code being a bit
cleaner.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 7d4987de752a94772ad1ae85ad5c702bbcf73305)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoixgbe: pass adapter struct instead of netdev for interrupt data
Alexander Duyck [Fri, 27 May 2011 05:31:32 +0000 (05:31 +0000)]
ixgbe: pass adapter struct instead of netdev for interrupt data

This change makes it so that we pass the adapter struct instead of the
netdev for most of the basic interrupts that are not associated with
q_vectors.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit a65151ba201fe56ac146767e018674a84bfef1a6)

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