All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 3/3] HCIL accraid updates
  2005-10-29 21:38 [patch 1/3] HCIL: more sfoo_printk() Jeff Garzik
@ 2005-10-29 21:39 ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-10-29 21:39 UTC (permalink / raw)
  To: linux-scsi; +Cc: markh


commit 5ffa5fea1a50cdc3196e5f0c4e18b1aceb88125f
Author: Jeff Garzik <jgarzik@pobox.com>
Date:   Sat Oct 29 17:32:26 2005 -0400

    [SCSI] aacraid: use scmd_id(), begin elimination of ID_LUN_TO_CONTAINER()
    
    - begin elimination of ID_LUN_TO_CONTAINER(), which takes "id" and "lun"
      arguments, but only uses the "id" argument.  This eliminates needless
      references to sdev->lun, which are always compiled out.
    
    - begin using wrappers scmd_id(), sdev_id()

 drivers/scsi/aacraid/aachba.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 2a128a1..8b797d6 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -908,7 +908,7 @@ static void io_callback(void *context, s
 	scsicmd = (struct scsi_cmnd *) context;
 
 	dev = (struct aac_dev *)scsicmd->device->host->hostdata;
-	cid = ID_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
+	cid = scmd_id(scsicmd);
 
 	if (nblank(dprintk(x))) {
 		u64 lba;
@@ -1353,7 +1353,7 @@ static void synchronize_callback(void *c
 	else {
 		struct scsi_device *sdev = cmd->device;
 		struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
-		u32 cid = ID_LUN_TO_CONTAINER(sdev->id, sdev->lun);
+		u32 cid = sdev_id(sdev);
 		printk(KERN_WARNING 
 		     "synchronize_callback: synchronize failed, status = %d\n",
 		     le32_to_cpu(synchronizereply->status));
@@ -1547,7 +1547,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsi
 	{
 		struct inquiry_data inq_data;
 
-		dprintk((KERN_DEBUG "INQUIRY command, ID: %d.\n", scsicmd->device->id));
+		dprintk((KERN_DEBUG "INQUIRY command, ID: %d.\n", scmd_id(scsicmd)));
 		memset(&inq_data, 0, sizeof (struct inquiry_data));
 
 		inq_data.inqd_ver = 2;	/* claim compliance to SCSI-2 */
@@ -1774,7 +1774,7 @@ static int query_disk(struct aac_dev *de
 	if (copy_from_user(&qd, arg, sizeof (struct aac_query_disk)))
 		return -EFAULT;
 	if (qd.cnum == -1)
-		qd.cnum = ID_LUN_TO_CONTAINER(qd.id, qd.lun);
+		qd.cnum = qd.id;
 	else if ((qd.bus == -1) && (qd.id == -1) && (qd.lun == -1)) 
 	{
 		if (qd.cnum < 0 || qd.cnum >= dev->maximum_num_containers)

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

* RE: [patch 3/3] HCIL accraid updates
@ 2005-10-31 12:23 Salyzyn, Mark
  2005-11-11 11:55 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Salyzyn, Mark @ 2005-10-31 12:23 UTC (permalink / raw)
  To: Jeff Garzik, Mark Haverkamp, SCSI Mailing List

No problem from me.

There was a time I would have resisted while we were working out our
SATA cards as we were exploring the possibility of representing the
increased number of array targets with id & lun by keeping the decision
centralized in a small series of macros allowing us to act quickly; but
I am all over that now. SATA cards have 128 array targets, and still map
one-to-one with id.

Would have preferred the patch to cut the cord completely and drop all
the container to id macros, that can follow in a cosmetic cleanup patch
behind all the big ones on their way.

Sincerely -- Mark Salyzyn

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Jeff Garzik
Sent: Saturday, October 29, 2005 5:40 PM
To: linux-scsi@vger.kernel.org
Cc: markh@osdl.org
Subject: [patch 3/3] HCIL accraid updates



commit 5ffa5fea1a50cdc3196e5f0c4e18b1aceb88125f
Author: Jeff Garzik <jgarzik@pobox.com>
Date:   Sat Oct 29 17:32:26 2005 -0400

    [SCSI] aacraid: use scmd_id(), begin elimination of
ID_LUN_TO_CONTAINER()
    
    - begin elimination of ID_LUN_TO_CONTAINER(), which takes "id" and
"lun"
      arguments, but only uses the "id" argument.  This eliminates
needless
      references to sdev->lun, which are always compiled out.
    
    - begin using wrappers scmd_id(), sdev_id()

 drivers/scsi/aacraid/aachba.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/aacraid/aachba.c
b/drivers/scsi/aacraid/aachba.c index 2a128a1..8b797d6 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -908,7 +908,7 @@ static void io_callback(void *context, s
 	scsicmd = (struct scsi_cmnd *) context;
 
 	dev = (struct aac_dev *)scsicmd->device->host->hostdata;
-	cid = ID_LUN_TO_CONTAINER(scsicmd->device->id,
scsicmd->device->lun);
+	cid = scmd_id(scsicmd);
 
 	if (nblank(dprintk(x))) {
 		u64 lba;
@@ -1353,7 +1353,7 @@ static void synchronize_callback(void *c
 	else {
 		struct scsi_device *sdev = cmd->device;
 		struct aac_dev *dev = (struct aac_dev
*)sdev->host->hostdata;
-		u32 cid = ID_LUN_TO_CONTAINER(sdev->id, sdev->lun);
+		u32 cid = sdev_id(sdev);
 		printk(KERN_WARNING 
 		     "synchronize_callback: synchronize failed, status =
%d\n",
 		     le32_to_cpu(synchronizereply->status));
@@ -1547,7 +1547,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsi
 	{
 		struct inquiry_data inq_data;
 
-		dprintk((KERN_DEBUG "INQUIRY command, ID: %d.\n",
scsicmd->device->id));
+		dprintk((KERN_DEBUG "INQUIRY command, ID: %d.\n",
scmd_id(scsicmd)));
 		memset(&inq_data, 0, sizeof (struct inquiry_data));
 
 		inq_data.inqd_ver = 2;	/* claim compliance to SCSI-2 */
@@ -1774,7 +1774,7 @@ static int query_disk(struct aac_dev *de
 	if (copy_from_user(&qd, arg, sizeof (struct aac_query_disk)))
 		return -EFAULT;
 	if (qd.cnum == -1)
-		qd.cnum = ID_LUN_TO_CONTAINER(qd.id, qd.lun);
+		qd.cnum = qd.id;
 	else if ((qd.bus == -1) && (qd.id == -1) && (qd.lun == -1)) 
 	{
 		if (qd.cnum < 0 || qd.cnum >=
dev->maximum_num_containers)
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org More majordomo info
at  http://vger.kernel.org/majordomo-info.html

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

* Re: [patch 3/3] HCIL accraid updates
  2005-10-31 12:23 [patch 3/3] HCIL accraid updates Salyzyn, Mark
@ 2005-11-11 11:55 ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-11-11 11:55 UTC (permalink / raw)
  To: Salyzyn, Mark; +Cc: Mark Haverkamp, SCSI Mailing List

Salyzyn, Mark wrote:
> No problem from me.

Thanks.


> Would have preferred the patch to cut the cord completely and drop all
> the container to id macros, that can follow in a cosmetic cleanup patch
> behind all the big ones on their way.

Yeah, I did that locally, but couldn't add it to the patch you saw due 
to unrelated struct scsi_lun changes I've been working on.

	Jeff



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

end of thread, other threads:[~2005-11-11 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31 12:23 [patch 3/3] HCIL accraid updates Salyzyn, Mark
2005-11-11 11:55 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2005-10-29 21:38 [patch 1/3] HCIL: more sfoo_printk() Jeff Garzik
2005-10-29 21:39 ` [patch 3/3] HCIL accraid updates Jeff Garzik

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.