config space. According to the SB800-Series Southbridges Register Reference
Guide, we can still read this value from PM config space using indirect I/O.
systems, from OpenBSD.
At this time it can only map the framebuffer and attaches wscons,
using whatever resolution was configured by the firmware.
It doens't support any accelaration or mode change.
available in the devs array. Change the type of the devs array from
char to uint8_t. Treat the return value of pci_bus_devorder() as the
number of slots that it filled.
Don't use the __PCI_BUS_DEVORDER #definition to configure the kernel
but let the linker do it. Make pci_bus_devorder() available on all
architectures by adding a default implementation that will DTRT on
all architectures but hpcmips, the only architecture to #define
__PCI_BUS_DEVORDER. On hpcmips, adapt the implementation to the new
calling convention.
XXX I can compile an hpcmips GENERIC kernel, but I don't have a
XXX hpcmips box to test it on.
Use named constants and more conventional variable names in
pci_msi_establish() and pci_msi_disestablish(). Fix a couple of bugs:
pci_msi_establish() returned a pointer to the struct intrhand instead of
to the struct msi_hdl as it was intended to, and pci_msi_disestablish()
did not free(9) the msi_hdl.
with a PCI Express interface, in legacy mode. Cursorily tested with a
StarTech PEX2S952LP.
See the manual for your adapter to see how to put it into legacy mode.
There is also a "native" mode that uses a different clock multiplier
and (I think) provides a richer feature set, but also requires a bit of
additional initialization (see FreeBSD's puc(4)).
The native-mode PCI functions use different PCI Device IDs than the
legacy-mode functions.
-cardbus doesn't use multiple interrupt lines like PCI, and it doesn't
use machanisms like interrupt line register and swizzling -- no need
to carry around dummy information, this is all dealt with by the
bridge
(I'm asking myself how "rbus_ppb" can work -- a bridge attached to
cardbus just can't work like a normal PCI bridge as far as interrupts
are concerned. I thing that should be a hardware specific driver
because behavior is not covered by a standard.)
-cardbus always uses 3.3V -- no need for a variable to keep track
of the voltage
PCI_BAR(1), .... There was no change in the generated assembly. I used
this semantic patch:
@ mapsit @
identifier bar;
expression pact;
@@
(
pci_mapreg_map
|
Cardbus_mapreg_map
)(pact, bar, ...)
@ depends on mapsit @
identifier mapsit.bar;
@@
(
- #define bar 0x10
+ #define bar PCI_BAR(0)
|
- #define bar 0x14
+ #define bar PCI_BAR(1)
|
- #define bar 0x18
+ #define bar PCI_BAR(2)
|
- #define bar 0x1C
+ #define bar PCI_BAR(3)
|
- #define bar 0x20
+ #define bar PCI_BAR(4)
)
cxdtv0 at pci0 dev 14 function 2: pcHDTV HD-5500 HDTV Video Capture (rev. 0x05)
cxdtv0: interrupting at irq 10
cxdtv0: lg3303: found @ 0x59
cxdtv0: tvpll: LG TDVS-H06xF
dtv0 at cxdtv0: CX23880 [ATSC]
to automatically revert the byte order in all descriptors.
Make sure this feature is inactive. Otherwise the driver is unable to
receive or transmit any frame.
- Added initialize code for SB16C105x to puc.c, but
It is better to add a member (*config_function)() to
struct puc_device_description and use it
- It seems SB16C1054 *rev 0x91* has different BAR layout, but not supported yet.
anywhere afaics
(The confusion comes probably from use of arc4random() at various places,
but this lives in libkern and doesn't share code with the former.)
-g/c non-implementation of arc4 encryption in swcrypto(4)
-remove special casing of ARC4 in crypto(4) -- the point is that it
doesn't use an IV, and this fact is made explicit by the new "ivsize"
property of xforms
Michael Moll <kvedulv@kvedulv.de>, taken from openbsd.
XXX: move the #if 0'd usage of PCI_VENDOR_CITICORP inside the #if 0 code
XXX: region, as this id conflits with the (4th) fijutsi id.
specifically tell a driver that bridges upstream forward PCI I/O (or
memory) transactions to the device." Only bus drivers have any business
modifying these.
SUNIX vendor Id 0x1fd4 and product Id 0x1999. Constants were taken from
Linux open source driver distributed by SUNIX.
The following models should be supported now:
5008 1 parallel port
5016 16 serial ports, only 8 supported right now (PUC_MAX_PORTS limit)
5027 1 serial port
5037 2 serial ports
5056 4 serial ports
5066 8 serial ports, this model is the only one that was actually tested.
5069 1 serial port and 1 parallel port
5079 2 serial ports and 1 parallel port
5099 4 serial ports and 1 parallel port
handled):
- export bge(4) and bnx(4) CHIP ID and PHY flags to brgphy(4). Move to
"unsigned int" rather than "int", and reuse the same softc members for
chipid and phyflags (behavior controlled by the sc_isbge/isbnx boolean).
- apply bug fix for revisions A and B, so that autonegotiation can
complete (from OpenBSD).
Bug reported by Rivo Nurges via private mail, patch tested and
confirmed working by him (with thanks!)
- call vte_rxfilter() after starting transmit/receive; this seems to
fix some IPv6-related multicast issues for me
- when the MCR0_BROADCAST bit is set broadcast receive is disabled.
Rename it to MCR0_BROADCAST_DIS to reflect its function, and fix usage.
- Fix loop over multicast addresses to not set the same address in the
3 perfect filter slots.
Our driver initializes the Broadcom hardware to peform a tcp and udp
checksum on only the payload of the tcp or udp packet, rather than the
entire packet. The FreeBSD, OpenBSD and Linux drivers instruct the hardware to compute
the checksum for the entire packet. I believe the bug is that some revisions
of the BCM hardware, under certain circumstances, revert to doing the
complete checksum calculation, as the FreeBSD, OpenBSD and Linux drivers
request, while things are running. As
a result, when we pull the computed checksum from the hardware and pass it
up to the upper layers, we assume the checksum is the more minimal
one, and the upper layers perform the appropriate checks, which, when this
happens, cause the packet to be rejected because the resultant checksum is
decidedly incorrect.
This patch changes the driver to instruct the hardware to perform the
checksum over the entire packet, just as the FreeBSD, OpenBSD and
Linux drivers do, and to notify the upper layers appropriately.
This patch appears to work on all revisions of the hardware that have been
tested. (See the list in the bug report.)
this patch is approved by tls.
bge_init() and so does not get called when a vlan child is added. Calling
bge_setvlan() from bge_ifflags_cb() doesn't work either as it appears that
the callback is called before ec_capenable is updated by if_vlan.c.
the PCI Command Register instead of PCI_FLAGS_IO_ENABLED |
PCI_FLAGS_MEM_ENABLED. The latter amounts to the same value, but the
names are in the pa_flags namespace instead of the PCI Command Register
bits namespace.
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.
For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:
Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.
siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.
slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.
viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.
While I'm here, make pci_mapreg_submap() static.
With these changes in place, I have tested the compilation of these
kernels:
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:
### evbmips-el GDIUM
nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop
### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'
### ia64 GENERIC
/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type
### sgimips GENERIC32_IP3x
crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
- always bus_dmamap_unload() before recycling a receive descriptor
- make sure to not sleep from interrupt context: call bus_dmamap_load with
M_NOWAIT, and create dma maps BUS_DMA_ALLOCNOW.
- if a receive descriptor has a NULL mbuf try to allocate a new one, don't
try to receive it.