• [PATCH] qla2xxx: cleanup DMA mappings... · 83021920
    提交于
      Don't use cmd->request->nr_hw_segments as it may not be initialized
      (SG_IO in particular bypasses anything that initializes this and just
      uses scsi_do_req to insert a scsi_request directly on the head of the
      queue) and a bogus value here can trip up the checks to make sure that
      the number of segments will fit in the queue ring buffer, resulting in
      commands that are never completed.
    
      Fix up several issues with PCI DMA mapping and failure to check return
      values on the mappings.
    
      Make the check for space in the ring buffer happen after the DMA mapping
      is done since any checks done before the mapping has taken place are
      bogus.
    
      Doug Ledford <dledford@redhat.com>.
    Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
    Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
    83021920
qla_iocb.c 15.0 KB