lpfc: Add missing proc_name entry to scsi_host_table
Subsystems (2)
PATCH 1/1 lpfc: Add missing proc_name entry to scsi_host_table
[UBUNTU:drivers/scsi/lpfc] Add missing proc_name entry to scsi_host_table.
According to a few people, the scsi proc interface should die, but sysfs still uses some proc_* entries from scsi_host_table.
The Emulex driver needs to export at least proc_name.
---drivers/scsi/lpfc/lpfc_scsi.c | 1 +
1 files changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_scsi.c +0 -0
@@ -1269,6 +1269,7 @@ struct scsi_host_template lpfc_template
.slave_alloc = lpfc_slave_alloc,
.slave_configure = lpfc_slave_configure,
.slave_destroy = lpfc_slave_destroy,
+ .proc_name = "lpfc",
.this_id = -1, .sg_tablesize = LPFC_SG_SEG_CNT, .cmd_per_lun = LPFC_CMD_PER_LUN,
Is this destined for upstream (2.6.16 or later) ? If it is, I don't see why this change is needed, as:
- As lpfc doesn't support /proc interface, it never initializes the fields in the host template, so proc_info and proc_name will be null.
- scsi_proc_hostdir_add() validates that sht->proc_info is non-null before attempting to use sht->proc_name.
- the only reference in scsi_sysfs properly deals with a null name pointer (e.g. the proc_name is an empty string). Which seems the right thing to do if there is no proc entry.
That said - the change is trivial, so I really don't mind if it goes in.
-- james s
Quoted 27 lines · Randy Dunlap
[UBUNTU:drivers/scsi/lpfc] Add missing
proc_nameentry toscsi_host_table.According to a few people, the scsi proc interface should die, but sysfs still uses some proc_* entries from
scsi_host_table.The Emulex driver needs to export at least
proc_name.Signed-off-by Fabio M. Di Nitto <[email protected]>---
drivers/scsi/lpfc/lpfc_scsi.c| 1 +1 files changed, 1 insertion(+)drivers/scsi/lpfc/lpfc_scsi.c +1
-0@@ -1269,6 +1269,7 @@ struct scsi_host_template lpfc_template .slave_alloc = lpfc_slave_alloc, .slave_configure = lpfc_slave_configure, .slave_destroy = lpfc_slave_destroy, + .proc_name = "lpfc", .this_id = -1, .sg_tablesize = LPFC_SG_SEG_CNT, .cmd_per_lun = LPFC_CMD_PER_LUN,
Quoted 11 lines · James Smart
Is this destined for upstream (2.6.16 or later) ? If it is, I don't see why this change is needed, as:
- As lpfc doesn't support /proc interface, it never initializes the fields in the host template, soproc_infoandproc_namewill be null.
-scsi_proc_hostdir_add()validates thatsht->proc_infois non-null before attempting to usesht->proc_name.
- the only reference inscsi_sysfsproperly deals with a null name pointer (e.g. theproc_nameis an empty string). Which seems the right thing to do if there is no proc entry.That said - the change is trivial, so I really don't mind if it goes in.
Hi James,
It's not necessarily "destined". It's in the Ubuntu kernel tree and I'm in the process of scrubbing thru their kernel tree to see what (if anything) should/could be considered for adding to the mainline kernel tree.
If their patch justification is incorrect, then it's definitely not destined.
Thanks,
~Randy
Quoted 28 lines
Quoted 27 lines · Randy Dunlap
[UBUNTU:drivers/scsi/lpfc] Add missing
proc_nameentry toscsi_host_table.According to a few people, the scsi proc interface should die, but sysfs still uses some proc_* entries from
scsi_host_table.The Emulex driver needs to export at least
proc_name.Signed-off-by Fabio M. Di Nitto <[email protected]>---
drivers/scsi/lpfc/lpfc_scsi.c| 1 +1 files changed, 1 insertion(+)drivers/scsi/lpfc/lpfc_scsi.c +1
-0@@ -1269,6 +1269,7 @@ struct scsi_host_template lpfc_template .slave_alloc = lpfc_slave_alloc, .slave_configure = lpfc_slave_configure, .slave_destroy = lpfc_slave_destroy, + .proc_name = "lpfc", .this_id = -1, .sg_tablesize = LPFC_SG_SEG_CNT, .cmd_per_lun = LPFC_CMD_PER_LUN,