File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,21 @@ static int sas_get_port_device(struct asd_sas_port *port)
8181 else
8282 dev -> dev_type = SAS_SATA_DEV ;
8383 dev -> tproto = SAS_PROTOCOL_SATA ;
84- } else {
84+ } else if ( port -> oob_mode == SAS_OOB_MODE ) {
8585 struct sas_identify_frame * id =
8686 (struct sas_identify_frame * ) dev -> frame_rcvd ;
8787 dev -> dev_type = id -> dev_type ;
8888 dev -> iproto = id -> initiator_bits ;
8989 dev -> tproto = id -> target_bits ;
90+ } else {
91+ /* If the oob mode is OOB_NOT_CONNECTED, the port is
92+ * disconnected due to race with PHY down. We cannot
93+ * continue to discover this port
94+ */
95+ sas_put_device (dev );
96+ pr_warn ("Port %016llx is disconnected when discovering\n" ,
97+ SAS_ADDR (port -> attached_sas_addr ));
98+ return - ENODEV ;
9099 }
91100
92101 sas_init_dev (dev );
You can’t perform that action at this time.
0 commit comments