Please sign in to comment.
libsas: fix sas_discover_devices return code handling
commit b17caa1 upstream. commit 198439e [SCSI] libsas: do not set res = 0 in sas_ex_discover_dev() commit 19252de [SCSI] libsas: fix wide port hotplug issues The above commits seem to have confused the return value of sas_ex_discover_dev which is non-zero on failure and sas_ex_join_wide_port which just indicates short circuiting discovery on already established ports. The result is random discovery failures depending on configuration. Calls to sas_ex_join_wide_port are the source of the trouble as its return value is errantly assigned to 'res'. Convert it to bool and stop returning its result up the stack. Tested-by: Dan Melnic <firstname.lastname@example.org> Reported-by: Dan Melnic <email@example.com> Signed-off-by: Dan Williams <firstname.lastname@example.org> Reviewed-by: Jack Wang <email@example.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Ben Hutchings <firstname.lastname@example.org>
- Loading branch information...
Showing with 12 additions and 27 deletions.