Commit Graph

4578 Commits

Author SHA1 Message Date
briggs
4208391f45 Some changes from the FreeBSD driver:
* Include definitions of adapter-initiated fibs.
* Send aifs back to the adapter after we receive them.
* Use indexes instead of pointers in 32-bit hardware registers.
* If we get a message that there's a printf from the adapter, but we have
  a NUL in the first character of the printf string, change the NUL to a
  space.
2007-05-24 15:07:47 +00:00
rumble
b1a93d335f Fix comments about the cf_flags layout and use macros to test whether
tags, sync, and disconnect/reconnect are to be disabled or not.
2007-05-21 19:25:54 +00:00
rumble
305139637d Check in a workaround before I lose or forget about it:
My SGI issued IBM DORS-32160 will respond to every message with a sync
negotiation (even IDENTIFY) until it gets a response it likes (and it
definitely doesn't like async). Unfortunately, this locks us into an endless
loop after sending IDENTIFY, since the device responds with a SYNC
negotiation that we refuse to accept. This refusal results in a new
target-initiated sync negotiation, and so on...

To work around this, permit negotiating sync mode on an unexpected
target-initiated sync negotiation.
2007-05-21 18:56:32 +00:00
joerg
1044d56390 If the interrupt status register reads as 0xffff in rtk_intr, assume
that the card is gone and abort the loop. This fixes hot-plugging of
cardbus cards.

From FreeBSD's rl(4).
2007-05-18 14:10:37 +00:00
joerg
a6f33abf23 Make rtk_list_tx_init return void. The return value was constant and
never used.
2007-05-18 14:08:57 +00:00
bouyer
920d7a6afe Split the ahcisata driver in pci front-end and bus-independant back-end. 2007-05-12 11:04:58 +00:00
tsutsui
25476aa317 Pull a fix for PCIe variants from FreeBSD's if_re.c rev 1.71:
> - With the PCIe devices, it looks issuing a TX command while there's
>   already a transmission in progress doesn't have any effect. In other
>   words, if you send two packets in rapid succession, the second one may
>   end up sitting in the TX DMA ring until another transmit command is
>   issued later in the future. Basically, if re_txeof() sees that there
>   are still descriptors outstanding, it needs to manually resume the
>   TX DMA channel by issuing another TX command to make sure all
>   transmissions are flushed out. (The PCI devices seem to keep the
>   TX channel moving until all descriptors have been consumed. I'm not
>  sure why the PCIe devices behave differently.)
2007-05-10 14:04:47 +00:00
xtraeme
59000b719e Missing __KERNEL_RCSID(). 2007-05-08 17:17:14 +00:00
xtraeme
ff1c414804 Split the ug(4) driver in three components:
* dev/ic/ug.c (main code shared by the attachments)
	* dev/isa/ug_isa.c (isa attachment)
	* dev/acpi/ug_acpi.c (acpi attachment)

That means that ug(4) can now be attached via ACPI.

Thanks to Mihai Chelaru for the good work.
2007-05-08 16:48:37 +00:00
rumble
f2bf28e11c Report whether we're using DMA and what type on attach, since I keep losing
track while testing.
2007-05-08 02:08:17 +00:00
rumble
f337484a4a The maximum FIFO depth on old WD33C93 parts is only 5, not 12 as on 93A and
93B. However, there appear to be issues using the maximum of 5 on old
parts, so 4 is it.
2007-05-08 00:29:30 +00:00
rumble
11dc14c9fe Enable Fast SCSI transfers for WD33C93B parts with appropriate input
clocks.

My Seagate ST32430N now sees about 50% greater throughput (about 97% as
fast as IRIX can push it). However, there appear to be other performance
issues with the driver as other disks perform significantly worse than they
should, with or without this change.

Reviewed by bjh21. Tested on my Indy and Challenge S.
2007-05-08 00:20:15 +00:00
nisimura
05c17e1a31 fix errors in MCCR1 register
- ROMNAL bit field definition
- ROMFAL comment typo
2007-05-03 05:00:57 +00:00
dogcow
cdc34fdb17 tred->sensor is a u_int. 2007-05-01 19:39:22 +00:00
bouyer
982bad256f Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
2007-05-01 17:18:52 +00:00
garbled
82817a763e Convert to using BITS macros, and add some additional defines for
determining ECC/ram types
2007-05-01 07:52:51 +00:00
garbled
a65cbc2f78 Add a set of register defines for the MPC106 PCI bridge. Adapted from
the MPC105, and fleshed out with the user manual.
2007-05-01 05:00:55 +00:00
garbled
1257ee1702 Add a set of registers for the ibm 82660 pci bridge chip found in various
IBM powerpc machines.
2007-05-01 04:20:45 +00:00
matt
e7fb6f9eb5 Count tx/rx intrs.
Don't set OW in the first transmit descriptor until all descriptors have
been set up.  Always try to drain the transmit ring.
2007-04-26 23:08:22 +00:00
xtraeme
d5f3ba6a73 Fix a debug printf. 2007-04-19 20:24:47 +00:00
xtraeme
7b1f83bdfc Add more debugging printfs, to see the raw data returned by
the registers.
2007-04-19 20:18:39 +00:00
dyoung
57b1c008e8 Plug an mbuf leak. Found by inspection.
Do not clear IFF_OACTIVE and reset the transmit watchdog timer
unless we have actually freed some transmit resources.  This prevents
my wireless routers from needlessly entering ath_start() without
any transmit resources.  If the MAC's transmitter has frozen, also,
then the driver will take the "out of xmit buffers" path in
ath_start(), which sets OACTIVE without activating the transmit
watchdog.  That freezes the transmit path until the driver is reset.

XXX The "out of xmit buffers" path in ath_start() needs more
XXX attention.
2007-04-17 22:01:43 +00:00
skrll
a3ff9cc3ff Remove bogus if_drain. If an attempt to reclaim mbufs was made the
interface was marked down.

Should fix PR 31540.
2007-04-17 14:12:06 +00:00
dyoung
339f95c302 Make this compile with or without 'options ATADEBUG'. 2007-04-16 05:25:36 +00:00
tnn
b2079804d3 Add envctrl(4): Sun Ultra Enterprise 450 environmental monitoring driver.
Also add accompanying i2c controller driver, pcf8584.
Both written by me. Some cosmetic improvements from Iain Hibbert.
ok <martin>
2007-04-14 19:33:27 +00:00
matt
2b6219117d Improve the transmit logic. Use bus_dma_load_mbuf on the entire mbuf and
load each segment.  in transmit interrupt service, take advatnage on know
how many segments/descriptors are in each packet.
2007-04-13 04:16:45 +00:00
jmcneill
436a56bf9f Add AD1843 codec register defenitions, from OpenBSD. 2007-04-13 03:35:38 +00:00
dyoung
b7dea03346 Make the members of the descriptors volatile, because the NIC and
the host share them.

Before breaking out of the loop over descriptors in gem_rint(),
DMA-resynchronize the first Rx descriptor we found that does not
belong to the host.  We must avoid a cached descriptor "covering"
a descriptor in RAM, because the cached descriptor may say that
the descriptor still belongs to the NIC, when that is not true,
and the driver will hang.

XXX I believe this driver only works by luck on hosts that both
XXX have a cacheline size greater than the size of a descriptor
XXX (16 bytes) and lack DMA/cache coherency.  I need to add some
XXX trickery to make sure that we don't scribble over the NIC's
XXX changes to a descriptor when we flush a cached descriptor to
XXX RAM with bus_dmamap_sync(9).
2007-04-12 06:14:40 +00:00
dyoung
af26ee6d9c Use PRIx64 and PRIx32 format strings. Remark about lack of DMA
synchronization at some debug code that reads descriptors.
2007-04-12 05:56:01 +00:00
rumble
e0d3b63ac3 If we fail to attach, use the size determined by pci_mapreg_map() rather
than a constant, since this will be incorrect on some chips (MPI350) and
lead to a panic.
2007-04-06 18:16:29 +00:00
tsutsui
19daf5ad0b Cleanup handling of quikrs on each RealTek chip:
- replace rtk_type member in rtk_softc which has chip types
  with new rtk_quirk that represents quirks on each chip:
  - RTKQ_8129           doesn't have internal MII (used in rtk(4))
  - RTKQ_8139CPLUS      has different register layout (for re(4))
  - RTKQ_8169NONS       (original 8169) requires some settings on init
  - RTKQ_PCIE           requires different settings in setmulti
  so that we don't have to check each hwrev values or types everywhere
  and newer variants will also work without changes if they don't
  have other quirks
  (sc_rev is unchenged for now for reference to the Realtek's driver)
- don't check hwrev register in re_pci_match() but check
  only PCI_VENDER(), PCI_PRODUCT() and PCI_REVISION()
  so that we no longer have to map pci space there
- add a new HWREV value for another 8168 variant
- try to map PCI mem space more properly
- remove (probably unneeded) ifp->if_baudrate initialization

Tested on a newer 8168 variant by Dennis den Brok on tech-kern,
and also tested on 8139 and 8169C on macppc, and 8139C+ on landisk
by me.
2007-03-21 12:17:31 +00:00
dyoung
4888b33c86 Let config(1) know that #define ATADEBUG goes in opt_ata.h. In
dev/ic/wdc.c and in dev/ata/ata.c, #include "opt_ata.h", and make
both the files compile with or *without* ATADEBUG.  Do not compile
with ATADEBUG by default.
2007-03-17 06:41:35 +00:00
dogcow
d515e7b784 Some delicious copypasta from sys/dev/ic/vga.c, so that unichromefb will
compile (and possibly work) when option VGA_RASTERCONSOLE is present.
2007-03-15 16:58:36 +00:00
macallan
e7b9466d99 sprinkle parentheses 2007-03-14 05:35:22 +00:00
xtraeme
4b9be68be9 Use C99 struct initializers. 2007-03-13 18:32:35 +00:00
ad
59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
christos
31b5ea99cb fix missing initializers. 2007-03-11 22:25:48 +00:00
ad
5941740892 Remove a use of lockmgr/LOCK_INITIALIZER. 2007-03-11 22:16:32 +00:00
xtraeme
f8fabb9a9e Explicitly initialize lm_sensor->rfact for every sensor's chip. 2007-03-11 21:23:22 +00:00
xtraeme
0562751ee3 Update for the nslm7x driver:
* For each supported chip, there's a struct lm_sensor array
  that specifies the sensor data, like reg, bank, descr, rfact.

* Rather than having 3 functions to setup the voltage, temp and fan
  sensors, just have one that will do all the three steps looking at
  its struct lm_sensor members, simplifying a lot the code.

and more things that I can remember, our code now is synced with
OpenBSD, IMHO much better to understand and maintain in the future.

Supported chips added with the new code include:

* Winbond: W83627EHF, W83627DHG, W83637HF, W83783S, W83791D, W83791SD,
           W83792D.
* Asus AS9912F.

My new mobo with the Winbond W83627DHG chip correctly reports
the values now:

lm0 at isa0 port 0x290-0x297: Winbond W83627DHG Hardware monitor

[juan@nocturno][~]> envstat -r
      VCore:      1.232 V
       +12V:     12.091 V
      +3.3V:      3.264 V
        +5V:      4.945 V
       VBAT:      3.728 V
System Temp:     36.000 degC
   CPU Temp:     29.500 degC
   Aux Temp:     22.000 degC
    CPU Fan:       1591 RPM
[juan@nocturno][~]>
2007-03-11 15:03:08 +00:00
macallan
749b17a7c8 make the dbri driver work again
while there enforce some alignment rules, adjust some timeouts, retry when
probing the codec fails
2007-03-08 21:15:20 +00:00
njoly
90b3c9e789 High Precision Event Timer driver, following Intel specifications.
Allow attachement at both ACPI (hpet@acpi) and AMD8111 LPC Controller
(hpet@amdpcib).

Requested by xtraeme, and tested by a few users.
2007-03-08 14:26:26 +00:00
he
002b93be68 Cast to char* before doing pointer arithmetic. 2007-03-05 17:55:19 +00:00
he
05029883f8 Use a char* variable for doing pointer arithmetic with. 2007-03-05 17:47:49 +00:00
yamt
d5bbe1373d fix fallout from caddr_t changes. 2007-03-04 15:35:20 +00:00
tsutsui
28eef664bd Use (uint8_t *) for shared memory address. 2007-03-04 12:26:22 +00:00
christos
fffc9c66c9 fix fallout from caddr_t changes. 2007-03-04 07:54:07 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui
8c864d4bd5 Fix EEPP_INTMAP values, as per my ISA EtherExpress PRO/10.
(though it still has some other problem)
2007-03-04 02:59:07 +00:00
martin
ade480cf0b Make it at least compile again (const propagation) 2007-02-25 21:06:57 +00:00