func: static int arcmsr_polling_ccbdone(struct AdapterControlBlock struct CommandControlBlock *poll_ccb) switch ( acb -> adapter_type )  rtn = arcmsr_hbaA_polling_ccbdone ( acb , poll_ccb ); static int arcmsr_hbaA_polling_ccbdone(struct AdapterControlBlock struct CommandControlBlock *poll_ccb) struct MessageUnit_A __iomem * reg = acb -> pmuA ; struct CommandControlBlock * ccb ; struct ARCMSR_CDB * arcmsr_cdb ; uint32_t flag_ccb , outbound_intstatus , poll_ccb_done = 0 , poll_count = 0 ; bool error ; poll_count ++; while ( 1 )  if ( ( flag_ccb = readl ( & reg -> outbound_queueport ) ) == 0xFFFFFFFF )  if ( poll_ccb_done )  if ( poll_count > 100 )  arcmsr_cdb = ( struct ARCMSR_CDB * ) ( acb -> vir2phy_offset + ( flag_ccb << 5 ) ); ccb = container_of ( arcmsr_cdb , struct CommandControlBlock , arcmsr_cdb ) poll_ccb_done |= ( ccb == poll_ccb ) ? 1 : 0; if ( ( ccb -> acb != acb ) || ( ccb -> startdone != ARCMSR_CCB_START ) )  error = ( flag_ccb & ARCMSR_CCBREPLY_FLAG_ERROR_MODE0 ) ? true : false; arcmsr_report_ccb_state ( acb , ccb , error ); static void arcmsr_report_ccb_state(struct AdapterControlBlock struct CommandControlBlock *ccb, bool error) if ( ! error )  switch ( ccb -> arcmsr_cdb . DeviceStatus )  ccb -> pcmd -> result = DID_BAD_TARGET << 16; arcmsr_report_sense_info ( ccb ); static void arcmsr_report_sense_info(struct CommandControlBlock *ccb) struct scsi_cmnd * pcmd = ccb -> pcmd ; struct SENSE_DATA * sensebuffer = ( struct SENSE_DATA * ) pcmd -> sense_buffer ; if ( sensebuffer )  memset ( sensebuffer , 0 , SCSI_SENSE_BUFFERSIZE ); memcpy ( sensebuffer , ccb -> arcmsr_cdb . SenseData , sense_data_length ); sensebuffer -> ErrorCode = SCSI_SENSE_CURRENT_ERRORS; sensebuffer -> Valid = 1; 