]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 years agoqla4xxx: Added support for ISP83XX
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:08 +0000 (07:55 -0400)]
qla4xxx: Added support for ISP83XX

Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 5c166b5f0defcc6e23b0b9a4494c464b1c6b13b6)

12 years agoqla4xxx: Added new function qla4_8xxx_get_minidump
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:07 +0000 (07:55 -0400)]
qla4xxx: Added new function qla4_8xxx_get_minidump

Move minidump code from qla4_8xxx_device_bootstrap() to
new function qla4_8xxx_get_minidump() to make code more
modular.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 6ef2778ce853d87c30a2d14f4e2d6083af311354)

12 years agoqla4xxx: Set IDC version in correct way
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:06 +0000 (07:55 -0400)]
qla4xxx: Set IDC version in correct way

Issue:
   Device can go to READY state from COLD and skip INITIALIZATION,
   In this case driver will never set IDC version from function
   qla4_8xxx_device_bootstrap().

Fix:
1. Set IDC version at start of function qla4_82xx_need_reset_handler().
2. Set IDC version only if we are 1st driver to load.
3. Added new function qla4_8xxx_update_idc_reg() to set all idc reg at one
   place.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit aaeef189498373e5d2a34d88002c0bd3308ccda2)

12 years agoqla4xxx: Replace all !is_qla8022() with is_qla40XX()
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:05 +0000 (07:55 -0400)]
qla4xxx: Replace all !is_qla8022() with is_qla40XX()

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit c401d5868453612000e9740ebd0c554506316eb3)

12 years agoqla4xxx: Added new functions in isp_ops
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:04 +0000 (07:55 -0400)]
qla4xxx: Added new functions in isp_ops

Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 0ba8bb7ae66816b17df60f5f05ef2ff094fe6d6b)

12 years agoqla4xxx: Clean-up and optimize macros
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:03 +0000 (07:55 -0400)]
qla4xxx: Clean-up and optimize macros

Remove following unused define:-

QLA82XX_MINIDUMP_OCM0_SIZE
QLA82XX_MINIDUMP_L1C_SIZE
QLA82XX_MINIDUMP_L2C_SIZE
QLA82XX_MINIDUMP_COMMON_STR_SIZE
QLA82XX_MINIDUMP_FCOE_STR_SIZE
QLA82XX_MINIDUMP_MEM_SIZE
QLA82XX_MAX_ENTRY_HDR

Added following new define to optimize code:-

MIU_TA_CTL_WRITE_ENABLE
MIU_TA_CTL_WRITE_START
MIU_TA_CTL_START_ENABLE

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 4d26897d129879127cce0707343ae011dab5b4b8)

12 years agoqla4xxx: Rename 82XX macros
Vikas Chaudhary [Wed, 22 Aug 2012 13:14:24 +0000 (09:14 -0400)]
qla4xxx: Rename 82XX macros

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d386106cdcd3e55c3418157ed76935672bc54f78)

12 years agoqla4xxx: Update func name from ql4_ to qla4_
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:01 +0000 (07:55 -0400)]
qla4xxx: Update func name from ql4_ to qla4_

ql4_8xxx_mark_entry_skipped to qla4_8xxx_mark_entry_skipped
ql4_attr_is_visible to qla4_attr_is_visible

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Update structure and variable names
Vikas Chaudhary [Wed, 22 Aug 2012 11:55:00 +0000 (07:55 -0400)]
qla4xxx: Update structure and variable names

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Update function name from 8xxx to 82xx
Vikas Chaudhary [Fri, 9 Nov 2012 08:07:13 +0000 (13:37 +0530)]
qla4xxx: Update function name from 8xxx to 82xx

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Wait for cmd to complete before chip reset for ISP40XX
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:26 +0000 (07:45 -0400)]
qla4xxx: Wait for cmd to complete before chip reset for ISP40XX

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Clear interrupt while unloading driver.
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:25 +0000 (07:45 -0400)]
qla4xxx: Clear interrupt while unloading driver.

while processing the stop firmware mailbox command on driver unload,
a interrupt is processed which causes kernel panic as the response
queue is not valid.

Fix is to clear the interrupt in free_adapter call just after
disabling the interrupts.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Fix lockdep warning in qla4xxx_post_work()
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:24 +0000 (07:45 -0400)]
qla4xxx: Fix lockdep warning in qla4xxx_post_work()

Fix following lockdep warning:-

 INFO: trying to register non-static key.
 the code is fine but needs lockdep annotation.
 turning off the locking correctness validator.
 Pid: 298, comm: modprobe Not tainted 3.6.0-rc1+ #13
 Call Trace:
 [<c049f5c6>] register_lock_class+0x186/0x360
 [<c06e2e39>] ? __dev_printk+0x139/0x280
 [<c04a288a>] __lock_acquire+0x6a/0x450
 [<c04a2cf4>] lock_acquire+0x84/0xf0
 [<f98bb0d0>] ? qla4xxx_post_work+0x20/0x60 [qla4xxx]
 [<c089a05b>] _raw_spin_lock_irqsave+0x4b/0x60
 [<f98bb0d0>] ? qla4xxx_post_work+0x20/0x60 [qla4xxx]
 [<f98bb0d0>] qla4xxx_post_work+0x20/0x60 [qla4xxx]
 [<f98bb1c9>] qla4xxx_post_aen_work+0x49/0x60 [qla4xxx]
 [<f98c6cf2>] qla4xxx_isr_decode_mailbox+0x3f2/0x780 [qla4xxx]
 [<f98c8493>] qla4_83xx_interrupt_service_routine+0x33/0x50 [qla4xxx]
 [<f98d0e49>] qla4_83xx_process_mbox_intr+0x29/0x40 [qla4xxx]
 [<f98c2031>] qla4xxx_mailbox_command+0x361/0x5d0 [qla4xxx]
 [<c08983c8>] ? mutex_unlock+0x8/0x10
 [<f98c3e86>] qla4xxx_get_ifcb+0x66/0xb0 [qla4xxx]
 [<f98c3ef7>] qla4xxx_update_local_ifcb+0x27/0x100 [qla4xxx]
 [<f98c56af>] qla4xxx_initialize_fw_cb+0x2ff/0x3b0 [qla4xxx]
 [<c04150d0>] ? dma_generic_free_coherent+0x30/0x30
 [<f98c0f70>] qla4xxx_init_firmware+0x40/0xf0 [qla4xxx]
 [<f98c10b6>] qla4xxx_initialize_adapter+0x96/0x120 [qla4xxx]
 [<f98d35cd>] qla4xxx_probe_adapter+0x378/0x855 [qla4xxx]
 [<c04a1a04>] ? trace_hardirqs_on_caller+0xf4/0x180
 [<c04a1a9b>] ? trace_hardirqs_on+0xb/0x10
 [<c06ef403>] ? pm_runtime_enable+0x43/0x70
 [<c062f042>] local_pci_probe+0x42/0xb0
 [<c06300c0>] pci_device_probe+0x60/0x80
 [<c06e6bb6>] really_probe+0x56/0x2e0
 [<c089a5f2>] ? _raw_spin_unlock_irq+0x22/0x30
 [<c06f0b02>] ? pm_runtime_barrier+0x52/0xb0
 [<c06e6e77>] driver_probe_device+0x37/0x90
 [<c0898281>] ? mutex_lock_nested+0x31/0x40
 [<c06e6f51>] __driver_attach+0x81/0x90
 [<c06e51e8>] bus_for_each_dev+0x48/0x70
 [<c06e68e9>] driver_attach+0x19/0x20
 [<c06e6ed0>] ? driver_probe_device+0x90/0x90
 [<c06e637f>] bus_add_driver+0x18f/0x280
 [<c062ff40>] ? pci_dev_put+0x20/0x20
 [<c062ff40>] ? pci_dev_put+0x20/0x20
 [<c06e7435>] driver_register+0x65/0x120
 [<c061a3a2>] ? __raw_spin_lock_init+0x32/0x60
 [<c06302f4>] __pci_register_driver+0x54/0xc0
 [<f98e809e>] qla4xxx_module_init+0x9e/0xcd [qla4xxx]
 [<c040302f>] do_one_initcall+0x2f/0x170
 [<f98e8000>] ? 0xf98e7fff
 [<c04ae025>] sys_init_module+0x75/0x1c0
 [<c04a1a04>] ? trace_hardirqs_on_caller+0xf4/0x180
 [<c0609514>] ? trace_hardirqs_on_thunk+0xc/0x10
 [<c08a141f>] sysenter_do_call+0x12/0x38

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Properly handle SCSI underrun while processing status IOCBs.
Lalit Chandivade [Mon, 18 Jun 2012 06:04:36 +0000 (11:34 +0530)]
qla4xxx: Properly handle SCSI underrun while processing status IOCBs.

