1/*- 2 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/cam/ata/ata_da.c 219056 2011-02-26 14:58:54Z nwhitehorn $"); |
29 30#include <sys/param.h> 31 32#ifdef _KERNEL 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/bio.h> 36#include <sys/sysctl.h> --- 704 unchanged lines hidden (view full) --- 741 if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) 742 softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; 743 if ((softc->flags & ADA_FLAG_CAN_TRIM) || 744 ((softc->flags & ADA_FLAG_CAN_CFA) && 745 !(softc->flags & ADA_FLAG_CAN_48BIT))) 746 softc->disk->d_flags |= DISKFLAG_CANDELETE; 747 strlcpy(softc->disk->d_ident, cgd->serial_num, 748 MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); |
749 strlcpy(softc->disk->d_descr, cgd->ident_data.model, 750 MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model))); |
751 softc->disk->d_hba_vendor = cpi.hba_vendor; 752 softc->disk->d_hba_device = cpi.hba_device; 753 softc->disk->d_hba_subvendor = cpi.hba_subvendor; 754 softc->disk->d_hba_subdevice = cpi.hba_subdevice; 755 756 softc->disk->d_sectorsize = softc->params.secsize; 757 softc->disk->d_mediasize = (off_t)softc->params.sectors * 758 softc->params.secsize; --- 538 unchanged lines hidden --- |