47 #include <linux/module.h>
48 #include <linux/kernel.h>
50 #include <linux/errno.h>
52 #include <linux/pci.h>
62 static ssize_t arcmsr_sysfs_iop_message_read(
struct file *filp,
65 char *
buf, loff_t off,
80 && (allxfer_len < 1031)) {
82 memcpy(ptmpQbuffer, pQbuffer, 1);
89 struct QBUFFER __iomem *prbuffer;
95 iop_data = prbuffer->
data;
106 return (allxfer_len);
109 static ssize_t arcmsr_sysfs_iop_message_write(
struct file *filp,
112 char *
buf, loff_t off,
119 uint8_t *pQbuffer, *ptmpuserbuffer;
126 ptmpuserbuffer = (
uint8_t *)buf;
136 if (my_empty_len >= user_len) {
137 while (user_len > 0) {
140 memcpy(pQbuffer, ptmpuserbuffer, 1);
158 static ssize_t arcmsr_sysfs_iop_message_clear(
struct file *filp,
161 char *buf, loff_t off,
191 static struct bin_attribute arcmsr_sysfs_message_read_attr = {
197 .read = arcmsr_sysfs_iop_message_read,
200 static struct bin_attribute arcmsr_sysfs_message_write_attr = {
206 .write = arcmsr_sysfs_iop_message_write,
209 static struct bin_attribute arcmsr_sysfs_message_clear_attr = {
215 .write = arcmsr_sysfs_iop_message_clear,
226 goto error_bin_file_message_read;
231 goto error_bin_file_message_write;
236 goto error_bin_file_message_clear;
239 error_bin_file_message_clear:
241 error_bin_file_message_write:
243 error_bin_file_message_read:
258 arcmsr_attr_host_driver_version(
struct device *dev,
267 arcmsr_attr_host_driver_posted_cmd(
struct device *dev,
279 arcmsr_attr_host_driver_reset(
struct device *dev,
291 arcmsr_attr_host_driver_abort(
struct device *dev,
315 arcmsr_attr_host_fw_version(
struct device *dev,
328 arcmsr_attr_host_fw_request_len(
struct device *dev,
341 arcmsr_attr_host_fw_numbers_queue(
struct device *dev,
354 arcmsr_attr_host_fw_sdram_size(
struct device *dev,
367 arcmsr_attr_host_fw_hd_channels(
struct device *dev,
391 &dev_attr_host_driver_version,
392 &dev_attr_host_driver_posted_cmd,
393 &dev_attr_host_driver_reset,
394 &dev_attr_host_driver_abort,
395 &dev_attr_host_fw_model,
396 &dev_attr_host_fw_version,
397 &dev_attr_host_fw_request_len,
398 &dev_attr_host_fw_numbers_queue,
399 &dev_attr_host_fw_sdram_size,
400 &dev_attr_host_fw_hd_channels,