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)
81
81
else
82
82
dev -> dev_type = SAS_SATA_DEV ;
83
83
dev -> tproto = SAS_PROTOCOL_SATA ;
84
- } else {
84
+ } else if ( port -> oob_mode == SAS_OOB_MODE ) {
85
85
struct sas_identify_frame * id =
86
86
(struct sas_identify_frame * ) dev -> frame_rcvd ;
87
87
dev -> dev_type = id -> dev_type ;
88
88
dev -> iproto = id -> initiator_bits ;
89
89
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 ;
90
99
}
91
100
92
101
sas_init_dev (dev );
You can’t perform that action at this time.
0 commit comments