[PATCH] add more scsi_device sysfs attributes
Hi - This patch adds some scsi_device sysfs specific macros (based on some in the usb source), and adds more scsi_device sysfs attributes. It modifies the current output of the "type" attribute to be the numeric value of the type, and adds a few other attributes. It is easy to add or remove scsi_device attributes with this patch. Example sysfs with this patch: [patman@elm3a50 patman]$ ls /sysfs/bus/scsi/devices/0:0:0:0 0:0:0:0:gen current_queue_depth name power vendor access_count device_blocked new_queue_depth rev block model online type And results of catting each file above (block and 0:0:0:0:gen are not files): /sysfs/bus/scsi/devices/0:0:0:0/access_count: '2' /sysfs/bus/scsi/devices/0:0:0:0/current_queue_depth: '253' /sysfs/bus/scsi/devices/0:0:0:0/device_blocked: '0' /sysfs/bus/scsi/devices/0:0:0:0/model: 'ST318203LC !#' /sysfs/bus/scsi/devices/0:0:0:0/name: 'SIBM-PSG ST318203LC !#LRA6701300007027J5ZL' /sysfs/bus/scsi/devices/0:0:0:0/new_queue_depth: '253' /sysfs/bus/scsi/devices/0:0:0:0/online: '1' /sysfs/bus/scsi/devices/0:0:0:0/power: '0' /sysfs/bus/scsi/devices/0:0:0:0/rev: 'B222' /sysfs/bus/scsi/devices/0:0:0:0/type: '0' /sysfs/bus/scsi/devices/0:0:0:0/vendor: 'IBM-PSG ' The online bit field is writable, although setting it to 0 is not useful.
Showing
Please register or sign in to comment