scsi_da.c (298431) | scsi_da.c (298649) |
---|---|
1/*- 2 * Implementation of SCSI Direct Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1997 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Implementation of SCSI Direct Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1997 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 298431 2016-04-21 19:40:10Z pfg $"); | 30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 298649 2016-04-26 15:38:17Z pfg $"); |
31 32#include <sys/param.h> 33 34#ifdef _KERNEL 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/bio.h> 38#include <sys/sysctl.h> --- 2824 unchanged lines hidden (view full) --- 2863 break; 2864 if (bp1->bio_bcount / softc->params.secsize > 2865 (softc->trim_max_ranges - ranges) * ATA_DSM_RANGE_MAX) { 2866 cam_iosched_put_back_trim(softc->cam_iosched, bp1); 2867 break; 2868 } 2869 } while (1); 2870 | 31 32#include <sys/param.h> 33 34#ifdef _KERNEL 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/bio.h> 38#include <sys/sysctl.h> --- 2824 unchanged lines hidden (view full) --- 2863 break; 2864 if (bp1->bio_bcount / softc->params.secsize > 2865 (softc->trim_max_ranges - ranges) * ATA_DSM_RANGE_MAX) { 2866 cam_iosched_put_back_trim(softc->cam_iosched, bp1); 2867 break; 2868 } 2869 } while (1); 2870 |
2871 block_count = (ranges + ATA_DSM_BLK_RANGES - 1) / ATA_DSM_BLK_RANGES; | 2871 block_count = howmany(ranges, ATA_DSM_BLK_RANGES); |
2872 scsi_ata_trim(&ccb->csio, 2873 /*retries*/da_retry_count, 2874 /*cbfcnp*/dadone, 2875 /*tag_action*/MSG_SIMPLE_Q_TAG, 2876 block_count, 2877 /*data_ptr*/buf, 2878 /*dxfer_len*/block_count * ATA_DSM_BLK_SIZE, 2879 /*sense_len*/SSD_FULL_SIZE, --- 1285 unchanged lines hidden --- | 2872 scsi_ata_trim(&ccb->csio, 2873 /*retries*/da_retry_count, 2874 /*cbfcnp*/dadone, 2875 /*tag_action*/MSG_SIMPLE_Q_TAG, 2876 block_count, 2877 /*data_ptr*/buf, 2878 /*dxfer_len*/block_count * ATA_DSM_BLK_SIZE, 2879 /*sense_len*/SSD_FULL_SIZE, --- 1285 unchanged lines hidden --- |