Cleanup foo_match().
+ Remove check for model. + Remove unnecessary null line.
This commit is contained in:
parent
bb67784ce9
commit
049fc26168
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gtidmac.c,v 1.5 2010/07/20 11:47:59 kiyohara Exp $ */
|
||||
/* $NetBSD: gtidmac.c,v 1.6 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.5 2010/07/20 11:47:59 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.6 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
@ -285,10 +285,6 @@ gtidmac_match(device_t parent, struct cfdata *match, void *aux)
|
||||
|
||||
if (strcmp(mva->mva_name, match->cf_name) != 0)
|
||||
return 0;
|
||||
|
||||
if (mva->mva_model == MARVELL_ORION_1_88F6082)
|
||||
return 0;
|
||||
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
|
||||
mva->mva_irq == MVA_IRQ_DEFAULT)
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gtmpsc.c,v 1.39 2010/07/11 08:43:36 kiyohara Exp $ */
|
||||
/* $NetBSD: gtmpsc.c,v 1.40 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2009 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.39 2010/07/11 08:43:36 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.40 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
@ -216,21 +216,7 @@ gtmpscmatch(device_t parent, cfdata_t match, void *aux)
|
||||
|
||||
if (strcmp(mva->mva_name, match->cf_name) != 0)
|
||||
return 0;
|
||||
|
||||
switch (mva->mva_model) {
|
||||
case MARVELL_DISCOVERY:
|
||||
case MARVELL_DISCOVERY_II:
|
||||
case MARVELL_DISCOVERY_III:
|
||||
#if 0
|
||||
case MARVELL_DISCOVERY_LT:
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
|
||||
mva->mva_irq == MVA_IRQ_DEFAULT)
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT)
|
||||
return 0;
|
||||
|
||||
mva->mva_size = GTMPSC_SIZE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gtpci.c,v 1.26 2010/07/11 08:43:36 kiyohara Exp $ */
|
||||
/* $NetBSD: gtpci.c,v 1.27 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008, 2009 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.26 2010/07/11 08:43:36 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.27 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
#include "pci.h"
|
||||
@ -90,6 +90,8 @@ gtpci_match(device_t parent, struct cfdata *match, void *aux)
|
||||
if (strcmp(mva->mva_name, match->cf_name) != 0)
|
||||
return 0;
|
||||
|
||||
if (mva->mva_unit == MVA_UNIT_DEFAULT)
|
||||
return 0;
|
||||
switch (mva->mva_model) {
|
||||
case MARVELL_DISCOVERY:
|
||||
case MARVELL_DISCOVERY_II:
|
||||
@ -99,23 +101,8 @@ gtpci_match(device_t parent, struct cfdata *match, void *aux)
|
||||
case MARVELL_DISCOVERY_V:
|
||||
case MARVELL_DISCOVERY_VI:
|
||||
#endif
|
||||
if (mva->mva_unit == MVA_UNIT_DEFAULT ||
|
||||
mva->mva_offset != MVA_OFFSET_DEFAULT)
|
||||
if (mva->mva_offset != MVA_OFFSET_DEFAULT)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case MARVELL_ORION_1_88F5180N:
|
||||
case MARVELL_ORION_1_88F5181:
|
||||
case MARVELL_ORION_1_88F5182:
|
||||
case MARVELL_ORION_2_88F5281:
|
||||
case MARVELL_ORION_1_88W8660:
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT)
|
||||
return 0;
|
||||
mva->mva_unit = 0; /* unit 0 only */
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
mva->mva_size = GTPCI_SIZE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gttwsi.c,v 1.2 2010/07/11 08:43:36 kiyohara Exp $ */
|
||||
/* $NetBSD: gttwsi.c,v 1.3 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 Eiji Kawauchi.
|
||||
* All rights reserved.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gttwsi.c,v 1.2 2010/07/11 08:43:36 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gttwsi.c,v 1.3 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
#include "locators.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -157,7 +157,6 @@ gttwsi_match(device_t parent, cfdata_t match, void *aux)
|
||||
|
||||
if (strcmp(mva->mva_name, match->cf_name) != 0)
|
||||
return 0;
|
||||
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
|
||||
mva->mva_irq == MVA_IRQ_DEFAULT)
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_gfe.c,v 1.37 2010/07/11 08:43:36 kiyohara Exp $ */
|
||||
/* $NetBSD: if_gfe.c,v 1.38 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.37 2010/07/11 08:43:36 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.38 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "rnd.h"
|
||||
@ -218,14 +218,6 @@ gfec_match(device_t parent, cfdata_t cf, void *aux)
|
||||
|
||||
if (strcmp(mva->mva_name, cf->cf_name) != 0)
|
||||
return 0;
|
||||
|
||||
switch (mva->mva_model) {
|
||||
case MARVELL_DISCOVERY:
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT)
|
||||
return 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mvpex.c,v 1.1 2010/07/13 11:16:02 kiyohara Exp $ */
|
||||
/* $NetBSD: mvpex.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.1 2010/07/13 11:16:02 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
#include "pci.h"
|
||||
@ -87,25 +87,8 @@ mvpex_match(device_t parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct marvell_attach_args *mva = aux;
|
||||
|
||||
switch (mva->mva_model) {
|
||||
#if 0
|
||||
case MARVELL_DISCOVERY_V:
|
||||
case MARVELL_DISCOVERY_VI:
|
||||
#endif
|
||||
case MARVELL_ORION_1_88F1181:
|
||||
case MARVELL_ORION_1_88F5082:
|
||||
case MARVELL_ORION_1_88F5180N:
|
||||
case MARVELL_ORION_1_88F5181:
|
||||
case MARVELL_ORION_1_88F5182:
|
||||
case MARVELL_ORION_1_88F6082:
|
||||
case MARVELL_ORION_1_88W8660:
|
||||
case MARVELL_ORION_2_88F1281:
|
||||
case MARVELL_ORION_2_88F5281:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (strcmp(mva->mva_name, match->cf_name) != 0)
|
||||
return 0;
|
||||
}
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
|
||||
mva->mva_irq == MVA_IRQ_DEFAULT)
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mvsata_mv.c,v 1.1 2010/07/13 13:05:05 kiyohara Exp $ */
|
||||
/* $NetBSD: mvsata_mv.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mvsata_mv.c,v 1.1 2010/07/13 13:05:05 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mvsata_mv.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
@ -90,19 +90,16 @@ struct mvsata_product mvsata_products[] = {
|
||||
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F5182, 1, 2, gen2e, 0 },
|
||||
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6082, 1, 1, gen2e, 0 },
|
||||
|
||||
#if 0
|
||||
/* Kirkwood */
|
||||
/* 88F6190 has a port */
|
||||
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6192, 1, 2, gen2e, 0 },
|
||||
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6281, 1, 2, gen2e, 0 },
|
||||
|
||||
#if 0
|
||||
/* Discovery Inovation */
|
||||
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78200, 1, 2, gen2e, 0 },
|
||||
/* MV76100 has a port */
|
||||
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78100, 1, 2, gen2e, 0 },
|
||||
#endif
|
||||
|
||||
{ -1, -1, 0, 0, gen_unknown, 0 }
|
||||
};
|
||||
|
||||
|
||||
@ -113,6 +110,8 @@ mvsatahc_match(device_t parent, cfdata_t match, void *aux)
|
||||
struct marvell_attach_args *mva = aux;
|
||||
int i;
|
||||
|
||||
if (strcmp(mva->mva_name, match->cf_name) != 0)
|
||||
return 0;
|
||||
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
|
||||
mva->mva_irq == MVA_IRQ_DEFAULT)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user