Commit Graph

5225 Commits

Author SHA1 Message Date
macallan
d0b2c36849 add modeseting support. Now if there's a mode string in igsfb_devconfig the
driver will try to use it if at all possible, otherwise fall back to the old
hardcoded 1024x768x60 mode.
2009-11-11 17:01:17 +00:00
macallan
293ac096d1 add support for an optional machine-dependent mmap() method, so the bus
backend can do whatever voodoo necessary to the aperture, IO space etc.
Mainly for shark, to get around the weird ARM bus_space.
2009-11-10 22:23:22 +00:00
jakllsch
9ae52821d4 Use hme_init() to provide a non-NULL ifp->if_init. 2009-11-03 22:06:30 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
rmind
993cb03302 Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
2009-10-19 23:19:37 +00:00
bouyer
6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
sborrill
88bbf990c2 Commit patch from PR#41926. Confirmed to work by PR submitter on two
controllers as well myself and another on viaide.

Stops errors such as the following when probing SATA drives through
controllers that offer the legacy pciide interface:
viaide1 channel 0: reset failed for drive 0

OK bouyer@
2009-10-06 13:45:01 +00:00
jmcneill
6c62f91733 Initial import of an SD/MMC driver for the Winbond W83L518D (and probably
W83L519D) Integrated Media Reader with PNP bus attachment glue.
2009-09-30 20:44:49 +00:00
njoly
33042a7b04 Be robust against an invalid timer period value. 2009-09-30 15:22:11 +00:00
jakllsch
bd5cb77445 gpio(4) support for Intel ICH southbridges.
Tested on Intel SS4200-E (ICH7), and Acorp 6A815EPD (ICH2) motherboards,
on amd64 and i386 ports respectively.

It should be noted that the majority of boards with ICH chips do not
expose the GPIO pins for off-board use.  For instance, aside from the
three exposed-on-a-header pins on the 6A815EPD, another pin is also
used to control write protect on the FWH.  The SS4200 exposes the GPIO
on a header that connects to the 10 LEDs on the front panel, as well
as a tact switch on the back panel.
2009-09-27 17:55:31 +00:00
tsutsui
0719ca07be Replace shutdownhook_establish(9) with pmf_device_register1(9).
Compile test only.
2009-09-27 10:00:11 +00:00
tsutsui
a6b618f221 Split device_t/softc. Tested on aic7901A. 2009-09-26 14:44:10 +00:00
tsutsui
df90eec26b Make local functions static. 2009-09-22 16:44:08 +00:00
tsutsui
6b3b6e9a98 Fix possible endian issue. Untested. 2009-09-22 15:25:12 +00:00
tsutsui
3b0a685f2b Split device_t/softc. Tested only on cs at ofisa on shark. 2009-09-22 14:55:19 +00:00
tsutsui
36b4b2e6c0 - replace shutdownhook_establish(9) with pmf_device_register1(9)
- remove powerhook_establish(9) because all stuff in cs_power()
  will be handled in pmf_class_network

