All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] be2iscsi: Modifying Maintainer's emailid
       [not found] <1301088242-29477-1-git-send-email-jayamohan.kallickal@emulex.com>
@ 2011-03-25 21:23 ` jayamohan.kallickal
  2011-03-25 21:23 ` [PATCH 3/5] be2iscsi: Set a timeout to FW jayamohan.kallickal
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: jayamohan.kallickal @ 2011-03-25 21:23 UTC (permalink / raw)
  To: linux-scsi; +Cc: Jayamohan Kallickal

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

     - Modifying Maintainer's emailid to emulex as Emulex has
acquired Serverengines

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 MAINTAINERS |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e11953d..3f8594a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5604,9 +5604,9 @@ F:	include/linux/ata.h
 F:	include/linux/libata.h
 
 SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
-M:	Jayamohan Kallickal <jayamohank@serverengines.com>
+M:	Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
 L:	linux-scsi@vger.kernel.org
-W:	http://www.serverengines.com
+W:	http://www.emulex.com
 S:	Supported
 F:	drivers/scsi/be2iscsi/
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5]  be2iscsi: Set a timeout to FW
       [not found] <1301088242-29477-1-git-send-email-jayamohan.kallickal@emulex.com>
  2011-03-25 21:23 ` [PATCH 2/5] be2iscsi: Modifying Maintainer's emailid jayamohan.kallickal
@ 2011-03-25 21:23 ` jayamohan.kallickal
  2011-03-25 21:24 ` [PATCH 4/5] be2iscsi: check before destroy jayamohan.kallickal
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: jayamohan.kallickal @ 2011-03-25 21:23 UTC (permalink / raw)
  To: linux-scsi; +Cc: Jayamohan Kallickal

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

          Thi patch sets a timeout value within which the FW has
to respond

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_cmds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index 4ffcbf7..b8a82f2 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -458,6 +458,7 @@ void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
 	req_hdr->opcode = opcode;
 	req_hdr->subsystem = subsystem;
 	req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr));
+	req_hdr->timeout = 120;
 }
 
 static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages,
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] be2iscsi: check before destroy
       [not found] <1301088242-29477-1-git-send-email-jayamohan.kallickal@emulex.com>
  2011-03-25 21:23 ` [PATCH 2/5] be2iscsi: Modifying Maintainer's emailid jayamohan.kallickal
  2011-03-25 21:23 ` [PATCH 3/5] be2iscsi: Set a timeout to FW jayamohan.kallickal
@ 2011-03-25 21:24 ` jayamohan.kallickal
  2011-04-13 21:45   ` Mike Christie
  2011-03-25 21:24 ` [PATCH 5/5] be2iscsi: Bug Fix for proper setting of FW jayamohan.kallickal
  2011-03-25 21:24 ` be2iscsi: copyright and other changes jayamohan.kallickal
  4 siblings, 1 reply; 7+ messages in thread
From: jayamohan.kallickal @ 2011-03-25 21:24 UTC (permalink / raw)
  To: linux-scsi; +Cc: Jayamohan Kallickal

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

     This patch checks if boot_kset is created before
	 attempting to destroy it.

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 7fe38a4..91b354d 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -420,7 +420,8 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
 	return 0;
 
 free_kset:
-	iscsi_boot_destroy_kset(phba->boot_kset);
+	if (phba->boot_kset)
+		iscsi_boot_destroy_kset(phba->boot_kset);
 	return -ENOMEM;
 }
 
@@ -4144,10 +4145,11 @@ static void beiscsi_remove(struct pci_dev *pcidev)
 			    phba->ctrl.mbox_mem_alloced.size,
 			    phba->ctrl.mbox_mem_alloced.va,
 			    phba->ctrl.mbox_mem_alloced.dma);
+	if (phba->boot_kset)
+		iscsi_boot_destroy_kset(phba->boot_kset);
 	iscsi_host_remove(phba->shost);
 	pci_dev_put(phba->pcidev);
 	iscsi_host_free(phba->shost);
-	iscsi_boot_destroy_kset(phba->boot_kset);
 }
 
 static void beiscsi_msix_enable(struct beiscsi_hba *phba)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] be2iscsi: Bug Fix for proper setting of FW
       [not found] <1301088242-29477-1-git-send-email-jayamohan.kallickal@emulex.com>
                   ` (2 preceding siblings ...)
  2011-03-25 21:24 ` [PATCH 4/5] be2iscsi: check before destroy jayamohan.kallickal
@ 2011-03-25 21:24 ` jayamohan.kallickal
  2011-03-25 21:24 ` be2iscsi: copyright and other changes jayamohan.kallickal
  4 siblings, 0 replies; 7+ messages in thread
From: jayamohan.kallickal @ 2011-03-25 21:24 UTC (permalink / raw)
  To: linux-scsi; +Cc: Jayamohan Kallickal

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

           There was a bug in setting up type and dmsg for FW

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 drivers/scsi/be2iscsi/be_main.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 91b354d..d834136 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4020,12 +4020,17 @@ static int beiscsi_mtask(struct iscsi_task *task)
 		hwi_write_buffer(pwrb, task);
 		break;
 	case ISCSI_OP_NOOP_OUT:
-		AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
-			      INI_RD_CMD);
-		if (task->hdr->ttt == ISCSI_RESERVED_TAG)
+		if (task->hdr->ttt != ISCSI_RESERVED_TAG) {
+			AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
+				      TGT_DM_CMD);
+			AMAP_SET_BITS(struct amap_iscsi_wrb, cmdsn_itt,
+				      pwrb, 0);
 			AMAP_SET_BITS(struct amap_iscsi_wrb, dmsg, pwrb, 0);
-		else
+		} else {
+			AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
+				      INI_RD_CMD);
 			AMAP_SET_BITS(struct amap_iscsi_wrb, dmsg, pwrb, 1);
+		}
 		hwi_write_buffer(pwrb, task);
 		break;
 	case ISCSI_OP_TEXT:
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* be2iscsi: copyright and other changes
       [not found] <1301088242-29477-1-git-send-email-jayamohan.kallickal@emulex.com>
                   ` (3 preceding siblings ...)
  2011-03-25 21:24 ` [PATCH 5/5] be2iscsi: Bug Fix for proper setting of FW jayamohan.kallickal
@ 2011-03-25 21:24 ` jayamohan.kallickal
  2011-03-26  0:35   ` Mike Christie
  4 siblings, 1 reply; 7+ messages in thread
From: jayamohan.kallickal @ 2011-03-25 21:24 UTC (permalink / raw)
  To: linux-scsi; +Cc: Jayamohan Kallickal

From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

Hi

  	These set of patches have been made on 
latest scsi-misc tree pulled on 23 Mar 2011.


0001     Copyright changes         
0002     Modifying Maintainer email id                       
0003     Force FW to respond within certain time        
0004     Destroy only if created     
0005     Bug fix to set right parameters for FW     

Thanks
Jayamohan Kallickal

Signed off by:  Jayamohan Kallickal <jayamohan.kallickal@emulex.com>

---


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: be2iscsi: copyright and other changes
  2011-03-25 21:24 ` be2iscsi: copyright and other changes jayamohan.kallickal
