]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] dscc4: various
authorAndrew Morton <akpm@osdl.org>
Wed, 20 Aug 2003 17:28:03 +0000 (10:28 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 20 Aug 2003 17:28:03 +0000 (10:28 -0700)
From: Francois Romieu <romieu@fr.zoreil.com>

- silly indentation;
- let's be more user-friendly with manufacturer specific (mis)feature:
  + s/CONFIG_DSCC4_CLOCK_ON_TWO_PORTS_ONLY/CONFIG_DSCC4_PCISYNC/
  + KConfig adequate entry
- broken warning message.

drivers/net/wan/Kconfig
drivers/net/wan/dscc4.c

index 7a6747206ceb770b59f2c3c5125a01a847d1cfe7..ba88b3dbf51ec07bc6a393d32502b4a2e59005ef 100644 (file)
@@ -186,6 +186,17 @@ config DSCC4
          The module will be called dscc4. For general information about
          modules read <file:Documentation/modules.txt>.
 
+config DSCC4_PCISYNC
+       bool "Etinc PCISYNC features"
+       depends on DSCC4
+       help
+         Due to Etinc's design choice for its PCISYNC cards, some operations
+         are only allowed on specific ports of the DSCC4. This option is the
+         only way for the driver to know that it shouldn't return a success
+         code for these operations.
+
+         Please say Y if your card is an Etinc's PCISYNC.
+
 config DSCC4_PCI_RST
        bool "Hard reset support"
        depends on DSCC4
index be6c28d38ee35cccf6c602932e28178b473e87d6..4684589190dff576c97eb4df58b3381e6e90fda0 100644 (file)
@@ -514,9 +514,9 @@ inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, struct net_device *dev)
        skb = dev_alloc_skb(len);
        dpriv->rx_skbuff[dirty] = skb;
        if (skb) {
-       skb->dev = dev;
-       skb->protocol = hdlc_type_trans(skb, dev);
-       skb->mac.raw = skb->data;
+               skb->dev = dev;
+               skb->protocol = hdlc_type_trans(skb, dev);
+               skb->mac.raw = skb->data;
                rx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data,
                                             len, PCI_DMA_FROMDEVICE);
        } else {
@@ -1171,7 +1171,7 @@ static inline int dscc4_check_clock_ability(int port)
 {
        int ret = 0;
 
-#ifdef CONFIG_DSCC4_CLOCK_ON_TWO_PORTS_ONLY
+#ifdef CONFIG_DSCC4_PCISYNC
        if (port >= 2)
                ret = -1;
 #endif
@@ -1304,7 +1304,7 @@ static int dscc4_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 
                if (dpriv->flags & FakeReset) {
                        printk(KERN_INFO "%s: please reset the device"
-                              "before this command\n", dev->name);
+                              " before this command\n", dev->name);
                        return -EPERM;
                }
                if (copy_from_user(&dpriv->settings, line, size))