Briefly tested on CS8900 at ofisa on DNARD compatible.
2009-09-22 13:31:26 +00:00
tsutsui
606e573f63 - wrap long lines
- remove unnecessary casts against void pointers
2009-09-22 13:26:54 +00:00
tsutsui
d7f21e6129 Don't declare ISA specific aic_isa_attach() in MI header, and
also make local functions in aic_isa.c static.
2009-09-22 13:18:28 +00:00
tsutsui
00eb8aa546 Split device_t/softc. Tested on AHA-1520B at ISA and ISAPnP.
XXX: ISA attachment shouldn't match cards in ISAPnP mode.
2009-09-22 12:56:06 +00:00
jakllsch
81f8a1dcf0 Add more-complete definitions of ICH GPIO-related registers.
While here, fix a typo in a register number.
2009-09-21 16:18:31 +00:00
tsutsui
c8a52f80ba Split device_t/softc. Tested on AHA-1542CF. 2009-09-21 08:12:47 +00:00
tsutsui
13855cad09 Use common ether_crc32_le() for multicast hash. 2009-09-19 04:55:45 +00:00
tsutsui
eb06ddcd95 hme_reset() is no longer called from bus attachments so make it static. 2009-09-18 12:40:15 +00:00
tsutsui
5dcfc285a0 Misc KNF and cosmetics, and remove unnecessary casts etc. 2009-09-17 18:14:41 +00:00
dyoung
36fffd8d02 In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together.  Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
   #include it from <sys/pmf.h> instead of <sys/device.h> to break the
   circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
   suspend/resume call.  Start to replace instances of PMF_FN_PROTO,
   PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
   device in suspension.  More than one suspensor may hold a device
   at once.  A device stays suspended as long as at least one
   suspensor holds it.  A device resumes when the last suspensor
   releases it.

   Currently, the kernel defines three suspensors,

   3a the system-suspensor: for system suspension, initiated
      by 'sysctl -w machdep.sleep_state=3', by lid closure, by
      power-button press, et cetera,

   3b the drvctl-suspensor: for device suspension by /dev/drvctl
      ioctl, e.g., drvctl -S sip0.

   3c the system self-suspensor: for device drivers that suspend
      themselves and their children.  Several drivers for network
      interfaces put the network device to sleep while it is not
      administratively up, that is, after the kernel calls if_stop(,
      1).  The self-suspensor should not be used directly.  See
      the description of suspensor delegates, below.

   A suspensor can have one or more "delegates".  A suspensor can
   release devices that its delegates hold suspended.  Right now,
   only the system self-suspensor has delegates.  For each device
   that a self-suspending driver attaches, it creates the device's
   self-suspensor, a delegate of the system self-suspensor.

   Suspensors stop a system-wide suspend/resume cycle from waking
   devices that the operator put to sleep with drvctl before the cycle.
   They also help self-suspension to work more simply, safely, and in
   accord with expectations.

4. Add the notion of device activation level, devact_level_t,
   and a routine for checking the current activation level,
   device_activation().  Current activation levels are DEVACT_LEVEL_BUS,
   DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
   indicate that the device's bus is active, that the bus and device are
   active, and that the bus, device, and the functions of the device's
   class (network, audio) are active.

   Suspend/resume calls can be qualified with a devact_level_t.
   The power-management framework treats a devact_level_t that
   qualifies a device suspension as the device's current activation
   level; it only runs hooks to reduce the activation level from
   the presumed current level to the fully suspended state.  The
   framework treats a devact_level_t qualifying device resumption
   as the target activation level; it only runs hooks to raise the
   activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
   drivers.

6. Temporarily add an unused power-management workqueue that I will
   remove or replace, soon.
2009-09-16 16:34:49 +00:00
dyoung
ba1e593dc7 Simplify activation routines. Don't block interrupts, if_deactivate()
does it.  Compile-tested, only.
2009-09-15 20:51:12 +00:00
dyoung
fe01097755 Simplify activation routines: do not call mii_activate(), it is a
no-op.  Do not block interrupts, if_deactivate() will take care of
that for us.
2009-09-15 19:29:17 +00:00
dyoung
b8695aecbf Simplify activation routines: don't call mii_activate(), it's a
no-op.  Don't block interrupts, if_deactivate() does it.
Compile-tested, only.
2009-09-15 19:20:29 +00:00
dyoung
662dfba47d To ease a future device_t/softc split, se device_private() instead
of casting device_t to softc.
2009-09-15 18:37:02 +00:00
dyoung
7cd3e7cb51 unifdef -D__NetBSD__ -U__FreeBSD__.
No functional change intended.
2009-09-15 18:32:00 +00:00
tsutsui
16c0f8385d Use device_private(), proper types or variables for device_t and softc.
(not yet split though)

No crash on gxemul emulating hpcmips mobilepro.
2009-09-14 13:41:15 +00:00
tsutsui
5770fb4ee0 u_intNN_t -> uintNN_t 2009-09-14 12:49:33 +00:00
dyoung
9e037d8311 Experimental support for fragmentation and RTS/CTS.
Delete unused atw_voodoo and constants.

Export Tx/Rx statistics with evcnt(9).

Correct the Short Inter-Frame Space (SIFS) that we write to ADM8211's
registers; I do not recall if that corrected the SIFS that I observed
"on the air."  Use the constant IEEE80211_DUR_DS_EIFS to configure
the ADM8211's EIFS, instead of writing the same "magic" number,
0x64, that my reference driver wrote.

