md_sii.c (275926) | md_sii.c (279878) |
---|---|
1/*- 2 * Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org> 3 * Copyright (c) 2000 - 2008 S��ren Schmidt <sos@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org> 3 * Copyright (c) 2000 - 2008 S��ren Schmidt <sos@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/10/sys/geom/raid/md_sii.c 275926 2014-12-19 01:13:41Z mav $"); | 29__FBSDID("$FreeBSD: stable/10/sys/geom/raid/md_sii.c 279878 2015-03-11 09:50:31Z mav $"); |
30 31#include <sys/param.h> 32#include <sys/bio.h> 33#include <sys/endian.h> 34#include <sys/kernel.h> 35#include <sys/kobj.h> 36#include <sys/limits.h> 37#include <sys/lock.h> --- 880 unchanged lines hidden (view full) --- 918 uint16_t vendor; 919 920 G_RAID_DEBUG(1, "Tasting SiI on %s", cp->provider->name); 921 mdi = (struct g_raid_md_sii_object *)md; 922 pp = cp->provider; 923 924 /* Read metadata from device. */ 925 meta = NULL; | 30 31#include <sys/param.h> 32#include <sys/bio.h> 33#include <sys/endian.h> 34#include <sys/kernel.h> 35#include <sys/kobj.h> 36#include <sys/limits.h> 37#include <sys/lock.h> --- 880 unchanged lines hidden (view full) --- 918 uint16_t vendor; 919 920 G_RAID_DEBUG(1, "Tasting SiI on %s", cp->provider->name); 921 mdi = (struct g_raid_md_sii_object *)md; 922 pp = cp->provider; 923 924 /* Read metadata from device. */ 925 meta = NULL; |
926 vendor = 0xffff; | |
927 g_topology_unlock(); | 926 g_topology_unlock(); |
928 len = 2; | 927 vendor = 0xffff; 928 len = sizeof(vendor); |
929 if (pp->geom->rank == 1) 930 g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); 931 meta = sii_meta_read(cp); 932 g_topology_lock(); 933 if (meta == NULL) { 934 if (g_raid_aggressive_spare) { 935 if (vendor == 0x1095) { 936 G_RAID_DEBUG(1, --- 735 unchanged lines hidden --- | 929 if (pp->geom->rank == 1) 930 g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); 931 meta = sii_meta_read(cp); 932 g_topology_lock(); 933 if (meta == NULL) { 934 if (g_raid_aggressive_spare) { 935 if (vendor == 0x1095) { 936 G_RAID_DEBUG(1, --- 735 unchanged lines hidden --- |