Commit 1fd793da authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dscc4: various

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.
parent c94a6733
...@@ -186,6 +186,17 @@ config DSCC4 ...@@ -186,6 +186,17 @@ config DSCC4
The module will be called dscc4. For general information about The module will be called dscc4. For general information about
modules read <file:Documentation/modules.txt>. 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 config DSCC4_PCI_RST
bool "Hard reset support" bool "Hard reset support"
depends on DSCC4 depends on DSCC4
......
...@@ -514,9 +514,9 @@ inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, struct net_device *dev) ...@@ -514,9 +514,9 @@ inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, struct net_device *dev)
skb = dev_alloc_skb(len); skb = dev_alloc_skb(len);
dpriv->rx_skbuff[dirty] = skb; dpriv->rx_skbuff[dirty] = skb;
if (skb) { if (skb) {
skb->dev = dev; skb->dev = dev;
skb->protocol = hdlc_type_trans(skb, dev); skb->protocol = hdlc_type_trans(skb, dev);
skb->mac.raw = skb->data; skb->mac.raw = skb->data;
rx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data, rx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data,
len, PCI_DMA_FROMDEVICE); len, PCI_DMA_FROMDEVICE);
} else { } else {
...@@ -1171,7 +1171,7 @@ static inline int dscc4_check_clock_ability(int port) ...@@ -1171,7 +1171,7 @@ static inline int dscc4_check_clock_ability(int port)
{ {
int ret = 0; int ret = 0;
#ifdef CONFIG_DSCC4_CLOCK_ON_TWO_PORTS_ONLY #ifdef CONFIG_DSCC4_PCISYNC
if (port >= 2) if (port >= 2)
ret = -1; ret = -1;
#endif #endif
...@@ -1304,7 +1304,7 @@ static int dscc4_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -1304,7 +1304,7 @@ static int dscc4_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
if (dpriv->flags & FakeReset) { if (dpriv->flags & FakeReset) {
printk(KERN_INFO "%s: please reset the device" printk(KERN_INFO "%s: please reset the device"
"before this command\n", dev->name); " before this command\n", dev->name);
return -EPERM; return -EPERM;
} }
if (copy_from_user(&dpriv->settings, line, size)) if (copy_from_user(&dpriv->settings, line, size))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment