scsi: scsi_transport_fc: Allow setting rport state to current state

The only input fc_rport_set_marginal_state() currently accepts is
"Marginal" when port_state is "Online", and "Online" when the port_state
is "Marginal". It should also allow setting port_state to its current
state, either "Marginal or "Online".

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Link: https://lore.kernel.org/r/20240917230643.966768-1-bmarzins@redhat.com
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by Benjamin Marzinski and committed by Martin K. Petersen d539a871 9023ed8d

+2 -2
+2 -2
drivers/scsi/scsi_transport_fc.c
··· 1250 */ 1251 if (rport->port_state == FC_PORTSTATE_ONLINE) 1252 rport->port_state = port_state; 1253 - else 1254 return -EINVAL; 1255 } else if (port_state == FC_PORTSTATE_ONLINE) { 1256 /* ··· 1260 */ 1261 if (rport->port_state == FC_PORTSTATE_MARGINAL) 1262 rport->port_state = port_state; 1263 - else 1264 return -EINVAL; 1265 } else 1266 return -EINVAL;
··· 1250 */ 1251 if (rport->port_state == FC_PORTSTATE_ONLINE) 1252 rport->port_state = port_state; 1253 + else if (port_state != rport->port_state) 1254 return -EINVAL; 1255 } else if (port_state == FC_PORTSTATE_ONLINE) { 1256 /* ··· 1260 */ 1261 if (rport->port_state == FC_PORTSTATE_MARGINAL) 1262 rport->port_state = port_state; 1263 + else if (port_state != rport->port_state) 1264 return -EINVAL; 1265 } else 1266 return -EINVAL;