* removed ancient-kernel compat code from sk_mca.h. I leave
it to janitors to remove the now-useless SKMCA_xxx wrappers.
* removed ancient-kernel compat code from sk_mca.c.
* s/SKMCA_NETDEV/net_device/
* fixed static net_device initialization (this will go away
when dynamic-alloc patches land)
[netdrvr] fix skb_padto bugs introduced when skb_padto was introduced
It seems that skb_padto security fixes in 2.4 and 2.5 trying
to fix "CAN-2003-0001:Multiple ethernet NID device drivers
do not pad frames with null bytes", do not put the skb_padto
blocks in proper places in the 3c527, eth16i, fmv18x, seeq8005,
yellowfin device drivers.
In case a driver calls skb_padto(), it is possible
that the space available in the original skb buffer tailroom is less
than the space to pad. In this case, in short, the skb_padto()
will create a new skb buffer, copy data from the original
skb buffer to a new skb buffer, free the original buffer,
and finally return the new buffer.
If this happens to the aforementioned device drivers, they come to
point to wrong data. And, for 3c527 and yellowfin, the drivers can
unexpectedly double free the original skb buffers since they still
point to the original skb buffers. The attached patch against
2.4.23pre1 fixes these issues.
[PATCH] cable detection fixes for HPT37x controllers
From Duncan Laurie <duncan@sun.com>
This same patch made its way into 2.4 via the -ac tree but hasn't
been put in 2.6 yet.
It fixes some cable detect issues that stem from the fact that the
cable detect pins are also used as address/data lines, so they need
to first be configured as inputs to read valid cable detect state.
Jeff Garzik [Sun, 31 Aug 2003 04:48:45 +0000 (00:48 -0400)]
[netdrvr 8139too] remove useless board names
The only thing that differentiated most of the entries in the
board_info[] table and the board_t type was the vendor branding
string for the board. This table is a pain to maintain, so we
prefer to simply use "RTL8129" or "RTL8139".
Jeff Garzik [Sat, 30 Aug 2003 22:08:02 +0000 (18:08 -0400)]
[netdrvr 8139too] make features more persistent; fix PCI DAC mode
* only set PCIDAC (64-bit PCI) bit in hardware if
sizeof(dma_addr_t) > 32. Need a better test for whether
64-bit mode is _really_ needed.
* cache chip command register in private struct. this allows
the setting of rx-vlan, rx-csum, and other features to be
persistent across the entire lifetime of the net device.
* remove dead private struct members frag_skb, dropping_frag,
and pci_using_dac.
Jeff Garzik [Sat, 30 Aug 2003 18:45:43 +0000 (14:45 -0400)]
[netdrvr 8139cp] small cleanups
* remove netif_queue_stopped test, netif_wake_queue already does that
* move vlan stuff to top of file
* remove __dev markers
* update todo list at top of file
* remove pci_set_dma_mask argument casts; ULL suffixes preferred.
Jeff Garzik [Sat, 30 Aug 2003 18:11:42 +0000 (14:11 -0400)]
[netdrvr 8139cp] support NAPI on RX path; Ditch RX frag handling.
NAPI is turned on unconditionally for the RX path. The hardware
supports interrupt mitigation, so that should be investigated too.
RX fragment handling removed. We simply ensure that we alloc
buffers large enough to hold incoming packets. Any stray RX
frags that occur (shouldn't be any) will be dropped.
François Romieu [Wed, 27 Aug 2003 14:09:50 +0000 (10:09 -0400)]
[netdrvr sis190] use PCI DMA API for RX buffers
Missing pieces for DMA-API on the Rx side:
- SiS190_init_ring: the global area for the received data is mapped.
This area is persistent during the whole driver's life.
It only needs to be unmapped in SiS190_close() as no other exit/error
path exists.
- SiS190_rx_interrupt: no map/unmap for received data buffer. A single
sync operation is done. Btw, there is no need to store the same value
in RxDescArray[cur_rx].buf_addr over and over again.
- Remove driver dependancy on CONFIG_BROKEN.
[netdrvr sis900] don't call pci_find_device from irq context
I realized that I've had this patch in my tree for a while, and forgot
to send it to you and lkml. The patch below fixes bug number 923:
http://bugme.osdl.org/show_bug.cgi?id=923
(basically keeps us from calling pci_find_device from interrupt
context.)
It's been tested by a few people with this device, and they say it works
just fine for them. Please forward it on up the food chain.
François Romieu [Tue, 26 Aug 2003 14:24:15 +0000 (10:24 -0400)]
[netdrvr sis190] remove unneeded alignment code, other small fixes
Driver does not need to enforce 256 byte alignment for data returned
from pci_alloc_consistent().
- {rx/tx}_dma_aligned and {rx/td}_dma_raw are both replaced by {rx/tx}_dma;
- {rx/tx}_desc_raw is replaced by direct use of {Rx/Tx}DescArray;
- SiS190_open()
+ fixup for a lack of kmalloc() failure handling;
+ (return status) there is no need for both retval/rc: merge them;
+ anonymous printk() fixup: the name of the guilty device is printed;
- define {RX/TX}_DESC_TOTAL_SIZE because I am too lazy to read twice the
same lengthy arithmetic expression.
Jeff Garzik [Tue, 26 Aug 2003 12:00:16 +0000 (08:00 -0400)]
[netdrvr sis190] convert TX path to use PCI DMA API
Also, minor changes:
* mark ->hard_start_xmit ETH_ZLEN test as unlikely()
* use cpu_to_le32() and le32_to_cpu() in TX path
* fix two leak in error path, in ->hard_start_xmit
* don't test netif_queue_stopped() in TX completion path,
netif_wake_queue() already does that.
Paul Mackerras [Sat, 23 Aug 2003 22:15:37 +0000 (08:15 +1000)]
PPC32: Add the fadvise64_64 system call.
On PPC32 we reorder the arguments so they fit into 6 registers. Glibc will
need a two-line stub to change them from the standard order to the ordering
used by the system call: (fd, advice, offset, len).
Erik Andersen [Fri, 22 Aug 2003 11:29:33 +0000 (04:29 -0700)]
[PATCH] Fix cdrom error handling in 2.6
In both 2.4 and in 2.6, error handling for bad cdrom media is
wrong. And it is my fault I'm afraid, since I botched an earlier
fix for the problem by putting the fix in the wrong spot.
My kids have a "Jumpstart Toddlers" cd they have long since
completely killed, which makes a great test disc. Without this
fix, the best time projection I can get for completing a dd type
sector copy is about 2 years... Most of that is spent thrashing
about in kernel space trying to re-read sectors we already know
are not correctable.... After the fix, I was able to rip a copy
the CD (or rather muddle through it getting lots of EIO errors)
in about 15 minutes.
Linus Torvalds [Thu, 21 Aug 2003 15:50:34 +0000 (08:50 -0700)]
The Intel Instruction set manual is wrong on how to test for
a valid SEP bit. The errata has it right: you have to have at
least model 3, stepping 3. Not "model >= 3 or stepping >= 3".
Trond Myklebust [Thu, 21 Aug 2003 11:42:05 +0000 (04:42 -0700)]
A request cannot be used as part of the RTO estimation if it gets
resent since you don't know whether the server is replying to the
first or the second transmission. However we're currently setting
the cutoff point to be the timeout of the first transmission.
This patch moves the cutoff point to the actual start of the
retransmission.
Trond Myklebust [Thu, 21 Aug 2003 11:27:54 +0000 (04:27 -0700)]
If an RPC request has to be resent due to a timeout, it turns out
that call_encode() may cause rq_rcv_buf to be reset despite the fact
that a reply might be delivered at any moment by a softirq.
This typically results in 'NFS: server cheating in read reply'
error messages.
Solve by adding rq_private_buf, which is updated atomically from
rq_rcv_buf.
Fix APIC ID lookup. In the bios_cpu_apicid[] case, it would walk off
the end of bios_cpu_apicid[] and attempt to send APIC INIT messages to
garbage without this patch, and in the NUMA-Q case, it would attempt to
send NMI wakeups to destinations in the broadcast cluster (which is
harmless, but very poor form) without this patch.