From owner-freebsd-scsi@FreeBSD.ORG Thu Nov 6 23:38:08 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B24DF2C6 for ; Thu, 6 Nov 2014 23:38:08 +0000 (UTC) Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23704EF7 for ; Thu, 6 Nov 2014 23:38:07 +0000 (UTC) Received: from mail-wi0-f170.google.com ([209.85.212.170]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKVFwGWfhwgdGR5ybiod6qTyOc1VRXnKuK@postini.com; Thu, 06 Nov 2014 15:38:08 PST Received: by mail-wi0-f170.google.com with SMTP id r20so2925084wiv.3 for ; Thu, 06 Nov 2014 15:38:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:content-type; bh=0F9jQMQ047y35xDItcwV83567lsth40VUWH2x7jAKFc=; b=Kd45cValekmGBHTvbUt+hbWFJTo5eWF0RO81UKG/ZelP4V80XLlt+yCHXizVZs+paM 3Svd4gtpBYxAcVG3Frvb4K5oD6t8MyNOBTDne3SyZoKc1HPaHlbJ6hwlglz6C7oadMUc 4YQ39lhg5TmpXCDCS9YRW6YrutiUuMpS/yX8FLkBnZR0VmRe6y/eeKqf5vKK5A6vt6od RecZqoffTCrwQMJ5n5GDHlABy82uSsXbyj7mh2Qc8Gjuod9NM81K60px0bu+LeS5rlIj LHoTEHxpXt7aVtb6yieyXsK4DFB6VazSh6P6AURIIMTI4v6jcWdfTfextQfKeFUM8/nS z+bg== X-Gm-Message-State: ALoCoQnj3wRqkZoGOQJeAWi+Zzz/IMjMF0s3TB5Tg0G8EZqeG88rorHWE0li8vygTOdyteJRtqCcjOx9F4fAuyPPFsLJFr9doji0bXjffMbCfNRKET5UuFOQ+QtBPR3LeJy0IptLd/tUTXvQHQJYNQGgPAR3hxJy4g== X-Received: by 10.180.93.37 with SMTP id cr5mr19339159wib.76.1415317080462; Thu, 06 Nov 2014 15:38:00 -0800 (PST) X-Received: by 10.180.93.37 with SMTP id cr5mr19339151wib.76.1415317080342; Thu, 06 Nov 2014 15:38:00 -0800 (PST) From: Sibananda Sahu MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac/6GrIKbgSmFCvSRleA0P5ea1lcxQ== Date: Fri, 7 Nov 2014 05:07:59 +0530 Message-ID: Subject: Query regarding Unmapped IO, PIM_UNMAPPED and bus_dmamap_load_ccb() To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2014 23:38:08 -0000 Hi All, I have raised this query regarding the following mail: https://lists.freebsd.org/pipermail/freebsd-scsi/2014-July/006407.html Where Alexander Motin talks of Unmapped I/O. As per his direction I have declared the below statement in my driver code: ccb->cpi.hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; Before enabling PIM_UNMAPPED I was getting the (ccb->ccb_h.flags & CAM_DATA_MASK) as CAM_DATA_VADDR and handling accordingly. But after enabling PIM_UNMAPPED in cpi.hba_misc I am getting the (ccb->ccb_h.flags & CAM_DATA_MASK) as CAM_DATA_BIO and handling the data that comes with bus_dma_load_ccb(). I just did the same thing according to the mps(4) driver as referred by Alexander Motin. So I just wanted to know what exactly happening when I am enabling the PIM_UNMAPPED in the cpi.hba_misc field. And what the CAM_DATA_BIO really means in the CAM_DATA_MASK. It would be great idea if somebody explains what exactly happening or at least give me some references where can I have a look and move forward. Thanks, Sibananda Sahu