The current code would incorrectly return a DID_OK for a
CHECK CONDITION with Recovered error sense key causing incorrect
completion of a command when there is a dropped frame.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Fix multiple conn login event issue during session recovery.
Manish Rangankar [Fri, 20 Jul 2012 08:39:19 +0000 (14:09 +0530)]
qla4xxx: Fix multiple conn login event issue during session recovery.

During iscsid session recovery driver sends multiple ISCSI_CONN_STATE_LOGGED_IN
event from qla4xxx_conn_start() and qla4xxx_ddb_change(), which causes iscsid
to crash.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Fix gcc warning for x86 system
Vikas Chaudhary [Wed, 13 Jun 2012 21:52:38 +0000 (17:52 -0400)]
qla4xxx: Fix gcc warning for x86 system

Fix warning:-
drivers/scsi/qla4xxx/ql4_nx.c:1867:2: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint32_t’ [-Wformat]

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Fix memory corruption issue in qla4xxx_ep_connect.
Manish Rangankar [Tue, 19 Jun 2012 04:22:07 +0000 (09:52 +0530)]
qla4xxx: Fix memory corruption issue in qla4xxx_ep_connect.

In qla4xxx_ep_connect(), qla_ep->dst_addr and dst_addr are type
struct sockaddr. We are copying sizeof(struct sockaddr_in6) bytes
from dst_addr to qla_ep->dst_addr which is 12 bytes larger. This
will cause memory corruption. So we change qla_ep->dst_addr to
struct sockaddr_storage which is of 128 byte, large enough to
hold sizeof(struct sockaddr_in6).

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: remove unnecessary read of PCI_CAP_ID_EXP
Jon Mason [Tue, 10 Jul 2012 21:57:55 +0000 (14:57 -0700)]
qla4xxx: 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.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Fix Spell check.
Vikas Chaudhary [Thu, 14 Jun 2012 14:13:53 +0000 (10:13 -0400)]
qla4xxx: Fix Spell check.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Fix a Sparse warning message
Vikas Chaudhary [Thu, 14 Jun 2012 10:35:49 +0000 (06:35 -0400)]
qla4xxx: Fix a Sparse warning message

Fix following message:-
drivers/scsi/qla4xxx/ql4_os.c:3266:5: error: symbol 'qla4xxx_post_aen_work' redeclared with different type (originally declared at drivers/scsi/qla4xxx/ql4_glbl.h:186) - incompatible argument 2 (different signedness)

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: multi-session fix for flash ddbs
Vikas Chaudhary [Thu, 14 Jun 2012 10:35:48 +0000 (06:35 -0400)]
qla4xxx: multi-session fix for flash ddbs

Allow multi-session to target (for flash ddbs) accesible via
multiple network portal

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Add missing spaces to error messages
Petr Uzel [Tue, 12 Jun 2012 07:36:12 +0000 (13:06 +0530)]
qla4xxx: Add missing spaces to error messages

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
12 years agoqla4xxx: Capture minidump for ISP82XX on firmware failure
Tej Parkash [Mon, 7 May 2012 02:26:08 +0000 (22:26 -0400)]
qla4xxx: Capture minidump for ISP82XX on firmware failure

Added support to capture dump (Minidump) which allows us to
catpure a snapshot of the firmware/hardware states at the time
of firmware failure

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Add change_queue_depth API support
Tej Parkash [Mon, 7 May 2012 02:20:18 +0000 (22:20 -0400)]
qla4xxx: Add change_queue_depth API support

change_queue_depth will adjust device queuedepth upon receiving
"SAM_STAT_TASK_SET_FULL" scsi status from the target.
Also added ql4xqfulltracking command line param to enable or disable
queuefull tracking. One can disabling queuefull tracking to ensure
user set scsi device queuedepth is not altered.

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Fix clear ddb mbx command failure issue.
Manish Rangankar [Thu, 23 Feb 2012 09:12:22 +0000 (14:42 +0530)]
qla4xxx: Fix clear ddb mbx command failure issue.

Allow ddb state to change to DDB_DS_NO_CONNECTION_ACTIVE or
DDB_DS_SESSION_FAILED before issuing clear ddb mailbox cmd,
because clear ddb mailbox cmd fails if the ddb state is not
equal to DDB_DS_NO_CONNECTION_ACTIVE or DDB_DS_SESSION_FAILED.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Fix kernel panic during discovery logout.
Manish Rangankar [Mon, 27 Feb 2012 07:57:30 +0000 (13:27 +0530)]
qla4xxx: Fix kernel panic during discovery logout.

