diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-10 17:56:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-10 17:56:22 -0400 |
commit | 6ed911fb04886c5510a41cd89203b931b1c5d261 (patch) | |
tree | b4ee4111fe5371fb84a0c632b8aa749ae49cc874 /drivers/net/atari_pamsnet.c | |
parent | 64b853aa328f34dd58e4e617cded91e2ddbcac13 (diff) | |
parent | 4ad072c984ebe329c99965ddd1e58b0bb24af12b (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (40 commits)
bonding/bond_main.c: make 2 functions static
ps3: gigabit ethernet driver for PS3, take3
[netdrvr] Fix dependencies for ax88796 ne2k clone driver
eHEA: Capability flag for DLPAR support
Remove sk98lin ethernet driver.
sunhme.c:quattro_pci_find() must be __devinit
bonding / ipv6: no addrconf for slaves separately from master
atl1: remove write-only var in tx handler
macmace: use "unsigned long flags;"
Cleanup usbnet_probe() return value handling
netxen: deinline and sparse fix
eeprom_93cx6: shorten pulse timing to match spec (bis)
phylib: Add Marvell 88E1112 phy id
phylib: cleanup marvell.c a bit
AX88796 network driver
IOC3: Switch to pci refcounting safe APIs
e100: Fix Tyan motherboard e100 not receiving IPMI commands
QE Ethernet driver writes to wrong register to mask interrupts
rrunner.c:rr_init() must be __devinit
tokenring/3c359.c:xl_init() must be __devinit
...
Diffstat (limited to 'drivers/net/atari_pamsnet.c')
-rw-r--r-- | drivers/net/atari_pamsnet.c | 62 |
1 files changed, 22 insertions, 40 deletions
diff --git a/drivers/net/atari_pamsnet.c b/drivers/net/atari_pamsnet.c index 54714409a09b..f7356374a2e7 100644 --- a/drivers/net/atari_pamsnet.c +++ b/drivers/net/atari_pamsnet.c | |||
@@ -295,10 +295,7 @@ int if_up = 0; | |||
295 | /* Setup the DMA counter */ | 295 | /* Setup the DMA counter */ |
296 | 296 | ||
297 | static void | 297 | static void |
298 | setup_dma (address, rw_flag, num_blocks) | 298 | setup_dma (void *address, unsigned rw_flag, int num_blocks) |
299 | void *address; | ||
300 | unsigned rw_flag; | ||
301 | int num_blocks; | ||
302 | { | 299 | { |
303 | WRITEMODE((unsigned) rw_flag | DMA_FDC | SEC_COUNT | REG_ACSI | | 300 | WRITEMODE((unsigned) rw_flag | DMA_FDC | SEC_COUNT | REG_ACSI | |
304 | A1); | 301 | A1); |
@@ -317,9 +314,7 @@ setup_dma (address, rw_flag, num_blocks) | |||
317 | /* Send the first byte of an command block */ | 314 | /* Send the first byte of an command block */ |
318 | 315 | ||
319 | static int | 316 | static int |
320 | send_first (target, byte) | 317 | send_first (int target, unsigned char byte) |
321 | int target; | ||
322 | unsigned char byte; | ||
323 | { | 318 | { |
324 | rw = READ; | 319 | rw = READ; |
325 | acsi_delay_end(COMMAND_DELAY); | 320 | acsi_delay_end(COMMAND_DELAY); |
@@ -338,10 +333,7 @@ send_first (target, byte) | |||
338 | /* Send the rest of an command block */ | 333 | /* Send the rest of an command block */ |
339 | 334 | ||
340 | static int | 335 | static int |
341 | send_1_5 (lun, command, dma) | 336 | send_1_5 (int lun, unsigned char *command, int dma) |
342 | int lun; | ||
343 | unsigned char *command; | ||
344 | int dma; | ||
345 | { | 337 | { |
346 | int i, j; | 338 | int i, j; |
347 | 339 | ||
@@ -371,8 +363,7 @@ get_status (void) | |||
371 | /* Calculate the number of received bytes */ | 363 | /* Calculate the number of received bytes */ |
372 | 364 | ||
373 | static int | 365 | static int |
374 | calc_received (start_address) | 366 | calc_received (void *start_address) |
375 | void *start_address; | ||
376 | { | 367 | { |
377 | return (int)( | 368 | return (int)( |
378 | (((unsigned long)DMAHIGH << 16) | ((unsigned)DMAMID << 8) | DMALOW) | 369 | (((unsigned long)DMAHIGH << 16) | ((unsigned)DMAMID << 8) | DMALOW) |
@@ -384,8 +375,7 @@ calc_received (start_address) | |||
384 | /* start() starts the PAM's DMA adaptor */ | 375 | /* start() starts the PAM's DMA adaptor */ |
385 | 376 | ||
386 | static void | 377 | static void |
387 | start (target) | 378 | start (int target) |
388 | int target; | ||
389 | { | 379 | { |
390 | send_first(target, START); | 380 | send_first(target, START); |
391 | } | 381 | } |
@@ -393,8 +383,7 @@ start (target) | |||
393 | /* stop() stops the PAM's DMA adaptor and returns a value of zero in case of success */ | 383 | /* stop() stops the PAM's DMA adaptor and returns a value of zero in case of success */ |
394 | 384 | ||
395 | static int | 385 | static int |
396 | stop (target) | 386 | stop (int target) |
397 | int target; | ||
398 | { | 387 | { |
399 | int ret = -1; | 388 | int ret = -1; |
400 | unsigned char cmd_buffer[5]; | 389 | unsigned char cmd_buffer[5]; |
@@ -415,8 +404,7 @@ bad: | |||
415 | /* testpkt() returns the number of received packets waiting in the queue */ | 404 | /* testpkt() returns the number of received packets waiting in the queue */ |
416 | 405 | ||
417 | static int | 406 | static int |
418 | testpkt(target) | 407 | testpkt(int target) |
419 | int target; | ||
420 | { | 408 | { |
421 | int ret = -1; | 409 | int ret = -1; |
422 | 410 | ||
@@ -431,9 +419,7 @@ bad: | |||
431 | /* Please note: The buffer is for internal use only but must be defined! */ | 419 | /* Please note: The buffer is for internal use only but must be defined! */ |
432 | 420 | ||
433 | static int | 421 | static int |
434 | inquiry (target, buffer) | 422 | inquiry (int target, unsigned char *buffer) |
435 | int target; | ||
436 | unsigned char *buffer; | ||
437 | { | 423 | { |
438 | int ret = -1; | 424 | int ret = -1; |
439 | unsigned char *vbuffer = phys_to_virt((unsigned long)buffer); | 425 | unsigned char *vbuffer = phys_to_virt((unsigned long)buffer); |
@@ -468,9 +454,7 @@ bad: | |||
468 | */ | 454 | */ |
469 | 455 | ||
470 | static HADDR | 456 | static HADDR |
471 | *read_hw_addr(target, buffer) | 457 | *read_hw_addr(int target, unsigned char *buffer) |
472 | int target; | ||
473 | unsigned char *buffer; | ||
474 | { | 458 | { |
475 | HADDR *ret = 0; | 459 | HADDR *ret = 0; |
476 | unsigned char cmd_buffer[5]; | 460 | unsigned char cmd_buffer[5]; |
@@ -491,9 +475,7 @@ bad: | |||
491 | } | 475 | } |
492 | 476 | ||
493 | static irqreturn_t | 477 | static irqreturn_t |
494 | pamsnet_intr(irq, data, fp) | 478 | pamsnet_intr(int irq, void *data) |
495 | int irq; | ||
496 | void *data; | ||
497 | { | 479 | { |
498 | return IRQ_HANDLED; | 480 | return IRQ_HANDLED; |
499 | } | 481 | } |
@@ -501,9 +483,7 @@ pamsnet_intr(irq, data, fp) | |||
501 | /* receivepkt() loads a packet to a given buffer and returns its length */ | 483 | /* receivepkt() loads a packet to a given buffer and returns its length */ |
502 | 484 | ||
503 | static int | 485 | static int |
504 | receivepkt (target, buffer) | 486 | receivepkt (int target, unsigned char *buffer) |
505 | int target; | ||
506 | unsigned char *buffer; | ||
507 | { | 487 | { |
508 | int ret = -1; | 488 | int ret = -1; |
509 | unsigned char cmd_buffer[5]; | 489 | unsigned char cmd_buffer[5]; |
@@ -526,10 +506,7 @@ bad: | |||
526 | successfully */ | 506 | successfully */ |
527 | 507 | ||
528 | static int | 508 | static int |
529 | sendpkt (target, buffer, length) | 509 | sendpkt (int target, unsigned char *buffer, int length) |
530 | int target; | ||
531 | unsigned char *buffer; | ||
532 | int length; | ||
533 | { | 510 | { |
534 | int ret = -1; | 511 | int ret = -1; |
535 | unsigned char cmd_buffer[5]; | 512 | unsigned char cmd_buffer[5]; |
@@ -665,7 +642,8 @@ struct net_device * __init pamsnet_probe (int unit) | |||
665 | there is non-reboot way to recover if something goes wrong. | 642 | there is non-reboot way to recover if something goes wrong. |
666 | */ | 643 | */ |
667 | static int | 644 | static int |
668 | pamsnet_open(struct net_device *dev) { | 645 | pamsnet_open(struct net_device *dev) |
646 | { | ||
669 | struct net_local *lp = netdev_priv(dev); | 647 | struct net_local *lp = netdev_priv(dev); |
670 | 648 | ||
671 | if (pamsnet_debug > 0) | 649 | if (pamsnet_debug > 0) |
@@ -694,7 +672,8 @@ pamsnet_open(struct net_device *dev) { | |||
694 | } | 672 | } |
695 | 673 | ||
696 | static int | 674 | static int |
697 | pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { | 675 | pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) |
676 | { | ||
698 | struct net_local *lp = netdev_priv(dev); | 677 | struct net_local *lp = netdev_priv(dev); |
699 | unsigned long flags; | 678 | unsigned long flags; |
700 | 679 | ||
@@ -741,7 +720,8 @@ pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { | |||
741 | /* We have a good packet(s), get it/them out of the buffers. | 720 | /* We have a good packet(s), get it/them out of the buffers. |
742 | */ | 721 | */ |
743 | static void | 722 | static void |
744 | pamsnet_poll_rx(struct net_device *dev) { | 723 | pamsnet_poll_rx(struct net_device *dev) |
724 | { | ||
745 | struct net_local *lp = netdev_priv(dev); | 725 | struct net_local *lp = netdev_priv(dev); |
746 | int boguscount; | 726 | int boguscount; |
747 | int pkt_len; | 727 | int pkt_len; |
@@ -816,7 +796,8 @@ pamsnet_poll_rx(struct net_device *dev) { | |||
816 | * passes them to the higher layers and restarts the timer. | 796 | * passes them to the higher layers and restarts the timer. |
817 | */ | 797 | */ |
818 | static void | 798 | static void |
819 | pamsnet_tick(unsigned long data) { | 799 | pamsnet_tick(unsigned long data) |
800 | { | ||
820 | struct net_device *dev = (struct net_device *)data; | 801 | struct net_device *dev = (struct net_device *)data; |
821 | struct net_local *lp = netdev_priv(dev); | 802 | struct net_local *lp = netdev_priv(dev); |
822 | 803 | ||
@@ -832,7 +813,8 @@ pamsnet_tick(unsigned long data) { | |||
832 | /* The inverse routine to pamsnet_open(). | 813 | /* The inverse routine to pamsnet_open(). |
833 | */ | 814 | */ |
834 | static int | 815 | static int |
835 | pamsnet_close(struct net_device *dev) { | 816 | pamsnet_close(struct net_device *dev) |
817 | { | ||
836 | struct net_local *lp = netdev_priv(dev); | 818 | struct net_local *lp = netdev_priv(dev); |
837 | 819 | ||
838 | if (pamsnet_debug > 0) | 820 | if (pamsnet_debug > 0) |