Skip to content

Commit db71f8f

Browse files
committed
3com 3c515: make it compile on 64-bit architectures
This driver isn't enabled most places because of the ISA config dependency, but alpha still has it. And I think the 'Jensen' actually did have an ISA slot. However, it doesn't build cleanly, because the "Vortex bus master" code just casts the skb->data pointer to 'int': outl((int) (skb->data), ioaddr + Wn7_MasterAddr); which is all kinds of broken. Even on a good old traditional PC/AT it would be broken because the high bits will be random kernel address bits, but presumably the hardware ignores those bits. I mean, it's ISA. We're talking 16MB dma limits. The "good old days". Make the build happy with this kind of craziness by using the proper isa_virt_to_bus() handling that the full bus master code uses anyway (the Vortex bus mastering is a limited special case). Who knows, this might even work. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5fe983d commit db71f8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/3com/3c515.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
10501050
#ifdef VORTEX_BUS_MASTER
10511051
if (vp->bus_master) {
10521052
/* Set the bus-master controller to transfer the packet. */
1053-
outl((int) (skb->data), ioaddr + Wn7_MasterAddr);
1053+
outl(isa_virt_to_bus(skb->data), ioaddr + Wn7_MasterAddr);
10541054
outw((skb->len + 3) & ~3, ioaddr + Wn7_MasterLen);
10551055
vp->tx_skb = skb;
10561056
outw(StartDMADown, ioaddr + EL3_CMD);

0 commit comments

Comments
 (0)