scsi: qla2xxx: Fix GPNFT/GNNFT error handling
retry gpnft/gnnft if error is encountered. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
		
					parent
					
						
							
								fb35265b12
							
						
					
				
			
			
				commit
				
					
						cf055fb0b7
					
				
			
		
					 2 changed files with 19 additions and 4 deletions
				
			
		|  | @ -3878,6 +3878,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) | ||||||
| 		ql_dbg(ql_dbg_disc, vha, 0xffff, | 		ql_dbg(ql_dbg_disc, vha, 0xffff, | ||||||
| 		    "GPNFT failed. FC4type %x. Rescanning.\n", | 		    "GPNFT failed. FC4type %x. Rescanning.\n", | ||||||
| 		    fc4type); | 		    fc4type); | ||||||
|  | 		set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags); | ||||||
| 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | ||||||
| 		goto out; | 		goto out; | ||||||
| 	} | 	} | ||||||
|  | @ -3987,6 +3988,19 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res) | ||||||
| 	    "Async done-%s res %x FC4Type %x\n", | 	    "Async done-%s res %x FC4Type %x\n", | ||||||
| 	    sp->name, res, sp->gen2); | 	    sp->name, res, sp->gen2); | ||||||
| 
 | 
 | ||||||
|  | 	if (res) { | ||||||
|  | 		unsigned long flags; | ||||||
|  | 
 | ||||||
|  | 		ql_dbg(ql_dbg_disc, sp->vha, 0xffff, | ||||||
|  | 		    "Async done-%s timed out.\n", | ||||||
|  | 		    sp->name); | ||||||
|  | 		sp->free(sp); | ||||||
|  | 		set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags); | ||||||
|  | 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | ||||||
|  | 		qla2xxx_wake_dpc(vha); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	if (!res) { | 	if (!res) { | ||||||
| 		port_id_t id; | 		port_id_t id; | ||||||
| 		u64 wwn; | 		u64 wwn; | ||||||
|  | @ -4048,6 +4062,7 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res) | ||||||
| 		    "Async done-%s unable to alloc work element\n", | 		    "Async done-%s unable to alloc work element\n", | ||||||
| 		    sp->name); | 		    sp->name); | ||||||
| 		sp->free(sp); | 		sp->free(sp); | ||||||
|  | 		set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags); | ||||||
| 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -681,15 +681,15 @@ qla24xx_async_gnl_sp_done(void *s, int res) | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		id.b.domain = e->port_id[0]; | 		id.b.domain = e->port_id[2]; | ||||||
| 		id.b.area = e->port_id[1]; | 		id.b.area = e->port_id[1]; | ||||||
| 		id.b.al_pa = e->port_id[2]; | 		id.b.al_pa = e->port_id[0]; | ||||||
| 		id.b.rsvd_1 = 0; | 		id.b.rsvd_1 = 0; | ||||||
| 
 | 
 | ||||||
| 		if (!found && wwn && !IS_SW_RESV_ADDR(id)) { | 		if (!found && wwn && !IS_SW_RESV_ADDR(id)) { | ||||||
| 			ql_dbg(ql_dbg_disc, vha, 0x2065, | 			ql_dbg(ql_dbg_disc, vha, 0x2065, | ||||||
| 			    "%s %d %8phC post new sess\n", | 			    "%s %d %8phC %06x post new sess\n", | ||||||
| 			    __func__, __LINE__, (u8 *)&wwn); | 			    __func__, __LINE__, (u8 *)&wwn, id.b24); | ||||||
| 			wwnn = wwn_to_u64(e->node_name); | 			wwnn = wwn_to_u64(e->node_name); | ||||||
| 			qla24xx_post_newsess_work(vha, &id, (u8 *)&wwn, | 			qla24xx_post_newsess_work(vha, &id, (u8 *)&wwn, | ||||||
| 			    (u8 *)&wwnn, NULL, FC4_TYPE_UNKNOWN); | 			    (u8 *)&wwnn, NULL, FC4_TYPE_UNKNOWN); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Quinn Tran
				Quinn Tran