public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* SCSI luns
@ 2005-07-12 11:22 Amrut Joshi
  2005-07-12 11:38 ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Amrut Joshi @ 2005-07-12 11:22 UTC (permalink / raw)
  To: linux-kernel

Hi,

Currently linux scsi subsystem doesnt store the 8-byte luns which are
recieved in REPORT_LUNS reply. This information is forver lost once
the scan is over. In my LDD  I need this information. Currently I have
to snoop REPORT_LUNS reply, do scsilun_to_int for all the luns and
store this mapping somewhere. This can be simplified by storing it in
scsi_device. This field will be meaningful only if sdev->scsi_level >=
SCSI_3.

Heres the patch
-----------------------------------------------------------------------------------------------------------------
--- drivers/scsi/scsi_scan.c.orig       2005-06-30 04:30:53.000000000 +0530
+++ drivers/scsi/scsi_scan.c    2005-07-12 16:19:48.533788528 +0530
@@ -1170,6 +1170,7 @@
                                       " aborted\n", devname, lun);
                                break;
                        }
+                        memcpy(sdev->lun_address, lunp,
sizeof(sdev->lun_address));
                }
        }

--- include/scsi/scsi_device.h.orig     2005-06-30 04:30:53.000000000 +0530
+++ include/scsi/scsi_device.h  2005-07-12 16:19:48.534788376 +0530
@@ -58,6 +58,8 @@
                                           could all be from the same event. */

        unsigned int id, lun, channel;
+        struct scsi_lun lun_address;    /* scsi address returned by REPORT_LUNS
+                                         * usable only if
sdev->scsi_lun >= SCSI_3 */

        unsigned int manufacturer;      /* Manufacturer of device, for using
                                         * vendor-specific cmd's */

----------------------------------------------------------------------------------------------------------------------

Please CC replies to me as I am not on the list.

Thanks,
-Amrut!

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

end of thread, other threads:[~2005-07-15 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 11:22 SCSI luns Amrut Joshi
2005-07-12 11:38 ` Arjan van de Ven
2005-07-12 11:55   ` Amrut Joshi
2005-07-12 16:17   ` James Bottomley
2005-07-15 18:00     ` Patrick Mansfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox