func: static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb) u32 outbound_write_pointer , doneq_index , index_stripped , toggle ; uint32_t addressLow , ccb_cdb_phy ; int error ; struct MessageUnit_D * pmu ; struct ARCMSR_CDB * arcmsr_cdb ; struct CommandControlBlock * ccb ; pmu = acb -> pmuD; outbound_write_pointer = pmu -> done_qbuffer [ 0 ] . addressLow + 1; doneq_index = pmu -> doneq_index; if ( ( doneq_index & 0xFFF ) != ( outbound_write_pointer & 0xFFF ) )  toggle = doneq_index & 0x4000; index_stripped = ( doneq_index & 0xFFF ) + 1; index_stripped %= ARCMSR_MAX_ARC1214_DONEQUEUE; pmu -> doneq_index = index_stripped ? ( index_stripped | toggle ) : ( ( toggle ^ 0x4000 ) + 1 ); doneq_index = pmu -> doneq_index; addressLow = pmu -> done_qbuffer [ doneq_index & 0xFFF ] . addressLow; ccb_cdb_phy = ( addressLow & 0xFFFFFFF0 ); arcmsr_cdb = ( struct ARCMSR_CDB * ) ( acb -> vir2phy_offset + ccb_cdb_phy ); ccb = container_of ( arcmsr_cdb struct CommandControlBlock , arcmsr_cdb ) error = ( addressLow & ARCMSR_CCBREPLY_FLAG_ERROR_MODE1 ) ? true : false; arcmsr_drain_donequeue ( acb , ccb , error ); while ( ( doneq_index & 0xFFF ) != ( outbound_write_pointer & 0xFFF ) )  static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, struct CommandControlBlock *pCCB, bool error) if ( ( pCCB -> acb != acb ) || ( pCCB -> startdone != ARCMSR_CCB_START ) )  if ( pCCB -> startdone == ARCMSR_CCB_ABORTED )  printk ( KERN_NOTICE "arcmsr%d: isr get an illegal ccb command \\n\t\t\t\tdone acb = '0x%p'" arcmsr_report_ccb_state ( acb , pCCB , 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 )  int sense_data_length = sizeof ( struct SENSE_DATA ) < SCSI_SENSE_BUFFERSIZE ? sizeof ( struct SENSE_DATA ) : SCSI_SENSE_BUFFERSIZE ; memset ( sensebuffer , 0 , SCSI_SENSE_BUFFERSIZE ); memcpy ( sensebuffer , ccb -> arcmsr_cdb . SenseData , sense_data_length ); sensebuffer -> ErrorCode = SCSI_SENSE_CURRENT_ERRORS; sensebuffer -> Valid = 1; 