RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 591648 - [Emulex 6.0 bug] Update lpfc driver to 8.3.5.13
Summary: [Emulex 6.0 bug] Update lpfc driver to 8.3.5.13
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 6.0
Assignee: Rob Evers
QA Contact: Barry Donahue
URL:
Whiteboard:
Depends On:
Blocks: 554559
TreeView+ depends on / blocked
 
Reported: 2010-05-12 19:05 UTC by Vaios Papadimitriou
Modified: 2010-11-11 15:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 15:57:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to update Emulex LPFC driver to 8.3.5.13 (applies on top of 8.3.5.9) (51.90 KB, application/octet-stream)
2010-05-12 19:05 UTC, Vaios Papadimitriou
no flags Details
Patch to update Emulex LPFC driver to 8.3.5.13 (applies on top of 8.3.5.9) -rev2 (43.00 KB, application/octet-stream)
2010-05-17 19:44 UTC, Joseph Mann
no flags Details

Description Vaios Papadimitriou 2010-05-12 19:05:52 UTC
Created attachment 413523 [details]
Patch to update Emulex LPFC driver to 8.3.5.13 (applies on top of 8.3.5.9)

Patch to update Emulex lpfc driver to 8.3.5.13 (applies on top of 8.3.5.9, see
Bug 576174).

This patch addresses bug fixes.

This patch includes the following changes:
* Changed version number to 8.3.5.13
* Add PCI-ID for Gb PCIe Shared I/O Fibre Channel Adapter
* Only send ADISCs to Targets (CR 101933)
* Fix memory leak when iotag allocation fail (CR 102354)
* Add support for SLER errors
* Fix SLI4 RPI leaks (CR 102369)
* Change default FCF max receive size (CR 102087)
* Remove unused Interrupt Notification Block Code
* Fix lpfc_sli_issue_wait call to put iocb on txcmpq that should have been 
  removed
* Fixed Illegal State Transition (CR 10202)
* Additional check-in for high vport fix (CR 99636)
* Changed version number to 8.3.5.12
* Check whether index is within bounds before testing vport
* Change positive error return into negative
* Fixed Illegal State Transition after devloss tmo (CR 102025)
* Fixed Illegal State Transition (CR 10202)
* Fixed heartbeat timeout failure (CR 10142)
* Changed version number to 8.3.5.11
* Fix bug with dma maps on nested scsi objects (CR 101174, 101425)
* Changed version number to 8.3.5.10
* Add module ref counting to prevent module removal with active bsg requests 
  (CR 101863)
* Fix swapping target's FC ports caused I/O failure due to target rejecting 
  PLOGI (CR 100464)
* Reduce hba_queue_depth of SLI4 HBAs to account for XRIs reserved for ELS 
  commands
* Fixed hang on hba resets (CR 100032)

The corresponding upstream LPFC driver patchset was submitted upstream on
5/12/10:
...
From: linux-scsi-owner.org [linux-scsi-owner.org] On Behalf Of Smart, James
Sent: Wednesday, May 12, 2010 9:30 AM
To: linux-scsi.org
Subject: [PATCH 0/7] lpfc 8.3.13: Update lpfc to revision 8.3.13

This patch set updates the lpfc driver to revision 8.3.13

The patches for 8.3.13 contain:
- FC Discovery Fixes and enhancements.
- Initialization code clean up and fixes.
- SCSI specific changes
- Misc fixes.
- BSG management fixes.
- Add TX Queue Support for SLI4 ELS commands.
- Update Driver Version to 8.3.13

The bugfixes were cut against scsi-misc-2.6.

-- james s

  Signed-off-by: Alex Iannicelli <alex.iannicelli>
  Signed-off-by: James Smart <james.smart>
...

Comment 2 RHEL Program Management 2010-05-12 20:46:43 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Joseph Mann 2010-05-17 19:44:02 UTC
Created attachment 414647 [details]
Patch to update Emulex LPFC driver to 8.3.5.13 (applies on top of 8.3.5.9) -rev2

This is a replacement for the last 8.3.5.13 patch. The upstream community rejected one of the patches that was part of the 8.3.13 upstream submission. Therefore we rebuilt the 8.3.5.9 -> 8.3.5.13 patch to reflect the change that took place in the upstream driver. The new ChangeLog is below:

* Changed version number to 8.3.5.13
* Remove module ref counting for active bsg requests
* Add PCI-ID for Gb PCIe Shared I/O Fibre Channel Adapter
* Only send ADISCs to Targets (CR 101933)
* Fix memory leak (CR 102354)
* Add support for SLER errors
* Fix SLI4 RPI leaks (CR 102369)
* Change default FCF max receive size (CR 102087)
* Remove unused Interrupt Notification Block Code
* Fix lpfc_sli_issue_wait call to put iocb on txcmpq that should
have been removed
* Fixed Illegal State Transition (CR 10202)
* Additional check-in for high vport fix (CR 99636)
Changes from 20100429 to 20100504
* Changed version number to 8.3.5.12
* Check whether index is within bounds before testing vport
* Change positive error return into negative
* Fixed Illegal State Transition after devloss tmo (CR 102025)
* Fixed Illegal State Transition (CR 10202)
* Fixed heartbeat timeout failure (CR 10142)
Changes from 20100427 to 20100429
* Changed version number to 8.3.5.11
* Fix bug with dma maps on nested scsi objects (CR 101174, 101425)
Changes from 20100407 to 20100427
* Changed version number to 8.3.5.10
* Add module ref counting to prevent module removal with active bsg
requests (CR 101863)
* Fix swapping target's FC ports caused I/O failure due to target
rejecting PLOGI (CR 100464)
* Reduce hba_queue_depth of SLI4 HBAs to account for XRIs reserved
for ELS commands
* Fixed hang on hba resets (CR 100032)

