@@ -1515,9 +1515,19 @@ void qedf_process_error_detect(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
1515
1515
{
1516
1516
int rval ;
1517
1517
1518
+ if (io_req == NULL ) {
1519
+ QEDF_INFO (NULL , QEDF_LOG_IO , "io_req is NULL.\n" );
1520
+ return ;
1521
+ }
1522
+
1523
+ if (io_req -> fcport == NULL ) {
1524
+ QEDF_INFO (NULL , QEDF_LOG_IO , "fcport is NULL.\n" );
1525
+ return ;
1526
+ }
1527
+
1518
1528
if (!cqe ) {
1519
1529
QEDF_INFO (& qedf -> dbg_ctx , QEDF_LOG_IO ,
1520
- "cqe is NULL for io_req %p\n" , io_req );
1530
+ "cqe is NULL for io_req %p\n" , io_req );
1521
1531
return ;
1522
1532
}
1523
1533
@@ -1533,6 +1543,16 @@ void qedf_process_error_detect(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
1533
1543
le32_to_cpu (cqe -> cqe_info .err_info .rx_buf_off ),
1534
1544
le32_to_cpu (cqe -> cqe_info .err_info .rx_id ));
1535
1545
1546
+ /* When flush is active, let the cmds be flushed out from the cleanup context */
1547
+ if (test_bit (QEDF_RPORT_IN_TARGET_RESET , & io_req -> fcport -> flags ) ||
1548
+ (test_bit (QEDF_RPORT_IN_LUN_RESET , & io_req -> fcport -> flags ) &&
1549
+ io_req -> sc_cmd -> device -> lun == (u64 )io_req -> fcport -> lun_reset_lun )) {
1550
+ QEDF_ERR (& qedf -> dbg_ctx ,
1551
+ "Dropping EQE for xid=0x%x as fcport is flushing" ,
1552
+ io_req -> xid );
1553
+ return ;
1554
+ }
1555
+
1536
1556
if (qedf -> stop_io_on_error ) {
1537
1557
qedf_stop_all_io (qedf );
1538
1558
return ;
0 commit comments