Do not clear OACTIVE in atw_init(), because atw_stop() cleared it
previously by calling atw_txdrain().

Use the net80211 short-preamble flag and instead of ATW_SHPREAMBLE.

Add an ADM8211 workaround from the reference driver, atw_workaround1(),
but don't compile it right now.

In at_intr(), don't stop processing the interrupt status after
restarting the receive ring, but process Tx interrupt status.  If
a packet's Tx lifetime is exceeded, reinitialize the device to get
packets moving again.  If the Tx FIFO underflows, restart the
transmitter, not the receiver!

Avoid losing synchronization with the Rx ring by replicating one
of Charles Hannum's fixes to rtw(4) here: receiving a management
packet may, as a side-effect, reset the Rx ring, so refer to the
softc's Rx ring pointer, sc_rxptr, every time through the loop in
atw_rxintr(), instead of refering to a pointer on the stack, i.

Re-synchronize DMA after reading the OWN bit on an Rx/Tx descriptor.
XXX This needs more work.

Reset sc_tx_timer as Tx descriptors are reclaimed from the device.

Shorten staircases in atw_watchdog().

Remove from softc an unused member, sc_intr_ack.
2009-09-13 22:07:34 +00:00
dyoung
da6660904b Delete whitespace at ends of lines. No functional change intended. 2009-09-13 21:24:58 +00:00
tsutsui
ad62cf6bd2 Fix an incomplete device_xname change in rev 1.69. PR kern/41861 2009-09-12 19:55:29 +00:00
tsutsui
df9cde870d Fix warnings by -Wpointer-sign, which is disabled by default. PR kern/33965 2009-09-12 19:16:35 +00:00
tsutsui
0b4006b755 Make local functions static and remove a declaration that is also in hmevar.h.
Also comment out or remove declarations for #if 0'ed or nonexistent functions.
2009-09-08 18:35:42 +00:00
tsutsui
2b11b477b3 - split out chip reset ops from hme_stop() into a new function
hme_chipreset() to make hme_stop() match struct ifnet API
- set ifp->if_timer in hme_start() if any TX packets are queued
- also clear ifp->if_timer and ifp->if_flags in hme_stop()
- replace shutdownhook_establish(9) with pmf_device_reigster1(9)
Briefly checked hme at pci.
2009-09-08 17:16:33 +00:00
tsutsui
91bbbb9ed1 Split device_t/softc.
Tested QLogic 1020 Fast Wide SCSI HBA at PCI.
Sbus attachment is untested, but not so much quirks in it.
2009-09-07 13:39:19 +00:00
tsutsui
c67601b868 Whitespace nits. 2009-09-07 13:31:44 +00:00
tsutsui
41f548bed9 Invert logic around nested pmf(9) registrations for readability. 2009-09-05 14:19:30 +00:00
tsutsui
15ecebfdb2 Make ahd_detach() take struct ahd_softc * rather than device_t
as well as ahd_attach().  (currently no backend calls it though)
2009-09-05 12:50:53 +00:00
tsutsui
7edc9e3e17 Use device_private() to get softc. 2009-09-05 12:46:55 +00:00
tsutsui
d283274ba9 - use local ahd_name() to print device name
- pass proper device_t types to config(9) functions
2009-09-05 12:43:56 +00:00
tsutsui
1f74bbf3de Remove unnecessary casts against void pointers. 2009-09-05 12:39:25 +00:00
tsutsui
aa60aebf13 Replace shutdownhook_establish(9) with pmf_device_register1(9) in
MI epconfig() and ep_detach(), and remove pmf(9) calls in pcmcia attachment.
Tested on ep0 at pci, but pcmcia attachment is untested.
2009-09-05 12:30:59 +00:00
tsutsui
1cc46c1f6d Remove one more extra whitespace. 2009-09-05 08:23:24 +00:00
tsutsui
97dbe6076b Remove unnecessary whitespace. 2009-09-05 03:50:49 +00:00
tsutsui
f95171bf7a u_intNN_t -> uintNN_t 2009-09-04 18:40:19 +00:00
tsutsui
4466014699 Remove unnecessary whitespace. 2009-09-04 18:29:52 +00:00