From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 10:42:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3612FCB9; Tue, 6 Aug 2013 10:42:19 +0000 (UTC) (envelope-from trasz@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 235B32657; Tue, 6 Aug 2013 10:42:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r76AgJm7056403; Tue, 6 Aug 2013 10:42:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r76AgI7v056400; Tue, 6 Aug 2013 10:42:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201308061042.r76AgI7v056400@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 6 Aug 2013 10:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253987 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 10:42:19 -0000 Author: trasz Date: Tue Aug 6 10:42:18 2013 New Revision: 253987 URL: http://svnweb.freebsd.org/changeset/base/253987 Log: Remove dead code. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend_internal.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Aug 6 10:35:05 2013 (r253986) +++ head/sys/cam/ctl/ctl.c Tue Aug 6 10:42:18 2013 (r253987) @@ -8941,17 +8941,7 @@ ctl_inquiry_evpd_supported(struct ctl_sc sup_page_size = sizeof(struct scsi_vpd_supported_pages) + SCSI_EVPD_NUM_SUPPORTED_PAGES; - /* - * XXX KDM GFP_??? We probably don't want to wait here, - * unless we end up having a process/thread context. - */ ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK | M_ZERO); - if (ctsio->kern_data_ptr == NULL) { - ctsio->io_hdr.status = CTL_SCSI_ERROR; - ctsio->scsi_status = SCSI_STATUS_BUSY; - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; @@ -9006,14 +8996,7 @@ ctl_inquiry_evpd_serial(struct ctl_scsii lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - /* XXX KDM which malloc flags here?? */ ctsio->kern_data_ptr = malloc(sizeof(*sn_ptr), M_CTL, M_WAITOK | M_ZERO); - if (ctsio->kern_data_ptr == NULL) { - ctsio->io_hdr.status = CTL_SCSI_ERROR; - ctsio->scsi_status = SCSI_STATUS_BUSY; - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; @@ -9098,14 +9081,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio sizeof(struct scsi_vpd_id_descriptor) + sizeof(struct scsi_vpd_id_trgt_port_grp_id); - /* XXX KDM which malloc flags here ?? */ ctsio->kern_data_ptr = malloc(devid_len, M_CTL, M_WAITOK | M_ZERO); - if (ctsio->kern_data_ptr == NULL) { - ctsio->io_hdr.status = CTL_SCSI_ERROR; - ctsio->scsi_status = SCSI_STATUS_BUSY; - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; @@ -9328,14 +9304,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio * in. If the user only asks for less, we'll give him * that much. */ - /* XXX KDM what malloc flags should we use here?? */ ctsio->kern_data_ptr = malloc(sizeof(*inq_ptr), M_CTL, M_WAITOK | M_ZERO); - if (ctsio->kern_data_ptr == NULL) { - ctsio->io_hdr.status = CTL_SCSI_ERROR; - ctsio->scsi_status = SCSI_STATUS_BUSY; - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; ctsio->kern_data_resid = 0; Modified: head/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_internal.c Tue Aug 6 10:35:05 2013 (r253986) +++ head/sys/cam/ctl/ctl_frontend_internal.c Tue Aug 6 10:42:18 2013 (r253987) @@ -490,9 +490,6 @@ cfi_lun_disable(void *arg, struct ctl_id return (0); } -/* - * XXX KDM run this inside a thread, or inside the caller's context? - */ static void cfi_datamove(union ctl_io *io) { @@ -532,18 +529,8 @@ cfi_datamove(union ctl_io *io) ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist); - /* - * XXX KDM GFP_KERNEL, don't know what the caller's context - * is. Need to figure that out. - */ ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL_CFI, M_WAITOK); - if (ext_sglist == NULL) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); - return; - } ext_sglist_malloced = 1; if (memcpy(ext_sglist, ctsio->ext_data_ptr, ext_sglen) != 0) { ctl_set_internal_failure(ctsio,