diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /drivers/net/plip.c | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'drivers/net/plip.c')
-rw-r--r-- | drivers/net/plip.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 1e965427b0e9..0c46d603b8fe 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -229,7 +229,7 @@ static inline void enable_parport_interrupts (struct net_device *dev) | |||
229 | if (dev->irq != -1) | 229 | if (dev->irq != -1) |
230 | { | 230 | { |
231 | struct parport *port = | 231 | struct parport *port = |
232 | ((struct net_local *)dev->priv)->pardev->port; | 232 | ((struct net_local *)netdev_priv(dev))->pardev->port; |
233 | port->ops->enable_irq (port); | 233 | port->ops->enable_irq (port); |
234 | } | 234 | } |
235 | } | 235 | } |
@@ -239,7 +239,7 @@ static inline void disable_parport_interrupts (struct net_device *dev) | |||
239 | if (dev->irq != -1) | 239 | if (dev->irq != -1) |
240 | { | 240 | { |
241 | struct parport *port = | 241 | struct parport *port = |
242 | ((struct net_local *)dev->priv)->pardev->port; | 242 | ((struct net_local *)netdev_priv(dev))->pardev->port; |
243 | port->ops->disable_irq (port); | 243 | port->ops->disable_irq (port); |
244 | } | 244 | } |
245 | } | 245 | } |
@@ -247,7 +247,7 @@ static inline void disable_parport_interrupts (struct net_device *dev) | |||
247 | static inline void write_data (struct net_device *dev, unsigned char data) | 247 | static inline void write_data (struct net_device *dev, unsigned char data) |
248 | { | 248 | { |
249 | struct parport *port = | 249 | struct parport *port = |
250 | ((struct net_local *)dev->priv)->pardev->port; | 250 | ((struct net_local *)netdev_priv(dev))->pardev->port; |
251 | 251 | ||
252 | port->ops->write_data (port, data); | 252 | port->ops->write_data (port, data); |
253 | } | 253 | } |
@@ -255,7 +255,7 @@ static inline void write_data (struct net_device *dev, unsigned char data) | |||
255 | static inline unsigned char read_status (struct net_device *dev) | 255 | static inline unsigned char read_status (struct net_device *dev) |
256 | { | 256 | { |
257 | struct parport *port = | 257 | struct parport *port = |
258 | ((struct net_local *)dev->priv)->pardev->port; | 258 | ((struct net_local *)netdev_priv(dev))->pardev->port; |
259 | 259 | ||
260 | return port->ops->read_status (port); | 260 | return port->ops->read_status (port); |
261 | } | 261 | } |
@@ -638,14 +638,14 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, | |||
638 | 638 | ||
639 | case PLIP_PK_DATA: | 639 | case PLIP_PK_DATA: |
640 | lbuf = rcv->skb->data; | 640 | lbuf = rcv->skb->data; |
641 | do | 641 | do { |
642 | if (plip_receive(nibble_timeout, dev, | 642 | if (plip_receive(nibble_timeout, dev, |
643 | &rcv->nibble, &lbuf[rcv->byte])) | 643 | &rcv->nibble, &lbuf[rcv->byte])) |
644 | return TIMEOUT; | 644 | return TIMEOUT; |
645 | while (++rcv->byte < rcv->length.h); | 645 | } while (++rcv->byte < rcv->length.h); |
646 | do | 646 | do { |
647 | rcv->checksum += lbuf[--rcv->byte]; | 647 | rcv->checksum += lbuf[--rcv->byte]; |
648 | while (rcv->byte); | 648 | } while (rcv->byte); |
649 | rcv->state = PLIP_PK_CHECKSUM; | 649 | rcv->state = PLIP_PK_CHECKSUM; |
650 | 650 | ||
651 | case PLIP_PK_CHECKSUM: | 651 | case PLIP_PK_CHECKSUM: |
@@ -664,7 +664,6 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, | |||
664 | /* Inform the upper layer for the arrival of a packet. */ | 664 | /* Inform the upper layer for the arrival of a packet. */ |
665 | rcv->skb->protocol=plip_type_trans(rcv->skb, dev); | 665 | rcv->skb->protocol=plip_type_trans(rcv->skb, dev); |
666 | netif_rx_ni(rcv->skb); | 666 | netif_rx_ni(rcv->skb); |
667 | dev->last_rx = jiffies; | ||
668 | dev->stats.rx_bytes += rcv->length.h; | 667 | dev->stats.rx_bytes += rcv->length.h; |
669 | dev->stats.rx_packets++; | 668 | dev->stats.rx_packets++; |
670 | rcv->skb = NULL; | 669 | rcv->skb = NULL; |
@@ -817,14 +816,14 @@ plip_send_packet(struct net_device *dev, struct net_local *nl, | |||
817 | snd->checksum = 0; | 816 | snd->checksum = 0; |
818 | 817 | ||
819 | case PLIP_PK_DATA: | 818 | case PLIP_PK_DATA: |
820 | do | 819 | do { |
821 | if (plip_send(nibble_timeout, dev, | 820 | if (plip_send(nibble_timeout, dev, |
822 | &snd->nibble, lbuf[snd->byte])) | 821 | &snd->nibble, lbuf[snd->byte])) |
823 | return TIMEOUT; | 822 | return TIMEOUT; |
824 | while (++snd->byte < snd->length.h); | 823 | } while (++snd->byte < snd->length.h); |
825 | do | 824 | do { |
826 | snd->checksum += lbuf[--snd->byte]; | 825 | snd->checksum += lbuf[--snd->byte]; |
827 | while (snd->byte); | 826 | } while (snd->byte); |
828 | snd->state = PLIP_PK_CHECKSUM; | 827 | snd->state = PLIP_PK_CHECKSUM; |
829 | 828 | ||
830 | case PLIP_PK_CHECKSUM: | 829 | case PLIP_PK_CHECKSUM: |
@@ -1018,8 +1017,8 @@ plip_hard_header(struct sk_buff *skb, struct net_device *dev, | |||
1018 | return ret; | 1017 | return ret; |
1019 | } | 1018 | } |
1020 | 1019 | ||
1021 | int plip_hard_header_cache(const struct neighbour *neigh, | 1020 | static int plip_hard_header_cache(const struct neighbour *neigh, |
1022 | struct hh_cache *hh) | 1021 | struct hh_cache *hh) |
1023 | { | 1022 | { |
1024 | int ret; | 1023 | int ret; |
1025 | 1024 | ||
@@ -1397,9 +1396,3 @@ static int __init plip_init (void) | |||
1397 | module_init(plip_init); | 1396 | module_init(plip_init); |
1398 | module_exit(plip_cleanup_module); | 1397 | module_exit(plip_cleanup_module); |
1399 | MODULE_LICENSE("GPL"); | 1398 | MODULE_LICENSE("GPL"); |
1400 | |||
1401 | /* | ||
1402 | * Local variables: | ||
1403 | * compile-command: "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -g -fomit-frame-pointer -pipe -c plip.c" | ||
1404 | * End: | ||
1405 | */ | ||