Update the session and connection parameter before sending
connection logged in event to iscsiadm because in some
scenario logout may come in just after we send the logged
in event to user, which free up session, connection and ddb,
but DPC is still updating session and connect parameter
which can lead to panic.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Correct early completion of pending mbox.
Lalit Chandivade [Mon, 20 Feb 2012 09:28:23 +0000 (14:58 +0530)]
qla4xxx: Correct early completion of pending mbox.

Check for Firmware Hang (AF_FW_RECOVERY) after mailbox command
has gained access to ensure that the mailbox command does not
wait un-necessarily during a firmware recovery and prevent
premature mailbox timeout which will lead to back to back reset's.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoatp870u, mpt2sas, qla4xxx use pci_dev->revision
Sergei Shtylyov [Wed, 14 Mar 2012 19:04:30 +0000 (22:04 +0300)]
atp870u, mpt2sas, qla4xxx use pci_dev->revision

commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all
drivers to use pci_device->revision) converted all drivers to use
pci_dev->revision.  Convert these three drivers which got missed.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoqla4xxx: Removed packed attr from struct iscsi_chap_rec
Vikas Chaudhary [Tue, 6 Mar 2012 03:28:32 +0000 (22:28 -0500)]
qla4xxx: Removed packed attr from struct iscsi_chap_rec

We don't need to pack 'struct iscsi_chap_rec' as buffer is built
locally in the driver and pass to the user-space.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoiscsi_transport: Added error status code for ping comp event
Vikas Chaudhary [Mon, 5 Mar 2012 23:59:54 +0000 (18:59 -0500)]
iscsi_transport: Added error status code for ping comp event

Defined error codes for ping completion status.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: assign correct address for iscsi_cls_host
Vikas Chaudhary [Tue, 28 Feb 2012 01:42:57 +0000 (20:42 -0500)]
qla4xxx: assign correct address for iscsi_cls_host

JIRA Key: IRHEL6XISCSI-8

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: trivial cleanup
Vikas Chaudhary [Fri, 9 Nov 2012 07:49:34 +0000 (13:19 +0530)]
qla4xxx: trivial cleanup

 1. Do not initialise globals to 0
 2. Fix wrong spelling in debug message
 3. Modified debug log messages

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Fix sparse warning
Vikas Chaudhary [Mon, 20 Feb 2012 08:17:36 +0000 (13:47 +0530)]
qla4xxx: Fix sparse warning

Fix following warning:-
drivers/scsi/qla4xxx/ql4_os.c:35:5: warning: symbol 'ql4xdisablesysfsboot' was not declared. Should it be static?

drivers/scsi/qla4xxx/ql4_iocb.c:461:5: warning: symbol 'qla4xxx_send_mbox_iocb' was not declared. Should it be static?

drivers/scsi/qla4xxx/ql4_os.c:3025:6: warning: symbol 'qla4xxx_do_work' was not declared. Should it be static?

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Add support for multiple session per host.
Manish Rangankar [Tue, 31 Jan 2012 12:41:56 +0000 (18:11 +0530)]
qla4xxx: Add support for multiple session per host.

This patch will allow iscsiadm to create multiple session
for the same target on per host.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Export CHAP index as sysfs attribute
Mike Christie [Tue, 21 Feb 2012 10:10:33 +0000 (15:40 +0530)]
qla4xxx: Export CHAP index as sysfs attribute

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoscsi_transport: Export CHAP index as sysfs attribute
Mike Christie [Tue, 21 Feb 2012 10:08:14 +0000 (15:38 +0530)]
scsi_transport: Export CHAP index as sysfs attribute

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Add support to display CHAP list and delete CHAP entry
Nilesh Javali [Wed, 22 Feb 2012 11:35:10 +0000 (17:05 +0530)]
qla4xxx: Add support to display CHAP list and delete CHAP entry

For offload iSCSI like qla4xxx CHAP entries are stored in FLASH.
This patch adds support to list CHAP entries stored in FLASH and
delete specified CHAP entry from FLASH using iscsi tools.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoiscsi_transport: Add support to display CHAP list and delete CHAP entry
Nilesh Javali [Mon, 27 Feb 2012 04:10:10 +0000 (23:10 -0500)]
iscsi_transport: Add support to display CHAP list and delete CHAP entry

For offload iSCSI like qla4xxx CHAP entries are stored in FLASH.
This patch adds support to list CHAP entries stored in FLASH and
delete specified CHAP entry from FLASH using iscsi tools.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Added support to show port_state and port_speed in sysfs
Vikas Chaudhary [Tue, 20 Dec 2011 09:36:39 +0000 (15:06 +0530)]
qla4xxx: Added support to show port_state and port_speed in sysfs

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoscsi_transport_iscsi: Added support to show port_state and port_speed in sysfs
Vikas Chaudhary [Tue, 20 Dec 2011 09:36:39 +0000 (15:06 +0530)]
scsi_transport_iscsi: Added support to show port_state and port_speed in sysfs

sysfs patch to view port_state:
    /sys/class/iscsi_host/host*/port_state

sysfs patch to view port_speed:
    /sys/class/iscsi_host/host*/port_speed

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Added support to show targetalias in sysfs
Vikas Chaudhary [Wed, 23 Nov 2011 03:23:46 +0000 (22:23 -0500)]
qla4xxx: Added support to show targetalias in sysfs

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agolibiscsi: Added support to show targetalias in sysfs
Vikas Chaudhary [Wed, 23 Nov 2011 03:23:46 +0000 (22:23 -0500)]
libiscsi: Added support to show targetalias in sysfs

sysfs patch to view target alias:
  /sys/class/iscsi_session/session*/targetalias

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
12 years agoqla4xxx: Export boot targets to sysfs by default
Nilesh Javali [Tue, 14 Feb 2012 09:08:06 +0000 (14:38 +0530)]
qla4xxx: Export boot targets to sysfs by default

For this keep the module parameter ql4xdisablesysfsboot = 0
by deault.

Novell BZ # 742570: SLES11 SP2 RC3 - storage attached through qla4xxx
    not available during and post-install (HS21)

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
12 years agoUpdated driver version to 5.02.00.01.06.02-uek2
Tej Parkash [Thu, 16 Feb 2012 07:42:12 +0000 (13:12 +0530)]
Updated driver version to 5.02.00.01.06.02-uek2

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Added ping support
Vikas Chaudhary [Mon, 13 Feb 2012 13:59:52 +0000 (19:29 +0530)]
qla4xxx: Added ping support

Added ping support for network connection diagnostics.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoiscsi_transport: Added Ping support
Vikas Chaudhary [Mon, 13 Feb 2012 13:49:42 +0000 (19:19 +0530)]
iscsi_transport: Added Ping support

