Merge branch 'master' into upstream
authorJeff Garzik <jeff@garzik.org>
Sat, 17 Feb 2007 20:11:43 +0000 (15:11 -0500)
committerJeff Garzik <jeff@garzik.org>
Sat, 17 Feb 2007 20:11:43 +0000 (15:11 -0500)
1  2 
drivers/net/ehea/ehea_main.c
drivers/net/gianfar_sysfs.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/phy/phy_device.c
drivers/net/wireless/bcm43xx/bcm43xx_wx.c

@@@ -76,7 -76,7 +76,7 @@@ void ehea_dump(void *adr, int len, cha
        int x;
        unsigned char *deb = adr;
        for (x = 0; x < len; x += 16) {
 -              printk(DRV_NAME "%s adr=%p ofs=%04x %016lx %016lx\n", msg,
 +              printk(DRV_NAME " %s adr=%p ofs=%04x %016lx %016lx\n", msg,
                          deb, x, *((u64*)&deb[0]), *((u64*)&deb[8]));
                deb += 16;
        }
@@@ -555,7 -555,6 +555,7 @@@ static irqreturn_t ehea_qp_aff_irq_hand
  {
        struct ehea_port *port = param;
        struct ehea_eqe *eqe;
 +      struct ehea_qp *qp;
        u32 qp_token;
  
        eqe = ehea_poll_eq(port->qp_eq);
                qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry);
                ehea_error("QP aff_err: entry=0x%lx, token=0x%x",
                           eqe->entry, qp_token);
 +
 +              qp = port->port_res[qp_token].qp;
 +              ehea_error_data(port->adapter, qp->fw_handle);
                eqe = ehea_poll_eq(port->qp_eq);
        }
  
 +      queue_work(port->adapter->ehea_wq, &port->reset_task);
 +
        return IRQ_HANDLED;
  }
  
