Commit 388c45ccfaeec68e334ad79edeb0b5b0a43197ff
Committed by
Linus Torvalds
1 parent
af84ca38af
Exists in
master
and in
4 other branches
rapidio: fix IDLE2 bits corruption
RapidIO spec v.2.1 adds Idle Sequence 2 into LP-Serial Physical Layer. The fix ensures that corresponding bits are not corrupted during error handling. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Micha Nelissen <micha@neli.hopto.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 3 additions and 9 deletions Side-by-side Diff
drivers/rapidio/rio.c
... | ... | @@ -871,15 +871,10 @@ |
871 | 871 | rdev->em_efptr + RIO_EM_LTL_ERR_DETECT, 0); |
872 | 872 | } |
873 | 873 | |
874 | - /* Clear remaining error bits */ | |
874 | + /* Clear remaining error bits and Port-Write Pending bit */ | |
875 | 875 | rio_mport_write_config_32(mport, destid, hopcount, |
876 | 876 | rdev->phys_efptr + RIO_PORT_N_ERR_STS_CSR(portnum), |
877 | - err_status & RIO_PORT_N_ERR_STS_CLR_MASK); | |
878 | - | |
879 | - /* Clear Port-Write Pending bit */ | |
880 | - rio_mport_write_config_32(mport, destid, hopcount, | |
881 | - rdev->phys_efptr + RIO_PORT_N_ERR_STS_CSR(portnum), | |
882 | - RIO_PORT_N_ERR_STS_PW_PEND); | |
877 | + err_status); | |
883 | 878 | |
884 | 879 | return 0; |
885 | 880 | } |
include/linux/rio_regs.h
... | ... | @@ -229,7 +229,7 @@ |
229 | 229 | #define RIO_MNT_REQ_CMD_IS 0x04 /* Input-status command */ |
230 | 230 | #define RIO_PORT_N_MNT_RSP_CSR(x) (0x0044 + x*0x20) /* 0x0002 */ |
231 | 231 | #define RIO_PORT_N_MNT_RSP_RVAL 0x80000000 /* Response Valid */ |
232 | -#define RIO_PORT_N_MNT_RSP_ASTAT 0x000003e0 /* ackID Status */ | |
232 | +#define RIO_PORT_N_MNT_RSP_ASTAT 0x000007e0 /* ackID Status */ | |
233 | 233 | #define RIO_PORT_N_MNT_RSP_LSTAT 0x0000001f /* Link Status */ |
234 | 234 | #define RIO_PORT_N_ACK_STS_CSR(x) (0x0048 + x*0x20) /* 0x0002 */ |
235 | 235 | #define RIO_PORT_N_ACK_CLEAR 0x80000000 |
... | ... | @@ -243,7 +243,6 @@ |
243 | 243 | #define RIO_PORT_N_ERR_STS_PORT_ERR 0x00000004 |
244 | 244 | #define RIO_PORT_N_ERR_STS_PORT_OK 0x00000002 |
245 | 245 | #define RIO_PORT_N_ERR_STS_PORT_UNINIT 0x00000001 |
246 | -#define RIO_PORT_N_ERR_STS_CLR_MASK 0x07120204 | |
247 | 246 | #define RIO_PORT_N_CTL_CSR(x) (0x005c + x*0x20) |
248 | 247 | #define RIO_PORT_N_CTL_PWIDTH 0xc0000000 |
249 | 248 | #define RIO_PORT_N_CTL_PWIDTH_1 0x00000000 |