| .. | .. |
|---|
| 60 | 60 | "Write buffer misses", |
|---|
| 61 | 61 | "Transmit ring full", |
|---|
| 62 | 62 | "SPI errors", |
|---|
| 63 | + "Write verify errors", |
|---|
| 64 | + "Buffer available errors", |
|---|
| 63 | 65 | }; |
|---|
| 64 | 66 | |
|---|
| 65 | 67 | #ifdef CONFIG_DEBUG_FS |
|---|
| .. | .. |
|---|
| 124 | 126 | |
|---|
| 125 | 127 | return 0; |
|---|
| 126 | 128 | } |
|---|
| 127 | | - |
|---|
| 128 | | -static int |
|---|
| 129 | | -qcaspi_info_open(struct inode *inode, struct file *file) |
|---|
| 130 | | -{ |
|---|
| 131 | | - return single_open(file, qcaspi_info_show, inode->i_private); |
|---|
| 132 | | -} |
|---|
| 133 | | - |
|---|
| 134 | | -static const struct file_operations qcaspi_info_ops = { |
|---|
| 135 | | - .open = qcaspi_info_open, |
|---|
| 136 | | - .read = seq_read, |
|---|
| 137 | | - .llseek = seq_lseek, |
|---|
| 138 | | - .release = single_release, |
|---|
| 139 | | -}; |
|---|
| 129 | +DEFINE_SHOW_ATTRIBUTE(qcaspi_info); |
|---|
| 140 | 130 | |
|---|
| 141 | 131 | void |
|---|
| 142 | 132 | qcaspi_init_device_debugfs(struct qcaspi *qca) |
|---|
| 143 | 133 | { |
|---|
| 144 | | - struct dentry *device_root; |
|---|
| 134 | + qca->device_root = debugfs_create_dir(dev_name(&qca->net_dev->dev), |
|---|
| 135 | + NULL); |
|---|
| 145 | 136 | |
|---|
| 146 | | - device_root = debugfs_create_dir(dev_name(&qca->net_dev->dev), NULL); |
|---|
| 147 | | - qca->device_root = device_root; |
|---|
| 148 | | - |
|---|
| 149 | | - if (IS_ERR(device_root) || !device_root) { |
|---|
| 150 | | - pr_warn("failed to create debugfs directory for %s\n", |
|---|
| 151 | | - dev_name(&qca->net_dev->dev)); |
|---|
| 152 | | - return; |
|---|
| 153 | | - } |
|---|
| 154 | | - debugfs_create_file("info", S_IFREG | 0444, device_root, qca, |
|---|
| 155 | | - &qcaspi_info_ops); |
|---|
| 137 | + debugfs_create_file("info", S_IFREG | 0444, qca->device_root, qca, |
|---|
| 138 | + &qcaspi_info_fops); |
|---|
| 156 | 139 | } |
|---|
| 157 | 140 | |
|---|
| 158 | 141 | void |
|---|