Added ping support for iscsi adapter, application can use this
interface for diagnostic network connection.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: added support for host event
Vikas Chaudhary [Thu, 16 Feb 2012 06:56:09 +0000 (12:26 +0530)]
qla4xxx: added support for host event

Added support to post kernel host event to application using
netlink interface.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoscsi_transport_iscsi: added support for host event
Vikas Chaudhary [Mon, 29 Aug 2011 17:27:42 +0000 (22:57 +0530)]
scsi_transport_iscsi: added support for host event

Added support to post kernel host event to application using
netlink interface.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Remove un-necessary print statment
Lalit Chandivade [Wed, 8 Feb 2012 07:06:08 +0000 (12:36 +0530)]
qla4xxx: Remove un-necessary print statment

On ROM lock acquiring timeout failure, driver spews lot of warning
messages in a for loop, remove the unwanted warning message to reduce
kernel messages clutter.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Modified debug log messages for boot info.
Manish Rangankar [Tue, 7 Feb 2012 08:12:16 +0000 (13:42 +0530)]
qla4xxx: Modified debug log messages for boot info.

In some configurations user may not have boot targets configured.
In such cases the debug messages printed out by driver look like
some kind of failure happening. However this could be a valid
case, so modified the messages to appear as warning messages
versus failure messages.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Fix un-necessary delay on invalid DDB
Lalit Chandivade [Tue, 31 Jan 2012 13:08:10 +0000 (18:38 +0530)]
qla4xxx: Fix un-necessary delay on invalid DDB

Fix the un-necessary wait for completion of a sendtarget on an
invalid DDB entry. The state of an invalid DDB entry is 0 (unassigned)

This will also avoid the delays during system boot.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Remove unused code
Shyam Sundar [Thu, 19 Jan 2012 23:31:48 +0000 (18:31 -0500)]
qla4xxx: Remove unused code

This code initially added for FW debugging, we don't need this
code now so taking it out.

Jira Key: IUEKR2ISCSI-31

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Proper detection of firmware abort error code for ISP82xx
Tej Parkash [Thu, 9 Feb 2012 09:47:30 +0000 (15:17 +0530)]
qla4xxx: Proper detection of firmware abort error code for ISP82xx

Jira Key: IUEKR2ISCSI-15

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
12 years agoqla4xxx: Fix verify boot idx correctly
Lalit Chandivade [Wed, 1 Feb 2012 19:12:48 +0000 (00:42 +0530)]
qla4xxx: Fix verify boot idx correctly

qla4xxx_verify_boot_idx can falsely report a DDB to be boot target
if ha->pri_ddb_idx and ha->sec_ddb_idx are not initialized correctly.
What this could cause is if there is DDB entry in FLash at index 0, then
qla4xxx_verify_boot_idx would return wrong result as ha->pri_ddb_idx is not
set correctly. Fixed the qla4xxx_get_boot_info to set the ha->pri_ddb_idx and
ha->sec_ddb_idx correctly.

Jira Key: IUEKR2ISCSI-22

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
12 years agoSPEC: v2.6.39-400.2.0
Guru Anbalagane [Sat, 10 Nov 2012 02:03:27 +0000 (18:03 -0800)]
SPEC: v2.6.39-400.2.0

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
12 years agoupdate kabi
Guru Anbalagane [Fri, 9 Nov 2012 22:42:27 +0000 (14:42 -0800)]
update kabi
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
12 years agospec update
Maxim Uvarov [Fri, 9 Nov 2012 12:43:56 +0000 (04:43 -0800)]
spec update

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoproc: Consider NO_HZ when printing idle and iowait times
Michal Hocko [Wed, 24 Aug 2011 07:40:25 +0000 (09:40 +0200)]
proc: Consider NO_HZ when printing idle and iowait times

Orabug: 14779047
show_stat handler of the /proc/stat file relies on kstat_cpu(cpu)
statistics when priting information about idle and iowait times.
This is OK if we are not using tickless kernel (CONFIG_NO_HZ) because
counters are updated periodically.
With NO_HZ things got more tricky because we are not doing idle/iowait
accounting while we are tickless so the value might get outdated.
Users of /proc/stat will notice that by unchanged idle/iowait values
which is then interpreted as 0% idle/iowait time. From the user space
POV this is an unexpected behavior and a change of the interface.

Let's fix this by using get_cpu_{idle,iowait}_time_us which accounts the
total idle/iowait time since boot and it doesn't rely on sampling or any
other periodic activity. Fall back to the previous behavior if NO_HZ is
disabled or not configured.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Dave Jones <davej@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Link: http://lkml.kernel.org/r/39181366adac1b39cb6aa3cd53ff0f7c78d32676.1314172057.git.mhocko@suse.cz
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
12 years agoxen/netfront: teardown the device before unregistering it.
Ian Campbell [Mon, 25 Jun 2012 22:48:41 +0000 (22:48 +0000)]
xen/netfront: teardown the device before unregistering it.

