All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix up tag usage in lpfc
@ 2007-10-18 10:12 Hannes Reinecke
  2007-10-19 12:58 ` James Smart
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2007-10-18 10:12 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 384 bytes --]

Hi James,

appearently the lpfc driver is sligtly confused about the meaning
of the 'scmd->tag' value. It should rather inspect the correct
flags to detect the proper SCSI Tag value.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

[-- Attachment #2: lpfc-fixup-tags --]
[-- Type: text/plain, Size: 703 bytes --]

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index cd67493..a1cf99a 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -693,17 +693,10 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
 	memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16);
 
 	if (scsi_cmnd->device->tagged_supported) {
-		switch (scsi_cmnd->tag) {
-		case HEAD_OF_QUEUE_TAG:
-			fcp_cmnd->fcpCntl1 = HEAD_OF_Q;
-			break;
-		case ORDERED_QUEUE_TAG:
+		if (scsi_cmnd->device->ordered_tags)
 			fcp_cmnd->fcpCntl1 = ORDERED_Q;
-			break;
-		default:
+		else
 			fcp_cmnd->fcpCntl1 = SIMPLE_Q;
-			break;
-		}
 	} else
 		fcp_cmnd->fcpCntl1 = 0;
 

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

end of thread, other threads:[~2007-10-19 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 10:12 [PATCH] Fix up tag usage in lpfc Hannes Reinecke
2007-10-19 12:58 ` James Smart

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.