From owner-p4-projects@FreeBSD.ORG Tue Nov 3 20:19:07 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 68327106568B; Tue, 3 Nov 2009 20:19:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 294651065670 for ; Tue, 3 Nov 2009 20:19:07 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 164548FC0A for ; Tue, 3 Nov 2009 20:19:07 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3KJ60J089656 for ; Tue, 3 Nov 2009 20:19:06 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nA3KJ6WT089654 for perforce@freebsd.org; Tue, 3 Nov 2009 20:19:06 GMT (envelope-from mav@freebsd.org) Date: Tue, 3 Nov 2009 20:19:06 GMT Message-Id: <200911032019.nA3KJ6WT089654@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 170128 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2009 20:19:07 -0000 http://p4web.freebsd.org/chv.cgi?CH=170128 Change 170128 by mav@mav_mavtest on 2009/11/03 20:18:18 Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be periph flag. May be SIM, may be CCB, but now it works fine just without it. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#37 edit .. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#20 edit .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#118 edit .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#51 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#37 (text+ko) ==== @@ -373,7 +373,6 @@ } if (length > 0) { - periph->flags |= CAM_PERIPH_POLLED; xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); ccb.ccb_h.ccb_state = ADA_CCB_DUMP; cam_fill_ataio(&ccb.ataio, @@ -433,7 +432,6 @@ /*timeout*/0, /*getcount_only*/0); } - periph->flags &= ~CAM_PERIPH_POLLED; cam_periph_unlock(periph); return (0); } ==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#20 (text+ko) ==== @@ -117,7 +117,6 @@ #define CAM_PERIPH_INVALID 0x08 #define CAM_PERIPH_NEW_DEV_FOUND 0x10 #define CAM_PERIPH_RECOVERY_INPROG 0x20 -#define CAM_PERIPH_POLLED 0x40 u_int32_t immediate_priority; u_int32_t refcount; SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */ ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#118 (text+ko) ==== @@ -4257,9 +4257,7 @@ links); mtx_unlock(&cam_simq_lock); sim->flags |= CAM_SIM_ON_DONEQ; - if ((done_ccb->ccb_h.path->periph->flags & - CAM_PERIPH_POLLED) == 0) - swi_sched(cambio_ih, 0); + swi_sched(cambio_ih, 0); } break; default: ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#51 (text+ko) ==== @@ -859,7 +859,6 @@ } if (length > 0) { - periph->flags |= CAM_PERIPH_POLLED; xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); csio.ccb_h.ccb_state = DA_CCB_DUMP; scsi_read_write(&csio, @@ -885,7 +884,6 @@ else printf("status == 0x%x, scsi status == 0x%x\n", csio.ccb_h.status, csio.scsi_status); - periph->flags |= CAM_PERIPH_POLLED; return(EIO); } cam_periph_unlock(periph); @@ -929,7 +927,6 @@ } } } - periph->flags &= ~CAM_PERIPH_POLLED; cam_periph_unlock(periph); return (0); }