mptfusion: Added new sysfs parameters for handle, sas_addr and handles
Subsystems (2)
PATCH 1/6 mptfusion: Added new sysfs parameters for handle, sas_addr and handles
New feature is added. sas_address, sad_device_hanlde and firmware id will be visible from sysfs parameters.
---
drivers/message/fusion/mptbase.h +2 -0
@@ -399,6 +399,8 @@ typedef struct _VirtTarget {u8 inDMD;/* currently in the device removal delay timer */ u32 num_luns; +u64 sas_address; +u16 handle; } VirtTarget; typedef struct _VirtDevice {
drivers/message/fusion/mptsas.c +4 -0
@@ -1758,6 +1758,9 @@ mptsas_target_alloc(struct scsi_target *starget) id = p->phy_info[i].attached.id; channel = p->phy_info[i].attached.channel;mptsas_set_starget (&p->phy_info[i], starget); + vtarget->handle = p->phy_info[i].attached.handle; + vtarget->sas_address = p->phy_info[i]. + attached.sas_address;/* * Exposing hidden raid components
@@ -1983,6 +1986,7 @@ static struct scsi_host_template mptsas_driver_template = { .cmd_per_lun = 7, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = mptscsih_host_attrs, + .sdev_attrs = mptscsih_dev_attrs, };static int mptsas_get_linkerrors (struct sas_phy *phy)
drivers/message/fusion/mptscsih.c +84 -0
91 lines not on this page · raw message
drivers/message/fusion/mptscsih.h +1 -0
@@ -133,5 +133,6 @@ extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth,extern u8 mptscsih_raid_id_to_num (MPT_ADAPTER *ioc,u8 channel,u8 id);extern int mptscsih_is_phys_disk (MPT_ADAPTER *ioc,u8 channel,u8 id);extern struct device_attribute *mptscsih_host_attrs[]; +extern struct device_attribute *mptscsih_dev_attrs[];extern struct scsi_cmnd *mptscsih_get_scsi_lookup (MPT_ADAPTER *ioc,int i);extern void mptscsih_taskmgmt_response_code (MPT_ADAPTER *ioc,u8 response_code);
James Bottomley
maintainerQuoted 2 lines · Desai
New feature is added.
sas_address,sad_device_hanldeand firmware id will be visible from sysfs parameters.
Well, sas_address, no ... it's already part of the phy properties of the sas transport class.
Why handle and firmware_id ... they're fairly irrelevant properties of the internal firmware ... so what's the point in exposing them externally?
James
Quoted 10 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Thursday, February 03, 2011 11:04 PM
To: Desai, Kashyap
Cc: [email protected]; Moore, Eric; Prakash, Sathya
Subject: Re: [PATCH 01/06] mptfusion: Added new sysfs parameters for handle,sas_addrand handles
Quoted 8 lines
Quoted 1 line · Desai
New feature is added.
sas_address,sad_device_hanldeand firmware idwill be visible from
Quoted 1 line
sysfs parameters.
Well,
sas_address, no ... it's already part of the phy properties of the
sas transport class.
James,
I agree on this point.
Quoted 4 lines
Why handle and
firmware_id... they're fairly irrelevant properties of the internal firmware ... so what's the point in exposing them externally?
This is mainly for debugging in case if device is not mapped to correct handle and fw_id (which are completely LSI firmware's internal). This was raised by few customers who really wanted to watch handles and fw_id of LSI firmware through sysfs.
~ Kashyap
Quoted 3 lines
James