From owner-svn-src-projects@FreeBSD.ORG Fri Aug 9 09:48:06 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 631257EC; Fri, 9 Aug 2013 09:48:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31DE72B18; Fri, 9 Aug 2013 09:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r799m6Lf062521; Fri, 9 Aug 2013 09:48:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r799m5pg062519; Fri, 9 Aug 2013 09:48:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308090948.r799m5pg062519@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Aug 2013 09:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r254137 - in projects/camlock/sys/cam: ata scsi X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 09:48:06 -0000 Author: mav Date: Fri Aug 9 09:48:05 2013 New Revision: 254137 URL: http://svnweb.freebsd.org/changeset/base/254137 Log: Remove xpt_compile_path() calls form (ata|scsi)_alloc_device(). That makes last lock-irrelevant by the price of that for some time till probe start device will have protocol, etc. set to UNKNOWN, that is hopefully not a problem. Modified: projects/camlock/sys/cam/ata/ata_xpt.c projects/camlock/sys/cam/scsi/scsi_xpt.c Modified: projects/camlock/sys/cam/ata/ata_xpt.c ============================================================================== --- projects/camlock/sys/cam/ata/ata_xpt.c Fri Aug 9 09:34:11 2013 (r254136) +++ projects/camlock/sys/cam/ata/ata_xpt.c Fri Aug 9 09:48:05 2013 (r254137) @@ -249,6 +249,7 @@ proberegister(struct cam_periph *periph, return (status); } CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n")); + ata_device_transport(periph->path); probeschedule(periph); return(CAM_REQ_CMP); } @@ -1553,7 +1554,6 @@ xptscandone(struct cam_periph *periph, u static struct cam_ed * ata_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) { - struct cam_path path; struct ata_quirk_entry *quirk; struct cam_ed *device; @@ -1574,17 +1574,6 @@ ata_alloc_device(struct cam_eb *bus, str device->queue_flags = 0; device->serial_num = NULL; device->serial_num_len = 0; - - if (lun_id != CAM_LUN_WILDCARD) { - xpt_compile_path(&path, - NULL, - bus->path_id, - target->target_id, - lun_id); - ata_device_transport(&path); - xpt_release_path(&path); - } - return (device); } Modified: projects/camlock/sys/cam/scsi/scsi_xpt.c ============================================================================== --- projects/camlock/sys/cam/scsi/scsi_xpt.c Fri Aug 9 09:34:11 2013 (r254136) +++ projects/camlock/sys/cam/scsi/scsi_xpt.c Fri Aug 9 09:48:05 2013 (r254137) @@ -639,6 +639,7 @@ proberegister(struct cam_periph *periph, return (status); } CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n")); + scsi_devise_transport(periph->path); /* * Ensure we've waited at least a bus settle @@ -2289,7 +2290,6 @@ xptscandone(struct cam_periph *periph, u static struct cam_ed * scsi_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) { - struct cam_path path; struct scsi_quirk_entry *quirk; struct cam_ed *device; @@ -2314,17 +2314,6 @@ scsi_alloc_device(struct cam_eb *bus, st device->device_id_len = 0; device->supported_vpds = NULL; device->supported_vpds_len = 0; - - if (lun_id != CAM_LUN_WILDCARD) { - xpt_compile_path(&path, - NULL, - bus->path_id, - target->target_id, - lun_id); - scsi_devise_transport(&path); - xpt_release_path(&path); - } - return (device); }