22 #include <linux/module.h>
23 #include <linux/slab.h>
25 #include <linux/netdevice.h>
26 #include <linux/ethtool.h>
27 #include <linux/pci.h>
28 #include <linux/sched.h>
31 #include <linux/if_arp.h>
43 #define ISL3877_IMAGE_FILE "isl3877"
44 #define ISL3886_IMAGE_FILE "isl3886"
45 #define ISL3890_IMAGE_FILE "isl3890"
60 static const unsigned char dummy_mac[6] = { 0x00, 0x30, 0xB4, 0x00, 0x00, 0x00 };
98 "%s: request_firmware() failed for '%s'\n",
105 fw_ptr = (
u32 *) fw_entry->
data;
106 fw_len = fw_entry->
size;
110 "%s: firmware '%s' size is not multiple of 32bit, aborting!\n",
124 isl38xx_w32_flush(device_base, reg,
134 while (_fw_len > 0) {
137 fw_ptr++, dev_fw_ptr++;
152 priv->
ndev->name, fw_entry->
data + 40);
199 spin_lock(&priv->
slock);
207 #if VERBOSE > SHOW_ERROR_MESSAGES
210 spin_unlock(&priv->
slock);
230 #if VERBOSE > SHOW_ERROR_MESSAGES
232 "IRQ: Identification register 0x%p 0x%x\n", device, reg);
237 #if VERBOSE > SHOW_ERROR_MESSAGES
242 "CB drv Qs: [%i][%i][%i][%i][%i][%i]\n",
244 driver_curr_frag[0]),
246 driver_curr_frag[1]),
248 driver_curr_frag[2]),
250 driver_curr_frag[3]),
252 driver_curr_frag[4]),
258 "CB dev Qs: [%i][%i][%i][%i][%i][%i]\n",
260 device_curr_frag[0]),
262 device_curr_frag[1]),
264 device_curr_frag[2]),
266 device_curr_frag[3]),
268 device_curr_frag[4]),
286 #if VERBOSE > SHOW_ERROR_MESSAGES
288 "Received frame in Management Queue\n");
303 #if VERBOSE > SHOW_ERROR_MESSAGES
305 "Received frame in Data Low Queue\n");
318 netif_wake_queue(priv->
ndev);
328 #if VERBOSE > SHOW_ERROR_MESSAGES
330 "IRQ: Init flag, device initialized\n");
337 #if VERBOSE > SHOW_ERROR_MESSAGES
347 #if VERBOSE > SHOW_ERROR_MESSAGES
355 #if VERBOSE > SHOW_ERROR_MESSAGES
358 spin_unlock(&priv->
slock);
373 spin_unlock(&priv->
slock);
390 prism54_bring_down(priv);
394 netif_start_queue(ndev);
416 netif_stop_queue(ndev);
418 return prism54_bring_down(priv);
470 rc = isl_upload_firmware(priv);
502 for(count = 0; count < 2 &&
result; count++) {
604 if (reload_firmware) {
607 rc = islpci_upload_fw(priv);
616 rc = islpci_reset_if(priv);
618 printk(
KERN_ERR "prism54: Your card/socket may be faulty, or IRQ line too busy :(\n");
630 #if VERBOSE > SHOW_ERROR_MESSAGES
655 device_host_address);
702 skb_reserve(skb, (4 - (
long) skb->
data) & 0x03);
708 pci_map_single(priv->
pdev, (
void *) skb->
data,
766 pci_unmap_single(priv->
pdev,
793 static void islpci_ethtool_get_drvinfo(
struct net_device *
dev,
800 static const struct ethtool_ops islpci_ethtool_ops = {
801 .get_drvinfo = islpci_ethtool_get_drvinfo,
805 .ndo_open = islpci_open,
806 .ndo_stop = islpci_close,
823 pci_set_drvdata(pdev, ndev);
824 #if defined(SET_NETDEV_DEV)
845 priv = netdev_priv(ndev);
860 #if VERBOSE > SHOW_ERROR_MESSAGES
885 if (islpci_alloc_memory(priv))
905 "ERROR: register_netdev() failed\n");
906 goto do_islpci_free_memory;
911 do_islpci_free_memory:
914 pci_set_drvdata(pdev,
NULL);
926 old_state = priv->
state;