Loading drivers/net/atari_pamsnet.c +22 −40 Original line number Original line Diff line number Diff line Loading @@ -295,10 +295,7 @@ int if_up = 0; /* Setup the DMA counter */ /* Setup the DMA counter */ static void static void setup_dma (address, rw_flag, num_blocks) setup_dma (void *address, unsigned rw_flag, int num_blocks) void *address; unsigned rw_flag; int num_blocks; { { WRITEMODE((unsigned) rw_flag | DMA_FDC | SEC_COUNT | REG_ACSI | WRITEMODE((unsigned) rw_flag | DMA_FDC | SEC_COUNT | REG_ACSI | A1); A1); Loading @@ -317,9 +314,7 @@ setup_dma (address, rw_flag, num_blocks) /* Send the first byte of an command block */ /* Send the first byte of an command block */ static int static int send_first (target, byte) send_first (int target, unsigned char byte) int target; unsigned char byte; { { rw = READ; rw = READ; acsi_delay_end(COMMAND_DELAY); acsi_delay_end(COMMAND_DELAY); Loading @@ -338,10 +333,7 @@ send_first (target, byte) /* Send the rest of an command block */ /* Send the rest of an command block */ static int static int send_1_5 (lun, command, dma) send_1_5 (int lun, unsigned char *command, int dma) int lun; unsigned char *command; int dma; { { int i, j; int i, j; Loading Loading @@ -371,8 +363,7 @@ get_status (void) /* Calculate the number of received bytes */ /* Calculate the number of received bytes */ static int static int calc_received (start_address) calc_received (void *start_address) void *start_address; { { return (int)( return (int)( (((unsigned long)DMAHIGH << 16) | ((unsigned)DMAMID << 8) | DMALOW) (((unsigned long)DMAHIGH << 16) | ((unsigned)DMAMID << 8) | DMALOW) Loading @@ -384,8 +375,7 @@ calc_received (start_address) /* start() starts the PAM's DMA adaptor */ /* start() starts the PAM's DMA adaptor */ static void static void start (target) start (int target) int target; { { send_first(target, START); send_first(target, START); } } Loading @@ -393,8 +383,7 @@ start (target) /* stop() stops the PAM's DMA adaptor and returns a value of zero in case of success */ /* stop() stops the PAM's DMA adaptor and returns a value of zero in case of success */ static int static int stop (target) stop (int target) int target; { { int ret = -1; int ret = -1; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading @@ -415,8 +404,7 @@ stop (target) /* testpkt() returns the number of received packets waiting in the queue */ /* testpkt() returns the number of received packets waiting in the queue */ static int static int testpkt(target) testpkt(int target) int target; { { int ret = -1; int ret = -1; Loading @@ -431,9 +419,7 @@ testpkt(target) /* Please note: The buffer is for internal use only but must be defined! */ /* Please note: The buffer is for internal use only but must be defined! */ static int static int inquiry (target, buffer) inquiry (int target, unsigned char *buffer) int target; unsigned char *buffer; { { int ret = -1; int ret = -1; unsigned char *vbuffer = phys_to_virt((unsigned long)buffer); unsigned char *vbuffer = phys_to_virt((unsigned long)buffer); Loading Loading @@ -468,9 +454,7 @@ inquiry (target, buffer) */ */ static HADDR static HADDR *read_hw_addr(target, buffer) *read_hw_addr(int target, unsigned char *buffer) int target; unsigned char *buffer; { { HADDR *ret = 0; HADDR *ret = 0; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading @@ -491,9 +475,7 @@ static HADDR } } static irqreturn_t static irqreturn_t pamsnet_intr(irq, data, fp) pamsnet_intr(int irq, void *data) int irq; void *data; { { return IRQ_HANDLED; return IRQ_HANDLED; } } Loading @@ -501,9 +483,7 @@ pamsnet_intr(irq, data, fp) /* receivepkt() loads a packet to a given buffer and returns its length */ /* receivepkt() loads a packet to a given buffer and returns its length */ static int static int receivepkt (target, buffer) receivepkt (int target, unsigned char *buffer) int target; unsigned char *buffer; { { int ret = -1; int ret = -1; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading @@ -526,10 +506,7 @@ receivepkt (target, buffer) successfully */ successfully */ static int static int sendpkt (target, buffer, length) sendpkt (int target, unsigned char *buffer, int length) int target; unsigned char *buffer; int length; { { int ret = -1; int ret = -1; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading Loading @@ -665,7 +642,8 @@ struct net_device * __init pamsnet_probe (int unit) there is non-reboot way to recover if something goes wrong. there is non-reboot way to recover if something goes wrong. */ */ static int static int pamsnet_open(struct net_device *dev) { pamsnet_open(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); if (pamsnet_debug > 0) if (pamsnet_debug > 0) Loading Loading @@ -694,7 +672,8 @@ pamsnet_open(struct net_device *dev) { } } static int static int pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); unsigned long flags; unsigned long flags; Loading Loading @@ -741,7 +720,8 @@ pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { /* We have a good packet(s), get it/them out of the buffers. /* We have a good packet(s), get it/them out of the buffers. */ */ static void static void pamsnet_poll_rx(struct net_device *dev) { pamsnet_poll_rx(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); int boguscount; int boguscount; int pkt_len; int pkt_len; Loading Loading @@ -816,7 +796,8 @@ pamsnet_poll_rx(struct net_device *dev) { * passes them to the higher layers and restarts the timer. * passes them to the higher layers and restarts the timer. */ */ static void static void pamsnet_tick(unsigned long data) { pamsnet_tick(unsigned long data) { struct net_device *dev = (struct net_device *)data; struct net_device *dev = (struct net_device *)data; struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); Loading @@ -832,7 +813,8 @@ pamsnet_tick(unsigned long data) { /* The inverse routine to pamsnet_open(). /* The inverse routine to pamsnet_open(). */ */ static int static int pamsnet_close(struct net_device *dev) { pamsnet_close(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); if (pamsnet_debug > 0) if (pamsnet_debug > 0) Loading Loading
drivers/net/atari_pamsnet.c +22 −40 Original line number Original line Diff line number Diff line Loading @@ -295,10 +295,7 @@ int if_up = 0; /* Setup the DMA counter */ /* Setup the DMA counter */ static void static void setup_dma (address, rw_flag, num_blocks) setup_dma (void *address, unsigned rw_flag, int num_blocks) void *address; unsigned rw_flag; int num_blocks; { { WRITEMODE((unsigned) rw_flag | DMA_FDC | SEC_COUNT | REG_ACSI | WRITEMODE((unsigned) rw_flag | DMA_FDC | SEC_COUNT | REG_ACSI | A1); A1); Loading @@ -317,9 +314,7 @@ setup_dma (address, rw_flag, num_blocks) /* Send the first byte of an command block */ /* Send the first byte of an command block */ static int static int send_first (target, byte) send_first (int target, unsigned char byte) int target; unsigned char byte; { { rw = READ; rw = READ; acsi_delay_end(COMMAND_DELAY); acsi_delay_end(COMMAND_DELAY); Loading @@ -338,10 +333,7 @@ send_first (target, byte) /* Send the rest of an command block */ /* Send the rest of an command block */ static int static int send_1_5 (lun, command, dma) send_1_5 (int lun, unsigned char *command, int dma) int lun; unsigned char *command; int dma; { { int i, j; int i, j; Loading Loading @@ -371,8 +363,7 @@ get_status (void) /* Calculate the number of received bytes */ /* Calculate the number of received bytes */ static int static int calc_received (start_address) calc_received (void *start_address) void *start_address; { { return (int)( return (int)( (((unsigned long)DMAHIGH << 16) | ((unsigned)DMAMID << 8) | DMALOW) (((unsigned long)DMAHIGH << 16) | ((unsigned)DMAMID << 8) | DMALOW) Loading @@ -384,8 +375,7 @@ calc_received (start_address) /* start() starts the PAM's DMA adaptor */ /* start() starts the PAM's DMA adaptor */ static void static void start (target) start (int target) int target; { { send_first(target, START); send_first(target, START); } } Loading @@ -393,8 +383,7 @@ start (target) /* stop() stops the PAM's DMA adaptor and returns a value of zero in case of success */ /* stop() stops the PAM's DMA adaptor and returns a value of zero in case of success */ static int static int stop (target) stop (int target) int target; { { int ret = -1; int ret = -1; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading @@ -415,8 +404,7 @@ stop (target) /* testpkt() returns the number of received packets waiting in the queue */ /* testpkt() returns the number of received packets waiting in the queue */ static int static int testpkt(target) testpkt(int target) int target; { { int ret = -1; int ret = -1; Loading @@ -431,9 +419,7 @@ testpkt(target) /* Please note: The buffer is for internal use only but must be defined! */ /* Please note: The buffer is for internal use only but must be defined! */ static int static int inquiry (target, buffer) inquiry (int target, unsigned char *buffer) int target; unsigned char *buffer; { { int ret = -1; int ret = -1; unsigned char *vbuffer = phys_to_virt((unsigned long)buffer); unsigned char *vbuffer = phys_to_virt((unsigned long)buffer); Loading Loading @@ -468,9 +454,7 @@ inquiry (target, buffer) */ */ static HADDR static HADDR *read_hw_addr(target, buffer) *read_hw_addr(int target, unsigned char *buffer) int target; unsigned char *buffer; { { HADDR *ret = 0; HADDR *ret = 0; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading @@ -491,9 +475,7 @@ static HADDR } } static irqreturn_t static irqreturn_t pamsnet_intr(irq, data, fp) pamsnet_intr(int irq, void *data) int irq; void *data; { { return IRQ_HANDLED; return IRQ_HANDLED; } } Loading @@ -501,9 +483,7 @@ pamsnet_intr(irq, data, fp) /* receivepkt() loads a packet to a given buffer and returns its length */ /* receivepkt() loads a packet to a given buffer and returns its length */ static int static int receivepkt (target, buffer) receivepkt (int target, unsigned char *buffer) int target; unsigned char *buffer; { { int ret = -1; int ret = -1; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading @@ -526,10 +506,7 @@ receivepkt (target, buffer) successfully */ successfully */ static int static int sendpkt (target, buffer, length) sendpkt (int target, unsigned char *buffer, int length) int target; unsigned char *buffer; int length; { { int ret = -1; int ret = -1; unsigned char cmd_buffer[5]; unsigned char cmd_buffer[5]; Loading Loading @@ -665,7 +642,8 @@ struct net_device * __init pamsnet_probe (int unit) there is non-reboot way to recover if something goes wrong. there is non-reboot way to recover if something goes wrong. */ */ static int static int pamsnet_open(struct net_device *dev) { pamsnet_open(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); if (pamsnet_debug > 0) if (pamsnet_debug > 0) Loading Loading @@ -694,7 +672,8 @@ pamsnet_open(struct net_device *dev) { } } static int static int pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); unsigned long flags; unsigned long flags; Loading Loading @@ -741,7 +720,8 @@ pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) { /* We have a good packet(s), get it/them out of the buffers. /* We have a good packet(s), get it/them out of the buffers. */ */ static void static void pamsnet_poll_rx(struct net_device *dev) { pamsnet_poll_rx(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); int boguscount; int boguscount; int pkt_len; int pkt_len; Loading Loading @@ -816,7 +796,8 @@ pamsnet_poll_rx(struct net_device *dev) { * passes them to the higher layers and restarts the timer. * passes them to the higher layers and restarts the timer. */ */ static void static void pamsnet_tick(unsigned long data) { pamsnet_tick(unsigned long data) { struct net_device *dev = (struct net_device *)data; struct net_device *dev = (struct net_device *)data; struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); Loading @@ -832,7 +813,8 @@ pamsnet_tick(unsigned long data) { /* The inverse routine to pamsnet_open(). /* The inverse routine to pamsnet_open(). */ */ static int static int pamsnet_close(struct net_device *dev) { pamsnet_close(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev); if (pamsnet_debug > 0) if (pamsnet_debug > 0) Loading