Comment 4 Andrius Benokraitis 2010-05-17 19:47:46 UTC
Setting back to ASSIGNED to remind revers to re-submit.

Comment 5 Rob Evers 2010-05-17 20:02:23 UTC
Vaios,

Do you anticipate any updates regarding this?
We need some resolution on this.

Rob

On Fri, 14 May 2010 10:30:47 -0400
James Smart <james.smart> wrote:

> > Actually, it may be just checking the file->private_data pointer for NULL at 
> > the file entry points.

bsg clears file->private_data in bsg_release() so nobody should not
see file->private_data NULL pointer...


> >  Although, the minor should not be deallocated from bsg 
> > until all releases are called.

bsg deallocate minor in bsg_unregister_queue(). It means, for example,
after a sas LLD frees a remote port, user-space application can't
access to it. I guess that it's the right thing.

The tricky part is, when a sas LLD frees a remote port, there might be
some user-space applications that still open a bsg device. So you
can't call blk_cleanup_queue() at that time.

You might hit the similar problem to the commit
93c20a59af4624aedf53f8320606b355aa951bc1. The following fix works?

=
From: FUJITA Tomonori <fujita.tomonori.co.jp>
Subject: [PATCH] scsi_transport_fc: fix the lifetime of sas bsg objects

fc_bsg_remove can't call blk_cleanup_queue() since there might be
applications that open a fc_host (or rport).

The commit 93c20a59af4624aedf53f8320606b355aa951bc1 fixed the same
lifetime problem of scsi_transport_sas.

Signed-off-by: FUJITA Tomonori <fujita.tomonori.co.jp>
---
 drivers/scsi/scsi_transport_fc.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 0681378..885b26b 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1897,6 +1897,10 @@ static int fc_target_match(struct attribute_container *cont,
 static void fc_rport_dev_release(struct device *dev)
 {
 	struct fc_rport *rport = dev_to_rport(dev);
+
+	if (rport->rqst_q)
+		blk_cleanup_queue(rport->rqst_q);
+
 	put_device(dev->parent);
 	kfree(rport);
 }
@@ -3944,6 +3948,13 @@ fc_bsg_rport_handler(struct request_queue *q)
 	fc_bsg_request_handler(q, shost, rport, &rport->dev);
 }
 
+static void fc_host_bsg_release(struct device *dev)
+{
+	struct fc_host_attrs *fc_host = shost_to_fc_host(dev_to_shost(dev));
+
+	if (fc_host->rqst_q)
+		blk_cleanup_queue(fc_host->rqst_q);
+}
 
 /**
  * fc_bsg_hostadd - Create and add the bsg hooks so we can receive requests
@@ -3981,7 +3992,7 @@ fc_bsg_hostadd(struct Scsi_Host *shost, struct fc_host_attrs *fc_host)
 	blk_queue_rq_timed_out(q, fc_bsg_job_timeout);
 	blk_queue_rq_timeout(q, FC_DEFAULT_BSG_TIMEOUT);
 
-	err = bsg_register_queue(q, dev, bsg_name, NULL);
+	err = bsg_register_queue(q, dev, bsg_name, fc_host_bsg_release);
 	if (err) {
 		printk(KERN_ERR "fc_host%d: bsg interface failed to "
 				"initialize - register queue\n",
@@ -4048,10 +4059,8 @@ fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport)
 static void
 fc_bsg_remove(struct request_queue *q)
 {
-	if (q) {
+	if (q)
 		bsg_unregister_queue(q);
-		blk_cleanup_queue(q);
-	}
 }
 
 
-- 1.6.5

Comment 6 Rob Evers 2010-05-17 20:32:35 UTC
(In reply to comment #5)
> Vaios,
> 
> Do you anticipate any updates regarding this?
> We need some resolution on this.
> 

Please continue discussion and updates on linux-scsi mailing list.

Thanks, Rob

Comment 7 Rob Evers 2010-05-18 13:16:28 UTC
In case it is not clear, I need to see the equivalent post on linux-scsi to proceed with this patch for rhel6 beta-2.  The deadline for me to post for rhel6-beta2 is EOB Thursday, 5/20/10 and I need time to examine this patch vs. upstream.

Comment 9 Rob Evers 2010-05-18 19:38:13 UTC
I'm fully up to speed on this now, sorry for any confusion.  This update reflects all the patches posted on linux-scsi:

http://marc.info/?l=linux-scsi&m=127367103218025&w=2
Subject: [PATCH 0/7] lpfc 8.3.13: Update lpfc to revision 8.3.13

except this due to upstream feedback:

http://marc.info/?l=linux-scsi&m=127367122218389&w=2
Subject: [PATCH 5/7] lpfc 8.3.13: BSG management fixes

Comment 14 Aristeu Rozanski 2010-05-25 17:43:01 UTC
Patch(es) available on kernel-2.6.32-29.el6

Comment 17 Barry Donahue 2010-08-17 19:49:15 UTC
Current rev is on RHEL6.0-20100811.2:
# modinfo lpfc
filename:       /lib/modules/2.6.32-63.el6.x86_64/kernel/drivers/scsi/lpfc/lpfc.ko
version:        0:8.3.5.17
author:         Emulex Corporation - tech.support
description:    Emulex LightPulse Fibre Channel SCSI driver 8.3.5.17
license:        GPL

Comment 18 releng-rhel@redhat.com 2010-11-11 15:57:51 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.