Comment 24 for bug 1998643

Revision history for this message
Don Brace (bracedon) wrote :

.sdev_attrs...

That will work.

Great job. This is due to the following patch not applied.
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"

2a47834d9452 scsi: smartpqi: Enable SATA NCQ priority in sysfs
Also due to a contextual difference because of
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"
I'll bet it's because of this HUNK:
@@ -7137,6 +7247,7 @@ static struct attribute *pqi_sdev_attrs[] = {
        &dev_attr_ssd_smart_path_enabled.attr,
        &dev_attr_raid_level.attr,
        &dev_attr_raid_bypass_cnt.attr,
+ &dev_attr_sas_ncq_prio_enable.attr,
        NULL
 };

The structure definition also was changed in this HUNK
-static struct device_attribute *pqi_sdev_attrs[] = {
- &dev_attr_lunid,
- &dev_attr_unique_id,
- &dev_attr_path_info,
- &dev_attr_sas_address,
- &dev_attr_ssd_smart_path_enabled,
- &dev_attr_raid_level,
- &dev_attr_raid_bypass_cnt,
+static struct attribute *pqi_sdev_attrs[] = {
+ &dev_attr_lunid.attr,
+ &dev_attr_unique_id.attr,
+ &dev_attr_path_info.attr,
+ &dev_attr_sas_address.attr,
+ &dev_attr_ssd_smart_path_enabled.attr,
+ &dev_attr_raid_level.attr,
+ &dev_attr_raid_bypass_cnt.attr,
        NULL
 };

So, needs to be
static struct device_attribute *pqi_sdev_attrs[] = {
and remove all of the .attr suffixes.

c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer
Also due to this HUNK
@@ -7262,6 +7271,7 @@ static struct scsi_host_template pqi_driver_template = {
        .map_queues = pqi_map_queues,
        .sdev_groups = pqi_sdev_groups,
        .shost_groups = pqi_shost_groups,
+ .cmd_size = sizeof(struct pqi_cmd_priv),
 };

The context without
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"

would be
.shost_attrs = pqi_shost_attrs,
.shost_attrs = pqi_shost_attrs,

The HUNK that changed this is below:
@@ -7153,8 +7157,8 @@ static struct scsi_host_template pqi_driver_template = {
        .slave_alloc = pqi_slave_alloc,
        .slave_configure = pqi_slave_configure,
        .map_queues = pqi_map_queues,
- .sdev_attrs = pqi_sdev_attrs,
- .shost_attrs = pqi_shost_attrs,
+ .sdev_groups = pqi_sdev_groups,
+ .shost_groups = pqi_shost_groups,
 };

Hope this helps.