331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
331643 |
27-Mar-2018 |
dim |
MFC r314568 (by emaste):
kern_sig.c: ANSIfy and remove archaic register keyword
Sponsored by: The FreeBSD Foundation
MFC r318389 (by emaste):
Remove register keyword from sys/ and ANSIfy prototypes
A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today.
ANSIfy related prototypes while here.
Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10193 |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
315812 |
23-Mar-2017 |
mav |
MFC r311305 (by asomers): Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v".
This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field.
PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 |
315221 |
14-Mar-2017 |
pfg |
MFC r313982, r314068: sys: Replace zero with NULL for pointers.
Found with: devel/coccinelle |
305555 |
07-Sep-2016 |
dim |
MFC r305345:
With clang 3.9.0, compiling ppbus(4) results in the following warnings:
sys/dev/ppbus/ppb_1284.c:296:46: error: implicit conversion from 'int' to 'char' changes value from 144 to -112 [-Werror,-Wconstant-conversion] if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) { ~~~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~ sys/dev/ppbus/ppb_1284.c:785:48: error: implicit conversion from 'int' to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion] if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY, ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ sys/dev/ppbus/ppb_1284.c:786:29: error: implicit conversion from 'int' to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion] nACK | SELECT | PERROR | nBUSY)) { ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
This is because nBUSY is 0x80, so the plain char argument is wrapped to a negative value. Fix this in a minimal fashion, by using uint8_t in a few places.
Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D7771 |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
298955 |
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
296944 |
16-Mar-2016 |
imp |
Fix debug printf
|
296891 |
15-Mar-2016 |
imp |
Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the drivers I've touched, filter out CAM_CDB_PHYS.
Differential Revision: https://reviews.freebsd.org/D5585
|
271849 |
19-Sep-2014 |
glebius |
Mechanically convert to if_inc_counter().
|
257176 |
26-Oct-2013 |
glebius |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
255471 |
11-Sep-2013 |
glebius |
Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is extremely outdated, and I doubt that it was ever used for ifnet drivers. It was used for AF_INET sockets in pre-FreeBSD time.
Approved by: re (hrs) Sponsored by: Nginx, Inc.
|
249925 |
26-Apr-2013 |
glebius |
Add const qualifier to the dst parameter of the ifnet if_output method.
|
249585 |
17-Apr-2013 |
gabor |
- Corrrect mispellings of word useful
Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
|
249582 |
17-Apr-2013 |
gabor |
- Correct mispellings of the word occurrence
Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
|
227849 |
22-Nov-2011 |
hselasky |
Rename device_delete_all_children() into device_delete_children().
Suggested by: jhb @ and marius @ MFC after: 1 week
|
227843 |
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
227814 |
22-Nov-2011 |
attilio |
- Use ppb_assert_locked() rather than using explicit mtx_assert call - Make ppbus code agnostic in regard of INVARIANTS option
MFC after: 2 weeks
|
227758 |
20-Nov-2011 |
attilio |
Introduce macro stubs in the mutex implementation that will be always defined and will allow consumers, willing to provide options, file and line to locking requests, to not worry about options redefining the interfaces. This is typically useful when there is the need to build another locking interface on top of the mutex one.
The introduced functions that consumers can use are: - mtx_lock_flags_ - mtx_unlock_flags_ - mtx_lock_spin_flags_ - mtx_unlock_spin_flags_ - mtx_assert_ - thread_lock_flags_
Spare notes: - Likely we can get rid of all the 'INVARIANTS' specification in the ppbus code by using the same macro as done in this patch (but this is left to the ppbus maintainer) - all the other locking interfaces may require a similar cleanup, where the most notable case is sx which will allow a further cleanup of vm_map locking facilities - The patch should be fully compatible with older branches, thus a MFC is previewed (infact it uses all the underlying mechanisms already present).
Comments review by: eadler, Ben Kaduk Discussed with: kib, jhb MFC after: 1 month
|
227701 |
19-Nov-2011 |
hselasky |
Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children().
MFC after: 1 week
|
226116 |
07-Oct-2011 |
brueffer |
Add missing va_end() to clean up after va_start().
CID: 4725 Found with: Coverity Prevent(tm) MFC after: 1 week
|
223741 |
03-Jul-2011 |
bz |
Tag mbufs of all incoming frames or packets with the interface's FIB setting (either default or if supported as set by SIOCSIFFIB, e.g. from ifconfig).
Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) Reviewed by: julian MFC after: 2 weeks
|
212413 |
10-Sep-2010 |
avg |
bus_add_child: change type of order parameter to u_int
This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds.
Followup to: r212213 MFC after: 10 days
|
207554 |
03-May-2010 |
sobomax |
Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value.
MFC after: 1 month
|
203108 |
28-Jan-2010 |
mav |
MFp4: Large set of CAM inprovements.
- Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs.
|
198358 |
22-Oct-2009 |
brueffer |
Check pointer for NULL before dereferencing it, not after.
PR: 138387, 138388 Submitted by: Patroklos Argyroudis <argp@census-labs.com> MFC after: 1 week
|
198028 |
13-Oct-2009 |
jhb |
Correct a copy/paste bug in a comment. lptclose() checks once a second to see if the ppc hardware has gone idle rather than four times a second.
|
197772 |
05-Oct-2009 |
jhb |
When the timeout backoff hits the maximum value, leave it capped at the maximum value rather than setting it to the result of a boolean expression that is always true.
Submitted by: Joseph Kong MFC after: 1 month
|
197420 |
22-Sep-2009 |
mav |
Lock bus scan.
|
196352 |
18-Aug-2009 |
mav |
Fix iSCSI initiator and vpo driver operation, broken by CAM changes.
Reviewed by: scottl, Danny Braniss Approved by: re (rwatson)
|
191148 |
16-Apr-2009 |
kmacy |
Change if_output to take a struct route as its fourth argument in order to allow passing a cached struct llentry * down to L2
Reviewed by: rwatson
|
189725 |
12-Mar-2009 |
imp |
Make the bit-bang callbacks for i2c implementation match their prototypes.
|
188484 |
11-Feb-2009 |
jhb |
Fix lptopen() and lptclose() to not trash the state of the HAVEBUS flag in 'sc_state'. This allows the lpt_release_ppbus() calls in those two routines to actually release the ppbus and thus fixes the hangs noticed with the lpt(4) driver since the recent ppbus changes. The old lpt(4) driver didn't actually check the HAVEBUS flag in lpt_release_ppbus() which is why these bugs weren't noticed before.
|
188093 |
03-Feb-2009 |
jhb |
Trim what we expose to userland in <dev/ppbus/ppbconf.h> to just the constants used for the ppi(4) ioctls for bits in the control and status registers.
Reviewed by: db
|
187740 |
26-Jan-2009 |
jhb |
Don't unlock the parent ppc lock until after releasing the ppbus.
Submitted by: csjp
|
187714 |
26-Jan-2009 |
jhb |
Add missing locking around setting the ppc interrupt handler IVAR.
Reported by: many
|
187591 |
22-Jan-2009 |
jhb |
Fix a compile bogon. 'ppbus' is used by two different sets of debug code in lptout().
Reported by: several
|
187576 |
21-Jan-2009 |
jhb |
Add locking to ppc and ppbus and mark the whole lot MPSAFE: - To avoid having a bunch of locks that end up always getting acquired as a group, give each ppc(4) device a mutex which it shares with all the child devices including ppbus(4), lpt(4), plip(4), etc. This mutex is then used for all the locking. - Rework the interrupt handling stuff yet again. Now ppbus drivers setup their interrupt handler during attach and tear it down during detach like most other drivers. ppbus(4) only invokes the interrupt handler of the device that currently owns the bus (if any) when an interrupt occurs, however. Also, interrupt handlers in general now accept their softc pointers as their argument rather than the device_t. Another feature of the ppbus interrupt handlers is that they are called with the parent ppc device's lock already held. This minimizes the number of lock operations during an interrupt. - Mark plip(4), lpt(4), pcfclock(4), ppi(4), vpo(4) MPSAFE. - lpbb(4) uses the ppc lock instead of Giant. - Other plip(4) changes: - Add a mutex to protect the global tables in plip(4) and free them on module unload. - Add a detach routine. - Split out the init/stop code from the ioctl routine into separate functions. - Other lpt(4) changes: - Use device_printf(). - Use a dedicated callout for the lptout timer. - Allocate the I/O buffers at attach and detach rather than during open and close as this simplifies the locking at the cost of 1024+32 bytes when the driver is attached. - Other ppi(4) changes: - Use an sx lock to serialize open and close. - Remove unused HADBUS flag. - Add a detach routine. - Use a malloc'd buffer for each read and write to avoid races with concurrent read/write. - Other pps(4) changes: - Use a callout rather than a callout handle with timeout(). - Conform to the new ppbus requirements (regular mutex, non-filter interrupt handler). pps(4) is probably going to have to become a standalone driver that doesn't use ppbus(4) to satisfy it's requirements for low latency as a result. - Use an sx lock to serialize open and close. - Other vpo(4) changes: - Use the parent ppc device's lock to create the CAM sim instead of Giant. - Other ppc(4) changes: - Fix ppc_isa's detach method to detach instead of calling attach.
Tested by: no one :-(
|
185003 |
16-Nov-2008 |
jhb |
Various whitespace and style fixes.
|
184896 |
12-Nov-2008 |
jhb |
Various style and whitespace fixes. Previously parts of this file used 8 space indent, parts used 4 space indent, and other parts used a weird mixture (8 spaces for first indent, 4 spaces for the rest).
|
184164 |
22-Oct-2008 |
jhb |
Fix build breakage.
Pointy hat: jhb
|
184130 |
21-Oct-2008 |
jhb |
Several cleanups to remove the need for explicit unit numbers and a few other fixes: - Add pointers back to device_t objects in softc structures instead of storing the unit and using devclass_get_device(). - Add 'lpbb', 'pcf', 'pps', and 'vpo' child devices to every 'ppbus' device instead of just the first one. - Store softc pointers in si_drv1 of character devices instead of pulling the unit number from the minor number and using devclass_get_softc() and devclass_get_device(). - Store the LP_BYPASS flag in si_drv2 instead of encoding it in the minor number. - Destroy character devices for lpt(4) when detaching the device. - Use bus_print_child_footer() instead of duplicating it in ppbus_print_child() and fix ppbus_print_child()'s return value. - Remove unused AVM ivar from ppbus. - Don't store the 'mode' ivar in the ppbus ivars since we always fetch it from the parent anyway. - Try to detach all the child devices before deleting them in ppbus_detach(). - Use pause() instead of a tsleep() on a dummy address when polling the ppbus. - Use if_printf() and device_printf() instead of explicit names with unit numbers.
Silence on: current@
|
183397 |
27-Sep-2008 |
ed |
Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere.
This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware.
Reviewed by: kib
|
183053 |
15-Sep-2008 |
jhb |
Rework the handling of interrupt handlers for children of ppc and ppbus: - Retire IVARs for passing IRQs around. Instead, ppbus and ppc now allow child devices to access the interrupt by via a rid 0 IRQ resource using bus_alloc_resource_any(). - ppc creates its own interrupt event to manage the interrupt handlers of child devices. ppc does not allow child devices to use filters. It could allow this if needed, but none of the current drivers use them and it adds a good bit of complication. It uses intr_event_execute_handlers() to fire the child device interrupt handlers from its threaded interrupt handler. - Remove the ppbus_dummy_intr() hack. Now the ppc device always has an interrupt handler registered and we no longer bounce all the way up to nexus to manage adding/removing ppbus child interrupt handlers. Instead, the child handlers are added and removed to the private interrupt event in the ppc device.
|
182014 |
22-Aug-2008 |
jhb |
Whitespace fix.
|
182013 |
22-Aug-2008 |
jhb |
Remove unused UNITOSOFTC() macro.
|
181303 |
04-Aug-2008 |
jhb |
Add locking to the various iicbus(4) bridge drivers: - Just grab Giant in the ixp425_iic(4) driver since this driver uses a shared address/data register window pair to access the actual I2C registers. None of the other ixp425 drivers lock access to these shared address/data registers yet and that would need to be done before this could use any meaningful locking. - Add locking to the interrupt handler and 'iicbus_reset' methods of the at91_twi(4) driver. - Add locking to the pcf(4) driver. Other pcf(4) fixes include: - Don't needlessly zero the softc. - Use bus_foo rather than bus_space_foo and remove bus space tag and handle from softc. - The lpbb(4) driver just grabs Giant for now. This will be refined later when ppbus(4) is locked. - As was done with smbus earlier, move the DRIVER_MODULE() lines to match the bus driver (either iicbus or iicbb) to the bridge driver into the bridge drivers.
Tested by: sam (arm/ixp425)
|
175222 |
10-Jan-2008 |
jhb |
Work around problems with the ppbus(4)'s interesting way of managing interrupt handlers for child devices by adding a dummy handler that is always present so that the underlying interrupt thread is always around avoiding panics from stray interrupts.
MFC after: 3 days
|
170872 |
17-Jun-2007 |
scottl |
Prepare for future integration between CAM and newbus. xpt_bus_register now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
|
168752 |
15-Apr-2007 |
scottl |
Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down.
The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
|
167265 |
06-Mar-2007 |
piso |
Remove a useless cast from void * to struct ppb_device *.
|
166914 |
23-Feb-2007 |
imp |
Catchup with filters
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many Approved by: re@
|
165640 |
29-Dec-2006 |
jhb |
Fix fat-fingering in previous commit.
Pointy hat to: jhb
|
165632 |
29-Dec-2006 |
jhb |
Various bpf(4) related fixes to catch places up to the new bpf(4) semantics. - Stop testing bpf pointers for NULL. In some cases use bpf_peers_present() and then call the function directly inside the conditional block instead of the macro. - For places where the entire conditional block is the macro, remove the test and make the macro unconditional. - Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of the old semantics.
Reviewed by: csjp (older version)
|
165102 |
11-Dec-2006 |
mjacob |
Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR: 106543 MFC after: 3 days
|
158651 |
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
157774 |
15-Apr-2006 |
iwasaki |
Import ACPI Dock Station support. Note that this is still very young. Additional detach implementaions (or maybe improvement) for other deivce drivers is required.
Reviewed by: njl, imp MFC after: 1 week
|
155921 |
22-Feb-2006 |
jhb |
- Use bus_setup_intr() and bus_teardown_intr() to register device driver interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR(). Uses of the BUS_*() versions in the implementation of foo_intr methods in bus drivers were not changed. Mostly this just means that some drivers might start printing diagnostic messages like [FAST] when appropriate as well as honoring mpsafenet=0. - Fix two more of the ppbus drivers' identify routines to function correctly in the mythical case of a machine with more than one ppbus.
|
155606 |
13-Feb-2006 |
jhb |
Use a wildcard unit (-1) to device_find_child() in our identify routine to match the wildcard unit passed to BUS_ADD_CHILD().
|
153610 |
21-Dec-2005 |
ru |
Add missing MODULE_DEPEND() so that ppbus.ko and these .ko's can be loaded dynamically.
|
153586 |
21-Dec-2005 |
sam |
bandaid assumption that char is signed
MFC after: 1 week
|
148887 |
09-Aug-2005 |
rwatson |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so.
Reviewed by: pjd, bz MFC after: 7 days
|
147256 |
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go.
Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
145075 |
14-Apr-2005 |
imp |
In ppsintr, we needed ppsdev to get to the softc and nothing else. Save a memory dereference in the ISR by passing this in directly. Calling pps_capture is MP safe for all other operations on struct pps_state, so there's no need to aquire the lock before we do this, even from a fast ISR. Avoid dereferencing sc->ppbus until after pps_capture is called as well. These actions reduce somewhat the cache effects that cause variance in interrupt times. On an especially slow test machine (300MHz Cyrix GXm), this reduces the interrupt latency about about 10% (from 21us to 19us) and helps a little with the variance (although most of the variance seems to be caused by lots of interrupt masking).
This also happens fixes one or two of bde's style issues.
|
143766 |
17-Mar-2005 |
imp |
When locking a MTX_SPIN, one needs to use mtx_lock_spin. Lock the timeout routine as well.
Submitted by: bde
|
143741 |
17-Mar-2005 |
phk |
Remove unused variable.
Detected by: Coverity (ID#704)
|
143398 |
11-Mar-2005 |
imp |
Make the pps interrupt register as MPSAFE and FAST. Use a spin lock to syncrhonize access to the data as a result. This makes the pps less likely to miss the 1ms pulse that I'm feeding it, but not entirely reliable yet on my 133MHz P5.
Reviewed by: phk
|
143390 |
10-Mar-2005 |
imp |
Kill trailing white space
|
143169 |
06-Mar-2005 |
imp |
Back out previous commit. The description didn't match the commit, and marking this interrupt as fast isn't quite right. It also needs to be MP Safe, and I've not done that work (yet).
|
143158 |
05-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT for pci probe return value
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
134391 |
27-Aug-2004 |
andre |
Apply error and success logic consistently to the function netisr_queue() and its users.
netisr_queue() now returns (0) on success and ERRNO on failure. At the moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full) are supported.
Previously it would return (1) on success but the return value of IF_HANDOFF() was interpreted wrongly and (0) was actually returned on success. Due to this schednetisr() was never called to kick the scheduling of the isr. However this was masked by other normal packets coming through netisr_dispatch() causing the dequeueing of waiting packets.
PR: kern/70988 Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 3 days
|
133695 |
13-Aug-2004 |
rwatson |
Since if_plip doesn't contain locking or run with INTR_MPSAFE, mark the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
|
131882 |
09-Jul-2004 |
cognet |
Do not bzero() the softc, as newbus does it for us.
|
131874 |
09-Jul-2004 |
cognet |
Newbus returns a zeroed softc, so there's no need to call bzero() here.
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
129879 |
30-May-2004 |
phk |
Add missing <sys/module.h> includes
|
127189 |
18-Mar-2004 |
guido |
Prevent the strange situation that after each load/unload of a ppbus device, the device is probed multiple times (so each device is detected N times after unloading/loading the module N-1 times).
The real fix is (quote Doug and Warner): > : In an ideal world, there should be some kind of BUS_UNIDENTIFY method > : which a driver could use to delete the devices it created in > : BUS_IDENTIFY. > > Or the bus would have a driver deleted routine that got called and it > would remove all instances of the devclass attached to it.
Reviewed by: Doug Rabson & Warner Losh
|
126080 |
21-Feb-2004 |
phk |
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION.
Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
|
126076 |
21-Feb-2004 |
phk |
Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.
A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
|
124673 |
18-Jan-2004 |
ru |
Apparently there's a good reason why M_WAITOK malloc() is done before xpt_create_path().
|
124670 |
18-Jan-2004 |
ru |
Fixed a memory leak.
Submitted by: Stanford Metacompilation research group
|
123922 |
28-Dec-2003 |
sam |
o eliminate widespread on-stack mbuf use for bpf by introducing a new bpf_mtap2 routine that does the right thing for an mbuf and a variable-length chunk of data that should be prepended. o while we're sweeping the drivers, use u_int32_t uniformly when when prepending the address family (several places were assuming sizeof(int) was 4) o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated mbufs have been eliminated; this may better be moved to the bpf routines
Reviewed by: arch@ and several others
|
121816 |
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics.
Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
|
121775 |
30-Oct-2003 |
brooks |
Remove unused lp_unit member from softc.
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119284 |
22-Aug-2003 |
imp |
Define a module version.
|
118607 |
07-Aug-2003 |
jhb |
Consistently use the BSD u_int and u_short instead of the SYSV uint and ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
114451 |
01-May-2003 |
jhb |
Fix a printf warning from the recent CAM changes.
|
111979 |
08-Mar-2003 |
phk |
Centralize the devstat handling for all GEOM disk device drivers in geom_disk.c.
As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
|
111888 |
04-Mar-2003 |
jlemon |
Update netisr handling; Each SWI now registers its queue, and all queue drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off.
Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
|
111815 |
03-Mar-2003 |
phk |
Gigacommit to improve device-driver source compatibility between branches:
Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values.
This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386.
Approved by: re(scottl)
|
111748 |
02-Mar-2003 |
des |
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
108470 |
30-Dec-2002 |
schweikh |
Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ Add FreeBSD Id tag where missing.
|
108322 |
27-Dec-2002 |
rwatson |
Synchronize mode for ppsX devices to that found previously in MAKEDEV for consistency.
Submitted by: kris
|
108321 |
27-Dec-2002 |
rwatson |
Synchronize make_dev() for pcfclock devices to the values in MAKEDEV for consistency.
Submitted by: kris
|
106937 |
14-Nov-2002 |
sam |
network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls
Reviewed by: many Approved by: re
|
106696 |
09-Nov-2002 |
alfred |
Fix instances of macros with improperly parenthasized arguments.
Verified by: md5
|
106564 |
07-Nov-2002 |
jhb |
d_read_t functions return an int, not a ssize_t. (Considering the fact that read(2) returns a ssize_t perhaps this is a bug in d_read_t?)
|
106563 |
07-Nov-2002 |
jhb |
Warning fixes for sizeof(int) != sizeof(void *).
|
106562 |
07-Nov-2002 |
jhb |
- Make 'irq' intptr_t instead of uintptr_t so it handles a value of -1 properly. - Add a cast to quiet a printf warning.
|
103736 |
21-Sep-2002 |
phk |
Remove empty #if*/#endif clauses.
|
102412 |
25-Aug-2002 |
charnier |
Replace various spelling with FALLTHROUGH which is lint()able
|
97228 |
24-May-2002 |
peter |
Fix warnings due to macro varargs.
|
95523 |
26-Apr-2002 |
phk |
Simplify the RFC2783 and PPS_SYNC timestamp collection API.
|
94154 |
07-Apr-2002 |
ticso |
This makes ppbus childs like lpt and ppi succesfully connect to more than just the first ppbus. The child drivers always tried to attach unit 0.
Reviewed by: gallatin Approved by: gallatin
|
93023 |
23-Mar-2002 |
nsouch |
Major rework of the iicbus/smbus framework:
- VIA chipset SMBus controllers added - alpm driver updated - Support for dynamic modules added - bktr FreeBSD smbus updated but not tested - cleanup
|
92732 |
19-Mar-2002 |
peter |
Fix some gcc-3.1+ warnings: warning: deprecated use of label at end of compound statement umass.c:2626:46: multi-line string literals are deprecated
|
88220 |
19-Dec-2001 |
imp |
Make this driver a better citizen by moving dev creation and other initialization into attach from probe. Also hide a few printfs behind a bootverbose.
approved in principle by: phk
|
87599 |
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
83818 |
22-Sep-2001 |
phk |
Give the pps driver an additional 8 inputs if we can persuade the ppc to go into EPP mode. These 8 inputs are timestamped in polled loop so their resolution will be nanoseconds but their granularity will only be 1/hz.
|
83366 |
12-Sep-2001 |
julian |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
78645 |
23-Jun-2001 |
nsouch |
Translate various ppbus sequences into microsequences to limit overhead of abstraction layers.
Submitted by: jcm@FreeBSD-uk.eu.org
|
78132 |
12-Jun-2001 |
peter |
-Wunused cleanup
|
77837 |
06-Jun-2001 |
phk |
Style fixes from Sascha
PR: 16551 Submitted by: Sascha Schumann <sascha@schumann.cx>
|
75061 |
01-Apr-2001 |
alfred |
make code use strxxx() calls
Glanced at by: imp
|
74810 |
26-Mar-2001 |
phk |
Send the remains (such as I have located) of "block major numbers" to the bit-bucket.
|
71633 |
25-Jan-2001 |
nsouch |
Discard extra status information if -1. This has been breaking the PS/2 mode for ZIP+ drives for a long time. Thanks Jonathon.
Submitted by: j mckitrick <jcm@FreeBSD-uk.eu.org>
|
70608 |
02-Jan-2001 |
nsouch |
Cleanup and improve mode detection. Now, you should get what you actually want according to the modes set with the ppc(4) flags. Especially, it should fix some problems with mode detection of parallel chipsets configured to EPP but which have timing troubles with the drives. In such a case, the driver should now fall back to slower modes (PS2, NIBBLE).
|
69781 |
08-Dec-2000 |
dwmalone |
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
|
69774 |
08-Dec-2000 |
phk |
Staticize some malloc M_ instances.
|
69730 |
07-Dec-2000 |
phk |
Don't use a private malloc(9) type for something this M_DEVBUFish.
Noticed long time ago by: bde
|
69152 |
25-Nov-2000 |
jlemon |
Lock down the network interface queues. The queue mutex must be obtained before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex.
IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged.
Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
|
67164 |
15-Oct-2000 |
phk |
Remove unneeded #include <machine/clock.h>
|
66933 |
10-Oct-2000 |
dfr |
A quote from the ia64 compiler: `char' is promoted to `int' when passed through `...' (so you should pass `int' not `char' to `va_arg')
|
63460 |
18-Jul-2000 |
n_hibma |
Remove an unused variable warning.
|
63458 |
18-Jul-2000 |
n_hibma |
Fix the detection of parallel port Zip drives.
Submitted by: j mckitrick <jcm@freebsd-uk.eu.org> Reviewed by: nsouchu
|
61490 |
10-Jun-2000 |
peter |
Unused include: #include "pps.h"
|
60729 |
20-May-2000 |
obrien |
Match the include protection with the install location.
|
60719 |
19-May-2000 |
obrien |
Rather than use a MD lpt.h, we now use the MI lptio.h.
|
60194 |
07-May-2000 |
n_hibma |
If PERIPH_1284 is not defined, don't even bother calling the BUS_*_INTR functions.
If it is defined, check whether bus_alloc_resource has succeeded. If it hasn't, it is in polled mode. Mike Nowlin reports that this change makes the geek port (whatever _that_ is :-) work again on his machine.
Submitted by: Mike Nowlin <mike@argos.org>
|
60048 |
05-May-2000 |
n_hibma |
Confusing comment.
|
60025 |
05-May-2000 |
phk |
Don't use getebuf() unless you really need a struct buf. Malloc will do fine in this case.
|
59760 |
29-Apr-2000 |
phk |
Remove unneeded #include <sys/kernel.h>
|
59712 |
27-Apr-2000 |
n_hibma |
make the example compile again.
The makefile contains a reference to /sys/dev/ppbus. What really should be done is copy the header files to /usr/include/sys/dev/ppbus.
PR: kern/16767 Submitted by: Jin Guojun (FTG staff) <jin@gracie.lbl.gov>
|
59391 |
19-Apr-2000 |
phk |
Remove ~25 unneeded #include <sys/conf.h> Remove ~60 unneeded #include <sys/malloc.h>
|
59368 |
18-Apr-2000 |
phk |
Remove unneeded <sys/buf.h> includes.
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
|
59093 |
08-Apr-2000 |
dfr |
* Factor out the object system from new-bus so that it can be used by non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware.
This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
|
59077 |
07-Apr-2000 |
jlemon |
If we can't allocate an IRQ resource, fail in the attach routine.
|
59018 |
04-Apr-2000 |
n_hibma |
Add automatic rescan on connect. This happens already if the drive is connected during boot and the vpo module is in the kernel/loaded.
In the case where the module is loaded at some later stage with kldload, the CAM bus is now rescanned as well.
|
58377 |
20-Mar-2000 |
phk |
Isolate the Timecounter internals in their own two files.
Make the public interface more systematically named.
Remove the alternate method, it doesn't do any good, only ruins performance.
Add counters to profile the usage of the 8 access functions.
Apply the beer-ware to my code.
The weird +/- counts are caused by two repocopies behind the scenes: kern/kern_clock.c -> kern/kern_tc.c sys/time.h -> sys/timetc.h (thanks peter!)
|
58082 |
15-Mar-2000 |
green |
I _HATE_ crashes. The lptread() call needs to check LP_BYPASS, because if one tries to use read() on an LP_BYPASS'd dev_t, the softc will be initialized mainly with NULLs, so...
|
57352 |
20-Feb-2000 |
sheldonh |
Fix buffer overrun in pcfclock_read(). The submitter is the original author of the affected code.
PR: 16552 Submitted by: Sascha Schumann <sascha@schumann.cx> Approved by: jkh
|
57177 |
13-Feb-2000 |
peter |
Fix two warnings.
|
57064 |
08-Feb-2000 |
nsouch |
Fix system hang when printer locks on missing paper (also called the "printer fiasco")
Approved by: jkh
|
56618 |
25-Jan-2000 |
dfr |
Make this lot build on alpha.
|
56455 |
23-Jan-2000 |
peter |
Some newbus-inspired tidy-ups. Use device_identify() rather than scanning the resource table to locate children. The 'at ppbus?' can go again. Remove a few #if Nxxx > 0' type things, config arranges this for us. Move the newbus method glue next to the DRIVER_MODULE() stuff so we don't need extra prototypes. Don't set device descriptions until after the possibility of the probe returning an error. Remove all cdevsw_add() calls, all the drivers that did this also use make_dev() correctly, so it's not required. A couple of other minor nits.
|
56293 |
19-Jan-2000 |
jkh |
Add parallel port clock driver. Submitted by: Sascha Schumann <sascha@schumann.cx>
|
55977 |
14-Jan-2000 |
peter |
Make this compile - missing ")";
|
55957 |
14-Jan-2000 |
nsouch |
ppi needs to use a bus method to get this rather than peering inside the 1284 stuff.
Submitted by: Peter Wemm <peter@netplex.com.au>
|
55939 |
14-Jan-2000 |
nsouch |
Port of ppbus standalone framework to the newbus system.
Note1: the correct interrupt level is invoked correctly for each driver. For this purpose, drivers request the bus before being able to call BUS_SETUP_INTR and BUS_TEARDOWN_INTR call is forced by the ppbus core when drivers release it. Thus, when BUS_SETUP_INTR is called at ppbus driver level, ppbus checks that the caller owns the bus and stores the interrupt handler cookie (in order to unregister it later).
Printing is impossible while plip link is up is still TRUE. vpo (ZIP driver) and lpt are make in such a way that using the ZIP and printing concurrently is permitted is also TRUE.
Note2: specific chipset detection is not done by default. PPC_PROBE_CHIPSET is now needed to force chipset detection. If set, the flags 0x40 still avoid detection at boot.
Port of the pcf(4) driver to the newbus system (was previously directly connected to the rootbus and attached by a bogus pcf_isa_probe function).
|
55205 |
29-Dec-1999 |
peter |
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
|
54903 |
20-Dec-1999 |
eivind |
Incorrect NULL -> 0
|
54073 |
03-Dec-1999 |
mdodd |
Remove the 'ivars' arguement to device_add_child() and device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function.
This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc.
Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree.
Reviewed by: peter, dfr
|
51952 |
05-Oct-1999 |
n_hibma |
Print more verbose debugging output Clean up computation of parameters.
|
51658 |
25-Sep-1999 |
phk |
Remove five now unused fields from struct cdevsw. They should never have been there in the first place. A GENERIC kernel shrinks almost 1k.
Add a slightly different safetybelt under nostop for tty drivers.
Add some missing FreeBSD tags
|
51646 |
25-Sep-1999 |
phk |
Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version of our driver modules.
This does not open any security hole, because the bpf core isn't loadable
The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be.
Add a couple of missing FreeBSD tags.
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50254 |
23-Aug-1999 |
phk |
Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.
Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)
Add the correct hook for devfs to kern_conf.c
The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases.
A few drivers had minor additional cleanups performed relating to cdevsw registration.
A few drivers don't register a cdevsw{} anymore, but only use make_dev().
|
50024 |
18-Aug-1999 |
phk |
Add pin-numbers for easy reference.
|
49550 |
08-Aug-1999 |
phk |
Remove compile time limit on number of devices.
|
49549 |
08-Aug-1999 |
phk |
Passing the unit number to an interrupt routing is kind of narrowminded, add a way to get the entire struct ppb_device back.
|
49195 |
29-Jul-1999 |
mdodd |
Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n"
Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.)
Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child())
The BUS_PRINT_CHILD method now returns int instead of void.
Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes.
- Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output.
Reviewed by: dfr, peter
|
48645 |
06-Jul-1999 |
des |
Rename bpfilter to bpf.
|
48248 |
26-Jun-1999 |
n_hibma |
Remove unused variable and computation, possibly leading to a divide by zero fault.
Possible fix for PR12041
PR: 12041 Submitted-By: J.Hudson@massey.ac.nz Reviewed-By: nsouch
|
47718 |
03-Jun-1999 |
peter |
GC unused prototype
|
47640 |
31-May-1999 |
phk |
Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing.
cdevsw_add() will print an message if the d_maj field looks bogus.
Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL.
Move bdevsw() and devsw() functions to kern/kern_conf.c
Bump __FreeBSD_version to 400006
This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions
if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.
I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
|
47625 |
30-May-1999 |
phk |
This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".
Initialize the d_maj and d_bmaj fields.
The d_reset field was not removed, although it is never used.
I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way.
Vinum and i4b not modified, patches emailed to respective authors.
|
46743 |
08-May-1999 |
dfr |
Move the declaration of the interrupt type from the driver structure to the BUS_SETUP_INTR call.
|
46589 |
06-May-1999 |
peter |
GC unused pps_drvinit() declaration
|
46586 |
06-May-1999 |
ken |
The base transfer speed for the parallel port bus is 93K/sec, not 3.3MB/sec.
Submitted by: Nick Hibma <hibma@skylink.it>
|
46585 |
06-May-1999 |
ken |
Take out calls to cam_sim_set_basexfer_speed(), the base transfer speed is now returned in the path inquiry CCB.
Submitted by: Nick Hibma <hibma@skylink.it>
|
46581 |
06-May-1999 |
ken |
Add a number of interrelated CAM feature enhancements and bug fixes.
NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended.
camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate".
- The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device.
- The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates.
- new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases
cam_xpt.c, cam_sim.[ch], cam_ccb.h:
- new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs.
- new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured
- bump the CAM version from 0x10 to 0x11
- Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change.
- add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value.
- Fix the set transfer settings code in the transport layer.
scsi_cd.c:
- make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive.
scsi_da.c:
- attach unless we get a "logical unit not supported" error
scsi_pass.c:
- for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags.
scsi_pass.h:
- change the CAM ioctls to use the CAM version as their group code.
adv driver:
- Allow changing the sync rate and offset separately.
adw driver
- Allow changing the sync rate and offset separately.
aha driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
ahc driver:
- Allow setting offset and sync rate separately
bt driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
NCR driver:
- Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately
Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs.
Reviewed by: gibbs, mjacob (isp), imp (aha)
|
46153 |
28-Apr-1999 |
dt |
s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/. (Edited automatically)
|
46053 |
25-Apr-1999 |
phk |
Allow multiple opens.
|
45575 |
11-Apr-1999 |
eivind |
Staticize.
|
45342 |
05-Apr-1999 |
peter |
Make ppbus compile under egcs. I'm not sure about this casting-to-union- -containing-the-type stuff, but gcc seemed to do it implicitly..
|
44723 |
13-Mar-1999 |
phk |
Reduce Bruce-filter verbosity.
|
44666 |
11-Mar-1999 |
phk |
Make even more of the PPSAPI implementations generic.
FLL support in hardpps()
Various magic shuffles and improved comments
Style fixes from Bruce.
|
43999 |
14-Feb-1999 |
nsouch |
Move away from lpt.h data structure definition that only lpt.c relies on.
Remove if_plip.c dependency to lpt.h.
|
43989 |
14-Feb-1999 |
nsouch |
Rename nlpt to lpt.
Remove from ppi.c the old depreciated module stuff. Print info when if_plip can't use interrupts.
|
43773 |
08-Feb-1999 |
des |
Generate correct DLT_NULL headers before passing packets to bpf. Do not modify m_len before passing mbuf chains to bpf. Don't forget to pass packets to bpf when running in Crynwr mode (LINK0).
Partially based on a patch by Bill Fenner <fenner@freebsd.org>.
PR: bin/7241
|
43772 |
08-Feb-1999 |
des |
Bring in the simplified port probe from src/sys/i386/isa/lpt.c
|
43460 |
31-Jan-1999 |
nsouch |
Fix compile warnings about missing braces around static initialization of unions.
|
43433 |
30-Jan-1999 |
nsouch |
Distinguish EPP address/data register. Add EPP address register access to ppi.
Change microseq offsets. Previously, offsets of the program counter where added to the index of the current microinstruction. Make them rely on the index of the next executed microinstruction.
Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
|
43301 |
27-Jan-1999 |
dillon |
Fix warnings in preparation for adding -Wall -Wcast-qual to the kernel compile
|
43295 |
27-Jan-1999 |
dillon |
Fix warnings preparing for -Wall -Wcast-qual
Also disable one usb module in LINT due to fatal compilation errors, temporary.
|
43293 |
27-Jan-1999 |
dillon |
Fix PPBPRI #define - it was missing parenthesis which messed up a call to tsleep() in dev/ppbus/ppbconf.c. Also fixup initializers.
|
43109 |
23-Jan-1999 |
nsouch |
Replace DEBUG by PLIP_DEBUG option
|
42668 |
14-Jan-1999 |
nsouch |
Terminate negociation if Ext. link negociation succeeds. This avoids the unknown mode panic during boot probe.
|
42654 |
14-Jan-1999 |
jdp |
Replace includes of <sys/kernel.h> with includes of <sys/linker_set.h> in those files that use only the linker set definitions.
|
42536 |
11-Jan-1999 |
nsouch |
Fix missing \n in boot printfs. Add more mode detection if bootverbose.
|
42482 |
10-Jan-1999 |
nsouch |
Fix broken low level ppb_rxxx() return type: char becomes u_char.
Submitted by: Bruce Evans <bde@zeta.org.au>
Some ppb bootup printfs simplified.
|
42475 |
10-Jan-1999 |
nsouch |
Major ppbus commit with:
+ ECP parallel port chipset FIFO detection + DMA+FIFO parallel I/O handled as chipset specific + nlpt updated in order to use the above enhanced parallel I/O. Use 'lptcontrol -e' to use enhanced I/O + Various options documented in LINT + Full IEEE1284 NIBBLE and BYTE modes support. See ppbus(4) for an overview of the IEEE1284 standard + Detection of PnP parallel devices at boot + Read capability added to nlpt driver to get IEEE1284 compliant printer status with a simple 'cat /dev/lpt0' + IEEE1284 peripheral emulation added to BYTE mode. Two computers may dialog according to IEEE1284 signaling method. See PERIPH_1284 option and /sys/dev/ppbus/ppi.c
All this code is supposed to provide basic functions for IEEE1284 programming. ppi.c and nlpt.c may act as examples.
|
42443 |
09-Jan-1999 |
nsouch |
Fix Linux compatible mode. ppb_rxxx() calls are chars, inb() is int.
|
42441 |
09-Jan-1999 |
nsouch |
Fix the disappearing da0 problem.
Submited by: Doug Rabson <dfr@nlsystems.com>
|
41591 |
07-Dec-1998 |
archie |
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static and local variables, goto labels, and functions declared but not defined.
|
41512 |
04-Dec-1998 |
archie |
Eliminate a zillion "left-hand operand of comma expression has no effect" compiler warnings when NLPT_DEBUG is not defined.
|
41042 |
09-Nov-1998 |
nsouch |
Release the ppbus when probe fails.
|
40993 |
07-Nov-1998 |
nsouch |
Define DEBUG only if not already defined, avoiding confusions with opt_global.h
|
40783 |
31-Oct-1998 |
nsouch |
lpbb is the official Philips parallel I2C interface. lpbb.c contains only basic i/o functions, bit-banging mechanism is implemented by dev/iicbus/iicbb.c
immio.c: some bootverbose logs to watch zip+ connect/disconnect process
|
40626 |
24-Oct-1998 |
msmith |
Don't complain about SIOCGIFMEDIA; it's harmless and not something useful here yet.
Submitted by: markm and others
|
40039 |
07-Oct-1998 |
des |
Add missing newline in probe message.
PR: kern/8168 Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
|
39900 |
02-Oct-1998 |
nsouch |
abort imm init if can't disconnect from drive
|
39520 |
20-Sep-1998 |
nsouch |
- port of vpo code to CAM
- ppbus was released before checking if still in disk_mode by vpoio and immio: the microseq (in_disk_mode) was never executed. Fixed.
- nlptintr() renamed to nlpt_intr(). spltty() inserted in nlptintr() before nlpt_intr() call
|
39141 |
13-Sep-1998 |
nsouch |
unused function removed (byte_1284_inbyte)
|
39136 |
13-Sep-1998 |
nsouch |
Lowlevel i/o routines for ZIP+ support. Mostly written with microseq mechanism
|
39134 |
13-Sep-1998 |
nsouch |
ppbus enhanced to support ZIP+ : 1284 code added, microseq improved + some bugs corrected in vpoio.
|
38523 |
24-Aug-1998 |
phk |
Only claim PPS_HARDPPSONASSERT if we're compiled with PPS_SYNC
|
38373 |
17-Aug-1998 |
bde |
Fixed printf format errors.
|
38286 |
12-Aug-1998 |
bde |
Removed unused includes.
|
38061 |
03-Aug-1998 |
msmith |
Major ppbus updates from the author.
- ppbus now supports PLIP via the if_plip driver - ieee1284 infrastructure added, including parallel-port PnP - port microsequencer added, for scripting the sort of port I/O that is common with parallel devices without endless calls up and down through the driver structure. - improved bus ownership behaviour among the ppbus-using drivers. - improved I/O chipset feature detection
The vpo driver is now implemented using the microsequencer, leading to some performance improvements as well as providing an extensive example of its use.
Reviewed by: msmith Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
|
37101 |
21-Jun-1998 |
bde |
Removed unused includes.
|
36941 |
13-Jun-1998 |
phk |
Introduce std_pps_ioctl() to automagically DTRT.
Add scaling capability to timex.offset, ntpd-4.0.73 will support this.
|
36938 |
12-Jun-1998 |
phk |
Update to draft-mogul-pps-api-02.txt as submitted to IETF
|
36748 |
08-Jun-1998 |
bde |
Fixed an ioctl which grew overnight.
|
36739 |
07-Jun-1998 |
phk |
This is a prototype implementation of the draft-mogul-pps-api-##.txt paper.
It will be updated along with the draft and possible subsequent standard.
The ppbus based pps driver is updated to implement this API.
|
36735 |
07-Jun-1998 |
dfr |
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days time.
|
35210 |
15-Apr-1998 |
bde |
Support compiling with `gcc -ansi'.
|
33442 |
16-Feb-1998 |
eivind |
Delete apparently unused DEVFS control device creation code - code didn't even compile. A (now seemingly correct) devfs node is still created.
|
33396 |
15-Feb-1998 |
phk |
A bunch of nits from bde. Make the name "pps" all over the place. Remove the hardcoded 10us offset, use sawtooth for it.
|
33326 |
13-Feb-1998 |
phk |
Man, twice in as many days. Gotta learn to check that uname.
|
33323 |
13-Feb-1998 |
phk |
Add a skelleton pulse-per-second timing driver. This will become more useful when I get my timecounter changes past the Bruce-filter.
|
33181 |
09-Feb-1998 |
eivind |
Staticize.
|
32929 |
31-Jan-1998 |
eivind |
Make the debug options new-style.
This also zaps a DPT option from lint; it wasn't referenced from anywhere.
|
32726 |
24-Jan-1998 |
eivind |
Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.
This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.)
LFS is temporarily disabled, and will be re-enabled tomorrow.
|
32178 |
02-Jan-1998 |
msmith |
Actually implement the internals of the 'ppi' device.
It is now possible to control the various parallel port signals from user-space programs without having to resort to opening /dev/io directly.
|
31493 |
02-Dec-1997 |
phk |
In all such uses of struct buf: 's/b_un.b_addr/b_data/g'
|
29020 |
01-Sep-1997 |
bde |
Oops, the previous change applied a reversed patch.
|
28980 |
01-Sep-1997 |
bde |
Removed unused #includes. The !KERNEL case may be more broken than before.
|
28978 |
01-Sep-1997 |
bde |
Added #include of <sys/queue.h> to make this self-sufficient. Includers of this file apparently didn't know that <sys/queue.h> was a prerequisite and include a semi-random collection headers until one happened to include it.
|
28878 |
29-Aug-1997 |
msmith |
Make the devfs code actually compile. Oops. Submitted by: jkh
|
28864 |
28-Aug-1997 |
msmith |
Remove bogus timeout_func_t casts. Remove unused headers. Remove all but one instance of the device base name. Prototype some local static functions. Consistently reference the softc structure as "sc" rather than "lpt".
Prompted-by: bde
|
28863 |
28-Aug-1997 |
msmith |
Remove bogus i386/* includes.
|
28261 |
16-Aug-1997 |
msmith |
Use cdev major 82 instead of the (reserved-for-local-use) original 14
|
28257 |
16-Aug-1997 |
msmith |
Sync with ppbus-970815 from the author : - interrupt-driven printing now works (nlpt) - Rearrangement of bus-related functions into ppb_base/ppbconf - Addition of ieee1284 interface functions, preliminary parallel-port PnP support
Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
|
28219 |
14-Aug-1997 |
msmith |
New directory and drivers for Parallel Port Bus devices. Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
|
22975 |
22-Feb-1997 |
peter |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
21673 |
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
18444 |
21-Sep-1996 |
bde |
Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: - don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h> instead. This was already done in 4.4Lite for the most important ioctl headers. Header spam currently increases kernel build times by 10-20%. There are more than 30000 #includes (not counting duplicates) for compiling LINT. - include <sys/types.h> if and only it is necessary to make the header almost self-sufficient (some ioctl headers still need structs from elsewhere). - uniformized idempotency ifdefs. Copied the style in the 4.4Lite ioctl headers.
|
8876 |
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
1817 |
02-Aug-1994 |
dg |
Added $Id$
|
1339 |
06-Apr-1994 |
csgr |
Changes to lpt driver: - ansi prototypes in lpt.c - a bit of tidying in lpt.c - ioctl in lpt.c for switching between polling and using interrupts - added lpt.h - needed for ioctl to allow switching between polling and interrupt-driven modes.
|