From 6429cd49f45450cd77a57b70b0dfa98fe2794da0 Mon Sep 17 00:00:00 2001 From: Alexandre Bounine Date: Wed, 27 Oct 2010 15:34:32 -0700 Subject: rapidio: add handling of orphan port-write message Add check for access to port-write (PW) message source device before processing the PW message. If source RIO device is not available (power down or RIO link failure) trace back to a last available switch/port on the PW message route and service failure at that point. Signed-off-by: Alexandre Bounine Cc: Thomas Moll Cc: Matt Porter Cc: Li Yang Cc: Kumar Gala Cc: Micha Nelissen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rapidio/rio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/rapidio/rio.h') diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h index f27b7a9c47d..bc71ba1d239 100644 --- a/drivers/rapidio/rio.h +++ b/drivers/rapidio/rio.h @@ -14,6 +14,8 @@ #include #include +#define RIO_MAX_CHK_RETRY 3 + /* Functions internal to the RIO core code */ extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 destid, -- cgit v1.2.3-18-g5258 From e274e0ed0a2ac31d5eaf7c891e4e1d99197517b2 Mon Sep 17 00:00:00 2001 From: Alexandre Bounine Date: Wed, 27 Oct 2010 15:34:32 -0700 Subject: rapidio: add device access check into the enumeration Add explicit device access check before performing device enumeration. This gives a chance to clear possible link error conditions by issuing safe maintenance read request(s). Signed-off-by: Alexandre Bounine Cc: Thomas Moll Cc: Matt Porter Cc: Li Yang Cc: Kumar Gala Cc: Micha Nelissen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rapidio/rio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/rapidio/rio.h') diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h index bc71ba1d239..d249a1205c7 100644 --- a/drivers/rapidio/rio.h +++ b/drivers/rapidio/rio.h @@ -24,6 +24,8 @@ extern u32 rio_mport_get_physefb(struct rio_mport *port, int local, u16 destid, u8 hopcount); extern u32 rio_mport_get_efb(struct rio_mport *port, int local, u16 destid, u8 hopcount, u32 from); +extern int rio_mport_chk_dev_access(struct rio_mport *mport, u16 destid, + u8 hopcount); extern int rio_create_sysfs_dev_files(struct rio_dev *rdev); extern int rio_enum_mport(struct rio_mport *mport); extern int rio_disc_mport(struct rio_mport *mport); -- cgit v1.2.3-18-g5258 From af84ca38aff94061dd0711edbb99b0900a9c28fd Mon Sep 17 00:00:00 2001 From: Alexandre Bounine Date: Wed, 27 Oct 2010 15:34:34 -0700 Subject: rapidio: add handling of redundant routes Detects RIO link to the already enumerated device and properly sets links between device objects. Changes to the enumeration/discovery logic: 1. Use Master Enable bit to signal end of the enumeration - agents may start their discovery process as soon as they see this bit set (Component Tag register was used before for this purpose). 2. Enumerator sets Component Tag (!= 0) immediately during device setup. This allows to identify the device if the redundant route exists in a RIO system. Signed-off-by: Alexandre Bounine Cc: Thomas Moll Cc: Matt Porter Cc: Li Yang Cc: Kumar Gala Cc: Micha Nelissen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rapidio/rio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/rapidio/rio.h') diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h index d249a1205c7..b1af414f15e 100644 --- a/drivers/rapidio/rio.h +++ b/drivers/rapidio/rio.h @@ -38,6 +38,7 @@ extern int rio_std_route_get_entry(struct rio_mport *mport, u16 destid, extern int rio_std_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table); extern int rio_set_port_lockout(struct rio_dev *rdev, u32 pnum, int lock); +extern struct rio_dev *rio_get_comptag(u32 comp_tag, struct rio_dev *from); /* Structures internal to the RIO core code */ extern struct device_attribute rio_dev_attrs[]; -- cgit v1.2.3-18-g5258