Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20369
b: refs/heads/master
c: 1b3f636
h: refs/heads/master
i:
  20367: 2a7cc7c
v: v3
  • Loading branch information
andrew.vasquez@qlogic.com authored and unknown committed Feb 4, 2006
1 parent 2466027 commit c401623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6df144cca19cc60dda6dcce65d236b70cc46494
refs/heads/master: 1b3f63659bd353ae460c35f5793a9fd46cc95014
7 changes: 3 additions & 4 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off,
struct device, kobj)));
unsigned long flags;

if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size)
if (!capable(CAP_SYS_ADMIN) || off != 0)
return 0;

/* Read NVRAM. */
Expand All @@ -122,7 +122,7 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off,
ha->nvram_size);
spin_unlock_irqrestore(&ha->hardware_lock, flags);

return (count);
return ha->nvram_size;
}

static ssize_t
Expand Down Expand Up @@ -174,7 +174,7 @@ static struct bin_attribute sysfs_nvram_attr = {
.mode = S_IRUSR | S_IWUSR,
.owner = THIS_MODULE,
},
.size = 0,
.size = 512,
.read = qla2x00_sysfs_read_nvram,
.write = qla2x00_sysfs_write_nvram,
};
Expand All @@ -185,7 +185,6 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha)
struct Scsi_Host *host = ha->host;

sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_fw_dump_attr);
sysfs_nvram_attr.size = ha->nvram_size;
sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_nvram_attr);
}

Expand Down

0 comments on commit c401623

Please sign in to comment.