@@@ -888,7 -882,7 +888,7 @@@ static int ehea_reg_interrupts(struct n
                         , "%s-recv%d", dev->name, i);
                ret = ibmebus_request_irq(NULL, pr->recv_eq->attr.ist1,
                                          ehea_recv_irq_handler,
-                                         SA_INTERRUPT, pr->int_recv_name, pr);
+                                         IRQF_DISABLED, pr->int_recv_name, pr);
                if (ret) {
                        ehea_error("failed registering irq for ehea_recv_int:"
                                   "port_res_nr:%d, ist=%X", i,
  
        ret = ibmebus_request_irq(NULL, port->qp_eq->attr.ist1,
                                  ehea_qp_aff_irq_handler,
-                                 SA_INTERRUPT, port->int_aff_name, port);
+                                 IRQF_DISABLED, port->int_aff_name, port);
        if (ret) {
                ehea_error("failed registering irq for qp_aff_irq_handler:"
                           "ist=%X", port->qp_eq->attr.ist1);
                         "%s-send%d", dev->name, i);
                ret = ibmebus_request_irq(NULL, pr->send_eq->attr.ist1,
                                          ehea_send_irq_handler,
-                                         SA_INTERRUPT, pr->int_send_name,
+                                         IRQF_DISABLED, pr->int_send_name,
                                          pr);
                if (ret) {
                        ehea_error("failed registering irq for ehea_send "
@@@ -2545,7 -2539,7 +2545,7 @@@ static int __devinit ehea_probe(struct 
                     (unsigned long)adapter);
  
        ret = ibmebus_request_irq(NULL, adapter->neq->attr.ist1,
-                                 ehea_interrupt_neq, SA_INTERRUPT,
+                                 ehea_interrupt_neq, IRQF_DISABLED,
                                  "ehea_neq", adapter);
        if (ret) {
                dev_err(&dev->ofdev.dev, "requesting NEQ IRQ failed");
@@@ -20,7 -20,6 +20,6 @@@
   */
  
  #include <linux/kernel.h>
- #include <linux/sched.h>
  #include <linux/string.h>
  #include <linux/errno.h>
  #include <linux/unistd.h>
  #include "gianfar.h"
  
  #define GFAR_ATTR(_name) \
 -static ssize_t gfar_show_##_name(struct class_device *cdev, char *buf); \
 -static ssize_t gfar_set_##_name(struct class_device *cdev, \
 +static ssize_t gfar_show_##_name(struct device *dev, \
 +       struct device_attribute *attr, char *buf); \
 +static ssize_t gfar_set_##_name(struct device *dev, \
 +              struct device_attribute *attr, \
                const char *buf, size_t count); \
 -static CLASS_DEVICE_ATTR(_name, 0644, gfar_show_##_name, gfar_set_##_name)
 +static DEVICE_ATTR(_name, 0644, gfar_show_##_name, gfar_set_##_name)
  
  #define GFAR_CREATE_FILE(_dev, _name) \
 -      class_device_create_file(&_dev->class_dev, &class_device_attr_##_name)
 +      device_create_file(&_dev->dev, &dev_attr_##_name)
  
  GFAR_ATTR(bd_stash);
  GFAR_ATTR(rx_stash_size);
@@@ -56,28 -53,29 +55,28 @@@ GFAR_ATTR(fifo_threshold)
  GFAR_ATTR(fifo_starve);
  GFAR_ATTR(fifo_starve_off);
  
 -#define to_net_dev(cd) container_of(cd, struct net_device, class_dev)
 -
 -static ssize_t gfar_show_bd_stash(struct class_device *cdev, char *buf)
 +static ssize_t gfar_show_bd_stash(struct device *dev,
 +                                struct device_attribute *attr, char *buf)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
  
 -      return sprintf(buf, "%s\n", priv->bd_stash_en? "on" : "off");
 +      return sprintf(buf, "%s\n", priv->bd_stash_en ? "on" : "off");
  }
  
 -static ssize_t gfar_set_bd_stash(struct class_device *cdev,
 -              const char *buf, size_t count)
 +static ssize_t gfar_set_bd_stash(struct device *dev,
 +                               struct device_attribute *attr,
 +                               const char *buf, size_t count)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
        int new_setting = 0;
        u32 temp;
        unsigned long flags;
  
        /* Find out the new setting */
 -      if (!strncmp("on", buf, count-1) || !strncmp("1", buf, count-1))
 +      if (!strncmp("on", buf, count - 1) || !strncmp("1", buf, count - 1))
                new_setting = 1;
 -      else if (!strncmp("off", buf, count-1) || !strncmp("0", buf, count-1))
 +      else if (!strncmp("off", buf, count - 1)
 +               || !strncmp("0", buf, count - 1))
                new_setting = 0;
        else
                return count;
        return count;
  }
  
 -static ssize_t gfar_show_rx_stash_size(struct class_device *cdev, char *buf)
 +static ssize_t gfar_show_rx_stash_size(struct device *dev,
 +                                     struct device_attribute *attr, char *buf)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
  
        return sprintf(buf, "%d\n", priv->rx_stash_size);
  }
  
 -static ssize_t gfar_set_rx_stash_size(struct class_device *cdev,
 -              const char *buf, size_t count)
 +static ssize_t gfar_set_rx_stash_size(struct device *dev,
 +                                    struct device_attribute *attr,
 +                                    const char *buf, size_t count)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
        unsigned int length = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
        return count;
  }
  
 -
  /* Stashing will only be enabled when rx_stash_size != 0 */
 -static ssize_t gfar_show_rx_stash_index(struct class_device *cdev, char *buf)
 +static ssize_t gfar_show_rx_stash_index(struct device *dev,
 +                                      struct device_attribute *attr,
 +                                      char *buf)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
  
        return sprintf(buf, "%d\n", priv->rx_stash_index);
  }
  
 -static ssize_t gfar_set_rx_stash_index(struct class_device *cdev,
 -              const char *buf, size_t count)
 +static ssize_t gfar_set_rx_stash_index(struct device *dev,
 +                                     struct device_attribute *attr,
 +                                     const char *buf, size_t count)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
        unsigned short index = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
        return count;
  }
  
 -static ssize_t gfar_show_fifo_threshold(struct class_device *cdev, char *buf)
 +static ssize_t gfar_show_fifo_threshold(struct device *dev,
 +                                      struct device_attribute *attr,
 +                                      char *buf)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
  
        return sprintf(buf, "%d\n", priv->fifo_threshold);
  }
  
 -static ssize_t gfar_set_fifo_threshold(struct class_device *cdev,
 -              const char *buf, size_t count)
 +static ssize_t gfar_set_fifo_threshold(struct device *dev,
 +                                     struct device_attribute *attr,
 +                                     const char *buf, size_t count)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
        unsigned int length = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
        return count;
  }
  
 -static ssize_t gfar_show_fifo_starve(struct class_device *cdev, char *buf)
 +static ssize_t gfar_show_fifo_starve(struct device *dev,
 +                                   struct device_attribute *attr, char *buf)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
  
        return sprintf(buf, "%d\n", priv->fifo_starve);
  }
  
 -
 -static ssize_t gfar_set_fifo_starve(struct class_device *cdev,
 -              const char *buf, size_t count)
 +static ssize_t gfar_set_fifo_starve(struct device *dev,
 +                                  struct device_attribute *attr,
 +                                  const char *buf, size_t count)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
        unsigned int num = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
        return count;
  }
  
 -static ssize_t gfar_show_fifo_starve_off(struct class_device *cdev, char *buf)
 +static ssize_t gfar_show_fifo_starve_off(struct device *dev,
 +                                       struct device_attribute *attr,
 +                                       char *buf)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
  
        return sprintf(buf, "%d\n", priv->fifo_starve_off);
  }
  
 -static ssize_t gfar_set_fifo_starve_off(struct class_device *cdev,
 -              const char *buf, size_t count)
 +static ssize_t gfar_set_fifo_starve_off(struct device *dev,
 +                                      struct device_attribute *attr,
 +                                      const char *buf, size_t count)
  {
 -      struct net_device *dev = to_net_dev(cdev);
 -      struct gfar_private *priv = netdev_priv(dev);
 +      struct gfar_private *priv = netdev_priv(to_net_dev(dev));
        unsigned int num = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
@@@ -434,13 -434,12 +434,13 @@@ netxen_nic_probe(struct pci_dev *pdev, 
                adapter->port_count++;
                adapter->port[i] = port;
        }
 -
 +#ifndef CONFIG_PPC64
        writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
        netxen_pinit_from_rom(adapter, 0);
        udelay(500);
        netxen_load_firmware(adapter);
        netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
 +#endif
        /*
         * delay a while to ensure that the Pegs are up & running.
         * Otherwise, we might see some flaky behaviour.
@@@ -620,8 -619,8 +620,8 @@@ static int netxen_nic_open(struct net_d
                }
                adapter->irq = adapter->ahw.pdev->irq;
                err = request_irq(adapter->ahw.pdev->irq, &netxen_intr,
-                                 SA_SHIRQ | SA_SAMPLE_RANDOM, netdev->name,
-                                 adapter);
+                                 IRQF_SHARED | IRQF_SAMPLE_RANDOM,
+                                 netdev->name, adapter);
                if (err) {
                        printk(KERN_ERR "request_irq failed with: %d\n", err);
                        netxen_free_hw_resources(adapter);
@@@ -15,7 -15,6 +15,6 @@@
   *
   */
  #include <linux/kernel.h>
- #include <linux/sched.h>
  #include <linux/string.h>
  #include <linux/errno.h>
  #include <linux/unistd.h>
@@@ -139,7 -138,7 +138,7 @@@ void phy_prepare_link(struct phy_devic
   */
  struct phy_device * phy_connect(struct net_device *dev, const char *phy_id,
                void (*handler)(struct net_device *), u32 flags,
 -              u32 interface)
 +              phy_interface_t interface)
  {
        struct phy_device *phydev;
  
@@@ -188,7 -187,7 +187,7 @@@ static int phy_compare_id(struct devic
  }
  
  struct phy_device *phy_attach(struct net_device *dev,
 -              const char *phy_id, u32 flags, u32 interface)
 +              const char *phy_id, u32 flags, phy_interface_t interface)
  {
        struct bus_type *bus = &mdio_bus_type;
        struct phy_device *phydev;
@@@ -33,7 -33,6 +33,6 @@@
  #include <net/ieee80211softmac.h>
  #include <net/ieee80211softmac_wx.h>
  #include <linux/capability.h>
- #include <linux/sched.h> /* for capable() */
  #include <linux/delay.h>
  
  #include "bcm43xx.h"
@@@ -261,22 -260,22 +260,22 @@@ static int bcm43xx_wx_get_rangeparams(s
        if (phy->type == BCM43xx_PHYTYPE_A ||
            phy->type == BCM43xx_PHYTYPE_G) {
                range->num_bitrates = 8;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_6MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_9MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_12MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_18MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_24MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_36MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_48MB;
 -              range->bitrate[i++] = IEEE80211_OFDM_RATE_54MB;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_6MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_9MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_12MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_18MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_24MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_36MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_48MB * 500000;
 +              range->bitrate[i++] = IEEE80211_OFDM_RATE_54MB * 500000;
        }
        if (phy->type == BCM43xx_PHYTYPE_B ||
            phy->type == BCM43xx_PHYTYPE_G) {
                range->num_bitrates += 4;
 -              range->bitrate[i++] = IEEE80211_CCK_RATE_1MB;
 -              range->bitrate[i++] = IEEE80211_CCK_RATE_2MB;
 -              range->bitrate[i++] = IEEE80211_CCK_RATE_5MB;
 -              range->bitrate[i++] = IEEE80211_CCK_RATE_11MB;
 +              range->bitrate[i++] = IEEE80211_CCK_RATE_1MB * 500000;
 +              range->bitrate[i++] = IEEE80211_CCK_RATE_2MB * 500000;
 +              range->bitrate[i++] = IEEE80211_CCK_RATE_5MB * 500000;
 +              range->bitrate[i++] = IEEE80211_CCK_RATE_11MB * 500000;
        }
  
        geo = ieee80211_get_geo(bcm->ieee);
                if (j == IW_MAX_FREQUENCIES)
                        break;
                range->freq[j].i = j + 1;
 -              range->freq[j].m = geo->a[i].freq;//FIXME?
 +              range->freq[j].m = geo->a[i].freq * 100000;
                range->freq[j].e = 1;
                j++;
        }
                if (j == IW_MAX_FREQUENCIES)
                        break;
                range->freq[j].i = j + 1;
 -              range->freq[j].m = geo->bg[i].freq;//FIXME?
 +              range->freq[j].m = geo->bg[i].freq * 100000;
                range->freq[j].e = 1;
                j++;
        }