On Wed, Mar 26, 2008 at 11:22:10PM +0530, aakash berde wrote: > I want to retrieve the SASaddress of the scsi devices attached to Scsi > adapter.
Would that be the port address or the target WWN? They're not the same thing. If you don't understand this, anything you do with this information will be wrong. Probably it will be wrong anyway, because there's very little you can do with these addresses that will not be actively harmful. Sending frames to SSP ports yourself is the I/O equivalent of int *x = 0xFC4CD83C; *x = 47; We have malloc(3C) and mmap(2) and friends to help you use memory safely. Likewise, we have an I/O framework to help you access devices safely. In most cases, you should use them, not bypass them. I know I've asked you this before and you never answer, but I'll try one last time: what are you trying to do? From your questions, I can think of three possibilities: 1. You are trying to implement some core infrastructure for working with SAS fabrics. If so, you may be duplicating existing work. Please tell us what your requirements and intentions are so that we can direct you to the right system functionality or the team working to implement it, if any. 2. You are trying to write an application that does things which belong in system libraries and/or the kernel. New infrastructure may help you here, eliminating much of what you seem to be doing. Please tell us what you are trying to do so that we can help you understand whether the system should be expected to provide it for you and direct you to the team, if any, working on that infrastructure. 3. You are just exploring. Nothing at all wrong with that, but in this case you really need to review the literature so that you will understand what you are seeing. Without a thorough understanding of SAS and the SCSI architecture, your exploration is likely to be more painful and confusing than enlightening. This stuff is complicated. That's why we need software abstractions on top of it. Please help us help you. > Is there any method to retrieve the SASaddress of the scsi devices/scsi HBA? prtconf -v | egrep '(initiator|target)-port|wwn' Everything you can get from prtconf can be obtained programmatically via libdevinfo. Note that not all properties are Public. You need to do your research before relying on them. There is a lot of history here and the fibrechannel people have had the most influence on it. You need to go hit the ARC cases (http://www.opensolaris.org/os/community/arc/), possibly requesting that some be published if they are not currently. And reading up on how FC port and node IDs are exposed to userland would probably help too. > I have read that uscsi / libdevinfo have the features of retrieving uscsi(7I) has nothing to do with SAS addresses. SAS, like SPI, FC, and iSCSI, is a transport for SCSI; it operates below, and invisible to, the commands themselves. Please visit t10.org and read and understand the SCSI Architecture Manual (SAM-4) before continuing. -- Keith M Wesolowski "Sir, we're surrounded!" Fishworks "Excellent; we can attack in any direction!" _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
