diff options
| -rw-r--r-- | sys/src/9/pc/pcipc.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sys/src/9/pc/pcipc.c b/sys/src/9/pc/pcipc.c index f618d24ba..a6850d37f 100644 --- a/sys/src/9/pc/pcipc.c +++ b/sys/src/9/pc/pcipc.c @@ -36,17 +36,13 @@ int (*pcicfgrw32)(int, int, int, int) = pcicfgrw32raw; static int pcicfgrw8raw(int tbdf, int rno, int data, int read) { - int o, type; + int o; - if(BUSBNO(tbdf)) - type = 0x01; - else - type = 0x00; switch(pcicfgmode){ case 1: o = rno & 0x03; rno &= ~0x03; - outl(PciADDR, 0x80000000|BUSBDF(tbdf)|rno|type); + outl(PciADDR, 0x80000000|BUSBDF(tbdf)|rno); if(read) data = inb(PciDATA+o); else @@ -72,17 +68,13 @@ pcicfgrw8raw(int tbdf, int rno, int data, int read) static int pcicfgrw16raw(int tbdf, int rno, int data, int read) { - int o, type; + int o; - if(BUSBNO(tbdf)) - type = 0x01; - else - type = 0x00; switch(pcicfgmode){ case 1: o = rno & 0x02; rno &= ~0x03; - outl(PciADDR, 0x80000000|BUSBDF(tbdf)|rno|type); + outl(PciADDR, 0x80000000|BUSBDF(tbdf)|rno); if(read) data = ins(PciDATA+o); else @@ -108,16 +100,10 @@ pcicfgrw16raw(int tbdf, int rno, int data, int read) static int pcicfgrw32raw(int tbdf, int rno, int data, int read) { - int type; - - if(BUSBNO(tbdf)) - type = 0x01; - else - type = 0x00; switch(pcicfgmode){ case 1: rno &= ~0x03; - outl(PciADDR, 0x80000000|BUSBDF(tbdf)|rno|type); + outl(PciADDR, 0x80000000|BUSBDF(tbdf)|rno); if(read) data = inl(PciDATA); else |
