64 int ( *
poll ) (
struct nic *,
int retrieve );
66 unsigned int,
unsigned int,
const char * );
88 void ( * set_drvdata ) (
void *hwdev,
void *
priv ),
90 int ( * probe ) (
struct nic *
nic,
void *hwdev ),
91 void ( * disable ) (
struct nic *
nic,
void *hwdev ));
93 void * ( * get_drvdata ) (
void *hwdev ),
94 void ( * disable ) (
struct nic *
nic,
void *hwdev ) );
96 #define PCI_DRIVER(_name,_ids,_class) \ 98 _name ## _pci_legacy_probe ( struct pci_device *pci ); \ 100 _name ## _pci_legacy_remove ( struct pci_device *pci ); \ 101 struct pci_driver _name __pci_driver = { \ 103 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 104 .probe = _name ## _pci_legacy_probe, \ 105 .remove = _name ## _pci_legacy_remove, \ 107 REQUIRE_OBJECT ( pci ); 116 #define ISAPNP_DRIVER(_name,_ids) \ 118 _name ## _isapnp_legacy_probe ( struct isapnp_device *isapnp, \ 119 const struct isapnp_device_id *id ); \ 121 _name ## _isapnp_legacy_remove ( struct isapnp_device *isapnp ); \ 122 struct isapnp_driver _name __isapnp_driver = { \ 124 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 125 .probe = _name ## _isapnp_legacy_probe, \ 126 .remove = _name ## _isapnp_legacy_remove, \ 128 REQUIRE_OBJECT ( isapnp ); 137 #define EISA_DRIVER(_name,_ids) \ 139 _name ## _eisa_legacy_probe ( struct eisa_device *eisa, \ 140 const struct eisa_device_id *id ); \ 142 _name ## _eisa_legacy_remove ( struct eisa_device *eisa ); \ 143 struct eisa_driver _name __eisa_driver = { \ 145 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 146 .probe = _name ## _eisa_legacy_probe, \ 147 .remove = _name ## _eisa_legacy_remove, \ 149 REQUIRE_OBJECT ( eisa ); 158 #define MCA_DRIVER(_name,_ids) \ 160 _name ## _mca_legacy_probe ( struct mca_device *mca, \ 161 const struct mca_device_id *id ); \ 163 _name ## _mca_legacy_remove ( struct mca_device *mca ); \ 164 struct mca_driver _name __mca_driver = { \ 166 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 167 .probe = _name ## _mca_legacy_probe, \ 168 .remove = _name ## _mca_legacy_remove, \ 170 REQUIRE_OBJECT ( mca ); 179 #define ISA_DRIVER(_name,_probe_addrs,_probe_addr,_vendor_id,_prod_id) \ 181 _name ## _isa_legacy_probe ( struct isa_device *isa ); \ 183 _name ## _isa_legacy_probe_at_addr ( struct isa_device *isa ) { \ 184 if ( ! _probe_addr ( isa->ioaddr ) ) \ 186 return _name ## _isa_legacy_probe ( isa ); \ 189 _name ## _isa_legacy_remove ( struct isa_device *isa ); \ 190 static const char _name ## _text[]; \ 191 struct isa_driver _name __isa_driver = { \ 192 .name = _name ## _text, \ 193 .probe_addrs = _probe_addrs, \ 194 .addr_count = ( sizeof ( _probe_addrs ) / \ 195 sizeof ( _probe_addrs[0] ) ), \ 196 .vendor_id = _vendor_id, \ 197 .prod_id = _prod_id, \ 198 .probe = _name ## _isa_legacy_probe_at_addr, \ 199 .remove = _name ## _isa_legacy_remove, \ 201 REQUIRE_OBJECT ( isa ); 211 #define DRIVER(_name_text,_unused2,_unused3,_name,_probe,_disable) \ 212 static __attribute__ (( unused )) const char \ 213 _name ## _text[] = _name_text; \ 215 _name ## _probe ( struct nic *nic, void *hwdev ) { \ 216 return _probe ( nic, hwdev ); \ 219 _name ## _disable ( struct nic *nic, void *hwdev ) { \ 220 void ( * _unsafe_disable ) () = _disable; \ 221 _unsafe_disable ( nic, hwdev ); \ 224 _name ## _pci_legacy_probe ( struct pci_device *pci ) { \ 225 return legacy_probe ( pci, legacy_pci_set_drvdata, \ 226 &pci->dev, _name ## _probe, \ 227 _name ## _disable ); \ 230 _name ## _pci_legacy_remove ( struct pci_device *pci ) { \ 231 return legacy_remove ( pci, legacy_pci_get_drvdata, \ 232 _name ## _disable ); \ 235 _name ## _isapnp_legacy_probe ( struct isapnp_device *isapnp, \ 236 const struct isapnp_device_id *id __unused ) { \ 237 return legacy_probe ( isapnp, legacy_isapnp_set_drvdata, \ 238 &isapnp->dev, _name ## _probe, \ 239 _name ## _disable ); \ 242 _name ## _isapnp_legacy_remove ( struct isapnp_device *isapnp ) { \ 243 return legacy_remove ( isapnp, legacy_isapnp_get_drvdata, \ 244 _name ## _disable ); \ 247 _name ## _eisa_legacy_probe ( struct eisa_device *eisa, \ 248 const struct eisa_device_id *id __unused ) { \ 249 return legacy_probe ( eisa, legacy_eisa_set_drvdata, \ 250 &eisa->dev, _name ## _probe, \ 251 _name ## _disable ); \ 254 _name ## _eisa_legacy_remove ( struct eisa_device *eisa ) { \ 255 return legacy_remove ( eisa, legacy_eisa_get_drvdata, \ 256 _name ## _disable ); \ 259 _name ## _mca_legacy_probe ( struct mca_device *mca, \ 260 const struct mca_device_id *id __unused ) { \ 261 return legacy_probe ( mca, legacy_mca_set_drvdata, \ 262 &mca->dev, _name ## _probe, \ 263 _name ## _disable ); \ 266 _name ## _mca_legacy_remove ( struct mca_device *mca ) { \ 267 return legacy_remove ( mca, legacy_mca_get_drvdata, \ 268 _name ## _disable ); \ 271 _name ## _isa_legacy_probe ( struct isa_device *isa ) { \ 272 return legacy_probe ( isa, legacy_isa_set_drvdata, \ 273 &isa->dev, _name ## _probe, \ 274 _name ## _disable ); \ 277 _name ## _isa_legacy_remove ( struct isa_device *isa ) { \ 278 return legacy_remove ( isa, legacy_isa_get_drvdata, \ 279 _name ## _disable ); \ 281 PROVIDE_REQUIRING_SYMBOL()
int(* poll)(struct nic *, int retrieve)
static void * legacy_pci_get_drvdata(void *hwdev)
uint32_t type
Operating system type.
uint8_t size
Entry size (in 32-bit words)
static void legacy_isapnp_set_drvdata(void *hwdev, void *priv)
void(* irq)(struct nic *, irq_action_t)
int legacy_probe(void *hwdev, void(*set_drvdata)(void *hwdev, void *priv), struct device *dev, int(*probe)(struct nic *nic, void *hwdev), void(*disable)(struct nic *nic, void *hwdev))
void(* transmit)(struct nic *, const char *, unsigned int, unsigned int, const char *)
static void legacy_eisa_set_drvdata(void *hwdev, void *priv)
static void * legacy_isapnp_get_drvdata(void *hwdev)
static int eth_poll(int retrieve)
FILE_LICENCE(GPL2_OR_LATER)
static void pci_set_drvdata(struct pci_device *pci, void *priv)
Set PCI driver-private data.
static void legacy_isa_set_drvdata(void *hwdev, void *priv)
int dummy_connect(struct nic *nic)
static void * legacy_eisa_get_drvdata(void *hwdev)
static void legacy_mca_set_drvdata(void *hwdev, void *priv)
static void isa_set_drvdata(struct isa_device *isa, void *priv)
Set ISA driver-private data.
static void * isapnp_get_drvdata(struct isapnp_device *isapnp)
Get ISAPnP driver-private data.
static void mca_set_drvdata(struct mca_device *mca, void *priv)
Set MCA driver-private data.
static void isapnp_set_drvdata(struct isapnp_device *isapnp, void *priv)
Set ISAPnP driver-private data.
void legacy_remove(void *hwdev, void *(*get_drvdata)(void *hwdev), void(*disable)(struct nic *nic, void *hwdev))
static void legacy_pci_set_drvdata(void *hwdev, void *priv)
static void eisa_set_drvdata(struct eisa_device *eisa, void *priv)
Set EISA driver-private data.
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
static void * mca_get_drvdata(struct mca_device *mca)
Get MCA driver-private data.
static void * legacy_isa_get_drvdata(void *hwdev)
unsigned char * node_addr
static void eth_transmit(const char *dest, unsigned int type, unsigned int size, const void *packet)
static void * eisa_get_drvdata(struct eisa_device *eisa)
Get EISA driver-private data.
void dummy_irq(struct nic *nic, irq_action_t irq_action)
static struct tlan_private * priv
static void * legacy_mca_get_drvdata(void *hwdev)
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
static void * isa_get_drvdata(struct isa_device *isa)
Get ISA driver-private data.
struct nic_operations * nic_op
int(* connect)(struct nic *)