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:
parent
c0f1a43053
commit
b263fa5a63
@ -1,3 +1,4 @@
|
||||
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 sis900 ;
|
||||
|
32
src/add-ons/kernel/drivers/network/sis900/Jamfile
Normal file
32
src/add-ons/kernel/drivers/network/sis900/Jamfile
Normal 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 ;
|
@ -372,8 +372,6 @@ device_read(void *data, off_t pos, void *buffer, size_t *_length)
|
||||
status_t status;
|
||||
size_t size;
|
||||
int32 blockFlag;
|
||||
thread_id threadID = find_thread(NULL);
|
||||
int32 rxp, rxd;
|
||||
uint32 check;
|
||||
int16 current;
|
||||
|
||||
@ -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));
|
||||
atomic_and(&info->rxLock, 0);
|
||||
*_length = 0;
|
||||
return;
|
||||
return B_BUSY;
|
||||
}
|
||||
|
||||
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;
|
||||
uint16 frameSize;
|
||||
int16 current;
|
||||
thread_id threadID = find_thread(NULL);
|
||||
uint32 check;
|
||||
|
||||
if (checkDeviceInfo(info = data) != B_OK)
|
||||
|
@ -77,7 +77,7 @@ init_driver(void)
|
||||
PCI_command, 2));
|
||||
|
||||
pciInfo[found++] = info;
|
||||
dprintf(DEVICE_NAME ": revision = %lx\n", info->revision);
|
||||
dprintf(DEVICE_NAME ": revision = %x\n", info->revision);
|
||||
|
||||
info = malloc(sizeof(pci_info));
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ sis900_txInterrupt(struct sis_info *info)
|
||||
//dprintf("tx %d!\n",info->txInterruptIndex);
|
||||
if (status & (SiS900_DESCR_Tx_ABORT | SiS900_DESCR_Tx_UNDERRUN |
|
||||
SiS900_DESCR_Tx_OOW_COLLISION))
|
||||
dprintf("tx error: %x\n", status);
|
||||
dprintf("tx error: %lx\n", status);
|
||||
else
|
||||
info->txDescriptor[info->txInterruptIndex].status = 0;
|
||||
|
||||
@ -196,7 +196,6 @@ sis900_interrupt(void *data)
|
||||
int32 handled = B_UNHANDLED_INTERRUPT;
|
||||
int16 worklimit = 20;
|
||||
uint32 intr;
|
||||
uint32 i, j;
|
||||
cpu_status former;
|
||||
|
||||
former = disable_interrupts();
|
||||
@ -336,7 +335,6 @@ status_t
|
||||
sis900_initPHYs(struct sis_info *info)
|
||||
{
|
||||
uint16 phy;
|
||||
uint8 revision;
|
||||
|
||||
// search for total of 32 possible MII PHY addresses
|
||||
for (phy = 0; phy < 32; phy++) {
|
||||
@ -471,7 +469,7 @@ sis900_readMode(struct sis_info *info)
|
||||
|
||||
uint16 status = mdio_status(info);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -520,8 +518,6 @@ void
|
||||
sis900_autoNegotiate(struct sis_info *info)
|
||||
{
|
||||
uint16 status = mdio_status(info);
|
||||
int32 revision;
|
||||
int32 mode;
|
||||
|
||||
if ((status & MII_STATUS_LINK) == 0)
|
||||
{
|
||||
@ -655,7 +651,6 @@ sis900_reset(struct sis_info *info)
|
||||
{
|
||||
uint32 address = (uint32)info->registers + SiS900_MAC_COMMAND;
|
||||
int16 tries = 1000;
|
||||
status_t status;
|
||||
|
||||
TRACE(("sis900 reset\n"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user