Added Jamfile and fixed all warnings that popped up when compiling with -Wall.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3230 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-05-12 23:45:57 +00:00
parent c0f1a43053
commit b263fa5a63
5 changed files with 40 additions and 15 deletions

View File

@ -1,3 +1,4 @@
SubDir OBOS_TOP src add-ons kernel drivers net ; SubDir OBOS_TOP src add-ons kernel drivers net ;
SubInclude OBOS_TOP src add-ons kernel drivers net stack ; SubInclude OBOS_TOP src add-ons kernel drivers net stack ;
SubInclude OBOS_TOP src add-ons kernel drivers net sis900 ;

View File

@ -0,0 +1,32 @@
SubDir OBOS_TOP src add-ons kernel drivers net sis900 ;
# set some additional defines
{
local defines ;
if $(DEBUG) {
defines += DEBUG ;
}
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) -Wall -Wno-multichar ;
}
R5KernelAddon sis900 : [ FDirName kernel drivers net ] :
driver.c
device.c
interface.c
sis900.c
;
rule InstallSiS900
{
Depends $(<) : $(>) ;
}
actions ignore InstallSiS900
{
cp $(>) /boot/home/config/add-ons/kernel/drivers/bin/
}
#InstallSiS900 install : sis900 ;

View File

@ -372,8 +372,6 @@ device_read(void *data, off_t pos, void *buffer, size_t *_length)
status_t status; status_t status;
size_t size; size_t size;
int32 blockFlag; int32 blockFlag;
thread_id threadID = find_thread(NULL);
int32 rxp, rxd;
uint32 check; uint32 check;
int16 current; int16 current;
@ -393,7 +391,7 @@ device_read(void *data, off_t pos, void *buffer, size_t *_length)
return B_ERROR; return B_ERROR;
} }
//TRACE(("current rx descr: %08x (last = %ld)\n", rxp = read32((uint32)info->registers + SiS900_MAC_Rx_DESCR),(info->rxLast+1) % NUM_Rx_DESCR)); //TRACE(("current rx descr: %08x (last = %ld)\n", rxp = read32((uint32)info->registers + SiS900_MAC_Rx_DESCR), (info->rxLast+1) % NUM_Rx_DESCR));
// block until data is available (if blocking is allowed) // block until data is available (if blocking is allowed)
if ((status = acquire_sem_etc(info->rxSem, 1, B_CAN_INTERRUPT | blockFlag, 0)) != B_NO_ERROR) { if ((status = acquire_sem_etc(info->rxSem, 1, B_CAN_INTERRUPT | blockFlag, 0)) != B_NO_ERROR) {
@ -411,7 +409,7 @@ device_read(void *data, off_t pos, void *buffer, size_t *_length)
TRACE(("ERROR: read: buffer %d still in use: %x\n", current, status)); TRACE(("ERROR: read: buffer %d still in use: %x\n", current, status));
atomic_and(&info->rxLock, 0); atomic_and(&info->rxLock, 0);
*_length = 0; *_length = 0;
return; return B_BUSY;
} }
if (check & (SiS900_DESCR_Rx_ABORT | SiS900_DESCR_Rx_OVERRUN | if (check & (SiS900_DESCR_Rx_ABORT | SiS900_DESCR_Rx_OVERRUN |
@ -457,7 +455,6 @@ device_write(void *data, off_t pos, const void *buffer, size_t *_length)
status_t status; status_t status;
uint16 frameSize; uint16 frameSize;
int16 current; int16 current;
thread_id threadID = find_thread(NULL);
uint32 check; uint32 check;
if (checkDeviceInfo(info = data) != B_OK) if (checkDeviceInfo(info = data) != B_OK)

View File

@ -77,7 +77,7 @@ init_driver(void)
PCI_command, 2)); PCI_command, 2));
pciInfo[found++] = info; pciInfo[found++] = info;
dprintf(DEVICE_NAME ": revision = %lx\n", info->revision); dprintf(DEVICE_NAME ": revision = %x\n", info->revision);
info = malloc(sizeof(pci_info)); info = malloc(sizeof(pci_info));
} }

View File

@ -163,7 +163,7 @@ sis900_txInterrupt(struct sis_info *info)
//dprintf("tx %d!\n",info->txInterruptIndex); //dprintf("tx %d!\n",info->txInterruptIndex);
if (status & (SiS900_DESCR_Tx_ABORT | SiS900_DESCR_Tx_UNDERRUN | if (status & (SiS900_DESCR_Tx_ABORT | SiS900_DESCR_Tx_UNDERRUN |
SiS900_DESCR_Tx_OOW_COLLISION)) SiS900_DESCR_Tx_OOW_COLLISION))
dprintf("tx error: %x\n", status); dprintf("tx error: %lx\n", status);
else else
info->txDescriptor[info->txInterruptIndex].status = 0; info->txDescriptor[info->txInterruptIndex].status = 0;
@ -196,7 +196,6 @@ sis900_interrupt(void *data)
int32 handled = B_UNHANDLED_INTERRUPT; int32 handled = B_UNHANDLED_INTERRUPT;
int16 worklimit = 20; int16 worklimit = 20;
uint32 intr; uint32 intr;
uint32 i, j;
cpu_status former; cpu_status former;
former = disable_interrupts(); former = disable_interrupts();
@ -336,7 +335,6 @@ status_t
sis900_initPHYs(struct sis_info *info) sis900_initPHYs(struct sis_info *info)
{ {
uint16 phy; uint16 phy;
uint8 revision;
// search for total of 32 possible MII PHY addresses // search for total of 32 possible MII PHY addresses
for (phy = 0; phy < 32; phy++) { for (phy = 0; phy < 32; phy++) {
@ -471,7 +469,7 @@ sis900_readMode(struct sis_info *info)
uint16 status = mdio_status(info); uint16 status = mdio_status(info);
if (!(status & MII_STATUS_LINK)) { if (!(status & MII_STATUS_LINK)) {
dprintf(DEVICE_NAME ": no link detected (status = %lx)\n", status); dprintf(DEVICE_NAME ": no link detected (status = %x)\n", status);
return 0; return 0;
} }
@ -520,8 +518,6 @@ void
sis900_autoNegotiate(struct sis_info *info) sis900_autoNegotiate(struct sis_info *info)
{ {
uint16 status = mdio_status(info); uint16 status = mdio_status(info);
int32 revision;
int32 mode;
if ((status & MII_STATUS_LINK) == 0) if ((status & MII_STATUS_LINK) == 0)
{ {
@ -655,12 +651,11 @@ sis900_reset(struct sis_info *info)
{ {
uint32 address = (uint32)info->registers + SiS900_MAC_COMMAND; uint32 address = (uint32)info->registers + SiS900_MAC_COMMAND;
int16 tries = 1000; int16 tries = 1000;
status_t status;
TRACE(("sis900 reset\n")); TRACE(("sis900 reset\n"));
//write32((uint32)info->registers + SiS900_MAC_INTR_MASK,0); //write32((uint32)info->registers + SiS900_MAC_INTR_MASK, 0);
//write32((uint32)info->registers + SiS900_MAC_INTR_ENABLE,0); //write32((uint32)info->registers + SiS900_MAC_INTR_ENABLE, 0);
write32(address, SiS900_MAC_CMD_RESET); write32(address, SiS900_MAC_CMD_RESET);