aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atari_pamsnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atari_pamsnet.c')
-rw-r--r--drivers/net/atari_pamsnet.c62
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
297static void 297static void
298setup_dma (address, rw_flag, num_blocks) 298setup_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
319static int 316static int
320send_first (target, byte) 317send_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
340static int 335static int
341send_1_5 (lun, command, dma) 336send_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
373static int 365static int
374calc_received (start_address) 366calc_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
386static void 377static void
387start (target) 378start (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
395static int 385static int
396stop (target) 386stop (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
417static int 406static int
418testpkt(target) 407testpkt(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
433static int 421static int
434inquiry (target, buffer) 422inquiry (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
470static HADDR 456static 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
493static irqreturn_t 477static irqreturn_t
494pamsnet_intr(irq, data, fp) 478pamsnet_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
503static int 485static int
504receivepkt (target, buffer) 486receivepkt (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
528static int 508static int
529sendpkt (target, buffer, length) 509sendpkt (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 */
667static int 644static int
668pamsnet_open(struct net_device *dev) { 645pamsnet_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
696static int 674static int
697pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { 675pamsnet_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 */
743static void 722static void
744pamsnet_poll_rx(struct net_device *dev) { 723pamsnet_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 */
818static void 798static void
819pamsnet_tick(unsigned long data) { 799pamsnet_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 */
834static int 815static int
835pamsnet_close(struct net_device *dev) { 816pamsnet_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)