Commit Graph

25392 Commits

Author SHA1 Message Date
he
df7cd4eea6 Complete the device_t / softc split by changing the sc_dev member
from "struct device" to "device_t".  Commit overlooked when tga.c was
changed?
2009-05-18 00:14:27 +00:00
dyoung
776b6e11bf Reverse the sense of the DETACH_FORCE check so that we return EBUSY in
the correct circumstances.
2009-05-17 18:11:34 +00:00
cegger
82fdd59cb5 fix crash with LOCKDEBUG+DIAGNOSTIC kernels:
sdhc_bus_clock() calls mutex_enter().
then in DIAGNOSTIC section, sdhc_bus_clock() calls sdhc_card_detect().
sdhc_card_detect() calls mutex_enter() on the same mutex again.
when LOCKDEBUG is enabled, you get

Mutex error: lockdebug_wantlock: locking against myself
2009-05-17 14:36:46 +00:00
tsutsui
cb5bffc5fa Split device_t/softc. Tested on D-Link DL-4000. 2009-05-17 02:08:35 +00:00
tsutsui
f84df6daef u_intNN_t -> uintNN_t 2009-05-17 01:33:24 +00:00
tsutsui
e298c1144d Split device_t/softc.
Tested PCI HME on i386.  Sbus HME is compile test only.
2009-05-17 00:40:43 +00:00
tsutsui
420c7350fb Use device_private() to get struct sbus_softc from device_t parent.
XXX: sbus_softc has been split from device_t on sparc, but not on sparc64!?
2009-05-17 00:28:35 +00:00
dyoung
0f04ad55b3 Do not detach a sd(4) instance if it is open, but return EBUSY,
instead.  If the detach is forced, do what sdclose() does on the
last close: flush the cache, delete our reference to the SCSI bus
device, et cetera.
2009-05-16 20:10:52 +00:00
martin
a6eabcae57 we can not free() a dmamap! 2009-05-16 18:24:44 +00:00
tsutsui
87e79748d0 KNF and misc cosmetics. 2009-05-16 14:27:30 +00:00
tsutsui
844c127c73 Split device_t/softc. Tested on arc:
tga0 at pci0 dev 3 function 0: DC21030 step C, board type T8-02
2009-05-16 13:04:26 +00:00
tsutsui
d8c545cc8c Split device_t/softc split, tested on VT6212L. 2009-05-16 07:34:05 +00:00
tsutsui
d2452bef38 Make ahc_detach() take struct ahc_softc * as well as ahc_attach()
and remove bogus casts around ahc_detach().

XXX: There is a pmf_device_deregister(9) call in ahc_detach()
XXX: while there is no pmf_device_register(9) in ahc_attach().
XXX: It looks more pmf(9) stuff is required for cardbus detach.
2009-05-16 06:44:05 +00:00
tsutsui
7882b9d224 - fix one more device_t/softc split botch in debug code
- use sc->sc_dev to get device_t
- fix inconsistent aprint_error_dev(9) usage
- some KNF and wrap long lines
2009-05-16 05:51:58 +00:00
tsutsui
db656c02e4 Fix botch on device_t/softc split.
XXX: still doesn't work (command timeout on data xfer).
2009-05-16 05:26:31 +00:00
tsutsui
49d9fc80f4 Misc cleanup:
- some KNF
- u_intNN_t -> uintNN_t
- wrap long lines and fix indent
- remove return statements at the end of void functions
- use __arraycount()

