md_jmicron.c (265669) | md_jmicron.c (279878) |
---|---|
1/*- 2 * Copyright (c) 2010 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) 2010 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_jmicron.c 265669 2014-05-08 12:07:40Z mav $"); | 29__FBSDID("$FreeBSD: stable/10/sys/geom/raid/md_jmicron.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> --- 793 unchanged lines hidden (view full) --- 831 uint16_t vendor; 832 833 G_RAID_DEBUG(1, "Tasting JMicron on %s", cp->provider->name); 834 mdi = (struct g_raid_md_jmicron_object *)md; 835 pp = cp->provider; 836 837 /* Read metadata from device. */ 838 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> --- 793 unchanged lines hidden (view full) --- 831 uint16_t vendor; 832 833 G_RAID_DEBUG(1, "Tasting JMicron on %s", cp->provider->name); 834 mdi = (struct g_raid_md_jmicron_object *)md; 835 pp = cp->provider; 836 837 /* Read metadata from device. */ 838 meta = NULL; |
839 vendor = 0xffff; | |
840 g_topology_unlock(); | 839 g_topology_unlock(); |
841 len = 2; | 840 vendor = 0xffff; 841 len = sizeof(vendor); |
842 if (pp->geom->rank == 1) 843 g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); 844 meta = jmicron_meta_read(cp); 845 g_topology_lock(); 846 if (meta == NULL) { 847 if (g_raid_aggressive_spare) { 848 if (vendor == 0x197b) { 849 G_RAID_DEBUG(1, --- 714 unchanged lines hidden --- | 842 if (pp->geom->rank == 1) 843 g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); 844 meta = jmicron_meta_read(cp); 845 g_topology_lock(); 846 if (meta == NULL) { 847 if (g_raid_aggressive_spare) { 848 if (vendor == 0x197b) { 849 G_RAID_DEBUG(1, --- 714 unchanged lines hidden --- |