XXX Due to tradition the wheel is reported as the Z direction (and the Z
direction as W).
Now Apple's Mighty Mouse is fully supported, except the X11 mouse driver
doesn't know what to do with the new coordinate.
a W "coordinate" that can be used for these.
This changes the type of wsmouse_input(). To avoid changing a lot of drivers
a compatibilty #define is provided. Maybe changing all drivers would have
been better?
Add the ability to force ugen to attach with very high priority if "flags 1"
is specified. This can be used with the vendor and product locators to
force ugen to be used for certain devices.
Similarly, uhid only attaches if no other HID driver (ums or ukbd) wants it.
Again, "flags 1" will force uhid to attach anyway.
1 Added new sysctl controls for debugging.
2 Improve detection & support for hardware WEP.
3 Revamp handling of transmit descriptor rings.
4 Reliably IFF_OACTIVE when transmit descriptors are available, to
stop the transmit section of the driver from freezing up.
5 Fix beacon transmission in adhoc and hostap modes. XXX There is
a wart in hostap mode, where beacons are transmitted at 1/2 the
correct rate. Load beacon descriptors when the RTW_INTR_BINT
interrupt arrives; schedule RTW_INTR_BINT 1ms ahead of the target
beacon time.
6 Recover more gracefully from tx/rx errors: avoid
transmitter/receiver/chip resets. Try to re-synchronize software
state with hardware state---e.g., load next descriptor pointer
from hardware.
7 Activate the transmit watchdog timer for beacons as well as other
packets.
8 Introduce rtw_idle() that waits for transmit DMA to finish; call
it before resetting the transmitter.
1 Reset both IFF_OACTIVE and the transmit watchdog timer in
appropriate places to avoid both wedging the transmit section
and spurious transmit timeouts.
2 Reset IFF_ALLMULTI at the top of atw_filter_setup so that the
NIC will filter the multicast packets we are not interested in
after we come out of promiscuous mode.
3 In atw_txdrain, count drained transmit descriptors to avoid
descriptor exhaustion.
Only clear the IFF_OACTIVE flag when we have a chance of being able
to queue a packet to the hardware, instead of when the hardware queue
is empty, and fix up handling and prodding of the tx.
These fixes clear up an occasional "sk0: watchdog timeout" from the
on-board ethernet on my Asus A8V motherboard.
OK christos@
message. In such case we would not update resid with the proper value
(eventually resid would not be updated at all if there was only one data
phase). To fix this, have the script save the offset in the data tables at
disconnect time if there was a transfer, and use this to compute the resid
if the current offset is 0.
Problem reported and patch tested by edwin, Roy Bixler and YAMAMOTO Takashi.
Fix kern/31990 by YAMAMOTO Takashi.
o Intel 82801FBM ICH6M LPC Interface Bridge
o Intel 82801FB/FR PCI Express Port #2
o TI PCIxx21/x515 Cardbus Controller
o TI PCI7x21/7x11 IEEE 1394 Host Controller
o TI PCIxx11/21 Integrated FlashMedia Controller
Each call to the FreeBSD bge_start() routine the transmit producer
pointer index from the chip mailbox register BGE_MBX_TX_HOST_PROD0_LO.
The local copy of that value is then updated by bge_encap() as
bge_encap() encapsulates packets in the Tx ring. If bge_encap()
succeds in encpuslating one or more packets, bge_start() tells the
chip to start sending the newly-encinitiates writes the new value back
to the chip mailbox register.
However, comparison of the Linux drivers (Broadcom-supplied and
open-source tg3.c) and to the OpenSolaris driver confirms that
register BGE_MBX_TX_HOST_PROD0_LO is write-only to software.
Thus, we can just keep a copy in the softc, and eliminate the
(expensive) PCI register write on each call to bge_start().
``Make it so''.
instead of setting it to zero. Otherwise nothing ever sets it unless some code
explicitly changes the baud rate. For a serial console (in particular) we want
to use the baud rate set by the bios (or whatever) and used by theboot code.
This is the way it was before a 'new version of com driver' was added in 1997 (rev 1.99)
shouldn't claim it either, but a buggy software shouldn't be able to crash
the kernel anyway). Should fix port-sparc64/31925 by Johan A.van Zanten
(which should really be kern/31925).
Analysed and patch tested by Martin Husemann.
in some drivers including wd and scsi.
- physio: if a caller provided a buf, stick to use it
because some drivers use it as an identifier.
- sprinkle simple_locks.
- scsistrategy: rather than issueing an async request and
waiting for its completion, simply issue a sync request.
the way to wait for the completion had an assumption that
B_CALL is never used. it isn't the case after the recent
physio() changes.
pointed/analyzed/tested by Martin Husemann.
blindly assuming MCLBYTES will DTRT.
- Use bus_dmamap_load_mbuf() instead of bus_dmamap_load() where
appropriate.
- If we have to coalesce a Tx mbuf chain comprised of more than IWI_MAX_NSEG
segments, allocate a cluster iff the payload won't fit in the header.
- remove bogus multicast handling [pointed out by thorpej]
and don't reset the chip on ENETRESET; ENETRESET is a sign
that only the multicast filter needs changing.
- make a few functions static
- introduce gem_bitwait() to factor out some of the register wait code.
- add gem_stop() in attach
- some DEBUG should be GEM_DEBUG
- handle underrun, packet too long, and overflow errors by resetting the chip
- add handler in ioctl for add/del multi
- fix typo
Also:
- add a shadow sc_if_flags member so that we don't reset the chip if we
don't need to.
The change adopts the idea of fxp to drop the incoming packet and panic
if the old mbuf cannot be reloaded. Since the bus_dmamap is allocated
during attach, this is not supposed to happen. Since a lot of code moves
anyway, factor out the allocation of RX ring elements, which is shared
between the init path and the RX interrupt path.
XXX A better fix might be to borrow the mbuf from the logic end of the
XXX ring buffer, but that needs more involved driver changes.
Reviewed by dyoung@ and nick@
expensive, and pointless. As elsewhere in the kernel (and as approved
under FIPS-140-2 by multiple test labs, incidentally) we use arc4 to
generate IVs here; there is no benefit to their being cryptographically
strong so long as there is a sufficient Hamming distance between them.
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
and 795x. This was present in the driver before, but disabled due to
problems with the actual randomness of generated numbers on the
ubiquitious 7900-series parts. The code here is far, far more
conservative than anyone else's driver for this RNG is -- but I
believe that conservatism is called for, because the 79xx RNG
design is missing a number of pieces from Hifn's "reference" 6500
RNG, and thus the numbers it generates must be treated with some
care.
Support for the 7811 RNG (which is a full-fledged 6500 type
generator) is pretty much the same here as in other variants of
this driver, except that it uses Hifn's "worst case" estimate of
actual entropy per output bit, so it will accumulate bits much
more slowly. The 7811 support is untested.
on (e.g. cardbus), write the wep keys to the card. Fixes problem of
receiving gibberish if one has set wep keys before bringing the
interface up, and also after ifconfig ath0 down; ifconfig ath0 up.
(Tested with current from 20050926 with local mods, and discussed with
sam@ and dyoung@. This is not 100% right, but significantly better
than before. Really we should have an interator in net80211 to repush
all key state, include per-node keys.)
Framebuffer drivers use their own minor device number to find their device entry
in fbdriver methods ( like cgsix uses cgsix_cd[minor] ) but fb passed the fb
device's unit number which works only as long as all registered fb devices use
the same underlying driver. With different fb drivers, like a cgsix and an ffb, both will be (native) unit number 0 so with the old code /dev/fb1 would be
unusable.
This closes a hole pointed out by Thor Lancelot Simon on tech-kern ~3
years ago.
The problem was with running binaries from remote storage, where our
kernel (and Veriexec) has no control over any changes to files.
An attacker could, after the fingerprint has been verified and
program loaded to memory, inject malicious code into the backing
store on the remote storage, followed by a forced flush, causing
a page-in of the malicious data from backing store, bypassing
integrity checks.
Initial implementation by Brett Lymn.
- fix bus_space_read_1 -> bus_space_read_2 since revision 1.27 changed
the bit defines to assume 2 byte reads.
- Increment oerrors in case of collisions
- Clamp success counter to 100, instead of letting rotate freely.
alignment architectures
fix ETHER_ALIGN to 2 (same value as on FreeBSD) - appears VGE_FIXUP_RX
code cuts part of packet otherwise; also add comment about it's purpose
PR: 31323 by Murata Shuuichirou
- only lock the hardware cursor when not in WSDISPLAYIO_MODE_EMUL
- allow cursor position between 0 and (screen width + max. cursor width - 1),
same for height so it can move partially offscreen in all directions
- don't disable/enable as we're already at splnet()
- ack the interrupts early
Fixes my "lost interrupt" problem.
Thanks to dyoung and scw for the suggestions.
so that config_detach() doesn't panic.
(XXX this points to some disagreement between config_attach_pseudo()
and config_detach() over the correct role of pseudo-device cfdata)
ignore errors of codec initializations if at least one
codec is initialized successfully
* azalia_alloc_dmamem()
fail if the HDA controller does not support 64 bit addressing
and buf_dmamap_* allocate a 64 bit address.
Pointed out by Brett Lymn
- introduce rf_buf_queue_check() which checks to see if there
is work to do in the incoming buffer queue
- rf_RaidIOThread() is now responsible for calling raidstart(), and is
also now the only place that calls raidstart()
- raidstrategy() now just queues requests in buf_queue
and signals rf_RaidIOThread() that work has arrived
Hopefully addresses PR#30233
it can fail all too easily. Instead bus_dmamap_load the cached copy and
create the command blocks for the device to load it accordingly.
Thanks to scw and mrg for reviewing this.
Closes PR 29892 (I hope).
Use the newer scan command as this one doesn't crash the firmware when
scanning 802.11a channels.
Thanks to scw and blymn for testing.
Closes PR 31295.
Since the status is now used by ucom(4) driver for Carrier Detect,
and the CLOCAL flag has been required.
By this change, we assume DCD is always on. The CLOCAL flag is not
required now.
so that user can fix the ucom unit number by config file.
ex. ucom0 at ukyopon? portno 1 # modem port
ucom1 at ukyopon? portno 2 # data transfer port
The description of the locator was added to the manual page by someone,
but it has been useless until now. :)
necessary for normal devices, and it prevents some common (but
apparantly buggy) devices from working, including the Apple iPod (mini
and photo) and certain M-Systems DiskOnKey flash devices.
If (also buggy) devices resurface that need this when they are
attached, they can be addressed, ideally in each device's driver.
problems when more than one mach64 is present
- check memory BARs in mach64_mmap() and adjust allowed ranges in case
something ( XFree86 for instance ) changed them
- disable 'standard' framebuffer mapping at offset 0 on sparc64 because some
Sun/ATI firmware likes to map PCI resources there. May be necessary on other
64bit architectures as well.
or pointer type. So on sparc64 (and maybe others too?) where
bus_space_handle_t is a struct, pass the address of the bus_space_handle_t
and adjust the register access functions accordingly.
While there, slightly optimize the bus_space_* usage in the register
access functions and macros.
rev 1.56:
Don't initialize the card (and start an autonegotiation!) every time
the IP address changes. Makes 'dhclient sk0' invocations way faster
and more consistant. i.e. one DHCPREQUEST elicts the DHCPACK.
Fix from FreeBSD:
rev 1.109:
Solve "No PHY found" problem for more Yukon Lite variants.
These changes fixed the problem on my sk(4) trying to get an IP
via dhclient(8).
no need to swap byteorder.
Whele here, change style of some byteswap ops from
foo = bar();
foo = ahc_htole32(foo);
to
foo = ahc_htole32(bar());
XXX: I leave ahc_htole32() usage for union ins_formats for now
XXX: though it may be better to use byte-shift ops rather than byteswap.
allocate a "struct usb_event" on stack in usb_add_event().
This gives just enough breathing space that the box doesn't die
immediately from stack overflow when I insert a
ohci0 at cardbus0 dev 0 function 0: Acer Labs M5237 USB 1.1 Host Controller
* some 8180L cards need a longer time for the srom to initialize; patch
suggested via OpenBSD.
* some cards give '0' for USA, some give '3'; for the meantime, accept both
as being USA locale cards.
* this is RTW, not ATW. :)
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
Also, dispose of a redundant (and unreachable) instance of that check.
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
Also change this to use the proc argument instead of curproc.
information about the context in which wdc_exec_command() was called, but
we may be in interrupt context here. Call wdcwait() with flags derived from
xfer->c_flags instead, as do other wdcwait() callers.
Should fix kern/31083 by Jukka Salmi.
and in a better way than what is done in wddump() (which also does it
for DMA transfers, limiting the dump speed significantly). So remove
code splitting transfers in wd->sc_multi chunks from wddump(), and call
wd->atabus->ata_bio() with the whole transfers.
Problem reported by Frank Kardel, and patch tested by him.
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
then fail
else
ask device match function
This is handled by config_stdsubmatch() now.
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
-fill in the 802.11 "duration" before
-use the intended channel (still not perfect because this is not
necessarily the hardware setting, but better than before)
while this doesn't make the driver work for me, it kills some
red herrings which I've just wasted time for
- remove driver-private key allocators; use the default one instead
so wpa keys are handled properly (if_ral.c, if_ural.c rev 1.9)
- remove local mods that snuck into rev 1.6 (if_ral.c rev 1.10)
userland interface (yet), basically just can detect a TS-DIO24 on a ISA
bus and provide an attachment for sub-devices.
The TS-DIO24 contains 24 programmable digital input/outputs.
The HD44780 actually doesn't support 4 lines, but the 4 line displays
use two chips, one for the top two lines and one for the bottom
two lines. The chips share the databus, register-select, and write
signals but have separate enable signals.
VOP_GETATTR() fills a struct vattr, where va_fsid and va_fileid (device
and inode..) are typed as long.
Add some casts when using these values and surround them with XXXs about
the potential size mismatch, as long can be 64 bits but dev_t and ino_t
are always 32 bits. This is safe because *for now* we're still using
32 bit inode numbers.
Discussed with blymn@.
host byte order (eventually the byte swapping could be wired in hardware, on
the 16 bit data bus). This was keept when wdc_exec_command() was created,
and as a result wdc_exec_command() is doing 16bit conversion to host byte
order. This is fine for IDENTIFY but doesn't work for other opaque data
structure, such as the ones for SMART.
So change wdc_exec_command() to do the conversion to host byte order only for
WDCC_IDENTIFY and ATAPI_IDENTIFY_DEVICE. This fixes atactl smart status
on big-endian hosts.
While here change __wdccommand_intr() to only use wdc_data{in,out}_pio, there
is no gain in doing the 32bit data port stuff locally.
comment.
All platforms will now send a change in direction, then the 32 MDO bits
when synchronising with the phy. Rather than sending the change in
direction with the first MDO bit.
bit 2 or 3. Thanks to Takeshi Nakayama for catching it.
(With this mistake the code was still working for the first channel, because
the reset of the second channel would disable/enable the first one).
is set to NULL, use the generic reset code.
Use this to work around a bug in some Acer IDE controllers (like the
one found in some sparc systems) where a controller disable/enable
is required after a reset to avoid data corruption when Ultra-DMA is
used. Workaround from opensolaris, thanks to Hiroki Sato for testing.
firmware likes to put PCI memory resources into this range, notably a Rage
IIc which puts the 2nd register aperture to 0x2000.
This should allow a few graphics chips to work with XFree86 which previously
failed with something like this:
(WW) ATI: PCI/AGP Mach64 in slot 2:5:0 could not be detected!
No devices to configure. Configuration failed.
Thanks to Florian Stoehr for doing most of the work tracking this down.