@ 2011-03-26  0:35   ` Mike Christie
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Christie @ 2011-03-26  0:35 UTC (permalink / raw)
  To: jayamohan.kallickal; +Cc: linux-scsi

On 03/25/2011 04:24 PM, jayamohan.kallickal@emulex.com wrote:
> From: Jayamohan Kallickal<jayamohan.kallickal@emulex.com>
>
> Hi
>
>    	These set of patches have been made on
> latest scsi-misc tree pulled on 23 Mar 2011.
>
>
> 0001     Copyright changes
> 0002     Modifying Maintainer email id
> 0003     Force FW to respond within certain time
> 0004     Destroy only if created
> 0005     Bug fix to set right parameters for FW
>

Looks ok

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] be2iscsi: check before destroy
  2011-03-25 21:24 ` [PATCH 4/5] be2iscsi: check before destroy jayamohan.kallickal
@ 2011-04-13 21:45   ` Mike Christie
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Christie @ 2011-04-13 21:45 UTC (permalink / raw)
  To: jayamohan.kallickal; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

On 03/25/2011 04:24 PM, jayamohan.kallickal@emulex.com wrote:
> From: Jayamohan Kallickal<jayamohan.kallickal@emulex.com>
>
>       This patch checks if boot_kset is created before
> 	 attempting to destroy it.
>
> Signed-off-by: Jayamohan Kallickal<jayamohan.kallickal@emulex.com>
> ---
>   drivers/scsi/be2iscsi/be_main.c |    6 ++++--
>   1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 7fe38a4..91b354d 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -420,7 +420,8 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
>   	return 0;
>
>   free_kset:
> -	iscsi_boot_destroy_kset(phba->boot_kset);
> +	if (phba->boot_kset)
> +		iscsi_boot_destroy_kset(phba->boot_kset);

This check is not needed, because in this path it is always set.

I fixed this up for you and made it so iscsi_boot_destroy_kset checks 
for null for the caller like how kfree does.


[-- Attachment #2: be2iscsi-fix-rmmod-due-to-mem-issues.patch --]
[-- Type: text/plain, Size: 1588 bytes --]

be2iscsi: Fix boot_kset destruction

This patch has iscsi_boot_destroy_kset check for NULL boot_ksets,
before destroying them. This fixes a bug in be2iscsi's rmmod
path where it was passing in a NULL boot_kset when boot was
not setup.

This also fixes a bug where be2iscsi was accessing memory that
was freed. It was calling iscsi_boot_destroy_kset and
accessing the phba after calling iscsi_host_free which could
free the phba.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 24e20ba..d01f2fe 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4144,10 +4144,10 @@ static void beiscsi_remove(struct pci_dev *pcidev)
 			    phba->ctrl.mbox_mem_alloced.size,
 			    phba->ctrl.mbox_mem_alloced.va,
 			    phba->ctrl.mbox_mem_alloced.dma);
+	iscsi_boot_destroy_kset(phba->boot_kset);
 	iscsi_host_remove(phba->shost);
 	pci_dev_put(phba->pcidev);
 	iscsi_host_free(phba->shost);
-	iscsi_boot_destroy_kset(phba->boot_kset);
 }
 
 static void beiscsi_msix_enable(struct beiscsi_hba *phba)
diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c
index df6bff7..0d8b0cd 100644
--- a/drivers/scsi/iscsi_boot_sysfs.c
+++ b/drivers/scsi/iscsi_boot_sysfs.c
@@ -472,6 +472,9 @@ void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset)
 {
 	struct iscsi_boot_kobj *boot_kobj, *tmp_kobj;
 
+	if (!boot_kset)
+		return;
+
 	list_for_each_entry_safe(boot_kobj, tmp_kobj,
 				 &boot_kset->kobj_list, list)
 		iscsi_boot_remove_kobj(boot_kobj);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-13 21:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1301088242-29477-1-git-send-email-jayamohan.kallickal@emulex.com>
2011-03-25 21:23 ` [PATCH 2/5] be2iscsi: Modifying Maintainer's emailid jayamohan.kallickal
2011-03-25 21:23 ` [PATCH 3/5] be2iscsi: Set a timeout to FW jayamohan.kallickal
2011-03-25 21:24 ` [PATCH 4/5] be2iscsi: check before destroy jayamohan.kallickal
2011-04-13 21:45   ` Mike Christie
2011-03-25 21:24 ` [PATCH 5/5] be2iscsi: Bug Fix for proper setting of FW jayamohan.kallickal
2011-03-25 21:24 ` be2iscsi: copyright and other changes jayamohan.kallickal
2011-03-26  0:35   ` Mike Christie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.