Commit 2f220e30 authored by Al Viro's avatar Al Viro Committed by Jeff Garzik

skfp annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent eca1ad82
...@@ -401,18 +401,18 @@ static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac, ...@@ -401,18 +401,18 @@ static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac,
/* int len ; length of the frame including the FC */ /* int len ; length of the frame including the FC */
{ {
int i ; int i ;
u_int *p ; __le32 *p ;
CHECK_NPP() ; CHECK_NPP() ;
MARW(off) ; /* set memory address reg for writes */ MARW(off) ; /* set memory address reg for writes */
p = (u_int *) mac ; p = (__le32 *) mac ;
for (i = (len + 3)/4 ; i ; i--) { for (i = (len + 3)/4 ; i ; i--) {
if (i == 1) { if (i == 1) {
/* last word, set the tag bit */ /* last word, set the tag bit */
outpw(FM_A(FM_CMDREG2),FM_ISTTB) ; outpw(FM_A(FM_CMDREG2),FM_ISTTB) ;
} }
write_mdr(smc,MDR_REVERSE(*p)) ; write_mdr(smc,le32_to_cpu(*p)) ;
p++ ; p++ ;
} }
...@@ -444,7 +444,7 @@ static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac, ...@@ -444,7 +444,7 @@ static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac,
*/ */
static void directed_beacon(struct s_smc *smc) static void directed_beacon(struct s_smc *smc)
{ {
SK_LOC_DECL(u_int,a[2]) ; SK_LOC_DECL(__le32,a[2]) ;
/* /*
* set UNA in frame * set UNA in frame
...@@ -458,9 +458,9 @@ static void directed_beacon(struct s_smc *smc) ...@@ -458,9 +458,9 @@ static void directed_beacon(struct s_smc *smc)
CHECK_NPP() ; CHECK_NPP() ;
/* set memory address reg for writes */ /* set memory address reg for writes */
MARW(smc->hw.fp.fifo.rbc_ram_start+DBEACON_FRAME_OFF+4) ; MARW(smc->hw.fp.fifo.rbc_ram_start+DBEACON_FRAME_OFF+4) ;
write_mdr(smc,MDR_REVERSE(a[0])) ; write_mdr(smc,le32_to_cpu(a[0])) ;
outpw(FM_A(FM_CMDREG2),FM_ISTTB) ; /* set the tag bit */ outpw(FM_A(FM_CMDREG2),FM_ISTTB) ; /* set the tag bit */
write_mdr(smc,MDR_REVERSE(a[1])) ; write_mdr(smc,le32_to_cpu(a[1])) ;
outpw(FM_A(FM_SABC),smc->hw.fp.fifo.rbc_ram_start + DBEACON_FRAME_OFF) ; outpw(FM_A(FM_SABC),smc->hw.fp.fifo.rbc_ram_start + DBEACON_FRAME_OFF) ;
} }
......
...@@ -50,12 +50,12 @@ struct err_st { ...@@ -50,12 +50,12 @@ struct err_st {
* Transmit Descriptor struct * Transmit Descriptor struct
*/ */
struct s_smt_fp_txd { struct s_smt_fp_txd {
u_int txd_tbctrl ; /* transmit buffer control */ __le32 txd_tbctrl ; /* transmit buffer control */
u_int txd_txdscr ; /* transmit frame status word */ __le32 txd_txdscr ; /* transmit frame status word */
u_int txd_tbadr ; /* physical tx buffer address */ __le32 txd_tbadr ; /* physical tx buffer address */
u_int txd_ntdadr ; /* physical pointer to the next TxD */ __le32 txd_ntdadr ; /* physical pointer to the next TxD */
#ifdef ENA_64BIT_SUP #ifdef ENA_64BIT_SUP
u_int txd_tbadr_hi ; /* physical tx buffer addr (high dword)*/ __le32 txd_tbadr_hi ; /* physical tx buffer addr (high dword)*/
#endif #endif
char far *txd_virt ; /* virtual pointer to the data frag */ char far *txd_virt ; /* virtual pointer to the data frag */
/* virt pointer to the next TxD */ /* virt pointer to the next TxD */
...@@ -67,12 +67,12 @@ struct s_smt_fp_txd { ...@@ -67,12 +67,12 @@ struct s_smt_fp_txd {
* Receive Descriptor struct * Receive Descriptor struct
*/ */
struct s_smt_fp_rxd { struct s_smt_fp_rxd {
u_int rxd_rbctrl ; /* receive buffer control */ __le32 rxd_rbctrl ; /* receive buffer control */
u_int rxd_rfsw ; /* receive frame status word */ __le32 rxd_rfsw ; /* receive frame status word */
u_int rxd_rbadr ; /* physical rx buffer address */ __le32 rxd_rbadr ; /* physical rx buffer address */
u_int rxd_nrdadr ; /* physical pointer to the next RxD */ __le32 rxd_nrdadr ; /* physical pointer to the next RxD */
#ifdef ENA_64BIT_SUP #ifdef ENA_64BIT_SUP
u_int rxd_rbadr_hi ; /* physical tx buffer addr (high dword)*/ __le32 rxd_rbadr_hi ; /* physical tx buffer addr (high dword)*/
#endif #endif
char far *rxd_virt ; /* virtual pointer to the data frag */ char far *rxd_virt ; /* virtual pointer to the data frag */
/* virt pointer to the next RxD */ /* virt pointer to the next RxD */
......
This diff is collapsed.
...@@ -495,7 +495,7 @@ static int skfp_open(struct net_device *dev) ...@@ -495,7 +495,7 @@ static int skfp_open(struct net_device *dev)
PRINTK(KERN_INFO "entering skfp_open\n"); PRINTK(KERN_INFO "entering skfp_open\n");
/* Register IRQ - support shared interrupts by passing device ptr */ /* Register IRQ - support shared interrupts by passing device ptr */
err = request_irq(dev->irq, (void *) skfp_interrupt, IRQF_SHARED, err = request_irq(dev->irq, skfp_interrupt, IRQF_SHARED,
dev->name, dev); dev->name, dev);
if (err) if (err)
return err; return err;
...@@ -1644,7 +1644,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1644,7 +1644,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
// Get RIF length from Routing Control (RC) field. // Get RIF length from Routing Control (RC) field.
cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header. cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header.
ri = ntohs(*((unsigned short *) cp)); ri = ntohs(*((__be16 *) cp));
RifLength = ri & FDDI_RCF_LEN_MASK; RifLength = ri & FDDI_RCF_LEN_MASK;
if (len < (int) (FDDI_MAC_HDR_LEN + RifLength)) { if (len < (int) (FDDI_MAC_HDR_LEN + RifLength)) {
printk("fddi: Invalid RIF.\n"); printk("fddi: Invalid RIF.\n");
......
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