]> git.karo-electronics.de Git - linux-beck.git/commit
staging/rdma/hfi1: Guard i2c access against cp
authorDean Luick <dean.luick@intel.com>
Thu, 18 Feb 2016 19:12:51 +0000 (11:12 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:45:45 +0000 (20:45 -0500)
commit7b47622d784311bff8218d03754fbf20529c1a71
tree57f6a3bbbc296040c31c1e4ed60684905dab2b3b
parent9debaaecb9070c05bbc3b5d2257d6aea416ccab6
staging/rdma/hfi1: Guard i2c access against cp

An attempt to cp or cat /sys/kernel/debug/hfi1/hfi1_0/i2c1
produces this message:

hfi1 0000:81:00.0: hfi1_0: IB0:1 I2C failed even retrying

Fix the issue by explicitly rejecting a simple cat/cp with an
-EINVAL error return.

Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/debugfs.c