From owner-svn-src-all@FreeBSD.ORG Sun Aug 30 16:31:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A578D106566C; Sun, 30 Aug 2009 16:31:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93D638FC0C; Sun, 30 Aug 2009 16:31:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7UGVPlN099996; Sun, 30 Aug 2009 16:31:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UGVPHr099990; Sun, 30 Aug 2009 16:31:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301631.n7UGVPHr099990@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 16:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196659 - in head: sbin/camcontrol sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 16:31:25 -0000 Author: mav Date: Sun Aug 30 16:31:25 2009 New Revision: 196659 URL: http://svn.freebsd.org/changeset/base/196659 Log: Short ATA command format has 28bit address, not 36bit. Rename ata_36bit_cmd() into ata_28bit_cmd(), while it didn't become legacy. MFC after: 2 days Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_all.h head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sbin/camcontrol/camcontrol.c Sun Aug 30 16:31:25 2009 (r196659) @@ -1212,9 +1212,9 @@ ataidentify(struct cam_device *device, i /*dxfer_len*/sizeof(struct ata_params), timeout ? timeout : 30 * 1000); if (cgd.protocol == PROTO_ATA) - ata_36bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); else - ata_36bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); /* Disable freezing the device queue */ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_all.c Sun Aug 30 16:31:25 2009 (r196659) @@ -91,7 +91,7 @@ ata_print_ident(struct ata_params *ident } void -ata_36bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, +ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, uint32_t lba, uint8_t sector_count) { bzero(&ataio->cmd, sizeof(ataio->cmd)); Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_all.h Sun Aug 30 16:31:25 2009 (r196659) @@ -83,7 +83,7 @@ struct ata_res { int ata_version(int ver); void ata_print_ident(struct ata_params *ident_data); -void ata_36bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, +void ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, uint32_t lba, uint8_t sector_count); void ata_48bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint16_t features, uint64_t lba, uint16_t sector_count); Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_da.c Sun Aug 30 16:31:25 2009 (r196659) @@ -287,7 +287,7 @@ adaclose(struct disk *dp) if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0, /*sense_flags*/SF_RETRY_UA, softc->disk->d_devstat); @@ -411,7 +411,7 @@ adadump(void *arg, void *virtual, vm_off ata_48bit_cmd(&ccb.ataio, ATA_WRITE_DMA48, 0, lba, count); } else { - ata_36bit_cmd(&ccb.ataio, ATA_WRITE_DMA, + ata_28bit_cmd(&ccb.ataio, ATA_WRITE_DMA, 0, lba, count); } xpt_polled_action(&ccb); @@ -441,7 +441,7 @@ adadump(void *arg, void *virtual, vm_off if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); xpt_polled_action(&ccb); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) @@ -856,10 +856,10 @@ adastart(struct cam_periph *periph, unio } } else { if (bp->bio_cmd == BIO_READ) { - ata_36bit_cmd(ataio, ATA_READ_DMA, + ata_28bit_cmd(ataio, ATA_READ_DMA, 0, lba, count); } else { - ata_36bit_cmd(ataio, ATA_WRITE_DMA, + ata_28bit_cmd(ataio, ATA_WRITE_DMA, 0, lba, count); } } @@ -878,7 +878,7 @@ adastart(struct cam_periph *periph, unio if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); break; } start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO; @@ -1126,7 +1126,7 @@ adashutdown(void * arg, int howto) if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); xpt_polled_action(&ccb); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_xpt.c Sun Aug 30 16:31:25 2009 (r196659) @@ -357,9 +357,9 @@ probestart(struct cam_periph *periph, un /*dxfer_len*/sizeof(struct ata_params), 30 * 1000); if (periph->path->device->protocol == PROTO_ATA) - ata_36bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); else - ata_36bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); break; } case PROBE_SETMODE: @@ -375,7 +375,7 @@ probestart(struct cam_periph *periph, un /*data_ptr*/NULL, /*dxfer_len*/0, 30 * 1000); - ata_36bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, + ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, ata_max_mode(ident_buf, ATA_UDMA6, ATA_UDMA6)); break; }