mirror of https://github.com/ipxe/ipxe.git
Automatically updated using
perl -pi -0777 -e 's/_probe\s*\(\s*struct dev \*dev,\s*struct pci_device \*(\w+?)\s*\)\s*{(\s*)struct nic \*nic.*?$/_probe ( struct dev *dev ) {\n${2}struct nic *nic = nic_device ( dev );\n${2}struct pci_device *$1 = pci_device ( dev );/ms' *.cpull/1/head
parent
35e6f3e58a
commit
bd9ae7cc70
|
@ -467,9 +467,11 @@ static void t595_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
ETH_PROBE - Look for an adapter
|
ETH_PROBE - Look for an adapter
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int t595_probe(struct dev *dev, struct pci_device *pci)
|
static int t595_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i;
|
int i;
|
||||||
unsigned short *p;
|
unsigned short *p;
|
||||||
|
|
||||||
|
|
|
@ -688,9 +688,11 @@ static void a3c90x_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
*** initialization. If this routine is called, the pci functions did find the
|
*** initialization. If this routine is called, the pci functions did find the
|
||||||
*** card. We just have to init it here.
|
*** card. We just have to init it here.
|
||||||
***/
|
***/
|
||||||
static int a3c90x_probe(struct dev *dev, struct pci_device *pci)
|
static int a3c90x_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i, c;
|
int i, c;
|
||||||
unsigned short eeprom[0x21];
|
unsigned short eeprom[0x21];
|
||||||
unsigned int cfg;
|
unsigned int cfg;
|
||||||
|
|
|
@ -654,9 +654,11 @@ static void davicom_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* eth_probe - Look for an adapter */
|
/* eth_probe - Look for an adapter */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
static int davicom_probe(struct dev *dev, struct pci_device *pci)
|
static int davicom_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
whereami("davicom_probe\n");
|
whereami("davicom_probe\n");
|
||||||
|
|
|
@ -461,9 +461,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
|
|
||||||
#define board_found 1
|
#define board_found 1
|
||||||
#define valid_link 0
|
#define valid_link 0
|
||||||
static int dmfe_probe(struct dev *dev, struct pci_device *pci)
|
static int dmfe_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
uint32_t dev_rev, pci_pmr;
|
uint32_t dev_rev, pci_pmr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -3580,9 +3580,11 @@ static void e1000_irq(struct nic *nic __unused, irq_action_t action)
|
||||||
PROBE - Look for an adapter, this routine's visible to the outside
|
PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
You should omit the last argument struct pci_device * for a non-PCI NIC
|
You should omit the last argument struct pci_device * for a non-PCI NIC
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int e1000_probe(struct dev *dev, struct pci_device *p)
|
static int e1000_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *p = pci_device ( dev );
|
||||||
unsigned long mmio_start, mmio_len;
|
unsigned long mmio_start, mmio_len;
|
||||||
int ret_val, i;
|
int ret_val, i;
|
||||||
|
|
||||||
|
|
|
@ -601,9 +601,11 @@ static void eepro100_disable(struct dev *dev __unused)
|
||||||
* leaves the 82557 initialized, and ready to recieve packets.
|
* leaves the 82557 initialized, and ready to recieve packets.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int eepro100_probe(struct dev *dev, struct pci_device *p)
|
static int eepro100_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *p = pci_device ( dev );
|
||||||
unsigned short sum = 0;
|
unsigned short sum = 0;
|
||||||
int i;
|
int i;
|
||||||
int read_cmd, ee_size;
|
int read_cmd, ee_size;
|
||||||
|
|
|
@ -95,9 +95,11 @@ static unsigned char tx_packet[PKT_BUF_SZ * TX_RING_SIZE];
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
epic100_probe(struct dev *dev, struct pci_device *pci)
|
epic100_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i;
|
int i;
|
||||||
unsigned short* ap;
|
unsigned short* ap;
|
||||||
unsigned int phy, phy_idx;
|
unsigned int phy, phy_idx;
|
||||||
|
|
|
@ -925,9 +925,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
#define IORESOURCE_MEM 0x00000200
|
#define IORESOURCE_MEM 0x00000200
|
||||||
#define board_found 1
|
#define board_found 1
|
||||||
#define valid_link 0
|
#define valid_link 0
|
||||||
static int forcedeth_probe(struct dev *dev, struct pci_device *pci)
|
static int forcedeth_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
int sz;
|
int sz;
|
||||||
u8 *base;
|
u8 *base;
|
||||||
|
|
|
@ -663,9 +663,11 @@ static void mtd_disable(struct dev *dev)
|
||||||
PROBE - Look for an adapter, this routine's visible to the outside
|
PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static int mtd_probe(struct dev *dev, struct pci_device *pci)
|
static int mtd_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (pci->ioaddr == 0)
|
if (pci->ioaddr == 0)
|
||||||
|
|
|
@ -240,9 +240,11 @@ static void natsemi_irq(struct nic *nic, irq_action_t action);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
natsemi_probe(struct dev *dev, struct pci_device *pci)
|
natsemi_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i;
|
int i;
|
||||||
int prev_eedata;
|
int prev_eedata;
|
||||||
u32 tmp;
|
u32 tmp;
|
||||||
|
|
|
@ -811,9 +811,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
|
|
||||||
#define board_found 1
|
#define board_found 1
|
||||||
#define valid_link 0
|
#define valid_link 0
|
||||||
static int ns83820_probe(struct dev *dev, struct pci_device *pci)
|
static int ns83820_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int sz;
|
int sz;
|
||||||
long addr;
|
long addr;
|
||||||
int using_dac = 0;
|
int using_dac = 0;
|
||||||
|
|
|
@ -665,9 +665,11 @@ static void pcnet32_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
PROBE - Look for an adapter, this routine's visible to the outside
|
PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
You should omit the last argument struct pci_device * for a non-PCI NIC
|
You should omit the last argument struct pci_device * for a non-PCI NIC
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int pcnet32_probe(struct dev *dev, struct pci_device *pci)
|
static int pcnet32_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i, media;
|
int i, media;
|
||||||
int fdx, mii, fset, dxsuflo, ltint;
|
int fdx, mii, fset, dxsuflo, ltint;
|
||||||
int chip_version;
|
int chip_version;
|
||||||
|
|
|
@ -709,9 +709,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
|
|
||||||
#define board_found 1
|
#define board_found 1
|
||||||
#define valid_link 0
|
#define valid_link 0
|
||||||
static int r8169_probe(struct dev *dev, struct pci_device *pci)
|
static int r8169_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
static int board_idx = -1;
|
static int board_idx = -1;
|
||||||
static int printed_version = 0;
|
static int printed_version = 0;
|
||||||
int i, rc;
|
int i, rc;
|
||||||
|
|
|
@ -182,9 +182,11 @@ static void rtl_disable(struct dev *);
|
||||||
static void rtl_irq(struct nic *nic, irq_action_t action);
|
static void rtl_irq(struct nic *nic, irq_action_t action);
|
||||||
|
|
||||||
|
|
||||||
static int rtl8139_probe(struct dev *dev, struct pci_device *pci)
|
static int rtl8139_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i;
|
int i;
|
||||||
int speed10, fullduplex;
|
int speed10, fullduplex;
|
||||||
int addr_len;
|
int addr_len;
|
||||||
|
|
|
@ -307,9 +307,11 @@ static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic
|
||||||
* Returns: struct nic *: pointer to NIC data structure
|
* Returns: struct nic *: pointer to NIC data structure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int sis900_probe(struct dev *dev, struct pci_device *pci)
|
static int sis900_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
int i;
|
int i;
|
||||||
int found=0;
|
int found=0;
|
||||||
int phy_addr;
|
int phy_addr;
|
||||||
|
|
|
@ -134,9 +134,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
|
|
||||||
#define board_found 1
|
#define board_found 1
|
||||||
#define valid_link 0
|
#define valid_link 0
|
||||||
static int skel_probe(struct dev *dev, struct pci_device *pci)
|
static int skel_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
|
|
||||||
if (board_found && valid_link)
|
if (board_found && valid_link)
|
||||||
{
|
{
|
||||||
|
|
|
@ -577,9 +577,11 @@ static void sundance_disable(struct dev *dev __unused)
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
PROBE - Look for an adapter, this routine's visible to the outside
|
PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int sundance_probe(struct dev *dev, struct pci_device *pci)
|
static int sundance_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
u8 ee_data[EEPROM_SIZE];
|
u8 ee_data[EEPROM_SIZE];
|
||||||
u16 mii_ctl;
|
u16 mii_ctl;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -3224,9 +3224,11 @@ static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
PROBE - Look for an adapter, this routine's visible to the outside
|
PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
You should omit the last argument struct pci_device * for a non-PCI NIC
|
You should omit the last argument struct pci_device * for a non-PCI NIC
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int tg3_probe(struct dev *dev, struct pci_device *pdev)
|
static int tg3_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pdev = pci_device ( dev );
|
||||||
struct tg3 *tp = &tg3;
|
struct tg3 *tp = &tg3;
|
||||||
unsigned long tg3reg_base, tg3reg_len;
|
unsigned long tg3reg_base, tg3reg_len;
|
||||||
int i, err, pm_cap;
|
int i, err, pm_cap;
|
||||||
|
|
|
@ -771,9 +771,11 @@ PROBE - Look for an adapter, this routine's visible to the outside
|
||||||
|
|
||||||
#define board_found 1
|
#define board_found 1
|
||||||
#define valid_link 0
|
#define valid_link 0
|
||||||
static int tlan_probe(struct dev *dev, struct pci_device *pci)
|
static int tlan_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *) dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
u16 data = 0;
|
u16 data = 0;
|
||||||
int err;
|
int err;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -1218,9 +1218,11 @@ static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* eth_probe - Look for an adapter */
|
/* eth_probe - Look for an adapter */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
static int tulip_probe(struct dev *dev, struct pci_device *pci)
|
static int tulip_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
u32 i;
|
u32 i;
|
||||||
u8 chip_rev;
|
u8 chip_rev;
|
||||||
u8 ee_data[EEPROM_SIZE];
|
u8 ee_data[EEPROM_SIZE];
|
||||||
|
|
|
@ -951,9 +951,11 @@ void rhine_irq ( struct nic *nic, irq_action_t action ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rhine_probe (struct dev *dev, struct pci_device *pci)
|
rhine_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *pci = pci_device ( dev );
|
||||||
struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
|
struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
|
||||||
if (!pci->ioaddr)
|
if (!pci->ioaddr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -609,9 +609,11 @@ static void w89c840_irq(struct nic *nic __unused, irq_action_t action __unused)
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
w89c840_probe - Look for an adapter, this routine's visible to the outside
|
w89c840_probe - Look for an adapter, this routine's visible to the outside
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int w89c840_probe(struct dev *dev, struct pci_device *p)
|
static int w89c840_probe ( struct dev *dev ) {
|
||||||
{
|
|
||||||
struct nic *nic = (struct nic *)dev;
|
struct nic *nic = nic_device ( dev );
|
||||||
|
|
||||||
|
struct pci_device *p = pci_device ( dev );
|
||||||
u16 sum = 0;
|
u16 sum = 0;
|
||||||
int i, j;
|
int i, j;
|
||||||
unsigned short value;
|
unsigned short value;
|
||||||
|
|
Loading…
Reference in New Issue