mtip32xx: Add new sysfs entry 'status'
PATCH v2 3/7 mtip32xx: Add new sysfs entry 'status'
* Add support for detecting the following device status
- write protect
- over temp (thermal shutdown)
* Add new sysfs entry 'status', possible values - online, write_protect, thermal_shutdown
* Add new file 'sysfs-block-rssd' to document ABI (Reported-by: Greg Kroah-Hartman)
Signed-off-by Asai Thambi S P <[email protected]>
--- Documentation/ABI/testing/sysfs-block-rssd | 18 ++ drivers/block/mtip32xx/mtip32xx.c | 323 +++++++++++++++++++++++++--- drivers/block/mtip32xx/mtip32xx.h | 19 ++ 3 files changed, 331 insertions(+), 29 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-block-rssd
Documentation/ABI/testing/sysfs-block-rssd new file +18 -0
@@ -0,0 +1,18 @@ +What: /sys/block/rssd*/registers +Date: March 2012 +KernelVersion: 3.3 +Contact: Asai Thambi S P <[email protected]> +Description: This is a read-only file. Dumps below driver information and + hardware registers. + - S ACTive + - Command Issue + - Allocated + - Completed + - PORT IRQ STAT + - HOST IRQ STAT + +What: /sys/block/rssd*/status +Date: April 2012 +KernelVersion: 3.4 +Contact: Asai Thambi S P <[email protected]> +Description: This is a read-only file. Indicates the status of the device.
drivers/block/mtip32xx/mtip32xx.c +294 -29
487 lines not on this page · raw message
drivers/block/mtip32xx/mtip32xx.h +19 -0
@@ -127,6 +127,19 @@#define MTIP_DD_FLAG_CLEANUP_BIT 3#define MTIP_DD_FLAG_INIT_DONE_BIT 4 +#define MTIP_DD_FLAG_WRITE_PROTECT_BIT 5 +#define MTIP_DD_FLAG_OVER_TEMP_BIT 6 +#define MTIP_DD_FLAG_REBUILD_FAILED_BIT 7 + +__packed struct smart_attr{ +u8 attr_id; +u16 flags; +u8 cur; +u8 worst; +u32 data; +u8 res[3 ]; +}; +/* Register Frame Information Structure (FIS), host to device. */ struct host_to_dev_fis {/*
@@ -351,6 +364,12 @@ struct mtip_port {* when the command slot and all associated data structures * are no longer needed. */ +u16 *log_buf; +dma_addr_t log_buf_dma; + +u8 *smart_buf; +dma_addr_t smart_buf_dma; +unsigned long allocated[SLOTBITS_IN_LONGS ];/* * used to queue commands when an internal command is in progress
Signature · 1 line
1.7.1