Orabug: 14579353
Fixes:
[   15.470311] WARNING: at /local/scratch/ianc/devel/kernels/linux/fs/sysfs/file.c:498 sysfs_attr_ns+0x95/0xa0()
[   15.470326] sysfs: kobject eth0 without dirent
[   15.470333] Modules linked in:
[   15.470342] Pid: 12, comm: xenwatch Not tainted 3.4.0-x86_32p-xenU #93
and
[    9.150554] BUG: unable to handle kernel paging request at 2b359000
[    9.150577] IP: [<c1279561>] linkwatch_do_dev+0x81/0xc0
[    9.150592] *pdpt = 000000002c3c9027 *pde = 0000000000000000
[    9.150604] Oops: 0002 [#1] SMP
[    9.150613] Modules linked in:

This is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675190

Reported-by: George Shuklin <george.shuklin@gmail.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: William Dauchy <wdauchy@gmail.com>
Cc: stable@kernel.org
Cc: 675190@bugs.debian.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jason Luan <jianhai.luan@oracle.com>
12 years agox86: Fetch stack from regs when possible in dump_trace()
Frederic Weisbecker [Thu, 30 Jun 2011 17:04:56 +0000 (19:04 +0200)]
x86: Fetch stack from regs when possible in dump_trace()

Orabug: 14701687
When regs are passed to dump_stack(), we fetch the frame
pointer from the regs but the stack pointer is taken from
the current frame.

Thus the frame and stack pointers may not come from the same
context. For example this can result in the unwinder to
think the context is in irq, due to the current value of
the stack, but the frame pointer coming from the regs points
to a frame from another place. It then tries to fix up
the irq link but ends up dereferencing a random frame
pointer that doesn't belong to the irq stack:

[ 9131.706906] ------------[ cut here ]------------
[ 9131.707003] WARNING: at arch/x86/kernel/dumpstack_64.c:129 dump_trace+0x2aa/0x330()
[ 9131.707003] Hardware name: AMD690VM-FMH
[ 9131.707003] Perf: bad frame pointer = 0000000000000005 in callchain
[ 9131.707003] Modules linked in:
[ 9131.707003] Pid: 1050, comm: perf Not tainted 3.0.0-rc3+ #181
[ 9131.707003] Call Trace:
[ 9131.707003]  <IRQ>  [<ffffffff8104bd4a>] warn_slowpath_common+0x7a/0xb0
[ 9131.707003]  [<ffffffff8104be21>] warn_slowpath_fmt+0x41/0x50
[ 9131.707003]  [<ffffffff8178b873>] ? bad_to_user+0x6d/0x10be
[ 9131.707003]  [<ffffffff8100c2da>] dump_trace+0x2aa/0x330
[ 9131.707003]  [<ffffffff810107d3>] ? native_sched_clock+0x13/0x50
[ 9131.707003]  [<ffffffff8101b164>] perf_callchain_kernel+0x54/0x70
[ 9131.707003]  [<ffffffff810d391f>] perf_prepare_sample+0x19f/0x2a0
[ 9131.707003]  [<ffffffff810d546c>] __perf_event_overflow+0x16c/0x290
[ 9131.707003]  [<ffffffff810d5430>] ? __perf_event_overflow+0x130/0x290
[ 9131.707003]  [<ffffffff810107d3>] ? native_sched_clock+0x13/0x50
[ 9131.707003]  [<ffffffff8100fbb9>] ? sched_clock+0x9/0x10
[ 9131.707003]  [<ffffffff810752e5>] ? T.375+0x15/0x90
[ 9131.707003]  [<ffffffff81084da4>] ? trace_hardirqs_on_caller+0x64/0x180
[ 9131.707003]  [<ffffffff810817bd>] ? trace_hardirqs_off+0xd/0x10
[ 9131.707003]  [<ffffffff810d5764>] perf_event_overflow+0x14/0x20
[ 9131.707003]  [<ffffffff810d588c>] perf_swevent_hrtimer+0x11c/0x130
[ 9131.707003]  [<ffffffff817821a1>] ? error_exit+0x51/0xb0
[ 9131.707003]  [<ffffffff81072e93>] __run_hrtimer+0x83/0x1e0
[ 9131.707003]  [<ffffffff810d5770>] ? perf_event_overflow+0x20/0x20
[ 9131.707003]  [<ffffffff81073256>] hrtimer_interrupt+0x106/0x250
[ 9131.707003]  [<ffffffff812a3bfd>] ? trace_hardirqs_off_thunk+0x3a/0x3c
[ 9131.707003]  [<ffffffff81024833>] smp_apic_timer_interrupt+0x53/0x90
[ 9131.707003]  [<ffffffff81789053>] apic_timer_interrupt+0x13/0x20
[ 9131.707003]  <EOI>  [<ffffffff817821a1>] ? error_exit+0x51/0xb0
[ 9131.707003]  [<ffffffff8178219c>] ? error_exit+0x4c/0xb0
[ 9131.707003] ---[ end trace b2560d4876709347 ]---

Fix this by simply taking the stack pointer from regs->sp
when regs are provided.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoCVE-2012-3400: udf: Avoid run away loop when partition table length is corrupted
Chuck Anderson [Wed, 7 Nov 2012 16:06:51 +0000 (08:06 -0800)]
CVE-2012-3400: udf: Avoid run away loop when partition table length is corrupted

Mainline commit adee11b2085bee90bd8f4f52123ffb07882d6256

Check provided length of partition table so that (possibly maliciously)
corrupted partition table cannot cause accessing data beyond current buffer.

Signed-off-by: Jan Kara <jack@suse.cz>
Orabug: 15845302
CVE: CVE-2012-3400
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
12 years agoCVE-2012-3400: udf: Fortify loading of sparing table
Chuck Anderson [Wed, 7 Nov 2012 15:59:32 +0000 (07:59 -0800)]
CVE-2012-3400: udf: Fortify loading of sparing table

Author: Jan Kara <jack@suse.cz>
Date:   Wed Jun 27 21:23:07 2012 +0200

    udf: Fortify loading of sparing table

    Mainline commit 1df2ae31c724e57be9d7ac00d78db8a5dabdd050

    Add sanity checks when loading sparing table from disk to avoid accessing
    unallocated memory or writing to it.

Signed-off-by: Jan Kara <jack@suse.cz>
Orabug: 15845302
CVE: CVE-2012-3400
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
12 years agoCVE-2012-2133: hugepages: fix use after free bug in "quota" handling
Chuck Anderson [Wed, 7 Nov 2012 10:18:06 +0000 (02:18 -0800)]
CVE-2012-2133: hugepages: fix use after free bug in "quota" handling

Mainline commit 90481622d75715bfcb68501280a917dbfe516029

hugetlbfs_{get,put}_quota() are badly named.  They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintaining limits on in-memory
page usage (including anonymous MAP_PRIVATE copied-on-write pages)
associated with a particular hugetlbfs filesystem instance.

Worse, they work by having callbacks to the hugetlbfs filesystem code from
the low-level page handling code, in particular from free_huge_page().
This is a layering violation of itself, but more importantly, if the
kernel does a get_user_pages() on hugepages (which can happen from KVM
amongst others), then the free_huge_page() can be delayed until after the
associated inode has already been freed.  If an unmount occurs at the
wrong time, even the hugetlbfs superblock where the "quota" limits are
stored may have been freed.

Andrew Barry proposed a patch to fix this by having hugepages, instead of
storing a pointer to their address_space and reaching the superblock from
there, had the hugepages store pointers directly to the superblock,
bumping the reference count as appropriate to avoid it being freed.
Andrew Morton rejected that version, however, on the grounds that it made
the existing layering violation worse.

This is a reworked version of Andrew's patch, which removes the extra, and
some of the existing, layering violation.  It works by introducing the
concept of a hugepage "subpool" at the lower hugepage mm layer - that is a
finite logical pool of hugepages to allocate from.  hugetlbfs now creates
a subpool for each filesystem instance with a page limit set, and a
pointer to the subpool gets added to each allocated hugepage, instead of
the address_space pointer used now.  The subpool has its own lifetime and
is only freed once all pages in it _and_ all other references to it (i.e.
superblocks) are gone.

subpools are optional - a NULL subpool pointer is taken by the code to
mean that no subpool limits are in effect.

Previous discussion of this bug found in:  "Fix refcounting in hugetlbfs
quota handling.". See:  https://lkml.org/lkml/2011/8/11/28 or
http://marc.info/?l=linux-mm&m=126928970510627&w=1

v2: Fixed a bug spotted by Hillf Danton, and removed the extra parameter to
alloc_huge_page() - since it already takes the vma, it is not necessary.

Signed-off-by: Andrew Barry <abarry@cray.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Orabug: 15845276
CVE: CVE-2012-2133
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
12 years agoMerge tag 'v2.6.39-400#bcom' of git://ca-git.us.oracle.com/linux-snits-public into...
Maxim Uvarov [Fri, 9 Nov 2012 12:19:39 +0000 (04:19 -0800)]
Merge tag 'v2.6.39-400#bcom' of git://ca-git.us.oracle.com/linux-snits-public into m-master

OLdev v.2.6.39-400#bcom

12 years agoMerge branch '2.6.39-300#bug15851255' of git://ca-git.us.oracle.com/linux-guasun...
Maxim Uvarov [Fri, 9 Nov 2012 12:17:38 +0000 (04:17 -0800)]
Merge branch '2.6.39-300#bug15851255' of git://ca-git.us.oracle.com/linux-guasun-public into m-master

12 years agobnx2,bnx2x,tg3: resolve build error
Jerry Snitselaar [Thu, 8 Nov 2012 19:42:33 +0000 (12:42 -0700)]
bnx2,bnx2x,tg3: resolve build error

Remove skb_frag_size defines

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agoRevert "drm/i915: Sanitize BIOS debugging bits from PIPECONF"
Guangyu Sun [Thu, 8 Nov 2012 19:35:20 +0000 (11:35 -0800)]
Revert "drm/i915: Sanitize BIOS debugging bits from PIPECONF"

Orabug: 15851255

This reverts commit 628280f36e4fdbde6c2efac3f3c574d5a41dee88.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agoRevert "drm/i915: don't clobber the pipe param in sanitize_modesetting"
Guangyu Sun [Thu, 8 Nov 2012 19:35:04 +0000 (11:35 -0800)]
Revert "drm/i915: don't clobber the pipe param in sanitize_modesetting"

Orabug: 15851255

This reverts commit 808cf72ca9988a146dff8a8f658dcbad3cd31d5d.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agodrm/i915: protect force_wake_(get|put) with the gt_lock
Daniel Vetter [Wed, 14 Dec 2011 12:57:03 +0000 (13:57 +0100)]
drm/i915: protect force_wake_(get|put) with the gt_lock

Orabug: 15851255

The problem this patch solves is that the forcewake accounting
necessary for register reads is protected by dev->struct_mutex. But the
hangcheck and error_capture code need to access registers without
grabbing this mutex because we hold it while waiting for the gpu.
So a new lock is required. Because currently the error_state capture
is called from the error irq handler and the hangcheck code runs from
a timer, it needs to be an irqsafe spinlock (note that the registers
used by the irq handler (neglecting the error handling part) only uses
registers that don't need the forcewake dance).

We could tune this down to a normal spinlock when we rework the
error_state capture and hangcheck code to run from a workqueue.  But
we don't have any read in a fastpath that needs forcewake, so I've
decided to not care much about overhead.

This prevents tests/gem_hangcheck_forcewake from i-g-t from killing my
snb on recent kernels - something must have slightly changed the
timings. On previous kernels it only trigger a WARN about the broken
locking.

v2: Drop the previous patch for the register writes.

v3: Improve the commit message per Chris Wilson's suggestions.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agodrm/i915: convert force_wake_get to func pointer in the gpu reset code
Daniel Vetter [Sat, 14 Jan 2012 00:20:06 +0000 (16:20 -0800)]
drm/i915: convert force_wake_get to func pointer in the gpu reset code

Orabug: 15851255

This was forgotten in the original multi-threaded forcewake
conversion:

commit 8d715f0024f64ad1b1be85d8c081cf577944c847
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Nov 18 20:39:01 2011 -0800

    drm/i915: add multi-threaded forcewake support

Signed-Off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agodrm/i915: Cache GT fifo count for SandyBridge
Chris Wilson [Thu, 12 May 2011 21:17:09 +0000 (22:17 +0100)]
drm/i915: Cache GT fifo count for SandyBridge

Orabug: 15851255

The read back of the available FIFO entries is vital for system
stability, but extremely costly. However, we only need a guide so as to
avoid eating into the reserved entries and since we are the only
consumer we can cache the read of the count from the last write.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agodrm/i915: add multi-threaded forcewake support
Keith Packard [Sat, 19 Nov 2011 04:39:01 +0000 (20:39 -0800)]
drm/i915: add multi-threaded forcewake support

Orabug: 15851255

On IVB C0+ with newer BIOSes, the forcewake handshake has changed.  There's
now a bitfield for different driver components to keep the GT powered
on.  On Linux, we centralize forcewake handling in one place, so we
still just need a single bit, but we need to use the new registers if MT
forcewake is enabled.

This needs testing on affected machines.  Please reply with your
tested-by if you had problems after a BIOS upgrade and this patch fixes
them.

v2: force MT mode. shift by 16
v3: set MT force wake bits then check ECOBUS

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42923
Tested-by: Manoj Iyer <manoj.iyer@canonical.com>
Tested-by: Robert Hooker <robert.hooker@canonical.com>
Tested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Conflicts:

drivers/gpu/drm/i915/i915_drv.h

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agoi915: Move i915_read/write out of line
Andi Kleen [Thu, 13 Oct 2011 23:08:51 +0000 (16:08 -0700)]
i915: Move i915_read/write out of line

Orabug: 15851255

With the tracing code in there they are far too big to inline.

.text savings compared to a non force inline kernel:

i915_restore_display                        4393   12036   +7643
i915_save_display                           4295   11459   +7164
i915_handle_error                           2979    6666   +3687
i915_driver_irq_handler                     2923    5086   +2163
i915_ringbuffer_info                         458    1661   +1203
i915_save_vga                                  -    1200   +1200
i915_driver_irq_uninstall                    453    1624   +1171
i915_driver_irq_postinstall                  913    2078   +1165
ironlake_enable_drps                         719    1872   +1153
i915_restore_vga                               -    1142   +1142
intel_display_capture_error_state            784    2030   +1246
intel_init_emon                              719    2016   +1297

and more ...

[AK: these are older numbers, with the new SNB forcewake checks
it will be even worse]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agodrm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge
Jesse Barnes [Fri, 12 Aug 2011 22:28:32 +0000 (15:28 -0700)]
drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge

Orabug: 15851255

Prior to Ivybridge, the GFX_MODE would default to 0x800, meaning that
MI_FLUSH would flush the TLBs in addition to the rest of the caches
indicated in the MI_FLUSH command.  However starting with Ivybridge, the
register defaults to 0x2800 out of reset, meaning that to invalidate the
TLB we need to use PIPE_CONTROL.  Since we're not doing that yet, go
back to the old default so things work.

v2: don't forget to actually *clear* the new bit

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agobnx2x: update to broadcom 1.74.17 driver
Jerry Snitselaar [Thu, 8 Nov 2012 18:01:13 +0000 (11:01 -0700)]
bnx2x: update to broadcom 1.74.17 driver

Move from upstream to broadcom driver.

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agobnx2i: update to broadcom 2.7.4.1f driver
Jerry Snitselaar [Thu, 8 Nov 2012 17:58:23 +0000 (10:58 -0700)]
bnx2i: update to broadcom 2.7.4.1f driver

Move from upstream to broadcom driver.

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agobnx2fc: update to broadcom 2.2.17 driver
Jerry Snitselaar [Thu, 8 Nov 2012 17:56:26 +0000 (10:56 -0700)]
bnx2fc: update to broadcom 2.2.17 driver

Move from upstream to broadcom driver.

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agocnic: update to broadcom 2.5.12e driver
Jerry Snitselaar [Thu, 8 Nov 2012 17:54:31 +0000 (10:54 -0700)]
cnic: update to broadcom 2.5.12e driver

Move from upstream to broadcom driver.

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agobnx2: update to broadcom 2.74.09 driver
Jerry Snitselaar [Thu, 8 Nov 2012 17:52:44 +0000 (10:52 -0700)]
bnx2: update to broadcom 2.74.09 driver

Move from upstream to broadcom driver.

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agotg3: update to broadcom 3.125g driver
Jerry Snitselaar [Thu, 8 Nov 2012 17:49:29 +0000 (10:49 -0700)]
tg3: update to broadcom 3.125g driver

Move from upstream to broadcom driver.

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agoMerge branch '2.6.39-next' of git://ca-git.us.oracle.com/linux-guasun-public into...
Maxim Uvarov [Wed, 7 Nov 2012 13:57:08 +0000 (05:57 -0800)]
Merge branch '2.6.39-next' of git://ca-git.us.oracle.com/linux-guasun-public into m2-master

12 years agoLinux 3.0.51
Greg Kroah-Hartman [Mon, 5 Nov 2012 08:44:42 +0000 (09:44 +0100)]
Linux 3.0.51

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agoxen/mmu: Use Xen specific TLB flush instead of the generic one.
Konrad Rzeszutek Wilk [Wed, 31 Oct 2012 16:38:31 +0000 (12:38 -0400)]
xen/mmu: Use Xen specific TLB flush instead of the generic one.

As Mukesh explained it, the MMUEXT_TLB_FLUSH_ALL allows the
hypervisor to do a TLB flush on all active vCPUs. If instead
we were using the generic one (which ends up being xen_flush_tlb)
we end up making the MMUEXT_TLB_FLUSH_LOCAL hypercall. But
before we make that hypercall the kernel will IPI all of the
vCPUs (even those that were asleep from the hypervisor
perspective). The end result is that we needlessly wake them
up and do a TLB flush when we can just let the hypervisor
do it correctly.

This patch gives around 50% speed improvement when migrating
idle guest's from one host to another.

Oracle-bug: 14630170

CC: stable@vger.kernel.org
Tested-by: Jingjie Jiang <jingjie.jiang@oracle.com>
Suggested-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 95a7d76897c1e7243d4137037c66d15cbf2cce76)

12 years agoRevert "RDS: Bypass workqueue when queueing cong updates"
Maxim Uvarov [Tue, 6 Nov 2012 20:33:56 +0000 (12:33 -0800)]
Revert "RDS: Bypass workqueue when queueing cong updates"

Orabug: 14647229
This reverts commit 2fa57129df61bf3fb7d90c5486fe15df94091f61.
Author: Andy Grover <andy.grover@oracle.com>
Date:   Mon Mar 29 16:45:40 2010 -0700

    RDS: Bypass workqueue when queueing cong updates

    Now that rds_send_xmit() does not block, we can call it directly
    instead of going through the helper thread.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agobridge: Pull ip header into skb->data before looking into ip header.
Sarveshwar Bandi [Wed, 10 Oct 2012 01:15:01 +0000 (01:15 +0000)]
bridge: Pull ip header into skb->data before looking into ip header.

Bugdb: 13780
If lower layer driver leaves the ip header in the skb fragment, it needs to
be first pulled into skb->data before inspecting ip header length or ip version
number.

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoqlcnic: reverts to old api
Maxim Uvarov [Fri, 2 Nov 2012 20:10:27 +0000 (13:10 -0700)]
qlcnic: reverts to old api

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoqlcnic: bumped up version number to 5.0.29
Maxim Uvarov [Fri, 2 Nov 2012 18:58:09 +0000 (11:58 -0700)]
qlcnic: bumped up version number to 5.0.29

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agonetxen: bumped version to 4.0.80
Maxim Uvarov [Fri, 2 Nov 2012 19:02:06 +0000 (12:02 -0700)]
netxen: bumped version to 4.0.80

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoqlge: bumped version to v1.00.00.31
Maxim Uvarov [Fri, 2 Nov 2012 19:00:32 +0000 (12:00 -0700)]
qlge: bumped version to v1.00.00.31

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agonet: implement inline ether_addr_equal
Maxim Uvarov [Fri, 2 Nov 2012 19:56:20 +0000 (12:56 -0700)]
net: implement inline ether_addr_equal

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoadd skb_frag inline functions
Maxim Uvarov [Fri, 2 Nov 2012 19:32:39 +0000 (12:32 -0700)]
add skb_frag inline functions

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agor8169: use unlimited DMA burst for TX
Michal Schmidt [Fri, 2 Nov 2012 15:34:17 +0000 (08:34 -0700)]
r8169: use unlimited DMA burst for TX

(mainline commit aee77e4accbeb2c86b1d294cd84fec4a12dde3bd)

The r8169 driver currently limits the DMA burst for TX to 1024 bytes. I have
a box where this prevents the interface from using the gigabit line to its full
potential. This patch solves the problem by setting TX_DMA_BURST to unlimited.

The box has an ASRock B75M motherboard with on-board RTL8168evl/8111evl
(XID 0c900880). TSO is enabled.

I used netperf (TCP_STREAM test) to measure the dependency of TX throughput
on MTU. I did it for three different values of TX_DMA_BURST ('5'=512, '6'=1024,
'7'=unlimited). This chart shows the results:
http://michich.fedorapeople.org/r8169/r8169-effects-of-TX_DMA_BURST.png

Interesting points:
 - With the current DMA burst limit (1024):
   - at the default MTU=1500 I get only 842 Mbit/s.
   - when going from small MTU, the performance rises monotonically with
     increasing MTU only up to a peak at MTU=1076 (908 MBit/s). Then there's
     a sudden drop to 762 MBit/s from which the throughput rises monotonically
     again with further MTU increases.
 - With a smaller DMA burst limit (512):
   - there's a similar peak at MTU=1076 and another one at MTU=564.
 - With unlimited DMA burst:
   - at the default MTU=1500 I get nice 940 Mbit/s.
   - the throughput rises monotonically with increasing MTU with no strange
     peaks.

Notice that the peaks occur at MTU sizes that are multiples of the DMA burst
limit plus 52. Why 52? Because:
  20 (IP header) + 20 (TCP header) + 12 (TCP options) = 52

The Realtek-provided r8168 driver (v8.032.00) uses unlimited TX DMA burst too,
except for CFG_METHOD_1 where the TX DMA burst is set to 512 bytes.
CFG_METHOD_1 appears to be the oldest MAC version of "RTL8168B/8111B",
i.e. RTL_GIGA_MAC_VER_11 in r8169. Not sure if this MAC version really needs
the smaller burst limit, or if any other versions have similar requirements.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agor8169: add D-Link DGE-560T identifiers.
Francois Romieu [Fri, 2 Nov 2012 15:31:47 +0000 (08:31 -0700)]
r8169: add D-Link DGE-560T identifiers.

(mainline commit 2a35cfa )

This one includes a 8168. Not to be confused with the sky2 driven
one whose PCI vendor and device ID are the same.

Reported-by: Neyuki Inaya <in@joblog.ru>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoMerge branch 'stable/bug14630170' of git://ca-git.us.oracle.com/linux-konrad-public...
Maxim Uvarov [Tue, 6 Nov 2012 20:38:57 +0000 (12:38 -0800)]
Merge branch 'stable/bug14630170' of git://ca-git.us.oracle.com/linux-konrad-public into m-master

12 years agoRevert "RDS: Bypass workqueue when queueing cong updates"
Maxim Uvarov [Tue, 6 Nov 2012 20:33:56 +0000 (12:33 -0800)]
Revert "RDS: Bypass workqueue when queueing cong updates"

Orabug: 14647229
This reverts commit 2fa57129df61bf3fb7d90c5486fe15df94091f61.
Author: Andy Grover <andy.grover@oracle.com>
Date:   Mon Mar 29 16:45:40 2010 -0700

    RDS: Bypass workqueue when queueing cong updates

    Now that rds_send_xmit() does not block, we can call it directly
    instead of going through the helper thread.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoLinux 3.0.51
Greg Kroah-Hartman [Mon, 5 Nov 2012 08:44:42 +0000 (09:44 +0100)]
Linux 3.0.51

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agodrm/nouveau: silence modesetting spam on pre-gf8 chipsets
Ben Skeggs [Sun, 28 Oct 2012 23:03:07 +0000 (09:03 +1000)]
drm/nouveau: silence modesetting spam on pre-gf8 chipsets

commit cee59f15a60cc6269a25e3f6fbf1a577d6ab8115 upstream.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agox86: Remove the ancient and deprecated disable_hlt() and enable_hlt() facility
Len Brown [Thu, 29 Mar 2012 21:49:17 +0000 (14:49 -0700)]
x86: Remove the ancient and deprecated disable_hlt() and enable_hlt() facility

commit f6365201d8a21fb347260f89d6e9b3e718d63c70 upstream.

The X86_32-only disable_hlt/enable_hlt mechanism was used by the
32-bit floppy driver. Its effect was to replace the use of the
HLT instruction inside default_idle() with cpu_relax() - essentially
it turned off the use of HLT.

This workaround was commented in the code as:

 "disable hlt during certain critical i/o operations"

 "This halt magic was a workaround for ancient floppy DMA
  wreckage. It should be safe to remove."

H. Peter Anvin additionally adds:

 "To the best of my knowledge, no-hlt only existed because of
  flaky power distributions on 386/486 systems which were sold to
  run DOS.  Since DOS did no power management of any kind,
  including HLT, the power draw was fairly uniform; when exposed
  to the much hhigher noise levels you got when Linux used HLT
  caused some of these systems to fail.

  They were by far in the minority even back then."

Alan Cox further says:

 "Also for the Cyrix 5510 which tended to go castors up if a HLT
  occurred during a DMA cycle and on a few other boxes HLT during
  DMA tended to go astray.

  Do we care ? I doubt it. The 5510 was pretty obscure, the 5520
  fixed it, the 5530 is probably the oldest still in any kind of
  use."

So, let's finally drop this.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Stephen Hemminger <shemminger@vyatta.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-3rhk9bzf0x9rljkv488tloib@git.kernel.org
[ If anyone cares then alternative instruction patching could be
  used to replace HLT with a one-byte NOP instruction. Much simpler. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agofloppy: do put_disk on current dr if blk_init_queue fails
Herton Ronaldo Krzesinski [Mon, 27 Aug 2012 23:56:52 +0000 (20:56 -0300)]
floppy: do put_disk on current dr if blk_init_queue fails

commit 238ab78469c6ab7845b43d5061cd3c92331b2452 upstream.

If blk_init_queue fails, we do not call put_disk on the current dr
(dr is decremented first in the error handling loop).

Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agoxen/mmu: Use Xen specific TLB flush instead of the generic one.
Konrad Rzeszutek Wilk [Wed, 31 Oct 2012 16:38:31 +0000 (12:38 -0400)]
xen/mmu: Use Xen specific TLB flush instead of the generic one.

As Mukesh explained it, the MMUEXT_TLB_FLUSH_ALL allows the
hypervisor to do a TLB flush on all active vCPUs. If instead
we were using the generic one (which ends up being xen_flush_tlb)
we end up making the MMUEXT_TLB_FLUSH_LOCAL hypercall. But
before we make that hypercall the kernel will IPI all of the
vCPUs (even those that were asleep from the hypervisor
perspective). The end result is that we needlessly wake them
up and do a TLB flush when we can just let the hypervisor
do it correctly.

This patch gives around 50% speed improvement when migrating
idle guest's from one host to another.

Oracle-bug: 14630170

CC: stable@vger.kernel.org
Tested-by: Jingjie Jiang <jingjie.jiang@oracle.com>
Suggested-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 95a7d76897c1e7243d4137037c66d15cbf2cce76)