Commit a55d3471 authored by Jeff Garzik's avatar Jeff Garzik

Merge pobox.com:/garz/repo/linux-2.6

into pobox.com:/garz/repo/netdev-2.6/viro-eth1
parents d1370cf6 c02c7ccf
This diff is collapsed.
...@@ -443,7 +443,7 @@ static void __devexit streamer_remove_one(struct pci_dev *pdev) ...@@ -443,7 +443,7 @@ static void __devexit streamer_remove_one(struct pci_dev *pdev)
static int streamer_reset(struct net_device *dev) static int streamer_reset(struct net_device *dev)
{ {
struct streamer_private *streamer_priv; struct streamer_private *streamer_priv;
__u8 *streamer_mmio; __u8 __iomem *streamer_mmio;
unsigned long t; unsigned long t;
unsigned int uaa_addr; unsigned int uaa_addr;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
...@@ -591,7 +591,7 @@ static int streamer_reset(struct net_device *dev) ...@@ -591,7 +591,7 @@ static int streamer_reset(struct net_device *dev)
static int streamer_open(struct net_device *dev) static int streamer_open(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv; struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
unsigned long flags; unsigned long flags;
char open_error[255]; char open_error[255];
int i, open_finished = 1; int i, open_finished = 1;
...@@ -908,7 +908,7 @@ static void streamer_rx(struct net_device *dev) ...@@ -908,7 +908,7 @@ static void streamer_rx(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
struct streamer_rx_desc *rx_desc; struct streamer_rx_desc *rx_desc;
int rx_ring_last_received, length, frame_length, buffer_cnt = 0; int rx_ring_last_received, length, frame_length, buffer_cnt = 0;
struct sk_buff *skb, *skb2; struct sk_buff *skb, *skb2;
...@@ -1035,7 +1035,7 @@ static irqreturn_t streamer_interrupt(int irq, void *dev_id, struct pt_regs *reg ...@@ -1035,7 +1035,7 @@ static irqreturn_t streamer_interrupt(int irq, void *dev_id, struct pt_regs *reg
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
__u16 sisr; __u16 sisr;
__u16 misr; __u16 misr;
u8 max_intr = MAX_INTR; u8 max_intr = MAX_INTR;
...@@ -1158,7 +1158,7 @@ static int streamer_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1158,7 +1158,7 @@ static int streamer_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
unsigned long flags ; unsigned long flags ;
spin_lock_irqsave(&streamer_priv->streamer_lock, flags); spin_lock_irqsave(&streamer_priv->streamer_lock, flags);
...@@ -1209,7 +1209,7 @@ static int streamer_close(struct net_device *dev) ...@@ -1209,7 +1209,7 @@ static int streamer_close(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -1275,7 +1275,7 @@ static void streamer_set_rx_mode(struct net_device *dev) ...@@ -1275,7 +1275,7 @@ static void streamer_set_rx_mode(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
__u8 options = 0; __u8 options = 0;
struct dev_mc_list *dmi; struct dev_mc_list *dmi;
unsigned char dev_mc_address[5]; unsigned char dev_mc_address[5];
...@@ -1334,7 +1334,7 @@ static void streamer_set_rx_mode(struct net_device *dev) ...@@ -1334,7 +1334,7 @@ static void streamer_set_rx_mode(struct net_device *dev)
static void streamer_srb_bh(struct net_device *dev) static void streamer_srb_bh(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv; struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
__u16 srb_word; __u16 srb_word;
writew(streamer_priv->srb, streamer_mmio + LAPA); writew(streamer_priv->srb, streamer_mmio + LAPA);
...@@ -1531,7 +1531,7 @@ static void streamer_arb_cmd(struct net_device *dev) ...@@ -1531,7 +1531,7 @@ static void streamer_arb_cmd(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
__u8 header_len; __u8 header_len;
__u16 frame_len, buffer_len; __u16 frame_len, buffer_len;
struct sk_buff *mac_frame; struct sk_buff *mac_frame;
...@@ -1747,7 +1747,7 @@ static void streamer_asb_bh(struct net_device *dev) ...@@ -1747,7 +1747,7 @@ static void streamer_asb_bh(struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
if (streamer_priv->asb_queued == 1) if (streamer_priv->asb_queued == 1)
{ {
...@@ -1855,7 +1855,7 @@ static int sprintf_info(char *buffer, struct net_device *dev) ...@@ -1855,7 +1855,7 @@ static int sprintf_info(char *buffer, struct net_device *dev)
{ {
struct streamer_private *streamer_priv = struct streamer_private *streamer_priv =
(struct streamer_private *) dev->priv; (struct streamer_private *) dev->priv;
__u8 *streamer_mmio = streamer_priv->streamer_mmio; __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
struct streamer_adapter_addr_table sat; struct streamer_adapter_addr_table sat;
struct streamer_parameters_table spt; struct streamer_parameters_table spt;
int size = 0; int size = 0;
...@@ -1939,7 +1939,7 @@ static int streamer_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -1939,7 +1939,7 @@ static int streamer_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{ {
int i; int i;
struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv; struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
u8 *streamer_mmio = streamer_priv->streamer_mmio; u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
switch(cmd) { switch(cmd) {
case IOCTL_SISR_MASK: case IOCTL_SISR_MASK:
......
...@@ -293,7 +293,7 @@ struct streamer_private { ...@@ -293,7 +293,7 @@ struct streamer_private {
struct streamer_private *next; struct streamer_private *next;
struct pci_dev *pci_dev; struct pci_dev *pci_dev;
__u8 *streamer_mmio; __u8 __iomem *streamer_mmio;
char *streamer_card_name; char *streamer_card_name;
spinlock_t streamer_lock; spinlock_t streamer_lock;
......
This diff is collapsed.
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
static const char *arlan_diagnostic_info_string(struct net_device *dev) static const char *arlan_diagnostic_info_string(struct net_device *dev)
{ {
volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card; struct arlan_private *priv = netdev_priv(dev);
volatile struct arlan_shmem __iomem *arlan = priv->card;
u_char diagnosticInfo; u_char diagnosticInfo;
READSHM(diagnosticInfo, arlan->diagnosticInfo, u_char); READSHM(diagnosticInfo, arlan->diagnosticInfo, u_char);
...@@ -113,7 +114,8 @@ static const char *arlan_diagnostic_info_string(struct net_device *dev) ...@@ -113,7 +114,8 @@ static const char *arlan_diagnostic_info_string(struct net_device *dev)
static const char *arlan_hardware_type_string(struct net_device *dev) static const char *arlan_hardware_type_string(struct net_device *dev)
{ {
u_char hardwareType; u_char hardwareType;
volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card; struct arlan_private *priv = netdev_priv(dev);
volatile struct arlan_shmem __iomem *arlan = priv->card;
READSHM(hardwareType, arlan->hardwareType, u_char); READSHM(hardwareType, arlan->hardwareType, u_char);
switch (hardwareType) switch (hardwareType)
...@@ -189,7 +191,8 @@ static void arlan_print_diagnostic_info(struct net_device *dev) ...@@ -189,7 +191,8 @@ static void arlan_print_diagnostic_info(struct net_device *dev)
u_char diagnosticInfo; u_char diagnosticInfo;
u_short diagnosticOffset; u_short diagnosticOffset;
u_char hardwareType; u_char hardwareType;
volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card; struct arlan_private *priv = netdev_priv(dev);
volatile struct arlan_shmem __iomem *arlan = priv->card;
// ARLAN_DEBUG_ENTRY("arlan_print_diagnostic_info"); // ARLAN_DEBUG_ENTRY("arlan_print_diagnostic_info");
...@@ -254,7 +257,8 @@ static int arlan_hw_test_memory(struct net_device *dev) ...@@ -254,7 +257,8 @@ static int arlan_hw_test_memory(struct net_device *dev)
int i; int i;
int memlen = sizeof(struct arlan_shmem) - 0xF; /* avoid control register */ int memlen = sizeof(struct arlan_shmem) - 0xF; /* avoid control register */
volatile char *arlan_mem = (char *) (dev->mem_start); volatile char *arlan_mem = (char *) (dev->mem_start);
volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card; struct arlan_private *priv = netdev_priv(dev);
volatile struct arlan_shmem __iomem *arlan = priv->card;
char pattern; char pattern;
ptr = NULL; ptr = NULL;
...@@ -319,7 +323,8 @@ static int arlan_hw_test_memory(struct net_device *dev) ...@@ -319,7 +323,8 @@ static int arlan_hw_test_memory(struct net_device *dev)
static int arlan_setup_card_by_book(struct net_device *dev) static int arlan_setup_card_by_book(struct net_device *dev)
{ {
u_char irqLevel, configuredStatusFlag; u_char irqLevel, configuredStatusFlag;
volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card; struct arlan_private *priv = netdev_priv(dev);
volatile struct arlan_shmem __iomem *arlan = priv->card;
// ARLAN_DEBUG_ENTRY("arlan_setup_card"); // ARLAN_DEBUG_ENTRY("arlan_setup_card");
......
...@@ -332,7 +332,7 @@ struct TxParam ...@@ -332,7 +332,7 @@ struct TxParam
/* Information that need to be kept for each board. */ /* Information that need to be kept for each board. */
struct arlan_private { struct arlan_private {
struct net_device_stats stats; struct net_device_stats stats;
struct arlan_shmem * card; struct arlan_shmem __iomem * card;
struct arlan_shmem * conf; struct arlan_shmem * conf;
struct arlan_conf_stru * Conf; struct arlan_conf_stru * Conf;
...@@ -403,14 +403,12 @@ struct arlan_private { ...@@ -403,14 +403,12 @@ struct arlan_private {
#define ARLAN_COM_INT 0x80 #define ARLAN_COM_INT 0x80
#define TXLAST(dev) (((struct arlan_private *)dev->priv)->txRing[((struct arlan_private *)dev->priv)->txLast]) #define TXLAST(dev) (((struct arlan_private *)netdev_priv(dev))->txRing[((struct arlan_private *)netdev_priv(dev))->txLast])
#define TXHEAD(dev) (((struct arlan_private *)dev->priv)->txRing[0]) #define TXHEAD(dev) (((struct arlan_private *)netdev_priv(dev))->txRing[0])
#define TXTAIL(dev) (((struct arlan_private *)dev->priv)->txRing[1]) #define TXTAIL(dev) (((struct arlan_private *)netdev_priv(dev))->txRing[1])
#define TXBuffStart(dev) \ #define TXBuffStart(dev) offsetof(struct arlan_shmem, txBuffer)
((int)(((struct arlan_private *)dev->priv)->card)->txBuffer) - ((int)(((struct arlan_private *)dev->priv)->card) ) #define TXBuffEnd(dev) offsetof(struct arlan_shmem, xxBuffer)
#define TXBuffEnd(dev) \
((int)(((struct arlan_private *)dev->priv)->card)->rxBuffer) - ((int)(((struct arlan_private *)dev->priv)->card)
#define READSHM(to,from,atype) {\ #define READSHM(to,from,atype) {\
atype tmp;\ atype tmp;\
...@@ -451,16 +449,16 @@ struct arlan_private { ...@@ -451,16 +449,16 @@ struct arlan_private {
#define registrationBad(dev)\ #define registrationBad(dev)\
( ( READSHMB(((struct arlan_private *)dev->priv)->card->registrationMode) > 0) && \ ( ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode) > 0) && \
( READSHMB(((struct arlan_private *)dev->priv)->card->registrationStatus) == 0) ) ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0) )
#define readControlRegister(dev)\ #define readControlRegister(dev)\
READSHMB(((struct arlan_private *)dev->priv)->card->cntrlRegImage) READSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage)
#define writeControlRegister(dev, v){\ #define writeControlRegister(dev, v){\
WRITESHMB(((struct arlan_private *)dev->priv)->card->cntrlRegImage ,((v) &0xF) );\ WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\
WRITESHMB(((struct arlan_private *)dev->priv)->card->controlRegister ,(v) );} WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v) );}
#define arlan_interrupt_lancpu(dev) {\ #define arlan_interrupt_lancpu(dev) {\
......
...@@ -213,7 +213,7 @@ static dev_link_t *netwave_attach(void); /* Create instance */ ...@@ -213,7 +213,7 @@ static dev_link_t *netwave_attach(void); /* Create instance */
static void netwave_detach(dev_link_t *); /* Destroy instance */ static void netwave_detach(dev_link_t *); /* Destroy instance */
/* Hardware configuration */ /* Hardware configuration */
static void netwave_doreset(ioaddr_t iobase, u_char* ramBase); static void netwave_doreset(ioaddr_t iobase, u_char __iomem *ramBase);
static void netwave_reset(struct net_device *dev); static void netwave_reset(struct net_device *dev);
/* Misc device stuff */ /* Misc device stuff */
...@@ -322,7 +322,7 @@ typedef struct netwave_private { ...@@ -322,7 +322,7 @@ typedef struct netwave_private {
dev_link_t link; dev_link_t link;
spinlock_t spinlock; /* Serialize access to the hardware (SMP) */ spinlock_t spinlock; /* Serialize access to the hardware (SMP) */
dev_node_t node; dev_node_t node;
u_char *ramBase; u_char __iomem *ramBase;
int timeoutCounter; int timeoutCounter;
int lastExec; int lastExec;
struct timer_list watchdog; /* To avoid blocking state */ struct timer_list watchdog; /* To avoid blocking state */
...@@ -341,12 +341,12 @@ static struct net_device_stats *netwave_get_stats(struct net_device *dev); ...@@ -341,12 +341,12 @@ static struct net_device_stats *netwave_get_stats(struct net_device *dev);
* The Netwave card is little-endian, so won't work for big endian * The Netwave card is little-endian, so won't work for big endian
* systems. * systems.
*/ */
static inline unsigned short get_uint16(u_char* staddr) static inline unsigned short get_uint16(u_char __iomem *staddr)
{ {
return readw(staddr); /* Return only 16 bits */ return readw(staddr); /* Return only 16 bits */
} }
static inline short get_int16(u_char* staddr) static inline short get_int16(u_char __iomem * staddr)
{ {
return readw(staddr); return readw(staddr);
} }
...@@ -363,7 +363,7 @@ static inline void wait_WOC(unsigned int iobase) ...@@ -363,7 +363,7 @@ static inline void wait_WOC(unsigned int iobase)
} }
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
static void netwave_snapshot(netwave_private *priv, u_char *ramBase, static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase,
ioaddr_t iobase) { ioaddr_t iobase) {
u_short resultBuffer; u_short resultBuffer;
...@@ -398,8 +398,8 @@ static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev) ...@@ -398,8 +398,8 @@ static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev)
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
netwave_private *priv = (netwave_private *) dev->priv; netwave_private *priv = netdev_priv(dev);
u_char *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
struct iw_statistics* wstats; struct iw_statistics* wstats;
wstats = &priv->iw_stats; wstats = &priv->iw_stats;
...@@ -447,7 +447,7 @@ static dev_link_t *netwave_attach(void) ...@@ -447,7 +447,7 @@ static dev_link_t *netwave_attach(void)
dev = alloc_etherdev(sizeof(netwave_private)); dev = alloc_etherdev(sizeof(netwave_private));
if (!dev) if (!dev)
return NULL; return NULL;
priv = dev->priv; priv = netdev_priv(dev);
link = &priv->link; link = &priv->link;
link->priv = dev; link->priv = dev;
...@@ -591,8 +591,8 @@ static int netwave_set_nwid(struct net_device *dev, ...@@ -591,8 +591,8 @@ static int netwave_set_nwid(struct net_device *dev,
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
netwave_private *priv = (netwave_private *) dev->priv; netwave_private *priv = netdev_priv(dev);
u_char *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
spin_lock_irqsave(&priv->spinlock, flags); spin_lock_irqsave(&priv->spinlock, flags);
...@@ -649,8 +649,8 @@ static int netwave_set_scramble(struct net_device *dev, ...@@ -649,8 +649,8 @@ static int netwave_set_scramble(struct net_device *dev,
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
netwave_private *priv = (netwave_private *) dev->priv; netwave_private *priv = netdev_priv(dev);
u_char *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
spin_lock_irqsave(&priv->spinlock, flags); spin_lock_irqsave(&priv->spinlock, flags);
...@@ -765,8 +765,8 @@ static int netwave_get_snap(struct net_device *dev, ...@@ -765,8 +765,8 @@ static int netwave_get_snap(struct net_device *dev,
{ {
unsigned long flags; unsigned long flags;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
netwave_private *priv = (netwave_private *) dev->priv; netwave_private *priv = netdev_priv(dev);
u_char *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
spin_lock_irqsave(&priv->spinlock, flags); spin_lock_irqsave(&priv->spinlock, flags);
...@@ -998,14 +998,14 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) ...@@ -998,14 +998,14 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static void netwave_pcmcia_config(dev_link_t *link) { static void netwave_pcmcia_config(dev_link_t *link) {
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
netwave_private *priv = dev->priv; netwave_private *priv = netdev_priv(dev);
tuple_t tuple; tuple_t tuple;
cisparse_t parse; cisparse_t parse;
int i, j, last_ret, last_fn; int i, j, last_ret, last_fn;
u_char buf[64]; u_char buf[64];
win_req_t req; win_req_t req;
memreq_t mem; memreq_t mem;
u_char *ramBase = NULL; u_char __iomem *ramBase = NULL;
DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link);
...@@ -1071,7 +1071,7 @@ static void netwave_pcmcia_config(dev_link_t *link) { ...@@ -1071,7 +1071,7 @@ static void netwave_pcmcia_config(dev_link_t *link) {
/* Store base address of the common window frame */ /* Store base address of the common window frame */
ramBase = ioremap(req.Base, 0x8000); ramBase = ioremap(req.Base, 0x8000);
((netwave_private*)dev->priv)->ramBase = ramBase; priv->ramBase = ramBase;
dev->irq = link->irq.AssignedIRQ; dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1; dev->base_addr = link->io.BasePort1;
...@@ -1120,7 +1120,7 @@ static void netwave_pcmcia_config(dev_link_t *link) { ...@@ -1120,7 +1120,7 @@ static void netwave_pcmcia_config(dev_link_t *link) {
static void netwave_release(dev_link_t *link) static void netwave_release(dev_link_t *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
netwave_private *priv = dev->priv; netwave_private *priv = netdev_priv(dev);
DEBUG(0, "netwave_release(0x%p)\n", link); DEBUG(0, "netwave_release(0x%p)\n", link);
...@@ -1151,7 +1151,8 @@ static void netwave_release(dev_link_t *link) ...@@ -1151,7 +1151,8 @@ static void netwave_release(dev_link_t *link)
* *
*/ */
static int netwave_event(event_t event, int priority, static int netwave_event(event_t event, int priority,
event_callback_args_t *args) { event_callback_args_t *args)
{
dev_link_t *link = args->client_data; dev_link_t *link = args->client_data;
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -1204,7 +1205,8 @@ static int netwave_event(event_t event, int priority, ...@@ -1204,7 +1205,8 @@ static int netwave_event(event_t event, int priority,
* *
* Proper hardware reset of the card. * Proper hardware reset of the card.
*/ */
static void netwave_doreset(ioaddr_t ioBase, u_char* ramBase) { static void netwave_doreset(ioaddr_t ioBase, u_char __iomem *ramBase)
{
/* Reset card */ /* Reset card */
wait_WOC(ioBase); wait_WOC(ioBase);
outb(0x80, ioBase + NETWAVE_REG_PMR); outb(0x80, ioBase + NETWAVE_REG_PMR);
...@@ -1219,8 +1221,8 @@ static void netwave_doreset(ioaddr_t ioBase, u_char* ramBase) { ...@@ -1219,8 +1221,8 @@ static void netwave_doreset(ioaddr_t ioBase, u_char* ramBase) {
*/ */
static void netwave_reset(struct net_device *dev) { static void netwave_reset(struct net_device *dev) {
/* u_char state; */ /* u_char state; */
netwave_private *priv = (netwave_private*) dev->priv; netwave_private *priv = netdev_priv(dev);
u_char *ramBase = priv->ramBase; u_char __iomem *ramBase = priv->ramBase;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
DEBUG(0, "netwave_reset: Done with hardware reset\n"); DEBUG(0, "netwave_reset: Done with hardware reset\n");
...@@ -1310,8 +1312,8 @@ static int netwave_hw_xmit(unsigned char* data, int len, ...@@ -1310,8 +1312,8 @@ static int netwave_hw_xmit(unsigned char* data, int len,
DataOffset; DataOffset;
int tmpcount; int tmpcount;
netwave_private *priv = (netwave_private *) dev->priv; netwave_private *priv = netdev_priv(dev);
u_char* ramBase = priv->ramBase; u_char __iomem * ramBase = priv->ramBase;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
...@@ -1402,11 +1404,12 @@ static int netwave_start_xmit(struct sk_buff *skb, struct net_device *dev) { ...@@ -1402,11 +1404,12 @@ static int netwave_start_xmit(struct sk_buff *skb, struct net_device *dev) {
* ready to transmit another packet. * ready to transmit another packet.
* 3. A command has completed execution. * 3. A command has completed execution.
*/ */
static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs) { static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs)
{
ioaddr_t iobase; ioaddr_t iobase;
u_char *ramBase; u_char __iomem *ramBase;
struct net_device *dev = (struct net_device *)dev_id; struct net_device *dev = (struct net_device *)dev_id;
struct netwave_private *priv = dev->priv; struct netwave_private *priv = netdev_priv(dev);
dev_link_t *link = &priv->link; dev_link_t *link = &priv->link;
int i; int i;
...@@ -1536,7 +1539,7 @@ static void netwave_watchdog(struct net_device *dev) { ...@@ -1536,7 +1539,7 @@ static void netwave_watchdog(struct net_device *dev) {
} /* netwave_watchdog */ } /* netwave_watchdog */
static struct net_device_stats *netwave_get_stats(struct net_device *dev) { static struct net_device_stats *netwave_get_stats(struct net_device *dev) {
netwave_private *priv = (netwave_private*)dev->priv; netwave_private *priv = netdev_priv(dev);
update_stats(dev); update_stats(dev);
...@@ -1559,7 +1562,7 @@ static struct net_device_stats *netwave_get_stats(struct net_device *dev) { ...@@ -1559,7 +1562,7 @@ static struct net_device_stats *netwave_get_stats(struct net_device *dev) {
static void update_stats(struct net_device *dev) { static void update_stats(struct net_device *dev) {
//unsigned long flags; //unsigned long flags;
/* netwave_private *priv = (netwave_private*) dev->priv; */ /* netwave_private *priv = netdev_priv(dev); */
//spin_lock_irqsave(&priv->spinlock, flags); //spin_lock_irqsave(&priv->spinlock, flags);
...@@ -1569,9 +1572,10 @@ static void update_stats(struct net_device *dev) { ...@@ -1569,9 +1572,10 @@ static void update_stats(struct net_device *dev) {
//spin_unlock_irqrestore(&priv->spinlock, flags); //spin_unlock_irqrestore(&priv->spinlock, flags);
} }
static int netwave_rx(struct net_device *dev) { static int netwave_rx(struct net_device *dev)
netwave_private *priv = (netwave_private*)(dev->priv); {
u_char *ramBase = priv->ramBase; netwave_private *priv = netdev_priv(dev);
u_char __iomem *ramBase = priv->ramBase;
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
u_char rxStatus; u_char rxStatus;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
...@@ -1659,7 +1663,7 @@ static int netwave_rx(struct net_device *dev) { ...@@ -1659,7 +1663,7 @@ static int netwave_rx(struct net_device *dev) {
} }
static int netwave_open(struct net_device *dev) { static int netwave_open(struct net_device *dev) {
netwave_private *priv = dev->priv; netwave_private *priv = netdev_priv(dev);
dev_link_t *link = &priv->link; dev_link_t *link = &priv->link;
DEBUG(1, "netwave_open: starting.\n"); DEBUG(1, "netwave_open: starting.\n");
...@@ -1676,7 +1680,7 @@ static int netwave_open(struct net_device *dev) { ...@@ -1676,7 +1680,7 @@ static int netwave_open(struct net_device *dev) {
} }
static int netwave_close(struct net_device *dev) { static int netwave_close(struct net_device *dev) {
netwave_private *priv = (netwave_private *)dev->priv; netwave_private *priv = netdev_priv(dev);
dev_link_t *link = &priv->link; dev_link_t *link = &priv->link;
DEBUG(1, "netwave_close: finishing.\n"); DEBUG(1, "netwave_close: finishing.\n");
...@@ -1721,7 +1725,8 @@ module_exit(exit_netwave_cs); ...@@ -1721,7 +1725,8 @@ module_exit(exit_netwave_cs);
static void set_multicast_list(struct net_device *dev) static void set_multicast_list(struct net_device *dev)
{ {
ioaddr_t iobase = dev->base_addr; ioaddr_t iobase = dev->base_addr;
u_char* ramBase = ((netwave_private*) dev->priv)->ramBase; netwave_private *priv = netdev_priv(dev);
u_char __iomem * ramBase = priv->ramBase;
u_char rcvMode = 0; u_char rcvMode = 0;
#ifdef PCMCIA_DEBUG #ifdef PCMCIA_DEBUG
......
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