XXX: many inconsistent aprint_error_dev(9) vs printf(9)
2009-05-16 03:57:57 +00:00
dyoung
0ee9d37122 Do not detach a wd(4) instance if it is open, but return EBUSY,
instead.  If the detach is forced, do what wdclose() does on the
last close: flush the cache, clear the flag WDF_LOADED, and delete
our reference to the ATA bus device.
2009-05-15 23:49:28 +00:00
tsutsui
31ec75e9f1 Split device_t/softc.
No crash on:
esiop0 at pci0 dev 11 function 0: Symbios Logic 53c875 (ultra-wide scsi)
siop0 at pci0 dev 9 function 0: Symbios Logic 53c810a (fast scsi)
siop0 at gsc0 hpa 0xf0830000 path 2/0/7 irq 3 ipl 6: NCR53C720 rev 2
2009-05-15 17:55:44 +00:00
pgoyette
40dfc68c05 Ooops - sdtemp(4) driver requires sysmon. 2009-05-14 13:22:26 +00:00
cegger
76480e5237 regen. 2009-05-13 14:49:57 +00:00
cegger
eb3bf0c3e4 add RX780/RX790 chipset host bridge and Radeon X1600 2009-05-13 14:49:20 +00:00
tsutsui
4890eaf0d8 Pass correct size (after padding) to bus_dmamap_sync(9) for RX mbufs
in iee_intr().  Fixes panic on DIAGNOSTIC kernel reported by skrll@.
2009-05-13 13:12:06 +00:00
christos
467b3dd79a sprinkle #ifdef _KERNEL to make scsictl compile. 2009-05-13 02:35:25 +00:00
cegger
7cf2991222 struct device * -> device_t, no functional changes intended. 2009-05-12 14:38:26 +00:00
cegger
99747a8099 struct device * -> device_t, no functional changes intended. 2009-05-12 14:28:22 +00:00
cegger
529e91fca1 struct device * -> device_t, no functional changes intended. 2009-05-12 14:16:35 +00:00
cegger
22f40c6af4 KNF 2009-05-12 14:07:01 +00:00
cegger
d16a259fe3 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 13:15:24 +00:00
cegger
32c4940900 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 12:10:29 +00:00
cegger
288e30b1ba undo my previous changes.
unbreaks build of acorn32.
2009-05-12 10:22:31 +00:00
cegger
df73a4b15e struct device * -> device_t, no functional changes intended. 2009-05-12 10:16:35 +00:00
cegger
67c088a49a struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 10:07:55 +00:00
cegger
93dfc06da9 struct device * -> device_t, no functional changes intended. 2009-05-12 09:50:28 +00:00
cegger
e5339e11d4 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 09:29:46 +00:00
cegger
ab57cc6f1b struct device * -> device_t, no functional changes intended. 2009-05-12 09:10:15 +00:00
cegger
8a46564d1d struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 08:44:19 +00:00
cegger
b8169823d2 use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.
2009-05-12 08:22:59 +00:00
cegger
2dc0e43978 use device_xname() 2009-05-11 20:53:47 +00:00
bjh21
7f79b2d5f7 Replace shutdownhooks with pmf in sec(4). 2009-05-11 20:13:49 +00:00
cegger
fcd92f8a6e use device_xname() 2009-05-11 17:14:31 +00:00
tsutsui
aac17e82ae - rename RTK_HWREV_8102EL_SPIN2 -> RTK_HWREV_8103E
- add a HWREV value for 8168DP
Per Realtek's Linux drivers.
2009-05-11 15:42:33 +00:00
tsutsui
84e868b269 - adjust comments for the previous change
- wrap a long comment
- remove a trailing whitespace
2009-05-10 04:36:58 +00:00
tsutsui
f76d0651b7 Misc bus_dma(9) related cleanup:
- calculate each descriptor sizes and offsets in iee_attach() and store them
  into softc, rather than re-calculating them everywhere via macros
- prepare macros to sync DMA shmem per each descriptor
- sync only necessary descriptors in iee_intr() and iee_start()
- make sure SCB_FOO macros take softc as an arg properly
- use bus_dmamap_load_mbuf(9) for RX mbufs
- put 2 byte alignments to RX mbufs

XXX: still slower than ie(4) in i82586 compat mode on HP9000 735/125.
2009-05-10 04:26:19 +00:00
tsutsui
3ec7e0d881 Fix more pasto botch. 2009-05-09 20:44:56 +00:00
tsutsui
f8a52a52cb Remove (wrong) function names by pasto from attach failure messages. 2009-05-09 20:42:09 +00:00
pgoyette
465d8da77a Minor white-space KNF nit. No functional change. 2009-05-09 17:32:27 +00:00
sborrill
9ea64db0b6 regen 2009-05-09 15:16:42 +00:00
sborrill
2336481d62 Add alternative product ID for VIA VT8237A Integrated SATA Controller 2009-05-09 15:15:50 +00:00
pgoyette
b3c79debe6 Initial implementation of sdtemp(4) driver for on-DIMM temp sensor.
(These optional sensors are specified by JEDEC Standard No. 21-C
Section 4-7 and implemented by multiple vendors.  Tested on my
amd64 machine with Kingston KVR1066D3E7S/2G memory which includes
a STMicro STTS424E02 sensor.)
2009-05-09 15:04:25 +00:00
pgoyette
7450d74baf For multi-byte transfers, the bytes need to be written to or read from
consecutive data registers.  Discovered while debugging sdtemp(4) driver
which does _only_ 16-bit transfers!
2009-05-09 07:13:57 +00:00