aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Implement PCI_IVAR_ETHADDR. Cardbus has the MAC addr in the CIS,Warner Losh2002-11-274-3/+97
| | | | | | | | | | | sometimes, so return it when requested and it does. Also a little more infrastructure for a few other things. Submitted by: sam Approved by: re (blanket for NEWCARD) Notes: svn path=/head/; revision=107301
* Add a new cardbus specific ivar: PCI_IVAR_ETHADDR. Some pci-likeWarner Losh2002-11-272-0/+10
| | | | | | | | | | | buses support querying the MAC address in a standard-for-that-bus way. The base pci bus returns NULL for this IVAR always. Submitted by: sam Approved by: re (blanket for NEWCARD) Notes: svn path=/head/; revision=107300
* (hopefully) fix build breakage some people are seeingCameron Grant2002-11-2613-23/+23
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107285
* - Assume a bus number of zero if evaluating _BBN fails, not if it succeeds.John Baldwin2002-11-251-9/+8
| | | | | | | | | | | This was effectively rendering _BBN useless. - Cleanup handling of the busok variable a bit. Submitted by: marcel (1) Approved by: re (rwatson) Notes: svn path=/head/; revision=107249
* Fix a couple of bugs in host_pcib_get_busno():John Baldwin2002-11-251-5/+5
| | | | | | | | | | | | - If a PCI device is not present, then a 32-bit read_config() is going to return 0xffffffff not 0xffff. - For the 82454NX chipset, the MIOC that we read the bus numbers of the various host-PCI bridges from is at function (slot) 0x10 not 0x0. Approved by: re (rwatson) Notes: svn path=/head/; revision=107248
* Fix IFF_ALLMULTI handling.Luigi Rizzo2002-11-251-7/+7
| | | | | | | | Reviewed by: pdeuskar (maintainer) Approved by: re Notes: svn path=/head/; revision=107243
* Add polling support to the "em" driver.Luigi Rizzo2002-11-251-4/+59
| | | | | | | | Reviewed by: pdeuskar (maintainer) Approved by: re Notes: svn path=/head/; revision=107242
* Fix handling of IFF_ALLMULTI. The same bug in various forms affectsLuigi Rizzo2002-11-251-9/+7
| | | | | | | | | | | the following drivers: dc mn sf sk ste ti tl xl an bge em gem gx ie lge sr aue cue kue wi xe Approved by: re Notes: svn path=/head/; revision=107239
* various fixes to eliminate locking warningsCameron Grant2002-11-259-57/+79
| | | | | | | | Approved by: re Reviewed by: orion Notes: svn path=/head/; revision=107237
* various fixes to eliminate locking warningsCameron Grant2002-11-251-1/+1
| | | | | | | | Approved by: re Reviewed by: orion Notes: svn path=/head/; revision=107236
* if the list of supported formats is empty, fail the attach instead ofCameron Grant2002-11-251-4/+8
| | | | | | | | | | panicing later. this is a band-aid pending further investigation. MFC After: 7 days Approved by: re Notes: svn path=/head/; revision=107235
* Import some relevant changes from Via's if_fet driver:Mike Silbersack2002-11-252-2/+29
| | | | | | | | | | | | | | | | | | 1. Detect the revision of the Rhine chip we're using. 2. Use the force reset command on revisions which support it whenever the normal reset command fails. This should solve a wide range of "my vr0 locks up with reset failed messages" problems. (Although the root causes should be eventually tracked down.) Tested by: grenville armitage <garmitage@swin.edu.au> Obtained from: Via's if_fet driver MFC after: 3 days Approved by: re Notes: svn path=/head/; revision=107220
* Fix make_dev() to use 0644 instead of 0x644 for default permissionsScott Long2002-11-251-1/+1
| | | | | | | | Spotted by: kris Approved by: re Notes: svn path=/head/; revision=107219
* Fix printf format problems that were stopping LINT on alphaScott Long2002-11-252-4/+5
| | | | | | | | Submitted by: jmallett, many others Approved by: re Notes: svn path=/head/; revision=107218
* Add `if (!cold)' checkings for functions which is called via SYSINIT.Mitsuru IWASAKI2002-11-241-7/+13
| | | | | | | | | | Loading acpi.ko with kldload is disallowed, however some functions were executed unexpectedly. Approved by: re Notes: svn path=/head/; revision=107199
* Remove a comple of bogus debug printfs that snuck in during someWarner Losh2002-11-232-5/+2
| | | | | | | | | | debugging I was doing 3 months ago :-(. Noticed by: scottl Aproved by: the re blanket (different than the security blanket). Notes: svn path=/head/; revision=107194
* Allow acd(4) and cd(4) to support old behavior for CDRIOC*SPEED ioctls.Nate Lawson2002-11-231-2/+15
| | | | | | | | | | | | | If the value from the user is less than 177, assume it is a multiple of a single speed CDROM and convert to KB/sec. No complaints from: sos Reviewed by: ken Approved by: re MFC after: 1 day Notes: svn path=/head/; revision=107193
* According to the ACPI spec, the bus number of the child PCI bus of a hostJohn Baldwin2002-11-221-7/+52
| | | | | | | | | | | | | | | | | | | | | | | | | to PCI bridge can be read be evaluating the _BBN method of the host to PCI device. Unfortunately, there appear to be some lazy/ignorant/moronic/ whatever BIOS writers that return 0 for _BBN for all host to PCI bridges in the system. On a system with a single host to PCI bridge this is not a problem as the child bus of that single bridge will be bus 0 anyway. However, on systems with multiple host to PCI bridges and l/i/m/w BIOS writers this is a major problem resulting in all but the first host to PCI bridge failing to attach. So, this adds a workaround. If the _BBN of a host to PCI bridge is zero and pcib0 already exists and is not us, the we use _ADR to look up our PCI function and slot (we currently assume we are on bus 0) and use that to call host_pcib_get_busno() to try and extract our bus number from config registers on the host to PCI bridge device. If that fails, then we make an evil assumption that ACPI's _SB_ namespace lays out the host to PCI bridges in ascending order and use our pcib unit number as our bus number. Approved by: re Notes: svn path=/head/; revision=107173
* Add a function host_pcib_get_bnsno() that attempts to determine the busJohn Baldwin2002-11-222-0/+85
| | | | | | | | | | number of the child bus of a host to PCI bridge by reading from proprietary configuration registers in the host to PCI bridge devices. Approved by: re Notes: svn path=/head/; revision=107172
* Added support for DELL Perc4/DI.Eric Moore2002-11-211-1/+4
| | | | | | | | | Reviewed by: ps Approved by: jhb MFC after: 5 days Notes: svn path=/head/; revision=107141
* Create the ofwcons device at SI_SUB_CONFIGURE instead of SI_SUB_DRIVERS,Jake Burkholder2002-11-181-5/+14
| | | | | | | | | after configure() has run. Only create the device if ofwcons is the highest priority console. Make a dev alias with the same name as the firmware output-device property. Notes: svn path=/head/; revision=107044
* Setup a default tty mode even if the device is not the console. Don'tJake Burkholder2002-11-181-10/+4
| | | | | | | | | | reset the chip on open if we're not the console. This fixes running a getty on ttya or ttyb if console input and output devices are screen. Notes: svn path=/head/; revision=107042
* Remove some unnecessary code. Make the device description nicer. Add aJake Burkholder2002-11-181-66/+31
| | | | | | | delay in the right place to flush output before switching consoles. Notes: svn path=/head/; revision=107038
* - Add support for ALT_BREAK_TO_DEBUGGER; this is the only reliable way toJake Burkholder2002-11-171-21/+103
| | | | | | | | | | | trigger a breakpoint with this chip. - Fiddle the right bits in the cn input and output routines to disable port interrupts and enable visibility of the masked interrupt status bits. - Register a shutdown final event handler to put the chip back in the mode that the prom expects. Notes: svn path=/head/; revision=107016
* Apply some fixups in the driver_t's.Josef Karthauser2002-11-173-3/+3
| | | | | | | | Submitted by: akiyama MFC after: 3 days Notes: svn path=/head/; revision=107014
* Use a sysctl for controlling the debugging output.Josef Karthauser2002-11-171-6/+19
| | | | | | | Submitted by: akiyama Notes: svn path=/head/; revision=107013
* Fix a typo in a console message.Josef Karthauser2002-11-171-1/+1
| | | | | | | | Submitted by: akiyama MFC after: 3 days Notes: svn path=/head/; revision=107008
* DETACH_FORCE was removed recently. Remove it here, even though thisWarner Losh2002-11-171-7/+5
| | | | | | | isn't supported. Notes: svn path=/head/; revision=106999
* Catch up with sam's changes to network interfaces.Maxime Henrion2002-11-151-2/+1
| | | | Notes: svn path=/head/; revision=106950
* network interface driver changes:Sam Leffler2002-11-1460-694/+352
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=106937
* o track either_ifattach/ether_ifdetach API changesSam Leffler2002-11-146-107/+43
| | | | | | | | | | | | | | o use if_input for input packet processing o don't strip the Ethernet header for input packets o use BPF_* macros bpf tapping o call ether_ioctl to handle default ioctl case o track vlan changes Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106936
* Remove the remaining calls to free(), they are not needed anymore nowOlivier Houchard2002-11-141-9/+0
| | | | | | | device_get_softc() is used. Notes: svn path=/head/; revision=106922
* Fix printf() format errors.Maxime Henrion2002-11-142-2/+2
| | | | | | | Reviewed by: imp Notes: svn path=/head/; revision=106914
* Pass correct parameters to bus_space_barrier() instead of 0Maxime Henrion2002-11-141-2/+4
| | | | | | | so that this code compiles on alpha. Notes: svn path=/head/; revision=106912
* MFp4:Warner Losh2002-11-141-0/+12
| | | | | | | o Add support for bus_child_present call by implementing that method for cbb. Notes: svn path=/head/; revision=106900
* MFp4:Warner Losh2002-11-141-4/+7
| | | | | | | | o Make this code a little easier to understand by using simpler if statements, but nesting them. Notes: svn path=/head/; revision=106899
* MFp4:Warner Losh2002-11-141-4/+4
| | | | | | | | | | | o Use 32-bit unsigned types for things that really are 32-bit quantities, not bus_addr_t. These are not the same as a bus_addr_t, so don't use that here. Harmless on i386, introduced problems on sparc64. Submitted by: jhb Notes: svn path=/head/; revision=106898
* Remove an impossible condition. pf->dev is always non-null here.Warner Losh2002-11-141-2/+1
| | | | Notes: svn path=/head/; revision=106896
* MFp4:Warner Losh2002-11-141-10/+7
| | | | | | | | o Add a diagnostic for an 'impossible' condition. o Collapse common code. Notes: svn path=/head/; revision=106895
* minor correction to commentWarner Losh2002-11-141-1/+1
| | | | Notes: svn path=/head/; revision=106894
* Add second and thrid bus-toaster IDsWarner Losh2002-11-141-0/+2
| | | | Notes: svn path=/head/; revision=106893
* regen to 1.37Warner Losh2002-11-141-2/+5
| | | | Notes: svn path=/head/; revision=106892
* Add a third aic-based bustoaster.Warner Losh2002-11-141-1/+2
| | | | Notes: svn path=/head/; revision=106891
* When parsing the CIS, if a BAR tuple is encountered, enable the correspondingScott Long2002-11-131-0/+5
| | | | | | | | | | | | bit in the PCI command register for the device. Otherwise, device drivers that look at this register to see which types of BARs are usable will think that none of them are. This allows my Adaptec 1480A cardbus card to finally work. Reviewed by: imp Notes: svn path=/head/; revision=106881
* Remove a bunch of #include "opt_pci.h".Maxime Henrion2002-11-137-7/+0
| | | | Notes: svn path=/head/; revision=106860
* Unbreak kernel build.Maxime Henrion2002-11-131-1/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com> Notes: svn path=/head/; revision=106859
* Convert kernel compile option PCI_ALLOW_UNSUPPORTED_IO_RANGE toMatthew N. Dodd2002-11-131-33/+49
| | | | | | | | | | a loader tunable hw.pci.allow_unsupported_io_range. Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com> Approved by: re (murray) Notes: svn path=/head/; revision=106844
* Staticize local variable.Matthew N. Dodd2002-11-131-1/+1
| | | | | | | | Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com> Obtained from: re (murray) Notes: svn path=/head/; revision=106843
* - Add fwmem_xfer_req() and use this in other functions.Hidetoshi Shimokawa2002-11-121-50/+46
| | | | Notes: svn path=/head/; revision=106816
* - Remove unused code.Hidetoshi Shimokawa2002-11-121-183/+21
| | | | | | | - Fix style. Notes: svn path=/head/; revision=106815